From ca57057f598bfc7119f79f71bf38ec88244ab396 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Wed, 31 Aug 2016 00:08:49 +0000 Subject: [PATCH 002/204] Import am-utils 6.2, Suggested by: pfg@ Obtained from: ftp://ftp.am-utils.org/pub/am-utils/ --- AUTHORS | 145 +- BUGS | 8 +- COPYING | 9 +- ChangeLog | 1122 +- FAQ | 2 +- INSTALL | 472 +- LSM.am-utils | 20 + MIRRORS.html | 28 +- MIRRORS.txt | 30 +- Makefile.am | 352 + Makefile.in | 1170 + NEWS | 170 +- README | 8 +- README.attrcache | 4 +- README.autofs | 176 + README.ldap | 10 +- README.osx | 74 + README.sun2amd | 142 + README.y2k | 5 +- TODO | 177 - acinclude.m4 | 14271 ++++ aclocal.m4 | 1233 + amd/Makefile.am | 171 + amd/Makefile.in | 1379 + amd/am_ops.c | 45 +- amd/amd.8 | 20 +- amd/amd.c | 19 +- amd/amd.h | 98 +- amd/amfs_auto.c | 18 +- amd/amfs_direct.c | 12 +- amd/amfs_error.c | 12 +- amd/amfs_generic.c | 243 +- amd/amfs_host.c | 37 +- amd/amfs_link.c | 14 +- amd/amfs_linkx.c | 8 +- amd/amfs_nfsl.c | 29 +- amd/amfs_nfsx.c | 41 +- amd/amfs_program.c | 30 +- amd/amfs_root.c | 10 +- amd/amfs_toplvl.c | 17 +- amd/amfs_union.c | 14 +- amd/amq_subr.c | 155 +- amd/amq_svc.c | 175 +- amd/autil.c | 123 +- amd/clock.c | 8 +- amd/conf.c | 145 +- amd/conf_parse.y | 8 +- amd/conf_tok.l | 31 +- amd/get_args.c | 49 +- amd/info_exec.c | 31 +- amd/info_file.c | 45 +- amd/info_hesiod.c | 15 +- amd/info_ldap.c | 81 +- amd/info_ndbm.c | 18 +- amd/info_nis.c | 24 +- amd/info_nisplus.c | 16 +- amd/info_passwd.c | 19 +- amd/info_sun.c | 53 + amd/info_union.c | 27 +- amd/map.c | 296 +- amd/mapc.c | 160 +- amd/mntfs.c | 102 +- amd/nfs_prot_svc.c | 199 +- amd/nfs_start.c | 60 +- amd/nfs_subr.c | 1197 +- amd/ops_TEMPLATE.c | 12 +- amd/ops_autofs.c | 1279 - amd/ops_cachefs.c | 12 +- amd/ops_cdfs.c | 27 +- amd/ops_efs.c | 13 +- amd/ops_ext.c | 223 + amd/ops_lofs.c | 10 +- amd/ops_lustre.c | 203 + amd/ops_mfs.c | 8 +- amd/ops_nfs.c | 138 +- amd/ops_nfs3.c | 8 +- amd/ops_nfs4.c | 50 + amd/ops_nullfs.c | 8 +- amd/ops_pcfs.c | 10 +- amd/ops_tfs.c | 8 +- amd/ops_tmpfs.c | 152 +- amd/ops_udf.c | 272 + amd/ops_ufs.c | 14 +- amd/ops_umapfs.c | 8 +- amd/ops_unionfs.c | 8 +- amd/ops_xfs.c | 10 +- amd/opts.c | 73 +- amd/readdir.c | 528 +- amd/restart.c | 34 +- amd/rpc_fwd.c | 12 +- amd/sched.c | 10 +- amd/srvr_amfs_auto.c | 19 +- amd/srvr_nfs.c | 159 +- amd/sun2amd.8 | 92 + amd/sun2amd.c | 203 + amd/sun_map.c | 595 + amd/sun_map.h | 123 + amd/sun_map_parse.y | 492 + amd/sun_map_tok.l | 233 + amd/test1.sh | 2 + amq/Makefile.am | 41 + amq/Makefile.in | 851 + amq/amq.8 | 45 +- amq/amq.c | 247 +- amq/amq.h | 10 +- amq/amq_clnt.c | 39 +- amq/amq_xdr.c | 61 +- amq/pawd.1 | 13 +- amq/pawd.c | 8 +- bootstrap | 74 +- buildall | 364 + compile | 347 + conf/autofs/autofs_default.c | 43 + conf/autofs/autofs_default.h | 58 + conf/autofs/autofs_linux.c | 909 + conf/autofs/autofs_linux.h | 109 + conf/autofs/autofs_solaris_v1.c | 719 + conf/autofs/autofs_solaris_v1.h | 83 + conf/autofs/autofs_solaris_v2_v3.c | 1292 + conf/autofs/autofs_solaris_v2_v3.h | 69 + conf/checkmount/checkmount_aix.c | 93 + conf/checkmount/checkmount_bsd44.c | 11 +- conf/checkmount/checkmount_default.c | 105 + conf/checkmount/checkmount_osf.c | 85 + conf/checkmount/checkmount_svr4.c | 96 + conf/checkmount/checkmount_ultrix.c | 75 + conf/fh_dref/fh_dref_aix3.h | 2 + conf/fh_dref/fh_dref_aix42.h | 2 + conf/fh_dref/fh_dref_bsd44.h | 2 + conf/fh_dref/fh_dref_default.h | 2 + conf/fh_dref/fh_dref_hpux.h | 2 + conf/fh_dref/fh_dref_irix.h | 2 + conf/fh_dref/fh_dref_isc3.h | 2 + conf/fh_dref/fh_dref_linux.h | 2 + conf/fh_dref/fh_dref_nextstep.h | 2 + conf/fh_dref/fh_dref_osf2.h | 2 + conf/fh_dref/fh_dref_osf4.h | 2 + conf/fh_dref/fh_dref_sunos3.h | 2 + conf/fh_dref/fh_dref_sunos4.h | 2 + conf/fh_dref/fh_dref_svr4.h | 2 + conf/hn_dref/hn_dref_isc3.h | 2 + conf/hn_dref/hn_dref_linux.h | 2 + conf/mount/mount_aix.c | 182 + conf/mount/mount_aix3.c | 225 + conf/mount/mount_bsdi3.c | 48 + conf/mount/mount_default.c | 11 +- conf/mount/mount_hpux.c | 86 + conf/mount/mount_irix5.c | 98 + conf/mount/mount_irix6.c | 106 + conf/mount/mount_isc3.c | 72 + conf/mount/mount_linux.c | 1153 + conf/mount/mount_mach3.c | 82 + .../{mount_freebsd3.c => mount_stellix.c} | 35 +- conf/mount/mount_svr4.c | 158 + conf/mtab/mtab_aix.c | 178 + conf/mtab/mtab_bsd.c | 21 +- conf/mtab/mtab_file.c | 454 + conf/mtab/mtab_isc3.c | 269 + conf/mtab/mtab_linux.c | 565 + conf/mtab/mtab_mach3.c | 501 + conf/mtab/mtab_osf.c | 146 + conf/mtab/mtab_svr4.c | 302 + conf/mtab/mtab_ultrix.c | 119 + conf/nfs_prot/nfs_prot_aix3.h | 212 + conf/nfs_prot/nfs_prot_aix4.h | 210 + conf/nfs_prot/nfs_prot_aix4_2.h | 249 + conf/nfs_prot/nfs_prot_aix4_3.h | 317 + conf/nfs_prot/nfs_prot_aix5_1.h | 123 +- conf/nfs_prot/nfs_prot_aix5_2.h | 365 + conf/nfs_prot/nfs_prot_bsdi2.h | 496 + conf/nfs_prot/nfs_prot_bsdi3.h | 181 + conf/nfs_prot/nfs_prot_darwin.h | 85 +- conf/nfs_prot/nfs_prot_default.h | 166 + conf/nfs_prot/nfs_prot_freebsd2.h | 10 +- conf/nfs_prot/nfs_prot_freebsd3.h | 8 +- conf/nfs_prot/nfs_prot_hpux.h | 398 + conf/nfs_prot/nfs_prot_hpux11.h | 595 + conf/nfs_prot/nfs_prot_irix5.h | 450 + conf/nfs_prot/nfs_prot_irix6.h | 496 + conf/nfs_prot/nfs_prot_linux.h | 334 + conf/nfs_prot/nfs_prot_ncr2.h | 476 + conf/nfs_prot/nfs_prot_netbsd.h | 165 + conf/nfs_prot/nfs_prot_netbsd1_3.h | 154 + conf/nfs_prot/nfs_prot_netbsd1_4.h | 180 + conf/nfs_prot/nfs_prot_nextstep.h | 595 + conf/nfs_prot/nfs_prot_openbsd.h | 183 + conf/nfs_prot/nfs_prot_osf2.h | 307 + conf/nfs_prot/nfs_prot_osf4.h | 417 + conf/nfs_prot/nfs_prot_osf5.h | 29 +- conf/nfs_prot/nfs_prot_sunos3.h | 401 + conf/nfs_prot/nfs_prot_sunos4.h | 401 + conf/nfs_prot/nfs_prot_sunos5_3.h | 264 + conf/nfs_prot/nfs_prot_sunos5_4.h | 266 + conf/nfs_prot/nfs_prot_sunos5_5.h | 381 + conf/nfs_prot/nfs_prot_sunos5_6.h | 385 + conf/nfs_prot/nfs_prot_sunos5_7.h | 396 + conf/nfs_prot/nfs_prot_sunos5_8.h | 12 +- conf/nfs_prot/nfs_prot_svr4.h | 401 + conf/nfs_prot/nfs_prot_ultrix.h | 304 + conf/sa_dref/sa_dref_386bsd.h | 5 + conf/sa_dref/sa_dref_aix3.h | 3 + conf/sa_dref/sa_dref_aoi.h | 7 + conf/sa_dref/sa_dref_default.h | 3 + conf/sa_dref/sa_dref_isc3.h | 7 + conf/sa_dref/sa_dref_linux.h | 3 + conf/sa_dref/sa_dref_svr4.h | 7 + conf/transp/transp_sockets.c | 131 +- conf/transp/transp_tli.c | 924 + conf/trap/trap_aix3.h | 5 + conf/trap/trap_aux.h | 2 + conf/trap/trap_dgux.h | 2 + conf/trap/trap_freebsd3.h | 3 - conf/trap/trap_hcx.h | 2 + conf/trap/trap_hpux.h | 15 + conf/trap/trap_irix.h | 3 + conf/trap/trap_isc3.h | 3 + conf/trap/trap_linux.h | 3 + conf/trap/trap_mach3.h | 3 + conf/trap/trap_netbsd.h | 6 + conf/trap/trap_news4.h | 2 + conf/trap/trap_rtu6.h | 2 + conf/trap/trap_stellix.h | 3 + conf/trap/trap_svr4.h | 3 + conf/trap/trap_ultrix.h | 3 + conf/umount/umount_aix.c | 197 + conf/umount/umount_bsd44.c | 9 +- conf/umount/umount_default.c | 188 + conf/umount/umount_linux.c | 264 + conf/umount/umount_osf.c | 120 + config.guess | 1558 + config.guess.long | 83 + config.h.in | 2426 + config.sub | 1791 + configure | 58747 ++++++++++++++++ configure.ac | 1511 + cvs-server.txt | 43 - depcomp | 791 + doc/Makefile.am | 115 + doc/Makefile.in | 875 + doc/am-utils.dvi | Bin 0 -> 622072 bytes doc/am-utils.info | 8897 +++ doc/am-utils.info-1 | 7645 ++ doc/am-utils.info-2 | Bin 0 -> 76982 bytes doc/am-utils.ps | 18222 +++++ doc/am-utils.texi | 281 +- doc/hlfsd.ps | 2718 + doc/mdate-sh | 224 + doc/stamp-vti | 8 +- doc/texinfo.tex | 5587 +- doc/version.texi | 8 +- fixmount/Makefile.am | 40 + fixmount/Makefile.in | 740 + fixmount/fixmount.8 | 13 +- fixmount/fixmount.c | 20 +- fsinfo/Makefile.am | 68 + fsinfo/Makefile.in | 830 + fsinfo/fsi_analyze.c | 64 +- fsinfo/fsi_data.h | 8 +- fsinfo/fsi_dict.c | 8 +- fsinfo/fsi_gram.y | 12 +- fsinfo/fsi_lex.l | 37 +- fsinfo/fsi_util.c | 36 +- fsinfo/fsinfo.8 | 12 +- fsinfo/fsinfo.c | 12 +- fsinfo/fsinfo.h | 14 +- fsinfo/null_gram.c | 1414 + fsinfo/null_gram.h | 56 + fsinfo/null_gram.y | 8 + fsinfo/null_lex.c | 1716 + fsinfo/null_lex.l | 9 + fsinfo/wr_atab.c | 8 +- fsinfo/wr_bparam.c | 10 +- fsinfo/wr_dumpset.c | 8 +- fsinfo/wr_exportfs.c | 8 +- fsinfo/wr_fstab.c | 28 +- hlfsd/Makefile.am | 43 + hlfsd/Makefile.in | 749 + hlfsd/hlfsd.8 | 23 +- hlfsd/hlfsd.c | 51 +- hlfsd/hlfsd.h | 8 +- hlfsd/homedir.c | 28 +- hlfsd/nfs_prot_svc.c | 8 +- hlfsd/stubs.c | 27 +- include/am_compat.h | 91 +- include/am_defs.h | 80 +- include/am_utils.h | 121 +- include/am_xdr_func.h | 1051 +- include/amq_defs.h | 48 +- include/mount_headers1.h | 96 +- include/mount_headers2.h | 8 +- include/nfs_common.h | 99 + install-sh | 527 + ldap-id.ms | 2 +- ldap-id.txt | 2 +- libamu/Makefile.am | 88 + libamu/Makefile.in | 732 + libamu/alloca.c | 504 - libamu/amu.h | 13 +- libamu/clnt_sperrno.c | 13 +- libamu/hasmntopt.c | 12 +- libamu/memcmp.c | 67 + libamu/misc_rpc.c | 8 +- libamu/mount_fs.c | 1219 +- libamu/mtab.c | 12 +- libamu/nfs_prot_xdr.c | 19 +- libamu/strcasecmp.c | 59 + libamu/strerror.c | 10 +- libamu/strlcat.c | 83 + libamu/strlcpy.c | 80 + libamu/strstr.c | 93 + libamu/strutil.c | 42 +- libamu/ualarm.c | 68 + libamu/wire.c | 19 +- libamu/xdr_func.c | 2061 +- libamu/xutil.c | 192 +- ltmain.sh | 9661 +++ m4/GNUmakefile | 155 + m4/amdgrep | 7 + m4/amindent | 328 + m4/autopat | 36 + m4/chop-aclocal.pl | 19 + m4/copy-if-newbig | 29 + m4/macros/HEADER | 13 + m4/macros/TRAILER | 2 + m4/macros/c_void_p.m4 | 22 + m4/macros/cache_check_dynamic.m4 | 26 + m4/macros/check_amu_fs.m4 | 40 + m4/macros/check_autofs_style.m4 | 35 + m4/macros/check_checkmount_style.m4 | 28 + m4/macros/check_extern.m4 | 106 + m4/macros/check_extern_ldap.m4 | 99 + m4/macros/check_fhandle.m4 | 25 + m4/macros/check_field.m4 | 113 + m4/macros/check_fs_headers.m4 | 53 + m4/macros/check_fs_mntent.m4 | 191 + m4/macros/check_gnu_getopt.m4 | 42 + m4/macros/check_hide_mount_type.m4 | 31 + m4/macros/check_lib2.m4 | 66 + m4/macros/check_libwrap_severity.m4 | 41 + m4/macros/check_map_funcs.m4 | 47 + m4/macros/check_mnt2_cdfs_opt.m4 | 92 + m4/macros/check_mnt2_gen_opt.m4 | 85 + m4/macros/check_mnt2_nfs_opt.m4 | 59 + m4/macros/check_mnt2_pcfs_opt.m4 | 92 + m4/macros/check_mnt2_udf_opt.m4 | 53 + m4/macros/check_mnttab_file_name.m4 | 57 + m4/macros/check_mnttab_location.m4 | 26 + m4/macros/check_mnttab_opt.m4 | 52 + m4/macros/check_mnttab_style.m4 | 35 + m4/macros/check_mnttab_type.m4 | 179 + m4/macros/check_mount_style.m4 | 44 + m4/macros/check_mount_trap.m4 | 49 + m4/macros/check_mount_type.m4 | 179 + m4/macros/check_mtype_printf_type.m4 | 22 + m4/macros/check_mtype_type.m4 | 19 + m4/macros/check_network_transport_type.m4 | 27 + m4/macros/check_nfs_fh_dref.m4 | 47 + m4/macros/check_nfs_hn_dref.m4 | 21 + m4/macros/check_nfs_prot_headers.m4 | 96 + m4/macros/check_nfs_sa_dref.m4 | 33 + m4/macros/check_nfs_socket_connection.m4 | 28 + m4/macros/check_os_libs.m4 | 28 + m4/macros/check_restartable_signal_handler.m4 | 22 + m4/macros/check_umount_style.m4 | 28 + m4/macros/check_unmount_args.m4 | 21 + m4/macros/check_unmount_call.m4 | 27 + m4/macros/check_varargs_macros.m4 | 39 + m4/macros/expand_cpp_hex.m4 | 40 + m4/macros/expand_cpp_int.m4 | 42 + m4/macros/expand_cpp_string.m4 | 40 + m4/macros/expand_run_string.m4 | 29 + m4/macros/extern_optarg.m4 | 36 + m4/macros/extern_sys_errlist.m4 | 30 + m4/macros/field_mntent_t_mnt_time_string.m4 | 36 + m4/macros/func_bad_hasmntopt.m4 | 59 + m4/macros/func_bad_memcmp.m4 | 11 + m4/macros/func_bad_yp_all.m4 | 27 + m4/macros/header_templates.m4 | 1103 + m4/macros/host_macros.m4 | 119 + m4/macros/libtool.m4 | 7997 +++ m4/macros/linux_headers.m4 | 49 + m4/macros/localconfig.m4 | 13 + m4/macros/mount_headers.m4 | 12 + m4/macros/opt_amu_cflags.m4 | 24 + m4/macros/opt_cppflags.m4 | 22 + m4/macros/opt_debug.m4 | 30 + m4/macros/opt_ldflags.m4 | 22 + m4/macros/opt_libs.m4 | 22 + m4/macros/os_cflags.m4 | 92 + m4/macros/os_cppflags.m4 | 18 + m4/macros/os_ldflags.m4 | 22 + m4/macros/package_bugreport.m4 | 8 + m4/macros/package_name.m4 | 8 + m4/macros/package_version.m4 | 8 + m4/macros/prog_lex.m4 | 14 + m4/macros/prog_yacc.m4 | 6 + m4/macros/save_state.m4 | 13 + m4/macros/struct_field_nfs_fh.m4 | 35 + m4/macros/struct_mntent.m4 | 21 + m4/macros/struct_mnttab.m4 | 21 + m4/macros/struct_nfs_args.m4 | 55 + m4/macros/struct_nfs_fh.m4 | 63 + m4/macros/struct_nfs_fh3.m4 | 39 + m4/macros/struct_nfs_gfs_mount.m4 | 22 + m4/macros/try_compile_anyfs.m4 | 185 + m4/macros/try_compile_nfs.m4 | 13 + m4/macros/try_compile_rpc.m4 | 23 + m4/macros/type_auth_create_gidlist.m4 | 25 + m4/macros/type_autofs_args.m4 | 33 + m4/macros/type_cachefs_args.m4 | 23 + m4/macros/type_cdfs_args.m4 | 57 + m4/macros/type_efs_args.m4 | 25 + m4/macros/type_lofs_args.m4 | 30 + m4/macros/type_mfs_args.m4 | 23 + m4/macros/type_pcfs_args.m4 | 50 + m4/macros/type_pte_t.m4 | 15 + m4/macros/type_recvfrom_fromlen.m4 | 29 + m4/macros/type_rfs_args.m4 | 23 + m4/macros/type_rpcvers_t.m4 | 11 + m4/macros/type_svc_in_arg.m4 | 39 + m4/macros/type_time_t.m4 | 5 + m4/macros/type_tmpfs_args.m4 | 23 + m4/macros/type_udf_args.m4 | 25 + m4/macros/type_ufs_args.m4 | 41 + m4/macros/type_xdrproc_t.m4 | 20 + m4/macros/type_xfs_args.m4 | 25 + m4/macros/type_yp_order_outorder.m4 | 23 + m4/macros/with_addon.m4 | 26 + m4/mk-aclocal | 18 + m4/mkconf | 20 + m4/rmtspc | 6 + m4/update_build_version | 41 + missing | 215 + mk-amd-map/Makefile.am | 39 + mk-amd-map/Makefile.in | 737 + mk-amd-map/mk-amd-map.8 | 12 +- mk-amd-map/mk-amd-map.c | 16 +- mkinstalldirs | 162 + scripts/Makefile.am | 42 +- scripts/Makefile.in | 881 +- scripts/amd.conf-sample | 8 +- scripts/amd.conf.5 | 30 +- scripts/automount2amd.8 | 11 +- scripts/expn.1 | 1369 - scripts/expn.in | 1369 - scripts/fixrmtab | 24 - scripts/fixrmtab.in | 20 +- scripts/lostaltmail.in | 2 +- stamp-h.in | 1 + test-driver | 139 + vers.m4 | 2 +- wire-test/Makefile.am | 39 + wire-test/Makefile.in | 737 + wire-test/wire-test.8 | 11 +- wire-test/wire-test.c | 15 +- ylwrap | 266 + ylwrap.amd | 266 + 457 files changed, 198757 insertions(+), 9541 deletions(-) create mode 100644 LSM.am-utils create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 README.autofs create mode 100644 README.osx create mode 100644 README.sun2amd delete mode 100644 TODO create mode 100644 acinclude.m4 create mode 100644 aclocal.m4 create mode 100644 amd/Makefile.am create mode 100644 amd/Makefile.in create mode 100644 amd/info_sun.c delete mode 100644 amd/ops_autofs.c create mode 100644 amd/ops_ext.c create mode 100644 amd/ops_lustre.c create mode 100644 amd/ops_nfs4.c create mode 100644 amd/ops_udf.c create mode 100644 amd/sun2amd.8 create mode 100644 amd/sun2amd.c create mode 100644 amd/sun_map.c create mode 100644 amd/sun_map.h create mode 100644 amd/sun_map_parse.y create mode 100644 amd/sun_map_tok.l create mode 100755 amd/test1.sh create mode 100644 amq/Makefile.am create mode 100644 amq/Makefile.in create mode 100755 buildall create mode 100755 compile create mode 100644 conf/autofs/autofs_default.c create mode 100644 conf/autofs/autofs_default.h create mode 100644 conf/autofs/autofs_linux.c create mode 100644 conf/autofs/autofs_linux.h create mode 100644 conf/autofs/autofs_solaris_v1.c create mode 100644 conf/autofs/autofs_solaris_v1.h create mode 100644 conf/autofs/autofs_solaris_v2_v3.c create mode 100644 conf/autofs/autofs_solaris_v2_v3.h create mode 100644 conf/checkmount/checkmount_aix.c create mode 100644 conf/checkmount/checkmount_default.c create mode 100644 conf/checkmount/checkmount_osf.c create mode 100644 conf/checkmount/checkmount_svr4.c create mode 100644 conf/checkmount/checkmount_ultrix.c create mode 100644 conf/fh_dref/fh_dref_aix3.h create mode 100644 conf/fh_dref/fh_dref_aix42.h create mode 100644 conf/fh_dref/fh_dref_bsd44.h create mode 100644 conf/fh_dref/fh_dref_default.h create mode 100644 conf/fh_dref/fh_dref_hpux.h create mode 100644 conf/fh_dref/fh_dref_irix.h create mode 100644 conf/fh_dref/fh_dref_isc3.h create mode 100644 conf/fh_dref/fh_dref_linux.h create mode 100644 conf/fh_dref/fh_dref_nextstep.h create mode 100644 conf/fh_dref/fh_dref_osf2.h create mode 100644 conf/fh_dref/fh_dref_osf4.h create mode 100644 conf/fh_dref/fh_dref_sunos3.h create mode 100644 conf/fh_dref/fh_dref_sunos4.h create mode 100644 conf/fh_dref/fh_dref_svr4.h create mode 100644 conf/hn_dref/hn_dref_isc3.h create mode 100644 conf/hn_dref/hn_dref_linux.h create mode 100644 conf/mount/mount_aix.c create mode 100644 conf/mount/mount_aix3.c create mode 100644 conf/mount/mount_bsdi3.c create mode 100644 conf/mount/mount_hpux.c create mode 100644 conf/mount/mount_irix5.c create mode 100644 conf/mount/mount_irix6.c create mode 100644 conf/mount/mount_isc3.c create mode 100644 conf/mount/mount_linux.c create mode 100644 conf/mount/mount_mach3.c rename conf/mount/{mount_freebsd3.c => mount_stellix.c} (72%) create mode 100644 conf/mount/mount_svr4.c create mode 100644 conf/mtab/mtab_aix.c create mode 100644 conf/mtab/mtab_file.c create mode 100644 conf/mtab/mtab_isc3.c create mode 100644 conf/mtab/mtab_linux.c create mode 100644 conf/mtab/mtab_mach3.c create mode 100644 conf/mtab/mtab_osf.c create mode 100644 conf/mtab/mtab_svr4.c create mode 100644 conf/mtab/mtab_ultrix.c create mode 100644 conf/nfs_prot/nfs_prot_aix3.h create mode 100644 conf/nfs_prot/nfs_prot_aix4.h create mode 100644 conf/nfs_prot/nfs_prot_aix4_2.h create mode 100644 conf/nfs_prot/nfs_prot_aix4_3.h create mode 100644 conf/nfs_prot/nfs_prot_aix5_2.h create mode 100644 conf/nfs_prot/nfs_prot_bsdi2.h create mode 100644 conf/nfs_prot/nfs_prot_bsdi3.h create mode 100644 conf/nfs_prot/nfs_prot_default.h create mode 100644 conf/nfs_prot/nfs_prot_hpux.h create mode 100644 conf/nfs_prot/nfs_prot_hpux11.h create mode 100644 conf/nfs_prot/nfs_prot_irix5.h create mode 100644 conf/nfs_prot/nfs_prot_irix6.h create mode 100644 conf/nfs_prot/nfs_prot_linux.h create mode 100644 conf/nfs_prot/nfs_prot_ncr2.h create mode 100644 conf/nfs_prot/nfs_prot_netbsd.h create mode 100644 conf/nfs_prot/nfs_prot_netbsd1_3.h create mode 100644 conf/nfs_prot/nfs_prot_netbsd1_4.h create mode 100644 conf/nfs_prot/nfs_prot_nextstep.h create mode 100644 conf/nfs_prot/nfs_prot_openbsd.h create mode 100644 conf/nfs_prot/nfs_prot_osf2.h create mode 100644 conf/nfs_prot/nfs_prot_osf4.h create mode 100644 conf/nfs_prot/nfs_prot_sunos3.h create mode 100644 conf/nfs_prot/nfs_prot_sunos4.h create mode 100644 conf/nfs_prot/nfs_prot_sunos5_3.h create mode 100644 conf/nfs_prot/nfs_prot_sunos5_4.h create mode 100644 conf/nfs_prot/nfs_prot_sunos5_5.h create mode 100644 conf/nfs_prot/nfs_prot_sunos5_6.h create mode 100644 conf/nfs_prot/nfs_prot_sunos5_7.h create mode 100644 conf/nfs_prot/nfs_prot_svr4.h create mode 100644 conf/nfs_prot/nfs_prot_ultrix.h create mode 100644 conf/sa_dref/sa_dref_386bsd.h create mode 100644 conf/sa_dref/sa_dref_aix3.h create mode 100644 conf/sa_dref/sa_dref_aoi.h create mode 100644 conf/sa_dref/sa_dref_default.h create mode 100644 conf/sa_dref/sa_dref_isc3.h create mode 100644 conf/sa_dref/sa_dref_linux.h create mode 100644 conf/sa_dref/sa_dref_svr4.h create mode 100644 conf/transp/transp_tli.c create mode 100644 conf/trap/trap_aix3.h create mode 100644 conf/trap/trap_aux.h create mode 100644 conf/trap/trap_dgux.h delete mode 100644 conf/trap/trap_freebsd3.h create mode 100644 conf/trap/trap_hcx.h create mode 100644 conf/trap/trap_hpux.h create mode 100644 conf/trap/trap_irix.h create mode 100644 conf/trap/trap_isc3.h create mode 100644 conf/trap/trap_linux.h create mode 100644 conf/trap/trap_mach3.h create mode 100644 conf/trap/trap_netbsd.h create mode 100644 conf/trap/trap_news4.h create mode 100644 conf/trap/trap_rtu6.h create mode 100644 conf/trap/trap_stellix.h create mode 100644 conf/trap/trap_svr4.h create mode 100644 conf/trap/trap_ultrix.h create mode 100644 conf/umount/umount_aix.c create mode 100644 conf/umount/umount_default.c create mode 100644 conf/umount/umount_linux.c create mode 100644 conf/umount/umount_osf.c create mode 100755 config.guess create mode 100755 config.guess.long create mode 100644 config.h.in create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.ac delete mode 100644 cvs-server.txt create mode 100755 depcomp create mode 100644 doc/Makefile.am create mode 100644 doc/Makefile.in create mode 100644 doc/am-utils.dvi create mode 100644 doc/am-utils.info create mode 100644 doc/am-utils.info-1 create mode 100644 doc/am-utils.info-2 create mode 100644 doc/am-utils.ps create mode 100644 doc/hlfsd.ps create mode 100755 doc/mdate-sh create mode 100644 fixmount/Makefile.am create mode 100644 fixmount/Makefile.in create mode 100644 fsinfo/Makefile.am create mode 100644 fsinfo/Makefile.in create mode 100644 fsinfo/null_gram.c create mode 100644 fsinfo/null_gram.h create mode 100644 fsinfo/null_gram.y create mode 100644 fsinfo/null_lex.c create mode 100644 fsinfo/null_lex.l create mode 100644 hlfsd/Makefile.am create mode 100644 hlfsd/Makefile.in create mode 100644 include/nfs_common.h create mode 100755 install-sh create mode 100644 libamu/Makefile.am create mode 100644 libamu/Makefile.in delete mode 100644 libamu/alloca.c create mode 100644 libamu/memcmp.c create mode 100644 libamu/strcasecmp.c create mode 100644 libamu/strlcat.c create mode 100644 libamu/strlcpy.c create mode 100644 libamu/strstr.c create mode 100644 libamu/ualarm.c create mode 100755 ltmain.sh create mode 100644 m4/GNUmakefile create mode 100755 m4/amdgrep create mode 100755 m4/amindent create mode 100755 m4/autopat create mode 100755 m4/chop-aclocal.pl create mode 100755 m4/copy-if-newbig create mode 100644 m4/macros/HEADER create mode 100644 m4/macros/TRAILER create mode 100644 m4/macros/c_void_p.m4 create mode 100644 m4/macros/cache_check_dynamic.m4 create mode 100644 m4/macros/check_amu_fs.m4 create mode 100644 m4/macros/check_autofs_style.m4 create mode 100644 m4/macros/check_checkmount_style.m4 create mode 100644 m4/macros/check_extern.m4 create mode 100644 m4/macros/check_extern_ldap.m4 create mode 100644 m4/macros/check_fhandle.m4 create mode 100644 m4/macros/check_field.m4 create mode 100644 m4/macros/check_fs_headers.m4 create mode 100644 m4/macros/check_fs_mntent.m4 create mode 100644 m4/macros/check_gnu_getopt.m4 create mode 100644 m4/macros/check_hide_mount_type.m4 create mode 100644 m4/macros/check_lib2.m4 create mode 100644 m4/macros/check_libwrap_severity.m4 create mode 100644 m4/macros/check_map_funcs.m4 create mode 100644 m4/macros/check_mnt2_cdfs_opt.m4 create mode 100644 m4/macros/check_mnt2_gen_opt.m4 create mode 100644 m4/macros/check_mnt2_nfs_opt.m4 create mode 100644 m4/macros/check_mnt2_pcfs_opt.m4 create mode 100644 m4/macros/check_mnt2_udf_opt.m4 create mode 100644 m4/macros/check_mnttab_file_name.m4 create mode 100644 m4/macros/check_mnttab_location.m4 create mode 100644 m4/macros/check_mnttab_opt.m4 create mode 100644 m4/macros/check_mnttab_style.m4 create mode 100644 m4/macros/check_mnttab_type.m4 create mode 100644 m4/macros/check_mount_style.m4 create mode 100644 m4/macros/check_mount_trap.m4 create mode 100644 m4/macros/check_mount_type.m4 create mode 100644 m4/macros/check_mtype_printf_type.m4 create mode 100644 m4/macros/check_mtype_type.m4 create mode 100644 m4/macros/check_network_transport_type.m4 create mode 100644 m4/macros/check_nfs_fh_dref.m4 create mode 100644 m4/macros/check_nfs_hn_dref.m4 create mode 100644 m4/macros/check_nfs_prot_headers.m4 create mode 100644 m4/macros/check_nfs_sa_dref.m4 create mode 100644 m4/macros/check_nfs_socket_connection.m4 create mode 100644 m4/macros/check_os_libs.m4 create mode 100644 m4/macros/check_restartable_signal_handler.m4 create mode 100644 m4/macros/check_umount_style.m4 create mode 100644 m4/macros/check_unmount_args.m4 create mode 100644 m4/macros/check_unmount_call.m4 create mode 100644 m4/macros/check_varargs_macros.m4 create mode 100644 m4/macros/expand_cpp_hex.m4 create mode 100644 m4/macros/expand_cpp_int.m4 create mode 100644 m4/macros/expand_cpp_string.m4 create mode 100644 m4/macros/expand_run_string.m4 create mode 100644 m4/macros/extern_optarg.m4 create mode 100644 m4/macros/extern_sys_errlist.m4 create mode 100644 m4/macros/field_mntent_t_mnt_time_string.m4 create mode 100644 m4/macros/func_bad_hasmntopt.m4 create mode 100644 m4/macros/func_bad_memcmp.m4 create mode 100644 m4/macros/func_bad_yp_all.m4 create mode 100644 m4/macros/header_templates.m4 create mode 100644 m4/macros/host_macros.m4 create mode 100644 m4/macros/libtool.m4 create mode 100644 m4/macros/linux_headers.m4 create mode 100644 m4/macros/localconfig.m4 create mode 100644 m4/macros/mount_headers.m4 create mode 100644 m4/macros/opt_amu_cflags.m4 create mode 100644 m4/macros/opt_cppflags.m4 create mode 100644 m4/macros/opt_debug.m4 create mode 100644 m4/macros/opt_ldflags.m4 create mode 100644 m4/macros/opt_libs.m4 create mode 100644 m4/macros/os_cflags.m4 create mode 100644 m4/macros/os_cppflags.m4 create mode 100644 m4/macros/os_ldflags.m4 create mode 100644 m4/macros/package_bugreport.m4 create mode 100644 m4/macros/package_name.m4 create mode 100644 m4/macros/package_version.m4 create mode 100644 m4/macros/prog_lex.m4 create mode 100644 m4/macros/prog_yacc.m4 create mode 100644 m4/macros/save_state.m4 create mode 100644 m4/macros/struct_field_nfs_fh.m4 create mode 100644 m4/macros/struct_mntent.m4 create mode 100644 m4/macros/struct_mnttab.m4 create mode 100644 m4/macros/struct_nfs_args.m4 create mode 100644 m4/macros/struct_nfs_fh.m4 create mode 100644 m4/macros/struct_nfs_fh3.m4 create mode 100644 m4/macros/struct_nfs_gfs_mount.m4 create mode 100644 m4/macros/try_compile_anyfs.m4 create mode 100644 m4/macros/try_compile_nfs.m4 create mode 100644 m4/macros/try_compile_rpc.m4 create mode 100644 m4/macros/type_auth_create_gidlist.m4 create mode 100644 m4/macros/type_autofs_args.m4 create mode 100644 m4/macros/type_cachefs_args.m4 create mode 100644 m4/macros/type_cdfs_args.m4 create mode 100644 m4/macros/type_efs_args.m4 create mode 100644 m4/macros/type_lofs_args.m4 create mode 100644 m4/macros/type_mfs_args.m4 create mode 100644 m4/macros/type_pcfs_args.m4 create mode 100644 m4/macros/type_pte_t.m4 create mode 100644 m4/macros/type_recvfrom_fromlen.m4 create mode 100644 m4/macros/type_rfs_args.m4 create mode 100644 m4/macros/type_rpcvers_t.m4 create mode 100644 m4/macros/type_svc_in_arg.m4 create mode 100644 m4/macros/type_time_t.m4 create mode 100644 m4/macros/type_tmpfs_args.m4 create mode 100644 m4/macros/type_udf_args.m4 create mode 100644 m4/macros/type_ufs_args.m4 create mode 100644 m4/macros/type_xdrproc_t.m4 create mode 100644 m4/macros/type_xfs_args.m4 create mode 100644 m4/macros/type_yp_order_outorder.m4 create mode 100644 m4/macros/with_addon.m4 create mode 100755 m4/mk-aclocal create mode 100755 m4/mkconf create mode 100755 m4/rmtspc create mode 100755 m4/update_build_version create mode 100755 missing create mode 100644 mk-amd-map/Makefile.am create mode 100644 mk-amd-map/Makefile.in create mode 100755 mkinstalldirs delete mode 100644 scripts/expn.1 delete mode 100755 scripts/expn.in delete mode 100755 scripts/fixrmtab create mode 100644 stamp-h.in create mode 100755 test-driver create mode 100644 wire-test/Makefile.am create mode 100644 wire-test/Makefile.in create mode 100755 ylwrap create mode 100755 ylwrap.amd diff --git a/AUTHORS b/AUTHORS index 3c241d016bb..1ae6dcd2d72 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,22 +6,22 @@ This file lists the ones who contributed major code changes, in no particular order, and I thank them all. This is of course not to diminish the smaller contributes of the many others. Thank you all. -* Erez Zadok +* Erez Zadok The most significant changes were made by Erez Zadok in terms of bug fixes, ports, and new features added. Erez Zadok is the current maintainer of am-utils, as of January 1997. -* Ion Badulescu +* Ion Badulescu Co-maintainer of am-utils since late 1999: Linux and Solaris autofs support, Linux NFSv3 support, major code reorganization, etc... -* Randall S. Winchester +* Randall S. Winchester May 7, 1997: contributed a special version of upl102 that included NFS V.3 support. Some of the code was contributed by Christos Zoulas -. I (Erez) ported these changes to am-utils. +. I (Erez) ported these changes to am-utils. September 12, 1997: lots of small prototype cleanups and fixes to numerous files. @@ -35,12 +35,12 @@ February 1, 1998: fixes for NetBSD to better detect its features. September 4, 1999: assorted fixes for NetBSD 1.4+. -* Hannes Reinecke +* Hannes Reinecke Back in 1995, contributed code for linux. A new parser for file system specific options that only exist under linux. -* Leif Johansson +* Leif Johansson June 22, 1997: minor patch to ensure that systems without an RE library work. @@ -52,7 +52,7 @@ functions. Contributed scripts/amd2ldif.pl. August 4, 1997: info_ldap.c fixes and adding two new amd.conf ldap variables: ldap_cache_seconds and ldap_cache_maxmem. -* Andreas Stolcke +* Andreas Stolcke June 22, 1997: patches to ensure that proto= and vers= options work properly in mount tables and can be overridden. Later on, more code @@ -68,11 +68,11 @@ message. December 19, 1997: detected an FMR (Free Memory Read) in amd/mntfs.c, uninit_mntfs(). -* Danny Braniss +* Danny Braniss July, 6 1997: contributed patches to hesiod on bsdi3. -* Tom Schmidt +* Tom Schmidt July 10, 1997: Recommdation to include libgdbm if libc has no dbm_open. Patches for netgrp(host) command. Mods to aux/config.guess to recognize @@ -86,7 +86,7 @@ IFF_ROUTE instead of IFF_LOOPBACK. May 30, 2000: correct logging types for addopts/mergeopts messages. -* Daniel S. Riley +* Daniel S. Riley July 11, 1997: fixes to DU-4.0 to support string POSIX.1 signals, and struct sockaddr with sa_len field. @@ -99,15 +99,15 @@ grpid, nosuid, and actimo. August 15, 1998: fix memory leak in processing of /defaults, and avoid accessing uninitialized memory in osf1. -* Roman Hodek +* Roman Hodek July 23, 1997: Got lots of patches from the Debian Linux folks, who fixed several generic bugs, and one serious one for Linux. The latter involved using connected sockets for NFS mounts on kernels 1.3.10 and older. Roman's -work is baed on amd-upl102, and work from Ian Murdock -and Dominik Kubla . +work is baed on amd-upl102, and work from Ian Murdock +and Dominik Kubla . -* Rainer Orth +* Rainer Orth August 6, 1997: assorted fixes to support hesiod-1.3, solaris 2.4 (which I already fixed but did not release yet), and support for $LDFLAGS at @@ -132,34 +132,34 @@ mount tables in Solaris 8. February 9, 2000: new debug options hrtime (hi-res timer) and xdrtrace. bug fixes. -* Jason Thorpe +* Jason Thorpe August 25, 1997: make amd work when talking to NIS+ servers in NIS compatibility mode. Fix originally came from Matthieu Herrb -. +. -* Chris Metcalf +* Chris Metcalf August 29, 1997: patch to make amd use FQHN for NFS/RPC authentication, useful esp. for cross-domain NFS mounts. September 2, 1997: if plock() succeeded, don't display errno string. -* Enami Tsugutomo +* Enami Tsugutomo September 4, 1997: don't ping remote servers with NFS V.3 always, but V.2, regardless of client's NFS version. (conf/transp/transp_sockets.c) -* Dan Riley +* Dan Riley September 19, 1997: make sure that amd works with more secure portmappers that do not allow forwarding of RPC messages to other services. -* Wolfgang Rupprecht +* Wolfgang Rupprecht August 10, 1997: netbsd and other bsd systems have a mask flag for pcfs_args (msdos mount). -* Christos Zoulas +* Christos Zoulas September 25, 1997: fix to initialize uid/gid fields of pcfs_args_t on netbsd. @@ -181,7 +181,7 @@ TLI implementations. Patch to print version string (amd -v) after all options had been initialized, so we can print domain, host, and hostd. Linux patch to use umount2(2) if umount(2) fails. -* Bill Paul +* Bill Paul November 5, 1997: NFS v.3 support for AIX 4.2.1, which does *not* include headers for this. Bill had to guess at the right structures, field names, @@ -189,26 +189,26 @@ sizes, alignment, etc. January 15, 1999: small ldap bug fixes. -* Stefan Vogel +* Stefan Vogel November 14, 1997: typo in the subscription instructions to amd-dev. -* Guntram Wolski +* Guntram Wolski November 15, 1997: pointed out mismatching documentation for the -o option. -* Michael Hucka +* Michael Hucka January 11, 1997: pointed out reversed definition of NFS mount options vers and proto. -* Albert Chin +* Albert Chin January 12, 1998: minor bug in output of amd -H. June 23, 2005: assortment of small compile bugs on aix4, and solaris 5/6/7. -* Thomas Richter +* Thomas Richter January 13, 1998: use case insensitive comparisons for variables that need it (such as all hostname related ones, and more). @@ -216,11 +216,11 @@ it (such as all hostname related ones, and more). July 20, 1998: don't leak memory in the private version of yp_all (when vendor yp_all is bad). -* Fred Korz +* Fred Korz January 30, 1998: minor typo fixed to tftp example in am-utils.texi. -* Donald Buczek +* Donald Buczek March 6, 1998: correctly inherit existing NFS V.3 mounts upon restart. @@ -230,36 +230,36 @@ March 20, 1998: do not close stdout in case it gets reused elsewhere and to allow startup script to redirect it. Set a temporary secure umask(0022) before writing log file and restore it afterwards. -* Matthew Crosby +* Matthew Crosby April 20, 1998: allow arbitrary number of interfaces in wire listing. -* David O'Brien +* David O'Brien September 4, 1998: bug fix to avoid overrunning hostname buffer, and minor amd.conf man page typo correction. September 22, 1999: use more secure vsnprintf in real_plog(). -* Danny Rathjens +* Danny Rathjens October 29, 1998: swap arguments to kill(2) in amd.c. -* Mike Mitchell +* Mike Mitchell November 3, 1998: amd/nfs_subr.c (nfsproc_lookup_2_svc): try to avoid a race condition between unmounting and re-mounting an entry, by increasing the ttl of a looked up entry before unmounting it. -* Douglas K. Rand" +* Douglas K. Rand" December 3, 1998: case insensitive host name match for nfsl. -* David Wolfskill +* David Wolfskill January 28, 1999: don't turn on/off noconn option if it was already in that state. -* Jeffrey C Honig +* Jeffrey C Honig March 14, 1999: clean up more autogenerated files upon "make distclean". March 15, 1999: avoid overly verbose NIS warning even on systems that don't @@ -271,30 +271,30 @@ detection for bsdi4. September 17, 1999: fixes to expn. -* Paul Balyoz +* Paul Balyoz March 26, 1999: ensure lostaltmail displays Y2K compliant dates. -* Jon Peatfield +* Jon Peatfield March 30, 1999: turn off incomplete NFS V.3 support in HPUX 10.20. September 22, 1999: safe reloading of maps without first clearing old copies, and using cached copies if map failed to reload. -* Peter Breitenlohner +* Peter Breitenlohner July 24, 1999: patch for linux 2.2.x to work with older libc5 systems, and nis_isup mis-logic fixes. December 13, 2001: report typos in scripts/amd.conf.5. -* Dale Talcott +* Dale Talcott July 26, 1999: added NFS3 support for AIX mounting. -* Christophe Kalt +* Christophe Kalt July 14, 1999: add netgrpd() syntax function which uses FQHN. -* Andrew J. Korty +* Andrew J. Korty September 5, 1999: pawd works for type:=nfsl. -* Nick Williams +* Nick Williams September 1, 1999: bug fix for incorrect symlinks when two locations are requested simultaneously. @@ -306,38 +306,38 @@ doing rapid mounts and umounts in succession. June 5, 2000: better handling of potential race-conditions during rapid u/mounts. Correctly update d_drops stats for amq -s. -* Johann Pfefferl +* Johann Pfefferl November 16, 1999: fix to ldap code so repeated calls to string2he don't corrupt the string passed. -* Amitha Perera +* Amitha Perera December 9, 1999: detect all wire() interfaces correctly. -* Steven Danz +* Steven Danz January 25, 2000: allow browsable auto maps. -* Wolfram Klaus . +* Wolfram Klaus . November 21, 2000: recognize proplist mnttab flag. -* Thomas Klausner +* Thomas Klausner November 21, 2000: lots of NetBSD fixes (many of which are generic). April 18, 2003: patch to reference am-utils info pages in man page. November 28, 2004: small fixes to typos in amd.conf(5) man page. -* Olaf Kirch +* Olaf Kirch February 1, 2001: important Linux NFS error number mapping fixed -* Ahmon Dancy +* Ahmon Dancy February 9, 2001: Apple Rhapsody/Darwin/OS X port -* Sebastien Bahloul +* Sebastien Bahloul July 3, 2001: LDAP fixes and updates to support new APIs March 27, 2002: LDAP bug and port to HPUX-11. -* Philippe Troin +* Philippe Troin July 12, 2001: Proper handling of GNU getopt, support for optionally disabling LDAP/Hesiod, fixes for the dev/nodev option on Linux. Texi documentation fix. @@ -348,65 +348,65 @@ generic mount option. July 17, 2003: pref:=null core dump fix. libgdbm portability. tcpd/librap support. And a few other things for the 6.0 branch. -* Trond Myklebust +* Trond Myklebust January 10, 2002: Proper initialization of the timeo parameter on Linux, TCP _must_ have a timeout 2 orders of magnitude larger than UDP -* George Ross +* George Ross April 29, 2002: Rework of old code, support for wildcards in LDAP queries, and an FD leak fix. Amd -A support. October 21, 2002: ldap_unbind fix for SIGPIPE, and support for LDAPv3 -protocol version parameter (with Tim Colles ). +protocol version parameter (with Tim Colles ). -* Matthias Scheler +* Matthias Scheler June 14, 2002: patch to use "xlatecookie" NFS mount option. -* Jun-ichiro itojun Hagino . +* Jun-ichiro itojun Hagino . June 11, 2002: minor fixes to support NetBSD 1.6A. -* Sean Fagan +* Sean Fagan March 14, 2003: detect and use the MNT2_GEN_OPT_AUTOMNTFS mount flag on OS X / Darwin. -* Hendrik Scholz +* Hendrik Scholz June 9, 2003: mk-amd-map should open temp db file using O_EXCL. -* Mark Davies +* Mark Davies July 14, 2003: define "xlatecookie" mnttab option if not defined (for NetBSD). Support null hesiod entries if they start with a ".". -* Eric S. Raymond +* Eric S. Raymond December 9, 2003: fix unbalanced [] typo in fsinfo man page. -* Martin Blapp +* Martin Blapp July 6, 2004: recognize fields in pcfs_args_t in FreeBSD 5. -* Dan Nelson +* Dan Nelson August 2, 2004: pawd to recognize "host" type mounts. -* Hauke Fath +* Hauke Fath August 3, 2004: pawd to recognize "linkx" type mounts. -* Michael van Elst +* Michael van Elst September 1, 2004: bug fix to avoid race condition in calls to mntctl on AIX. -* Jonathan Chen +* Jonathan Chen October 22, 2004: patch/fix to move mlock/mlockall/plock code after the fork(). June 29, 2005: core dump going off end of exported_ap[] array. September 29, 2005: patch/fix for pawd not to go into an infinite loop. October 25, 2005: patch/fix for pawd to repeatedly resolve path. -* David Rage +* David Rage January 17, 2005: prevent Amd from logging 'Read-only filesystem' errors when the mount point has an ancestor (i.e. '/') that is mounted read-only. -* Kevin Layer +* Kevin Layer January 28, 2005: basic instructions how to setup Amd on Mac OS-X. -* Dan Ottavio +* Dan Ottavio March 2, 2005: new global amd.conf option debug_mtab_file, to set the debug mtab file when using debug_options=mtab. Default has changed from "./mtab" to "/tmp/mtab" to avoid security problem. Bug fixed to ensure that Amd @@ -415,16 +415,13 @@ terminates properly even mtab file doesn't exist. * Erik Kline January 3, 2005: implementation of executable maps for Amd. -* Jim Zajkowski +* Jim Zajkowski March 14, 2005: small patch to amd2ldif. * Adam Morley January 27, 2005: synchronize what amd2ldif does vs. what the ldap.schema expects. -* Graeme Wilford +* Graeme Wilford July 4, 2005: buffer overflow in pawd. -* Steve Plite -September 22, 2005: repair reversed meaning of D_AMQ, so amq will unregister -on exit. diff --git a/BUGS b/BUGS index 3a3ba6b367d..8e87e859cba 100644 --- a/BUGS +++ b/BUGS @@ -1,7 +1,7 @@ LIST OF KNOWN BUGS IN AM-UTILS OR OPERATING SYSTEMS Note: report am-utils bugs via Bugzilla to https://bugzilla.am-utils.org/ or -by email to the am-utils@am-utils.org mailing list. +by email to the am-utils mailing list (see www.am-utils.org). (1) mips-sgi-irix* @@ -98,11 +98,11 @@ diff -u -r1.1 utsname.h (4) powerpc-ibm-aix4.2.1.0 -[4A] "Randall S. Winchester" reports that for amd to +[4A] "Randall S. Winchester" reports that for amd to start, you need to kill and restart rpc.mountd and possibly also make sure that nfsd is running. Normally these are not required. -[4B] "Stefan Vogel" reports that if your amq +[4B] "Stefan Vogel" reports that if your amq executable dump core unexpectedly, then it may be a bug in gcc 2.7.x. Upgrade to gcc 2.8.x or use IBM's xlC compiler. @@ -123,7 +123,7 @@ but it is not yet in the glibc-2.0.7-19 RPM. A bug in libc results in an amq binary that doesn't work; amq -v dumps core in xdr_string. There is no known fix (source code or vendor patch) at this -time. (Please let am-utils@am-utils.org know if you know of a fix.) +time. (Please let us know if you have a fix; see www.am-utils.org.) (7) *-aix4.3.2.0 diff --git a/COPYING b/COPYING index 035f6239c93..f54191d75fe 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 1997-2006 Erez Zadok +Copyright (c) 1997-2014 Erez Zadok Copyright (c) 1989 Jan-Simon Pendry Copyright (c) 1989 Imperial College of Science, Technology & Medicine Copyright (c) 1989 The Regents of the University of California. @@ -15,12 +15,7 @@ are met: 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 acknowledgment: - This product includes software developed by the University of - California, Berkeley and its contributors, as well as the Trustees of - Columbia University. -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. diff --git a/ChangeLog b/ChangeLog index 12f2c5fb8e6..d996f8e7508 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,564 @@ +2014-10-28 Christos Zoulas + + ******************************************************************* + *** Released am-utils-6.2 *** + ******************************************************************* + + * add ylwrap.amd, sick and tired of patching broken ylwrap. + +2014-09-05 Christos Zoulas + + * factor out the size check for both readdir methods + (raven at themaw.net) + +2014-09-03 Christos Zoulas + + * configure test for 64 bit xdr function (raven at themaw.net) + +2014-09-01 Christos Zoulas + + * bug fix from raven at themaw.net to prevent writing v3 handle + to a v2 structure. + +2014-07-21 Christos Zoulas + + * fix permission problems with access + * auto_nfs_version = 3 now works for me. + +2014-07-20 Christos Zoulas + + * refresh some autoconf files + * force autoconf version since earlier versions don't work + * changes from raven at themaw.net to support NFSv3 for automounted + toplevel filesystems presented to the list in May. A few bug fixes + and integration changes by me. The code now works well enough to + mount the filesystem with NFSv3 and automount children but readdir + does not work yet (so no listing of automounted filesystems). + The new code is not enabled by default. To enable use + auto_nfs_version = 3 + in your configuration file. + +2014-03-26 Christos Zoulas + + From Ian Kent + + * use mktemp in scripts/fixrmtab + * fix documentatio nits + * [linux] Add ext2, ext3, ext4 specific mount options + * fix tcpwrappers (hosts.{allow,deny} problems for specific host + entries + +2014-03-20 Christos Zoulas + + + * don't background autofs umount + * avoid fh NULL dereference on umount + * handle ENOENT umount return for autofs mounts + * fix error message in get_nfs_version + * fix debug log deadlock + * [linux] retry umount on EBUSY + * handle failed umount on exit + +2014-03-09 Christos Zoulas + + * Remove BSD advertising clause. + * Remove expn program which is not used by anything + +2013-12-05 Christos Zoulas + + * Change the way we handle multiple lex scanners and yacc parsers + in a single program. Our old patch to ylwrap does not work anymore + because the bison parsers need shared symbols that start with yy + and we can't easily select which ones work. So now we use -P and + -p to let lex and yacc do the work for us. This requires a patch + to ylwrap, but it is smaller. + + +2013-12-05 Christos Zoulas + + * Change the way we handle multiple lex scanners and yacc parsers + in a single program. Our old patch to ylwrap does not work anymore + because the bison parsers need shared symbols that start with yy + and we can't easily select which ones work. So now we use -P and + -p to let lex and yacc do the work for us. This requires a patch + to ylwrap, but it is smaller. + +2013-05-14 Christos Zoulas + + * update to handle new autoconf and regen files + +2012-11-23 Christos Zoulas + + * recognize mountport=, noacl options + * simplify the bootstrap process, by forcing + all the files to be rebuild with autoreconf -f - i + +2012-10-03 Christos Zoulas + + * add missing ops_nfs4.c to the Makefile.am + +2012-09-14 Christos Zoulas + + * add locking option handling for lustre + * fix noatime, nodiratime, mandlock for linux + +2012-07-25 Christos Zoulas + + * bug fixes for lustre rhost parsing + +2012-06-27 Christos Zoulas + + * Disable 1/2-baked sun map support to avoid SIGSEGV + +2012-06-16 Christos Zoulas + + ******************************************************************* + *** Released am-utils-6.2-rc1 *** + ******************************************************************* + + * Fix libtool.m4 to work with later versions of autoconf. + * In buildall, use eval so that quoted strings work + * Centralize nfs version checking function, and introduce + new configuration variable nfs_vers_ping, which is the + max version we ping for. This is not documented yet, because + there might be a better way separate the max version we can + use vs the max version we ping for. + +2012-06-09 Christos Zoulas + + * fix issue with parsing nfsv4 security option strings + +2012-05-01 Christos Zoulas + + * Handle EPERM return from v4 file handles + in old linux kernels + +2012-03-09 Christos Zoulas + + * fix linux autofs detection + * fix wrong types in new amq mount xdr processing + +2012-01-25 Christos Zoulas + + * FreeBSD portability fixes + +2012-01-23 Christos Zoulas + + * Avoid type punned warnings + +2011-12-29 Christos Zoulas + + * fix bug I introduced in get_nfs_version that caused it to return 0 + * add direct support for ext{2,3,4} + +2011-12-15 Christos Zoulas + + * Include on linux, to grab extra mount flags + * Add support for lustre + +2011-11-28 Christos Zoulas + + * For nfsl mounts, match against either the short local + host name or the fqdn name. + +2011-10-06 Christos Zoulas + + * Add NFSv4 support (loosely based on Ramya's code). + Currently if the NFSv4 mount fails with ENOENT we fail + back to NFSv3, unless -DNO_FALLBACK. + * Replace strdup with xstrdup. It is not nice to replace + system functions with ones that behave differently. + * Add various consistency checks (caller function checks + variable for NULL, but callee does not). + * Fix error handling in various paths. + * Don't check before using XFREE(). free(NULL) works. + +2011-09-15 Christos Zoulas + + * amq -i addition (prints info about the map files) + +2011-09-14 Christos Zoulas + + * Solaris OS and compiler fixes from: + Hofmann, Frank + Sayle, Alex + - (void)&var generates warnings, removed + - __inline is invalid, changed with inline + - and other headers have extra dependendcies + ` +2011-08-11 Christos Zoulas + + * fix potential buffer overflow in expand_error() + (Richard Kettlewell). Does not seem to be exploitable. + + * simplify %option parsing to appease ancient flex. + +2011-06-21 Christos Zoulas + + * add support for linux autofs version 5 (untested) + +2011-06-18 Christos Zoulas + + * roll back to an older version of libtool that works + + * newer versions of config.guess and config.sub + + * minor fixes to buildall + +2011-05-19 Christos Zoulas + + * m4/macros/libtool.m4: for AIX AC_LANG_PROGRAM is incorrectly + used and the latest autoconf gives an error. For now just + quote it. + + * configure.in: Fedora Core 15 and RedHat 6 now don't define + af_family_t in , but in . + Include so that we get + indirectly. This caused the detection + test to fail. + +2010-11-24 Erez Zadok + + * m4/macros/os_cflags.m4: for linux, define _GNU_SOURCE (to get + definitions for O_LARGEFILE and more). + +2010-11-20 Christos Zoulas + + * Update news items, add release readme, mark as rc1 + + * Fix addopts code to work with options that are key=value + when the built-in hasmntopt() code is not used. The problem + was that the code passed "key=" to hasmntopt not "key". + +2009-12-10 Christos Zoulas + + * Copy all fields of the am_opts structure + When we introduced am_loc we also added a function to + create a duplicate of an am_opts structure. As it turns + out, that only made a partial copy of the struct and some + fields (e.g. opt_cache) was left blank in the new structure. + Unfortunately any code that was checking the options + through the mntfs structure was mislead by the partial + copy: caching was disabled completely, for example, and + since browsing relies on caching being enabled it wasn't + working either. + From: Krisztian Kovacs + + * Initialize RPC authentication flavor to AUTH_UNIX instead + of zero. RHEL 5 uses version 6 of the mount_arg structure + that includes the desired RPC authorization flavour. + Unfortunately amd initializes that value to zero, meaning + AUTH_NULL, resulting in all NFS servers denying operations. + From: Krisztian Kovacs + + * Make sure to remove nodes in the proper order when going + down. Depending on what order the nodes got created it's + possible that the parent of a node has a bigger am_mapno + (index in exported_ap[]) so that it gets freed before + its child while the child's am_parent pointer is still + pointing to the already freed block of memory. + This change makes sure that umount_exported() cleans up + all children of a node first before freeing the node. + From: Krisztian Kovacs + + * Fix Linux-specific stuff in ops_tmpfs.c + AUTOFS_TMPFS_FS_FLAGS is defined only in the Linux-specific + conf_linux.c file, so it cannot be built on Solaris. + From: Krisztian Kovacs + + * Add missing parenthesis to fix defined(XXX + From: Krisztian Kovacs + + * In the previous commit we've already made a change that + makes this code unnecessary since the node is returned + even if the backing file server is known to be down. + Since the code path is unused it should be removed. + From: Krisztian Kovacs + + * amfs_generic_lookup_child() tries to find an alternate + file server if it detects that the current one is down. + However, in the comparison used to decide if a possible + mount is the same as the current one it compares the am_loc + pointers instead of the actual mntfs pointers. Since + amfs_lookup_one_location() creates a brand new am_loc + structure for the returned mntfs structure the am_loc + pointer will be different even if the mntfs it's pointing + to is the same. + This tricks amfs_generic_lookup_child() think it has + found an alternate file server while it hasn't and thus + starts multiple racing mounts for the very same node and + mntfs. + From: Krisztian Kovacs + + * In the new am_loc scheme mounted mntfs structures still + have their mf_fo structure left intact. So when restart + creates a fake mntfs for an already mounted filesystem it + should not free mf_fo right away. + From: Krisztian Kovacs + + * Setting the error flag of the mntfs for which the share + is already mounted results in the mount point not being + removed when it times out. (Amd considers it an error + mntfs and thus umount becomse a no-op.) + From: Krisztian Kovacs + + * Right now AMD sets all timeout values to their defaults + even if you explicitly set them to zero. This patch + introduces separate flags that store if the respective + values have been set and the code path setting default + values checks these flags instead of testing the values + for zero. [Linux only] + From: Krisztian Kovacs + + * Fix mntfs related lookup/(un)mount race conditions, by + introducing a new structure linking an mntfs to a node. + From: Krisztian Kovacs + + * We have to free the buffers allocated by the XDR routines when + decoding the mount response after copying them to their final place. + From: Krisztian Kovacs + +2009-12-09 Christos Zoulas + + * Free continuation in amfs_retry() if we don't call amfs_bgmount() + Normally it's amfs_bgmount() which frees the continuation. However, if + the mount is already in progress and we're in amfs_retry() for another + node we don't try mounting the filesystem once again. Still, we have + to free the continuation as we won't get called again and thus would + leak the continuation structure and our am_loc references. + From: Krisztian Kovacs + + * Fix use-after-free and double free of mntfs private data + ops_nfs.c(nfs_init) does not clear private data pointer after free(). + This leads to use-after-free and double free in case mount() fails. + (found by valgrind) + From: Krisztian Kovacs + +2009-11-23 Christos Zoulas + + * The temporary filename buffer was leaked in lock_mtab(). + From: Krisztian Kovacs + +2009-10-27 Christos Zoulas + + * Deal with errno.h->sys/errno.h better + +2009-10-26 Christos Zoulas + + * Fix issue with autoconf 2.63 + + * Fix compile warnings for gcc-4.4.x + +2009-04-15 Christos Zoulas + + * Share the LDAP connection between different maps to save resources + on the LDAP server. (Olaf Flebbe ) + +2009-03-20 Christos Zoulas + + * Fix largefile re-definitions + + * Fix compilation error caused in previous patch + +2009-02-19 Christos Zoulas + + * Add a synchronous unmount amq rpc that will wait for the remote + filesystem to be unmounted, or return an error. Enabled by amq -uu + +2009-01-11 Erez Zadok + + * amd/ops_udf.c: don't define functions/variables which may not be + used. + + * amd/ops_tmpfs.c (mount_tmpfs): force gcc not to complain about + unused variables. + + * config.guess.long: properly support Fedora Core. + +2009-01-09 Christos Zoulas + + * Fix nfs mounts on linux 2.6.26 by explicitly initializing context. + + * Treat an empty sublink as an unset sublink; this allows us to + say sublink:=; in a spec to override the default. (This produces + Bad selector error, but it works. XXX: We need to decide how to + unset a selector. I proposed an unset keyword a while ago). + +2009-01-06 Christos Zoulas + + * re-renerate all generated files with newer versions of the + auto-tools. + + * move INSTALL to INSTALL.am-utils to avoid conflicts + + * fix incompatibilities with new m4 and new autoconf. + + * add UDF filesystem support. + + * fix NetBSD nfs file handle detection. + +2009-01-02 Christos Zoulas + + * add nocasetrans, nojoliet, rrcaseins for cd9660 filesystems + +2008-12-03 Christos Zoulas + + * allow ldap queries try a comma-separated list of servers given as: + + ldap_hostports = host1:port1,host2,host3:port3 + + original patch from Florian Geyer + +2008-09-19 Christos Zoulas + + * the auth_create gid on NetBSD is int + + * deal with lossage from flex -P + + * fix missing/incorrect prototypes + +2008-09-17 Christos Zoulas + + * fix manual page section issues (sorting, non-existant) + + * add missing forward declarations + + * avoid null pointer derefs (coverity) + + * more portable endian detection support + + * implement tmpfs support + + * use sizeof var instead of constant + + * fix yyerror declaration and definition + + * fix yy function renaming, and correct some renaming issues. + + * work around automake < 1.9 issue where ylwrap is not being run + for a single yacc or lex file. + + * NetBSD + - handle headers that need other headers to compile + - add exfs and tmpfs specific glue + - add options log, noatime, nocoredump, nodevmtime, softdep, + symperm, union + - NetBSD's new mount system call needs the size of the opaque + filesystem specific structure, but passing 0 for now works. + We would need to change a lot more code to pass the size from + the fs-specific calls, so for now punt. + - recvfrom takes socklen_t * on NetBSD + - handle newer NetBSD using statvfs + - NetBSD calls its ufs ffs + + * Linux + - Most recent kernels have trouble with trying to parse the pid + hostname and do locking. What before was a silent failure, now + there is a warning printed and the mount is rejected. This is + the simplest fix: + (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479884) + +2007-04-13 Erez Zadok + + * amd/sun_map.c (sun_append_str): When translating '&' from Sun + automounter maps, replace it with "${key}" in the Amd map, not + with the value of the key at the time. This way '*' maps work + too. + + * config.guess.long: don't use -q option to grep because some + systems don't support it. Bug fix for solaris. + +2007-03-11 Christos Zoulas + + * amd/opts.c (expand_op): Don't call xstrlcpy() to truncate a + string. It causes spurious xstrlcpy() syslog() errors. Use + memcpy() and explicitly terminate the string. + +2007-01-20 Erez Zadok + + * updated copyright year to 2007 on all files. + +2006-12-27 Erez Zadok + + * minor new port: ia64-hp-hpux11.23 + + * m4/macros/check_libwrap_severity.m4 (LIBS): also test if caller + needs to define rfc931_timeout. + + * amd/sun2amd.c: define rfc931_timeout and allow/deny_severity for + libwrap. + + * amd/amq_svc.c: some versions of libwrap require the caller to + define rfc931_timeout in addition to allow/deny_severity. + + * amd/amfs_toplvl.c (amfs_toplvl_init): properly detect when + forced unmount functionality exists for all systems. + + * libamu/mount_fs.c (compute_nfs_args): reset nfs_args_t->pathconf + only if field exists. + + * conf/nfs_prot/nfs_prot_hpux11.h: prevent HPUX 11.23 from + including or (TLI definitions are already + included from elsewhere). + + * configure.in: detect nfs_args_t->pathconf field. + +2006-11-27 Erez Zadok + + * doc/Makefile.am: properly publish html files using newer + text2html. + +2006-11-27 Erez Zadok + + * doc/Makefile.am: obfuscate emails in ChangeLog before it is + published on web site. + + * obfuscate many more emails in the distro, esp. of files which get + posted on the am-utils web site. + +2006-11-26 Erez Zadok + + * minor new port: i386-apple-darwin8.8.1. + + * doc/am-utils.texi: remove obvious URLs used by spammers, and + replace them with links to the am-utils web site, which uses PNG + images to obfuscate the actual email/mailman URLs. + +2006-10-30 Erez Zadok + + * doc/am-utils.texi (Password maps): minor typo reported by + Christoph P. Kukulies. + +2006-10-26 Erez Zadok + + * minor new port: i386-pc-linux-fc6. + + * m4/macros/linux_headers.m4: handle newer Linux kernels which + removed UTS_RELEASE from . + +2006-10-25 Erez Zadok + + * minor new ports: i386-pc-linux-centos4.4 and + powerpc-apple-darwin8.7.0. + + * config.guess.long: recognize CentOS Linux. + +2006-06-20 Erez Zadok + + * minor new port: i386-pc-solaris2.11-nexentaos (GNU/OpenSolaris). + + * config.guess.long: recognize NexentaOS (GNU/OpenSolaris) + + * config.guess, config.sub: updates from latest official GNU + distributions. + 2006-05-11 Erez Zadok - ******************************************************************* - *** Released am-utils-6.1.5 *** - ******************************************************************* + * Minor new ports: i386-unknown-freebsd6.1 (RELEASE), + powerpc-apple-darwin8.6.0, and i386-unknown-openbsd3.9. 2006-05-10 Erez Zadok - * Minor new ports: i386-unknown-freebsd6.1 (RELEASE) - powerpc-apple-darwin8.6.0, and i386-unknown-openbsd3.9. - * libamu/mount_fs.c (compute_nfs_attrcache_flags): fix signedness problems on IRIX-6.5. @@ -188,11 +738,14 @@ same $ac_cv_* variable name). Some systems support one header or another. Patch inspired by work Debian did. -2006-02-10 Erez Zadok +2006-02-16 Daniel P. Ottavio - ******************************************************************* - *** Released am-utils-6.1.4 *** - ******************************************************************* + * amd/sum_map_tok.l: Fixed a bug in a regular expression that + prevented dashes in hostnames. This was posted in BZ by Thomas + A. Fine. + + * README.sun2amd: Fixed a typo. Sentence mentions use of autofs + type when it should be host type. 2006-01-04 Erez Zadok @@ -302,9 +855,31 @@ 2005-10-10 Erez Zadok ******************************************************************* - *** Released am-utils-6.1.3 *** + *** Released am-utils-6.1a1 *** ******************************************************************* + * README.sun2amd: revised. + +2005-10-09 Daniel P. Ottavio + + * amd/info_nis.c (nis_search): Bug fix for bugzilla #428; make + sure that sun_entry2amd() is not called when yp_match() returns an + error, this is done by checking that 'res' is 0. Bug fix (same + BZ#); free the output allocated by yp_match() instead of freeing + the return value of sun_entry2amd(). + + * amd/sun_map.c (sun_entry2amd): Fix a comment. + + * README.sun2amd: Made a first pass at describing the status of + the sun2amd feature. + Moved the date. + +2005-10-09 Erez Zadok + + * README.sun2amd: place holder. + + * Makefile.am (EXTRA_DIST): distribute new README.sun2amd file. + 2005-10-07 Erez Zadok * m4/macros/check_mnttab_type.m4: move the test for MOUNT_* to the @@ -343,6 +918,10 @@ * amd/info_exec.c (exec_map_open): break assignment from inside conditional, to work around an IRIX-6.5 cc bug. + * amd/Makefile.am (amd_LDADD, sun2amd_LDADD): put libaminfo.a + before libamu.la. Some linkers (e.g., IRIX-6.5) incorrectly + complain about undefined symbols. + * fsinfo/fsi_util.c (set_ether_if), amd/map.c (unmount_mp), libamu/xutil.c (expand_error), libamu/strutil.c (xsnprintf): avoid comparison between signed and unsigned integers. @@ -479,15 +1058,10 @@ 2005-10-02 Erez Zadok - * include/am_utils.h: extern for xvsnprintf(). - - * amd/autil.c: move strsplit() to libamu/strutil.c. - * libamu/Makefile.am: use strutil.c, not util.c. * libamu/strutil.c: rename from util.c to explain better purpose - of file. Move xvsnprintf and xsnprintf from xutil.c to this - file. Sync up with 6.2 version of file. + of file. Move xvsnprintf and xsnprintf from xutil.c to this file. * libamu/xutil.c: explain purpose of file. Move mkdirs/rmdirs code from old util.c. @@ -555,22 +1129,13 @@ 2005-09-26 Erez Zadok - * libamu/xutil.c (unregister_amq): repair broken meaning of D_AMQ, - which was reversed in am-utils-6.2. Bug fix from Steve Plite - . - * hlfsd/stubs.c (nfsproc_getattr_2_svc, nfsproc_lookup_2_svc, nfsproc_readlink_2_svc, nfsproc_readdir_2_svc), hlfsd/hlfsd.c (hlfsd_init): use new clocktime() function. 2005-09-18 Erez Zadok - ******************************************************************* - *** Released am-utils-6.1.2.1 *** - ******************************************************************* - - * README.attrcache: Update status of freebsd and openbsd. - Document netbsd's patchs to support noac. + * README.attrcache: document netbsd's patchs to support noac. * libamu/mount_fs.c (compute_nfs_attrcache_flags): cleanup the code that sets the ac{reg,dir}{min,max} fields so it also sets the @@ -578,13 +1143,10 @@ * configure.in: check for nfs_args fields acregmax and acdirmax. - ******************************************************************* - *** Released am-utils-6.1.2 *** - ******************************************************************* - * README.attrcache: new file documenting in detail OS bugs relating to attribute caching, which can affect Amd's reliability under heavy load. + Update status of freebsd and openbsd. * doc/Makefile.am: install README.attrcache file as attrache.txt file on am-utils Web site. @@ -665,6 +1227,54 @@ amfs_bgmount, amfs_generic_mount_child), amd/amd.c (main): pass NULL to clocktime(). +2005-09-15 Erez Zadok + + * amd/nfs_subr.c (nfsproc_getattr_2_svc): initialize 'retry', just + in case. + (fh_to_mp3): increment amd_stats.d_stale counter only if we are + actually returning ESTALE. + + * amd/info_exec.c (exec_parse_qanswer), amd/info_file.c + (file_search_or_reload), amd/info_hesiod.c (hesiod_search), + amd/info_ldap.c (amu_ldap_search), amd/info_ndbm.c (search_ndbm), + amd/info_nis.c (nis_search), amd/info_nisplus.c (nisplus_search, + nisplus_search): don't dereference mnt_map->cfm which may be null + if we're not using an amd.conf file. + +2005-09-14 Erez Zadok + + * libamu/xutil.c (unregister_amq): if failed to de-register Amd + from portmapper, report it under dlog (debugging), not as an + annoying plog that always shows up. + +2005-09-13 Erez Zadok + + * mk-amd-map/mk-amd-map.c (read_file_file), libamu/util.c + (strsplit), libamu/hasmntopt.c (nextmntopt), amd/sun_map.c + (sun_entry2amd), amd/sun2amd.c (sun2amd_convert_convert), + amd/mapc.c (mapc_add_kv), amd/info_file.c (file_search_or_reload), + amd/info_exec.c (exec_parse_qanswer): cast isspace() and isascii() + arg to unsigned char, which is safer as per Christos. + + * amd/sun_map.c (sun_entry2amd): isspace takes an int, not a char. + + * configure.in: keep a dummy unused AM_PROG_LEX, because old + Automake (1.6.3) looks for it if you refer to LEX in your + Makefile.am files. Silly thing, fixed in newer versions of + Automake (1.9.2). + +2005-09-11 Erez Zadok + + * Makefile.am (EXTRA_DIST_M4): add prog_{lex,yacc}.m4 to distro. + + * configure.in: use new macros AMU_PROG_YACC and AMU_PROG_LEX. + + * m4/macros/prog_yacc.m4: new macro to check if bison/yacc/byacc + exist, but exist with an error if none found. + + * m4/macros/prog_lex.m4: new macro to check if f/lex exist, but + exit with an error if not found (am-utils requires f/lex). + 2005-09-07 Erez Zadok * minor new port: powerpc-apple-darwin8.2.0. @@ -683,8 +1293,48 @@ file system on this system (probably because /proc isn't mounted), then provide some default definition for this file to compile. +2005-08-28 Daniel P. Ottavio + + * amd/sun_map.c (sun_entry2amd) : Wipe out any trailing white + spaces or '\n' before passing strings to the parser. + + * amd/amd.h : oops, reverting bad changes + + * amd/info_file.c : oops, reverting bad changes + + * amd/mapc.c : oops, reverting bad changes + + * amd/sun_map_parse.y : oops, reverting bad changes + 2005-08-27 Erez Zadok + * libamu/xutil.c: amd_program_number is a u_long now. + (unregister_amq): if pmap_unset failed to de-register Amd from the + portmapper, print an error message. + (get_amd_program_number): returns a u_long now. + (set_amd_program_number): take a u_long now. + + * include/am_utils.h: get_amd_program_number() returns u_long now. + set_amd_program_number() takes a u_long now. + + * amq/amq.c: amd_program_number is a u_long, not int. + + * amd/nfs_start.c (mount_automounter): when registering Amd with + the portmapper (for Amq service), don't fail if just one of TCP or + UDP failed to register, but only if both transports failed. That + way Amq can still contact Amd using the transport that did + register correctly. However, now, if both transports failed to + register, then set amd_state to "Done" so it would shutdown + cleanly. + + * conf/transp/transp_{sockets,tli{}.c (amu_svc_register): better + comments. + + * libamu/xutil.c: debug_flags should always be initialized to + D_CONTROL (amq,daemon,fork). + (debug_option): allow setting initial immutable debug_flags via + amd.conf; afterward, prevent it (i.e., one tries it via "amq -D"). + * Makefile.am (DISTCLEANFILES): also remove amu_autofs_prot.h, config.cache.old, and dbgcf.h on "make distclean". (CLEANFILES): remove dbgcf on plain "make clean". @@ -692,13 +1342,199 @@ * amd/Makefile.am (DISTCLEANFILES): also remove ops_autofs.c on "make distclean". +2005-08-27 Daniel P. Ottavio + + * amd/info_file.c (file_search_or_reload): Changed the key + variable that is passed to the sun_entry2amd. + + * amd/mapc.c (mapc_add_kv): Add support for multiple entries + packed into one line. This is a workaround for handling Sun style + mounts that contains multiple entries on one line: "multi-mount + entries". The sun2amd conversion tools will convert such entries + into type:=auto and pack each of the auto-entries into one line + separated by '\n'. The mapc_add_kv function will now recognize + such entries and add then. + + * amd/sun2amd.c (sun2amd_convert): Add print statement that + includes the line number during a parser failure. + + * sun_map.c: Fix the AMD_MAP_PREF_KW definition. Fix spelling. + (sun_mountpts2amd): removed this function + (sun_hsfs2amd): added some more comments + (sun_nfs2amd): moved support for multi-mount entries from this + function to sun_multi2amd(). + (sun_multi2amd): New function to handle multi-mount entries. This + function will convert the Sun version to an Amd type:=auto. Each + extra auto entry will be appended to the same line separated by a + '\n'. + (sun_entry2amd): Fixed a bug if-statement. This function now + checks for multi-mount entries. + + * amd/sun_map.h: Add a fstype member to the sun_mountpt struct. + + * amd/sun_map_parse.y: Parser now supports fstype for multi-mount + entries. + + * amd/sun_map_tok.l: No longer print the line and column number + when parsing. This is because the parser is handed strings not + files. Therefore, the line number will always be 1. It is now up + to the higher level tools to echo line information during error + when they feed the parser. + 2005-08-24 Erez Zadok * configure.in: wrap all LDAP and HESIOD tests in test whether --with-OPT was used. +2005-08-20 Daniel P. Ottavio + + * amd/sun_map.c: Clean up #defines + (sun_entry2amd) : Verify that the key and entry values passed are + not NULL. Free the Sun entry struct when done. + + * amd/sun_map.h: Add some "not implemented yet" comments to the + map and mmap structures. + + * amd/sun_map_parse.y: Removed automap include functionality, it + will need to be re-implemented using a pre-processor. + Clean up function calls. + +2005-08-16 Daniel P. Ottavio + + * amd/sun2amd.c (sun2amd_convert): If the input line is too long + don't return an error just null terminate and continue. Fix bug: + the map key was not written. + + * amd/sun_map.c: Add a new Amd device, and cdfs constant. + (sun_locations2amd): Write the NFS type keyword + for each host of the mount entry. Add a space between each mount + location. + (sun_hsfs2amd): New function to support hsfs to + cdfs. + (sun_nfs2amd): Don't write the nfs type here. Fix + comments. + (sun_entry2amd): Change function parameter var for + clarity. Add support for hsfs. + + * amd/sun_map_parse.y (sun_map_parse_read): Reset the entry list + after it has been returned. + 2005-08-16 Erez Zadok + * amd/get_args.c (get_args): initialize debug_flags if they've + never been set. + +2005-08-15 Erez Zadok + + * amd/mapc.c (mapc_create): mapc find takes 4th arg, the mount + point. Now, we can properly initialize the cfm structure of the + mnt_map, so we can have access to the flags (e.g., SUN_MAP_SYNTAX) + inside each info_*.c file. + (mapc_find): takes 4rd arg (mntpt) and passes it to calls to + mapc_create. + (root_newmap): pass NULL as 4th arg (mntpt). + + * amd/amfs_generic.c (amfs_parse_defaults): remove ugly hack to + initialize map cfm structure (including flags) so late. + + * amd/autil.c (amfs_mkcacheref): pass mount point as 4th arg to + mapc_find. + + * amd/amfs_root.c (amfs_root_mount): pass NULL as new 4th arg to + mapc_find. + + * amd/amd.h: extern for mapc_find changed to pass the mount point. + + * libamu/xutil.c: debug_flags should be unsigned. + (dbg_opt): fix comments for updated debug_flags, add "defaults". + (debug_option): Don't allow "immutable" (D_IMMUTABLE) flags to be + changed, because they could mess Amd's state and only make sense + to be set once when Amd starts. Currently these immutable flags + are "daemon," "fork," "amq," and "mtab." If Amd not compiled with + debugging, set default "control" options (daemon,fork,amq). + (unregister_amq): proper use of D_AMQ. + + * include/am_utils.h: define new D_BASIC, D_CONTROL, D_DEFAULT, + D_IMMUTABLE, and D_MASK. Updated definitions of D_ALL and D_TEST. + debug_flags extern should be unsigned. + + * scripts/amd.conf-sample (debug_options): mention new "defaults" + option. + + * scripts/amd.conf.5,doc/am-utils.texi: document new debug option + "defaults" and properly explain the corrected meanings of + "daemon," "fork," "amq," and their "no" inversions. Better + explain "all" and "test" too. Correct default debug_mtab file to + /tmp/mtab. + + * hlfsd/stubs.c (nfsproc_readlink_2_svc): proper use of D_FORK. + + * hlfsd/homedir.c (homedir): proper use of D_FORK. + + * hlfsd/hlfsd.c (main, hlfsd_init, cleanup): proper use of + D_DAEMON. + + * amd/nfs_start.c (mount_automounter): proper use of D_AMQ. + + * amd/amd.h (DEBUG_MNTTAB_FILE): change default to /tmp/mtab, + which is more common on more systems (instead of /tmp/mnttab). + + * amd/amd.c (main): properly use D_DAEMON. + +2005-08-14 Erez Zadok + + * libamu/xutil.c (xlog_opt): define new pseudo log_option named + "defaults", which is an alias for "fatal,error,user,warning,info". + + * scripts/amd.conf.5, doc/am-utils.texi, amd/amd.8: document new + log_option "defaults". + + * amq/amq.8: typo. Arg name for -D is "debug_options" not + "log_options". + + * libamu/xutil.c: make xlog_level static, and initialize it to + XLOG_DEFAULT. + (cmdoption): take unsigned int as flags argument, and print any + errors as XLOG_ERROR (which cannot be turned off). + (switch_option): remove old code which disallowed you from turning + off flags that were set when Amd started up. Now, you can turn + any log option on/off at start time or later on (via amq -x), + other than the two mandatory options (fatal+error). + + * include/am_utils.h (XLOG_*): remove unused XLOG_DEFSTR. Define + XLOG_MASK to mask out unused flag bits. Define XLOG_DEFAULT to be + what it was before (fatal + error + user + warning + info), but + use the new mask. Remove extern's for xlog_level and + xlog_level_init. Change extern for cmdoption() to take an + unsigned flags argument. + + * doc/am-utils.texi, amq/amq.8, scripts/amd.conf.5, amd/amd.8: + document mandatory log options + (fatal+error) which cannot be turned off and are always on by + default. They must be on so that Amd can report crucial errors, + including those related to setting flags on/off. + + * hlfsd/hlfsd.c (main): remove hack to initialize log_options. + + * wire-test/wire-test.c: remove reference to unused xlog_level. + + * amd/mapc.c (mapc_create): 'alloc' flags variable should be + unsigned. + + * amd/get_args.c (get_args): no need for hack using + xlog_level_init. + + * amd/Makefile.am: separate sources common to amd and sun2amd into + a special, locally-built only, static library called libaminfo.a. + + * libamu/xutil.c (real_plog, xsnprintf): call new xvsnprintf() + wrapper function. + (xvsnprintf): new function which already gets a va_list. This was + needed to avoid nesting va_list's (which apparently isn't + allowed). + + * include/am_utils.h: prototype for new xvsnprintf wrapper. + * configure.in: sinclude([vers.m4]) version number file. * vers.m4: new file to separate version number out of @@ -707,24 +1543,248 @@ * Makefile.am (EXTRA_DIST_M4): include vers.m4 in distro. +2005-08-14 Daniel P. Ottavio + + * amd/info_file.c: add key to sun_entry2amd()'s parameters + + * amd/info_hesiod.c: add key to sun_entry2amd()'s parameters + + * amd/info_ldap.c: add key to sun_entry2amd()'s parameters + + * amd/info_ndbm.c: add key to sun_entry2amd()'s parameters + + * amd/info_nis.c: add key to sun_entry2amd()'s parameters + + * amd/info_nisplus.c: add key to sun_entry2amd()'s parameters + + * amd/sun_map.c: New functions to support sun translation to amd. + The function sun_entry2amd's parameters were expanded to include + the key value. sun_entry_2amd() now returns NULL on error. + + * amd/sun_map.h: Expand sun_entry2amd's parameters to include key + value. + + * amd/sun_map_parse.y: Change how file system types are parsed out + of the list of options for each entry. The previous way was not + working properly so now we just look for the 'fstype' keyword in + each option. If it exists we copy its key value. + Added some comments to sun_map_parse_read(). + + * amd/amd.h: Added an extern from info_file.c called + file_read_line(). Previously this function was static but is now + used in sun2amd.c. + + * amd/info_file.c: Changed the static function read_line() to a + public function called file_read_line(). This function is now + used in sun2amd.c + + * amd/sun2amd.8: Filled in the contents of this man page. This is + a conversion utility that converts Sun maps to Amd maps. + + * amd/sun2amd.c: Implemented a working version of this utility. + 2005-08-11 Erez Zadok + * amd/sun_map_parse.y: instead of using a custom FOO_alloc() + function, use Amd's CALLOC(struct FOO) macro. + + * amd/sun_map.h: remove extern definitions to functions no longer + needed. + + * amd/sun_map.c: removed superfluous *_alloc() functions, some of + which caused conflicts with same-named symbols in the parser + (since we rename 'yyalloc' to 'sun_map_alloc'). + * configure.in: keep AC_INIT on same line, for nightly snapshot build script. + * amd/Makefile.am: f/lex libraries are incompatible with multiple + scanners, so don't link Amd with libl.a/libfl.a. + +2005-08-10 Daniel P. Ottavio + + * amd/sun_map_tok.l: Clean up regular expression so HPUX stops + whining. + +2005-08-09 Daniel P. Ottavio + + * amd/sun_map_parse.y: Moved license below special yacc bracket to + be portable with HPUX's yacc. Clean up externs. + + * amd/sun_map_tok.l: Moved license below special lex bracket to be + portable with HPUX's lex. Fixed definitions to allow for a + non-flex lex to parse strings instead of files. Added some casts + to strlcpy usage to silence warnings. Moved the % options because + HPUX was complaining, + +2005-08-08 Daniel P. Ottavio + + * amd/sun_map_tok.l: Applied some definition goop to handle the + ECHO symbol that lex defines. This symbol causes problems on + RedHat-EL-powerPC platforms. Replaced strncpy with strlcpy. + Renamed the function sun_map_yyinput to sun_map_input. This + function is a utility function that is not generated by lex. + Therefore, the 'yy' may cause confusion. + +2005-08-08 Erez Zadok + + * amd/sun_map_tok.l: allocate more output slots so lex scanners + don't run out of memory. + + * amd/sun_map_parse.y: declare extern for sun_map_parse(). + + * libamu/xutil.c (xsnprintf): ensure proper comparisons between + signed and unsigned quantities. + 2005-08-06 Erez Zadok + * libamu/util.c, amd/autil.c (strsplit): moved strsplit() function + from Amd code to to libamu, so sun2amd could use it. + + * amd/Makefile.am (sbin_PROGRAMS): build sun2amd binary and man + page. + (EXTRA_sun2amd_OBJECTS): sun2amd needs to link with all info_*.c files + + * amd/sun2amd.8: placeholder for man page. + + * amd/sun2amd.c: placeholder for C version of translator from Sun + syntax maps to Amd maps. + + * */*.[0-9]: include file name in nroff source comment. + + * ALL: use '0' properly when assigning or passing it to functions. + If in the context pointer, use NULL. If in the context of a + single char (say within a string), the use '\0'. This is just to + make the code clearer. + + * m4/macros/header_templates.m4: template for HAVE_MAP_SUN. + + * amd/mapc.c (maptypes): add placeholder for Sun-syntax map + methods. + + * amd/Makefile.am (EXTRA_amd_SOURCES): compile info_sun.c + + * amd/info_sun.c: placeholder for meta info parser to get info + from Sun automount-style /etc/auto_master, possibly following + into multiple info services (via /etc/nsswitch.conf). + + * libamu/xutil.c (xsnprintf): if vsnprintf truncated the output + string to avoid an overflow, print an error. Include some code to + break out any possible infinite loop between plog() and + xsnprintf(). + (real_plog): now we can use (carefully) xsnprintf() directly. + + * amd/sun_map.[hc]: cleanup and formatting. + + * amd/sun_map_parse.y: to match the literal string "fstype=" use + double quotes, not single quotes. + + * amd/get_args.c (get_args): call conf_parse() using conf_in. + + * amd/amd.h: use renamed parser symbols (yyparse -> conf_parse; + yyin -> conf_in). + + * ylwrap: Enhance wrapper to avoid the #define hacks done by Gdb, + and suggested by the Automake manual. This enhanced parser will + prefix each conflicting yacc/lex symbol with a unique name + produced from INPUT. For example, if INPUT is foo_parse.y, then + yyparse() becomes foo_parse(). This requires that both your .l + and corresponding .y files have the same prefix (e.g., foo_parse.y + and foo_tok.l). + + * amd/Makefile.am (BUILT_SOURCES): define which yacc/lex .h/.c + source files are built automatically, and therefore should not be + in the distro (IMHO), and should be cleaned upon "make clean". + (amd_SOURCES): include new sun_map_parse.y and sun_map_tok.l files. + + * ylwrap: new file needed because we have two parsers now. + + * amd/sun_map_{parse.y,tok.l}: cleanup and formatting. + +2005-08-06 Daniel P. Ottavio + + * amd/Makefile.am: Added new files sun_map.h, sun_map.c, + sun_map_parse.y, and sun_map_tok.l. These files add support for + parsing Sun style maps. The yacc/lex files needed custom rules so + they don't cause symbol conflicts with each other. + + * amd/amd.h: Added "#define INFO_MAX_LINE_LEN" that specifies the + line limit for info services. + + * amd/info_exec.c: Replaced MAX_LINE_LEN with INFO_MAX_LINE_LEN + + * amd/info_file.c: Replaced MAX_LINE_LEN with INFO_MAX_LINE_LEN, + added support for parsing Sun style maps. The support for Sun + maps is done using the sun_entry2amd() function. This function is + called for each entry line that is read only when Sun parsing is + enabled. For each entry line that is passed to the function a + copy of the Amd equivalent is returned. + + * amd/sun_map.h: new header file for Sun style map support + + * amd/sun_map.c: new source file for Sun style map support, clean + up comments, additional sun2amd conversion routines + + * amd/sun_map_parse.y: new yacc file for parsing Sun style maps, + fix copyright notice, put filename below license. + + * amd/sun_map_tok.l: new lex file for parsing Sun style maps, fix + copyright notice, put filename below license. + + * amd/get_args.c: replace usage of strlcat with xstrlcat + + * include/am_utils.h: added 'extern void xstrlcat()' + + * libamu/util.c: Added a xstrlcat() function that wraps the + syscall strlcat() so that string truncations can be logged. + +2005-08-06 Erez Zadok + + * amd/info_file.c (file_search, file_reload): pass mnt_map to + file_search_or_reload. + (file_search_or_reload): ensure that mnt_map is never NULL. + + * amd/info_nis.c (nis_search): call sun_entry2amd() if + sun_map_syntax=yes. + + * amd/info_ldap.c (amu_ldap_search): call sun_entry2amd() if + sun_map_syntax=yes. + + * amd/info_hesiod.c (hesiod_search): call sun_entry2amd() if + sun_map_syntax=yes. + + * amd/info_ndbm.c (ndbm_search): pass mnt_map to search_ndbm. + (search_ndbm): call sun_entry2amd() if sun_map_syntax=yes. + + * amd/info_nisplus.c (nisplus_search): call sun_entry2amd() if + sun_map_syntax=yes. + + * amd/info_exec.c (exec_search): pass mnt_map to + exec_parse_qanswer. + (exec_parse_qanswer): call sun_entry2amd() if sun_map_syntax=yes. + + * doc/am-utils.texi (sun_map_syntax Parameter): document new + common parameter. + * scripts/amd.conf.5: selectors_in_defaults is a common parameter, not just [global]. Use consistent capitalization of Amd/Amq. + Document new sun_map_syntax parameter. * scripts/amd.conf-sample: properly list all of the parameters which are common to both the [global] and the per-map sections. + (sun_map_syntax): example of new parameter. * doc/am-utils.texi (Common Parameters): selectors_in_defaults is a common parameter, not just [global]. * scripts/amd.conf-sample (sun_map_syntax): example of new flag. + * amd/conf.c ({ropt,gopt}_sun_map_syntax): new function to parse + sun_map_syntax flag (global or per map). + + * amd/amd.h (CFM_SUN_MAP_SYNTAX): new flag for users to say if the + map uses Sun automounter syntax. + * cvs-server.txt: update instructions after branching 6.1-stable. 2005-08-02 Erez Zadok diff --git a/FAQ b/FAQ index 18e73a3fab2..3fbcb4cdb1d 100644 --- a/FAQ +++ b/FAQ @@ -26,7 +26,7 @@ answer your questions, see information in the following sources: listed in bugzilla in https://bugzilla.am-utils.org/ If you have additions to this FAQ, please let us know at -am-utils@am-utils.org. +the am-utils list (see www.am-utils.org). Thank you, The Am-utils development team. diff --git a/INSTALL b/INSTALL index 273fe02f454..2099840756e 100644 --- a/INSTALL +++ b/INSTALL @@ -1,124 +1,370 @@ - am-utils 6.1 compatibility list +Installation Instructions +************************* -For each system, list if it autoconfigures, compiles, or runs. Fill in -email id of person who confirms the fact. A missing entry means unverified. -A 'no' or 'X' means verified broken or nonexistent (static library). +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, +Inc. -SYSTEM CONFIG COMPILE RUN SHLIB AUTOFS -========================= ======= ======= ======= ======= ====== -alpha-dec-osf4.0f ro ro ro - - -alpha-dec-osf5.1 ro ro ro - - -alpha-unknown-linux-gentoo1.4.16 ezk ezk ezk ezk - -alphaev56-dec-osf4.0f ezk ezk ezk ezk - -i386-apple-darwin6.0 ezk ezk ezk ezk - -i386-pc-bsdi2.1 ion ion ion ion[X] ion[X] -i386-pc-linux-deb3.0 ezk ezk ezk ezk - -i386-pc-linux-deb3.1 ezk ezk ezk ezk - -i386-pc-linux-fc1 ezk ezk ezk ezk - -i386-pc-linux-fc2 ezk ezk ezk ezk - -i386-pc-linux-fc3 ezk ezk ezk ezk - -i386-pc-linux-fc4 ezk ezk ezk ezk - -i386-pc-linux-gentoo1.4.16 ezk ezk ezk ezk - -i386-pc-linux-rh6.2 ion ion ion ion ion -i386-pc-linux-rh7.1 ion ion ion ion ion -i386-pc-linux-rh7.2 ion ion ion ion ion -i386-pc-linux-rh7.3 ion ion ion ion ion -i386-pc-linux-rh8.0 ezk ezk ezk ezk - -i386-pc-linux-rh9 ion ion ion ion ion -i386-pc-linux-rhel3 ezk ezk ezk ezk - -i386-pc-linux-rhel4 ezk ezk ezk ezk - -i386-pc-linux-suse8.2 ezk ezk ezk ezk - -i386-pc-linux-suse9.1 ezk ezk ezk ezk - -i386-pc-linux-suse9.2 ezk ezk ezk ezk - -i386-pc-linux-suse9.3 ezk ezk ezk ezk - -i386-pc-solaris2.10 ro ro ro - - -i386-pc-solaris2.9 ro ro ro - - -i386-unknown-freebsd4.10 ezk ezk ezk ezk - -i386-unknown-freebsd4.11 ezk ezk ezk ezk - -i386-unknown-freebsd4.8 ezk ezk ezk ezk - -i386-unknown-freebsd4.9 ezk ezk ezk ezk - -i386-unknown-freebsd5.0 ezk ezk - ezk - -i386-unknown-freebsd5.1 ezk ezk ezk ezk - -i386-unknown-freebsd5.2 ezk ezk ezk ezk - -i386-unknown-freebsd5.2.1 ezk ezk ezk ezk - -i386-unknown-freebsd5.3 ezk ezk ezk ezk - -i386-unknown-freebsd5.4 ezk ezk ezk ezk - -i386-unknown-freebsd6 (BETA5) ezk ezk ezk ezk - -i386-unknown-netbsd1.6A ezk ezk ezk ezk - -i386-unknown-netbsdelf1.6.1 ezk ezk ezk ezk - -i386-unknown-netbsdelf1.6.2 ezk ezk ezk ezk - -i386-unknown-netbsdelf2.0 ezk ezk ezk ezk - -i386-unknown-netbsdelf2.0.2 ezk ezk ezk ezk - -i386-unknown-netbsdelf3.0 ezk ezk ezk ezk - -i386-unknown-openbsd3.3 ezk ezk ezk ezk - -i386-unknown-openbsd3.6 ezk ezk ezk ezk - -i386-unknown-openbsd3.7 ezk ezk ezk ezk - -i686-apple-darwin6.6 ezk ezk ezk ezk - -ia64-hp-hpux11.20 ezk ezk ezk ezk - -ia64-unknown-linux-rh2.1AS ezk ezk - ezk - -ia64-unknown-linux-rh2.1AW ezk ezk ezk ezk - -ia64-unknown-linux-rhel4 ezk ezk ezk ezk - -mips-sgi-irix6.2 ro ro ro - -[3] -mips-sgi-irix6.5 ro ro ro - -[3] -mips-unknown-linux-gentoo1.4.16 ezk ezk ezk ezk - -mipsel-unknown-linux-rhPS2 ezk ezk ezk ezk - -powerpc-apple-darwin7.6.0 ezk ezk ezk ezk - -powerpc-apple-darwin7.7.0 ezk ezk ezk ezk - -powerpc-apple-darwin7.8.0 ezk ezk ezk ezk - -powerpc-apple-darwin7.9.0 ezk ezk ezk ezk - -powerpc-apple-darwin8.2.0 ezk ezk ezk ezk - -powerpc-ibm-aix5.1.0.0 ion ion ion ion[X] ion[1,2] -powerpc-ibm-aix5.2.0.0 ezk ezk ezk ezk - -powerpc-ibm-aix5.3.0.0 ezk ezk ezk ezk - -powerpc-unknown-linux-yellowdog2.3 ezk ezk ezk ezk - -sparc-sun-solaris2.10 ro ro ro - - -sparc-sun-solaris2.5.1 ion ion ion ion ion[1] -sparc-sun-solaris2.6 ion ion ion ion ion -sparc-sun-solaris2.7 ion ion ion ion ion -sparc-sun-solaris2.8 ion ion ion ion ion -sparc-sun-solaris2.9 ro ro ro - - -sparc-unknown-linux-rh62 ion ion ion ion ion -sparc64-unknown-linux-aurora10 ion ion ion ion ion -sparc64-unknown-linux-deb3.0 ezk ezk ezk ezk - -sparc64-unknown-linux-gentoo1.4.16 ezk ezk ezk ezk - -sparc64-unknown-linux-rh62 ion ion ion ion ion -sparc64-unknown-linux-suse7.3 ezk ezk - ezk - -x86_64-unknown-linux-rh2.9.5AS ezk ezk ezk ezk - -x86_64-unknown-linux-rh3.0.0AS ion ion ion ion ion + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. +Basic Installation +================== -EMAIL ID LEGEND: + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. -bking: Bevis R W King -dsr: Dan Riley -ezk: Erez Zadok -finkel: Raphael Finkel -ion: Ion Badulescu -jose: Jose Nazario -nrh: Nick Hall -ro: Rainer Orth -stolke: Andreas Stolcke -wpaul: Bill Paul + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. -FOOTNOTES: + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. -[1] Due to limitations in the Sun autofs v1 implementation, some amd features -cannot be properly supported. More precisely, trying to access a link mount -pointing to another amd entry will result in failure and/or deadlock. -Ordinary nfs and link mounts work well, however. + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. -[2] AIX autofs appears to be a variant of the Sun autofs v1 protocol, but -IBM don't provide any sort of documentation or even header files from it. -It is currently unsupported; we may add some experimental support for it at -some point, though it won't be pretty. Assistance from IBM-ers would be -highly appreciated, hint hint. + The simplest way to compile this package is: -[3] IRIX 6 autofs uses the Sun autofs v1 protocol, too. The header files -are part of the onc3_eoe.sw.autofs (IRIX 6.2) or nfs.sw.autofs (IRIX 6.5) -package, which may not be installed. The autofs code is known to compile, -but hasn't been run yet. SGI's autofsd uses a barely documented system -call, syssgi(SGI_AUTOFS_SYS, ...), which may be required to get working -autofs support. Additional help from SGI would be highly appreciated. + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. -Erez & Ion + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff --git a/LSM.am-utils b/LSM.am-utils new file mode 100644 index 00000000000..20dba12c329 --- /dev/null +++ b/LSM.am-utils @@ -0,0 +1,20 @@ +Begin3 +Title: am-utils +Version: 6.0.1 +Entered-date: 08SEP99 +Description: BSD Automounter Utilities + Replaces the old amd-upl102. Offers NFS V3 support, many + new features, and numerous ports. The home page for + am-utils is in http://www.am-utils.org +Keywords: amd amq hlfsd fsinfo wire-test fixmount mk-amd-map automount +Author: ezk AT cs.columbia.edu (Erez Zadok) +Maintained-by: ezk AT cs.columbia.edu (Erez Zadok) +Primary-site: shekel.mcl.cs.columbia.edu /pub/am-utils + 1.3MB am-utils-6.0.1.tar.gz + 1.3MB am-utils.tar.gz + 1.3MB am-utils-snapshot.tar.gz +Alternate-site: http://www.am-utils.org/mirrors.html +Original-site: ftp.cs.columbia.edu /pub/amd +Platforms: all modern Unix systems +Copying-policy: BSD +End diff --git a/MIRRORS.html b/MIRRORS.html index 0deeefe32c7..511df2b905c 100644 --- a/MIRRORS.html +++ b/MIRRORS.html @@ -11,8 +11,8 @@ Note: in case of any problems accessing the individual FTP sites, please contact their respective maintainers. If you wish to be added to the -official mirror list, please send mail to am-utils-developers@am-utils.org with the +official mirror list, please send mail to +"am-utils-developers AT am-utils.org" with the full URL, maintainer's email, and geographical location.

@@ -24,8 +24,8 @@ full URL, maintainer's email, and geographical location.

@@ -33,14 +33,14 @@ full URL, maintainer's email, and geographical location.
  • Florida (University of Florida) @@ -52,24 +52,24 @@ full URL, maintainer's email, and geographical location.
  • Germany
  • Sweden
  • UK @@ -81,21 +81,21 @@ full URL, maintainer's email, and geographical location.
  • Japan
    - Last updated: Jan 5, 2004 + Last updated: 2006-11-27 diff --git a/MIRRORS.txt b/MIRRORS.txt index b5093e8f4aa..087c6ccd0cc 100644 --- a/MIRRORS.txt +++ b/MIRRORS.txt @@ -2,59 +2,59 @@ Note: in case of any problems accessing the individual FTP sites, please contact their respective maintainers. If you wish to be added to the -official mirror list, please send mail to am-utils-developers@am-utils.org +official mirror list, please send mail to am-utils-developers AT am-utils.org with the full URL, maintainer's email, and geographical location. U.S.A: New York (Stony Brook, Primary Site): ftp://ftp.am-utils.org/pub/am-utils - Maintainer: ezk@am-utils.org + Maintainer: ezk AT am-utils.org Minnesota: ftp://ftp.cs.umn.edu/pub/am-utils - Maintainer: dokas@cs.umn.edu + Maintainer: dokas AT cs.umn.edu #Avoid for now: empty directory # Virginia (Newport News): # ftp://ftp.ferginc.com/pub/unix/am-utils -# Maintainer: Branson.Matheson@FergInc.com +# Maintainer: Branson.Matheson AT FergInc.com #server gone? (Jan 5, 2004) # Ohio (Kent State University): # ftp://info.mcs.kent.edu/pub/am-utils -# Maintainer: root@mcs.kent.edu +# Maintainer: root AT mcs.kent.edu Florida (University of Florida) ftp://ftp.cise.ufl.edu/pub/mirrors/am-utils - Maintainer: mirror@cise.ufl.edu + Maintainer: mirror AT cise.ufl.edu Europe: Germany: ftp://ftp.fu-berlin.de/unix/network/am-utils - Maintainer: ftp-adm@ftp.fu-berlin.de + Maintainer: ftp-adm AT ftp.fu-berlin.de Germany: ftp://ftp.tu-darmstadt.de/pub/networking/filesystems/am-utils/ - Maintainer: networking@ftp.tu-darmstadt.de + Maintainer: networking AT ftp.tu-darmstadt.de Sweden: ftp://ftp.sunet.se/pub/unix/admin/am-utils - Maintainer: archive@ftp.sunet.se + Maintainer: archive AT ftp.sunet.se # not responding (Jan 5, 2004) # Sweden (Stockholm University, Math Depat): # ftp://mirror.matematik.su.se/pub/am-utils -# Maintainer: leifj@matematik.su.se +# Maintainer: leifj AT matematik.su.se UK: ftp://sunsite.org.uk/package/am-utils - Maintainer: lmjm@icparc.ic.ac.uk + Maintainer: lmjm AT icparc.ic.ac.uk Asia: Japan: ftp://ftp.u-aizu.ac.jp/pub/net/amd/am-utils - Maintainer: ftp-admin@u-aizu.ac.jp + Maintainer: ftp-admin AT u-aizu.ac.jp Japan: ftp://core.ring.gr.jp/pub/net/am-utils/ - Maintainer: ftpadmin@ring.gr.jp + Maintainer: ftpadmin AT ring.gr.jp Japan: ftp://ftp.ring.gr.jp/pub/net/am-utils/ - Maintainer: ftpadmin@ring.gr.jp + Maintainer: ftpadmin AT ring.gr.jp # gone? (Jan 5, 2004) # Australia: # Melbourne: # ftp://ftp.sage-au.org.au/pub/network/filesystem/am-utils -# Maintainer: mirror@ftp.sage-au.org.au +# Maintainer: mirror AT ftp.sage-au.org.au diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000000..7e7082decf0 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,352 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Top level Makefile +# Author: Erez Zadok + +@SET_MAKE@ + +ACLOCAL_AMFLAGS = -I m4/macros + +SUBDIRS = \ + libamu \ + amd \ + amq \ + \ + fixmount \ + fsinfo \ + hlfsd \ + mk-amd-map \ + wire-test \ + \ + scripts \ + doc + +# temporary tests override SUBDIRS +#SUBDIRS = lib wire-test amq amd + +# additional files to add to the distribution tar file +# m4/aclocal +EXTRA_DIST_M4 = \ + vers.m4 \ + \ + m4/GNUmakefile \ + m4/amdgrep \ + m4/amindent \ + m4/autopat \ + m4/chop-aclocal.pl \ + m4/copy-if-newbig \ + m4/mk-aclocal \ + m4/mkconf \ + m4/rmtspc \ + m4/update_build_version \ + \ + m4/macros/HEADER \ + m4/macros/TRAILER \ + m4/macros/c_void_p.m4 \ + m4/macros/cache_check_dynamic.m4 \ + m4/macros/check_amu_fs.m4 \ + m4/macros/check_autofs_style.m4 \ + m4/macros/check_checkmount_style.m4 \ + m4/macros/check_extern.m4 \ + m4/macros/check_extern_ldap.m4 \ + m4/macros/check_fhandle.m4 \ + m4/macros/check_field.m4 \ + m4/macros/check_fs_headers.m4 \ + m4/macros/check_fs_mntent.m4 \ + m4/macros/check_gnu_getopt.m4 \ + m4/macros/check_hide_mount_type.m4 \ + m4/macros/check_lib2.m4 \ + m4/macros/check_libwrap_severity.m4 \ + m4/macros/check_map_funcs.m4 \ + m4/macros/check_mnt2_cdfs_opt.m4 \ + m4/macros/check_mnt2_gen_opt.m4 \ + m4/macros/check_mnt2_nfs_opt.m4 \ + m4/macros/check_mnt2_pcfs_opt.m4 \ + m4/macros/check_mnt2_udf_opt.m4 \ + m4/macros/check_mnttab_file_name.m4 \ + m4/macros/check_mnttab_location.m4 \ + m4/macros/check_mnttab_opt.m4 \ + m4/macros/check_mnttab_style.m4 \ + m4/macros/check_mnttab_type.m4 \ + m4/macros/check_mount_style.m4 \ + m4/macros/check_mount_trap.m4 \ + m4/macros/check_mount_type.m4 \ + m4/macros/check_mtype_printf_type.m4 \ + m4/macros/check_mtype_type.m4 \ + m4/macros/check_network_transport_type.m4 \ + m4/macros/check_nfs_fh_dref.m4 \ + m4/macros/check_nfs_hn_dref.m4 \ + m4/macros/check_nfs_prot_headers.m4 \ + m4/macros/check_nfs_sa_dref.m4 \ + m4/macros/check_nfs_socket_connection.m4 \ + m4/macros/check_os_libs.m4 \ + m4/macros/check_restartable_signal_handler.m4 \ + m4/macros/check_umount_style.m4 \ + m4/macros/check_unmount_args.m4 \ + m4/macros/check_unmount_call.m4 \ + m4/macros/check_varargs_macros.m4 \ + m4/macros/expand_cpp_hex.m4 \ + m4/macros/expand_cpp_int.m4 \ + m4/macros/expand_cpp_string.m4 \ + m4/macros/expand_run_string.m4 \ + m4/macros/extern_optarg.m4 \ + m4/macros/extern_sys_errlist.m4 \ + m4/macros/field_mntent_t_mnt_time_string.m4 \ + m4/macros/func_bad_hasmntopt.m4 \ + m4/macros/func_bad_memcmp.m4 \ + m4/macros/func_bad_yp_all.m4 \ + m4/macros/header_templates.m4 \ + m4/macros/host_macros.m4 \ + m4/macros/libtool.m4 \ + m4/macros/linux_headers.m4 \ + m4/macros/localconfig.m4 \ + m4/macros/mount_headers.m4 \ + m4/macros/opt_amu_cflags.m4 \ + m4/macros/opt_cppflags.m4 \ + m4/macros/opt_debug.m4 \ + m4/macros/opt_ldflags.m4 \ + m4/macros/opt_libs.m4 \ + m4/macros/os_cflags.m4 \ + m4/macros/os_cppflags.m4 \ + m4/macros/os_ldflags.m4 \ + m4/macros/package_bugreport.m4 \ + m4/macros/package_name.m4 \ + m4/macros/package_version.m4 \ + m4/macros/prog_lex.m4 \ + m4/macros/prog_yacc.m4 \ + m4/macros/save_state.m4 \ + m4/macros/struct_field_nfs_fh.m4 \ + m4/macros/struct_mntent.m4 \ + m4/macros/struct_mnttab.m4 \ + m4/macros/struct_nfs_args.m4 \ + m4/macros/struct_nfs_fh.m4 \ + m4/macros/struct_nfs_fh3.m4 \ + m4/macros/struct_nfs_gfs_mount.m4 \ + m4/macros/try_compile_anyfs.m4 \ + m4/macros/try_compile_nfs.m4 \ + m4/macros/try_compile_rpc.m4 \ + m4/macros/type_auth_create_gidlist.m4 \ + m4/macros/type_autofs_args.m4 \ + m4/macros/type_cachefs_args.m4 \ + m4/macros/type_cdfs_args.m4 \ + m4/macros/type_udf_args.m4 \ + m4/macros/type_efs_args.m4 \ + m4/macros/type_lofs_args.m4 \ + m4/macros/type_mfs_args.m4 \ + m4/macros/type_pcfs_args.m4 \ + m4/macros/type_pte_t.m4 \ + m4/macros/type_recvfrom_fromlen.m4 \ + m4/macros/type_rfs_args.m4 \ + m4/macros/type_rpcvers_t.m4 \ + m4/macros/type_svc_in_arg.m4 \ + m4/macros/type_time_t.m4 \ + m4/macros/type_tmpfs_args.m4 \ + m4/macros/type_ufs_args.m4 \ + m4/macros/type_xdrproc_t.m4 \ + m4/macros/type_xfs_args.m4 \ + m4/macros/type_yp_order_outorder.m4 \ + m4/macros/with_addon.m4 + +EXTRA_DIST_CONF = \ + conf/autofs/autofs_default.h \ + conf/autofs/autofs_default.c \ + conf/autofs/autofs_linux.h \ + conf/autofs/autofs_linux.c \ + conf/autofs/autofs_solaris_v1.h \ + conf/autofs/autofs_solaris_v1.c \ + conf/autofs/autofs_solaris_v2_v3.h \ + conf/autofs/autofs_solaris_v2_v3.c \ + \ + conf/checkmount/checkmount_aix.c \ + conf/checkmount/checkmount_bsd44.c \ + conf/checkmount/checkmount_default.c \ + conf/checkmount/checkmount_osf.c \ + conf/checkmount/checkmount_svr4.c \ + conf/checkmount/checkmount_ultrix.c \ + \ + conf/fh_dref/fh_dref_aix3.h \ + conf/fh_dref/fh_dref_aix42.h \ + conf/fh_dref/fh_dref_bsd44.h \ + conf/fh_dref/fh_dref_default.h \ + conf/fh_dref/fh_dref_freebsd22.h \ + conf/fh_dref/fh_dref_hpux.h \ + conf/fh_dref/fh_dref_irix.h \ + conf/fh_dref/fh_dref_isc3.h \ + conf/fh_dref/fh_dref_linux.h \ + conf/fh_dref/fh_dref_nextstep.h \ + conf/fh_dref/fh_dref_osf2.h \ + conf/fh_dref/fh_dref_osf4.h \ + conf/fh_dref/fh_dref_sunos3.h \ + conf/fh_dref/fh_dref_sunos4.h \ + conf/fh_dref/fh_dref_svr4.h \ + \ + conf/hn_dref/hn_dref_default.h \ + conf/hn_dref/hn_dref_isc3.h \ + conf/hn_dref/hn_dref_linux.h \ + \ + conf/mount/mount_aix.c \ + conf/mount/mount_aix3.c \ + conf/mount/mount_bsdi3.c \ + conf/mount/mount_default.c \ + conf/mount/mount_hpux.c \ + conf/mount/mount_irix5.c \ + conf/mount/mount_irix6.c \ + conf/mount/mount_isc3.c \ + conf/mount/mount_linux.c \ + conf/mount/mount_mach3.c \ + conf/mount/mount_stellix.c \ + conf/mount/mount_svr4.c \ + \ + conf/mtab/mtab_aix.c \ + conf/mtab/mtab_bsd.c \ + conf/mtab/mtab_file.c \ + conf/mtab/mtab_isc3.c \ + conf/mtab/mtab_linux.c \ + conf/mtab/mtab_mach3.c \ + conf/mtab/mtab_osf.c \ + conf/mtab/mtab_svr4.c \ + conf/mtab/mtab_ultrix.c \ + \ + conf/nfs_prot/nfs_prot_aix3.h \ + conf/nfs_prot/nfs_prot_aix4.h \ + conf/nfs_prot/nfs_prot_aix4_2.h \ + conf/nfs_prot/nfs_prot_aix4_3.h \ + conf/nfs_prot/nfs_prot_aix5_1.h \ + conf/nfs_prot/nfs_prot_aix5_2.h \ + conf/nfs_prot/nfs_prot_bsdi2.h \ + conf/nfs_prot/nfs_prot_bsdi3.h \ + conf/nfs_prot/nfs_prot_darwin.h \ + conf/nfs_prot/nfs_prot_default.h \ + conf/nfs_prot/nfs_prot_freebsd2.h \ + conf/nfs_prot/nfs_prot_freebsd3.h \ + conf/nfs_prot/nfs_prot_hpux.h \ + conf/nfs_prot/nfs_prot_hpux11.h \ + conf/nfs_prot/nfs_prot_irix5.h \ + conf/nfs_prot/nfs_prot_irix6.h \ + conf/nfs_prot/nfs_prot_linux.h \ + conf/nfs_prot/nfs_prot_ncr2.h \ + conf/nfs_prot/nfs_prot_nextstep.h \ + conf/nfs_prot/nfs_prot_netbsd.h \ + conf/nfs_prot/nfs_prot_netbsd1_3.h \ + conf/nfs_prot/nfs_prot_netbsd1_4.h \ + conf/nfs_prot/nfs_prot_openbsd.h \ + conf/nfs_prot/nfs_prot_osf2.h \ + conf/nfs_prot/nfs_prot_osf4.h \ + conf/nfs_prot/nfs_prot_osf5.h \ + conf/nfs_prot/nfs_prot_sunos3.h \ + conf/nfs_prot/nfs_prot_sunos4.h \ + conf/nfs_prot/nfs_prot_sunos5_3.h \ + conf/nfs_prot/nfs_prot_sunos5_4.h \ + conf/nfs_prot/nfs_prot_sunos5_5.h \ + conf/nfs_prot/nfs_prot_sunos5_6.h \ + conf/nfs_prot/nfs_prot_sunos5_7.h \ + conf/nfs_prot/nfs_prot_sunos5_8.h \ + conf/nfs_prot/nfs_prot_svr4.h \ + conf/nfs_prot/nfs_prot_ultrix.h \ + \ + conf/sa_dref/sa_dref_386bsd.h \ + conf/sa_dref/sa_dref_aix3.h \ + conf/sa_dref/sa_dref_aoi.h \ + conf/sa_dref/sa_dref_bsd44.h \ + conf/sa_dref/sa_dref_default.h \ + conf/sa_dref/sa_dref_isc3.h \ + conf/sa_dref/sa_dref_linux.h \ + conf/sa_dref/sa_dref_svr4.h \ + \ + conf/transp/transp_sockets.c \ + conf/transp/transp_tli.c \ + \ + conf/trap/trap_aix3.h \ + conf/trap/trap_aux.h \ + conf/trap/trap_default.h \ + conf/trap/trap_dgux.h \ + conf/trap/trap_hcx.h \ + conf/trap/trap_hpux.h \ + conf/trap/trap_irix.h \ + conf/trap/trap_isc3.h \ + conf/trap/trap_linux.h \ + conf/trap/trap_mach3.h \ + conf/trap/trap_netbsd.h \ + conf/trap/trap_news4.h \ + conf/trap/trap_rtu6.h \ + conf/trap/trap_stellix.h \ + conf/trap/trap_svr4.h \ + conf/trap/trap_ultrix.h \ + \ + conf/umount/umount_aix.c \ + conf/umount/umount_bsd44.c \ + conf/umount/umount_default.c \ + conf/umount/umount_linux.c \ + conf/umount/umount_osf.c + +EXTRA_DIST_INCLUDE = \ + include/am_compat.h \ + include/am_utils.h \ + include/am_xdr_func.h \ + include/am_defs.h \ + include/amq_defs.h \ + include/mount_headers1.h \ + include/mount_headers2.h \ + include/nfs_common.h + +EXTRA_DIST = \ + $(EXTRA_DIST_M4) \ + $(EXTRA_DIST_CONF) \ + $(EXTRA_DIST_INCLUDE) \ + \ + BUGS \ + FAQ \ + LSM.am-utils \ + MIRRORS.txt \ + MIRRORS.html \ + README.attrcache \ + README.autofs \ + README.ldap \ + README.osx \ + README.sun2amd \ + README.y2k \ + bootstrap \ + buildall \ + config.guess.long \ + depcomp \ + ldap.schema \ + ldap-id.ms \ + ldap-id.txt \ + stamp-h.in \ + tasks \ + ylwrap.amd + +DISTCLEANFILES = amu_nfs_prot.h amu_autofs_prot.h config.cache.old dbgcf.h +CLEANFILES = dbgcf.h + +############################################################################## +# Personal maintainer rules by Erez Zadok + +# update possibly new versions of autoconf/automake/libtool files +update: + (cd $(top_srcdir) && ${MAKE} ${MFLAGS} -f ./m4/GNUmakefile update) + ${MAKE} ${MFLAGS} libtool + +# remake libtool +libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck + +# make a snapshots and put them in the ftp snapshots directory +FTPTOP=/var/ftp/pub/am-utils +snapshot: dist install-snapshot +install-snapshot: + snap=`/bin/ls -1 am-utils*.tar.gz` && \ + echo COPYING SNAPSHOTS: $$snap && \ + cp -pu $$snap $(FTPTOP)/snapshots && \ + rm -f $(FTPTOP)/am-utils-6.1-snapshot.tar.gz && \ + ln -s snapshots/$$snap $(FTPTOP)/am-utils-6.1-snapshot.tar.gz && \ + (cd $(FTPTOP) && ${MAKE} ${MFLAGS}) && \ + (cd $(FTPTOP)/snapshots && ${MAKE} ${MFLAGS}) +test-snapshot: dist + mv -f am-utils*.tar.gz /var/ftp/private/ezk + +# dist hook: change directory modes so they are not world writable +dist-hook: + @echo "Protecting distribution directories..." + chmod -R go-w $(distdir) diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 00000000000..6c32a4fd28a --- /dev/null +++ b/Makefile.in @@ -0,0 +1,1170 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Top level Makefile +# Author: Erez Zadok +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in mkinstalldirs $(srcdir)/aux_conf.h.in \ + COPYING compile config.guess config.sub depcomp install-sh \ + missing ylwrap ltmain.sh +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = aux_conf.h +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4/macros +SUBDIRS = \ + libamu \ + amd \ + amq \ + \ + fixmount \ + fsinfo \ + hlfsd \ + mk-amd-map \ + wire-test \ + \ + scripts \ + doc + + +# temporary tests override SUBDIRS +#SUBDIRS = lib wire-test amq amd + +# additional files to add to the distribution tar file +# m4/aclocal +EXTRA_DIST_M4 = \ + vers.m4 \ + \ + m4/GNUmakefile \ + m4/amdgrep \ + m4/amindent \ + m4/autopat \ + m4/chop-aclocal.pl \ + m4/copy-if-newbig \ + m4/mk-aclocal \ + m4/mkconf \ + m4/rmtspc \ + m4/update_build_version \ + \ + m4/macros/HEADER \ + m4/macros/TRAILER \ + m4/macros/c_void_p.m4 \ + m4/macros/cache_check_dynamic.m4 \ + m4/macros/check_amu_fs.m4 \ + m4/macros/check_autofs_style.m4 \ + m4/macros/check_checkmount_style.m4 \ + m4/macros/check_extern.m4 \ + m4/macros/check_extern_ldap.m4 \ + m4/macros/check_fhandle.m4 \ + m4/macros/check_field.m4 \ + m4/macros/check_fs_headers.m4 \ + m4/macros/check_fs_mntent.m4 \ + m4/macros/check_gnu_getopt.m4 \ + m4/macros/check_hide_mount_type.m4 \ + m4/macros/check_lib2.m4 \ + m4/macros/check_libwrap_severity.m4 \ + m4/macros/check_map_funcs.m4 \ + m4/macros/check_mnt2_cdfs_opt.m4 \ + m4/macros/check_mnt2_gen_opt.m4 \ + m4/macros/check_mnt2_nfs_opt.m4 \ + m4/macros/check_mnt2_pcfs_opt.m4 \ + m4/macros/check_mnt2_udf_opt.m4 \ + m4/macros/check_mnttab_file_name.m4 \ + m4/macros/check_mnttab_location.m4 \ + m4/macros/check_mnttab_opt.m4 \ + m4/macros/check_mnttab_style.m4 \ + m4/macros/check_mnttab_type.m4 \ + m4/macros/check_mount_style.m4 \ + m4/macros/check_mount_trap.m4 \ + m4/macros/check_mount_type.m4 \ + m4/macros/check_mtype_printf_type.m4 \ + m4/macros/check_mtype_type.m4 \ + m4/macros/check_network_transport_type.m4 \ + m4/macros/check_nfs_fh_dref.m4 \ + m4/macros/check_nfs_hn_dref.m4 \ + m4/macros/check_nfs_prot_headers.m4 \ + m4/macros/check_nfs_sa_dref.m4 \ + m4/macros/check_nfs_socket_connection.m4 \ + m4/macros/check_os_libs.m4 \ + m4/macros/check_restartable_signal_handler.m4 \ + m4/macros/check_umount_style.m4 \ + m4/macros/check_unmount_args.m4 \ + m4/macros/check_unmount_call.m4 \ + m4/macros/check_varargs_macros.m4 \ + m4/macros/expand_cpp_hex.m4 \ + m4/macros/expand_cpp_int.m4 \ + m4/macros/expand_cpp_string.m4 \ + m4/macros/expand_run_string.m4 \ + m4/macros/extern_optarg.m4 \ + m4/macros/extern_sys_errlist.m4 \ + m4/macros/field_mntent_t_mnt_time_string.m4 \ + m4/macros/func_bad_hasmntopt.m4 \ + m4/macros/func_bad_memcmp.m4 \ + m4/macros/func_bad_yp_all.m4 \ + m4/macros/header_templates.m4 \ + m4/macros/host_macros.m4 \ + m4/macros/libtool.m4 \ + m4/macros/linux_headers.m4 \ + m4/macros/localconfig.m4 \ + m4/macros/mount_headers.m4 \ + m4/macros/opt_amu_cflags.m4 \ + m4/macros/opt_cppflags.m4 \ + m4/macros/opt_debug.m4 \ + m4/macros/opt_ldflags.m4 \ + m4/macros/opt_libs.m4 \ + m4/macros/os_cflags.m4 \ + m4/macros/os_cppflags.m4 \ + m4/macros/os_ldflags.m4 \ + m4/macros/package_bugreport.m4 \ + m4/macros/package_name.m4 \ + m4/macros/package_version.m4 \ + m4/macros/prog_lex.m4 \ + m4/macros/prog_yacc.m4 \ + m4/macros/save_state.m4 \ + m4/macros/struct_field_nfs_fh.m4 \ + m4/macros/struct_mntent.m4 \ + m4/macros/struct_mnttab.m4 \ + m4/macros/struct_nfs_args.m4 \ + m4/macros/struct_nfs_fh.m4 \ + m4/macros/struct_nfs_fh3.m4 \ + m4/macros/struct_nfs_gfs_mount.m4 \ + m4/macros/try_compile_anyfs.m4 \ + m4/macros/try_compile_nfs.m4 \ + m4/macros/try_compile_rpc.m4 \ + m4/macros/type_auth_create_gidlist.m4 \ + m4/macros/type_autofs_args.m4 \ + m4/macros/type_cachefs_args.m4 \ + m4/macros/type_cdfs_args.m4 \ + m4/macros/type_udf_args.m4 \ + m4/macros/type_efs_args.m4 \ + m4/macros/type_lofs_args.m4 \ + m4/macros/type_mfs_args.m4 \ + m4/macros/type_pcfs_args.m4 \ + m4/macros/type_pte_t.m4 \ + m4/macros/type_recvfrom_fromlen.m4 \ + m4/macros/type_rfs_args.m4 \ + m4/macros/type_rpcvers_t.m4 \ + m4/macros/type_svc_in_arg.m4 \ + m4/macros/type_time_t.m4 \ + m4/macros/type_tmpfs_args.m4 \ + m4/macros/type_ufs_args.m4 \ + m4/macros/type_xdrproc_t.m4 \ + m4/macros/type_xfs_args.m4 \ + m4/macros/type_yp_order_outorder.m4 \ + m4/macros/with_addon.m4 + +EXTRA_DIST_CONF = \ + conf/autofs/autofs_default.h \ + conf/autofs/autofs_default.c \ + conf/autofs/autofs_linux.h \ + conf/autofs/autofs_linux.c \ + conf/autofs/autofs_solaris_v1.h \ + conf/autofs/autofs_solaris_v1.c \ + conf/autofs/autofs_solaris_v2_v3.h \ + conf/autofs/autofs_solaris_v2_v3.c \ + \ + conf/checkmount/checkmount_aix.c \ + conf/checkmount/checkmount_bsd44.c \ + conf/checkmount/checkmount_default.c \ + conf/checkmount/checkmount_osf.c \ + conf/checkmount/checkmount_svr4.c \ + conf/checkmount/checkmount_ultrix.c \ + \ + conf/fh_dref/fh_dref_aix3.h \ + conf/fh_dref/fh_dref_aix42.h \ + conf/fh_dref/fh_dref_bsd44.h \ + conf/fh_dref/fh_dref_default.h \ + conf/fh_dref/fh_dref_freebsd22.h \ + conf/fh_dref/fh_dref_hpux.h \ + conf/fh_dref/fh_dref_irix.h \ + conf/fh_dref/fh_dref_isc3.h \ + conf/fh_dref/fh_dref_linux.h \ + conf/fh_dref/fh_dref_nextstep.h \ + conf/fh_dref/fh_dref_osf2.h \ + conf/fh_dref/fh_dref_osf4.h \ + conf/fh_dref/fh_dref_sunos3.h \ + conf/fh_dref/fh_dref_sunos4.h \ + conf/fh_dref/fh_dref_svr4.h \ + \ + conf/hn_dref/hn_dref_default.h \ + conf/hn_dref/hn_dref_isc3.h \ + conf/hn_dref/hn_dref_linux.h \ + \ + conf/mount/mount_aix.c \ + conf/mount/mount_aix3.c \ + conf/mount/mount_bsdi3.c \ + conf/mount/mount_default.c \ + conf/mount/mount_hpux.c \ + conf/mount/mount_irix5.c \ + conf/mount/mount_irix6.c \ + conf/mount/mount_isc3.c \ + conf/mount/mount_linux.c \ + conf/mount/mount_mach3.c \ + conf/mount/mount_stellix.c \ + conf/mount/mount_svr4.c \ + \ + conf/mtab/mtab_aix.c \ + conf/mtab/mtab_bsd.c \ + conf/mtab/mtab_file.c \ + conf/mtab/mtab_isc3.c \ + conf/mtab/mtab_linux.c \ + conf/mtab/mtab_mach3.c \ + conf/mtab/mtab_osf.c \ + conf/mtab/mtab_svr4.c \ + conf/mtab/mtab_ultrix.c \ + \ + conf/nfs_prot/nfs_prot_aix3.h \ + conf/nfs_prot/nfs_prot_aix4.h \ + conf/nfs_prot/nfs_prot_aix4_2.h \ + conf/nfs_prot/nfs_prot_aix4_3.h \ + conf/nfs_prot/nfs_prot_aix5_1.h \ + conf/nfs_prot/nfs_prot_aix5_2.h \ + conf/nfs_prot/nfs_prot_bsdi2.h \ + conf/nfs_prot/nfs_prot_bsdi3.h \ + conf/nfs_prot/nfs_prot_darwin.h \ + conf/nfs_prot/nfs_prot_default.h \ + conf/nfs_prot/nfs_prot_freebsd2.h \ + conf/nfs_prot/nfs_prot_freebsd3.h \ + conf/nfs_prot/nfs_prot_hpux.h \ + conf/nfs_prot/nfs_prot_hpux11.h \ + conf/nfs_prot/nfs_prot_irix5.h \ + conf/nfs_prot/nfs_prot_irix6.h \ + conf/nfs_prot/nfs_prot_linux.h \ + conf/nfs_prot/nfs_prot_ncr2.h \ + conf/nfs_prot/nfs_prot_nextstep.h \ + conf/nfs_prot/nfs_prot_netbsd.h \ + conf/nfs_prot/nfs_prot_netbsd1_3.h \ + conf/nfs_prot/nfs_prot_netbsd1_4.h \ + conf/nfs_prot/nfs_prot_openbsd.h \ + conf/nfs_prot/nfs_prot_osf2.h \ + conf/nfs_prot/nfs_prot_osf4.h \ + conf/nfs_prot/nfs_prot_osf5.h \ + conf/nfs_prot/nfs_prot_sunos3.h \ + conf/nfs_prot/nfs_prot_sunos4.h \ + conf/nfs_prot/nfs_prot_sunos5_3.h \ + conf/nfs_prot/nfs_prot_sunos5_4.h \ + conf/nfs_prot/nfs_prot_sunos5_5.h \ + conf/nfs_prot/nfs_prot_sunos5_6.h \ + conf/nfs_prot/nfs_prot_sunos5_7.h \ + conf/nfs_prot/nfs_prot_sunos5_8.h \ + conf/nfs_prot/nfs_prot_svr4.h \ + conf/nfs_prot/nfs_prot_ultrix.h \ + \ + conf/sa_dref/sa_dref_386bsd.h \ + conf/sa_dref/sa_dref_aix3.h \ + conf/sa_dref/sa_dref_aoi.h \ + conf/sa_dref/sa_dref_bsd44.h \ + conf/sa_dref/sa_dref_default.h \ + conf/sa_dref/sa_dref_isc3.h \ + conf/sa_dref/sa_dref_linux.h \ + conf/sa_dref/sa_dref_svr4.h \ + \ + conf/transp/transp_sockets.c \ + conf/transp/transp_tli.c \ + \ + conf/trap/trap_aix3.h \ + conf/trap/trap_aux.h \ + conf/trap/trap_default.h \ + conf/trap/trap_dgux.h \ + conf/trap/trap_hcx.h \ + conf/trap/trap_hpux.h \ + conf/trap/trap_irix.h \ + conf/trap/trap_isc3.h \ + conf/trap/trap_linux.h \ + conf/trap/trap_mach3.h \ + conf/trap/trap_netbsd.h \ + conf/trap/trap_news4.h \ + conf/trap/trap_rtu6.h \ + conf/trap/trap_stellix.h \ + conf/trap/trap_svr4.h \ + conf/trap/trap_ultrix.h \ + \ + conf/umount/umount_aix.c \ + conf/umount/umount_bsd44.c \ + conf/umount/umount_default.c \ + conf/umount/umount_linux.c \ + conf/umount/umount_osf.c + +EXTRA_DIST_INCLUDE = \ + include/am_compat.h \ + include/am_utils.h \ + include/am_xdr_func.h \ + include/am_defs.h \ + include/amq_defs.h \ + include/mount_headers1.h \ + include/mount_headers2.h \ + include/nfs_common.h + +EXTRA_DIST = \ + $(EXTRA_DIST_M4) \ + $(EXTRA_DIST_CONF) \ + $(EXTRA_DIST_INCLUDE) \ + \ + BUGS \ + FAQ \ + LSM.am-utils \ + MIRRORS.txt \ + MIRRORS.html \ + README.attrcache \ + README.autofs \ + README.ldap \ + README.osx \ + README.sun2amd \ + README.y2k \ + bootstrap \ + buildall \ + config.guess.long \ + depcomp \ + ldap.schema \ + ldap-id.ms \ + ldap-id.txt \ + stamp-h.in \ + tasks \ + ylwrap.amd + +DISTCLEANFILES = amu_nfs_prot.h amu_autofs_prot.h config.cache.old dbgcf.h +CLEANFILES = dbgcf.h + +# make a snapshots and put them in the ftp snapshots directory +FTPTOP = /var/ftp/pub/am-utils +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +aux_conf.h: $(top_builddir)/config.status $(srcdir)/aux_conf.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) all install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + + +@SET_MAKE@ + +############################################################################## +# Personal maintainer rules by Erez Zadok + +# update possibly new versions of autoconf/automake/libtool files +update: + (cd $(top_srcdir) && ${MAKE} ${MFLAGS} -f ./m4/GNUmakefile update) + ${MAKE} ${MFLAGS} libtool + +# remake libtool +libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck +snapshot: dist install-snapshot +install-snapshot: + snap=`/bin/ls -1 am-utils*.tar.gz` && \ + echo COPYING SNAPSHOTS: $$snap && \ + cp -pu $$snap $(FTPTOP)/snapshots && \ + rm -f $(FTPTOP)/am-utils-6.1-snapshot.tar.gz && \ + ln -s snapshots/$$snap $(FTPTOP)/am-utils-6.1-snapshot.tar.gz && \ + (cd $(FTPTOP) && ${MAKE} ${MFLAGS}) && \ + (cd $(FTPTOP)/snapshots && ${MAKE} ${MFLAGS}) +test-snapshot: dist + mv -f am-utils*.tar.gz /var/ftp/private/ezk + +# dist hook: change directory modes so they are not world writable +dist-hook: + @echo "Protecting distribution directories..." + chmod -R go-w $(distdir) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS index 5cde984ed51..b7fbedac6d0 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,44 @@ -*** Notes specific to am-utils version 6.1.5 +*** Notes specific to am-utils version 6.2 + + - Removed license advertising clause + - Removed expn program + +*** Notes specific to am-utils version 6.2-rc1 + +Filesystem Support: + - Add support for NFSv4 + - Add support for Lustre + - Add support for ext{2,3,4} + - Add support for linux autofs version 5 + - Add support for TMPFS and UDF +New features: + - Add amq -i (prints information about maps) + - Add synchronous unmount code for amq -uu + - Allow a comma-separated list of LDAP servers for failover +Changes in behavior: + - Empty variable assignments, now unset the variable value. + - Share LDAP connections between different maps to save resources +Portability fixes: + - Changes to work with Linux-2.6.x, Linux-3.x and NetBSD-5.x, NetBSD-6.x, + FreeBSD 7.x, Solaris +Bug fixes: + - Many bug fixes, see ChangeLog + +*** Notes specific to am-utils version 6.2a3 + +- minor new ports: + i386-apple-darwin8.8.1 + i386-pc-linux-centos4.4 (RHEL4 clone) + i386-pc-linux-fc6 (Fedora Core 6) + i386-pc-solaris2.11-nexentaos (GNU/OpenSolaris) + ia64-hp-hpux11.23 (gcc and cc) + powerpc-apple-darwin8.7.0 + +- Bugs fixed: + * reduce annoying warnings from xstrlcpy when expanding options. + * translate '*' Sun maps correctly with "${key}" + +*** Notes specific to am-utils version 6.2a2 New amd.conf global parameter: nfs_allow_any_interface. By default it is set to 'no' which means that Amd accepts local NFS packets only from @@ -11,21 +51,6 @@ Add support for specifying the host to match in the mount selectors netgrp and netgrpd. Now one can use either netgrp() or netgrp(,). -- Bugs fixed: - * handle old-style filehandles correctly (for mount points longer - than 28 chars) - * don't turn off attribute cache for regular NFS mounts (improves - performance) - * detect G/DBM support via gdbm_compat library (Debian) - * detect NDBM support in libc (FreeBSD 6) - -- minor new ports: - i386-unknown-freebsd6.1 (RELEASE) - i386-unknown-openbsd3.9 - powerpc-apple-darwin8.6.0 - -*** Notes specific to am-utils version 6.1.4 - Support new mount options for type:=pcfs mounts: longname, nowin95, shortname, user=N, group=N, mask=N, and dirmask=N. @@ -41,44 +66,28 @@ better tune Amd's responsiveness under heavy scheduler loads. i386-pc-linux-fc5 (Fedora Core 5) i386-pc-linux-suse10.1 (beta 8) i386-unknown-freebsd6.0 (RELEASE) + i386-unknown-freebsd6.1 (RELEASE) i386-unknown-netbsdelf2.1 i386-unknown-netbsdelf3.0 (RELEASE) i386-unknown-openbsd3.8 + i386-unknown-openbsd3.9 powerpc-apple-darwin8.5.0 + powerpc-apple-darwin8.6.0 - Bugs fixed: * one serious memory leak in amfs_generic (caught by Coverity) * assorted potential (but rare) NULL pointer dereferences (Coverity) * correctly print nfs_args->addr info (sin_family/port/addr) * pawd should resolve path repeatedly until no more to do + * handle old-style filehandles correctly (for mount points longer + than 28 chars) * use-after-free bug in amfs_lookup_mntfs (Coverity) + * don't turn off attribute cache for regular NFS mounts (improves + performance) + * detect G/DBM support via gdbm_compat library (Debian) + * detect NDBM support in libc (FreeBSD 6) -*** Notes specific to am-utils version 6.1.3 - -- Bugs fixed: - * amq should de-register properly on exit - * convert all sprintf to safer xsnprintf - * convert all strcat to safer xstrlcat - * convert all strcpy to safer xstrlcpy - * fix three buffer overruns in expand_op (amd/opts.c) - * pawd was trying UDP only, now try TCP if UDP failed - -Moved pawd's path-matching functionality into Amd, where it can be done a -lot more efficiently (we no longer need to construct and send the whole -mounted tree, only to match small parts of it). This will lessen the CPU -and network load on systems that use pawd heavily, and also minimize the -chance that we exceed default or hard-coded UDP/TCP RPC packet sizes. - -*** Notes specific to am-utils version 6.1.2.1 - -- Bugs fixed: - * properly turn off the attrcache in freebsd and openbsd - * can turn off attrcache on netbsd, but need kernel patch, see - README.attrcache - * pawd goes into an infinite loop on type:=auto - * consistent search for file system mnttab/mount names - -*** Notes specific to am-utils version 6.1.2 +*** Notes specific to am-utils version 6.2a1 MAJOR BUG FIXES: Synchronize Amd's view of its file systems with the kernel's NFS client-side DNLC/dcache. Amd changes its view when it reloads @@ -114,13 +123,82 @@ Amd. Tell syslog not to log automatically to /dev/console; it's unfriendly. If user really wants to, they can set it in /etc/syslog.conf. +Moved pawd's path-matching functionality into Amd, where it can be done a +lot more efficiently (we no longer need to construct and send the whole +mounted tree, only to match small parts of it). This will lessen the CPU +and network load on systems that use pawd heavily, and also minimize the +chance that we exceed default or hard-coded UDP/TCP RPC packet sizes. + +Changed slightly how Amd behaves when you try to change log_options after +Amd started (options can be turned on/off via "amq -x ARG"). It used to be +that Amd won't let you turn off options which were on when Amd started. +That limited users' ability to reduce Amd's logging levels to a minimum. +Now, Amd will allow you to turn on/off any option, other than the two +options "fatal" and "error." Both are on by default and considered +mandatory. These two don't produce a lot of log messages, so your logs will +remain small, but they are important to keep on, so Amd can report serious +problems (including errors relating to incorrectly setting other log +options). + +Amd now understands a new log_option called "defaults" which is synonymous +with "fatal,error,user,warning,info" (and is also what logging happens by +default). + +Amd now understands a new debug_option called "defaults" which is synonymous +with "all,nohrtime,nomtab,noxdrtrace". + +Changed the misleading inverted logic of certain debug_options: + +1. "xdrtrace" is included in "all" because "all" (as the name implies), + should be *all* options, not just a subset. If you want the old behavior + of "all" then use "defaults" (all only adds "xdrtrace" which can be + chatty on some systems). + +2. Certain debug options are hereby declared immutable: they may not be + changed by "amq -D" after Amd starts, because it doesn't make much sense + to change them after Amd starts, and it could really mess up Amd. These + immutable flags are currently "daemon," "fork," "amq," and "mtab." + +3. the debug option "daemon" *will* cause Amd to daemonize. Before, it was + causing Amd NOT to daemonize. This was greatly confusing, especially + since the code, documentation, and comments often conflicted with each + other. If you don't want Amd to daemonize, which is useful for debugging + it, then use the debug option "nodaemon" -- it makes a lot more sense. + +4. Similarly, the "fork" option *will* cause Hlfsd to fork. Use "nofork" if + you don't want Hlfsd to fork. This option is only applicable to Hlfsd. + +5. Similarly, the "amq" option, which is now on by default, will cause Amd + to register itself with the RPC portmapper (for Amq), as is done + normally. If you don't want Amd to register with the portmapper, use + "noamq" -- this naming convention makes more sense. This was also + confusingly documented and coded in places. + + Note: unfortunately, these changes to the "daemon," "fork," and "amq" + debug options may be incompatible with people's previous use of Amd. + Some of you may have to update your amd.conf slightly or your startup + options (if they're hard-coded in your amd startup script). Sorry, but + we have to fix those old problems sooner or later. However, if you never + set any debug_options, or you used to "all," then you won't be affected + by the change in meaning of these three flags. + - minor new ports: i386-pc-linux-deb3.1 - i386-unknown-netbsdelf3.0 + i386-unknown-netbsdelf3.0 (BETA) powerpc-apple-darwin8.2.0 -- bugs fixed: - * minor documentation corrections +- Bugs fixed: + * abort with an error if yacc/lex programs not found + * properly turn off the attrcache in freebsd and openbsd + * can turn off attrcache on netbsd, but need kernel patch, see + README.attrcache + * pawd goes into an infinite loop on type:=auto + * consistent search for file system mnttab/mount names + * convert all sprintf to safer xsnprintf + * convert all strcat to safer xstrlcat + * convert all strcpy to safer xstrlcpy + * fix three buffer overruns in expand_op (amd/opts.c) + * pawd was trying UDP only, now try TCP if UDP failed *** Notes specific to am-utils version 6.1.1 @@ -328,7 +406,7 @@ version (10.3.x) than uname(3) reports. Useful with firewalls and NAT'ed environments. - new amd.conf option "debug_mtab_file". Allows user to define the mtab - file during debug-mtab mode. The default path is "/tmp/mnttab". + file during debug-mtab mode. The default path is "/tmp/mtab". - new function selector xhost(ARG) which will match ARG against the current host name. This works even if ARG is a CNAME (unlike the host==ARG diff --git a/README b/README index 0b3ce46beb6..4b4aec0e8c0 100644 --- a/README +++ b/README @@ -81,7 +81,7 @@ or ./buildall -K To be a developer and be able to run "bootstrap", you must have -autoconf-2.50, automake-1.5, and libtool 1.4 installed on your system (or +autoconf-2.68, automake-1.11.1, and libtool 2.2.6b installed on your system (or later versions thereof). You no longer need to get my special version of automake. Contact me if you'd like to be a maintainer and get access to the CVS server. @@ -94,9 +94,9 @@ before. Let me know if you are having any problems with them. I fully expect, at least initially, to have to be the sole developers of the M4 macros and let others concentrate on C sources. -[E] Report all bugs to am-utils@am-utils.org. Avoid reporting to my -personal email address. It is important to involve the whole list in bug -fixes etc. +[E] Report all bugs via Bugzilla or the am-utils list (see +www.am-utils.org). Avoid reporting to my personal email address. It is +important to involve the whole list in bug fixes etc. Good luck. diff --git a/README.attrcache b/README.attrcache index e8522d226eb..7bd10874bf8 100644 --- a/README.attrcache +++ b/README.attrcache @@ -122,8 +122,8 @@ OS. You can run this script as root as follows: # sh test-attrcache If you run this script on an OS whose status is known (and not listed -above), please report it to am-utils@am-utils.org, so we can record it in -this file. +above), please report it to us via Bugzilla or the am-utils mailing list +(see www.am-utils.org), so we can record it in this file. Sincerely, Erez. diff --git a/README.autofs b/README.autofs new file mode 100644 index 00000000000..6f5cc90f7f0 --- /dev/null +++ b/README.autofs @@ -0,0 +1,176 @@ +# This file is README.autofs +# am-utils-6.1 +# Erez Zadok a.k.a. "Darth Autoconf" +# +# modified by +# Ion Badulescu a.k.a. "The Autofs Master" + +** General notes about the autofs support in am-utils + +- The autofs code in am-utils is gamma quality for Linux, beta quality for + Solaris 2.5+ and non-working for all the other systems. + +- Link, lofs, ufs, nfs, nfsl, and auto mounts were tested and work properly; + the others should work, but were not tested. + +* Caveats: + +- [this applies to Solaris/IRIX 6/HP-UX/AIX] Amd acts as *both* automountd and +automount. There's no way to distinguish between the two. When amd starts, +it first registers itself as an autofs server (automountd's job), then +parses its own maps, and decides which autofs-type mounts to make +(automount's job). After the autofs mounts are made, amd listens for +requests from the kernel-based autofs, and acts upon them. Since there can +be only one autofs listener on a system, this means that automountd and amd +cannot run at the same time; nor can two amd's run at the same time if they +are both using autofs mounts. + +- Linux support is available and fairly stable. Solaris 2.5+ support is +newer and less tested, but seems pretty stable as well. IRIX 6 and HP-UX +autofs support will probably be very easy once we get Solaris 2.5 to work, +as they use the same protocol and almost identical data structures. AIX +seems to be using the Solaris 2.5 protocol as well, but they don't provide +any headers or documentation so getting autofs to work will be tricky at best. + +- Killing amd can become a problem if there are active mounts. Since mounts +are done "in place", we can't just unmount our mount points and go away. For +now, amd simply tells the kernel that it is dying; we need to think this +further. It would be nice to "take over" the old mountpoints, there is +support for this in Solaris (due to is RPC nature) and is easy to add to +the Linux kernel (an ioctl on the mountpoint). + +- The Solaris 2.5 implementation of the autofs v1 protocol is NON-REENTRANT, +and ignoring this limitation results in a DEADLOCK between the kernel and +the daemon. This is a serious problem, although only for the lofs and link +mount types. In other words, suppose the daemon is trying a lofs/link mount +whose destination crosses another autofs mountpoint. If that mountpoint is +not yet mounted, it will trigger another autofs lookup which will deadlock +inside the kernel -- because the kernel is waiting for the previous request +to return. This is not even something specific to amd, Sun's own automountd +has the exact same problem. Ctrl-C breaks the deadlock, so it's not fatal, +but the lofs/link entry is in effect unusable. + +- Solaris 2.8 (at least) doesn't like getting to get out-of-order replies to +mount requests, and ignores the late ones. It's only a minor annoyance (read +delay), because the RPC is retried by the kernel and it succeeds the second +time around. + +* Solaris: + +- Amd w/ autofs mounts will fight over the listener port with Sun's + automountd, so running both simultaneously is a really bad idea. + +- Browsable_dirs is possible and implemented for Solaris 2.6+. + +- Direct mounts are implemented and work correctly. + +- Host maps are implemented and work correctly. + +- On Solaris 2.6+, symlinks over autofs are inefficient. The kernel seems to + time them out immediately after receiving them, so each access to a + symlink causes a call to userspace. Needless to say, this negates the + whole point of using autofs. Automountd seems to always use lofs mounts + instead of symlinks, we do the same unless the admin requests + "autofs_use_lofs = no" in amd.conf. + +- Solaris 2.5/2.5.1 do not support symlinks over autofs, so links are always + mounted as lofs mounts, subject to the limitation described in the caveats + section above. + +- Restarting autofs mounts is possible, but not yet implemented. + +* Linux: + +- Amd should work fine even when the Linux automounter is running, the + mechanism being used prevents any kind of (evil) interaction between them. + +- Browsing is not available if autofs support is used, due to limitations in + the kernel<->daemon protocol used by Linux 2.2 and 2.4. Only already-mounted + nodes will appear in the autofs directory, and this is implemented entirely + in the kernel. + +- Host maps are supported with all autofs versions. + +- Direct maps cannot be supported since there is no kernel support for them; + we might be able to get something eventually, but don't hold your breath. + If anything, we may do it using a regular NFS mountpoint and bind-mount on + top of it. + +- Inherit doesn't make much sense because we can't restart a hung autofs + mount point, due to kernel limitations. This needs to be fixed in the + Linux kernel; it's not particularly difficult, and we might provide a + patch at some point. + +- Link (and lofs) mounts will use the new bind-mount support in Linux + 2.4+. No more symlinks! And /bin/pwd works great too. + +- Auto maps are actually mounted as a separate autofs filesystem. Since each + autofs filesystem consumes 2 file descriptors, and amd has at most 1024 + file descriptors available, there can be at most 512 of them mounted at + the same time. Because of this, extensive use of auto maps is discouraged + when using autofs on Linux. + +* amd.conf requirements: + +To tell amd to use an autofs-style mount point and mounts for a map, add + + mount_type = autofs + +either to the global section, or to the sections of the individual maps you +selected. Mixing autofs and normal amd mount points in the same amd.conf +file *does* work. + +* Map changes: + +No changes are necessary. If a map is marked as autofs in amd.conf, mounts +are done "in place" and the "fs" parameter is ignored most of the time. + +* Todo: + +We are looking for volunteers to improve the autofs code! + +(1) These fixes are needed: + +- sublinks are broken + +- when the mount type is 'link', transparently translate it into a loopback +file system mount (lofs), that would mount in place, rather than supply a +symlink, at least on systems whose autofs doesn't support symlinks. Linux +does support symlinks, Solaris 2.6+ does too, but Solaris 2.5/2.5.1 doesn't +and neither does IRIX 6. Moreover, Sun's automountd always uses lofs for +link mounts, even on 2.6+, because symlinks are not cached in the kernel and +thus are not particularly efficient. [done] + +- complain if certain incompatible options (autofs and ...) are used. Direct +maps on Linux is one such case of incompatible options. Browsable_dirs on +Linux is another such case. + +- if amd is killed or dies, the autofs mounts will remain intact as required +(your system is _not_ hung, yay!). However, if you restart amd, it will not +correctly 'restart' the autofs mounts as the Sun automounter does. Rather, +it might cause another mount to happen, which leaves your /etc/mnttab +cluttered with older mounts entries which cannot be unmounted. It might also +just pretend everything is ok, when in fact it isn't. + +(2) Code expansion: + +- [Solaris only] implement the sockets version of amu_get_autofs_address() +and create_autofs_service(), in conf/transp/transp_sockets.c. Not sure if +it's necessary, Solaris it still biased towards TLI/STREAMS in +userspace. [mostly done, untested, might be used on AIX 5.x+ and IRIX 6] + +- Implement the restarting of autofs mount points. This is already doable on +Solaris; on Linux, the kernel needs to be patched to allow it. + +(3) Testing and porting to other systems: + +- nothing has been tested on IRIX 6, which reportedly has a similarly +functioning autofs to Solaris 2.5. The code compiles, but has not been run +yet and is most likely broken. + +- support for Linux autofs is stable, we need testers! + +- support for Solaris 2.6+ is pretty stable, so we need testers for it, too! + +- we did not test any version of Solaris on x86. It will probably work, but +you have been warned. Testers are welcome. diff --git a/README.ldap b/README.ldap index 71511344255..24095cafa9c 100644 --- a/README.ldap +++ b/README.ldap @@ -1,12 +1,12 @@ LDAP support for am-utils was originally done by Leif Johansson -. He no longer maintains it. +. He no longer maintains it. The current LDAP support for am-utils is for LDAPv2 only. Reportedly, LDAPv3 mostly works. Volunteers and patches are welcome. The IANA has assigned the following Private Enterprise Number to: - 10180 Am-utils Organization Erez Zadok ezk@am-utils.org + 10180 Am-utils Organization Erez Zadok ezk AT am-utils.org There are three files in this directory that relate to LDAP: @@ -33,8 +33,8 @@ Erez. ------- Forwarded Message -From: "IANA Private Enterprise Number" -To: "Erez Zadok" +From: "IANA Private Enterprise Number" +To: "Erez Zadok" Subject: RE: Application for Enterprise-number (10180) Date: Sun, 15 Jul 2001 14:43:45 -0700 @@ -43,7 +43,7 @@ Dear Erez, The IANA has assigned the following Private Enterprise Number to: -10180 Am-utils Organization Erez Zadok ezk@am-utils.org +10180 Am-utils Organization Erez Zadok ezk AT am-utils.org Please notify the IANA if there is a change in your contact or company information. diff --git a/README.osx b/README.osx new file mode 100644 index 00000000000..5aea891d649 --- /dev/null +++ b/README.osx @@ -0,0 +1,74 @@ +Here some unconfirmed instructions for how to setup Amd on a MAC OS-X +machine. Please direct all comments about this information, as well fixes, +updates, and corrections to the am-utils mailing list (see +www.am-utils.org). + +Thanks, +Erez. + +--cut--here----cut--here----cut--here----cut--here----cut--here----cut--here-- + + +Date: Fri, 28 Jan 2005 06:53:50 -0800 +From: Kevin Layer + +The stock amd didn't work for us in Mac OS X 10.3. +Here's how we installed am-utils-6.1-20031025: + +./configure --prefix=/usr +make +make install + +Create /System/Library/StartupItems/AMD with the files: + +AMD +Resources/ -- copy from other directories in .. +StartupParameters.plist + +Then, make sure that AMDSERVER=-YES- is added to /etc/hostconfig. + +******************* the file AMD: + +#!/bin/sh + +## +# Start AMD +## + +. /etc/rc.common + +if [ "${AMDSERVER:=-NO-}" = "-YES-" ]; then + ConsoleMessage "Starting AMD server" + + if [ ! -f /etc/amd.conf -a -r /etc/amd.conf.template ]; then + cp /etc/amd.conf.template /etc/amd.conf + fi + if [ ! -f /etc/amd.map -a -r /etc/amd.map.template ]; then + cp /etc/amd.map.template /etc/amd.map + fi + /usr/sbin/amd +fi + +******************* the file StartupParameters.plist: + +{ + Description = "AMD server"; + Provides = ("AMD"); + Requires = ("Resolver"); + OrderPreference = "None"; + Messages = + { + start = "Starting AMD server"; + stop = "Stopping AMD server"; + }; +} + +******************* + +With the beta's of 10.4 (64-bit) we're having issues with realpath() +and amd mounted directories, but hopefully this is just a bug that +they'll fix. + +-- +Kevin Layer http://www.franz.com/ + diff --git a/README.sun2amd b/README.sun2amd new file mode 100644 index 00000000000..6c397bd0e02 --- /dev/null +++ b/README.sun2amd @@ -0,0 +1,142 @@ + Sun-style Automounter Syntax Support in Amd + Last updated: October 10, 2005 + + +* Summary + +The goal of this effort is to provide a drop in replacement for the Sun +automounter. This is implemented in two ways. (1) A new parser built into +Amd. (2) a standalone sun2amd Unix filter tool that can convert Sun-style +maps to Amd maps. + +Support for Sun-style maps in Amd (including this document) is a +work-in-progress. This feature as a whole has not been throughly tested and +is "alpha" quality as of the date posted at the top of this document. + +* Status + +Currently sun2amd supports most of the basic syntax features of Sun maps. +However, support for Sun auto.master maps does not yet exists at any level. +Below is a list of supported and not-yet supported features. + +1. Supported Sun map features: + +- Simple map entry format: [mount_options] location ... + locations take the form of host:pathname + +- Map Key Substitution: :/tmp/& + the & expands to + +- Wildcard Key: * :/tmp + This is is a catch-all entry. + +- Variable Substitution: + $ARCH, $CPU, $HOST, $OSNAME, $OSREL, $OSVERS, $NATISA + +- Multiple Mount format: + [mount_options] [mountpoint] [mount-options locations...]... + + ex. + pluto -ro /tmp1 host1:/tmp1 /tmp2 host2:/tmp2 + +- HSFS file-system (cdrom): -fstype=hsfs,ro :/dev/cdrom + + +2. Not-yet supported Sun map features: + +- Replicated File Systems: ,...: + This is a feature of Solaris that allows a user to specify a + set of hosts to appear as one in a map entry. When a host + does not respond the kernel will switch to an alternate + server. Amd will supports the syntax for replicated file + systems by creating multiple hosts, however, Amd will not + perform any kind of fail over. + +- CacheFS (although Amd supports type:=cachefs, sun2amd doesn't yet parse + it). + +- AutoFS (although Amd supports Autofs mounts and type:=auto, sun2amd + may not parse it fully). + +- Included maps: + + This will include the contents of a map into another map. + +- Sun master maps: auto.master + Amd still relies and amd.conf. Any feature in auto.master + must be duplicated using Amd equivalent features in amd.conf. + +- /net mount point: + The automounter is suppose to dynamically create map entries + under this mount point corresponding to NFS server(s) exported + file systems. While this isn't parser by sun2amd, Amd does support + host maps (type:=host). + +- Federated Naming Service (FNS) (-xfn): + A naming server that wraps a number of other naming service + under one interface. + +- "-null" map option: A way to cancel maps in the auto.master file. + +- nsswitch.conf: + This file provides a way to specify what lookup service to use + for a number of systems including Sun's automounter. In amd + lookup services for map files are define in the amd.conf file. + + +* Setup + +To enable Sun-style maps in Amd, set "sun_map_syntax = yes" in your amd.conf +file. When this flag is set in [global], all maps read by Amd are assumed +to be Sun style maps. You can set this on a per map basis, thus mixing +Sun-style and Amd-style maps. For more information about amd.conf please +see the Amd documentation. + +Example: + +# file: amd.conf +################ +[ global ] +sun_map_syntax = yes + +[ /home ] +map_name = /etc/amd.sun_map +map_type = file + + +* sun2amd command line utility + +In addition to build-in Amd support there also exists the sun2amd command +line utility that converts Sun maps to Amd maps. This can be useful in +migrating one or more Sun maps to the Amd syntax in one step. + +Example usage: + +$ sun2amd -i sun_map -o amd_map + +This line tells sun2amd to read the file sun_map and redirect its output to +a file called amd_map. By default sun2amd reads from stdin and writes to +stdout (i.e., traditional Unix filter). + + +* FAQ + +Q1: I know "/net" is not supported, but how can I achieve the same + functionality with Amd? + +A1: In short, you must create the '/net' entry as a Amd entry of type host + by hand. Below is an example of how to do this. See the Amd + documentation on type autofs for more information. + +Example: + +# file: amd.conf +################ +[ /net ] +map_name = /etc/amd.net + +# file: /etc/amd.net +############### +/defaults fs:=${autodir}/${rhost}/root/${rfs} +* rhost:=${key};type:=host;rfs:=/ + +(more FAQ entries to come...) diff --git a/README.y2k b/README.y2k index e75bd122590..b0b887c500a 100644 --- a/README.y2k +++ b/README.y2k @@ -8,10 +8,10 @@ all, because it does not do anything with dates other than print the date on the log file, in whatever format is provided by your os/libc --- especially the ctime(3) call. -However, on Friday, September 18th 1998, Matthew Crosby +However, on Friday, September 18th 1998, Matthew Crosby reported that they evaluated 6.0a16 and found it to be compliant. -On March 26, 1999, Paul Balyoz submitted a +On March 26, 1999, Paul Balyoz submitted a patch to lostaltmail which makes it print Y2K compliant dates. He used a code scanner and manually "eyeballed" the code and could not find any more problems. Paul's patch is included in am-utils-6.0.1s7 and newer versions. @@ -23,5 +23,4 @@ CERTIFY AM-UTILS AS Y2K COMPLIANT. USE AT YOUR OWN RISK. --- Erez Zadok. Maintainer, am-utils package and am-utils list. -Email: am-utils@am-utils.org WWW: http://www.am-utils.org diff --git a/TODO b/TODO deleted file mode 100644 index 07fb5559678..00000000000 --- a/TODO +++ /dev/null @@ -1,177 +0,0 @@ -# -*- text -*- - -Make a tasks file that people can pick jobs off of. - -take a look at am_compat.h and fix everything there... - -fix all $Id bla bla bla $ on every file. -add my own copyright 1997 etc. - -NOT NEEDED: convert DEBUG symbol to ENABLE_DEBUG -NOT NEEDED: convert DEBUG_MEM symbol to ENABLE_DEBUG_MEM - -Use these two somewhere: -AC_DEFINE(AM_UTILS_NAME_PACKAGE, "am-utils") -AC_DEFINE(AM_UTILS_VERSION, "6.0a1) - -check all "dnl XXX: in configure.in - -check for: INLINE, Const->const, P_void, VOIDP - -rename DEBUG_MTAB to DEBUG_MNTTAB -rename UPDATE_MTAB to MOUNT_TABLE_ON_FILE -rename HAS_NIS_MAPS to HAVE_MAP_NIS -rename HAS_TFS to HAVE_FS_TFS -rename SIG_HNDL_TYP to RETSIGTYPE - -remove HOST_EXEC #define from everywhere. add to am_ops.c a static flag -initialized_vops, which if not true, should set the host_ops vector field to -0 or host_umounted. This way let the feature be turned on if -h option to -amd is given. - -nuke all code that is ifdef'd SUNOS4_COMPAT - -rename NEED_MNTOPT_PARSER to HAVE_HASMNTOPT and cleanup the code. also take -the supplied code in amd/mount_fs.c and include it as the library function -libamd/hasmntopt.c - -TLI code needs to be fixed. - -a way to include a site-specific configuration file IFF it exists from -directory local/<${target}.h> - -replace #include WAIT with nothing (HAVE_SYS_WAIT_H?) - -replace SYS5_SIGNALS with HAVE_SYS_WAIT_H (which is on only if it sys/wait.h -exists and is using the newer "int" for type, not "union wait". The macro -AC_HEADER_SYS_WAIT turns on HAVE_SYS_WAIT_H iff wait*() functions are -posix.1 compliant. Make sure you don't remove SYS5_SIGNALS ifdef's that are -not related to wait*() syscalls. - -add username, hostname, and date at which time amd was compiled. - -No more need for MOUNT_HELPER_SOURCE. - -any code which is included by NEED_UMOUNT_FS, should be on iff -MOUNT_TABLE_ON_FILE is on. - -replace NFS_FH_FIELD with references fo ".fh" in calls to -NFS_FH_DREF(src, dst) macro - -For *EVERY* M4 Macro with case/esac, check that the $host_os case entries -are correct. - -I'm not using amd's regexp code. Instead, use generic system code. If the -system has posix style regexp functions, then change amd/map.c to use -correct new prototype. - -use HAVE_SVC_GETREQSET instead of RPC_4. - -replace all "jsp" in *.[hc] $Id: TODO,v 1.1.1.1 1998/11/05 02:04:19 ezk Exp $ with ezk. - -use MNTTAB_FILE_NAME instead of MOUNTED - -use MOUNT_TABLE_ON_FILE instead of READ_MTAB_FROM_FILE - -no more HAS_EMPTY_AUTOMOUNTS, which was used if a df(1) divide by zero bug -was invoked. Instead, change nfs_statfs() code to always return non-zero -values. Then nuke HAS_EMPTY_AUTOMOUNTS. - -REGEXP: use whatever regular expressionlibrary you have on the system, -including regexp.h if available, and using regcomp/regexec. Amd was written -with BSD regexps in mind, not Sys V, so if I use any of those, I have to -watch for correct usage. Otherwise, I can include the older include/re.h -and amd/re.c. Replace HAS_REGEXP with HAVE_REGEXEC. - -The regex code in amd/mapc.c has changed a lot. It probably has bugs. Must -test and debug it!!! - -# string name of filesystem in /etc/mnttab file -Use MNTTAB_TYPE_FOO instead of MTAB_TYPE_FOO. -# string name of mount option in /etc/mnttab file -Use MNTTAB_OPT_FOO instead of MNTOPT_FOO. -# string (or integer?) name of filesystem type in mount(2) syscall -Use MOUNT_TYPE_FOO instead of MNTTYPE_FOO or MOUNT_FOO. -# hex/number of FS mount option in nfs_args passed to mount(2) syscall -Use MNT2_NFS_OPT_FOO instead NFSMNT_FOO. -# hex/number of generic FS mount option directly passed to mount(2) syscall -Use MNT2_GEN_OPT_FOO instead of MS_FOO or M_FOO. - - -update AMD_COMPAT to 6.0 in include/am_utils.h - -convert all mem* functions b* functions (memset to bzero, etc.) or vice -verse. - -put my name/copyright on every src file - -change all struct mnttab/mntent to "mntent_t" - -cleanup lib/resvport.c (TLI vs. Sockets). TLI code is #defin'ed -HAVE_T_OPEN. -[ -setting MTAB_LOCK_FILE (mtab_svr4.c) should be an amd run-time configuration -option. - -change all UMOUNT_FS macros to umount_fs() fxn calls. - -remove getnetbyaddr() from lib/getnetbyaddr.c and then link w/ -lsocket - -take care of various (hlfsd et al) scripts in Makefile.am files. - -rename HOSTNAMESZ to MAXHOSTNAMELEN - -turn on all the NEW_TOPLVL_READDIR code (for "ls" to work in an amd point) - -change all NEW_DEFAULTS to ENABLE_DEFAULT_SELECTOTS (which is now on by -default) - -remove refereces to mnt_freq and mnt_passno in mntent_t since it's not in -use any more. - -remove all the (lint?) comments /*ARGSUSED */ - -change HAS_FOOFS to HAVE_AM_FS_FOO (for example HAS_NFSX -> HAVE_AM_FS_FOO), -but change HAS_UNION_FS to HAVE_AM_FS_UNION. - -some code uses #ifdef M_NEWTYPE to tell if mount(2)'s type field is "char *" -or int. Use MTYPE_TYPE declaration instead (not ifdef macro!) - -change DEBUG_MTAB to DEBUG_MNTTAB - -deal with the changes in values of $os, $arch, and $osver! - -replace SYS5_SIGNALS with REINSTATE_SIGNAL_HANDLER - -figure out how to auto-conf HAS_HESIOD_RELOAD (amd/info_hesiod.c). For now -I've used the macro HAVE_HS_ZONE_TRANSFER. - - - - -****************************************************************************** -PERL SCRIPT TO FIX OLD AMD MAPS: -- fix '=' to ':=' -- fix sos5 -> solaris2, etc. - -****************************************************************************** -USE AS IS: - -- SVC_IN_ARG_TYPE (change from SVC_IN_ARGS_TYPE, with an 'S') -- NFS_FH_TYPE -- MTYPE_TYPE -- MOUNT_TYPE_* NO!!! - -****************************************************************************** -NEW FEATURES: - -- autofs -- cachefs -- dbm/gdbm/db file maps -- add amd option -O (override) to override $os, $osver, $arch, $karch, etc. - -****************************************************************************** -DONE: - -HAS_TFS is gone and all of it's code too. -major code cleanup, removed if 0 code and if notdef diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 00000000000..0ad20600e23 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,14271 @@ +dnl aclocal.m4 file for am-utils-6.x +dnl Contains definitions for specialized GNU-autoconf macros. +dnl Author: Erez Zadok +dnl +dnl DO NOT EDIT DIRECTLY! Generated automatically by maintainers from +dnl m4/GNUmakefile! +dnl +dnl ###################################################################### +dnl UNCOMMENT THE NEXT FEW LINES FOR DEBUGGING CONFIGURE +dnl define([AC_CACHE_LOAD], )dnl +dnl define([AC_CACHE_SAVE], )dnl +dnl ====================================================================== + + + +dnl ###################################################################### +dnl check if compiler can handle "void *" +AC_DEFUN([AMU_C_VOID_P], +[ +AC_CACHE_CHECK(if compiler can handle void *, +ac_cv_c_void_p, +[ +# try to compile a program which uses void * +AC_TRY_COMPILE( +[ ], +[ +void *vp; +], ac_cv_c_void_p=yes, ac_cv_c_void_p=no) +]) +if test "$ac_cv_c_void_p" = yes +then + AC_DEFINE(voidp, void *) +else + AC_DEFINE(voidp, char *) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl New versions of the cache functions which also dynamically evaluate the +dnl cache-id field, so that it may contain shell variables to expand +dnl dynamically for the creation of $ac_cv_* variables on the fly. +dnl In addition, this function allows you to call COMMANDS which generate +dnl output on the command line, because it prints its own AC_MSG_CHECKING +dnl after COMMANDS are run. +dnl +dnl ====================================================================== +dnl AMU_CACHE_CHECK_DYNAMIC(MESSAGE, CACHE-ID, COMMANDS) +define(AMU_CACHE_CHECK_DYNAMIC, +[ +ac_tmp=`echo $2` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + AC_MSG_CHECKING([$1]) + echo $ECHO_N "(cached) $ECHO_C" 1>&AS_MESSAGE_FD([]) +dnl XXX: for older autoconf versions +dnl echo $ac_n "(cached) $ac_c" 1>&AS_MESSAGE_FD([]) +else + $3 + AC_MSG_CHECKING([$1]) +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +AC_MSG_RESULT($ac_tmp_val) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check if an automounter filesystem exists (it almost always does). +dnl Usage: AC_CHECK_AMU_FS(, , []) +dnl Print the message in , and declare HAVE_AMU_FS_ true. +dnl If is defined, then define this filesystem as tru only of the +dnl filesystem for is true. +AC_DEFUN([AMU_CHECK_AMU_FS], +[ +# store variable name of fs +ac_upcase_am_fs_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for $2 filesystem ($1), +ac_cv_am_fs_$1, +[ +# true by default +eval "ac_cv_am_fs_$1=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "$3" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_$1=no" + if test "`eval echo '$''{ac_cv_fs_'$3'}'`" = yes + then + eval "ac_cv_am_fs_$1=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_'$3'}'`" = yes + then + eval "ac_cv_am_fs_$1=yes" + fi +fi +]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'$1'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the autofs flavor +AC_DEFUN([AMU_CHECK_AUTOFS_STYLE], +[ +AC_CACHE_CHECK(autofs style, +ac_cv_autofs_style, +[ +# select the correct style to mount(2) a filesystem +case "${host_os}" in + solaris1* | solaris2.[[0-4]] ) + ac_cv_autofs_style=default ;; + solaris2.5* ) + ac_cv_autofs_style=solaris_v1 ;; + # Solaris 8+ uses the AutoFS V3/V4 protocols, but they are very similar + # to V2, so use one style for all. + solaris* ) + ac_cv_autofs_style=solaris_v2_v3 ;; + irix6* ) + ac_cv_autofs_style=solaris_v1 ;; + linux* ) + ac_cv_autofs_style=linux ;; + * ) + ac_cv_autofs_style=default ;; +esac +]) +# always make a link and include the file name, otherwise on systems where +# autofs support has not been ported yet check_fs_{headers, mntent}.m4 add +# ops_autofs.o to AMD_FS_OBJS, but there's no way to build it. +am_utils_link_files=${am_utils_link_files}amd/ops_autofs.c:conf/autofs/autofs_${ac_cv_autofs_style}.c" "amu_autofs_prot.h:conf/autofs/autofs_${ac_cv_autofs_style}.h" " + +# set headers in a macro for Makefile.am files to use (for dependencies) +AMU_AUTOFS_PROT_HEADER='${top_builddir}/'amu_autofs_prot.h +AC_SUBST(AMU_AUTOFS_PROT_HEADER) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check style of fixmount check_mount() function +AC_DEFUN([AMU_CHECK_CHECKMOUNT_STYLE], +[ +AC_CACHE_CHECK(style of fixmount check_mount(), +ac_cv_style_checkmount, +[ +# select the correct style for unmounting filesystems +case "${host_os_name}" in + svr4* | sysv4* | solaris2* | sunos5* ) + ac_cv_style_checkmount=svr4 ;; + bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_style_checkmount=bsd44 ;; + aix* ) + ac_cv_style_checkmount=aix ;; + osf* ) + ac_cv_style_checkmount=osf ;; + ultrix* ) + ac_cv_style_checkmount=ultrix ;; + * ) + ac_cv_style_checkmount=default ;; +esac +]) +am_utils_checkmount_style_file="check_mount.c" +am_utils_link_files=${am_utils_link_files}fixmount/${am_utils_checkmount_style_file}:conf/checkmount/checkmount_${ac_cv_style_checkmount}.c" " + +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check for external definition for a function (not external variables) +dnl Usage AMU_CHECK_EXTERN(extern) +dnl Checks for external definition for "extern" that is delimited on the +dnl left and the right by a character that is not a valid symbol character. +dnl +dnl Note that $pattern below is very carefully crafted to match any system +dnl external definition, with __P posix prototypes, with or without an extern +dnl word, etc. Think twice before changing this. +AC_DEFUN([AMU_CHECK_EXTERN], +[ +# store variable name for external definition +ac_upcase_extern_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_EXTERN_$ac_upcase_extern_name +# check for cached value and set it if needed +AMU_CACHE_CHECK_DYNAMIC(external function definition for $1, +ac_cv_extern_$1, +[ +# the old pattern assumed that the complete external definition is on one +# line but on some systems it is split over several lines, so only match +# beginning of the extern definition including the opening parenthesis. +#pattern="(extern)?.*[^a-zA-Z0-9_]$1[^a-zA-Z0-9_]?.*\(.*\).*;" +pattern="(extern)?.*[[^a-zA-Z0-9_]]$1[[^a-zA-Z0-9_]]?.*\(" +AC_EGREP_CPP(${pattern}, +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_WAIT_H +# include +#endif /* HAVE_SYS_WAIT_H */ +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#if defined(_AIX) && defined(HAVE_SYS_VMOUNT_H) +# include +#endif /* defined(_AIX) && defined(HAVE_SYS_VMOUNT_H) */ + +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_STDLIB_H +# include +#endif /* HAVE_STDLIB_H */ +#if HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if HAVE_STRING_H +# include +#endif /* HAVE_STRING_H */ +#ifdef HAVE_STRINGS_H +# include +#endif /* HAVE_STRINGS_H */ +#ifdef HAVE_NETDB_H +# include +#endif /* HAVE_NETDB_H */ +#ifdef HAVE_CLUSTER_H +# include +#endif /* HAVE_CLUSTER_H */ +#ifdef HAVE_RPC_RPC_H +/* + * Turn on PORTMAP, so that additional header files would get included + * and the important definition for UDPMSGSIZE is included too. + */ +# ifndef PORTMAP +# define PORTMAP +# endif /* not PORTMAP */ +# include +# ifndef XDRPROC_T_TYPE +typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...)); +# endif /* not XDRPROC_T_TYPE */ +#endif /* HAVE_RPC_RPC_H */ + +#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) +# include +#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */ + +], eval "ac_cv_extern_$1=yes", eval "ac_cv_extern_$1=no") +]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_extern_'$1'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_EXTERN on each argument given +dnl Usage: AMU_CHECK_EXTERNS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_EXTERNS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_EXTERN($ac_tmp_arg) +done +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check for external definition for an LDAP function (not external variables) +dnl Usage AMU_CHECK_EXTERN_LDAP(extern) +dnl Checks for external definition for "extern" that is delimited on the +dnl left and the right by a character that is not a valid symbol character. +dnl +dnl Note that $pattern below is very carefully crafted to match any system +dnl external definition, with __P posix prototypes, with or without an extern +dnl word, etc. Think twice before changing this. +AC_DEFUN([AMU_CHECK_EXTERN_LDAP], +[ +# store variable name for external definition +ac_upcase_extern_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_EXTERN_$ac_upcase_extern_name +# check for cached value and set it if needed +AMU_CACHE_CHECK_DYNAMIC(external function definition for $1, +ac_cv_extern_$1, +[ +# the old pattern assumed that the complete external definition is on one +# line but on some systems it is split over several lines, so only match +# beginning of the extern definition including the opening parenthesis. +#pattern="(extern)?.*[^a-zA-Z0-9_]$1[^a-zA-Z0-9_]?.*\(.*\).*;" +dnl This expression is a bit different than check_extern.m4 because of the +dnl way that openldap wrote their externs in . +pattern="(extern)?.*([[^a-zA-Z0-9_]])?$1[[^a-zA-Z0-9_]]?.*\(" +AC_EGREP_CPP(${pattern}, +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_WAIT_H +# include +#endif /* HAVE_SYS_WAIT_H */ +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_STDLIB_H +# include +#endif /* HAVE_STDLIB_H */ +#if HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if HAVE_STRING_H +# include +#endif /* HAVE_STRING_H */ +#ifdef HAVE_STRINGS_H +# include +#endif /* HAVE_STRINGS_H */ +#ifdef HAVE_NETDB_H +# include +#endif /* HAVE_NETDB_H */ +#ifdef HAVE_CLUSTER_H +# include +#endif /* HAVE_CLUSTER_H */ +#ifdef HAVE_RPC_RPC_H +/* + * Turn on PORTMAP, so that additional header files would get included + * and the important definition for UDPMSGSIZE is included too. + */ +# ifndef PORTMAP +# define PORTMAP +# endif /* not PORTMAP */ +# include +# ifndef XDRPROC_T_TYPE +typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...)); +# endif /* not XDRPROC_T_TYPE */ +#endif /* HAVE_RPC_RPC_H */ + +#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) +# include +#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */ + +#ifdef HAVE_LDAP_H +# include +#endif /* HAVE_LDAP_H */ +#ifdef HAVE_LBER_H +# include +#endif /* HAVE_LBER_H */ + +], eval "ac_cv_extern_$1=yes", eval "ac_cv_extern_$1=no") +]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_extern_'$1'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find if type 'fhandle' exists +AC_DEFUN([AMU_CHECK_FHANDLE], +[ +AC_CACHE_CHECK(if plain fhandle type exists, +ac_cv_have_fhandle, +[ +# try to compile a program which may have a definition for the type +# set to a default value +ac_cv_have_fhandle=no +# look for "struct nfs_fh" +if test "$ac_cv_have_fhandle" = no +then +AC_TRY_COMPILE_NFS( +[ fhandle a; +], ac_cv_have_fhandle=yes, ac_cv_have_fhandle=no) +fi + +]) +if test "$ac_cv_have_fhandle" != no +then + AC_DEFINE(HAVE_FHANDLE) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl FIXED VERSION OF AUTOCONF 2.59 AC_CHECK_MEMBER. g/cc will fail to check +dnl a member if the .member is itself a data structure, because you cannot +dnl compare, in C, a data structure against NULL; you can compare a native +dnl data type (int, char) or a pointer. Solution: do what I did in my +dnl original member checking macro: try to take the address of the member. +dnl You can always take the address of anything. +dnl -Erez Zadok, Feb 19, 2005. +dnl + +# AC_CHECK_MEMBER2(AGGREGATE.MEMBER, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], +# [INCLUDES]) +# --------------------------------------------------------- +# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell +# variables are not a valid argument. +AC_DEFUN([AC_CHECK_MEMBER2], +[AS_LITERAL_IF([$1], [], + [AC_FATAL([$0: requires literal arguments])])dnl +m4_bmatch([$1], [\.], , + [m4_fatal([$0: Did not see any dot in `$1'])])dnl +AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl +dnl Extract the aggregate name, and the member name +AC_CACHE_CHECK([for $1], ac_Member, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], +[dnl AGGREGATE ac_aggr; +static m4_bpatsubst([$1], [\..*]) ac_aggr; +dnl ac_aggr.MEMBER; +if (&(ac_aggr.m4_bpatsubst([$1], [^[^.]*\.]))) +return 0;])], + [AS_VAR_SET(ac_Member, yes)], +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], +[dnl AGGREGATE ac_aggr; +static m4_bpatsubst([$1], [\..*]) ac_aggr; +dnl sizeof ac_aggr.MEMBER; +if (sizeof ac_aggr.m4_bpatsubst([$1], [^[^.]*\.])) +return 0;])], + [AS_VAR_SET(ac_Member, yes)], + [AS_VAR_SET(ac_Member, no)])])]) +AS_IF([test AS_VAR_GET(ac_Member) = yes], [$2], [$3])dnl +AS_VAR_POPDEF([ac_Member])dnl +])# AC_CHECK_MEMBER + + +# AC_CHECK_MEMBERS2([AGGREGATE.MEMBER, ...], +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND] +# [INCLUDES]) +# --------------------------------------------------------- +# The first argument is an m4 list. +AC_DEFUN([AC_CHECK_MEMBERS2], +[m4_foreach([AC_Member], [$1], + [AC_CHECK_MEMBER2(AC_Member, + [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_Member), 1, + [Define to 1 if `]m4_bpatsubst(AC_Member, + [^[^.]*\.])[' is + member of `]m4_bpatsubst(AC_Member, [\..*])['.]) +$2], + [$3], + [$4])])]) + + + +dnl ###################################################################### +dnl find if structure $1 has field field $2 +AC_DEFUN([AMU_CHECK_FIELD], +[ +AC_CHECK_MEMBERS2($1, , ,[ +AMU_MOUNT_HEADERS( +[ +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + +]) +]) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check if a filesystem exists (if any of its header files exist). +dnl Usage: AC_CHECK_FS_HEADERS(..., , []) +dnl Check if any of the headers exist. If any exist, then +dnl define HAVE_FS_. If exits, then define +dnl HAVE_FS_ instead... +AC_DEFUN([AMU_CHECK_FS_HEADERS], +[ +# find what name to give to the fs +if test -n "$3" +then + ac_fs_name=$3 +else + ac_fs_name=$2 +fi +# store variable name of fs +ac_upcase_fs_name=`echo $2 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for $ac_fs_name filesystem in <$1>, +ac_cv_fs_header_$ac_fs_name, +[ +# define to "no" by default +eval "ac_cv_fs_header_$ac_fs_name=no" +# and look to see if it was found +AC_CHECK_HEADERS($1, +[ eval "ac_cv_fs_header_$ac_fs_name=yes" + break +])]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_fs_headers_safe) +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + AC_SUBST(AMD_FS_OBJS) + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check if a filesystem type exists (if its header files exist) +dnl Usage: AC_CHECK_FS_MNTENT(, []) +dnl +dnl Check in some headers for MNTTYPE_ macro. If that exist, +dnl then define HAVE_FS_. If exits, then define +dnl HAVE_FS_ instead... +AC_DEFUN([AMU_CHECK_FS_MNTENT], +[ +# find what name to give to the fs +if test -n "$2" +then + ac_fs_name=$2 + ac_fs_as_name=" (from: $1)" +else + ac_fs_name=$1 + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for $ac_fs_name$ac_fs_as_name mntent definition, +ac_cv_fs_$ac_fs_name, +[ +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in $1 +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[[^a-zA-Z0-9_]]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + AC_TRY_RUN( + [ +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + ], [eval "ac_cv_fs_$ac_fs_name=yes" + break + ] + ) + +done +]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + AC_SUBST(AMD_FS_OBJS) + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Do we have a GNUish getopt +AC_DEFUN([AMU_CHECK_GNU_GETOPT], +[ +AC_CACHE_CHECK([for GNU getopt], ac_cv_sys_gnu_getopt, [ +AC_TRY_RUN([ +#include +#include +int main() +{ + int argc = 3; + char *argv[] = { "actest", "arg", "-x", NULL }; + int c; + FILE* rf; + int isGNU = 0; + + rf = fopen("conftestresult", "w"); + if (rf == NULL) exit(1); + + while ( (c = getopt(argc, argv, "x")) != -1 ) { + switch ( c ) { + case 'x': + isGNU=1; + break; + default: + exit(1); + } + } + fprintf(rf, isGNU ? "yes" : "no"); + exit(0); +} +],[ +ac_cv_sys_gnu_getopt="`cat conftestresult`" +],[ +ac_cv_sys_gnu_getopt="fail" +]) +]) +if test "$ac_cv_sys_gnu_getopt" = "yes" +then + AC_DEFINE(HAVE_GNU_GETOPT) +fi +]) + + +dnl ###################################################################### +dnl Define mount type to hide amd mounts from df(1) +dnl +dnl This has to be determined individually per OS. Depending on whatever +dnl mount options are defined in the system header files such as +dnl MNTTYPE_IGNORE or MNTTYPE_AUTO, or others does not work: some OSs define +dnl some of these then use other stuff; some do not define them at all in +dnl the headers, but still use it; and more. After a long attempt to get +dnl this automatically configured, I came to the conclusion that the semi- +dnl automatic per-host-os determination here is the best. +dnl +AC_DEFUN([AMU_CHECK_HIDE_MOUNT_TYPE], +[ +AC_CACHE_CHECK(for mount type to hide from df, +ac_cv_hide_mount_type, +[ +case "${host_os}" in + irix* | hpux* ) + ac_cv_hide_mount_type="ignore" + ;; + sunos4* ) + ac_cv_hide_mount_type="auto" + ;; + * ) + ac_cv_hide_mount_type="nfs" + ;; +esac +]) +AC_DEFINE_UNQUOTED(HIDE_MOUNT_TYPE, "$ac_cv_hide_mount_type") +]) +dnl ====================================================================== + + +dnl a bug-fixed version of autoconf 2.12. +dnl first try to link library without $5, and only of that failed, +dnl try with $5 if specified. +dnl it adds $5 to $LIBS if it was needed -Erez. +dnl AC_CHECK_LIB2(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, OTHER-LIBRARIES]]]) +AC_DEFUN([AMU_CHECK_LIB2], +[AC_MSG_CHECKING([for $2 in -l$1]) +dnl Use a cache variable name containing both the library and function name, +dnl because the test really is for library $1 defining function $2, not +dnl just for library $1. Separate tests with the same $1 and different $2s +dnl may have different results. +ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, +[ac_save_LIBS="$LIBS" + +# first try with base library, without auxiliary library +LIBS="-l$1 $LIBS" +AC_TRY_LINK(dnl +ifelse([$2], [main], , dnl Avoid conflicting decl of main. +[/* Override any gcc2 internal prototype to avoid an error. */ +] +[/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $2(); +]), + [$2()], + eval "ac_cv_lib_$ac_lib_var=\"$1\"", + eval "ac_cv_lib_$ac_lib_var=no") + +# if OK, set to no auxiliary library, else try auxiliary library +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = no"; then + LIBS="-l$1 $5 $LIBS" + AC_TRY_LINK(dnl + ifelse([$2], [main], , dnl Avoid conflicting decl of main. + [/* Override any gcc2 internal prototype to avoid an error. */ + ] + [/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $2(); + ]), + [$2()], + eval "ac_cv_lib_$ac_lib_var=\"$1 $5\"", + eval "ac_cv_lib_$ac_lib_var=no") +fi + +LIBS="$ac_save_LIBS" +])dnl +ac_tmp="`eval echo '$''{ac_cv_lib_'$ac_lib_var'}'`" +if test "${ac_tmp}" != no; then + AC_MSG_RESULT(-l$ac_tmp) + ifelse([$3], , +[ + ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[[^a-zA-Z0-9_]]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + + AC_DEFINE_UNQUOTED($ac_tr_lib) + LIBS="-l$ac_tmp $LIBS" +], [$3]) +else + AC_MSG_RESULT(no) +ifelse([$4], , , [$4 +])dnl +fi + +]) + + +dnl ###################################################################### +dnl check if libwrap (if exists), requires the caller to define the variables +dnl deny_severity and allow_severity. +AC_DEFUN([AMU_CHECK_LIBWRAP_SEVERITY], +[ +AC_CACHE_CHECK([if libwrap wants caller to define allow_severity and deny_severity], ac_cv_need_libwrap_severity_vars, [ +# save, then reset $LIBS back to original value +SAVEDLIBS="$LIBS" +LIBS="$LIBS -lwrap" +# run program one without defining our own severity variables +AC_TRY_RUN( +[ +int main() +{ + exit(0); +} +],[ac_tmp_val1="yes"],[ac_tmp_val1="no"]) +# run program two with defining our own severity variables +AC_TRY_RUN( +[ +int deny_severity, allow_severity, rfc931_timeout; +int main() +{ + exit(0); +} +],[ac_tmp_val2="yes"],[ac_tmp_val2="no"]) +# restore original value of $LIBS +LIBS="$SAVEDLIBS" +# now decide what to do +if test "$ac_tmp_val1" = "no" && test "$ac_tmp_val2" = "yes" +then + ac_cv_need_libwrap_severity_vars="yes" +else + ac_cv_need_libwrap_severity_vars="no" +fi +]) +if test "$ac_cv_need_libwrap_severity_vars" = "yes" +then + AC_DEFINE(NEED_LIBWRAP_SEVERITY_VARIABLES) +fi +]) + + +dnl ###################################################################### +dnl check if a map exists (if some library function exists). +dnl Usage: AC_CHECK_MAP_FUNCS(..., , []) +dnl Check if any of the functions exist. If any exist, then +dnl define HAVE_MAP_. If exits, then defined +dnl HAVE_MAP_ instead... +AC_DEFUN([AMU_CHECK_MAP_FUNCS], +[ +# find what name to give to the map +if test -n "$3" +then + ac_map_name=$3 +else + ac_map_name=$2 +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for $ac_map_name maps, +ac_cv_map_$ac_map_name, +[ +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +AC_CHECK_FUNCS($1, +[ + eval "ac_cv_map_$ac_map_name=yes" + break +])]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + AC_SUBST(AMD_INFO_OBJS) + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find CDFS-specific mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_CDFS_OPT() +dnl Check if there is an entry for MS_ or M_ in sys/mntent.h or +dnl mntent.h, then define MNT2_CDFS_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_CDFS_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_CDFS_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for CDFS-specific mount(2) option $ac_fs_name, +ac_cv_mnt2_cdfs_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=notfound" +value=notfound + +# first, try MS_* (most systems). Must be the first test! +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# if failed, try MNT_* (bsd44 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MNT_$ac_upcase_fs_name) +fi + +# if failed, try MS_* as an integer (linux systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_INT( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# If failed try M_* (must be last test since svr4 systems define M_DATA etc. +# in +# This test was off for now, because of the conflicts with other systems. +# but I turned it back on by faking the inclusion of already. +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ +AMU_MOUNT_HEADERS +, M_$ac_upcase_fs_name) +fi + +# if failed, try ISOFSMNT_* as a hex (bsdi4 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, ISOFSMNT_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_cdfs_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_CDFS_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_CDFS_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_CDFS_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_CDFS_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find generic mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_GEN_OPT() +dnl Check if there is an entry for MS_, MNT_, or M_ +dnl (in that order) in mntent.h, sys/mntent.h, or mount.h... +dnl then define MNT2_GEN_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_GEN_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_GEN_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for generic mount(2) option $ac_fs_name, +ac_cv_mnt2_gen_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_gen_opt_$ac_fs_name=notfound" +value=notfound + +# first, try MS_* (most systems). Must be the first test! +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# if failed, try MNT_* (bsd44 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MNT_$ac_upcase_fs_name) +fi + +# if failed, try MS_* as an integer (linux systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_INT( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# If failed try M_* (must be last test since svr4 systems define M_DATA etc. +# in +# This test was off for now, because of the conflicts with other systems. +# but I turned it back on by faking the inclusion of already. +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ +AMU_MOUNT_HEADERS +, M_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_gen_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_gen_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_GEN_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_GEN_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_GEN_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_GEN_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find NFS-specific mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_NFS_OPT() +dnl Check if there is an entry for NFSMNT_ in sys/mntent.h or +dnl mntent.h, then define MNT2_NFS_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_NFS_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_NFS_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for NFS-specific mount(2) option $ac_fs_name, +ac_cv_mnt2_nfs_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=notfound" +value=notfound + +# first try NFSMNT_* (most systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, NFSMNT_$ac_upcase_fs_name) +fi + +# next try NFS_MOUNT_* (linux) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, NFS_MOUNT_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_nfs_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_NFS_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_NFS_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_NFS_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_NFS_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find PCFS-specific mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_PCFS_OPT() +dnl Check if there is an entry for MS_ or M_ in sys/mntent.h or +dnl mntent.h, then define MNT2_PCFS_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_PCFS_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_PCFS_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for PCFS-specific mount(2) option $ac_fs_name, +ac_cv_mnt2_pcfs_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_pcfs_opt_$ac_fs_name=notfound" +value=notfound + +# first, try MS_* (most systems). Must be the first test! +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# if failed, try MNT_* (bsd44 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MNT_$ac_upcase_fs_name) +fi + +# if failed, try MS_* as an integer (linux systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_INT( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# If failed try M_* (must be last test since svr4 systems define M_DATA etc. +# in +# This test was off for now, because of the conflicts with other systems. +# but I turned it back on by faking the inclusion of already. +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ +AMU_MOUNT_HEADERS +, M_$ac_upcase_fs_name) +fi + +# if failed, try MSDOSFSMNT_* as a hex (bsd44 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MSDOSFSMNT_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_pcfs_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_pcfs_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_PCFS_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_PCFS_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_PCFS_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_PCFS_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find UDF-specific mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_UDF_OPT() +dnl Check if there is an entry for MS_ or M_ in sys/mntent.h or +dnl mntent.h, then define MNT2_UDF_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_UDF_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_UDF_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for UDF-specific mount(2) option $ac_fs_name, +ac_cv_mnt2_udf_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_udf_opt_$ac_fs_name=notfound" +value=notfound + +# XXX - tests for other systems need to be added here! + +# if failed, try UDFMNT_* as a hex (netbsd systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, UDFMNT_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_udf_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_udf_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_UDF_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_UDF_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_UDF_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_UDF_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find name of mount table file, and define it as MNTTAB_FILE_NAME +dnl +dnl Solaris defines MNTTAB as /etc/mnttab, the file where /sbin/mount +dnl stores its cache of mounted filesystems. But under SunOS, the same +dnl macro MNTTAB, is defined as the _source_ of filesystems to mount, and +dnl is set to /etc/fstab. That is why I have to first check out +dnl if MOUNTED exists, and if not, check for the MNTTAB macro. +dnl +AC_DEFUN([AMU_CHECK_MNTTAB_FILE_NAME], +[ +AC_CACHE_CHECK(for name of mount table file name, +ac_cv_mnttab_file_name, +[ +# expand cpp value for MNTTAB +AMU_EXPAND_CPP_STRING( +AMU_MOUNT_HEADERS( +[ +/* see M4 comment at the top of the definition of this macro */ +#ifdef MOUNTED +# define _MNTTAB_FILE_NAME MOUNTED +# else /* not MOUNTED */ +# ifdef MNTTAB +# define _MNTTAB_FILE_NAME MNTTAB +# endif /* MNTTAB */ +#endif /* not MOUNTED */ +]), +_MNTTAB_FILE_NAME, +[ ac_cv_mnttab_file_name=$value +], +[ +ac_cv_mnttab_file_name=notfound +# check explicitly for /etc/mnttab +if test "$ac_cv_mnttab_file_name" = notfound +then + if test -f /etc/mnttab + then + ac_cv_mnttab_file_name="/etc/mnttab" + fi +fi +# check explicitly for /etc/mtab +if test "$ac_cv_mnttab_file_name" = notfound +then + if test -f /etc/mtab + then + ac_cv_mnttab_file_name="/etc/mtab" + fi +fi +]) +]) +# test value and create macro as needed +if test "$ac_cv_mnttab_file_name" != notfound +then + AC_DEFINE_UNQUOTED(MNTTAB_FILE_NAME, "$ac_cv_mnttab_file_name") +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check if the mount table is kept in a file or in the kernel. +AC_DEFUN([AMU_CHECK_MNTTAB_LOCATION], +[ +AMU_CACHE_CHECK_DYNAMIC(where mount table is kept, +ac_cv_mnttab_location, +[ +# assume location is on file +ac_cv_mnttab_location=file +AC_CHECK_FUNCS(mntctl getmntinfo getmountent, +ac_cv_mnttab_location=kernel) +# Solaris 8 Beta Refresh and up use the mntfs pseudo filesystem to store the +# mount table in kernel (cf. mnttab(4): the MS_NOMNTTAB option in +# inhibits that a mount shows up there and thus can be used to +# check for the in-kernel mount table +if test "$ac_cv_mnt2_gen_opt_nomnttab" != notfound +then + ac_cv_mnttab_location=kernel +fi +]) +if test "$ac_cv_mnttab_location" = file +then + AC_DEFINE(MOUNT_TABLE_ON_FILE) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the string type of the name of a filesystem mount table entry +dnl option. +dnl Usage: AMU_CHECK_MNTTAB_OPT() +dnl Check if there is an entry for MNTOPT_ in sys/mntent.h or mntent.h +dnl define MNTTAB_OPT_ to the string name (e.g., "ro"). +AC_DEFUN([AMU_CHECK_MNTTAB_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for mount table option $ac_fs_name, +ac_cv_mnttab_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnttab_opt_$ac_fs_name=notfound" +# and look to see if it was found +AMU_EXPAND_CPP_STRING( +AMU_MOUNT_HEADERS +, MNTOPT_$ac_upcase_fs_name) +# set cache variable to value +if test "${value}" != notfound +then + eval "ac_cv_mnttab_opt_$ac_fs_name=\\\"$value\\\"" +else + eval "ac_cv_mnttab_opt_$ac_fs_name=$value" +fi +dnl DO NOT CHECK FOR MNT_* b/c bsd44 systems don't use /etc/mnttab, +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnttab_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNTTAB_OPT on each argument given +dnl Usage: AMU_CHECK_MNTTAB_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNTTAB_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNTTAB_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check style of accessing the mount table file +AC_DEFUN([AMU_CHECK_MNTTAB_STYLE], +[ +AC_CACHE_CHECK(mount table style, +ac_cv_style_mnttab, +[ +# select the correct style for mount table manipulation functions +case "${host_os_name}" in + aix* ) + ac_cv_style_mnttab=aix ;; + bsd* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_style_mnttab=bsd ;; + isc3* ) + ac_cv_style_mnttab=isc3 ;; + mach3* ) + ac_cv_style_mnttab=mach3 ;; + osf* ) + ac_cv_style_mnttab=osf ;; + svr4* | sysv4* | solaris2* | sunos5* | aoi* ) + ac_cv_style_mnttab=svr4 ;; + ultrix* ) + ac_cv_style_mnttab=ultrix ;; + linux*) + ac_cv_style_mnttab=linux ;; + * ) + ac_cv_style_mnttab=file ;; +esac +]) +am_utils_link_files=${am_utils_link_files}libamu/mtabutil.c:conf/mtab/mtab_${ac_cv_style_mnttab}.c" " + +# append mtab utilities object to LIBOBJS for automatic compilation +AC_LIBOBJ(mtabutil) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the string type of the name of a filesystem mount table entry. +dnl Usage: AC_CHECK_MNTTAB_TYPE(, [fssymbol]) +dnl Check if there is an entry for MNTTYPE_ in sys/mntent.h and mntent.h +dnl define MNTTAB_TYPE_ to the string name (e.g., "nfs"). If +dnl exist, then define MNTTAB_TYPE_ instead. If is +dnl defined, then can be a list of fs strings to look for. +dnl If no symbols have been defined, but the filesystem has been found +dnl earlier, then set the mount-table type to "" anyway... +AC_DEFUN([AMU_CHECK_MNTTAB_TYPE], +[ +# find what name to give to the fs +if test -n "$2" +then + ac_fs_name=$2 +else + ac_fs_name=$1 +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for mnttab name for $ac_fs_name filesystem, +ac_cv_mnttab_type_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in $1 +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + ]), + [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + ]) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[[^a-zA-Z0-9_]]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + AMU_EXPAND_RUN_STRING( + AMU_MOUNT_HEADERS( + [ +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + ]), + [ + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + ], [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + ]) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + AC_TRY_RUN( + [ +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + ], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + ] + ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + AMU_EXPAND_RUN_STRING( + AMU_MOUNT_HEADERS( + [ + ]), + [ + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + ], [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + ]) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi +]) +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check style of mounting filesystems +AC_DEFUN([AMU_CHECK_MOUNT_STYLE], +[ +AC_CACHE_CHECK(style of mounting filesystems, +ac_cv_style_mount, +[ +# select the correct style for mounting filesystems +case "${host_os_name}" in + solaris1* | sunos[[34]]* | bsdi[[12]]* ) + ac_cv_style_mount=default ;; + hpux[[6-9]]* | hpux10* ) + ac_cv_style_mount=hpux ;; + svr4* | sysv4* | solaris* | sunos* | aoi* | hpux* ) + ac_cv_style_mount=svr4 ;; + bsdi* ) + ac_cv_style_mount=bsdi3 ;; + aix3* | aix4* ) + ac_cv_style_mount=aix3 ;; + aix* ) + ac_cv_style_mount=aix ;; + irix5* ) + ac_cv_style_mount=irix5 ;; + irix* ) + ac_cv_style_mount=irix6 ;; + isc3* ) + ac_cv_style_mount=isc3 ;; + linux* ) + ac_cv_style_mount=linux ;; + mach3* ) + ac_cv_style_mount=mach3 ;; + stellix* ) + ac_cv_style_mount=stellix ;; + * ) # no style needed. Use default filesystem calls ala BSD + ac_cv_style_mount=default ;; +esac +]) +am_utils_mount_style_file="mountutil.c" +am_utils_link_files=${am_utils_link_files}libamu/${am_utils_mount_style_file}:conf/mount/mount_${ac_cv_style_mount}.c" " + +# append mount utilities object to LIBOBJS for automatic compilation +AC_LIBOBJ(mountutil) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the mount system call trap needed to mount(2) a filesystem +AC_DEFUN([AMU_CHECK_MOUNT_TRAP], +[ +AC_CACHE_CHECK(mount trap system-call style, +ac_cv_mount_trap, +[ +# select the correct style to mount(2) a filesystem +case "${host_os_name}" in + solaris1* | sunos[[34]]* ) + ac_cv_mount_trap=default ;; + hpux[[6-9]]* | hpux10* ) + ac_cv_mount_trap=hpux ;; + svr4* | sysv4* | solaris* | sunos* | aoi* | hpux* ) + ac_cv_mount_trap=svr4 ;; + news4* | riscix* ) + ac_cv_mount_trap=news4 ;; + linux* ) + ac_cv_mount_trap=linux ;; + irix* ) + ac_cv_mount_trap=irix ;; + aux* ) + ac_cv_mount_trap=aux ;; + hcx* ) + ac_cv_mount_trap=hcx ;; + rtu6* ) + ac_cv_mount_trap=rtu6 ;; + dgux* ) + ac_cv_mount_trap=dgux ;; + aix* ) + ac_cv_mount_trap=aix3 ;; + mach2* | mach3* ) + ac_cv_mount_trap=mach3 ;; + ultrix* ) + ac_cv_mount_trap=ultrix ;; + isc3* ) + ac_cv_mount_trap=isc3 ;; + stellix* ) + ac_cv_mount_trap=stellix ;; + netbsd* ) + ac_cv_mount_trap=netbsd ;; + * ) + ac_cv_mount_trap=default ;; +esac +]) +am_utils_mount_trap=$srcdir"/conf/trap/trap_"$ac_cv_mount_trap".h" +AC_SUBST_FILE(am_utils_mount_trap) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the string type of the name of a filesystem mount table entry. +dnl Usage: AC_CHECK_MOUNT_TYPE(, [fssymbol]) +dnl Check if there is an entry for MNTTYPE_ in sys/mntent.h and mntent.h +dnl define MOUNT_TYPE_ to the string name (e.g., "nfs"). If +dnl exist, then define MOUNT_TYPE_ instead. If is +dnl defined, then can be a list of fs strings to look for. +dnl If no symbols have been defined, but the filesystem has been found +dnl earlier, then set the mount-table type to "" anyway... +AC_DEFUN([AMU_CHECK_MOUNT_TYPE], +[ +# find what name to give to the fs +if test -n "$2" +then + ac_fs_name=$2 +else + ac_fs_name=$1 +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for mount(2) type/name for $ac_fs_name filesystem, +ac_cv_mount_type_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in $1 +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol"], + [eval "ac_cv_mount_type_$ac_fs_name=notfound"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol"], + [eval "ac_cv_mount_type_$ac_fs_name=notfound"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol"], + [eval "ac_cv_mount_type_$ac_fs_name=notfound"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol"], + [eval "ac_cv_mount_type_$ac_fs_name=notfound"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[[^a-zA-Z0-9_]]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + AC_TRY_RUN( + [ +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + ], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + ] + ) + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi +]) +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the correct printf-style type for the mount type in the mount() +dnl system call. +dnl If you change this one, you must also fix the check_mtype_type.m4. +AC_DEFUN([AMU_CHECK_MTYPE_PRINTF_TYPE], +[ +AC_CACHE_CHECK(printf string to print type field of mount() call, +ac_cv_mtype_printf_type, +[ +# select the correct printf type +case "${host_os_name}" in + osf* | freebsd2* | bsdi2* | aix* | ultrix* ) + ac_cv_mtype_printf_type="%d" ;; + irix3 | isc3 ) + ac_cv_mtype_printf_type="0x%x" ;; + * ) + ac_cv_mtype_printf_type="%s" ;; +esac +]) +AC_DEFINE_UNQUOTED(MTYPE_PRINTF_TYPE, "$ac_cv_mtype_printf_type") +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the correct type for the mount type in the mount() system call +dnl If you change this one, you must also fix the check_mtype_printf_type.m4. +AC_DEFUN([AMU_CHECK_MTYPE_TYPE], +[ +AC_CACHE_CHECK(type of mount type field in mount() call, +ac_cv_mtype_type, +[ +# select the correct type +case "${host_os_name}" in + osf* | freebsd2* | bsdi2* | aix* | ultrix* ) + ac_cv_mtype_type=int ;; + * ) + ac_cv_mtype_type="char *" ;; +esac +]) +AC_DEFINE_UNQUOTED(MTYPE_TYPE, $ac_cv_mtype_type) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the correct network transport type to use +AC_DEFUN([AMU_CHECK_NETWORK_TRANSPORT_TYPE], +[ +AC_CACHE_CHECK(network transport type, +ac_cv_transport_type, +[ +# select the correct type +case "${host_os_name}" in + solaris1* | sunos[[34]]* | hpux[[6-9]]* | hpux10* ) + ac_cv_transport_type=sockets ;; + solaris* | sunos* | hpux* ) + ac_cv_transport_type=tli ;; + * ) + ac_cv_transport_type=sockets ;; +esac +]) +am_utils_link_files=${am_utils_link_files}libamu/transputil.c:conf/transp/transp_${ac_cv_transport_type}.c" " + +# append transport utilities object to LIBOBJS for automatic compilation +AC_LIBOBJ(transputil) +if test $ac_cv_transport_type = tli +then + AC_DEFINE(HAVE_TRANSPORT_TYPE_TLI) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the correct way to dereference the address part of the nfs fhandle +AC_DEFUN([AMU_CHECK_NFS_FH_DREF], +[ +AC_CACHE_CHECK(nfs file-handle address dereferencing style, +ac_cv_nfs_fh_dref_style, +[ +# select the correct nfs address dereferencing style +case "${host_os}" in + hpux[[6-9]]* | hpux10* ) + ac_cv_nfs_fh_dref_style=hpux ;; + sunos3* ) + ac_cv_nfs_fh_dref_style=sunos3 ;; + sunos4* | solaris1* ) + ac_cv_nfs_fh_dref_style=sunos4 ;; + svr4* | sysv4* | solaris* | sunos* | hpux* ) + ac_cv_nfs_fh_dref_style=svr4 ;; + bsd44* | bsdi2* | freebsd2.[[01]]* ) + ac_cv_nfs_fh_dref_style=bsd44 ;; + # all new BSDs changed the type of the + # filehandle in nfs_args from nfsv2fh_t to u_char. + freebsd* | freebsdelf* | bsdi* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_nfs_fh_dref_style=freebsd22 ;; + aix[[1-3]]* | aix4.[[01]]* ) + ac_cv_nfs_fh_dref_style=aix3 ;; + aix* ) + ac_cv_nfs_fh_dref_style=aix42 ;; + irix* ) + ac_cv_nfs_fh_dref_style=irix ;; + linux* ) + ac_cv_nfs_fh_dref_style=linux ;; + isc3 ) + ac_cv_nfs_fh_dref_style=isc3 ;; + osf[[1-3]]* ) + ac_cv_nfs_fh_dref_style=osf2 ;; + osf* ) + ac_cv_nfs_fh_dref_style=osf4 ;; + nextstep* ) + ac_cv_nfs_fh_dref_style=nextstep ;; + * ) + ac_cv_nfs_fh_dref_style=default ;; +esac +]) +am_utils_nfs_fh_dref=$srcdir"/conf/fh_dref/fh_dref_"$ac_cv_nfs_fh_dref_style".h" +AC_SUBST_FILE(am_utils_nfs_fh_dref) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the correct way to dereference the hostname part of the nfs fhandle +AC_DEFUN([AMU_CHECK_NFS_HN_DREF], +[ +AC_CACHE_CHECK(nfs hostname dereferencing style, +ac_cv_nfs_hn_dref_style, +[ +# select the correct nfs address dereferencing style +case "${host_os_name}" in + linux* ) + ac_cv_nfs_hn_dref_style=linux ;; + isc3 ) + ac_cv_nfs_hn_dref_style=isc3 ;; + * ) + ac_cv_nfs_hn_dref_style=default ;; +esac +]) +am_utils_nfs_hn_dref=$srcdir"/conf/hn_dref/hn_dref_"$ac_cv_nfs_hn_dref_style".h" +AC_SUBST_FILE(am_utils_nfs_hn_dref) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check if system has NFS protocol headers +AC_DEFUN([AMU_CHECK_NFS_PROT_HEADERS], +[ +AC_CACHE_CHECK(location of NFS protocol header files, +ac_cv_nfs_prot_headers, +[ +# select the correct style for mounting filesystems +case "${host_os}" in + irix5* ) + ac_cv_nfs_prot_headers=irix5 ;; + irix* ) + ac_cv_nfs_prot_headers=irix6 ;; + sunos3* ) + ac_cv_nfs_prot_headers=sunos3 ;; + sunos4* | solaris1* ) + ac_cv_nfs_prot_headers=sunos4 ;; + sunos5.[[0-3]] | solaris2.[[0-3]] ) + ac_cv_nfs_prot_headers=sunos5_3 ;; + sunos5.4* | solaris2.4* ) + ac_cv_nfs_prot_headers=sunos5_4 ;; + sunos5.5* | solaris2.5* ) + ac_cv_nfs_prot_headers=sunos5_5 ;; + sunos5.6* | solaris2.6* ) + ac_cv_nfs_prot_headers=sunos5_6 ;; + sunos5.7* | solaris2.7* ) + ac_cv_nfs_prot_headers=sunos5_7 ;; + sunos5* | solaris2* ) + ac_cv_nfs_prot_headers=sunos5_8 ;; + bsdi2*) + ac_cv_nfs_prot_headers=bsdi2 ;; + bsdi* ) + ac_cv_nfs_prot_headers=bsdi3 ;; + freebsd2* ) + ac_cv_nfs_prot_headers=freebsd2 ;; + freebsd* | freebsdelf* ) + ac_cv_nfs_prot_headers=freebsd3 ;; + netbsd1.[[0-2]]* ) + ac_cv_nfs_prot_headers=netbsd ;; + netbsd1.3* ) + ac_cv_nfs_prot_headers=netbsd1_3 ;; + netbsd* | netbsdelf* ) + ac_cv_nfs_prot_headers=netbsd1_4 ;; + openbsd* ) + ac_cv_nfs_prot_headers=openbsd ;; + hpux[[6-9]]* | hpux10* ) + ac_cv_nfs_prot_headers=hpux ;; + hpux* ) + ac_cv_nfs_prot_headers=hpux11 ;; + aix[[1-3]]* ) + ac_cv_nfs_prot_headers=aix3 ;; + aix4.[[01]]* ) + ac_cv_nfs_prot_headers=aix4 ;; + aix4.2* ) + ac_cv_nfs_prot_headers=aix4_2 ;; + aix4.3* ) + ac_cv_nfs_prot_headers=aix4_3 ;; + aix5.1* ) + ac_cv_nfs_prot_headers=aix5_1 ;; + aix* ) + ac_cv_nfs_prot_headers=aix5_2 ;; + osf[[1-3]]* ) + ac_cv_nfs_prot_headers=osf2 ;; + osf4* ) + ac_cv_nfs_prot_headers=osf4 ;; + osf* ) + ac_cv_nfs_prot_headers=osf5 ;; + svr4* ) + ac_cv_nfs_prot_headers=svr4 ;; + sysv4* ) # this is for NCR2 machines + ac_cv_nfs_prot_headers=ncr2 ;; + linux* ) + ac_cv_nfs_prot_headers=linux ;; + nextstep* ) + ac_cv_nfs_prot_headers=nextstep ;; + ultrix* ) + ac_cv_nfs_prot_headers=ultrix ;; + darwin* | macosx* | rhapsody* ) + ac_cv_nfs_prot_headers=darwin ;; + * ) + ac_cv_nfs_prot_headers=default ;; +esac +]) + +# make sure correct header is linked in top build directory +am_utils_nfs_prot_file="amu_nfs_prot.h" +am_utils_link_files=${am_utils_link_files}${am_utils_nfs_prot_file}:conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h" " + +# define the name of the header to be included for other M4 macros +AC_DEFINE_UNQUOTED(AMU_NFS_PROTOCOL_HEADER, "${srcdir}/conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h") + +# set headers in a macro for Makefile.am files to use (for dependencies) +AMU_NFS_PROT_HEADER='${top_builddir}/'$am_utils_nfs_prot_file +AC_SUBST(AMU_NFS_PROT_HEADER) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the correct way to dereference the address part of the nfs fhandle +AC_DEFUN([AMU_CHECK_NFS_SA_DREF], +[ +AC_CACHE_CHECK(nfs address dereferencing style, +ac_cv_nfs_sa_dref_style, +[ +# select the correct nfs address dereferencing style +case "${host_os}" in + hpux[[6-9]]* | hpux10* | sunos[[34]]* | solaris1* ) + ac_cv_nfs_sa_dref_style=default ;; + svr4* | sysv4* | solaris* | sunos* | hpux* ) + ac_cv_nfs_sa_dref_style=svr4 ;; + 386bsd* | bsdi1* ) + ac_cv_nfs_sa_dref_style=386bsd ;; + bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_nfs_sa_dref_style=bsd44 ;; + linux* ) + ac_cv_nfs_sa_dref_style=linux ;; + aix* ) + ac_cv_nfs_sa_dref_style=aix3 ;; + aoi* ) + ac_cv_nfs_sa_dref_style=aoi ;; + isc3 ) + ac_cv_nfs_sa_dref_style=isc3 ;; + * ) + ac_cv_nfs_sa_dref_style=default ;; +esac +]) +am_utils_nfs_sa_dref=$srcdir"/conf/sa_dref/sa_dref_"$ac_cv_nfs_sa_dref_style".h" +AC_SUBST_FILE(am_utils_nfs_sa_dref) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check if need to turn on, off, or leave alone the NFS "noconn" option +AC_DEFUN([AMU_CHECK_NFS_SOCKET_CONNECTION], +[ +AC_CACHE_CHECK(if to turn on/off noconn option, +ac_cv_nfs_socket_connection, +[ +# set default to no-change +ac_cv_nfs_socket_connection=none +# select the correct style +case "${host_os}" in + openbsd2.[[01]]* ) + ac_cv_nfs_socket_connection=noconn ;; + openbsd* | freebsd* | freebsdelf* ) + ac_cv_nfs_socket_connection=conn ;; +esac +]) +# set correct value +case "$ac_cv_nfs_socket_connection" in + noconn ) + AC_DEFINE(USE_UNCONNECTED_NFS_SOCKETS) + ;; + conn ) + AC_DEFINE(USE_CONNECTED_NFS_SOCKETS) + ;; +esac +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl set OS libraries specific to an OS: +dnl libnsl/libsocket are needed only on solaris and some svr4 systems. +dnl Using a typical macro has proven unsuccesful, because on some other +dnl systems such as irix, including libnsl and or libsocket actually breaks +dnl lots of code. So I am forced to use a special purpose macro that sets +dnl the libraries based on the OS. Sigh. -Erez. +AC_DEFUN([AMU_CHECK_OS_LIBS], +[ +AC_CACHE_CHECK(for additional OS libraries, +ac_cv_os_libs, +[ +# select the correct set of libraries to link with +case "${host_os_name}" in + svr4* | sysv4* | solaris2* | sunos5* | aoi* ) + ac_cv_os_libs="-lsocket -lnsl" ;; + * ) + ac_cv_os_libs=none ;; +esac +]) +# set list of libraries to link with +if test "$ac_cv_os_libs" != none +then + LIBS="$ac_cv_os_libs $LIBS" +fi + +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check if a system needs to restart its signal handlers +AC_DEFUN([AMU_CHECK_RESTARTABLE_SIGNAL_HANDLER], +[ +AC_CACHE_CHECK(if system needs to restart signal handlers, +ac_cv_restartable_signal_handler, +[ +# select the correct systems to restart signal handlers +case "${host_os_name}" in + svr3* | svr4* | sysv4* | solaris2* | sunos5* | aoi* | irix* ) + ac_cv_restartable_signal_handler=yes ;; + * ) + ac_cv_restartable_signal_handler=no ;; +esac +]) +# define REINSTALL_SIGNAL_HANDLER if need to +if test "$ac_cv_restartable_signal_handler" = yes +then + AC_DEFINE(REINSTALL_SIGNAL_HANDLER) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check style of unmounting filesystems +AC_DEFUN([AMU_CHECK_UMOUNT_STYLE], +[ +AC_CACHE_CHECK(style of unmounting filesystems, +ac_cv_style_umount, +[ +# select the correct style for unmounting filesystems +case "${host_os_name}" in + linux* ) + ac_cv_style_umount=linux ;; + bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_style_umount=bsd44 ;; + osf* ) + ac_cv_style_umount=osf ;; + aix* ) + ac_cv_style_umount=aix ;; + * ) + ac_cv_style_umount=default ;; +esac +]) +am_utils_umount_style_file="umount_fs.c" +am_utils_link_files=${am_utils_link_files}libamu/${am_utils_umount_style_file}:conf/umount/umount_${ac_cv_style_umount}.c" " + +# append un-mount utilities object to LIBOBJS for automatic compilation +AC_LIBOBJ(umount_fs) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the unmount system call arguments needed for +AC_DEFUN([AMU_CHECK_UNMOUNT_ARGS], +[ +AC_CACHE_CHECK(unmount system-call arguments, +ac_cv_unmount_args, +[ +# select the correct style to mount(2) a filesystem +case "${host_os_name}" in + aix* ) + ac_cv_unmount_args="mnt->mnt_passno, 0" ;; + ultrix* ) + ac_cv_unmount_args="mnt->mnt_passno" ;; + * ) + ac_cv_unmount_args="mnt->mnt_dir" ;; +esac +]) +am_utils_unmount_args=$ac_cv_unmount_args +AC_SUBST(am_utils_unmount_args) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check for the correct system call to unmount a filesystem. +AC_DEFUN([AMU_CHECK_UNMOUNT_CALL], +[ +dnl make sure this one is called before [AC_CHECK_UNMOUNT_ARGS] +AC_BEFORE([$0], [AC_CHECK_UNMOUNT_ARGS]) +AC_CACHE_CHECK(the system call to unmount a filesystem, +ac_cv_unmount_call, +[ +# check for various unmount a filesystem calls +if test "$ac_cv_func_uvmount" = yes ; then + ac_cv_unmount_call=uvmount +elif test "$ac_cv_func_unmount" = yes ; then + ac_cv_unmount_call=unmount +elif test "$ac_cv_func_umount" = yes ; then + ac_cv_unmount_call=umount +else + ac_cv_unmount_call=no +fi +]) +if test "$ac_cv_unmount_call" != no +then + am_utils_unmount_call=$ac_cv_unmount_call + AC_SUBST(am_utils_unmount_call) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check if compiler can handle variable-length argument macros +AC_DEFUN([AMU_VARARGS_MACROS], +[ +AC_CACHE_CHECK(if compiler can handle variable-length macros, +ac_cv_varargs_macros, +[ +# try C99 style +AC_TRY_COMPILE( +[ +#define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__) +], +[ +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); +], ac_cv_varargs_macros=c99, +# else try gcc style +AC_TRY_COMPILE( +[ +#define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args) +], +[ +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); +], ac_cv_varargs_macros=gcc, ac_cv_varargs_macros=none)) +]) +if test "$ac_cv_varargs_macros" = c99 +then + AC_DEFINE(HAVE_C99_VARARGS_MACROS, 1, + [System supports C99-style variable-length argument macros]) +else + if test "$ac_cv_varargs_macros" = gcc + then + AC_DEFINE(HAVE_GCC_VARARGS_MACROS, 1, + [System supports GCC-style variable-length argument macros]) + fi +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Expand the value of a CPP macro into a printable hex number. +dnl Takes: header, macro, [action-if-found, [action-if-not-found]] +dnl It runs the header through CPP looking for a match between the macro +dnl and a string pattern, and if sucessful, it prints the string value out. +AC_DEFUN([AMU_EXPAND_CPP_HEX], +[ +# we are looking for a regexp of a string +AC_EGREP_CPP(0x, +[$1] +$2, +value="notfound" +AC_TRY_RUN( +[ +[$1] +main(argc) +int argc; +{ +#ifdef $2 +if (argc > 1) + printf("0x%x", $2); +exit(0); +#else +# error no such option $2 +#endif +exit(1); +}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +, +value="notfound" +) +if test "$value" = notfound +then + : + $4 +else + : + $3 +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Expand the value of a CPP macro into a printable integer number. +dnl Takes: header, macro, [action-if-found, [action-if-not-found]] +dnl It runs the header through CPP looking for a match between the macro +dnl and a string pattern, and if sucessful, it prints the string value out. +AC_DEFUN([AMU_EXPAND_CPP_INT], +[ +# we are looking for a regexp of an integer (must not start with 0 --- those +# are octals). +AC_EGREP_CPP( +[[1-9]][[0-9]]*, +[$1] +$2, +value="notfound" +AC_TRY_RUN( +[ +[$1] +main(argc) +int argc; +{ +#ifdef $2 +if (argc > 1) + printf("%d", $2); +exit(0); +#else +# error no such option $2 +#endif +exit(1); +}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +, +value="notfound" +) +if test "$value" = notfound +then + : + $4 +else + : + $3 +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Expand the value of a CPP macro into a printable string. +dnl Takes: header, macro, [action-if-found, [action-if-not-found]] +dnl It runs the header through CPP looking for a match between the macro +dnl and a string pattern, and if sucessful, it prints the string value out. +AC_DEFUN([AMU_EXPAND_CPP_STRING], +[ +# we are looking for a regexp of a string +AC_EGREP_CPP(\".*\", +[$1] +$2, +value="notfound" +AC_TRY_RUN( +[ +[$1] +main(argc) +int argc; +{ +#ifdef $2 +if (argc > 1) + printf("%s", $2); +exit(0); +#else +# error no such option $2 +#endif +exit(1); +}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +, +value="notfound" +) +if test "$value" = notfound +then + : + $4 +else + : + $3 +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Run a program and print its output as a string +dnl Takes: (header, code-to-run, [action-if-found, [action-if-not-found]]) +AC_DEFUN([AMU_EXPAND_RUN_STRING], +[ +value="notfound" +AC_TRY_RUN( +[ +$1 +main(argc) +int argc; +{ +$2 +exit(0); +}], +[ +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" +], value="notfound", value="notfound") +if test "$value" = notfound +then + : + $4 +else + : + $3 +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl find if "extern char *optarg" exists in headers +AC_DEFUN([AMU_EXTERN_OPTARG], +[ +AC_CACHE_CHECK(if external definition for optarg[] exists, +ac_cv_extern_optarg, +[ +# try to compile program that uses the variable +AC_TRY_COMPILE( +[ +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#ifdef HAVE_STDLIB_H +# include +#endif /* HAVE_STDLIB_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_ERRNO_H +# include +#endif /* HAVE_ERRNO_H */ +], +[ +char *cp = optarg; +], ac_cv_extern_optarg=yes, ac_cv_extern_optarg=no) +]) +if test "$ac_cv_extern_optarg" = yes +then + AC_DEFINE(HAVE_EXTERN_OPTARG) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl find if "extern char *sys_errlist[]" exist in headers +AC_DEFUN([AMU_EXTERN_SYS_ERRLIST], +[ +AC_CACHE_CHECK(if external definition for sys_errlist[] exists, +ac_cv_extern_sys_errlist, +[ +# try to locate pattern in header files +#pattern="(extern)?.*char.*sys_errlist.*\[\]" +pattern="(extern)?.*char.*sys_errlist.*" +AC_EGREP_CPP(${pattern}, +[ +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_ERRNO_H +# include +#endif /* HAVE_ERRNO_H */ +], ac_cv_extern_sys_errlist=yes, ac_cv_extern_sys_errlist=no) +]) +# check if need to define variable +if test "$ac_cv_extern_sys_errlist" = yes +then + AC_DEFINE(HAVE_EXTERN_SYS_ERRLIST) +fi +]) +dnl ====================================================================== + + +fdnl ###################################################################### +dnl find if mntent_t field mnt_time exists and is of type "char *" +AC_DEFUN([AMU_FIELD_MNTENT_T_MNT_TIME_STRING], +[ +AC_CACHE_CHECK(if mntent_t field mnt_time exist as type string, +ac_cv_field_mntent_t_mnt_time_string, +[ +# try to compile a program +AC_TRY_COMPILE( +AMU_MOUNT_HEADERS( +[ +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# else /* not HAVE_STRUCT_MNTTAB */ +# error XXX: could not find definition for struct mntent or struct mnttab! +# endif /* not HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ +]), +[ +mntent_t mtt; +char *cp = "test"; +int i; +mtt.mnt_time = cp; +i = mtt.mnt_time[0]; +], ac_cv_field_mntent_t_mnt_time_string=yes, ac_cv_field_mntent_t_mnt_time_string=no) +]) +if test "$ac_cv_field_mntent_t_mnt_time_string" = yes +then + AC_DEFINE(HAVE_MNTENT_T_MNT_TIME_STRING) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Check if we have as buggy hasmntopt() libc function +AC_DEFUN([AMU_FUNC_BAD_HASMNTOPT], +[ +AC_CACHE_CHECK([for working hasmntopt], ac_cv_func_hasmntopt_working, +[AC_TRY_RUN( +AMU_MOUNT_HEADERS( +[[ +#ifdef HAVE_MNTENT_H +/* some systems need before is included */ +# ifdef HAVE_STDIO_H +# include +# endif /* HAVE_STDIO_H */ +# include +#endif /* HAVE_MNTENT_H */ +#ifdef HAVE_SYS_MNTENT_H +# include +#endif /* HAVE_SYS_MNTENT_H */ +#ifdef HAVE_SYS_MNTTAB_H +# include +#endif /* HAVE_SYS_MNTTAB_H */ +#if defined(HAVE_MNTTAB_H) && !defined(MNTTAB) +# include +#endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +/* map struct mnttab field names to struct mntent field names */ +# define mnt_opts mnt_mntopts +# endif /* not HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +int main() +{ + mntent_t mnt; + char *tmp = NULL; + + /* + * Test if hasmntopt will incorrectly find the string "soft", which + * is part of the large "softlookup" function. + */ + mnt.mnt_opts = "hard,softlookup,ro"; + + if ((tmp = hasmntopt(&mnt, "soft"))) + exit(1); + exit(0); +} +]]), + [ac_cv_func_hasmntopt_working=yes], + [ac_cv_func_hasmntopt_working=no] +)]) +if test $ac_cv_func_hasmntopt_working = no +then + AC_LIBOBJ([hasmntopt]) + AC_DEFINE(HAVE_BAD_HASMNTOPT) +fi +]) + + +dnl My version is similar to the one from Autoconf 2.52, but I also +dnl define HAVE_BAD_MEMCMP so that I can do smarter things to avoid +dnl linkage conflicts with bad memcmp versions that are in libc. +AC_DEFUN([AMU_FUNC_BAD_MEMCMP], +[ +AC_FUNC_MEMCMP +if test "$ac_cv_func_memcmp_working" = no +then +AC_DEFINE(HAVE_BAD_MEMCMP) +fi +]) + + +dnl Check for a yp_all() function that does not leak a file descriptor +dnl to the ypserv process. +AC_DEFUN([AMU_FUNC_BAD_YP_ALL], +[ +AC_CACHE_CHECK(for a file-descriptor leakage clean yp_all, +ac_cv_func_yp_all_clean, +[ +# clean by default +ac_cv_func_yp_all_clean=yes +# select the correct type +case "${host_os_name}" in + irix* ) + ac_cv_func_yp_all_clean=no ;; + linux* ) + # RedHat 5.1 systems with glibc glibc-2.0.7-19 or below + # leak a UDP socket from yp_all() + case "`cat /etc/redhat-release /dev/null 2>/dev/null`" in + *5.1* ) + ac_cv_func_yp_all_clean=no ;; + esac +esac +]) +if test $ac_cv_func_yp_all_clean = no +then + AC_DEFINE(HAVE_BAD_YP_ALL) +fi +]) + + +dnl FILE: m4/macros/header_templates.m4 +dnl defines descriptions for various am-utils specific macros + +AH_TEMPLATE([HAVE_AMU_FS_AUTO], +[Define if have automount filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_DIRECT], +[Define if have direct automount filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_TOPLVL], +[Define if have "top-level" filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_ERROR], +[Define if have error filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_PROGRAM], +[Define if have program filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_LINK], +[Define if have symbolic-link filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_LINKX], +[Define if have symlink with existence check filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_HOST], +[Define if have NFS host-tree filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_NFSL], +[Define if have nfsl (NFS with local link check) filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_NFSX], +[Define if have multi-NFS filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_UNION], +[Define if have union filesystem]) + +AH_TEMPLATE([HAVE_MAP_FILE], +[Define if have file maps (everyone should have it!)]) + +AH_TEMPLATE([HAVE_MAP_NIS], +[Define if have NIS maps]) + +AH_TEMPLATE([HAVE_MAP_NISPLUS], +[Define if have NIS+ maps]) + +AH_TEMPLATE([HAVE_MAP_DBM], +[Define if have DBM maps]) + +AH_TEMPLATE([HAVE_MAP_NDBM], +[Define if have NDBM maps]) + +AH_TEMPLATE([HAVE_MAP_HESIOD], +[Define if have HESIOD maps]) + +AH_TEMPLATE([HAVE_MAP_LDAP], +[Define if have LDAP maps]) + +AH_TEMPLATE([HAVE_MAP_PASSWD], +[Define if have PASSWD maps]) + +AH_TEMPLATE([HAVE_MAP_SUN], +[Define if have Sun-syntax maps]) + +AH_TEMPLATE([HAVE_MAP_UNION], +[Define if have UNION maps]) + +AH_TEMPLATE([HAVE_MAP_EXEC], +[Define if have executable maps]) + +AH_TEMPLATE([HAVE_FS_UFS], +[Define if have UFS filesystem]) + +AH_TEMPLATE([HAVE_FS_FFS], +[Define if have FFS filesystem]) + +AH_TEMPLATE([HAVE_FS_XFS], +[Define if have XFS filesystem (irix)]) + +AH_TEMPLATE([HAVE_FS_EFS], +[Define if have EFS filesystem (irix)]) + +AH_TEMPLATE([HAVE_FS_EXT], +[Define if have EXT{2,3,4} filesystem (linux)]) + +AH_TEMPLATE([HAVE_FS_NFS], +[Define if have NFS filesystem]) + +AH_TEMPLATE([HAVE_FS_NFS3], +[Define if have NFS3 filesystem]) + +AH_TEMPLATE([HAVE_FS_NFS4], +[Define if have NFS4 filesystem]) + +AH_TEMPLATE([HAVE_FS_PCFS], +[Define if have PCFS filesystem]) + +AH_TEMPLATE([HAVE_FS_LOFS], +[Define if have LOFS filesystem]) + +AH_TEMPLATE([HAVE_FS_HSFS], +[Define if have HSFS filesystem]) + +AH_TEMPLATE([HAVE_FS_CDFS], +[Define if have CDFS filesystem]) + +AH_TEMPLATE([HAVE_FS_UDF], +[Define if have UDF filesystem]) + +AH_TEMPLATE([HAVE_FS_LUSTRE], +[Define if have LUSTRE filesystem]) + +AH_TEMPLATE([HAVE_FS_TFS], +[Define if have TFS filesystem]) + +AH_TEMPLATE([HAVE_FS_TMPFS], +[Define if have TMPFS filesystem]) + +AH_TEMPLATE([HAVE_FS_MFS], +[Define if have MFS filesystem]) + +AH_TEMPLATE([HAVE_FS_CFS], +[Define if have CFS (crypto) filesystem]) + +AH_TEMPLATE([HAVE_FS_AUTOFS], +[Define if have AUTOFS filesystem]) + +AH_TEMPLATE([HAVE_FS_CACHEFS], +[Define if have CACHEFS filesystem]) + +AH_TEMPLATE([HAVE_FS_NULLFS], +[Define if have NULLFS (loopback on bsd44) filesystem]) + +AH_TEMPLATE([HAVE_FS_UNIONFS], +[Define if have UNIONFS filesystem]) + +AH_TEMPLATE([HAVE_FS_UMAPFS], +[Define if have UMAPFS (uid/gid mapping) filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_UFS], +[Mount(2) type/name for UFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_FFS], +[Mount(2) type/name for FFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_XFS], +[Mount(2) type/name for XFS filesystem (irix)]) + +AH_TEMPLATE([MOUNT_TYPE_EFS], +[Mount(2) type/name for EFS filesystem (irix)]) + +AH_TEMPLATE([MOUNT_TYPE_EXT2], +[Mount(2) type/name for EXT2 filesystem (linux)]) + +AH_TEMPLATE([MOUNT_TYPE_EXT3], +[Mount(2) type/name for EXT3 filesystem (linux)]) + +AH_TEMPLATE([MOUNT_TYPE_EXT4], +[Mount(2) type/name for EXT4 filesystem (linux)]) + +AH_TEMPLATE([MOUNT_TYPE_NFS], +[Mount(2) type/name for NFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_NFS3], +[Mount(2) type/name for NFS3 filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_NFS4], +[Mount(2) type/name for NFS4 filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_PCFS], +[Mount(2) type/name for PCFS filesystem. XXX: conf/trap/trap_hpux.h may override this definition for HPUX 9.0]) + +AH_TEMPLATE([MOUNT_TYPE_LOFS], +[Mount(2) type/name for LOFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_CDFS], +[Mount(2) type/name for CDFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_UDF], +[Mount(2) type/name for UDF filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_LUSTRE], +[Mount(2) type/name for LUSTRE filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_LUSTRE], +[Mount(2) type/name for LUSTRE filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_TFS], +[Mount(2) type/name for TFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_TMPFS], +[Mount(2) type/name for TMPFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_MFS], +[Mount(2) type/name for MFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_CFS], +[Mount(2) type/name for CFS (crypto) filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_AUTOFS], +[Mount(2) type/name for AUTOFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_CACHEFS], +[Mount(2) type/name for CACHEFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_IGNORE], +[Mount(2) type/name for IGNORE filesystem (not real just ignore for df)]) + +AH_TEMPLATE([MOUNT_TYPE_NULLFS], +[Mount(2) type/name for NULLFS (loopback on bsd44) filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_UNIONFS], +[Mount(2) type/name for UNIONFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_UMAPFS], +[Mount(2) type/name for UMAPFS (uid/gid mapping) filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_UFS], +[Mount-table entry name for UFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_FFS], +[Mount-table entry name for FFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_XFS], +[Mount-table entry name for XFS filesystem (irix)]) + +AH_TEMPLATE([MNTTAB_TYPE_EFS], +[Mount-table entry name for EFS filesystem (irix)]) + +AH_TEMPLATE([MNTTAB_TYPE_EXT2], +[Mount-table entry name for EXT2 filesystem (linux)]) + +AH_TEMPLATE([MNTTAB_TYPE_EXT3], +[Mount-table entry name for EXT3 filesystem (linux)]) + +AH_TEMPLATE([MNTTAB_TYPE_EXT4], +[Mount-table entry name for EXT4 filesystem (linux)]) + +AH_TEMPLATE([MNTTAB_TYPE_NFS], +[Mount-table entry name for NFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_NFS3], +[Mount-table entry name for NFS3 filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_NFS4], +[Mount-table entry name for NFS4 filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_PCFS], +[Mount-table entry name for PCFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_LOFS], +[Mount-table entry name for LOFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_CDFS], +[Mount-table entry name for CDFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_UDF], +[Mount-table entry name for UDF filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_LUSTRE], +[Mount-table entry name for LUSTRE filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_TFS], +[Mount-table entry name for TFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_TMPFS], +[Mount-table entry name for TMPFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_MFS], +[Mount-table entry name for MFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_CFS], +[Mount-table entry name for CFS (crypto) filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_AUTOFS], +[Mount-table entry name for AUTOFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_CACHEFS], +[Mount-table entry name for CACHEFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_NULLFS], +[Mount-table entry name for NULLFS (loopback on bsd44) filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_UNIONFS], +[Mount-table entry name for UNIONFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_UMAPFS], +[Mount-table entry name for UMAPFS (uid/gid mapping) filesystem]) + +AH_TEMPLATE([MNTTAB_FILE_NAME], +[Name of mount table file name]) + +AH_TEMPLATE([HIDE_MOUNT_TYPE], +[Name of mount type to hide amd mount from df(1)]) + +AH_TEMPLATE([MNTTAB_OPT_RO], +[Mount Table option string: Read only]) + +AH_TEMPLATE([MNTTAB_OPT_RW], +[Mount Table option string: Read/write]) + +AH_TEMPLATE([MNTTAB_OPT_RQ], +[Mount Table option string: Read/write with quotas]) + +AH_TEMPLATE([MNTTAB_OPT_QUOTA], +[Mount Table option string: Check quotas]) + +AH_TEMPLATE([MNTTAB_OPT_NOQUOTA], +[Mount Table option string: Don't check quotas]) + +AH_TEMPLATE([MNTTAB_OPT_ONERROR], +[Mount Table option string: action to taken on error]) + +AH_TEMPLATE([MNTTAB_OPT_TOOSOON], +[Mount Table option string: min. time between inconsistencies]) + +AH_TEMPLATE([MNTTAB_OPT_SOFT], +[Mount Table option string: Soft mount]) + +AH_TEMPLATE([MNTTAB_OPT_SPONGY], +[Mount Table option string: spongy mount]) + +AH_TEMPLATE([MNTTAB_OPT_HARD], +[Mount Table option string: Hard mount]) + +AH_TEMPLATE([MNTTAB_OPT_SUID], +[Mount Table option string: Set uid allowed]) + +AH_TEMPLATE([MNTTAB_OPT_NOSUID], +[Mount Table option string: Set uid not allowed]) + +AH_TEMPLATE([MNTTAB_OPT_GRPID], +[Mount Table option string: SysV-compatible gid on create]) + +AH_TEMPLATE([MNTTAB_OPT_REMOUNT], +[Mount Table option string: Change mount options]) + +AH_TEMPLATE([MNTTAB_OPT_NOSUB], +[Mount Table option string: Disallow mounts on subdirs]) + +AH_TEMPLATE([MNTTAB_OPT_MULTI], +[Mount Table option string: Do multi-component lookup]) + +AH_TEMPLATE([MNTTAB_OPT_INTR], +[Mount Table option string: Allow NFS ops to be interrupted]) + +AH_TEMPLATE([MNTTAB_OPT_NOINTR], +[Mount Table option string: Don't allow interrupted ops]) + +AH_TEMPLATE([MNTTAB_OPT_PORT], +[Mount Table option string: NFS server IP port number]) + +AH_TEMPLATE([MNTTAB_OPT_SECURE], +[Mount Table option string: Secure (AUTH_DES) mounting]) + +AH_TEMPLATE([MNTTAB_OPT_KERB], +[Mount Table option string: Secure (AUTH_Kerb) mounting]) + +AH_TEMPLATE([MNTTAB_OPT_RSIZE], +[Mount Table option string: Max NFS read size (bytes)]) + +AH_TEMPLATE([MNTTAB_OPT_WSIZE], +[Mount Table option string: Max NFS write size (bytes)]) + +AH_TEMPLATE([MNTTAB_OPT_TIMEO], +[Mount Table option string: NFS timeout (1/10 sec)]) + +AH_TEMPLATE([MNTTAB_OPT_RETRANS], +[Mount Table option string: Max retransmissions (soft mnts)]) + +AH_TEMPLATE([MNTTAB_OPT_ACTIMEO], +[Mount Table option string: Attr cache timeout (sec)]) + +AH_TEMPLATE([MNTTAB_OPT_ACREGMIN], +[Mount Table option string: Min attr cache timeout (files)]) + +AH_TEMPLATE([MNTTAB_OPT_ACREGMAX], +[Mount Table option string: Max attr cache timeout (files)]) + +AH_TEMPLATE([MNTTAB_OPT_ACDIRMIN], +[Mount Table option string: Min attr cache timeout (dirs)]) + +AH_TEMPLATE([MNTTAB_OPT_ACDIRMAX], +[Mount Table option string: Max attr cache timeout (dirs)]) + +AH_TEMPLATE([MNTTAB_OPT_NOAC], +[Mount Table option string: Don't cache attributes at all]) + +AH_TEMPLATE([MNTTAB_OPT_NOCTO], +[Mount Table option string: No close-to-open consistency]) + +AH_TEMPLATE([MNTTAB_OPT_BG], +[Mount Table option string: Do mount retries in background]) + +AH_TEMPLATE([MNTTAB_OPT_FG], +[Mount Table option string: Do mount retries in foreground]) + +AH_TEMPLATE([MNTTAB_OPT_RETRY], +[Mount Table option string: Number of mount retries]) + +AH_TEMPLATE([MNTTAB_OPT_DEV], +[Mount Table option string: Device id of mounted fs]) + +AH_TEMPLATE([MNTTAB_OPT_FSID], +[Mount Table option string: Filesystem id of mounted fs]) + +AH_TEMPLATE([MNTTAB_OPT_POSIX], +[Mount Table option string: Get static pathconf for mount]) + +AH_TEMPLATE([MNTTAB_OPT_PRIVATE], +[Mount Table option string: Use local locking]) + +AH_TEMPLATE([MNTTAB_OPT_MAP], +[Mount Table option string: Automount map]) + +AH_TEMPLATE([MNTTAB_OPT_DIRECT], +[Mount Table option string: Automount direct map mount]) + +AH_TEMPLATE([MNTTAB_OPT_INDIRECT], +[Mount Table option string: Automount indirect map mount]) + +AH_TEMPLATE([MNTTAB_OPT_LLOCK], +[Mount Table option string: Local locking (no lock manager)]) + +AH_TEMPLATE([MNTTAB_OPT_IGNORE], +[Mount Table option string: Ignore this entry]) + +AH_TEMPLATE([MNTTAB_OPT_NOAUTO], +[Mount Table option string: No auto (what?)]) + +AH_TEMPLATE([MNTTAB_OPT_NOCONN], +[Mount Table option string: No connection]) + +AH_TEMPLATE([MNTTAB_OPT_VERS], +[Mount Table option string: protocol version number indicator]) + +AH_TEMPLATE([MNTTAB_OPT_PROTO], +[Mount Table option string: protocol network_id indicator]) + +AH_TEMPLATE([MNTTAB_OPT_SYNCDIR], +[Mount Table option string: Synchronous local directory ops]) + +AH_TEMPLATE([MNTTAB_OPT_NOSETSEC], +[Mount Table option string: Do no allow setting sec attrs]) + +AH_TEMPLATE([MNTTAB_OPT_SYMTTL], +[Mount Table option string: set symlink cache time-to-live]) + +AH_TEMPLATE([MNTTAB_OPT_COMPRESS], +[Mount Table option string: compress]) + +AH_TEMPLATE([MNTTAB_OPT_PGTHRESH], +[Mount Table option string: paging threshold]) + +AH_TEMPLATE([MNTTAB_OPT_MAXGROUPS], +[Mount Table option string: max groups]) + +AH_TEMPLATE([MNTTAB_OPT_PROPLIST], +[Mount Table option string: support property lists (ACLs)]) + +AH_TEMPLATE([MNTTAB_OPT_LONGNAME], +[Force Win95 long names]) + +AH_TEMPLATE([MNTTAB_OPT_NOWIN95], +[Completely ignore Win95 entries]) + +AH_TEMPLATE([MNTTAB_OPT_SHORTNAME], +[Force old DOS short names only]) + +AH_TEMPLATE([MNTTAB_OPT_NOACL], +[Access Control Lists are not supported]) + + +AH_TEMPLATE([MNT2_GEN_OPT_ASYNC], +[asynchronous filesystem access]) + +AH_TEMPLATE([MNT2_GEN_OPT_AUTOMNTFS], +[automounter filesystem (ignore) flag, used in bsdi-4.1]) + +AH_TEMPLATE([MNT2_GEN_OPT_AUTOMOUNTED], +[automounter filesystem flag, used in Mac OS X / Darwin]) + +AH_TEMPLATE([MNT2_GEN_OPT_BIND], +[directory hardlink]) + +AH_TEMPLATE([MNT2_GEN_OPT_CACHE], +[cache (what?)]) + +AH_TEMPLATE([MNT2_GEN_OPT_DATA], +[6-argument mount]) + +AH_TEMPLATE([MNT2_GEN_OPT_DETACH], +[Use a lazy unmount (detach)]) + +AH_TEMPLATE([MNT2_GEN_OPT_FORCE], +[Use a forced unmount]) + +AH_TEMPLATE([MNT2_GEN_OPT_FSS], +[old (4-argument) mount (compatibility)]) + +AH_TEMPLATE([MNT2_GEN_OPT_IGNORE], +[ignore mount entry in df output]) + +AH_TEMPLATE([MNT2_GEN_OPT_JFS], +[journaling filesystem (AIX's UFS/FFS)]) + +AH_TEMPLATE([MNT2_GEN_OPT_GRPID], +[old BSD group-id on create]) + +AH_TEMPLATE([MNT2_GEN_OPT_MULTI], +[do multi-component lookup on files]) + +AH_TEMPLATE([MNT2_GEN_OPT_NEWTYPE], +[use type string instead of int]) + +AH_TEMPLATE([MNT2_GEN_OPT_NFS], +[NFS mount]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOCACHE], +[nocache (what?)]) + +AH_TEMPLATE([MNT2_GEN_OPT_NODEV], +[do not interpret special device files]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOEXEC], +[no exec calls allowed]) + +AH_TEMPLATE([MNT2_GEN_OPT_NONDEV], +[do not interpret special device files]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOSUB], +[Disallow mounts beneath this mount]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOSUID], +[Setuid programs disallowed]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOTRUNC], +[Return ENAMETOOLONG for long filenames]) + +AH_TEMPLATE([MNT2_GEN_OPT_OPTIONSTR], +[Pass mount option string to kernel]) + +AH_TEMPLATE([MNT2_GEN_OPT_OVERLAY], +[allow overlay mounts]) + +AH_TEMPLATE([MNT2_GEN_OPT_QUOTA], +[check quotas]) + +AH_TEMPLATE([MNT2_GEN_OPT_RDONLY], +[Read-only]) + +AH_TEMPLATE([MNT2_GEN_OPT_REMOUNT], +[change options on an existing mount]) + +AH_TEMPLATE([MNT2_GEN_OPT_RONLY], +[read only]) + +AH_TEMPLATE([MNT2_GEN_OPT_SYNC], +[synchronize data immediately to filesystem]) + +AH_TEMPLATE([MNT2_GEN_OPT_SYNCHRONOUS], +[synchronous filesystem access (same as SYNC)]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOATIME], +[don't update access times]) + +AH_TEMPLATE([MNT2_GEN_OPT_NODIRATIME], +[don't update directory access times]) + +AH_TEMPLATE([MNT2_GEN_OPT_MANDLOCK], +[honor mandatory locking requests]) + +AH_TEMPLATE([MNT2_GEN_OPT_SYS5], +[Mount with Sys 5-specific semantics]) + +AH_TEMPLATE([MNT2_GEN_OPT_UNION], +[Union mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_AUTO], +[hide mount type from df(1)]) + +AH_TEMPLATE([MNT2_NFS_OPT_ACDIRMAX], +[set max secs for dir attr cache]) + +AH_TEMPLATE([MNT2_NFS_OPT_ACDIRMIN], +[set min secs for dir attr cache]) + +AH_TEMPLATE([MNT2_NFS_OPT_ACREGMAX], +[set max secs for file attr cache]) + +AH_TEMPLATE([MNT2_NFS_OPT_ACREGMIN], +[set min secs for file attr cache]) + +AH_TEMPLATE([MNT2_NFS_OPT_AUTHERR], +[Authentication error]) + +AH_TEMPLATE([MNT2_NFS_OPT_BROKEN_SUID], +[Linux broken setuid]) + +AH_TEMPLATE([MNT2_NFS_OPT_DEADTHRESH], +[set dead server retry thresh]) + +AH_TEMPLATE([MNT2_NFS_OPT_DISMINPROG], +[Dismount in progress]) + +AH_TEMPLATE([MNT2_NFS_OPT_DISMNT], +[Dismounted]) + +AH_TEMPLATE([MNT2_NFS_OPT_DUMBTIMR], +[Don't estimate rtt dynamically]) + +AH_TEMPLATE([MNT2_NFS_OPT_GRPID], +[System V-style gid inheritance]) + +AH_TEMPLATE([MNT2_NFS_OPT_HASAUTH], +[Has authenticator]) + +AH_TEMPLATE([MNT2_NFS_OPT_FSNAME], +[provide name of server's fs to system]) + +AH_TEMPLATE([MNT2_NFS_OPT_HOSTNAME], +[set hostname for error printf]) + +AH_TEMPLATE([MNT2_NFS_OPT_IGNORE], +[ignore mount point]) + +AH_TEMPLATE([MNT2_NFS_OPT_INT], +[allow interrupts on hard mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_INTR], +[allow interrupts on hard mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_INTERNAL], +[Bits set internally]) + +AH_TEMPLATE([MNT2_NFS_OPT_KERB], +[Use Kerberos authentication]) + +AH_TEMPLATE([MNT2_NFS_OPT_KERBEROS], +[use kerberos credentials]) + +AH_TEMPLATE([MNT2_NFS_OPT_KNCONF], +[transport's knetconfig structure]) + +AH_TEMPLATE([MNT2_NFS_OPT_LEASETERM], +[set lease term (nqnfs)]) + +AH_TEMPLATE([MNT2_NFS_OPT_LLOCK], +[Local locking (no lock manager)]) + +AH_TEMPLATE([MNT2_NFS_OPT_MAXGRPS], +[set maximum grouplist size]) + +AH_TEMPLATE([MNT2_NFS_OPT_MNTD], +[Mnt server for mnt point]) + +AH_TEMPLATE([MNT2_NFS_OPT_MYWRITE], +[Assume writes were mine]) + +AH_TEMPLATE([MNT2_NFS_OPT_NFSV3], +[mount NFS Version 3]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOAC], +[don't cache attributes]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOACL], +[does not support Access Control Lists]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOCONN], +[Don't Connect the socket]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOCTO], +[no close-to-open consistency]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOINT], +[disallow interrupts on hard mounts]) + +AH_TEMPLATE([MNT2_NFS_OPT_NONLM], +[does not support locking]) + +AH_TEMPLATE([MNT2_NFS_OPT_NORDIRPLUS], +[does not support readdir+]) + +AH_TEMPLATE([MNT2_NFS_OPT_NQLOOKLEASE], +[Get lease for lookup]) + +AH_TEMPLATE([MNT2_NFS_OPT_NONLM], +[Don't use locking]) + +AH_TEMPLATE([MNT2_NFS_OPT_NQNFS], +[Use Nqnfs protocol]) + +AH_TEMPLATE([MNT2_NFS_OPT_POSIX], +[static pathconf kludge info]) + +AH_TEMPLATE([MNT2_NFS_OPT_PRIVATE], +[Use local locking]) + +AH_TEMPLATE([MNT2_NFS_OPT_RCVLOCK], +[Rcv socket lock]) + +AH_TEMPLATE([MNT2_NFS_OPT_RDIRALOOK], +[Do lookup with readdir (nqnfs)]) + +AH_TEMPLATE([MNT2_NFS_OPT_PROPLIST], +[allow property list operations (ACLs over NFS)]) + +AH_TEMPLATE([MNT2_NFS_OPT_RDIRPLUS], +[Use Readdirplus for NFSv3]) + +AH_TEMPLATE([MNT2_NFS_OPT_READAHEAD], +[set read ahead]) + +AH_TEMPLATE([MNT2_NFS_OPT_READDIRSIZE], +[Set readdir size]) + +AH_TEMPLATE([MNT2_NFS_OPT_RESVPORT], +[Allocate a reserved port]) + +AH_TEMPLATE([MNT2_NFS_OPT_RETRANS], +[set number of request retries]) + +AH_TEMPLATE([MNT2_NFS_OPT_RONLY], +[read only]) + +AH_TEMPLATE([MNT2_NFS_OPT_RPCTIMESYNC], +[use RPC to do secure NFS time sync]) + +AH_TEMPLATE([MNT2_NFS_OPT_RSIZE], +[set read size]) + +AH_TEMPLATE([MNT2_NFS_OPT_SECURE], +[secure mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_SNDLOCK], +[Send socket lock]) + +AH_TEMPLATE([MNT2_NFS_OPT_SOFT], +[soft mount (hard is default)]) + +AH_TEMPLATE([MNT2_NFS_OPT_SPONGY], +[spongy mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_STRICTLOCK], +[Reserved for nfsv4]) +AH_TEMPLATE([MNT2_NFS_OPT_TIMEO], +[set initial timeout]) + +AH_TEMPLATE([MNT2_NFS_OPT_TCP], +[use TCP for mounts]) + +AH_TEMPLATE([MNT2_NFS_OPT_UNSHARED], +[do not use shared cache for all mountpoints]) + +AH_TEMPLATE([MNT2_NFS_OPT_VER3], +[linux NFSv3]) + +AH_TEMPLATE([MNT2_NFS_OPT_WAITAUTH], +[Wait for authentication]) + +AH_TEMPLATE([MNT2_NFS_OPT_WANTAUTH], +[Wants an authenticator]) + +AH_TEMPLATE([MNT2_NFS_OPT_WANTRCV], +[Want receive socket lock]) + +AH_TEMPLATE([MNT2_NFS_OPT_WANTSND], +[Want send socket lock]) + +AH_TEMPLATE([MNT2_NFS_OPT_WSIZE], +[set write size]) + +AH_TEMPLATE([MNT2_NFS_OPT_SYMTTL], +[set symlink cache time-to-live]) + +AH_TEMPLATE([MNT2_NFS_OPT_PGTHRESH], +[paging threshold]) + +AH_TEMPLATE([MNT2_NFS_OPT_XLATECOOKIE], +[32<->64 dir cookie translation]) + +AH_TEMPLATE([MNT2_CDFS_OPT_DEFPERM], +[Ignore permission bits]) + +AH_TEMPLATE([MNT2_CDFS_OPT_EXTATT], +[Enable external attributes]) + +AH_TEMPLATE([MNT2_CDFS_OPT_GENS], +[Show file generations]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NOCASETRANS], +[Disable filename case translation]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NODEFPERM], +[Use on-disk permission bits]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NOJOLIET], +[Disable Joliet extensions]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NORRIP], +[Disable Rock Ridge Interchange Protocol (RRIP) extensions]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NOVERSION], +[Strip off extension from version string]) + +AH_TEMPLATE([MNT2_CDFS_OPT_RRCASEINS], +[Enable Rock Ridge Interchange Protocol (RRIP) case insensitive filename extensions]) + +AH_TEMPLATE([MNT2_CDFS_OPT_RRIP], +[Use Rock Ridge Interchange Protocol (RRIP) extensions]) + +AH_TEMPLATE([MNT2_UDF_OPT_CLOSESESSION], +[Close session when unmounting]) + +AH_TEMPLATE([MNT2_PCFS_OPT_LONGNAME], +[Force Win95 long names]) + +AH_TEMPLATE([MNT2_PCFS_OPT_NOWIN95], +[Completely ignore Win95 entries]) + +AH_TEMPLATE([MNT2_PCFS_OPT_SHORTNAME], +[Force old DOS short names only]) + +AH_TEMPLATE([HAVE_MNTENT_T_MNT_TIME_STRING], +[does mntent_t have mnt_time field and is of type "char *" ?]) + +AH_TEMPLATE([REINSTALL_SIGNAL_HANDLER], +[should signal handlers be reinstalled?]) + +AH_TEMPLATE([DEBUG], +[Turn off general debugging by default]) + +AH_TEMPLATE([DEBUG_MEM], +[Turn off memory debugging by default]) + +AH_TEMPLATE([PACKAGE_NAME], +[Define package name (must be defined by configure.in)]) + +AH_TEMPLATE([PACKAGE_VERSION], +[Define version of package (must be defined by configure.in)]) + +AH_TEMPLATE([PACKAGE_BUGREPORT], +[Define bug-reporting address (must be defined by configure.in)]) + +AH_TEMPLATE([HOST_CPU], +[Define name of host machine's cpu (eg. sparc)]) + +AH_TEMPLATE([HOST_ARCH], +[Define name of host machine's architecture (eg. sun4)]) + +AH_TEMPLATE([DISTRO_NAME], +[Define name of host OS's distribution name (eg. debian, redhat, suse, etc.)]) + +AH_TEMPLATE([HOST_VENDOR], +[Define name of host machine's vendor (eg. sun)]) + +AH_TEMPLATE([HOST_OS], +[Define name and version of host machine (eg. solaris2.5.1)]) + +AH_TEMPLATE([HOST_OS_NAME], +[Define only name of host machine OS (eg. solaris2)]) + +AH_TEMPLATE([HOST_OS_VERSION], +[Define only version of host machine (eg. 2.5.1)]) + +AH_TEMPLATE([HOST_HEADER_VERSION], +[Define the header version of (linux) hosts (eg. 2.2.10)]) + +AH_TEMPLATE([HOST_NAME], +[Define name of host]) + +AH_TEMPLATE([USER_NAME], +[Define user name]) + +AH_TEMPLATE([CONFIG_DATE], +[Define configuration date]) + +AH_TEMPLATE([HAVE_TRANSPORT_TYPE_TLI], +[what type of network transport type is in use? TLI or sockets?]) + +AH_TEMPLATE([time_t], +[Define to `long' if doesn't define time_t]) + +AH_TEMPLATE([voidp], +[Define to "void *" if compiler can handle, otherwise "char *"]) + +AH_TEMPLATE([am_nfs_fh], +[Define a type/structure for an NFS V2 filehandle]) + +AH_TEMPLATE([am_nfs_fh3], +[Define a type/structure for an NFS V3 filehandle]) + +AH_TEMPLATE([HAVE_NFS_PROT_HEADERS], +[define if the host has NFS protocol headers in system headers]) + +AH_TEMPLATE([AMU_NFS_PROTOCOL_HEADER], +[define name of am-utils' NFS protocol header]) + +AH_TEMPLATE([nfs_args_t], +[Define a type for the nfs_args structure]) + +AH_TEMPLATE([NFS_FH_FIELD], +[Define the field name for the filehandle within nfs_args_t]) + +AH_TEMPLATE([HAVE_FHANDLE], +[Define if plain fhandle type exists]) + +AH_TEMPLATE([SVC_IN_ARG_TYPE], +[Define the type of the 3rd argument ('in') to svc_getargs()]) + +AH_TEMPLATE([XDRPROC_T_TYPE], +[Define to the type of xdr procedure type]) + +AH_TEMPLATE([MOUNT_TABLE_ON_FILE], +[Define if mount table is on file, undefine if in kernel]) + +AH_TEMPLATE([HAVE_STRUCT_MNTENT], +[Define if have struct mntent in one of the standard headers]) + +AH_TEMPLATE([HAVE_STRUCT_MNTTAB], +[Define if have struct mnttab in one of the standard headers]) + +AH_TEMPLATE([HAVE_STRUCT_NFS_ARGS], +[Define if have struct nfs_args in one of the standard nfs headers]) + +AH_TEMPLATE([HAVE_STRUCT_NFS_GFS_MOUNT], +[Define if have struct nfs_gfs_mount in one of the standard nfs headers]) + +AH_TEMPLATE([YP_ORDER_OUTORDER_TYPE], +[Type of the 3rd argument to yp_order()]) + +AH_TEMPLATE([RECVFROM_FROMLEN_TYPE], +[Type of the 6th argument to recvfrom()]) + +AH_TEMPLATE([AUTH_CREATE_GIDLIST_TYPE], +[Type of the 5rd argument to authunix_create()]) + +AH_TEMPLATE([MTYPE_PRINTF_TYPE], +[The string used in printf to print the mount-type field of mount(2)]) + +AH_TEMPLATE([MTYPE_TYPE], +[Type of the mount-type field in the mount() system call]) + +AH_TEMPLATE([pcfs_args_t], +[Define a type for the pcfs_args structure]) + +AH_TEMPLATE([autofs_args_t], +[Define a type for the autofs_args structure]) + +AH_TEMPLATE([cachefs_args_t], +[Define a type for the cachefs_args structure]) + +AH_TEMPLATE([tmpfs_args_t], +[Define a type for the tmpfs_args structure]) + +AH_TEMPLATE([ufs_args_t], +[Define a type for the ufs_args structure]) + +AH_TEMPLATE([efs_args_t], +[Define a type for the efs_args structure]) + +AH_TEMPLATE([xfs_args_t], +[Define a type for the xfs_args structure]) + +AH_TEMPLATE([lofs_args_t], +[Define a type for the lofs_args structure]) + +AH_TEMPLATE([cdfs_args_t], +[Define a type for the cdfs_args structure]) + +AH_TEMPLATE([udf_args_t], +[Define a type for the udf_args structure]) + +AH_TEMPLATE([mfs_args_t], +[Define a type for the mfs_args structure]) + +AH_TEMPLATE([rfs_args_t], +[Define a type for the rfs_args structure]) + +AH_TEMPLATE([HAVE_BAD_HASMNTOPT], +[define if have a bad version of hasmntopt()]) + +AH_TEMPLATE([HAVE_BAD_MEMCMP], +[define if have a bad version of memcmp()]) + +AH_TEMPLATE([HAVE_BAD_YP_ALL], +[define if have a bad version of yp_all()]) + +AH_TEMPLATE([USE_UNCONNECTED_NFS_SOCKETS], +[define if must use NFS "noconn" option]) + +AH_TEMPLATE([USE_CONNECTED_NFS_SOCKETS], +[define if must NOT use NFS "noconn" option]) + +AH_TEMPLATE([HAVE_GNU_GETOPT], +[define if your system's getopt() is GNU getopt() (are you using glibc)]) + +AH_TEMPLATE([HAVE_EXTERN_SYS_ERRLIST], +[does extern definition for sys_errlist[] exist?]) + +AH_TEMPLATE([HAVE_EXTERN_OPTARG], +[does extern definition for optarg exist?]) + +AH_TEMPLATE([HAVE_EXTERN_CLNT_SPCREATEERROR], +[does extern definition for clnt_spcreateerror() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_CLNT_SPERRNO], +[does extern definition for clnt_sperrno() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_FREE], +[does extern definition for free() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GET_MYADDRESS], +[does extern definition for get_myaddress() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETCCENT], +[does extern definition for getccent() (hpux) exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETDOMAINNAME], +[does extern definition for getdomainname() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETDTABLESIZE], +[does extern definition for getdtablesize() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETHOSTNAME], +[does extern definition for gethostname() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETLOGIN], +[does extern definition for getlogin() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETTABLESIZE], +[does extern definition for gettablesize() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETPAGESIZE], +[does extern definition for getpagesize() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETWD], +[does extern definition for getwd() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_HOSTS_CTL], +[does extern definition for hosts_ctl() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_INNETGR], +[does extern definition for innetgr() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_MKSTEMP], +[does extern definition for mkstemp() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_MNTCTL], +[does extern definition for mntctl() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_SBRK], +[does extern definition for sbrk() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_SETEUID], +[does extern definition for seteuid() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_SETITIMER], +[does extern definition for setitimer() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_SLEEP], +[does extern definition for sleep() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_STRCASECMP], +[does extern definition for strcasecmp() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_STRLCAT], +[does extern definition for strlcat() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_STRLCPY], +[does extern definition for strlcpy() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_STRSTR], +[does extern definition for strstr() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_UALARM], +[does extern definition for ualarm() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_USLEEP], +[does extern definition for usleep() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_WAIT3], +[does extern definition for wait3() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_VSNPRINTF], +[does extern definition for vsnprintf() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_XDR_CALLMSG], +[does extern definition for xdr_callmsg() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_XDR_OPAQUE_AUTH], +[does extern definition for xdr_opaque_auth() exist?]) + +AH_TEMPLATE([NEW_DBM_H], +[Defined to the header file containing ndbm-compatible definitions]) + +AH_TEMPLATE([HAVE_LIBWRAP], +[does libwrap exist?]) + +AH_TEMPLATE([NEED_LIBWRAP_SEVERITY_VARIABLES], +[does libwrap expect caller to define the variables allow_severity and deny_severity]) + +AH_TEMPLATE([HAVE_EXTERN_LDAP_ENABLE_CACHE], +[does extern definition for ldap_enable_cache() exist?]) + + +dnl ###################################################################### +dnl AC_HOST_MACROS: define HOST_CPU, HOST_VENDOR, and HOST_OS +AC_DEFUN([AMU_HOST_MACROS], +[ +# these are defined already by the macro 'CANONICAL_HOST' + AC_MSG_CHECKING([host cpu]) + AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu") + AC_MSG_RESULT($host_cpu) + + AC_MSG_CHECKING([vendor]) + AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor") + AC_MSG_RESULT($host_vendor) + +# if vendor is apple, then check values in /usr/bin/sw_vers + if test "${host_vendor}" = "apple" + then + pn=`sw_vers -productName 2>/dev/null` + pv=`sw_vers -productVersion 2>/dev/null` + if test -n "${pn}" && test -n "${pv}" + then + host_os_name=`echo ${pn} | tr -d ' ' | tr '[A-Z]' '[a-z]'` + host_os_version="${pv}" + host_os="${host_os_name}-${host_os_version}" + fi + fi + + AC_MSG_CHECKING([host full OS name and version]) + # normalize some host OS names + case ${host_os} in + # linux is linux is linux, regardless of RMS. + linux-gnu* | lignux* ) host_os=linux ;; + # NetBSD systems today are elf, so no need to distinguish + netbsdelf* ) host_os=`echo ${host_os} | sed 's/^netbsdelf/netbsd/'`;; + esac + AC_DEFINE_UNQUOTED(HOST_OS, "$host_os") + AC_MSG_RESULT($host_os) + +# break host_os into host_os_name and host_os_version + AC_MSG_CHECKING([host OS name]) + host_os_name=`echo $host_os | sed 's/\..*//g'` + # normalize some OS names + case ${host_os_name} in + # linux is linux is linux, regardless of RMS. + linux-gnu* | lignux* ) host_os_name=linux ;; + # all NetBSD systems today should just show up as "netbsd" + netbsd* ) host_os_name=netbsd;; + esac + AC_DEFINE_UNQUOTED(HOST_OS_NAME, "$host_os_name") + AC_MSG_RESULT($host_os_name) + +# parse out the OS version of the host + AC_MSG_CHECKING([host OS version]) + host_os_version=`echo $host_os | sed 's/^[[^0-9]]*//g'` + if test -z "$host_os_version" + then + host_os_version=`(uname -r) 2>/dev/null` || host_os_version=unknown + fi + case ${host_os_version} in + # fixes for some OS versions (solaris used to be here) + * ) # do nothing for now + ;; + esac + AC_DEFINE_UNQUOTED(HOST_OS_VERSION, "$host_os_version") + AC_MSG_RESULT($host_os_version) + +# figure out host architecture (different than CPU) + AC_MSG_CHECKING([host OS architecture]) + host_arch=`(uname -m) 2>/dev/null` || host_arch=unknown + # normalize some names + case ${host_arch} in + sun4* ) host_arch=sun4 ;; + sun3x ) host_arch=sun3 ;; + sun ) host_arch=`(arch) 2>/dev/null` || host_arch=unknown ;; + i?86 ) host_arch=i386 ;; # all x86 should show up as i386 + Power*Macintosh ) host_arch=powerpc ;; + esac + AC_DEFINE_UNQUOTED(HOST_ARCH, "$host_arch") + AC_MSG_RESULT($host_arch) + +# figure out (linux) distribution, if any + AC_MSG_CHECKING([OS system distribution]) + ac_config_distro=`$SHELL $ac_aux_dir/config.guess.long | cut -d'-' -f4-` + if test -z "$ac_config_distro" + then + ac_config_distro="none" + fi + AC_DEFINE_UNQUOTED(DISTRO_NAME, "$ac_config_distro") + AC_MSG_RESULT($ac_config_distro) + +# figure out host name + AC_MSG_CHECKING([host name]) + host_name=`(hostname || uname -n) 2>/dev/null` || host_name=unknown + AC_DEFINE_UNQUOTED(HOST_NAME, "$host_name") + AC_MSG_RESULT($host_name) + +# figure out user name + AC_MSG_CHECKING([user name]) + if test -n "$USER" + then + user_name="$USER" + else + if test -n "$LOGNAME" + then + user_name="$LOGNAME" + else + user_name=`(whoami) 2>/dev/null` || user_name=unknown + fi + fi + AC_DEFINE_UNQUOTED(USER_NAME, "$user_name") + AC_MSG_RESULT($user_name) + +# figure out configuration date + AC_MSG_CHECKING([configuration date]) + config_date=`(date) 2>/dev/null` || config_date=unknown_date + AC_DEFINE_UNQUOTED(CONFIG_DATE, "$config_date") + AC_MSG_RESULT($config_date) + +]) +dnl ====================================================================== + + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 57 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM -r conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM -r conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM -r conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM -r conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -rf conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -rf conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -rf conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM -r conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM -r conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS + + +dnl ###################################################################### +dnl ensure that linux kernel headers match running kernel +AC_DEFUN([AMU_LINUX_HEADERS], +[ +# test sanity of running kernel vs. kernel headers + AC_MSG_CHECKING("host headers version") + case ${host_os} in + linux ) + host_header_version="bad" + AMU_EXPAND_RUN_STRING( +[ +#include +#include +], +[ +if (argc > 1) +#ifdef UTS_RELEASE + printf("%s", UTS_RELEASE); +#else +# define AMU_MA(a) ((a) >> 16) +# define AMU_MI(a) (((a) & 0xffff) >> 8) +# define AMU_PL(a) ((a) & 0xff) + printf("%d.%d.%d", AMU_MA(LINUX_VERSION_CODE), AMU_MI(LINUX_VERSION_CODE), AMU_PL(LINUX_VERSION_CODE)); +#endif +], +[ host_header_version=$value ], +[ echo + AC_MSG_ERROR([cannot find UTS_RELEASE in . + This Linux system may be misconfigured or unconfigured!]) +]) + ;; + * ) host_header_version=$host_os_version ;; + esac + AC_DEFINE_UNQUOTED(HOST_HEADER_VERSION, "$host_header_version") + AC_MSG_RESULT($host_header_version) + + case ${host_os} in + linux ) + if test "$host_os_version" != $host_header_version + then + AC_MSG_WARN([Linux kernel $host_os_version mismatch with $host_header_version headers!]) + fi + ;; +esac +dnl cache these two for debugging purposes +ac_cv_os_version=$host_os_version +ac_cv_header_version=$host_header_version +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check if a local configuration file exists +AC_DEFUN([AMU_LOCALCONFIG], +[AC_MSG_CHECKING(a local configuration file) +if test -f localconfig.h +then + AC_DEFINE(HAVE_LOCALCONFIG_H) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +]) +dnl ====================================================================== + + +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 7 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) + + +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) + + +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 3337 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.2' +macro_revision='1.3337' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) + + +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) + + +dnl ###################################################################### +dnl an M4 macro to include a list of common headers being used everywhere +define(AMU_MOUNT_HEADERS, +[ +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + +$1 +] +) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Which options to add to CFLAGS for compilation? +dnl NOTE: this is only for final compiltions, not for configure tests) +AC_DEFUN([AMU_OPT_AMU_CFLAGS], +[AC_MSG_CHECKING(for additional C option compilation flags) +AC_ARG_ENABLE(am-cflags, +AC_HELP_STRING([--enable-am-cflags=ARG], + [compile package with ARG additional C flags]), +[ +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + AC_MSG_ERROR(am-cflags must be supplied if option is used) +fi +# user supplied a cflags option to configure +AMU_CFLAGS="$enableval" +AC_SUBST(AMU_CFLAGS) +AC_MSG_RESULT($enableval) +], [ + # default is to have no additional C flags + AMU_CFLAGS="" + AC_SUBST(AMU_CFLAGS) + AC_MSG_RESULT(none) +]) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Initial settings for CPPFLAGS (-I options) +dnl NOTE: this is for configuration as well as compilations! +AC_DEFUN([AMU_OPT_CPPFLAGS], +[AC_MSG_CHECKING(for configuration/compilation (-I) preprocessor flags) +AC_ARG_ENABLE(cppflags, +AC_HELP_STRING([--enable-cppflags=ARG], + [configure/compile with ARG (-I) preprocessor flags]), +[ +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + AC_MSG_ERROR(cppflags must be supplied if option is used) +fi +# use supplied options +CPPFLAGS="$CPPFLAGS $enableval" +export CPPFLAGS +AC_MSG_RESULT($enableval) +], [ + # default is to have no additional flags + AC_MSG_RESULT(none) +]) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Debugging: "yes" means general, "mem" means general and memory debugging, +dnl and "no" means none. +AC_DEFUN([AMU_OPT_DEBUG], +[AC_MSG_CHECKING(for debugging options) +AC_ARG_ENABLE(debug, +AC_HELP_STRING([--enable-debug=ARG],[enable debugging (yes/mem/no)]), +[ +if test "$enableval" = yes; then + AC_MSG_RESULT(yes) + AC_DEFINE(DEBUG) + ac_cv_opt_debug=yes +elif test "$enableval" = mem; then + AC_MSG_RESULT(mem) + AC_DEFINE(DEBUG) + AC_DEFINE(DEBUG_MEM) + AC_CHECK_FUNC(malloc_verify,,AC_CHECK_LIB(mapmalloc, malloc_verify)) + AC_CHECK_FUNC(mallinfo,,AC_CHECK_LIB(malloc, mallinfo)) + ac_cv_opt_debug=mem +else + AC_MSG_RESULT(no) + ac_cv_opt_debug=no +fi +], +[ + # default is no debugging + AC_MSG_RESULT(no) +]) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Initial settings for LDFLAGS (-L options) +dnl NOTE: this is for configuration as well as compilations! +AC_DEFUN([AMU_OPT_LDFLAGS], +[AC_MSG_CHECKING(for configuration/compilation (-L) library flags) +AC_ARG_ENABLE(ldflags, +AC_HELP_STRING([--enable-ldflags=ARG], + [configure/compile with ARG (-L) library flags]), +[ +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + AC_MSG_ERROR(ldflags must be supplied if option is used) +fi +# use supplied options +LDFLAGS="$LDFLAGS $enableval" +export LDFLAGS +AC_MSG_RESULT($enableval) +], [ + # default is to have no additional flags + AC_MSG_RESULT(none) +]) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Initial settings for LIBS (-l options) +dnl NOTE: this is for configuration as well as compilations! +AC_DEFUN([AMU_OPT_LIBS], +[AC_MSG_CHECKING(for configuration/compilation (-l) library flags) +AC_ARG_ENABLE(libs, +AC_HELP_STRING([--enable-libs=ARG], + [configure/compile with ARG (-l) library flags]), +[ +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + AC_MSG_ERROR(libs must be supplied if option is used) +fi +# use supplied options +LIBS="$LIBS $enableval" +export LIBS +AC_MSG_RESULT($enableval) +], [ + # default is to have no additional flags + AC_MSG_RESULT(none) +]) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Specify additional compile options based on the OS and the compiler +AC_DEFUN([AMU_OS_CFLAGS], +[ +AC_CACHE_CHECK(additional compiler flags, +ac_cv_os_cflags, +[ +case "${host_os}" in + irix6* ) + case "${CC}" in + cc ) + # do not use 64-bit compiler + ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84" + ;; + esac + ;; + osf[[1-3]]* ) + # get the right version of struct sockaddr + case "${CC}" in + cc ) + ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO" + ;; + * ) + ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO" + ;; + esac + ;; + osf* ) + # get the right version of struct sockaddr + case "${CC}" in + cc ) + ac_cv_os_cflags="-std -D_SOCKADDR_LEN" + ;; + * ) + ac_cv_os_cflags="-D_SOCKADDR_LEN" + ;; + esac + ;; + aix[[1-3]]* ) + ac_cv_os_cflags="" ;; + aix4.[[0-2]]* ) + # turn on additional headers + ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE" + ;; + aix5.3* ) + # avoid circular dependencies in yp headers, and more + ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS -D_MSGQSUPPORT" + ;; + aix* ) + # avoid circular dependencies in yp headers + ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS" + ;; + OFF-sunos4* ) + # make sure passing whole structures is handled in gcc + case "${CC}" in + gcc ) + ac_cv_os_cflags="-fpcc-struct-return" + ;; + esac + ;; + sunos[[34]]* | solaris1* | solaris2.[[0-5]] | sunos5.[[0-5]] | solaris2.5.* | sunos5.5.* ) + ac_cv_os_cflags="" ;; + solaris2* | sunos5* ) + # turn on 64-bit file offset interface + case "${CC}" in + * ) + ac_cv_os_cflags="-D_LARGEFILE64_SOURCE" + ;; + esac + ;; + hpux* ) + # use Ansi compiler on HPUX + case "${CC}" in + cc ) + ac_cv_os_cflags="-Ae" + ;; + esac + ;; + darwin* | macosx* | rhapsody* ) + ac_cv_os_cflags="-D_P1003_1B_VISIBLE" + ;; + * ) + ac_cv_os_cflags="" + ;; +esac +]) +AMU_CFLAGS="$AMU_CFLAGS $ac_cv_os_cflags" +# use same flags for configuring, so it matches what we do at compile time +CFLAGS="$CFLAGS $ac_cv_os_cflags" +export CFLAGS +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Specify additional cpp options based on the OS and the compiler +AC_DEFUN([AMU_OS_CPPFLAGS], +[ +AC_CACHE_CHECK(additional preprocessor flags, +ac_cv_os_cppflags, +[ +case "${host_os}" in +# off for now, posix may be a broken thing for nextstep3... +# nextstep* ) +# ac_cv_os_cppflags="-D_POSIX_SOURCE" +# ;; + * ) ac_cv_os_cppflags="" ;; +esac +]) +CPPFLAGS="$CPPFLAGS $ac_cv_os_cppflags" +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Specify additional linker options based on the OS and the compiler +AC_DEFUN([AMU_OS_LDFLAGS], +[ +AC_CACHE_CHECK(additional linker flags, +ac_cv_os_ldflags, +[ +case "${host_os}" in + solaris2.7* | sunos5.7* ) + # find LDAP: off until Sun includes ldap headers. + case "${CC}" in + * ) + #ac_cv_os_ldflags="-L/usr/lib/fn" + ;; + esac + ;; + * ) ac_cv_os_ldflags="" ;; +esac +]) +LDFLAGS="$LDFLAGS $ac_cv_os_ldflags" +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Bugreport name +AC_DEFUN([AMU_PACKAGE_BUGREPORT], +[AC_MSG_CHECKING(bug-reporting address) +AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$1") +AC_MSG_RESULT(\"$1\") +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Package name +AC_DEFUN([AMU_PACKAGE_NAME], +[AC_MSG_CHECKING(package name) +AC_DEFINE_UNQUOTED(PACKAGE_NAME, "$1") +AC_MSG_RESULT(\"$1\") +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Version of package +AC_DEFUN([AMU_PACKAGE_VERSION], +[AC_MSG_CHECKING(version of package) +AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$1") +AC_MSG_RESULT(\"$1\") +]) +dnl ====================================================================== + + +dnl find f/lex, but error if none found +AC_DEFUN_ONCE([AMU_PROG_LEX], +[AC_CHECK_PROGS(LEX, flex lex, :) +if test -z "$LEXLIB" +then + AC_CHECK_LIB(fl, yywrap, LEXLIB="-lfl", + [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")]) +fi +AC_SUBST(LEXLIB) +if test "x$LEX" != "x:"; then + _AC_PROG_LEX_YYTEXT_DECL +else + AC_MSG_ERROR([cannot find flex/lex -- needed for am-utils]) +fi]) + + +dnl find bison/yacc, but error if none found +AC_DEFUN([AMU_PROG_YACC], +[AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :) +if test "x$YACC" = "x:"; then + AC_MSG_ERROR([cannot find bison/yacc/byacc -- needed for am-utils]) +fi]) + + +dnl ###################################################################### +dnl AC_SAVE_STATE: save confdefs.h onto dbgcf.h and write $ac_cv_* cache +dnl variables that are known so far. +define(AMU_SAVE_STATE, +dnl AC_MSG_NOTICE(*** SAVING CONFIGURE STATE ***) +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +[AC_CACHE_SAVE +AC_MSG_NOTICE([*** SAVING CONFIGURE STATE ***])] +) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the name of the nfs filehandle field in nfs_args_t. +AC_DEFUN([AMU_STRUCT_FIELD_NFS_FH], +[ +dnl make sure this is called before macros which depend on it +AC_BEFORE([$0], [AC_TYPE_NFS_FH]) +AC_CACHE_CHECK(for the name of the nfs filehandle field in nfs_args_t, +ac_cv_struct_field_nfs_fh, +[ +# set to a default value +ac_cv_struct_field_nfs_fh=notfound +# look for name "fh" (most systems) +if test "$ac_cv_struct_field_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfs_args_t nat; + char *cp = (char *) &(nat.fh); +], ac_cv_struct_field_nfs_fh=fh, ac_cv_struct_field_nfs_fh=notfound) +fi + +# look for name "root" (for example Linux) +if test "$ac_cv_struct_field_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfs_args_t nat; + char *cp = (char *) &(nat.root); +], ac_cv_struct_field_nfs_fh=root, ac_cv_struct_field_nfs_fh=notfound) +fi +]) +if test "$ac_cv_struct_field_nfs_fh" != notfound +then + AC_DEFINE_UNQUOTED(NFS_FH_FIELD, $ac_cv_struct_field_nfs_fh) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find if struct mntent exists anywhere in mount.h or mntent.h headers +AC_DEFUN([AMU_STRUCT_MNTENT], +[ +AC_CACHE_CHECK(for struct mntent, +ac_cv_have_struct_mntent, +[ +# try to compile a program which may have a definition for the structure +AC_TRY_COMPILE( +AMU_MOUNT_HEADERS +, +[ +struct mntent mt; +], ac_cv_have_struct_mntent=yes, ac_cv_have_struct_mntent=no) +]) +if test "$ac_cv_have_struct_mntent" = yes +then + AC_DEFINE(HAVE_STRUCT_MNTENT) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find if struct mnttab exists anywhere in mount.h or mnttab.h headers +AC_DEFUN([AMU_STRUCT_MNTTAB], +[ +AC_CACHE_CHECK(for struct mnttab, +ac_cv_have_struct_mnttab, +[ +# try to compile a program which may have a definition for the structure +AC_TRY_COMPILE( +AMU_MOUNT_HEADERS +, +[ +struct mnttab mt; +], ac_cv_have_struct_mnttab=yes, ac_cv_have_struct_mnttab=no) +]) +if test "$ac_cv_have_struct_mnttab" = yes +then + AC_DEFINE(HAVE_STRUCT_MNTTAB) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find if struct nfs_args exists anywhere in typical headers +AC_DEFUN([AMU_STRUCT_NFS_ARGS], +[ +dnl make sure this is called before [AC_TYPE_NFS_FH] +AC_BEFORE([$0], [AC_TYPE_NFS_FH]) +AC_BEFORE([$0], [AC_STRUCT_FIELD_NFS_FH]) +AC_CACHE_CHECK(for struct nfs_args, +ac_cv_have_struct_nfs_args, +[ +# try to compile a program which may have a definition for the structure +# assume not found +ac_cv_have_struct_nfs_args=notfound + +# look for "struct irix5_nfs_args" (specially set in conf/nfs_prot/) +if test "$ac_cv_have_struct_nfs_args" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct irix5_nfs_args na; +], ac_cv_have_struct_nfs_args="struct irix5_nfs_args", ac_cv_have_struct_nfs_args=notfound) +fi + +# look for "struct aix5_nfs_args" (specially set in conf/nfs_prot/) +if test "$ac_cv_have_struct_nfs_args" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct aix5_nfs_args na; +], ac_cv_have_struct_nfs_args="struct aix5_nfs_args", ac_cv_have_struct_nfs_args=notfound) +fi + +# look for "struct aix4_nfs_args" (specially set in conf/nfs_prot/) +if test "$ac_cv_have_struct_nfs_args" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct aix4_nfs_args na; +], ac_cv_have_struct_nfs_args="struct aix4_nfs_args", ac_cv_have_struct_nfs_args=notfound) +fi + +# look for "struct nfs_args" +if test "$ac_cv_have_struct_nfs_args" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct nfs_args na; +], ac_cv_have_struct_nfs_args="struct nfs_args", ac_cv_have_struct_nfs_args=notfound) +fi + +]) + +if test "$ac_cv_have_struct_nfs_args" != notfound +then + AC_DEFINE(HAVE_STRUCT_NFS_ARGS) + AC_DEFINE_UNQUOTED(nfs_args_t, $ac_cv_have_struct_nfs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the structure of an nfs filehandle. +dnl if found, defined am_nfs_fh to it, else leave it undefined. +dnl THE ORDER OF LOOKUPS IN THIS FILE IS VERY IMPORTANT!!! +AC_DEFUN([AMU_STRUCT_NFS_FH], +[ +AC_CACHE_CHECK(for type/structure of NFS V2 filehandle, +ac_cv_struct_nfs_fh, +[ +# try to compile a program which may have a definition for the type +dnl need a series of compilations, which will test out every possible type +dnl such as struct nfs_fh, fhandle_t, nfsv2fh_t, etc. +# set to a default value +ac_cv_struct_nfs_fh=notfound + +# look for "nfs_fh" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfs_fh nh; +], ac_cv_struct_nfs_fh="nfs_fh", ac_cv_struct_nfs_fh=notfound) +fi + +# look for "struct nfs_fh" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct nfs_fh nh; +], ac_cv_struct_nfs_fh="struct nfs_fh", ac_cv_struct_nfs_fh=notfound) +fi + +# look for "struct nfssvcfh" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct nfssvcfh nh; +], ac_cv_struct_nfs_fh="struct nfssvcfh", ac_cv_struct_nfs_fh=notfound) +fi + +# look for "nfsv2fh_t" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfsv2fh_t nh; +], ac_cv_struct_nfs_fh="nfsv2fh_t", ac_cv_struct_nfs_fh=notfound) +fi + +# look for "fhandle_t" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ fhandle_t nh; +], ac_cv_struct_nfs_fh="fhandle_t", ac_cv_struct_nfs_fh=notfound) +fi + +]) + +if test "$ac_cv_struct_nfs_fh" != notfound +then + AC_DEFINE_UNQUOTED(am_nfs_fh, $ac_cv_struct_nfs_fh) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the structure of an nfs filehandle. +dnl if found, defined am_nfs_fh3 to it, else leave it undefined. +dnl THE ORDER OF LOOKUPS IN THIS FILE IS VERY IMPORTANT!!! +AC_DEFUN([AMU_STRUCT_NFS_FH3], +[ +AC_CACHE_CHECK(for type/structure of NFS V3 filehandle, +ac_cv_struct_nfs_fh3, +[ +# try to compile a program which may have a definition for the type +dnl need a series of compilations, which will test out every possible type +dnl such as struct nfs_fh3, XXX - what else?, etc. +# set to a default value +ac_cv_struct_nfs_fh3=notfound + +# look for "nfs_fh3" +if test "$ac_cv_struct_nfs_fh3" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfs_fh3 nh; +], ac_cv_struct_nfs_fh3="nfs_fh3_netbsd20", ac_cv_struct_nfs_fh3=notfound) +fi + +# look for "struct nfs_fh3" +if test "$ac_cv_struct_nfs_fh3" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct nfs_fh3 nh; +], ac_cv_struct_nfs_fh3="struct nfs_fh3", ac_cv_struct_nfs_fh3=notfound) +fi + +]) + +if test "$ac_cv_struct_nfs_fh3" != notfound +then + AC_DEFINE_UNQUOTED(am_nfs_fh3, $ac_cv_struct_nfs_fh3) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find if struct nfs_gfs_mount exists anywhere in typical headers +AC_DEFUN([AMU_STRUCT_NFS_GFS_MOUNT], +[ +dnl make sure this is called before [AC_TYPE_NFS_FH] +AC_BEFORE([$0], [AC_TYPE_NFS_FH]) +AC_BEFORE([$0], [AC_STRUCT_FIELD_NFS_FH]) +AC_CACHE_CHECK(for struct nfs_gfs_mount, +ac_cv_have_struct_nfs_gfs_mount, +[ +# try to compile a program which may have a definition for the structure +AC_TRY_COMPILE_NFS( +[ struct nfs_gfs_mount ngm; +], ac_cv_have_struct_nfs_gfs_mount=yes, ac_cv_have_struct_nfs_gfs_mount=no) +]) +if test "$ac_cv_have_struct_nfs_gfs_mount" = yes +then + AC_DEFINE(HAVE_STRUCT_NFS_GFS_MOUNT) + AC_DEFINE(nfs_args_t, struct nfs_gfs_mount) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Compile a program with FS headers to try and find a feature. +dnl The headers part are fixed. Only three arguments are allowed: +dnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE) +dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) +dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) +AC_DEFUN([AC_TRY_COMPILE_ANYFS], +[# try to compile a program which may have a definition for a structure +AC_TRY_COMPILE( +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ +], [$1], [$2], [$3]) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Compile a program with NFS headers to try and find a feature. +dnl The headers part are fixed. Only three arguments are allowed: +dnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE) +dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) +dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) +AC_DEFUN([AC_TRY_COMPILE_NFS], +[# try to compile a program which may have a definition for a structure +AC_TRY_COMPILE( +AMU_MOUNT_HEADERS +, [$1], [$2], [$3]) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Compile a program with RPC headers to try and find a feature. +dnl The headers part are fixed. Only three arguments are allowed: +dnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE) +dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) +dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) +AC_DEFUN([AC_TRY_COMPILE_RPC], +[# try to compile a program which may have a definition for a structure +AC_TRY_COMPILE( +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ +/* Prevent multiple inclusion on Ultrix 4 */ +#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) +# include +#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */ +], [$1], [$2], [$3]) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the correct type for the 5th argument to authunix_create() +AC_DEFUN([AMU_TYPE_AUTH_CREATE_GIDLIST], +[ +AC_CACHE_CHECK(argument type of 5rd argument to authunix_create(), +ac_cv_auth_create_gidlist, +[ +# select the correct type +case "${host_os_name}" in + sunos[[34]]* | bsdi2* | sysv4* | hpux10.10 | ultrix* | aix4* ) + ac_cv_auth_create_gidlist="int" ;; + # old macosx used "gid_t" but all newer ones use int + macosx-10.[[0-3]]* ) + ac_cv_auth_create_gidlist="gid_t" ;; + macosx* ) + ac_cv_auth_create_gidlist="int" ;; + *bsd* ) + ac_cv_auth_create_gidlist="int" ;; + * ) + ac_cv_auth_create_gidlist="gid_t" ;; +esac +]) +AC_DEFINE_UNQUOTED(AUTH_CREATE_GIDLIST_TYPE, $ac_cv_auth_create_gidlist) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for AUTOFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_AUTOFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of autofs mount(2) arguments, +ac_cv_type_autofs_args, +[ +# set to a default value +ac_cv_type_autofs_args=notfound + +# look for "struct auto_args" +if test "$ac_cv_type_autofs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct auto_args a; +], ac_cv_type_autofs_args="struct auto_args", ac_cv_type_autofs_args=notfound) +fi + +# look for "struct autofs_args" +if test "$ac_cv_type_autofs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct autofs_args a; +], ac_cv_type_autofs_args="struct autofs_args", ac_cv_type_autofs_args=notfound) +fi + +]) +if test "$ac_cv_type_autofs_args" != notfound +then + AC_DEFINE_UNQUOTED(autofs_args_t, $ac_cv_type_autofs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for CACHEFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_CACHEFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of cachefs mount(2) arguments, +ac_cv_type_cachefs_args, +[ +# set to a default value +ac_cv_type_cachefs_args=notfound +# look for "struct cachefs_mountargs" +if test "$ac_cv_type_cachefs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct cachefs_mountargs a; +], ac_cv_type_cachefs_args="struct cachefs_mountargs", ac_cv_type_cachefs_args=notfound) +fi +]) +if test "$ac_cv_type_cachefs_args" != notfound +then + AC_DEFINE_UNQUOTED(cachefs_args_t, $ac_cv_type_cachefs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for CDFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_CDFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of cdfs mount(2) arguments, +ac_cv_type_cdfs_args, +[ +# set to a default value +ac_cv_type_cdfs_args=notfound + +# look for "struct iso_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct iso_args a; +], ac_cv_type_cdfs_args="struct iso_args", ac_cv_type_cdfs_args=notfound) +fi + +# look for "struct iso9660_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct iso9660_args a; +], ac_cv_type_cdfs_args="struct iso9660_args", ac_cv_type_cdfs_args=notfound) +fi + +# look for "struct cdfs_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct cdfs_args a; +], ac_cv_type_cdfs_args="struct cdfs_args", ac_cv_type_cdfs_args=notfound) +fi + +# look for "struct hsfs_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct hsfs_args a; +], ac_cv_type_cdfs_args="struct hsfs_args", ac_cv_type_cdfs_args=notfound) +fi + +# look for "struct iso_specific" (ultrix) +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct iso_specific a; +], ac_cv_type_cdfs_args="struct iso_specific", ac_cv_type_cdfs_args=notfound) +fi + +]) +if test "$ac_cv_type_cdfs_args" != notfound +then + AC_DEFINE_UNQUOTED(cdfs_args_t, $ac_cv_type_cdfs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for EFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_EFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of efs mount(2) arguments, +ac_cv_type_efs_args, +[ +# set to a default value +ac_cv_type_efs_args=notfound + +# look for "struct efs_args" +if test "$ac_cv_type_efs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct efs_args a; +], ac_cv_type_efs_args="struct efs_args", ac_cv_type_efs_args=notfound) +fi + +]) +if test "$ac_cv_type_efs_args" != notfound +then + AC_DEFINE_UNQUOTED(efs_args_t, $ac_cv_type_efs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for LOFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_LOFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of lofs mount(2) arguments, +ac_cv_type_lofs_args, +[ +# set to a default value +ac_cv_type_lofs_args=notfound +# look for "struct lofs_args" +if test "$ac_cv_type_lofs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct lofs_args a; +], ac_cv_type_lofs_args="struct lofs_args", ac_cv_type_lofs_args=notfound) +fi +# look for "struct lo_args" +if test "$ac_cv_type_lofs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct lo_args a; +], ac_cv_type_lofs_args="struct lo_args", ac_cv_type_lofs_args=notfound) +fi +]) +if test "$ac_cv_type_lofs_args" != notfound +then + AC_DEFINE_UNQUOTED(lofs_args_t, $ac_cv_type_lofs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for MFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_MFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of mfs mount(2) arguments, +ac_cv_type_mfs_args, +[ +# set to a default value +ac_cv_type_mfs_args=notfound +# look for "struct mfs_args" +if test "$ac_cv_type_mfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct mfs_args a; +], ac_cv_type_mfs_args="struct mfs_args", ac_cv_type_mfs_args=notfound) +fi +]) +if test "$ac_cv_type_mfs_args" != notfound +then + AC_DEFINE_UNQUOTED(mfs_args_t, $ac_cv_type_mfs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for PC/FS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_PCFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of pcfs mount(2) arguments, +ac_cv_type_pcfs_args, +[ +# set to a default value +ac_cv_type_pcfs_args=notfound + +# look for "struct msdos_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct msdos_args a; +], ac_cv_type_pcfs_args="struct msdos_args", ac_cv_type_pcfs_args=notfound) +fi + +# look for "struct pc_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct pc_args a; +], ac_cv_type_pcfs_args="struct pc_args", ac_cv_type_pcfs_args=notfound) +fi + +# look for "struct pcfs_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct pcfs_args a; +], ac_cv_type_pcfs_args="struct pcfs_args", ac_cv_type_pcfs_args=notfound) +fi + +# look for "struct msdosfs_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct msdosfs_args a; +], ac_cv_type_pcfs_args="struct msdosfs_args", ac_cv_type_pcfs_args=notfound) +fi + +]) + +if test "$ac_cv_type_pcfs_args" != notfound +then + AC_DEFINE_UNQUOTED(pcfs_args_t, $ac_cv_type_pcfs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check for type of pte_t (for Irix, usually in ) +dnl Note: some gcc's on Irix 6.5 are broken and don't recognize pte_t, +dnl so I'm defining it here to unsigned int, which is not necessarily correct, +dnl but at least it gets am-utils to compile. +AC_DEFUN([AMU_TYPE_PTE_T], +[AC_CHECK_TYPE(pte_t, , +[AC_DEFINE_UNQUOTED(pte_t, unsigned int, + [Check if pte_t is defined in ])], +[ +#ifdef HAVE_SYS_IMMU_H +# include +#endif /* HAVE_SYS_IMMU_H */ +])]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the correct type for the 6th argument to recvfrom() +AC_DEFUN([AMU_TYPE_RECVFROM_FROMLEN], +[ +AC_CACHE_CHECK(non-pointer type of 6th (fromlen) argument to recvfrom(), +ac_cv_recvfrom_fromlen, +[ +# select the correct type +case "${host_os}" in + linux* ) + ac_cv_recvfrom_fromlen="unsigned int" ;; + aix[[1-3]]* ) + ac_cv_recvfrom_fromlen="int" ;; + aix* ) + ac_cv_recvfrom_fromlen="size_t" ;; + # old macosx used "int" but all newer ones use socklen_t + macosx-10.[[0-3]]* ) + ac_cv_recvfrom_fromlen="int" ;; + macosx* ) + ac_cv_recvfrom_fromlen="socklen_t" ;; + *bsd* ) + ac_cv_recvfrom_fromlen="socklen_t" ;; + * ) + ac_cv_recvfrom_fromlen="int" ;; +esac +]) +AC_DEFINE_UNQUOTED(RECVFROM_FROMLEN_TYPE, $ac_cv_recvfrom_fromlen) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for RFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_RFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of rfs mount(2) arguments, +ac_cv_type_rfs_args, +[ +# set to a default value +ac_cv_type_rfs_args=notfound +# look for "struct rfs_args" +if test "$ac_cv_type_rfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct rfs_args a; +], ac_cv_type_rfs_args="struct rfs_args", ac_cv_type_rfs_args=notfound) +fi +]) +if test "$ac_cv_type_rfs_args" != notfound +then + AC_DEFINE_UNQUOTED(rfs_args_t, $ac_cv_type_rfs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check for type of rpcvers_t (usually in ) +AC_DEFUN([AMU_TYPE_RPCVERS_T], +[AC_CHECK_TYPE(rpcvers_t, , +[AC_DEFINE_UNQUOTED(rpcvers_t, unsigned long, [Check if rpcvers_t is defined in ])], +[ +#ifdef HAVE_RPC_TYPES_H +# include +#endif /* HAVE_RPC_TYPES_H */ +])]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the type of the 3rd argument (in) to svc_sendreply() call +AC_DEFUN([AMU_TYPE_SVC_IN_ARG], +[ +AC_CACHE_CHECK(for type of 3rd arg ('in') arg to svc_sendreply(), +ac_cv_type_svc_in_arg, +[ +# try to compile a program which may have a definition for the type +dnl need a series of compilations, which will test out every possible type +dnl such as caddr_t, char *, etc. +# set to a default value +ac_cv_type_svc_in_arg=notfound +# look for "caddr_t" +if test "$ac_cv_type_svc_in_arg" = notfound +then +AC_TRY_COMPILE_RPC( +[ SVCXPRT *SX; + xdrproc_t xp; + caddr_t p; + svc_sendreply(SX, xp, p); +], ac_cv_type_svc_in_arg="caddr_t", ac_cv_type_svc_in_arg=notfound) +fi +# look for "char *" +if test "$ac_cv_type_svc_in_arg" = notfound +then +AC_TRY_COMPILE_RPC( +[ SVCXPRT *SX; + xdrproc_t xp; + char *p; + svc_sendreply(SX, xp, p); +], ac_cv_type_svc_in_arg="char *", ac_cv_type_svc_in_arg=notfound) +fi +]) +if test "$ac_cv_type_svc_in_arg" != notfound +then + AC_DEFINE_UNQUOTED(SVC_IN_ARG_TYPE, $ac_cv_type_svc_in_arg) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check for type of time_t (usually in ) +AC_DEFUN([AMU_TYPE_TIME_T], +[AC_CHECK_TYPE(time_t, long)]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for TMPFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_TMPFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of tmpfs mount(2) arguments, +ac_cv_type_tmpfs_args, +[ +# set to a default value +ac_cv_type_tmpfs_args=notfound +# look for "struct tmpfs_args" +if test "$ac_cv_type_tmpfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct tmpfs_args a; +], ac_cv_type_tmpfs_args="struct tmpfs_args", ac_cv_type_tmpfs_args=notfound) +fi +]) +if test "$ac_cv_type_tmpfs_args" != notfound +then + AC_DEFINE_UNQUOTED(tmpfs_args_t, $ac_cv_type_tmpfs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for UDF mount(2) arguments structure +AC_DEFUN([AMU_TYPE_UDF_ARGS], +[ +AC_CACHE_CHECK(for structure type of udf mount(2) arguments, +ac_cv_type_udf_args, +[ +# set to a default value +ac_cv_type_udf_args=notfound + +# look for "struct udf_args" +if test "$ac_cv_type_udf_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct udf_args a; +], ac_cv_type_udf_args="struct udf_args", ac_cv_type_udf_args=notfound) +fi + +]) +if test "$ac_cv_type_udf_args" != notfound +then + AC_DEFINE_UNQUOTED(udf_args_t, $ac_cv_type_udf_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for UFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_UFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of ufs mount(2) arguments, +ac_cv_type_ufs_args, +[ +# set to a default value +ac_cv_type_ufs_args=notfound + +# look for "struct ufs_args" +if test "$ac_cv_type_ufs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct ufs_args a; +], ac_cv_type_ufs_args="struct ufs_args", ac_cv_type_ufs_args=notfound) +fi + +# look for "struct efs_args" (irix) +if test "$ac_cv_type_ufs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct efs_args a; +], ac_cv_type_ufs_args="struct efs_args", ac_cv_type_ufs_args=notfound) +fi + +# look for "struct ufs_specific" (ultrix) +if test "$ac_cv_type_ufs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct ufs_specific a; +], ac_cv_type_ufs_args="struct ufs_specific", ac_cv_type_ufs_args=notfound) +fi + +]) +if test "$ac_cv_type_ufs_args" != notfound +then + AC_DEFINE_UNQUOTED(ufs_args_t, $ac_cv_type_ufs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check for type of xdrproc_t (usually in ) +AC_DEFUN([AMU_TYPE_XDRPROC_T], +[ +AC_CACHE_CHECK(for xdrproc_t, +ac_cv_type_xdrproc_t, +[ +# try to compile a program which may have a definition for the type +dnl need a series of compilations, which will test out every possible type +# look for "xdrproc_t" +AC_TRY_COMPILE_RPC( +[ xdrproc_t xdr_int; +], ac_cv_type_xdrproc_t=yes, ac_cv_type_xdrproc_t=no) +]) +if test "$ac_cv_type_xdrproc_t" = yes +then + AC_DEFINE_UNQUOTED(XDRPROC_T_TYPE, xdrproc_t) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Find the correct type for XFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_XFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of xfs mount(2) arguments, +ac_cv_type_xfs_args, +[ +# set to a default value +ac_cv_type_xfs_args=notfound + +# look for "struct xfs_args" +if test "$ac_cv_type_xfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct xfs_args a; +], ac_cv_type_xfs_args="struct xfs_args", ac_cv_type_xfs_args=notfound) +fi + +]) +if test "$ac_cv_type_xfs_args" != notfound +then + AC_DEFINE_UNQUOTED(xfs_args_t, $ac_cv_type_xfs_args) +fi +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl check the correct type for the 3rd argument to yp_order() +AC_DEFUN([AMU_TYPE_YP_ORDER_OUTORDER], +[ +AC_CACHE_CHECK(pointer type of 3rd argument to yp_order(), +ac_cv_yp_order_outorder, +[ +# select the correct type +case "${host_os}" in + aix[[1-3]]* | aix4.[[0-2]]* | sunos[[34]]* | solaris1* ) + ac_cv_yp_order_outorder=int ;; + solaris* | svr4* | sysv4* | sunos* | hpux* | aix* ) + ac_cv_yp_order_outorder="unsigned long" ;; + linux* | osf* ) + # DU4 man page is wrong, headers are right + ac_cv_yp_order_outorder="unsigned int" ;; + * ) + ac_cv_yp_order_outorder=int ;; +esac +]) +AC_DEFINE_UNQUOTED(YP_ORDER_OUTORDER_TYPE, $ac_cv_yp_order_outorder) +]) +dnl ====================================================================== + + +dnl ###################################################################### +dnl Do we want to compile with "ADDON" support? (hesiod, ldap, etc.) +AC_DEFUN([AMU_WITH_ADDON], +[AC_MSG_CHECKING([if $1 is wanted]) +ac_upcase=`echo $1|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +AC_ARG_WITH($1, + AC_HELP_STRING([--with-$1], + [enable $2 support (default=yes if found)] +),[ +if test "$withval" = "yes"; then + with_$1=yes +elif test "$withval" = "no"; then + with_$1=no +else + AC_MSG_ERROR(please use \"yes\" or \"no\" with --with-$1) +fi +],[ +with_$1=yes +]) +if test "$with_$1" = "yes" +then + AC_MSG_RESULT([yes, will enable if all libraries are found]) +else + AC_MSG_RESULT([no]) +fi +]) + + +dnl ###################################################################### +dnl end of aclocal.m4 for am-utils-6.x diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 00000000000..d0b9838e7b5 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1233 @@ +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.14' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.14.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.14.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Copyright (C) 1998-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_LEX +# ----------- +# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a +# "missing" invocation, for better error output. +AC_DEFUN([AM_PROG_LEX], +[AC_PREREQ([2.50])dnl +AC_REQUIRE([AM_MISSING_HAS_RUN])dnl +AC_REQUIRE([AC_PROG_LEX])dnl +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# -*- Autoconf -*- +# Obsolete and "removed" macros, that must however still report explicit +# error messages when used, to smooth transition. +# +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +AC_DEFUN([AM_CONFIG_HEADER], +[AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl +AC_CONFIG_HEADERS($@)]) + +AC_DEFUN([AM_PROG_CC_STDC], +[AC_PROG_CC +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should simply use the 'AC][_PROG_CC' macro instead. +Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', +but upon 'ac_cv_prog_cc_stdc'.])]) + +AC_DEFUN([AM_C_PROTOTYPES], + [AC_FATAL([automatic de-ANSI-fication support has been removed])]) +AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([acinclude.m4]) diff --git a/amd/Makefile.am b/amd/Makefile.am new file mode 100644 index 00000000000..8be0bfc524f --- /dev/null +++ b/amd/Makefile.am @@ -0,0 +1,171 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Makefile for amd/ directory +# Author: Erez Zadok + +# no need for libaminfo to be yet another dynamic library +noinst_LIBRARIES = libaminfo.a +sbin_PROGRAMS = amd sun2amd + +# man pages +man_MANS = amd.8 sun2amd.8 + +YLWRAP= $(top_srcdir)/ylwrap.amd + +# test scripts +TESTS = test1.sh + +# headers this depends on, not to be installed +noinst_HEADERS = amd.h sun_map.h + +# sources which get auto-built (from yacc/lex) +BUILT_SOURCES = \ + conf_parse.c conf_parse.h conf_tok.c \ + sun_map_parse.c sun_map_parse.h sun_map_tok.c +AM_YFLAGS = -d + +############################################################################## +# *.y must be listed before *.l, because of a bug in automake-1.2 +# which will not generate the .h needs for the lex file from the yacc file. +# I took out the conf .y/.l files b/c of bad interaction between bsd44 make +# and automake-1.2 rules. +libaminfo_a_SOURCES = \ + sun_map_parse.y \ + sun_map_tok.l \ + sun_map.c + +# the complete list of all optional sources for libaminfo +EXTRA_libaminfo_a_SOURCES = \ + info_file.c \ + info_exec.c \ + info_hesiod.c \ + info_ldap.c \ + info_ndbm.c \ + info_nis.c \ + info_nisplus.c \ + info_passwd.c \ + info_sun.c \ + info_union.c + +# AMD_INFO_OBJS: a list of info_*.o objects added, depending on which map +# types this system supports. +EXTRA_libaminfo_a_OBJECTS = @AMD_INFO_OBJS@ +libaminfo_a_LIBADD = @AMD_INFO_OBJS@ +libaminfo_a_DEPENDENCIES = @AMD_INFO_OBJS@ + +############################################################################## +# sources needed: note .y and .l files have to be first +# get_args.c is handled separately +amd_SOURCES = \ + conf_parse.y \ + conf_tok.l \ + \ + am_ops.c \ + amd.c \ + amfs_auto.c \ + amfs_direct.c \ + amfs_error.c \ + amfs_generic.c \ + amfs_host.c \ + amfs_link.c \ + amfs_linkx.c \ + amfs_nfsl.c \ + amfs_nfsx.c \ + amfs_program.c \ + amfs_root.c \ + amfs_toplvl.c \ + amfs_union.c \ + amq_subr.c \ + amq_svc.c \ + autil.c \ + clock.c \ + conf.c \ + map.c \ + mapc.c \ + mntfs.c \ + nfs_prot_svc.c \ + nfs_start.c \ + nfs_subr.c \ + opts.c \ + readdir.c \ + restart.c \ + rpc_fwd.c \ + sched.c \ + srvr_amfs_auto.c \ + srvr_nfs.c + +# the complete list of all optional sources for amd +EXTRA_amd_SOURCES = \ + ops_cachefs.c \ + ops_cdfs.c \ + ops_efs.c \ + ops_ext.c \ + ops_lofs.c \ + ops_lustre.c \ + ops_mfs.c \ + ops_nfs.c \ + ops_nfs3.c \ + ops_nfs4.c \ + ops_nullfs.c \ + ops_pcfs.c \ + ops_tfs.c \ + ops_tmpfs.c \ + ops_udf.c \ + ops_ufs.c \ + ops_umapfs.c \ + ops_unionfs.c \ + ops_xfs.c \ + \ + get_args.c + +# AMD_FS_OBJS: a list of ops_*.o objects added, depending on which +# filesystem types this system supports. +EXTRA_amd_OBJECTS = @AMD_FS_OBJS@ +amd_LDADD = $(EXTRA_amd_OBJECTS) get_args.o libaminfo.a ../libamu/libamu.la + +############################################################################## +sun2amd_SOURCES = \ + sun2amd.c + +sun2amd_LDADD = libaminfo.a ../libamu/libamu.la + +############################################################################## +# must manually add f/lex library to LIBS, and not to LDADD. +##LIBS = @LIBS@ @LEXLIB@ @WRAPLIB@ +# f/lex libraries are incomatible with multiple scanners: don't include +LIBS = @LIBS@ @WRAPLIB@ + +# additional files to distribute and clean +EXTRA_DIST = ops_TEMPLATE.c $(man_MANS) $(TESTS) +CLEANFILES = $(BUILT_SOURCES) +DISTCLEANFILES = build_version.h ops_autofs.c + +# do not distribute files that should be generated by lex/yacc locally +dist-hook: + (cd $(distdir) && rm -f $(BUILT_SOURCES)) + +AM_CPPFLAGS = -I$(top_srcdir)/include + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AM_CFLAGS = $(AMU_CFLAGS) + +# dependencies +$(PROGRAMS): $(LDADD) +get_args.o: build_version.h +$(amd_OBJECTS) $(EXTRA_amd_OBJECTS) $(sun2amd_OBJECTS) $(libaminfo_a_OBJECTS) $(EXTRA_libaminfo_a_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + @AMU_AUTOFS_PROT_HEADER@ \ + $(noinst_HEADERS) + +# auto-generate build number +build_version.h: $(amd_OBJECTS) $(EXTRA_amd_OBJECTS) $(libaminfo_a_OBJECTS) $(EXTRA_libaminfo_a_OBJECTS) get_args.c + $(top_srcdir)/m4/update_build_version diff --git a/amd/Makefile.in b/amd/Makefile.in new file mode 100644 index 00000000000..03b654e439d --- /dev/null +++ b/amd/Makefile.in @@ -0,0 +1,1379 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Makefile for amd/ directory +# Author: Erez Zadok + + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +sbin_PROGRAMS = amd$(EXEEXT) sun2amd$(EXEEXT) +subdir = amd +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs sun_map_parse.h sun_map_parse.c \ + sun_map_tok.c conf_parse.h conf_parse.c conf_tok.c \ + $(top_srcdir)/depcomp $(top_srcdir)/ylwrap $(noinst_HEADERS) \ + $(top_srcdir)/test-driver +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libaminfo_a_AR = $(AR) $(ARFLAGS) +am_libaminfo_a_OBJECTS = sun_map_parse.$(OBJEXT) sun_map_tok.$(OBJEXT) \ + sun_map.$(OBJEXT) +libaminfo_a_OBJECTS = $(am_libaminfo_a_OBJECTS) +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" +PROGRAMS = $(sbin_PROGRAMS) +am_amd_OBJECTS = conf_parse.$(OBJEXT) conf_tok.$(OBJEXT) \ + am_ops.$(OBJEXT) amd.$(OBJEXT) amfs_auto.$(OBJEXT) \ + amfs_direct.$(OBJEXT) amfs_error.$(OBJEXT) \ + amfs_generic.$(OBJEXT) amfs_host.$(OBJEXT) amfs_link.$(OBJEXT) \ + amfs_linkx.$(OBJEXT) amfs_nfsl.$(OBJEXT) amfs_nfsx.$(OBJEXT) \ + amfs_program.$(OBJEXT) amfs_root.$(OBJEXT) \ + amfs_toplvl.$(OBJEXT) amfs_union.$(OBJEXT) amq_subr.$(OBJEXT) \ + amq_svc.$(OBJEXT) autil.$(OBJEXT) clock.$(OBJEXT) \ + conf.$(OBJEXT) map.$(OBJEXT) mapc.$(OBJEXT) mntfs.$(OBJEXT) \ + nfs_prot_svc.$(OBJEXT) nfs_start.$(OBJEXT) nfs_subr.$(OBJEXT) \ + opts.$(OBJEXT) readdir.$(OBJEXT) restart.$(OBJEXT) \ + rpc_fwd.$(OBJEXT) sched.$(OBJEXT) srvr_amfs_auto.$(OBJEXT) \ + srvr_nfs.$(OBJEXT) +amd_OBJECTS = $(am_amd_OBJECTS) +am__DEPENDENCIES_1 = +amd_DEPENDENCIES = $(am__DEPENDENCIES_1) get_args.o libaminfo.a \ + ../libamu/libamu.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_sun2amd_OBJECTS = sun2amd.$(OBJEXT) +sun2amd_OBJECTS = $(am_sun2amd_OBJECTS) +sun2amd_DEPENDENCIES = libaminfo.a ../libamu/libamu.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) +AM_V_LEX = $(am__v_LEX_@AM_V@) +am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) +am__v_LEX_0 = @echo " LEX " $@; +am__v_LEX_1 = +@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_@AM_V@) +am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) +am__v_YACC_0 = @echo " YACC " $@; +am__v_YACC_1 = +SOURCES = $(libaminfo_a_SOURCES) $(EXTRA_libaminfo_a_SOURCES) \ + $(amd_SOURCES) $(EXTRA_amd_SOURCES) $(sun2amd_SOURCES) +DIST_SOURCES = $(libaminfo_a_SOURCES) $(EXTRA_libaminfo_a_SOURCES) \ + $(amd_SOURCES) $(EXTRA_amd_SOURCES) $(sun2amd_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ + +############################################################################## +# must manually add f/lex library to LIBS, and not to LDADD. +# f/lex libraries are incomatible with multiple scanners: don't include +LIBS = @LIBS@ @WRAPLIB@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# no need for libaminfo to be yet another dynamic library +noinst_LIBRARIES = libaminfo.a + +# man pages +man_MANS = amd.8 sun2amd.8 +YLWRAP = $(top_srcdir)/ylwrap.amd + +# test scripts +TESTS = test1.sh + +# headers this depends on, not to be installed +noinst_HEADERS = amd.h sun_map.h + +# sources which get auto-built (from yacc/lex) +BUILT_SOURCES = \ + conf_parse.c conf_parse.h conf_tok.c \ + sun_map_parse.c sun_map_parse.h sun_map_tok.c + +AM_YFLAGS = -d + +############################################################################## +# *.y must be listed before *.l, because of a bug in automake-1.2 +# which will not generate the .h needs for the lex file from the yacc file. +# I took out the conf .y/.l files b/c of bad interaction between bsd44 make +# and automake-1.2 rules. +libaminfo_a_SOURCES = \ + sun_map_parse.y \ + sun_map_tok.l \ + sun_map.c + + +# the complete list of all optional sources for libaminfo +EXTRA_libaminfo_a_SOURCES = \ + info_file.c \ + info_exec.c \ + info_hesiod.c \ + info_ldap.c \ + info_ndbm.c \ + info_nis.c \ + info_nisplus.c \ + info_passwd.c \ + info_sun.c \ + info_union.c + + +# AMD_INFO_OBJS: a list of info_*.o objects added, depending on which map +# types this system supports. +EXTRA_libaminfo_a_OBJECTS = @AMD_INFO_OBJS@ +libaminfo_a_LIBADD = @AMD_INFO_OBJS@ +libaminfo_a_DEPENDENCIES = @AMD_INFO_OBJS@ + +############################################################################## +# sources needed: note .y and .l files have to be first +# get_args.c is handled separately +amd_SOURCES = \ + conf_parse.y \ + conf_tok.l \ + \ + am_ops.c \ + amd.c \ + amfs_auto.c \ + amfs_direct.c \ + amfs_error.c \ + amfs_generic.c \ + amfs_host.c \ + amfs_link.c \ + amfs_linkx.c \ + amfs_nfsl.c \ + amfs_nfsx.c \ + amfs_program.c \ + amfs_root.c \ + amfs_toplvl.c \ + amfs_union.c \ + amq_subr.c \ + amq_svc.c \ + autil.c \ + clock.c \ + conf.c \ + map.c \ + mapc.c \ + mntfs.c \ + nfs_prot_svc.c \ + nfs_start.c \ + nfs_subr.c \ + opts.c \ + readdir.c \ + restart.c \ + rpc_fwd.c \ + sched.c \ + srvr_amfs_auto.c \ + srvr_nfs.c + + +# the complete list of all optional sources for amd +EXTRA_amd_SOURCES = \ + ops_cachefs.c \ + ops_cdfs.c \ + ops_efs.c \ + ops_ext.c \ + ops_lofs.c \ + ops_lustre.c \ + ops_mfs.c \ + ops_nfs.c \ + ops_nfs3.c \ + ops_nfs4.c \ + ops_nullfs.c \ + ops_pcfs.c \ + ops_tfs.c \ + ops_tmpfs.c \ + ops_udf.c \ + ops_ufs.c \ + ops_umapfs.c \ + ops_unionfs.c \ + ops_xfs.c \ + \ + get_args.c + + +# AMD_FS_OBJS: a list of ops_*.o objects added, depending on which +# filesystem types this system supports. +EXTRA_amd_OBJECTS = @AMD_FS_OBJS@ +amd_LDADD = $(EXTRA_amd_OBJECTS) get_args.o libaminfo.a ../libamu/libamu.la + +############################################################################## +sun2amd_SOURCES = \ + sun2amd.c + +sun2amd_LDADD = libaminfo.a ../libamu/libamu.la + +# additional files to distribute and clean +EXTRA_DIST = ops_TEMPLATE.c $(man_MANS) $(TESTS) +CLEANFILES = $(BUILT_SOURCES) +DISTCLEANFILES = build_version.h ops_autofs.c +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(AMU_CFLAGS) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .l .lo .log .o .obj .test .test$(EXEEXT) .trs .y +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu amd/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu amd/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +sun_map_parse.h: sun_map_parse.c + @if test ! -f $@; then rm -f sun_map_parse.c; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) sun_map_parse.c; else :; fi + +libaminfo.a: $(libaminfo_a_OBJECTS) $(libaminfo_a_DEPENDENCIES) $(EXTRA_libaminfo_a_DEPENDENCIES) + $(AM_V_at)-rm -f libaminfo.a + $(AM_V_AR)$(libaminfo_a_AR) libaminfo.a $(libaminfo_a_OBJECTS) $(libaminfo_a_LIBADD) + $(AM_V_at)$(RANLIB) libaminfo.a +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +conf_parse.h: conf_parse.c + @if test ! -f $@; then rm -f conf_parse.c; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) conf_parse.c; else :; fi + +amd$(EXEEXT): $(amd_OBJECTS) $(amd_DEPENDENCIES) $(EXTRA_amd_DEPENDENCIES) + @rm -f amd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(amd_OBJECTS) $(amd_LDADD) $(LIBS) + +sun2amd$(EXEEXT): $(sun2amd_OBJECTS) $(sun2amd_DEPENDENCIES) $(EXTRA_sun2amd_DEPENDENCIES) + @rm -f sun2amd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sun2amd_OBJECTS) $(sun2amd_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/am_ops.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_auto.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_direct.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_error.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_generic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_host.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_link.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_linkx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_nfsl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_nfsx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_program.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_root.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_toplvl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amfs_union.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amq_subr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amq_svc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/autil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf_parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf_tok.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_args.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_exec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_hesiod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_ldap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_ndbm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_nis.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_nisplus.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_passwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_sun.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_union.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mntfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nfs_prot_svc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nfs_start.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nfs_subr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_cachefs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_cdfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_efs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_ext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_lofs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_lustre.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_mfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_nfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_nfs3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_nfs4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_nullfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_pcfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_tfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_tmpfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_udf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_ufs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_umapfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_unionfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops_xfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpc_fwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srvr_amfs_auto.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srvr_nfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun2amd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_map.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_map_parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_map_tok.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +.l.c: + $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + +.y.c: + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man8: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test1.sh.log: test1.sh + @p='test1.sh'; \ + b='test1.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f conf_parse.c + -rm -f conf_parse.h + -rm -f conf_tok.c + -rm -f sun_map_parse.c + -rm -f sun_map_parse.h + -rm -f sun_map_tok.c + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + clean-sbinPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-sbinPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man uninstall-sbinPROGRAMS + +uninstall-man: uninstall-man8 + +.MAKE: all check check-am install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-generic clean-libtool clean-noinstLIBRARIES \ + clean-sbinPROGRAMS cscopelist-am ctags ctags-am dist-hook \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man8 install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am recheck tags tags-am uninstall \ + uninstall-am uninstall-man uninstall-man8 \ + uninstall-sbinPROGRAMS + + +# do not distribute files that should be generated by lex/yacc locally +dist-hook: + (cd $(distdir) && rm -f $(BUILT_SOURCES)) + +# dependencies +$(PROGRAMS): $(LDADD) +get_args.o: build_version.h +$(amd_OBJECTS) $(EXTRA_amd_OBJECTS) $(sun2amd_OBJECTS) $(libaminfo_a_OBJECTS) $(EXTRA_libaminfo_a_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + @AMU_AUTOFS_PROT_HEADER@ \ + $(noinst_HEADERS) + +# auto-generate build number +build_version.h: $(amd_OBJECTS) $(EXTRA_amd_OBJECTS) $(libaminfo_a_OBJECTS) $(EXTRA_libaminfo_a_OBJECTS) get_args.c + $(top_srcdir)/m4/update_build_version + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/amd/am_ops.c b/amd/am_ops.c index 5a5c33650ec..4d07dc807d9 100644 --- a/amd/am_ops.c +++ b/amd/am_ops.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -96,6 +92,11 @@ static am_ops *vops[] = #ifdef HAVE_FS_XFS &xfs_ops, /* Unix (irix) F/S */ #endif /* HAVE_FS_XFS */ +#ifdef HAVE_FS_EXT + &ext2_ops, /* Unix (linux) F/S */ + &ext3_ops, /* Unix (linux) F/S */ + &ext4_ops, /* Unix (linux) F/S */ +#endif /* HAVE_FS_EXT */ #ifdef HAVE_FS_EFS &efs_ops, /* Unix (irix) F/S */ #endif /* HAVE_FS_EFS */ @@ -111,6 +112,9 @@ static am_ops *vops[] = #ifdef HAVE_FS_CACHEFS &cachefs_ops, /* caching F/S */ #endif /* HAVE_FS_CACHEFS */ +#ifdef HAVE_FS_TMPFS + &tmpfs_ops, /* /tmp (in memory) F/S */ +#endif /* HAVE_FS_TMPFS */ #ifdef HAVE_FS_NULLFS /* FILL IN */ /* null (loopback) F/S */ #endif /* HAVE_FS_NULLFS */ @@ -120,6 +124,12 @@ static am_ops *vops[] = #ifdef HAVE_FS_UMAPFS /* FILL IN */ /* uid/gid mapping F/S */ #endif /* HAVE_FS_UMAPFS */ +#ifdef HAVE_FS_UDF + &udf_ops, /* UDF F/S */ +#endif /* HAVE_FS_UDF */ +#ifdef HAVE_FS_LUSTRE + &lustre_ops, /* Lustre */ +#endif /* HAVE_FS_LUSTRE */ /* * These 4 should be last, in the order: @@ -316,7 +326,7 @@ merge_opts(const char *opts1, const char *opts2) char oneopt[80]; /* one option w/o value if any */ char *revoneopt; /* reverse of oneopt */ size_t len = strlen(opts1) + strlen(opts2) + 2; /* space for "," and NULL */ - char *s1 = strdup(opts1); /* copy of opts1 to munge */ + char *s1 = xstrdup(opts1); /* copy of opts1 to munge */ /* initialization */ mnt2.mnt_opts = (char *) opts2; @@ -327,13 +337,13 @@ merge_opts(const char *opts1, const char *opts2) tmpstr; tmpstr = strtok(NULL, ",")) { /* copy option to temp buffer */ - xstrlcpy(oneopt, tmpstr, 80); + xstrlcpy(oneopt, tmpstr, sizeof(oneopt)); /* if option has a value such as rsize=1024, chop the value part */ - if ((eq = haseq(oneopt))) + if ((eq = strchr(oneopt, '='))) *eq = '\0'; /* find reverse option of oneopt */ revoneopt = reverse_option(oneopt); - /* if option orits reverse exist in opts2, ignore it */ + /* if option or its reverse exist in opts2, ignore it */ if (amu_hasmntopt(&mnt2, oneopt) || amu_hasmntopt(&mnt2, revoneopt)) continue; /* add option to returned string */ @@ -362,7 +372,7 @@ am_ops * ops_search(char *type) { am_ops **vp; - am_ops *rop = 0; + am_ops *rop = NULL; for (vp = vops; (rop = *vp); vp++) if (STREQ(rop->fs_type, type)) break; @@ -373,7 +383,7 @@ ops_search(char *type) am_ops * ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map) { - am_ops *rop = 0; + am_ops *rop = NULL; char *link_dir; /* @@ -400,7 +410,7 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map * Otherwise skip past any leading '-'. */ if (fo->opt_opts == 0) - fo->opt_opts = strdup("rw,defaults"); + fo->opt_opts = xstrdup("rw,defaults"); else if (*fo->opt_opts == '-') { /* * We cannot simply do fo->opt_opts++ here since the opts @@ -408,7 +418,7 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map * So just reallocate the thing -- stolcke 11/11/94 */ char *old = fo->opt_opts; - fo->opt_opts = strdup(old + 1); + fo->opt_opts = xstrdup(old + 1); XFREE(old); } @@ -426,7 +436,7 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map XFREE(fo->opt_opts); XFREE(fo->opt_remopts); fo->opt_opts = mergedstr; - fo->opt_remopts = strdup(mergedstr); + fo->opt_remopts = xstrdup(mergedstr); } else { char *mergedstr, *remmergedstr; mergedstr = merge_opts(fo->opt_opts, fo->opt_addopts); @@ -451,7 +461,7 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map /* Normalize the sublink and make it absolute */ link_dir = fo->opt_sublink; if (link_dir && link_dir[0] && link_dir[0] != '/') { - link_dir = str3cat((char *) 0, fo->opt_fs, "/", link_dir); + link_dir = str3cat((char *) NULL, fo->opt_fs, "/", link_dir); normalize_slash(link_dir); XFREE(fo->opt_sublink); fo->opt_sublink = link_dir; @@ -460,8 +470,7 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym, char *map /* * Check the filesystem is happy */ - if (fo->fs_mtab) - XFREE(fo->fs_mtab); + XFREE(fo->fs_mtab); fo->fs_mtab = rop->fs_match(fo); if (fo->fs_mtab) diff --git a/amd/amd.8 b/amd/amd.8 index 565a5505b8c..0440c7b8d46 100644 --- a/amd/amd.8 +++ b/amd/amd.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1989 Jan-Simon Pendry .\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -36,9 +32,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %W% (Berkeley) %G% .\" -.\" $Id: amd.8,v 1.14.2.1 2006/01/02 18:48:23 ezk Exp $ +.\" File: am-utils/amd/amd.8 .\" .TH AMD 8 "3 November 1989" .SH NAME @@ -237,7 +232,8 @@ The default is 2 minutes. .TP .BI \-x " options" Specify run-time logging options. The options are a comma separated -list chosen from: fatal, error, user, warn, info, map, stats, all. +list chosen from: fatal, error, user, warn, info, map, stats, defaults, and +all. Note that "fatal" and "error" are mandatory and cannot be turned off. .TP .BI \-y " domain" @@ -340,15 +336,15 @@ number of process context switches. A weird imagination is most useful to gain full advantage of all the features. .SH "SEE ALSO" -.BR amd.conf (5), .BR amq (8), .BR domainname (1), .BR hostname (1), +.BR syslog (3). +.BR amd.conf (5), +.BR mtab (5), .BR automount (8), .BR mount (8), .BR umount (8), -.BR mtab (5), -.BR syslog (3). .LP ``am-utils'' .BR info (1) diff --git a/amd/amd.c b/amd/amd.c index 37eab5d8442..d06b713c0e2 100644 --- a/amd/amd.c +++ b/amd/amd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -375,7 +371,7 @@ do_memory_locking(void) #endif /* HAVE_PLOCK || HAVE_MLOCKALL */ #if defined(HAVE_MADVISE) && defined(MADV_PROTECT) - madvise(0, 0, MADV_PROTECT); /* may be redundant of the above worked out */ + madvise(NULL, 0, MADV_PROTECT); /* may be redundant of the above worked out */ #endif /* defined(HAVE_MADVISE) && defined(MADV_PROTECT) */ } @@ -427,6 +423,7 @@ main(int argc, char *argv[]) if (gethostname(hostname, sizeof(hostname)) < 0) { plog(XLOG_FATAL, "gethostname: %m"); going_down(1); + return 1; } hostname[sizeof(hostname) - 1] = '\0'; @@ -436,6 +433,7 @@ main(int argc, char *argv[]) if (!*hostname) { plog(XLOG_FATAL, "host name is not set"); going_down(1); + return 1; } /* @@ -494,7 +492,8 @@ main(int argc, char *argv[]) getwire(&PrimNetName, &PrimNetNum); /* - * Determine command-line arguments + * Determine command-line arguments. + * (Also initialize amd.conf parameters, maps, and more.) */ get_args(argc, argv); @@ -528,6 +527,7 @@ main(int argc, char *argv[]) if (geteuid() != 0) { plog(XLOG_FATAL, "Must be root to mount filesystems (euid = %ld)", (long) geteuid()); going_down(1); + return 1; } #ifdef HAVE_MAP_NIS @@ -539,10 +539,11 @@ main(int argc, char *argv[]) if (gopt.nis_domain && yp_bind(gopt.nis_domain)) { plog(XLOG_FATAL, "Can't bind to NIS domain \"%s\"", gopt.nis_domain); going_down(1); + return 1; } #endif /* HAVE_MAP_NIS */ - if (!amuDebug(D_DAEMON)) + if (amuDebug(D_DAEMON)) ppid = daemon_mode(); /* diff --git a/amd/amd.h b/amd/amd.h index 0e371b72a5b..f66f5b75169 100644 --- a/amd/amd.h +++ b/amd/amd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -54,9 +50,12 @@ * that support mtab on file. */ #ifdef MOUNT_TABLE_ON_FILE -# define DEBUG_MNTTAB_FILE "/tmp/mnttab" +# define DEBUG_MNTTAB_FILE "/tmp/mtab" #endif /* MOUNT_TABLE_ON_FILE */ +/* Max line length that info services can handle */ +#define INFO_MAX_LINE_LEN 1500 + /* options for amd.conf */ #define CFM_BROWSABLE_DIRS 0x00000001 #define CFM_MOUNT_TYPE_AUTOFS 0x00000002 /* use kernel autofs support */ @@ -76,10 +75,7 @@ #define CFM_NORMALIZE_SLASHES 0x00008000 /* normalize slashes? */ #define CFM_FORCED_UNMOUNTS 0x00010000 /* forced unmounts? */ #define CFM_TRUNCATE_LOG 0x00020000 /* truncate log file? */ -#if 0 -/* XXX: reserved to sync up with am-utils-6.2 */ #define CFM_SUN_MAP_SYNTAX 0x00040000 /* Sun map syntax? */ -#endif #define CFM_NFS_ANY_INTERFACE 0x00080000 /* all interfaces are acceptable */ /* defaults global flags: plock, tcpwrappers, and autofs/lofs */ @@ -212,6 +208,7 @@ typedef struct cf_map cf_map_t; typedef struct kv kv; typedef struct am_node am_node; typedef struct mntfs mntfs; +typedef struct am_loc am_loc; typedef struct am_opts am_opts; typedef struct am_ops am_ops; typedef struct am_stats am_stats; @@ -245,13 +242,17 @@ typedef int (*vmount_fs) (am_node *, mntfs *); typedef int (*vumount_fs) (am_node *, mntfs *); typedef am_node *(*vlookup_child) (am_node *, char *, int *, int); typedef am_node *(*vmount_child) (am_node *, int *); -typedef int (*vreaddir) (am_node *, nfscookie, nfsdirlist *, nfsentry *, u_int); +typedef int (*vreaddir) (am_node *, voidp, voidp, voidp, u_int); typedef am_node *(*vreadlink) (am_node *, int *); typedef void (*vmounted) (mntfs *); typedef void (*vumounted) (mntfs *); typedef fserver *(*vffserver) (mntfs *); typedef wchan_t (*vget_wchan) (mntfs *); +/* + * NFS progran dispatcher + */ +typedef void (*dispatcher_t)(struct svc_req *rqstp, SVCXPRT *transp); /* @@ -314,6 +315,7 @@ struct amu_global_options { #endif /* HAVE_MAP_NIS */ char *nfs_proto; /* NFS protocol (NULL, udp, tcp) */ int nfs_vers; /* NFS version (0, 2, 3, 4) */ + int nfs_vers_ping; /* NFS rpc ping version (0, 2, 3, 4) */ u_int exec_map_timeout; /* timeout (seconds) for executable maps */ }; @@ -349,6 +351,7 @@ struct mnt_map { short alloc; /* Allocation mode */ time_t modify; /* Modify time of map */ u_int reloads; /* Number of times map was reloaded */ + u_int nentries; /* Number of entries in the map */ char *map_name; /* Name of this map */ char *wildcard; /* Wildcard value */ reload_fn *reload; /* Function to be used for reloads */ @@ -420,7 +423,7 @@ struct mntfs { am_opts *mf_fo; /* File opts */ char *mf_mount; /* "/a/kiska/home/kiska" */ char *mf_info; /* Mount info */ - char *mf_auto; /* Automount opts */ + char *mf_auto; /* Mount info */ char *mf_mopts; /* FS mount opts */ char *mf_remopts; /* Remote FS mount opts */ char *mf_loopdev; /* loop device name for /dev/loop mounts */ @@ -434,6 +437,16 @@ struct mntfs { opaque_t mf_private; /* Private - per-fs data */ }; +/* + * Locations: bindings between keys and mntfs + */ +struct am_loc { + am_opts *al_fo; + mntfs *al_mnt; + int al_refc; +}; + + /* * List of fileservers */ @@ -463,6 +476,8 @@ struct am_stats { int s_readdir; /* Count of readdirs */ int s_readlink; /* Count of readlinks */ int s_statfs; /* Count of statfs */ + int s_fsinfo; /* Count of fsinfo */ + int s_pathconf; /* Count of pathconf */ }; /* @@ -482,8 +497,8 @@ extern struct amd_stats amd_stats; */ struct am_node { int am_mapno; /* Map number */ - mntfs *am_mnt; /* Mounted filesystem */ - mntfs **am_mfarray; /* Filesystem sources to try to mount */ + am_loc *am_al; /* Mounted filesystem */ + am_loc **am_alarray; /* Filesystem sources to try to mount */ char *am_name; /* "kiska": name of this node */ char *am_path; /* "/home/kiska": path of this node's mount point */ char *am_link; /* "/a/kiska/home/kiska/this/that": link to sub-dir */ @@ -508,6 +523,7 @@ struct am_node { autofs_fh_t *am_autofs_fh; time_t am_autofs_ttl; /* Time to expire autofs nodes */ #endif /* HAVE_FS_AUTOFS */ + int am_fd[2]; /* parent child pipe fd's for sync umount */ }; /* @@ -527,13 +543,18 @@ extern int *amqproc_getpid_1_svc(voidp argp, struct svc_req *rqstp); extern int *amqproc_mount_1_svc(voidp argp, struct svc_req *rqstp); extern int *amqproc_setopt_1_svc(voidp argp, struct svc_req *rqstp); extern voidp amqproc_null_1_svc(voidp argp, struct svc_req *rqstp); -extern voidp amqproc_umnt_1_svc(voidp argp, struct svc_req *rqstp); +extern int *amqproc_umnt_1_svc(voidp argp, struct svc_req *rqstp); +extern int *amqproc_sync_umnt_1_svc_parent(voidp argp, struct svc_req *rqstp); +extern amq_sync_umnt *amqproc_sync_umnt_1_svc_child(voidp argp, struct svc_req *rqstp); +extern amq_sync_umnt *amqproc_sync_umnt_1_svc_async(voidp argp, struct svc_req *rqstp); +extern amq_map_info_list *amqproc_getmapinfo_1_svc(voidp argp, struct svc_req *rqstp); /* other external definitions */ -extern am_nfs_fh *get_root_nfs_fh(char *dir); +extern am_nfs_handle_t *get_root_nfs_fh(char *dir, am_nfs_handle_t *nfh); extern am_node *find_ap(char *); extern am_node *get_ap_child(am_node *, char *); extern bool_t xdr_amq_mount_info_qelem(XDR *xdrs, qelem *qhead); +extern bool_t xdr_amq_map_info_qelem(XDR *xdrs, qelem *qhead); extern fserver *find_nfs_srvr(mntfs *mf); extern int mount_nfs_fh(am_nfs_handle_t *fhp, char *mntdir, char *fs_name, mntfs *mf); extern int process_all_regular_maps(void); @@ -541,7 +562,8 @@ extern cf_map_t *find_cf_map(const char *name); extern int set_conf_kv(const char *section, const char *k, const char *v); extern int mount_node(opaque_t arg); extern int unmount_mp(am_node *mp); -extern int yyparse (void); +extern int conf_parse(void); /* "yyparse" renamed */ +extern FILE *conf_in; /* "yyin" renamed */ extern void amfs_mkcacheref(mntfs *mf); extern int amfs_mount(am_node *mp, mntfs *mf, char *opts); @@ -566,12 +588,15 @@ extern int get_mountd_port(fserver *, u_short *, wchan_t); extern void flush_nfs_fhandle_cache(fserver *); extern mntfs *dup_mntfs(mntfs *); +extern am_loc *dup_loc(am_loc *); extern mntfs *find_mntfs(am_ops *, am_opts *, char *, char *, char *, char *, char *); extern mntfs *locate_mntfs(am_ops *, am_opts *, char *, char *, char *, char *, char *); +extern am_loc *new_loc(void); extern mntfs *new_mntfs(void); extern mntfs *realloc_mntfs(mntfs *, am_ops *, am_opts *, char *, char *, char *, char *, char *); extern void flush_mntfs(void); extern void free_mntfs(voidp); +extern void free_loc(voidp); extern void amq_program_1(struct svc_req *rqstp, SVCXPRT *transp); @@ -579,9 +604,11 @@ extern int background(void); extern void deslashify(char *); extern void do_task_notify(void); extern int eval_fs_opts(am_opts *, char *, char *, char *, char *, char *); +extern int file_read_line(char *, int, FILE *); extern void forcibly_timeout_mp(am_node *); extern void free_map(am_node *); extern void free_opts(am_opts *); +extern am_opts *copy_opts(am_opts *); extern void free_srvr(fserver *); extern int fwd_init(void); extern int fwd_packet(int, char *, int, struct sockaddr_in *, struct sockaddr_in *, opaque_t, fwd_fun *); @@ -596,7 +623,7 @@ extern int make_nfs_auth(void); extern void make_root_node(void); extern void map_flush_srvr(fserver *); extern void mapc_add_kv(mnt_map *, char *, char *); -extern mnt_map *mapc_find(char *, char *, const char *); +extern mnt_map *mapc_find(char *, char *, const char *, const char *); extern void mapc_free(opaque_t); extern int mapc_keyiter(mnt_map *, key_fun, opaque_t); extern void mapc_reload(void); @@ -608,9 +635,11 @@ extern int mount_auto_node(char *, opaque_t); extern int mount_automounter(int); extern int mount_exported(void); extern void mp_to_fh(am_node *, am_nfs_fh *); +extern void mp_to_fh3(am_node *mp, am_nfs_fh3 *fhp); extern void new_ttl(am_node *); extern void nfs_quick_reply(am_node *mp, int error); extern void normalize_slash(char *); +extern void notify_child(am_node *, au_etype, int, int); extern void ops_showamfstypes(char *buf, size_t l); extern void ops_showfstypes(char *outbuf, size_t l); extern void rem_que(qelem *); @@ -639,8 +668,8 @@ extern char hostd[SIZEOF_HOSTD]; /* Host+domain */ /* * Global variables. */ -extern FILE *yyin; extern SVCXPRT *current_transp; /* For nfs_quick_reply() */ +extern dispatcher_t nfs_dispatcher; extern char *conf_tag; #define SIZEOF_UID_STR 12 #define SIZEOF_GID_STR 12 @@ -723,6 +752,19 @@ extern am_ops cdfs_ops; extern am_ops pcfs_ops; #endif /* HAVE_FS_PCFS */ +/* + * UDF File System + * Many systems can't support this, and in any case most of the + * functionality is available with program FS. + */ +#ifdef HAVE_FS_UDF +extern am_ops udf_ops; +#endif /* HAVE_FS_UDF */ + +#ifdef HAVE_FS_LUSTRE +extern am_ops lustre_ops; +#endif /* HAVE_FS_LUSTRE */ + /* * Caching File System (Solaris) */ @@ -730,6 +772,12 @@ extern am_ops pcfs_ops; extern am_ops cachefs_ops; #endif /* HAVE_FS_CACHEFS */ +/* + * In memory /tmp filesystem (Linux, NetBSD) + */ +#ifdef HAVE_FS_TMPFS +extern am_ops tmpfs_ops; +#endif /* HAVE_FS_TMPFS */ /* * Network File System * Good, slow, NFS V.2. @@ -753,6 +801,13 @@ extern am_ops ufs_ops; /* Un*x file system */ extern am_ops xfs_ops; /* Un*x file system */ #endif /* HAVE_FS_XFS */ +/* Unix file system (ext*) */ +#ifdef HAVE_FS_EXT +extern am_ops ext2_ops; /* Un*x file system */ +extern am_ops ext3_ops; /* Un*x file system */ +extern am_ops ext4_ops; /* Un*x file system */ +#endif /* HAVE_FS_EXT */ + /* Unix file system (irix) */ #ifdef HAVE_FS_EFS extern am_ops efs_ops; /* Un*x file system */ @@ -772,7 +827,7 @@ extern am_ops amfs_root_ops; /* Root file system */ */ extern am_node *amfs_generic_lookup_child(am_node *mp, char *fname, int *error_return, int op); extern am_node *amfs_generic_mount_child(am_node *ap, int *error_return); -extern int amfs_generic_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count); +extern int amfs_generic_readdir(am_node *mp, voidp cookie, voidp dp, voidp ep, u_int count); extern int amfs_generic_umount(am_node *mp, mntfs *mf); extern void amfs_generic_mounted(mntfs *mf); extern char *amfs_generic_match(am_opts *fo); @@ -808,7 +863,8 @@ extern am_ops amfs_direct_ops; /* Direct Automount file system (this too) */ extern am_ops amfs_error_ops; /* Error file system */ extern am_node *amfs_error_lookup_child(am_node *mp, char *fname, int *error_return, int op); extern am_node *amfs_error_mount_child(am_node *ap, int *error_return); -extern int amfs_error_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count); +extern int amfs_error_readdir(am_node *mp, voidp cookie, voidp dp, voidp ep, u_int count); + #endif /* HAVE_AMU_FS_ERROR */ /* diff --git a/amd/amfs_auto.c b/amd/amfs_auto.c index 75a451fd111..34fdb00f501 100644 --- a/amd/amfs_auto.c +++ b/amd/amfs_auto.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -101,6 +97,8 @@ am_ops amfs_auto_ops = static int amfs_auto_mount(am_node *mp, mntfs *mf) { + if (mp->am_parent == NULL) + return EINVAL; /* * Pseudo-directories are used to provide some structure * to the automounted directories instead @@ -115,7 +113,7 @@ amfs_auto_mount(am_node *mp, mntfs *mf) * Historical - not documented. */ if (mf->mf_info[0] == '.' && mf->mf_info[1] == '\0') - mf->mf_info = strealloc(mf->mf_info, mp->am_parent->am_mnt->mf_info); + mf->mf_info = strealloc(mf->mf_info, mp->am_parent->am_al->al_mnt->mf_info); /* * Compute prefix: @@ -131,12 +129,12 @@ amfs_auto_mount(am_node *mp, mntfs *mf) if (mf->mf_fo->opt_pref) { /* allow pref:=null to set a real null prefix */ if (STREQ(mf->mf_fo->opt_pref, "null")) { - mp->am_pref = strdup(""); + mp->am_pref = xstrdup(""); } else { /* * the prefix specified as an option */ - mp->am_pref = strdup(mf->mf_fo->opt_pref); + mp->am_pref = xstrdup(mf->mf_fo->opt_pref); } } else { /* @@ -147,7 +145,7 @@ amfs_auto_mount(am_node *mp, mntfs *mf) char *ppref = mp->am_parent->am_pref; if (ppref == 0) ppref = ""; - mp->am_pref = str3cat((char *) 0, ppref, mp->am_name, "/"); + mp->am_pref = str3cat((char *) NULL, ppref, mp->am_name, "/"); } #ifdef HAVE_FS_AUTOFS diff --git a/amd/amfs_direct.c b/amd/amfs_direct.c index dbef743d0d7..b911c2a1e2c 100644 --- a/amd/amfs_direct.c +++ b/amd/amfs_direct.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -93,8 +89,8 @@ amfs_direct_readlink(am_node *mp, int *error_return) xp = next_nonerror_node(mp->am_child); if (!xp) { - if (!mp->am_mnt->mf_private) - amfs_mkcacheref(mp->am_mnt); /* XXX */ + if (!mp->am_al->al_mnt->mf_private) + amfs_mkcacheref(mp->am_al->al_mnt); xp = amfs_generic_lookup_child(mp, mp->am_path + 1, &rc, VLOOK_CREATE); if (xp && rc < 0) xp = amfs_generic_mount_child(xp, &rc); diff --git a/amd/amfs_error.c b/amd/amfs_error.c index 51bdaa6db14..58a623102c1 100644 --- a/amd/amfs_error.c +++ b/amd/amfs_error.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -92,7 +88,7 @@ am_ops amfs_error_ops = static char * amfs_error_match(am_opts *fo) { - return strdup("(error-hook)"); + return xstrdup("(error-hook)"); } @@ -145,7 +141,7 @@ amfs_error_mount_child(am_node *ap, int *error_return) * If we do then just give an error. */ int -amfs_error_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count) +amfs_error_readdir(am_node *mp, voidp cookie, voidp dp, voidp ep, u_int count) { return ESTALE; } diff --git a/amd/amfs_generic.c b/amd/amfs_generic.c index 0d5996969cf..25d734bbde0 100644 --- a/amd/amfs_generic.c +++ b/amd/amfs_generic.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -55,7 +51,7 @@ /**************************************************************************** *** MACROS *** ****************************************************************************/ -#define IN_PROGRESS(cp) ((cp)->mp->am_mnt->mf_flags & MFF_MOUNTING) +#define IN_PROGRESS(cp) ((cp)->mp->am_al->al_mnt->mf_flags & MFF_MOUNTING) /**************************************************************************** @@ -80,7 +76,7 @@ struct continuation { int retry; /* Try again? */ time_t start; /* Time we started this mount */ int callout; /* Callout identifier */ - mntfs **mf; /* Current mntfs */ + am_loc **al; /* Current location */ }; @@ -88,9 +84,9 @@ struct continuation { *** FORWARD DEFINITIONS *** ****************************************************************************/ static am_node *amfs_lookup_node(am_node *mp, char *fname, int *error_return); -static mntfs *amfs_lookup_one_mntfs(am_node *new_mp, mntfs *mf, char *ivec, +static am_loc *amfs_lookup_one_location(am_node *new_mp, mntfs *mf, char *ivec, char *def_opts, char *pfname); -static mntfs **amfs_lookup_mntfs(am_node *new_mp, int *error_return); +static am_loc **amfs_lookup_loc(am_node *new_mp, int *error_return); static void amfs_cont(int rc, int term, opaque_t arg); static void amfs_retry(int rc, int term, opaque_t arg); static void free_continuation(struct continuation *cp); @@ -108,7 +104,7 @@ amfs_lookup_node(am_node *mp, char *fname, int *error_return) int error = 0; /* Error so far */ int in_progress = 0; /* # of (un)mount in progress */ mntfs *mf; - char *expanded_fname = 0; + char *expanded_fname = NULL; dlog("in amfs_lookup_node"); @@ -118,7 +114,7 @@ amfs_lookup_node(am_node *mp, char *fname, int *error_return) * about the mount point. */ if (amd_state == Finishing) { - if (mp->am_mnt == 0 || mp->am_mnt->mf_fsflags & FS_DIRECT) { + if (mp->am_al == NULL || mp->am_al->al_mnt == NULL || mp->am_al->al_mnt->mf_fsflags & FS_DIRECT) { dlog("%s mount ignored - going down", fname); } else { dlog("%s/%s mount ignored - going down", mp->am_path, fname); @@ -170,7 +166,7 @@ amfs_lookup_node(am_node *mp, char *fname, int *error_return) * If the error code is undefined then it must be * in progress. */ - mf = new_mp->am_mnt; + mf = new_mp->am_al->al_mnt; if (mf->mf_error < 0) goto in_progrss; @@ -240,7 +236,7 @@ amfs_lookup_node(am_node *mp, char *fname, int *error_return) */ new_mp = get_ap_child(mp, expanded_fname); XFREE(expanded_fname); - if (new_mp == 0) + if (new_mp == NULL) ereturn(ENOSPC); *error_return = -1; @@ -249,19 +245,25 @@ amfs_lookup_node(am_node *mp, char *fname, int *error_return) -static mntfs * -amfs_lookup_one_mntfs(am_node *new_mp, mntfs *mf, char *ivec, - char *def_opts, char *pfname) +static am_loc * +amfs_lookup_one_location(am_node *new_mp, mntfs *mf, char *ivec, + char *def_opts, char *pfname) { am_ops *p; am_opts *fs_opts; + am_loc *new_al; mntfs *new_mf; - char *mp_dir = 0; + char *mp_dir = NULL; #ifdef HAVE_FS_AUTOFS int on_autofs = 1; #endif /* HAVE_FS_AUTOFS */ /* match the operators */ + /* + * although we alloc the fs_opts here, the pointer is 'owned' by the am_loc and will + * be free'd on destruction of the am_loc. If we don't allocate a loc, then we need + * to free this. + */ fs_opts = CALLOC(am_opts); p = ops_match(fs_opts, ivec, def_opts, new_mp->am_path, pfname, mf->mf_info); @@ -269,7 +271,7 @@ amfs_lookup_one_mntfs(am_node *new_mp, mntfs *mf, char *ivec, /* XXX: this should be factored out into an autofs-specific function */ if (new_mp->am_flags & AMF_AUTOFS) { /* ignore user-provided fs if we're using autofs */ - if (fs_opts->opt_sublink) { + if (fs_opts->opt_sublink && fs_opts->opt_sublink[0]) { /* * For sublinks we need to use a hack with autofs: * mount the filesystem on the original opt_fs (which is NOT an @@ -292,6 +294,9 @@ amfs_lookup_one_mntfs(am_node *new_mp, mntfs *mf, char *ivec, /* * Find or allocate a filesystem for this node. + * we search for a matching backend share, since + * we will construct our own al_loc to handle + * any customisations for this usage. */ new_mf = find_mntfs(p, fs_opts, mp_dir, @@ -300,6 +305,7 @@ amfs_lookup_one_mntfs(am_node *new_mp, mntfs *mf, char *ivec, fs_opts->opt_opts, fs_opts->opt_remopts); + /* * See whether this is a real filesystem */ @@ -307,10 +313,16 @@ amfs_lookup_one_mntfs(am_node *new_mp, mntfs *mf, char *ivec, if (p == &amfs_error_ops) { plog(XLOG_MAP, "Map entry %s for %s did not match", ivec, new_mp->am_path); free_mntfs(new_mf); + free_opts(fs_opts); + XFREE(fs_opts); return NULL; } dlog("Got a hit with %s", p->fs_type); + new_al = new_loc(); + free_mntfs(new_al->al_mnt); + new_al->al_mnt = new_mf; + new_al->al_fo = fs_opts; /* now the loc is in charge of free'ing this mem */ #ifdef HAVE_FS_AUTOFS if (new_mp->am_flags & AMF_AUTOFS && on_autofs) { @@ -332,12 +344,12 @@ amfs_lookup_one_mntfs(am_node *new_mp, mntfs *mf, char *ivec, new_mf->mf_flags |= MFF_IS_AUTOFS; #endif /* HAVE_FS_AUTOFS */ - return new_mf; + return new_al; } -static mntfs ** -amfs_lookup_mntfs(am_node *new_mp, int *error_return) +static am_loc ** +amfs_lookup_loc(am_node *new_mp, int *error_return) { am_node *mp; char *info; /* Mount info - where to get the file system */ @@ -348,10 +360,11 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return) int error = 0; /* Error so far */ char path_name[MAXPATHLEN]; /* General path name buffer */ char *pfname; /* Path for database lookup */ - mntfs *mf, **mf_array; + mntfs* mf; /* The mntfs for the map of our parent */ + am_loc **al_array; /* the generated list of locations */ int count; - dlog("in amfs_lookup_mntfs"); + dlog("in amfs_lookup_loc"); mp = new_mp->am_parent; @@ -369,7 +382,7 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return) pfname = new_mp->am_name; } - mf = mp->am_mnt; + mf = mp->am_al->al_mnt; dlog("will search map info in %s to find %s", mf->mf_info, pfname); /* @@ -404,8 +417,8 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return) else def_opts = ""; - orig_def_opts = amfs_parse_defaults(mp, mf, strdup(def_opts)); - def_opts = strdup(orig_def_opts); + orig_def_opts = amfs_parse_defaults(mp, mf, xstrdup(def_opts)); + def_opts = xstrdup(orig_def_opts); /* first build our defaults */ num_ivecs = 0; @@ -423,11 +436,11 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return) num_ivecs++; } - mf_array = calloc(num_ivecs + 1, sizeof(mntfs *)); + al_array = calloc(num_ivecs + 1, sizeof(am_loc *)); - /* construct the array of struct mntfs for this mount point */ + /* construct the array of struct locations for this key */ for (count = 0, cur_ivec = ivecs; *cur_ivec; cur_ivec++) { - mntfs *new_mf; + am_loc *new_al; if (**cur_ivec == '-') { XFREE(def_opts); @@ -436,18 +449,18 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return) * If we have a single dash '-' than we need to reset the * default options. */ - def_opts = strdup(orig_def_opts); + def_opts = xstrdup(orig_def_opts); dlog("Resetting the default options, a single dash '-' was found."); } else { /* append options to /default options */ - def_opts = str3cat((char *) 0, orig_def_opts, ";", *cur_ivec + 1); + def_opts = str3cat((char *) NULL, orig_def_opts, ";", *cur_ivec + 1); dlog("Resetting def_opts to \"%s\"", def_opts); } continue; } /* - * If a mntfs has already been found, and we find + * If a loc has already been found, and we find * a cut then don't try any more locations. * * XXX: we do not know when the "/" was added as an equivalent for "||". @@ -455,16 +468,16 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return) */ if (STREQ(*cur_ivec, "/") || STREQ(*cur_ivec, "||")) { if (count > 0) { - dlog("Cut: not trying any more locations for %s", mp->am_path); + dlog("Cut: not trying any more locations for %s", pfname); break; } continue; } - new_mf = amfs_lookup_one_mntfs(new_mp, mf, *cur_ivec, def_opts, pfname); - if (new_mf == NULL) + new_al = amfs_lookup_one_location(new_mp, mf, *cur_ivec, def_opts, pfname); + if (new_al == NULL) continue; - mf_array[count++] = new_mf; + al_array[count++] = new_al; } /* We're done with ivecs */ @@ -473,11 +486,11 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return) XFREE(orig_def_opts); XFREE(def_opts); if (count == 0) { /* no match */ - XFREE(mf_array); + XFREE(al_array); ereturn(ENOENT); } - return mf_array; + return al_array; } @@ -491,7 +504,7 @@ amfs_cont(int rc, int term, opaque_t arg) { struct continuation *cp = (struct continuation *) arg; am_node *mp = cp->mp; - mntfs *mf = mp->am_mnt; + mntfs *mf = mp->am_al->al_mnt; dlog("amfs_cont: '%s'", mp->am_path); @@ -556,7 +569,7 @@ amfs_cont(int rc, int term, opaque_t arg) mf->mf_error = rc; mf->mf_flags |= MFF_ERROR; errno = rc; /* XXX */ - if (!STREQ(mp->am_mnt->mf_ops->fs_type, "linkx")) + if (!STREQ(mp->am_al->al_mnt->mf_ops->fs_type, "linkx")) plog(XLOG_ERROR, "%s: mount (amfs_cont): %m", mp->am_path); } } @@ -568,7 +581,7 @@ amfs_cont(int rc, int term, opaque_t arg) * call the background mount routine again */ amd_stats.d_merr++; - cp->mf++; + cp->al++; } amfs_bgmount(cp); if (mp->am_error > 0) @@ -608,13 +621,21 @@ amfs_retry(int rc, int term, opaque_t arg) */ plog(XLOG_INFO, "mount of \"%s\" has timed out", mp->am_path); error = ETIMEDOUT; - while (*cp->mf) - cp->mf++; + while (*cp->al) + cp->al++; /* explicitly forbid further retries after timeout */ cp->retry = FALSE; } if (error || !IN_PROGRESS(cp)) error = amfs_bgmount(cp); + else + /* Normally it's amfs_bgmount() which frees the continuation. However, if + * the mount is already in progress and we're in amfs_retry() for another + * node we don't try mounting the filesystem once again. Still, we have + * to free the continuation as we won't get called again and thus would + * leak the continuation structure and our am_loc references. + */ + free_continuation(cp); reschedule_timeout_mp(); } @@ -626,7 +647,7 @@ amfs_retry(int rc, int term, opaque_t arg) static void free_continuation(struct continuation *cp) { - mntfs **mfp; + am_loc **alp; dlog("free_continuation"); if (cp->callout) @@ -634,13 +655,12 @@ free_continuation(struct continuation *cp) /* * we must free the mntfs's in the list. * so free all of them if there was an error, - * or free all but the used one, if the mount succeeded. */ - for (mfp = cp->mp->am_mfarray; *mfp; mfp++) { - free_mntfs(*mfp); + for (alp = cp->mp->am_alarray; *alp; alp++) { + free_loc(*alp); } - XFREE(cp->mp->am_mfarray); - cp->mp->am_mfarray = 0; + XFREE(cp->mp->am_alarray); + cp->mp->am_alarray = 0; XFREE(cp); } @@ -690,12 +710,13 @@ static int amfs_bgmount(struct continuation *cp) { am_node *mp = cp->mp; - mntfs *mf; /* Current mntfs */ + am_loc *loc; + mntfs *mf; int this_error = -1; /* Per-mount error */ int hard_error = -1; /* Cumulative per-node error */ - if (mp->am_mnt) - free_mntfs(mp->am_mnt); + if (mp->am_al) + free_loc(mp->am_al); /* * Try to mount each location. @@ -704,10 +725,11 @@ amfs_bgmount(struct continuation *cp) * hard_error > 0 indicates everything failed with a hard error * hard_error < 0 indicates nothing could be mounted now */ - for (mp->am_mnt = *cp->mf; *cp->mf; cp->mf++, mp->am_mnt = *cp->mf) { + for (mp->am_al = *cp->al; *cp->al; cp->al++, mp->am_al = *cp->al) { am_ops *p; - mf = dup_mntfs(mp->am_mnt); + loc = dup_loc(mp->am_al); + mf = loc->al_mnt; p = mf->mf_ops; if (hard_error < 0) @@ -737,12 +759,11 @@ amfs_bgmount(struct continuation *cp) goto failed; } - if (mp->am_link) { - XFREE(mp->am_link); - mp->am_link = NULL; - } - if (mf->mf_fo && mf->mf_fo->opt_sublink) - mp->am_link = strdup(mf->mf_fo->opt_sublink); + XFREE(mp->am_link); + mp->am_link = NULL; + + if (loc->al_fo && loc->al_fo->opt_sublink && loc->al_fo->opt_sublink[0]) + mp->am_link = xstrdup(loc->al_fo->opt_sublink); /* * Will usually need to play around with the mount nodes @@ -784,13 +805,13 @@ amfs_bgmount(struct continuation *cp) if (this_error < 0) goto retry; - if (mf->mf_fo && mf->mf_fo->opt_delay) { + if (loc->al_fo && loc->al_fo->opt_delay) { /* - * If there is a delay timer on the mount + * If there is a delay timer on the location * then don't try to mount if the timer * has not expired. */ - int i = atoi(mf->mf_fo->opt_delay); + int i = atoi(loc->al_fo->opt_delay); time_t now = clocktime(NULL); if (i > 0 && now < (cp->start + i)) { dlog("Mount of %s delayed by %lds", mf->mf_mount, (long) (i - now + cp->start)); @@ -866,22 +887,25 @@ amfs_bgmount(struct continuation *cp) return -1; failed: - amd_stats.d_merr++; - mf->mf_error = this_error; - mf->mf_flags |= MFF_ERROR; + if (!FSRV_ISDOWN(mf->mf_server)) { + /* mark the mount as failed unless the server is down */ + amd_stats.d_merr++; + mf->mf_error = this_error; + mf->mf_flags |= MFF_ERROR; #ifdef HAVE_FS_AUTOFS - if (mp->am_autofs_fh) - autofs_release_fh(mp); + if (mp->am_autofs_fh) + autofs_release_fh(mp); #endif /* HAVE_FS_AUTOFS */ - if (mf->mf_flags & MFF_MKMNT) { - rmdirs(mf->mf_mount); - mf->mf_flags &= ~MFF_MKMNT; + if (mf->mf_flags & MFF_MKMNT) { + rmdirs(mf->mf_mount); + mf->mf_flags &= ~MFF_MKMNT; + } } /* * Wakeup anything waiting for this mount */ wakeup(get_mntfs_wchan(mf)); - free_mntfs(mf); + free_loc(loc); /* continue */ } @@ -890,7 +914,10 @@ amfs_bgmount(struct continuation *cp) * there is no more mount information available. */ if (this_error) { - mp->am_mnt = mf = new_mntfs(); + if (mp->am_al) + free_loc(mp->am_al); + mp->am_al = loc = new_loc(); + mf = loc->al_mnt; #ifdef HAVE_FS_AUTOFS if (mp->am_flags & AMF_AUTOFS) @@ -920,7 +947,7 @@ amfs_bgmount(struct continuation *cp) } new_ttl(mp); } else { - mf = mp->am_mnt; + mf = loc->al_mnt; /* * Wakeup anything waiting for this mount */ @@ -959,19 +986,10 @@ amfs_parse_defaults(am_node *mp, mntfs *mf, char *def_opts) /* * Find out if amd.conf overrode any map-specific /defaults. - * - * HACK ALERT: there's no easy way to find out what the map mount point is - * at this point, so I am forced to initialize the mnt_map->cfm field here - * for the first time, upon the very first search for a /defaults entry in - * this map. This initialization is much better done in mapc_create(), - * but it's impossible to do that there with the current code structure. */ - if (mm->cfm == NULL) { /* then initialize it for first time */ - mm->cfm = find_cf_map(mf->mf_mount); - } if (mm->cfm && mm->cfm->cfm_defaults) { dlog("map %s map_defaults override: %s", mf->mf_mount, mm->cfm->cfm_defaults); - dflts = strdup(mm->cfm->cfm_defaults); + dflts = xstrdup(mm->cfm->cfm_defaults); } else if (mapc_search(mm, "/defaults", &dflts) == 0) { dlog("/defaults gave %s", dflts); } else { @@ -1009,7 +1027,7 @@ amfs_parse_defaults(am_node *mp, mntfs *mf, char *def_opts) * get expanded to "/defaults" */ pt = ops_match(&ap, *sp, "", mp->am_path, "/defaults", - mp->am_parent->am_mnt->mf_info); + mp->am_parent->am_al->al_mnt->mf_info); free_opts(&ap); /* don't leak */ if (pt == &amfs_error_ops) { plog(XLOG_MAP, "did not match defaults for \"%s\"", *sp); @@ -1076,8 +1094,9 @@ amfs_generic_mount_child(am_node *new_mp, int *error_return) *error_return = error = 0; /* Error so far */ /* we have an errorfs attached to the am_node, free it */ - free_mntfs(new_mp->am_mnt); - new_mp->am_mnt = 0; + if (new_mp->am_al) + free_loc(new_mp->am_al); + new_mp->am_al = NULL; /* * Construct a continuation @@ -1087,7 +1106,7 @@ amfs_generic_mount_child(am_node *new_mp, int *error_return) cp->mp = new_mp; cp->retry = TRUE; cp->start = clocktime(NULL); - cp->mf = new_mp->am_mfarray; + cp->al = new_mp->am_alarray; /* * Try and mount the file system. If this succeeds immediately (possible @@ -1101,7 +1120,7 @@ amfs_generic_mount_child(am_node *new_mp, int *error_return) /* * Code for quick reply. If current_transp is set, then it's the - * transp that's been passed down from nfs_program_2() or from + * transp that's been passed down from nfs_dispatcher() or from * autofs_program_[123](). * If new_mp->am_transp is not already set, set it by copying in * current_transp. Once am_transp is set, nfs_quick_reply() and @@ -1113,7 +1132,8 @@ amfs_generic_mount_child(am_node *new_mp, int *error_return) new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); *(new_mp->am_transp) = *current_transp; } - if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) + if (error && new_mp->am_al && new_mp->am_al->al_mnt && + (new_mp->am_al->al_mnt->mf_ops == &amfs_error_ops)) new_mp->am_error = error; if (new_mp->am_error > 0) @@ -1132,7 +1152,7 @@ am_node * amfs_generic_lookup_child(am_node *mp, char *fname, int *error_return, int op) { am_node *new_mp; - mntfs **mf_array; + am_loc **al_array; int mp_error; dlog("in amfs_generic_lookup_child"); @@ -1145,7 +1165,7 @@ amfs_generic_lookup_child(am_node *mp, char *fname, int *error_return, int op) return new_mp; /* also return if it's already mounted and known to be up */ - if (*error_return == 0 && FSRV_ISUP(new_mp->am_mnt->mf_server)) + if (*error_return == 0 && FSRV_ISUP(new_mp->am_al->al_mnt->mf_server)) return new_mp; switch (op) { @@ -1161,42 +1181,15 @@ amfs_generic_lookup_child(am_node *mp, char *fname, int *error_return, int op) /* save error_return */ mp_error = *error_return; - mf_array = amfs_lookup_mntfs(new_mp, error_return); - if (!mf_array) { - new_mp->am_error = new_mp->am_mnt->mf_error = *error_return; + al_array = amfs_lookup_loc(new_mp, error_return); + if (!al_array) { + new_mp->am_error = new_mp->am_al->al_mnt->mf_error = *error_return; free_map(new_mp); return NULL; } - /* - * Already mounted but known to be down: - * check if we have any alternatives to mount - */ - if (mp_error == 0) { - mntfs **mfp; - for (mfp = mf_array; *mfp; mfp++) - if (*mfp != new_mp->am_mnt) - break; - if (*mfp != NULL) { - /* - * we found an alternative, so try mounting again. - */ - *error_return = -1; - } else { - for (mfp = mf_array; *mfp; mfp++) - free_mntfs(*mfp); - XFREE(mf_array); - if (new_mp->am_flags & AMF_SOFTLOOKUP) { - ereturn(EIO); - } else { - *error_return = 0; - return new_mp; - } - } - } - /* store the array inside the am_node */ - new_mp->am_mfarray = mf_array; + new_mp->am_alarray = al_array; /* * Note: while it might seem like a good idea to prioritize @@ -1258,5 +1251,5 @@ amfs_generic_match(am_opts *fo) /* * mtab entry turns out to be the name of the mount map */ - return strdup(fo->opt_rfs ? fo->opt_rfs : "."); + return xstrdup(fo->opt_rfs ? fo->opt_rfs : "."); } diff --git a/amd/amfs_host.c b/amd/amfs_host.c index 55423c46ea3..a3468ecd4b6 100644 --- a/amd/amfs_host.c +++ b/amd/amfs_host.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -227,7 +223,14 @@ fetch_fhandle(CLIENT *client, char *dir, am_nfs_handle_t *fhp, u_long nfs_versio plog(XLOG_INFO, "fetch_fhandle: NFS version %d", (int) nfs_version); #ifdef HAVE_FS_NFS3 - if (nfs_version == NFS_VERSION3) { + if (nfs_version == NFS_VERSION3 +#ifdef HAVE_FS_NFS4 +#ifndef NO_FALLBACK + || nfs_version == NFS_VERSION4 +#endif /* NO_FALLBACK */ +#endif /* HAVE_FS_NFS4 */ + ) { + memset((char *) &res3, 0, sizeof(res3)); clnt_stat = clnt_call(client, MOUNTPROC_MNT, @@ -303,8 +306,8 @@ amfs_host_mount(am_node *am, mntfs *mf) int n_export; int j, k; exports exlist = 0, ex; - exports *ep = 0; - am_nfs_handle_t *fp = 0; + exports *ep = NULL; + am_nfs_handle_t *fp = NULL; char *host; int error = 0; struct sockaddr_in sin; @@ -449,13 +452,13 @@ amfs_host_mount(am_node *am, mntfs *mf) /* Check and avoid a duplicated export entry */ if (j > k && ep[k] && STREQ(ep[j]->ex_dir, ep[k]->ex_dir)) { dlog("avoiding dup fhandle requested for %s", ep[j]->ex_dir); - ep[j] = 0; + ep[j] = NULL; } else { k = j; error = fetch_fhandle(client, ep[j]->ex_dir, &fp[j], mf->mf_server->fs_version); if (error) - ep[j] = 0; + ep[j] = NULL; } } @@ -465,8 +468,8 @@ amfs_host_mount(am_node *am, mntfs *mf) * error code 0 at the end. If they all fail then return * the last error code. */ - xstrlcpy(fs_name, mf->mf_info, MAXPATHLEN); - if ((rfs_dir = strchr(fs_name, ':')) == (char *) 0) { + xstrlcpy(fs_name, mf->mf_info, sizeof(fs_name)); + if ((rfs_dir = strchr(fs_name, ':')) == (char *) NULL) { plog(XLOG_FATAL, "amfs_host_mount: mf_info has no colon"); error = EINVAL; goto out; @@ -493,10 +496,8 @@ amfs_host_mount(am_node *am, mntfs *mf) */ out: discard_mntlist(mlist); - if (ep) - XFREE(ep); - if (fp) - XFREE(fp); + XFREE(ep); + XFREE(fp); if (sock != RPC_ANYSOCK) (void) amu_close(sock); if (client) @@ -554,7 +555,7 @@ amfs_host_umount(am_node *am, mntfs *mf) * Reverse list... */ ml = mlist; - mprev = 0; + mprev = NULL; while (ml) { mntlist *ml2 = ml->mnext; ml->mnext = mprev; diff --git a/amd/amfs_link.c b/amd/amfs_link.c index e75ab862f8b..0751dd7047a 100644 --- a/amd/amfs_link.c +++ b/amd/amfs_link.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -109,13 +105,13 @@ amfs_link_match(am_opts *fo) */ if (fo->opt_fs[0] == '/') { char *link_hack = str3cat(NULL, ".", fo->opt_fs, ""); - if (!fo->opt_sublink) - fo->opt_sublink = strdup(fo->opt_fs); + if (fo->opt_sublink == NULL || fo->opt_sublink[0] == '\0') + fo->opt_sublink = xstrdup(fo->opt_fs); XFREE(fo->opt_fs); fo->opt_fs = link_hack; } - return strdup(fo->opt_fs); + return xstrdup(fo->opt_fs); } diff --git a/amd/amfs_linkx.c b/amd/amfs_linkx.c index e306eda91d3..be95fe5e1a2 100644 --- a/amd/amfs_linkx.c +++ b/amd/amfs_linkx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/amd/amfs_nfsl.c b/amd/amfs_nfsl.c index bb48f0efd25..c70a3eeb97c 100644 --- a/amd/amfs_nfsl.c +++ b/amd/amfs_nfsl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -101,7 +97,7 @@ amfs_nfsl_match(am_opts *fo) char *retval; struct stat stb; - if (fo->opt_sublink) + if (fo->opt_sublink && fo->opt_sublink[0]) cp = fo->opt_sublink; else cp = fo->opt_fs; @@ -116,8 +112,9 @@ amfs_nfsl_match(am_opts *fo) * call nfs_ops.fs_match(). * If link value exists (or same host), call amfs_link_ops.fs_match(). */ - if (!STRCEQ(ho, am_get_hostname())) { - plog(XLOG_INFO, "amfs_nfsl: \"%s\" is not local host, using type:=nfs", ho); + if (!STRCEQ(ho, am_get_hostname()) && !STRCEQ(ho, hostd)) { + plog(XLOG_INFO, "amfs_nfsl: \"%s\" is not the local host \"%s\", " + "or \"%s\" using type:=nfs", ho, am_get_hostname(), hostd); retval = nfs_ops.fs_match(fo); } else if (lstat(cp, &stb) < 0) { plog(XLOG_INFO, "amfs_nfsl: \"%s\" does not exist, using type:=nfs", cp); @@ -213,11 +210,16 @@ amfs_nfsl_umounted(mntfs *mf) static fserver * amfs_nfsl_ffserver(mntfs *mf) { - char *cp; - char *ho = mf->mf_fo->opt_rhost; + char *cp, *ho; struct stat stb; - if (mf->mf_fo->opt_sublink) + if (mf->mf_fo == NULL) { + plog(XLOG_ERROR, "%s: NULL mf_fo", __func__); + return NULL; + } + ho = mf->mf_fo->opt_rhost; + + if (mf->mf_fo->opt_sublink && mf->mf_fo->opt_sublink[0]) cp = mf->mf_fo->opt_sublink; else cp = mf->mf_fo->opt_fs; @@ -227,7 +229,8 @@ amfs_nfsl_ffserver(mntfs *mf) * call amfs_link_ops.ffserver(). * If link value exists (or same host), then call ops_nfs.ffserver(). */ - if (!STRCEQ(ho, am_get_hostname()) || lstat(cp, &stb) < 0) { + if ((!STRCEQ(ho, am_get_hostname()) && + !STRCEQ(ho, hostd)) || lstat(cp, &stb) < 0) { return nfs_ops.ffserver(mf); } else { mf->mf_flags |= MFF_NFSLINK; diff --git a/amd/amfs_nfsx.c b/amd/amfs_nfsx.c index 91be8af47e1..db1b9fafd11 100644 --- a/amd/amfs_nfsx.c +++ b/amd/amfs_nfsx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -118,7 +114,7 @@ amfs_nfsx_match(am_opts *fo) } /* set default sublink */ - if (fo->opt_sublink == 0) { + if (fo->opt_sublink == NULL || fo->opt_sublink[0] == '\0') { ptr = strchr(fo->opt_rfs, ','); if (ptr && ptr > (fo->opt_rfs + 1)) fo->opt_sublink = strnsave(fo->opt_rfs + 1, ptr - fo->opt_rfs - 1); @@ -149,7 +145,7 @@ amfs_nfsx_match(am_opts *fo) /* * Determine magic cookie to put in mtab */ - xmtab = str3cat((char *) 0, fo->opt_rhost, ":", fo->opt_rfs); + xmtab = str3cat((char *) NULL, fo->opt_rhost, ":", fo->opt_rfs); dlog("NFSX: mounting remote server \"%s\", remote fs \"%s\" on \"%s\"", fo->opt_rhost, fo->opt_rfs, fo->opt_fs); @@ -190,12 +186,15 @@ amfs_nfsx_init(mntfs *mf) if (nx == 0) { char **ivec; - char *info = 0; + char *info = NULL; char *host; char *pref; int error = 0; - info = strdup(mf->mf_info); + info = xstrdup(mf->mf_info); + if (info == NULL) + return errno; + host = strchr(info, ':'); if (!host) { error = EINVAL; @@ -221,12 +220,12 @@ amfs_nfsx_init(mntfs *mf) nx->nx_c = i - 1; /* i-1 because we don't want the prefix */ nx->nx_v = (amfs_nfsx_mnt *) xmalloc(nx->nx_c * sizeof(amfs_nfsx_mnt)); - nx->nx_mp = 0; + nx->nx_mp = NULL; { - char *mp = 0; - char *xinfo = 0; + char *mp = NULL; + char *xinfo = NULL; char *fs = mf->mf_fo->opt_fs; - char *rfs = 0; + char *rfs = NULL; for (i = 0; i < nx->nx_c; i++) { char *path = ivec[i + 1]; rfs = str3cat(rfs, pref, "/", path); @@ -251,18 +250,14 @@ amfs_nfsx_init(mntfs *mf) /* propagate the on_autofs flag */ nx->nx_v[i].n_mnt->mf_flags |= mf->mf_flags & MFF_ON_AUTOFS; } - if (rfs) - XFREE(rfs); - if (mp) - XFREE(mp); - if (xinfo) - XFREE(xinfo); + XFREE(rfs); + XFREE(mp); + XFREE(xinfo); } XFREE(ivec); errexit: - if (info) - XFREE(info); + XFREE(info); if (error) return error; } @@ -503,7 +498,7 @@ amfs_nfsx_umount(am_node *am, mntfs *mf) } } free_mntfs(m); - n->n_mnt = 0; + n->n_mnt = NULL; n->n_error = -1; } } diff --git a/amd/amfs_program.c b/amd/amfs_program.c index b0aed3752d7..6bf003fb2cf 100644 --- a/amd/amfs_program.c +++ b/amd/amfs_program.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -105,7 +101,7 @@ amfs_program_match(am_opts *fo) } prog = strchr(fo->opt_mount, ' '); - return strdup(prog ? prog + 1 : fo->opt_mount); + return xstrdup(prog ? prog + 1 : fo->opt_mount); } @@ -116,11 +112,14 @@ amfs_program_init(mntfs *mf) if (mf->mf_private != NULL) return 0; + if (mf->mf_fo == NULL) + return 0; + /* save unmount (or umount) command */ if (mf->mf_fo->opt_unmount != NULL) - mf->mf_private = (opaque_t) strdup(mf->mf_fo->opt_unmount); + mf->mf_private = (opaque_t) xstrdup(mf->mf_fo->opt_unmount); else - mf->mf_private = (opaque_t) strdup(mf->mf_fo->opt_umount); + mf->mf_private = (opaque_t) xstrdup(mf->mf_fo->opt_umount); mf->mf_prfree = (void (*)(opaque_t)) free; return 0; @@ -136,9 +135,7 @@ amfs_program_exec(char *info) /* * Split copy of command info string */ - info = strdup(info); - if (info == 0) - return ENOBUFS; + info = xstrdup(info); xivec = strsplit(info, ' ', '\''); /* @@ -148,11 +145,11 @@ amfs_program_exec(char *info) if (!logfp) logfp = stderr; /* initialize before possible first use */ if (dup(fileno(logfp)) == -1) - return errno; + goto out; if (fileno(logfp) != fileno(stderr)) { (void) fclose(stderr); if (dup(fileno(logfp)) == -1) - return errno; + goto out; } /* @@ -172,13 +169,16 @@ amfs_program_exec(char *info) plog(XLOG_USER, "1st/2nd args missing to (un)mount program"); } else { (void) execv(xivec[0], xivec + 1); + error = errno; + plog(XLOG_ERROR, "exec failed: %m"); + errno = error; } +out: /* * Save error number */ error = errno; - plog(XLOG_ERROR, "exec failed: %m"); /* * Free allocate memory diff --git a/amd/amfs_root.c b/amd/amfs_root.c index 243267e71e8..f06c43ce0ba 100644 --- a/amd/amfs_root.c +++ b/amd/amfs_root.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -92,7 +88,7 @@ static int amfs_root_mount(am_node *mp, mntfs *mf) { mf->mf_mount = strealloc(mf->mf_mount, pid_fsname); - mf->mf_private = (opaque_t) mapc_find(mf->mf_info, "", NULL); + mf->mf_private = (opaque_t) mapc_find(mf->mf_info, "", NULL, NULL); mf->mf_prfree = mapc_free; return 0; diff --git a/amd/amfs_toplvl.c b/amd/amfs_toplvl.c index 1b968f197f5..1b143157b4c 100644 --- a/amd/amfs_toplvl.c +++ b/amd/amfs_toplvl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -148,7 +144,7 @@ amfs_toplvl_init(mntfs *mf) { int error = 0; -#if defined(MNT2_GEN_OPT_FORCE) || defined(MNT2_GEN_OPT_DETACH) +#if (defined(MNT2_GEN_OPT_FORCE) || defined(MNT2_GEN_OPT_DETACH)) && (defined(HAVE_UVMOUNT) || defined(HAVE_UMOUNT2)) if (gopt.flags & CFM_FORCED_UNMOUNTS) { plog(XLOG_INFO, "amfs_toplvl_init: trying forced/lazy unmount of %s", mf->mf_mount); @@ -158,7 +154,7 @@ amfs_toplvl_init(mntfs *mf) else dlog("amfs_toplvl_init: forced/lazy unmount succeeded"); } -#endif /* MNT2_GEN_OPT_FORCE || MNT2_GEN_OPT_DETACH */ +#endif /* (MNT2_GEN_OPT_FORCE || MNT2_GEN_OPT_DETACH) && (HAVE_UVMOUNT || HAVE_UMOUNT2) */ return error; } @@ -227,6 +223,11 @@ amfs_toplvl_mount(am_node *mp, mntfs *mf) xstrlcat(opts, toplvl_opts, sizeof(opts)); } +#ifdef MNTTAB_OPT_NOLOCK + xstrlcat(opts, ",", sizeof(opts)); + xstrlcat(opts, MNTTAB_OPT_NOLOCK, sizeof(opts)); +#endif /* MNTTAB_OPT_NOLOCK */ + #ifdef MNTTAB_OPT_NOAC if (gopt.auto_attrcache == 0) { xstrlcat(opts, ",", sizeof(opts)); diff --git a/amd/amfs_union.c b/amd/amfs_union.c index 6adb5b0bd9c..9f37a1b04dd 100644 --- a/amd/amfs_union.c +++ b/amd/amfs_union.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -95,7 +91,7 @@ create_amfs_union_node(char *dir, opaque_t arg) am_node *am; am = amfs_generic_lookup_child(arg, dir, &error, VLOOK_CREATE); if (am && error < 0) - am = amfs_generic_mount_child(am, &error); + (void)amfs_generic_mount_child(am, &error); if (error > 0) { errno = error; /* XXX */ plog(XLOG_ERROR, "unionfs: could not mount %s: %m", dir); @@ -121,9 +117,9 @@ amfs_union_mounted(mntfs *mf) for (mp = get_first_exported_ap(&index); mp; mp = get_next_exported_ap(&index)) { - if (mp->am_mnt == mf) { + if (mp->am_al->al_mnt == mf) { /* return value from create_amfs_union_node is ignored by mapc_keyiter */ - (void) mapc_keyiter((mnt_map *) mp->am_mnt->mf_private, + (void) mapc_keyiter((mnt_map *) mp->am_al->al_mnt->mf_private, create_amfs_union_node, mp); break; diff --git a/amd/amq_subr.c b/amd/amq_subr.c index 79ecafc3d9b..87836110565 100644 --- a/amd/amq_subr.c +++ b/amd/amq_subr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -80,16 +76,68 @@ amqproc_mnttree_1_svc(voidp argp, struct svc_req *rqstp) /* * Unmount a single node */ -voidp +int * amqproc_umnt_1_svc(voidp argp, struct svc_req *rqstp) { - static char res; + static int res = AMQ_UMNT_OK; am_node *mp = find_ap(*(char **) argp); if (mp) forcibly_timeout_mp(mp); - return (voidp) &res; + return &res; +} + + +/* + * Synchronously unmount a single node - parent side. + */ +int * +amqproc_sync_umnt_1_svc_parent(voidp argp, struct svc_req *rqstp) +{ + amqproc_umnt_1_svc(argp, rqstp); + return NULL; +} + + +/* + * Synchronously unmount a single node - child side. + */ +amq_sync_umnt * +amqproc_sync_umnt_1_svc_child(voidp argp, struct svc_req *rqstp) +{ + static amq_sync_umnt rv; + amq_sync_umnt buf; + ssize_t n; + + am_node *mp = find_ap(*(char **) argp); + + memset(&rv, 0, sizeof(rv)); + rv.au_etype = AMQ_UMNT_READ; + if (mp && mp->am_fd[0] >= 0) { + n = read(mp->am_fd[0], &buf, sizeof(buf)); + if (n == sizeof(buf)) + rv = buf; + } + return &rv; +} + + +/* + * Synchronously unmount a single node - use if we can't fork (asynchronous). + */ +amq_sync_umnt * +amqproc_sync_umnt_1_svc_async(voidp argp, struct svc_req *rqstp) +{ + static amq_sync_umnt rv; + + memset(&rv, 0, sizeof(rv)); + rv.au_etype = AMQ_UMNT_FORK; + rv.au_errno = errno; + + amqproc_umnt_1_svc(argp, rqstp); + + return &rv; } @@ -170,6 +218,12 @@ amqproc_getmntfs_1_svc(voidp argp, struct svc_req *rqstp) return (amq_mount_info_list *) ((void *)&mfhead); /* XXX */ } +extern qelem map_list_head; +amq_map_info_list * +amqproc_getmapinfo_1_svc(voidp argp, struct svc_req *rqstp) +{ + return (amq_map_info_list *) ((void *)&map_list_head); /* XXX */ +} amq_string * amqproc_getvers_1_svc(voidp argp, struct svc_req *rqstp) @@ -218,11 +272,11 @@ amqproc_pawd_1_svc(voidp argp, struct svc_req *rqstp) for (mp = get_first_exported_ap(&index); mp; mp = get_next_exported_ap(&index)) { - if (STREQ(mp->am_mnt->mf_ops->fs_type, "toplvl")) + if (STREQ(mp->am_al->al_mnt->mf_ops->fs_type, "toplvl")) continue; - if (STREQ(mp->am_mnt->mf_ops->fs_type, "auto")) + if (STREQ(mp->am_al->al_mnt->mf_ops->fs_type, "auto")) continue; - mountpoint = (mp->am_link ? mp->am_link : mp->am_mnt->mf_mount); + mountpoint = (mp->am_link ? mp->am_link : mp->am_al->al_mnt->mf_mount); len = strlen(mountpoint); if (len == 0) continue; @@ -277,16 +331,16 @@ xdr_amq_mount_tree_node(XDR *xdrs, amq_mount_tree *objp) am_node *mp = (am_node *) objp; long mtime; - if (!xdr_amq_string(xdrs, &mp->am_mnt->mf_info)) { + if (!xdr_amq_string(xdrs, &mp->am_al->al_mnt->mf_info)) { return (FALSE); } if (!xdr_amq_string(xdrs, &mp->am_path)) { return (FALSE); } - if (!xdr_amq_string(xdrs, mp->am_link ? &mp->am_link : &mp->am_mnt->mf_mount)) { + if (!xdr_amq_string(xdrs, mp->am_link ? &mp->am_link : &mp->am_al->al_mnt->mf_mount)) { return (FALSE); } - if (!xdr_amq_string(xdrs, &mp->am_mnt->mf_ops->fs_type)) { + if (!xdr_amq_string(xdrs, &mp->am_al->al_mnt->mf_ops->fs_type)) { return (FALSE); } mtime = mp->am_stats.s_mtime; @@ -412,16 +466,15 @@ xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp) } - -/* - * Compute length of list - */ bool_t xdr_amq_mount_info_qelem(XDR *xdrs, qelem *qhead) { mntfs *mf; u_int len = 0; + /* + * Compute length of list + */ for (mf = AM_LAST(mntfs, qhead); mf != HEAD(mntfs, qhead); mf = PREV(mntfs, mf)) { if (!(mf->mf_fsflags & FS_AMQINFO)) continue; @@ -468,6 +521,70 @@ xdr_amq_mount_info_qelem(XDR *xdrs, qelem *qhead) return (TRUE); } +bool_t +xdr_amq_map_info_qelem(XDR *xdrs, qelem *qhead) +{ + mnt_map *m; + u_int len = 0; + int x; + char *n; + + /* + * Compute length of list + */ + ITER(m, mnt_map, qhead) { + len++; + } + + if (!xdr_u_int(xdrs, &len)) + return (FALSE); + + /* + * Send individual data items + */ + ITER(m, mnt_map, qhead) { + if (!xdr_amq_string(xdrs, &m->map_name)) { + return (FALSE); + } + + n = m->wildcard ? m->wildcard : ""; + if (!xdr_amq_string(xdrs, &n)) { + return (FALSE); + } + + if (!xdr_long(xdrs, &m->modify)) { + return (FALSE); + } + + x = m->flags; + if (!xdr_int(xdrs, &x)) { + return (FALSE); + } + + x = m->nentries; + if (!xdr_int(xdrs, &x)) { + return (FALSE); + } + + x = m->reloads; + if (!xdr_int(xdrs, &x)) { + return (FALSE); + } + + if (!xdr_int(xdrs, &m->refc)) { + return (FALSE); + } + + if (m->isup) + x = (*m->isup)(m, m->map_name); + else + x = -1; + if (!xdr_int(xdrs, &x)) { + return (FALSE); + } + } + return (TRUE); +} bool_t xdr_pri_free(XDRPROC_T_TYPE xdr_args, caddr_t args_ptr) diff --git a/amd/amq_svc.c b/amd/amq_svc.c index 6fadb160c12..1f2b3d6ff8d 100644 --- a/amd/amq_svc.c +++ b/amd/amq_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -57,7 +53,7 @@ typedef char *(*amqsvcproc_t)(voidp, struct svc_req *); * in libwrap, while others don't: so I need to know precisely iff * to define these two severity variables. */ -int allow_severity=0, deny_severity=0; +int allow_severity=0, deny_severity=0, rfc931_timeout=0; # endif /* NEED_LIBWRAP_SEVERITY_VARIABLES */ /* @@ -65,51 +61,90 @@ int allow_severity=0, deny_severity=0; * Returns: 1=allowed, 0=denied. */ static int -amqsvc_is_client_allowed(const struct sockaddr_in *addr, char *remote) +amqsvc_is_client_allowed(const struct sockaddr_in *addr) { - struct hostent *h; - char *name = NULL, **ad; - int ret = 0; /* default is 0==denied */ + struct request_info req; - /* Check IP address */ - if (hosts_ctl(AMD_SERVICE_NAME, "", remote, "")) { - ret = 1; - goto out; - } - /* Get address */ - if (!(h = gethostbyaddr((const char *)&(addr->sin_addr), - sizeof(addr->sin_addr), - AF_INET))) - goto out; - if (!(name = strdup(h->h_name))) - goto out; - /* Paranoia check */ - if (!(h = gethostbyname(name))) - goto out; - for (ad = h->h_addr_list; *ad; ad++) - if (!memcmp(*ad, &(addr->sin_addr), h->h_length)) - break; - if (!*ad) - goto out; - if (hosts_ctl(AMD_SERVICE_NAME, "", h->h_name, "")) { - return 1; - goto out; - } - /* Check aliases */ - for (ad = h->h_aliases; *ad; ad++) - if (hosts_ctl(AMD_SERVICE_NAME, "", *ad, "")) { - return 1; - goto out; - } + request_init(&req, RQ_DAEMON, AMD_SERVICE_NAME, RQ_CLIENT_SIN, addr, 0); + sock_methods(&req); - out: - if (name) - XFREE(name); - return ret; + if (hosts_access(&req)) + return 1; + + return 0; } #endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */ +/* + * Prepare the parent and child: + * 1) Setup IPC pipe. + * 2) Set signal masks. + * 3) Fork by calling background() so that NumChildren is updated. + */ +static int +amq_fork(opaque_t argp) +{ +#ifdef HAVE_SIGACTION + sigset_t new, mask; +#else /* not HAVE_SIGACTION */ + int mask; +#endif /* not HAVE_SIGACTION */ + am_node *mp; + pid_t pid; + + mp = find_ap(*(char **) argp); + if (mp == NULL) { + errno = 0; + return -1; + } + + if (pipe(mp->am_fd) == -1) { + mp->am_fd[0] = -1; + mp->am_fd[1] = -1; + return -1; + } + +#ifdef HAVE_SIGACTION + sigemptyset(&new); /* initialize signal set we wish to block */ + sigaddset(&new, SIGHUP); + sigaddset(&new, SIGINT); + sigaddset(&new, SIGQUIT); + sigaddset(&new, SIGCHLD); + sigprocmask(SIG_BLOCK, &new, &mask); +#else /* not HAVE_SIGACTION */ + mask = + sigmask(SIGHUP) | + sigmask(SIGINT) | + sigmask(SIGQUIT) | + sigmask(SIGCHLD); + mask = sigblock(mask); +#endif /* not HAVE_SIGACTION */ + + switch ((pid = background())) { + case -1: /* error */ + dlog("amq_fork failed"); + return -1; + + case 0: /* child */ + close(mp->am_fd[1]); /* close output end of pipe */ + mp->am_fd[1] = -1; + return 0; + + default: /* parent */ + close(mp->am_fd[0]); /* close input end of pipe */ + mp->am_fd[0] = -1; + +#ifdef HAVE_SIGACTION + sigprocmask(SIG_SETMASK, &mask, NULL); +#else /* not HAVE_SIGACTION */ + sigsetmask(mask); +#endif /* not HAVE_SIGACTION */ + return pid; + } +} + + void amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) { @@ -121,13 +156,16 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) char *result; xdrproc_t xdr_argument, xdr_result; amqsvcproc_t local; + amqsvcproc_t child; + amqsvcproc_t parent; + pid_t pid; #if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) if (gopt.flags & CFM_USE_TCPWRAPPERS) { struct sockaddr_in *remote_addr = svc_getcaller(rqstp->rq_xprt); char *remote_hostname = inet_ntoa(remote_addr->sin_addr); - if (!amqsvc_is_client_allowed(remote_addr, remote_hostname)) { + if (!amqsvc_is_client_allowed(remote_addr)) { plog(XLOG_WARNING, "Amd denied remote amq service to %s", remote_hostname); svcerr_auth(transp, AUTH_FAILED); return; @@ -137,6 +175,10 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) } #endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */ + local = NULL; + child = NULL; + parent = NULL; + switch (rqstp->rq_proc) { case AMQPROC_NULL: @@ -199,6 +241,21 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) local = (amqsvcproc_t) amqproc_pawd_1_svc; break; + case AMQPROC_SYNC_UMNT: + xdr_argument = (xdrproc_t) xdr_amq_string; + xdr_result = (xdrproc_t) xdr_amq_sync_umnt; + parent = (amqsvcproc_t) amqproc_sync_umnt_1_svc_parent; + child = (amqsvcproc_t) amqproc_sync_umnt_1_svc_child; + /* used if fork fails */ + local = (amqsvcproc_t) amqproc_sync_umnt_1_svc_async; + break; + + case AMQPROC_GETMAPINFO: + xdr_argument = (xdrproc_t) xdr_void; + xdr_result = (xdrproc_t) xdr_amq_map_info_qelem; + local = (amqsvcproc_t) amqproc_getmapinfo_1_svc; + break; + default: svcerr_noproc(transp); return; @@ -212,7 +269,28 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) return; } - result = (*local) (&argument, rqstp); + pid = -1; + result = NULL; + + if (child) { + switch ((pid = amq_fork(&argument))) { + case -1: /* error */ + break; + + case 0: /* child */ + result = (*child) (&argument, rqstp); + local = NULL; + break; + + default: /* parent */ + result = (*parent) (&argument, rqstp); + local = NULL; + break; + } + } + + if (local) + result = (*local) (&argument, rqstp); if (result != NULL && !svc_sendreply(transp, (XDRPROC_T_TYPE) xdr_result, @@ -226,4 +304,7 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) plog(XLOG_FATAL, "unable to free rpc arguments in amqprog_1"); going_down(1); } + + if (pid == 0) + exit(0); /* the child is done! */ } diff --git a/amd/autil.c b/amd/autil.c index a5ecd6d0d1f..cd9514d44ef 100644 --- a/amd/autil.c +++ b/amd/autil.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -160,16 +156,23 @@ valid_key(char *key) void forcibly_timeout_mp(am_node *mp) { - mntfs *mf = mp->am_mnt; + mntfs *mf = mp->am_al->al_mnt; /* * Arrange to timeout this node */ if (mf && ((mp->am_flags & AMF_ROOT) || (mf->mf_flags & (MFF_MOUNTING | MFF_UNMOUNTING)))) { + /* + * We aren't going to schedule a timeout, so we need to notify the + * child here unless we are already unmounting, in which case that + * process is responsible for notifying the child. + */ if (mf->mf_flags & MFF_UNMOUNTING) plog(XLOG_WARNING, "node %s is currently being unmounted, ignoring timeout request", mp->am_path); - else + else { plog(XLOG_WARNING, "ignoring timeout request for active node %s", mp->am_path); + notify_child(mp, AMQ_UMNT_FAILED, EBUSY, 0); + } } else { plog(XLOG_INFO, "\"%s\" forcibly timed out", mp->am_path); mp->am_flags &= ~AMF_NOTIMEOUT; @@ -207,24 +210,11 @@ mf_mounted(mntfs *mf, bool_t call_free_opts) mf->mf_ops->mounted(mf); /* - * Be careful when calling free_ops and XFREE here. Some pseudo file - * systems like nfsx call this function (mf_mounted), even though it - * would be called by the lower-level amd file system functions. nfsx - * needs to call this function because of the other actions it takes. - * So we pass a boolean from the caller (yes, not so clean workaround) - * to determine if we should free or not. If we're not freeing (often - * because we're called from a callback function), then just to be sure, - * we'll zero out the am_opts structure and set the pointer to NULL. - * The parent mntfs node owns this memory and is going to free it with a - * call to mf_mounted(mntfs,TRUE) (see comment in the am_mounted code). + * We used to free the mf_mo (options) here, however they're now stored + * and managed with the mntfs and do not need to be free'd here (this ensures + * that we use the same options to monitor/unmount the system as we used + * to mount it). */ - if (call_free_opts) { - free_opts(mf->mf_fo); /* this free is needed to prevent leaks */ - XFREE(mf->mf_fo); /* (also this one) */ - } else { - memset(mf->mf_fo, 0, sizeof(am_opts)); - mf->mf_fo = NULL; - } } if (mf->mf_flags & MFF_RESTART) { @@ -249,7 +239,7 @@ void am_mounted(am_node *mp) { int notimeout = 0; /* assume normal timeouts initially */ - mntfs *mf = mp->am_mnt; + mntfs *mf = mp->am_al->al_mnt; /* * This is the parent mntfs which does the mf->mf_fo (am_opts type), and @@ -266,7 +256,7 @@ am_mounted(am_node *mp) /* * Patch up path for direct mounts */ - if (mp->am_parent && mp->am_parent->am_mnt->mf_fsflags & FS_DIRECT) + if (mp->am_parent && mp->am_parent->am_al->al_mnt->mf_fsflags & FS_DIRECT) mp->am_path = str3cat(mp->am_path, mp->am_parent->am_path, "/", "."); /* @@ -277,6 +267,7 @@ am_mounted(am_node *mp) if (mf->mf_fsflags & FS_NOTIMEOUT) notimeout = 1; /* next, alter that decision by map flags */ + if (mf->mf_mopts) { mntent_t mnt; mnt.mnt_opts = mf->mf_mopts; @@ -321,7 +312,7 @@ am_mounted(am_node *mp) /* * Update mtime of parent node (copying "struct nfstime" in '=' below) */ - if (mp->am_parent && mp->am_parent->am_mnt) + if (mp->am_parent && mp->am_parent->am_al->al_mnt) mp->am_parent->am_fattr.na_mtime = mp->am_fattr.na_mtime; /* @@ -360,21 +351,27 @@ assign_error_mntfs(am_node *mp) { int error; dlog("assign_error_mntfs"); + + if (mp->am_al == NULL) { + plog(XLOG_ERROR, "%s: Can't assign error", __func__); + return; + } /* * Save the old error code */ error = mp->am_error; if (error <= 0) - error = mp->am_mnt->mf_error; + error = mp->am_al->al_mnt->mf_error; /* * Allocate a new error reference */ - mp->am_mnt = new_mntfs(); + free_loc(mp->am_al); + mp->am_al = new_loc(); /* * Put back the error code */ - mp->am_mnt->mf_error = error; - mp->am_mnt->mf_flags |= MFF_ERROR; + mp->am_al->al_mnt->mf_error = error; + mp->am_al->al_mnt->mf_flags |= MFF_ERROR; /* * Zero the error in the mount point */ @@ -397,7 +394,8 @@ amfs_mkcacheref(mntfs *mf) cache = "none"; mf->mf_private = (opaque_t) mapc_find(mf->mf_info, cache, - (mf->mf_fo ? mf->mf_fo->opt_maptype : NULL)); + (mf->mf_fo ? mf->mf_fo->opt_maptype : NULL), + mf->mf_mount); mf->mf_prfree = mapc_free; } @@ -418,7 +416,7 @@ next_nonerror_node(am_node *xp) * containing hung automounts. */ while (xp && - (!(mf = xp->am_mnt) || /* No mounted filesystem */ + (!(mf = xp->am_al->al_mnt) || /* No mounted filesystem */ mf->mf_error != 0 || /* There was a mntfs error */ xp->am_error != 0 || /* There was a mount error */ !(mf->mf_flags & MFF_MOUNTED) || /* The fs is not mounted */ @@ -453,8 +451,9 @@ amfs_mount(am_node *mp, mntfs *mf, char *opts) mntent_t mnt; MTYPE_TYPE type; int forced_unmount = 0; /* are we using forced unmounts? */ + u_long nfs_version = get_nfs_dispatcher_version(nfs_dispatcher); - memset((voidp) &mnt, 0, sizeof(mnt)); + memset(&mnt, 0, sizeof(mnt)); mnt.mnt_dir = dir; mnt.mnt_fsname = pid_fsname; mnt.mnt_opts = opts; @@ -525,8 +524,7 @@ amfs_mount(am_node *mp, mntfs *mf, char *opts) again: if (!(mf->mf_flags & MFF_IS_AUTOFS)) { nfs_args_t nfs_args; - am_nfs_fh *fhp; - am_nfs_handle_t anh; + am_nfs_handle_t *fhp, anh; #ifndef HAVE_TRANSPORT_TYPE_TLI u_short port; struct sockaddr_in sin; @@ -535,7 +533,7 @@ again: /* * get fhandle of remote path for automount point */ - fhp = get_root_nfs_fh(dir); + fhp = get_root_nfs_fh(dir, &anh); if (!fhp) { plog(XLOG_FATAL, "Can't find root file handle for %s", dir); return EINVAL; @@ -545,7 +543,7 @@ again: /* * Create sockaddr to point to the local machine. */ - memset((voidp) &sin, 0, sizeof(sin)); + memset(&sin, 0, sizeof(sin)); /* as per POSIX, sin_len need not be set (used internally by kernel) */ sin.sin_family = AF_INET; sin.sin_addr = myipaddr; @@ -559,16 +557,15 @@ again: #endif /* not HAVE_TRANSPORT_TYPE_TLI */ /* setup the many fields and flags within nfs_args */ - memmove(&anh.v2, fhp, sizeof(*fhp)); #ifdef HAVE_TRANSPORT_TYPE_TLI compute_nfs_args(&nfs_args, &mnt, genflags, nfsncp, NULL, /* remote host IP addr is set below */ - NFS_VERSION, /* version 2 */ + nfs_version, "udp", - &anh, + fhp, fs_hostname, pid_fsname); /* @@ -587,9 +584,9 @@ again: genflags, NULL, &sin, - NFS_VERSION, /* version 2 */ + nfs_version, "udp", - &anh, + fhp, fs_hostname, pid_fsname); #endif /* not HAVE_TRANSPORT_TYPE_TLI */ @@ -656,10 +653,17 @@ again: void am_unmounted(am_node *mp) { - mntfs *mf = mp->am_mnt; + mntfs *mf = mp->am_al->al_mnt; - if (!foreground) /* firewall - should never happen */ + if (!foreground) { /* firewall - should never happen */ + /* + * This is a coding error. Make sure we hear about it! + */ + plog(XLOG_FATAL, "am_unmounted: illegal use in background (%s)", + mp->am_name); + notify_child(mp, AMQ_UMNT_OK, 0, 0); /* XXX - be safe? */ return; + } /* * Do unmounted callback @@ -707,26 +711,37 @@ am_unmounted(am_node *mp) /* * Update mtime of parent node */ - if (mp->am_parent && mp->am_parent->am_mnt) + if (mp->am_parent && mp->am_parent->am_al->al_mnt) clocktime(&mp->am_parent->am_fattr.na_mtime); if (mp->am_parent && (mp->am_flags & AMF_REMOUNT)) { - char *fname = strdup(mp->am_name); + char *fname = xstrdup(mp->am_name); am_node *mp_parent = mp->am_parent; - mntfs *mf_parent = mp_parent->am_mnt; + mntfs *mf_parent = mp_parent->am_al->al_mnt; + am_node fake_mp; int error = 0; + /* + * We need to use notify_child() after free_map(), so save enough + * to do that in fake_mp. + */ + fake_mp.am_fd[1] = mp->am_fd[1]; + mp->am_fd[1] = -1; + free_map(mp); plog(XLOG_INFO, "am_unmounted: remounting %s", fname); mp = mf_parent->mf_ops->lookup_child(mp_parent, fname, &error, VLOOK_CREATE); if (mp && error < 0) - mp = mf_parent->mf_ops->mount_child(mp, &error); + (void)mf_parent->mf_ops->mount_child(mp, &error); if (error > 0) { errno = error; plog(XLOG_ERROR, "am_unmounted: could not remount %s: %m", fname); + notify_child(&fake_mp, AMQ_UMNT_OK, 0, 0); + } else { + notify_child(&fake_mp, AMQ_UMNT_FAILED, EBUSY, 0); } XFREE(fname); - } else + } else { /* * We have a race here. * If this node has a pending mount and amd is going down (unmounting @@ -734,10 +749,12 @@ am_unmounted(am_node *mp) * while a struct continuation still has a reference to it. So when * amfs_cont is called, it blows up. * We avoid the race by refusing to free any nodes that have - * pending mounts (defined as having a non-NULL am_mfarray). + * pending mounts (defined as having a non-NULL am_alarray). */ - if (!mp->am_mfarray) + notify_child(mp, AMQ_UMNT_OK, 0, 0); /* do this regardless */ + if (!mp->am_alarray) free_map(mp); + } } diff --git a/amd/clock.c b/amd/clock.c index 0caa7dff2c7..4c6aa541376 100644 --- a/amd/clock.c +++ b/amd/clock.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/amd/conf.c b/amd/conf.c index 2fc587b0cad..57e1b9ddbd0 100644 --- a/amd/conf.c +++ b/amd/conf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -77,6 +73,7 @@ struct _func_map { static int gopt_arch(const char *val); static int gopt_auto_attrcache(const char *val); static int gopt_auto_dir(const char *val); +static int gopt_auto_nfs_version(const char *val); static int gopt_autofs_use_lofs(const char *val); static int gopt_browsable_dirs(const char *val); static int gopt_cache_duration(const char *val); @@ -120,6 +117,7 @@ static int gopt_nfs_retry_interval_udp(const char *val); static int gopt_nfs_retry_interval_tcp(const char *val); static int gopt_nfs_retry_interval_toplvl(const char *val); static int gopt_nfs_vers(const char *val); +static int gopt_nfs_vers_ping(const char *val); static int gopt_nis_domain(const char *val); static int gopt_normalize_hostnames(const char *val); static int gopt_normalize_slashes(const char *val); @@ -132,6 +130,7 @@ static int gopt_restart_mounts(const char *val); static int gopt_search_path(const char *val); static int gopt_selectors_in_defaults(const char *val); static int gopt_show_statfs_entries(const char *val); +static int gopt_sun_map_syntax(const char *val); static int gopt_truncate_log(const char *val); static int gopt_unmount_on_exit(const char *val); static int gopt_use_tcpwrappers(const char *val); @@ -146,6 +145,7 @@ static int ropt_map_options(const char *val, cf_map_t *cfm); static int ropt_map_type(const char *val, cf_map_t *cfm); static int ropt_mount_type(const char *val, cf_map_t *cfm); static int ropt_search_path(const char *val, cf_map_t *cfm); +static int ropt_sun_map_syntax(const char *val, cf_map_t *cfm); static int ropt_tag(const char *val, cf_map_t *cfm); static void init_cf_map(cf_map_t *cfm); @@ -159,6 +159,7 @@ static struct _func_map glob_functable[] = { {"arch", gopt_arch}, {"auto_attrcache", gopt_auto_attrcache}, {"auto_dir", gopt_auto_dir}, + {"auto_nfs_version", gopt_auto_nfs_version}, {"autofs_use_lofs", gopt_autofs_use_lofs}, {"browsable_dirs", gopt_browsable_dirs}, {"cache_duration", gopt_cache_duration}, @@ -202,6 +203,7 @@ static struct _func_map glob_functable[] = { {"nfs_retry_interval_tcp", gopt_nfs_retry_interval_tcp}, {"nfs_retry_interval_toplvl", gopt_nfs_retry_interval_toplvl}, {"nfs_vers", gopt_nfs_vers}, + {"nfs_vers_ping", gopt_nfs_vers_ping}, {"nis_domain", gopt_nis_domain}, {"normalize_hostnames", gopt_normalize_hostnames}, {"normalize_slashes", gopt_normalize_slashes}, @@ -215,6 +217,7 @@ static struct _func_map glob_functable[] = { {"selectors_on_default", gopt_selectors_in_defaults}, {"selectors_in_defaults", gopt_selectors_in_defaults}, {"show_statfs_entries", gopt_show_statfs_entries}, + {"sun_map_syntax", gopt_sun_map_syntax}, {"truncate_log", gopt_truncate_log}, {"unmount_on_exit", gopt_unmount_on_exit}, {"use_tcpwrappers", gopt_use_tcpwrappers}, @@ -255,12 +258,14 @@ init_cf_map(cf_map_t *cfm) cfm->cfm_search_path = gopt.search_path; /* - * Initialize flags that are common both to [global] and a local map. + * Initialize flags that are common both to [global] and a local map + * (that is, they could be inherited from the global section). */ cfm->cfm_flags = gopt.flags & (CFM_BROWSABLE_DIRS | CFM_BROWSABLE_DIRS_FULL | CFM_MOUNT_TYPE_AUTOFS | - CFM_SELECTORS_IN_DEFAULTS); + CFM_SELECTORS_IN_DEFAULTS | + CFM_SUN_MAP_SYNTAX ); } @@ -366,7 +371,7 @@ process_global_option(const char *key, const char *val) static int gopt_arch(const char *val) { - gopt.arch = strdup((char *)val); + gopt.arch = xstrdup(val); return 0; } @@ -386,10 +391,23 @@ gopt_auto_attrcache(const char *val) static int gopt_auto_dir(const char *val) { - gopt.auto_dir = strdup((char *)val); + gopt.auto_dir = xstrdup(val); return 0; } +static int +gopt_auto_nfs_version(const char *val) +{ + if (strcmp(val, "2") == 0) + nfs_dispatcher = nfs_program_2; + else if (strcmp(val, "3") == 0) + nfs_dispatcher = nfs_program_3; + else { + fprintf(stderr, "conf: bad auto nfs version : \"%s\"\n", val); + return 1; + } + return 0; +} static int gopt_autofs_use_lofs(const char *val) @@ -439,7 +457,7 @@ gopt_cache_duration(const char *val) static int gopt_cluster(const char *val) { - gopt.cluster = strdup((char *)val); + gopt.cluster = xstrdup(val); return 0; } @@ -447,7 +465,7 @@ gopt_cluster(const char *val) static int gopt_debug_mtab_file(const char *val) { - gopt.debug_mtab_file = strdup((char*)val); + gopt.debug_mtab_file = xstrdup(val); return 0; } @@ -547,7 +565,7 @@ gopt_forced_unmounts(const char *val) static int gopt_full_os(const char *val) { - gopt.op_sys_full = strdup((char *)val); + gopt.op_sys_full = xstrdup(val); return 0; } @@ -572,7 +590,7 @@ static int gopt_hesiod_base(const char *val) { #ifdef HAVE_MAP_HESIOD - gopt.hesiod_base = strdup((char *)val); + gopt.hesiod_base = xstrdup(val); return 0; #else /* not HAVE_MAP_HESIOD */ fprintf(stderr, "conf: hesiod_base option ignored. No Hesiod support available.\n"); @@ -584,7 +602,7 @@ gopt_hesiod_base(const char *val) static int gopt_karch(const char *val) { - gopt.karch = strdup((char *)val); + gopt.karch = xstrdup(val); return 0; } @@ -592,7 +610,7 @@ gopt_karch(const char *val) static int gopt_pid_file(const char *val) { - gopt.pid_file = strdup((char *)val); + gopt.pid_file = xstrdup(val); return 0; } @@ -600,7 +618,7 @@ gopt_pid_file(const char *val) static int gopt_local_domain(const char *val) { - gopt.sub_domain = strdup((char *)val); + gopt.sub_domain = xstrdup(val); return 0; } @@ -608,7 +626,7 @@ gopt_local_domain(const char *val) static int gopt_localhost_address(const char *val) { - gopt.localhost_address = strdup((char *)val); + gopt.localhost_address = xstrdup(val); return 0; } @@ -617,7 +635,7 @@ static int gopt_ldap_base(const char *val) { #ifdef HAVE_MAP_LDAP - gopt.ldap_base = strdup((char *)val); + gopt.ldap_base = xstrdup(val); return 0; #else /* not HAVE_MAP_LDAP */ fprintf(stderr, "conf: ldap_base option ignored. No LDAP support available.\n"); @@ -668,7 +686,7 @@ static int gopt_ldap_hostports(const char *val) { #ifdef HAVE_MAP_LDAP - gopt.ldap_hostports = strdup((char *)val); + gopt.ldap_hostports = xstrdup(val); return 0; #else /* not HAVE_MAP_LDAP */ fprintf(stderr, "conf: ldap_hostports option ignored. No LDAP support available.\n"); @@ -719,7 +737,7 @@ gopt_ldap_proto_version(const char *val) static int gopt_log_file(const char *val) { - gopt.logfile = strdup((char *)val); + gopt.logfile = xstrdup(val); return 0; } @@ -735,7 +753,7 @@ gopt_log_options(const char *val) static int gopt_map_defaults(const char *val) { - gopt.map_defaults = strdup((char *)val); + gopt.map_defaults = xstrdup(val); return 0; } @@ -743,7 +761,7 @@ gopt_map_defaults(const char *val) static int gopt_map_options(const char *val) { - gopt.map_options = strdup((char *)val); + gopt.map_options = xstrdup(val); return 0; } @@ -766,7 +784,7 @@ gopt_map_type(const char *val) fprintf(stderr, "conf: no such map type \"%s\"\n", val); return 1; } - gopt.map_type = strdup((char *)val); + gopt.map_type = xstrdup(val); return 0; } @@ -863,7 +881,7 @@ static int gopt_nfs_proto(const char *val) { if (STREQ(val, "udp") || STREQ(val, "tcp")) { - gopt.nfs_proto = strdup((char *)val); + gopt.nfs_proto = xstrdup(val); return 0; } fprintf(stderr, "conf: illegal nfs_proto \"%s\"\n", val); @@ -946,7 +964,7 @@ gopt_nfs_vers(const char *val) { int i = atoi(val); - if (i == 2 || i == 3) { + if (i == 2 || i == 3 || i == 4) { gopt.nfs_vers = i; return 0; } @@ -955,11 +973,24 @@ gopt_nfs_vers(const char *val) } +static int +gopt_nfs_vers_ping(const char *val) +{ + int i = atoi(val); + + if (i == 2 || i == 3 || i == 4) { + gopt.nfs_vers_ping = i; + return 0; + } + fprintf(stderr, "conf: illegal nfs_vers_ping \"%s\"\n", val); + return 1; +} + static int gopt_nis_domain(const char *val) { #ifdef HAVE_MAP_NIS - gopt.nis_domain = strdup((char *)val); + gopt.nis_domain = xstrdup(val); return 0; #else /* not HAVE_MAP_NIS */ fprintf(stderr, "conf: nis_domain option ignored. No NIS support available.\n"); @@ -1003,7 +1034,7 @@ gopt_normalize_slashes(const char *val) static int gopt_os(const char *val) { - gopt.op_sys = strdup((char *)val); + gopt.op_sys = xstrdup(val); return 0; } @@ -1011,7 +1042,7 @@ gopt_os(const char *val) static int gopt_osver(const char *val) { - gopt.op_sys_ver = strdup((char *)val); + gopt.op_sys_ver = xstrdup(val); return 0; } @@ -1084,7 +1115,7 @@ gopt_restart_mounts(const char *val) static int gopt_search_path(const char *val) { - gopt.search_path = strdup((char *)val); + gopt.search_path = xstrdup(val); return 0; } @@ -1121,6 +1152,22 @@ gopt_show_statfs_entries(const char *val) } +static int +gopt_sun_map_syntax(const char *val) +{ + if (STREQ(val, "yes")) { + gopt.flags |= CFM_SUN_MAP_SYNTAX; + return 0; + } else if (STREQ(val, "no")) { + gopt.flags &= ~CFM_SUN_MAP_SYNTAX; + return 0; + } + + fprintf(stderr, "conf: unknown value to sun_map_syntax \"%s\"\n", val); + return 1; /* unknown value */ +} + + static int gopt_truncate_log(const char *val) { @@ -1177,7 +1224,7 @@ gopt_use_tcpwrappers(const char *val) static int gopt_vendor(const char *val) { - gopt.op_sys_vendor = strdup((char *)val); + gopt.op_sys_vendor = xstrdup(val); return 0; } @@ -1199,7 +1246,7 @@ process_regular_option(const char *section, const char *key, const char *val, cf /* check if initializing a new map */ if (!cfm->cfm_dir) - cfm->cfm_dir = strdup((char *)section); + cfm->cfm_dir = xstrdup(section); /* check for each possible field */ if (STREQ(key, "browsable_dirs")) @@ -1223,6 +1270,9 @@ process_regular_option(const char *section, const char *key, const char *val, cf if (STREQ(key, "search_path")) return ropt_search_path(val, cfm); + if (STREQ(key, "sun_map_syntax")) + return ropt_sun_map_syntax(val, cfm); + if (STREQ(key, "tag")) return ropt_tag(val, cfm); @@ -1254,7 +1304,7 @@ ropt_browsable_dirs(const char *val, cf_map_t *cfm) static int ropt_map_name(const char *val, cf_map_t *cfm) { - cfm->cfm_name = strdup((char *)val); + cfm->cfm_name = xstrdup(val); return 0; } @@ -1262,7 +1312,7 @@ ropt_map_name(const char *val, cf_map_t *cfm) static int ropt_map_defaults(const char *val, cf_map_t *cfm) { - cfm->cfm_defaults = strdup((char *)val); + cfm->cfm_defaults = xstrdup(val); return 0; } @@ -1270,7 +1320,7 @@ ropt_map_defaults(const char *val, cf_map_t *cfm) static int ropt_map_options(const char *val, cf_map_t *cfm) { - cfm->cfm_opts = strdup((char *)val); + cfm->cfm_opts = xstrdup(val); return 0; } @@ -1283,7 +1333,7 @@ ropt_map_type(const char *val, cf_map_t *cfm) fprintf(stderr, "conf: no such map type \"%s\"\n", val); return 1; } - cfm->cfm_type = strdup((char *)val); + cfm->cfm_type = xstrdup(val); return 0; } @@ -1313,15 +1363,32 @@ ropt_mount_type(const char *val, cf_map_t *cfm) static int ropt_search_path(const char *val, cf_map_t *cfm) { - cfm->cfm_search_path = strdup((char *)val); + cfm->cfm_search_path = xstrdup(val); return 0; } +static int +ropt_sun_map_syntax(const char *val, cf_map_t *cfm) +{ + if (STREQ(val, "yes")) { + cfm->cfm_flags |= CFM_SUN_MAP_SYNTAX; + return 0; + + } else if (STREQ(val, "no")) { + cfm->cfm_flags &= ~CFM_SUN_MAP_SYNTAX; + return 0; + } + + fprintf(stderr, "conf: unknown value to sun_map_syntax \"%s\"\n", val); + return 1; /* unknown value */ +} + + static int ropt_tag(const char *val, cf_map_t *cfm) { - cfm->cfm_tag = strdup((char *)val); + cfm->cfm_tag = xstrdup(val); return 0; } @@ -1397,7 +1464,7 @@ find_cf_map(const char *name) return NULL; while (tmp_map) { - if (STREQ(tmp_map->cfm_dir,name)) { + if (STREQ(tmp_map->cfm_dir, name)) { return tmp_map; } tmp_map = tmp_map->cfm_next; diff --git a/amd/conf_parse.y b/amd/conf_parse.y index b397b057324..26c1b7ac790 100644 --- a/amd/conf_parse.y +++ b/amd/conf_parse.y @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/amd/conf_tok.l b/amd/conf_tok.l index b572e4d7d5a..fea2d8bf43f 100644 --- a/amd/conf_tok.l +++ b/amd/conf_tok.l @@ -1,6 +1,6 @@ %{ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -17,11 +17,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -74,7 +70,7 @@ */ #ifdef FLEX_SCANNER # ifndef ECHO -# define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +# define ECHO __IGNORE(fwrite( yytext, yyleng, 1, yyout )) # endif /* not ECHO */ #endif /* FLEX_SCANNER */ @@ -86,9 +82,9 @@ int yylex(void); * which automatically generates yywrap macros and symbols. So I must * distinguish between them and when yywrap is actually needed. */ -#ifndef yywrap +#if !defined(yywrap) || defined(yylex) int yywrap(void); -#endif /* not yywrap */ +#endif /* not yywrap or yylex */ #define TOK_DEBUG 0 @@ -108,6 +104,7 @@ int yywrap(void); /* This option causes Solaris lex to fail. Use flex. See BUGS file */ /* no need to use yyunput() */ %option nounput +%option noinput /* allocate more output slots so lex scanners don't run out of mem */ %o 1024 @@ -131,19 +128,19 @@ NONQUOTE [^\"] \[ { dprintf("%8d: Left bracket \"%s\"\n", yytext); - yylval.strtype = strdup((char *)yytext); + conf_lval.strtype = xstrdup(yytext); amu_return(LEFT_BRACKET); } \] { dprintf("%8d: Right bracket \"%s\"\n", yytext); - yylval.strtype = strdup((char *)yytext); + conf_lval.strtype = xstrdup(yytext); amu_return(RIGHT_BRACKET); } = { dprintf("%8d: Equal \"%s\"\n", yytext); - yylval.strtype = strdup((char *)yytext); + conf_lval.strtype = xstrdup(yytext); amu_return(EQUAL); } @@ -159,7 +156,7 @@ NONQUOTE [^\"] {NONWSCHAR}{NONWSCHAR}* { dprintf("%8d: Non-WS string \"%s\"\n", yytext); - yylval.strtype = strdup((char *)yytext); + conf_lval.strtype = xstrdup(yytext); amu_return(NONWS_STRING); } @@ -167,13 +164,13 @@ NONQUOTE [^\"] dprintf("%8d: QUOTED-Non-WS-EQ string \"%s\"\n", yytext); /* must strip quotes */ yytext[strlen((char *)yytext)-1] = '\0'; - yylval.strtype = strdup((char *)&yytext[1]); + conf_lval.strtype = xstrdup(&yytext[1]); amu_return(QUOTED_NONWSEQ_STRING); } {NONWSEQCHAR}{NONWSEQCHAR}* { dprintf("%8d: Non-WS-EQ string \"%s\"\n", yytext); - yylval.strtype = strdup((char *)yytext); + conf_lval.strtype = xstrdup(yytext); amu_return(NONWSEQ_STRING); } @@ -184,9 +181,9 @@ NONQUOTE [^\"] * which automatically generates yywrap macros and symbols. So I must * distinguish between them and when yywrap is actually needed. */ -#ifndef yywrap +#if !defined(yywrap) || defined(yylex) int yywrap(void) { return 1; } -#endif /* not yywrap */ +#endif /* not yywrap or yylex */ diff --git a/amd/get_args.c b/amd/get_args.c index 12a7d07efd5..b6c7a99de33 100644 --- a/amd/get_args.c +++ b/amd/get_args.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -84,44 +80,44 @@ get_version_string(void) len = 2048 + wire_buf_len; vers = xmalloc(len); xsnprintf(vers, len, "%s\n%s\n%s\n%s\n", - "Copyright (c) 1997-2006 Erez Zadok", + "Copyright (c) 1997-2014 Erez Zadok", "Copyright (c) 1990 Jan-Simon Pendry", "Copyright (c) 1990 Imperial College of Science, Technology & Medicine", "Copyright (c) 1990 The Regents of the University of California."); xsnprintf(tmpbuf, sizeof(tmpbuf), "%s version %s (build %d).\n", PACKAGE_NAME, PACKAGE_VERSION, AMU_BUILD_VERSION); - strlcat(vers, tmpbuf, len); + xstrlcat(vers, tmpbuf, len); xsnprintf(tmpbuf, sizeof(tmpbuf), "Report bugs to %s.\n", PACKAGE_BUGREPORT); - strlcat(vers, tmpbuf, len); + xstrlcat(vers, tmpbuf, len); xsnprintf(tmpbuf, sizeof(tmpbuf), "Configured by %s@%s on date %s.\n", USER_NAME, HOST_NAME, CONFIG_DATE); - strlcat(vers, tmpbuf, len); + xstrlcat(vers, tmpbuf, len); xsnprintf(tmpbuf, sizeof(tmpbuf), "Built by %s@%s on date %s.\n", BUILD_USER, BUILD_HOST, BUILD_DATE); - strlcat(vers, tmpbuf, len); + xstrlcat(vers, tmpbuf, len); xsnprintf(tmpbuf, sizeof(tmpbuf), "cpu=%s (%s-endian), arch=%s, karch=%s.\n", cpu, endian, gopt.arch, gopt.karch); - strlcat(vers, tmpbuf, len); + xstrlcat(vers, tmpbuf, len); xsnprintf(tmpbuf, sizeof(tmpbuf), "full_os=%s, os=%s, osver=%s, vendor=%s, distro=%s.\n", gopt.op_sys_full, gopt.op_sys, gopt.op_sys_ver, gopt.op_sys_vendor, DISTRO_NAME); - strlcat(vers, tmpbuf, len); + xstrlcat(vers, tmpbuf, len); xsnprintf(tmpbuf, sizeof(tmpbuf), "domain=%s, host=%s, hostd=%s.\n", hostdomain, am_get_hostname(), hostd); - strlcat(vers, tmpbuf, len); + xstrlcat(vers, tmpbuf, len); - strlcat(vers, "Map support for: ", len); + xstrlcat(vers, "Map support for: ", len); mapc_showtypes(tmpbuf, sizeof(tmpbuf)); - strlcat(vers, tmpbuf, len); - strlcat(vers, ".\nAMFS: ", len); + xstrlcat(vers, tmpbuf, len); + xstrlcat(vers, ".\nAMFS: ", len); ops_showamfstypes(tmpbuf, sizeof(tmpbuf)); - strlcat(vers, tmpbuf, len); - strlcat(vers, ", inherit.\nFS: ", len); /* hack: "show" that we support type:=inherit */ + xstrlcat(vers, tmpbuf, len); + xstrlcat(vers, ", inherit.\nFS: ", len); /* hack: "show" that we support type:=inherit */ ops_showfstypes(tmpbuf, sizeof(tmpbuf)); - strlcat(vers, tmpbuf, len); + xstrlcat(vers, tmpbuf, len); /* append list of networks if available */ if (wire_buf) { - strlcat(vers, wire_buf, len); + xstrlcat(vers, wire_buf, len); XFREE(wire_buf); } @@ -331,19 +327,18 @@ get_args(int argc, char *argv[]) perror(buf); exit(1); } - yyin = fp; - yyparse(); + conf_in = fp; + conf_parse(); fclose(fp); if (process_all_regular_maps() != 0) exit(1); } - /* make sure there are some default options defined */ - if (xlog_level_init == ~0) { - switch_option(""); - } #ifdef DEBUG usage += switch_option("debug"); + /* initialize debug options */ + if (!debug_flags) + debug_flags = D_CONTROL; /* CONTROL = "daemon,amq,fork" */ #endif /* DEBUG */ /* log information regarding amd.conf file */ diff --git a/amd/info_exec.c b/amd/info_exec.c index 8ccab9aee57..95216c90e2e 100644 --- a/amd/info_exec.c +++ b/amd/info_exec.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -52,8 +48,8 @@ #endif /* HAVE_CONFIG_H */ #include #include +#include -#define MAX_LINE_LEN 1500 /* forward declarations */ int exec_init(mnt_map *m, char *map, time_t *tp); @@ -74,13 +70,13 @@ fgets_timed(char *s, int size, int rdfd, int secs) if (!s || size < 0 || rdfd < 0) return 0; - s[0] = 0; + s[0] = '\0'; if (size == 0) return s; start = clocktime(NULL); while (s[i] != '\n' && i < size-1) { - s[i+1] = 0; /* places the requisite trailing '\0' */ + s[i+1] = '\0'; /* places the requisite trailing '\0' */ /* ready for reading */ rval = read(rdfd, (void *)(s+i), 1); @@ -114,7 +110,7 @@ fgets_timed(char *s, int size, int rdfd, int secs) FD_ZERO(&fds); FD_SET(rdfd, &fds); - rval = select(rdfd+1, &fds, 0, 0, &timeo); + rval = select(rdfd+1, &fds, NULL, NULL, &timeo); if (rval < 0) { /* error selecting */ plog(XLOG_WARNING, "fgets_timed select error: %m"); @@ -165,9 +161,9 @@ read_line(char *buf, int size, int fd) * Try to locate a value in a query answer */ static int -exec_parse_qanswer(int fd, char *map, char *key, char **pval, time_t *tp) +exec_parse_qanswer(mnt_map *m, int fd, char *map, char *key, char **pval, time_t *tp) { - char qanswer[MAX_LINE_LEN], *dc = 0; + char qanswer[INFO_MAX_LINE_LEN], *dc = NULL; int chuck = 0; int line_no = 0; @@ -197,7 +193,7 @@ exec_parse_qanswer(int fd, char *map, char *key, char **pval, time_t *tp) /* * Find beginning of value (query answer) */ - for (cp = qanswer; *cp && !isascii((int)*cp) && !isspace((int)*cp); cp++) + for (cp = qanswer; *cp && !isascii((unsigned char)*cp) && !isspace((unsigned char)*cp); cp++) ;; /* Ignore blank lines */ @@ -207,7 +203,10 @@ exec_parse_qanswer(int fd, char *map, char *key, char **pval, time_t *tp) /* * Return a copy of the data */ - dc = strdup(cp); + if (m->cfm && (m->cfm->cfm_flags & CFM_SUN_MAP_SYNTAX)) + dc = sun_entry2amd(key, cp); + else + dc = xstrdup(cp); *pval = dc; dlog("%s returns %s", key, dc); @@ -324,7 +323,7 @@ exec_map_open(char *emap, char *key) close(pdes[1]); /* anti-zombie insurance */ - while (waitpid(p1,0,0) < 0) + while (waitpid(p1, 0, 0) < 0) if (errno != EINTR) exit(errno); @@ -416,7 +415,7 @@ exec_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) if (tp) *tp = clocktime(NULL); - return exec_parse_qanswer(mapfd, map, key, pval, tp); + return exec_parse_qanswer(m, mapfd, map, key, pval, tp); } return errno; diff --git a/amd/info_file.c b/amd/info_file.c index 3777a2aebe9..738c7bfa577 100644 --- a/amd/info_file.c +++ b/amd/info_file.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -50,8 +46,8 @@ #endif /* HAVE_CONFIG_H */ #include #include +#include -#define MAX_LINE_LEN 1500 /* forward declarations */ int file_init_or_mtime(mnt_map *m, char *map, time_t *tp); @@ -59,8 +55,8 @@ int file_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *)); int file_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp); -static int -read_line(char *buf, int size, FILE *fp) +int +file_read_line(char *buf, int size, FILE *fp) { int done = 0; @@ -79,7 +75,7 @@ read_line(char *buf, int size, FILE *fp) * Skip leading white space on next line */ while ((ch = getc(fp)) != EOF && - isascii(ch) && isspace(ch)) ; + isascii((unsigned char)ch) && isspace((unsigned char)ch)) ; (void) ungetc(ch, fp); } else { return done; @@ -95,18 +91,18 @@ read_line(char *buf, int size, FILE *fp) * Try to locate a key in a file */ static int -file_search_or_reload(FILE *fp, +file_search_or_reload(mnt_map *m, + FILE *fp, char *map, char *key, char **val, - mnt_map *m, void (*fn) (mnt_map *m, char *, char *)) { - char key_val[MAX_LINE_LEN]; + char key_val[INFO_MAX_LINE_LEN]; int chuck = 0; int line_no = 0; - while (read_line(key_val, sizeof(key_val), fp)) { + while (file_read_line(key_val, sizeof(key_val), fp)) { char *kp; char *cp; char *hash; @@ -133,7 +129,7 @@ file_search_or_reload(FILE *fp, /* * Find start of key */ - for (kp = key_val; *kp && isascii(*kp) && isspace((int)*kp); kp++) ; + for (kp = key_val; *kp && isascii((unsigned char)*kp) && isspace((unsigned char)*kp); kp++) ; /* * Ignore blank lines @@ -144,7 +140,7 @@ file_search_or_reload(FILE *fp, /* * Find end of key */ - for (cp = kp; *cp && (!isascii(*cp) || !isspace((int)*cp)); cp++) ; + for (cp = kp; *cp && (!isascii((unsigned char)*cp) || !isspace((unsigned char)*cp)); cp++) ; /* * Check whether key matches @@ -153,15 +149,20 @@ file_search_or_reload(FILE *fp, *cp++ = '\0'; if (fn || (*key == *kp && STREQ(key, kp))) { - while (*cp && isascii(*cp) && isspace((int)*cp)) + while (*cp && isascii((unsigned char)*cp) && isspace((unsigned char)*cp)) cp++; if (*cp) { /* * Return a copy of the data */ - char *dc = strdup(cp); + char *dc; + /* if m->cfm == NULL, not using amd.conf file */ + if (m->cfm && (m->cfm->cfm_flags & CFM_SUN_MAP_SYNTAX)) + dc = sun_entry2amd(kp, cp); + else + dc = xstrdup(cp); if (fn) { - (*fn) (m, strdup(kp), dc); + (*fn) (m, xstrdup(kp), dc); } else { *val = dc; dlog("%s returns %s", key, dc); @@ -221,10 +222,10 @@ file_init_or_mtime(mnt_map *m, char *map, time_t *tp) int file_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *)) { - FILE *mapf = file_open(map, (time_t *) 0); + FILE *mapf = file_open(map, (time_t *) NULL); if (mapf) { - int error = file_search_or_reload(mapf, map, 0, 0, m, fn); + int error = file_search_or_reload(m, mapf, map, NULL, NULL, fn); (void) fclose(mapf); return error; } @@ -244,7 +245,7 @@ file_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) *tp = t; error = -1; } else { - error = file_search_or_reload(mapf, map, key, pval, 0, 0); + error = file_search_or_reload(m, mapf, map, key, pval, NULL); } (void) fclose(mapf); return error; diff --git a/amd/info_hesiod.c b/amd/info_hesiod.c index e345c996150..0293f435a26 100644 --- a/amd/info_hesiod.c +++ b/amd/info_hesiod.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -50,6 +46,7 @@ #endif /* HAVE_CONFIG_H */ #include #include +#include #define HES_PREFIX "hesiod." #define HES_PREFLEN 7 @@ -127,7 +124,11 @@ hesiod_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) * it (and free subsequent replies) */ if (rvec && *rvec) { - *pval = *rvec; + if (m->cfm && (m->cfm->cfm_flags & CFM_SUN_MAP_SYNTAX)) { + *pval = sun_entry2amd(key, *rvec); + XFREE(*rvec); + } else + *pval = *rvec; while (*++rvec) XFREE(*rvec); return 0; diff --git a/amd/info_ldap.c b/amd/info_ldap.c index 36ce1c8693d..cfed6fd773d 100644 --- a/amd/info_ldap.c +++ b/amd/info_ldap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -66,6 +62,7 @@ #endif /* HAVE_CONFIG_H */ #include #include +#include /* @@ -118,12 +115,17 @@ struct he_ent { struct he_ent *next; }; +static ALD *ldap_connection; + /* * FORWARD DECLARATIONS: */ static int amu_ldap_rebind(ALD *a); static int get_ldap_timestamp(ALD *a, char *map, time_t *ts); +int amu_ldap_init(mnt_map *m, char *map, time_t *tsu); +int amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts); +int amu_ldap_mtime(mnt_map *m, char *map, time_t *ts); /* * FUNCTIONS: @@ -144,30 +146,33 @@ string2he(char *s_orig) { char *c, *p; char *s; - HE_ENT *new, *old = NULL; + HE_ENT *first = NULL, *cur = NULL; - if (NULL == s_orig || NULL == (s = strdup(s_orig))) + if (NULL == s_orig) return NULL; - for (p = s; p; p = strchr(p, ',')) { - if (old != NULL) { - new = ALLOC(HE_ENT); - old->next = new; - old = new; - } else { - old = ALLOC(HE_ENT); - old->next = NULL; - } + s = xstrdup(s_orig); + for (p = strtok(s, ","); p; p = strtok(NULL, ",")) { + if (cur != NULL) { + cur->next = ALLOC(HE_ENT); + cur = cur->next; + } else + first = cur = ALLOC(HE_ENT); + + cur->next = NULL; c = strchr(p, ':'); if (c) { /* Host and port */ *c++ = '\0'; - old->host = strdup(p); - old->port = atoi(c); - } else - old->host = strdup(p); - + cur->host = xstrdup(p); + cur->port = atoi(c); + } else { + cur->host = xstrdup(p); + cur->port = LDAP_PORT; + } + plog(XLOG_USER, "Adding ldap server %s:%d", + cur->host, cur->port); } XFREE(s); - return (old); + return first; } @@ -248,10 +253,18 @@ amu_ldap_init(mnt_map *m, char *map, time_t *ts) if (!gopt.map_type || !STREQ(gopt.map_type, AMD_LDAP_TYPE)) { dlog("amu_ldap_init called with map_type <%s>\n", (gopt.map_type ? gopt.map_type : "null")); + return ENOENT; } else { dlog("Map %s is ldap\n", map); } +#ifndef LDAP_CONNECTION_PER_MAP + if (ldap_connection != NULL) { + m->map_data = (void *) ldap_connection; + return 0; + } +#endif + aldh = ALLOC(ALD); creds = ALLOC(CR); aldh->ldap = NULL; @@ -274,11 +287,14 @@ amu_ldap_init(mnt_map *m, char *map, time_t *ts) ald_free(aldh); return (ENOENT); } - m->map_data = (void *) aldh; dlog("Bound to %s:%d\n", aldh->hostent->host, aldh->hostent->port); - if (get_ldap_timestamp(aldh, map, ts)) + if (get_ldap_timestamp(aldh, map, ts)) { + ald_free(aldh); return (ENOENT); + } dlog("Got timestamp for map %s: %ld\n", map, (u_long) *ts); + ldap_connection = aldh; + m->map_data = (void *) ldap_connection; return (0); } @@ -312,7 +328,7 @@ amu_ldap_rebind(ALD *a) for (h = a->hostent; h != NULL; h = h->next) { if ((ld = ldap_open(h->host, h->port)) == NULL) { plog(XLOG_WARNING, "Unable to ldap_open to %s:%d\n", h->host, h->port); - break; + continue; } #if LDAP_VERSION_MAX > LDAP_VERSION2 /* handle LDAPv3 and heigher, if available and amd.conf-igured */ @@ -321,16 +337,16 @@ amu_ldap_rebind(ALD *a) dlog("amu_ldap_rebind: LDAP protocol version set to %ld\n", gopt.ldap_proto_version); } else { - plog(XLOG_WARNING, "Unable to set ldap protocol version to %ld\n", - gopt.ldap_proto_version); - break; + plog(XLOG_WARNING, "Unable to set ldap protocol version to %ld for " + "%s:%d\n", gopt.ldap_proto_version, h->host, h->port); + continue; } } #endif /* LDAP_VERSION_MAX > LDAP_VERSION2 */ if (ldap_bind_s(ld, c->who, c->pw, c->method) != LDAP_SUCCESS) { plog(XLOG_WARNING, "Unable to ldap_bind to %s:%d as %s\n", h->host, h->port, c->who); - break; + continue; } if (gopt.ldap_cache_seconds > 0) { #if defined(HAVE_LDAP_ENABLE_CACHE) && defined(HAVE_EXTERN_LDAP_ENABLE_CACHE) @@ -541,7 +557,10 @@ amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts) } dlog("Map %s, %s => %s\n", map, key, vals[0]); if (vals[0]) { - *pval = strdup(vals[0]); + if (m->cfm && (m->cfm->cfm_flags & CFM_SUN_MAP_SYNTAX)) + *pval = sun_entry2amd(key, vals[0]); + else + *pval = xstrdup(vals[0]); err = 0; } else { plog(XLOG_USER, "Empty value for %s in map %s\n", key, map); diff --git a/amd/info_ndbm.c b/amd/info_ndbm.c index 8a52ba9e201..5f2f52b5330 100644 --- a/amd/info_ndbm.c +++ b/amd/info_ndbm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -50,6 +46,7 @@ #endif /* HAVE_CONFIG_H */ #include #include +#include /* forward declarations */ int ndbm_init(mnt_map *m, char *map, time_t *tp); @@ -58,7 +55,7 @@ int ndbm_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp); static int -search_ndbm(DBM *db, char *key, char **val) +search_ndbm(mnt_map *m, DBM *db, char *key, char **val) { datum k, v; @@ -66,7 +63,10 @@ search_ndbm(DBM *db, char *key, char **val) k.dsize = strlen(key) + 1; v = dbm_fetch(db, k); if (v.dptr) { - *val = strdup(v.dptr); + if (m->cfm && (m->cfm->cfm_flags & CFM_SUN_MAP_SYNTAX)) + *val = sun_entry2amd(key, v.dptr); + else + *val = xstrdup(v.dptr); return 0; } return ENOENT; @@ -95,7 +95,7 @@ ndbm_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) *tp = stb.st_mtime; error = -1; } else { - error = search_ndbm(db, key, pval); + error = search_ndbm(m, db, key, pval); } (void) dbm_close(db); return error; diff --git a/amd/info_nis.c b/amd/info_nis.c index bcb87d5d02a..83dc4b7a84f 100644 --- a/amd/info_nis.c +++ b/amd/info_nis.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -50,6 +46,7 @@ #endif /* HAVE_CONFIG_H */ #include #include +#include /* @@ -109,7 +106,7 @@ determine_nis_domain(void) plog(XLOG_WARNING, "NIS domain name is not set. NIS ignored."); return ENOENT; } - gopt.nis_domain = strdup(default_domain); + gopt.nis_domain = xstrdup(default_domain); return 0; } @@ -167,6 +164,7 @@ nis_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *)) cbinfo.data = (voidp) &data; cbinfo.foreach = (ypall_callback_fxn_t) callback; + plog(XLOG_INFO, "NIS map %s reloading using yp_all", map); /* * If you are using NIS and your yp_all function is "broken", you have to * get it fixed. The bug in yp_all() is that it does not close a TCP @@ -247,7 +245,7 @@ nis_isup(mnt_map *m, char *map) * Try to locate a key using NIS. */ int -nis_search(mnt_map *m, char *map, char *key, char **val, time_t *tp) +nis_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) { int outlen; int res; @@ -301,7 +299,15 @@ nis_search(mnt_map *m, char *map, char *key, char **val, time_t *tp) /* * Lookup key */ - res = yp_match(gopt.nis_domain, map, key, strlen(key), val, &outlen); + res = yp_match(gopt.nis_domain, map, key, strlen(key), pval, &outlen); + if (m->cfm && (m->cfm->cfm_flags & CFM_SUN_MAP_SYNTAX) && res == 0) { + char *oldval = *pval; + *pval = sun_entry2amd(key, oldval); + /* We always need to free the output of the yp_match call. */ + XFREE(oldval); + if (*pval == NULL) + return -1; /* sun2amd parser error */ + } /* * Do something interesting with the return code diff --git a/amd/info_nisplus.c b/amd/info_nisplus.c index d392b48fed6..79df8361470 100644 --- a/amd/info_nisplus.c +++ b/amd/info_nisplus.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -50,6 +46,7 @@ #endif /* HAVE_CONFIG_H */ #include #include +#include #define NISPLUS_KEY "key=" #define NISPLUS_ORGDIR ".org_dir" @@ -221,7 +218,12 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp) if (value != NULL) data.value = strnsave(ENTRY_VAL(value, 1), ENTRY_LEN(value, 1)); } - *val = data.value; + + if (m->cfm && (m->cfm->cfm_flags & CFM_SUN_MAP_SYNTAX)) { + *val = sun_entry2amd(key, data.value); + XFREE(data.value); /* strnsave malloc'ed it above */ + } else + *val = data.value; if (*val) { error = 0; diff --git a/amd/info_passwd.c b/amd/info_passwd.c index c8bf388b1d6..3c4486693c6 100644 --- a/amd/info_passwd.c +++ b/amd/info_passwd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -94,11 +90,11 @@ passwd_init(mnt_map *m, char *map, time_t *tp) int passwd_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) { - char *dir = 0; + char *dir = NULL; struct passwd *pw; if (STREQ(key, "/defaults")) { - *pval = strdup("type:=nfs"); + *pval = xstrdup("type:=nfs"); return 0; } pw = getpwnam(key); @@ -123,7 +119,7 @@ passwd_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) char *p, *q; char val[MAXPATHLEN]; char rhost[MAXHOSTNAMELEN]; - dir = strdup(pw->pw_dir); + dir = xstrdup(pw->pw_dir); /* * Find user name. If no / then Invalid... @@ -180,13 +176,12 @@ passwd_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) dlog("passwd_search: map=%s key=%s -> %s", map, key, val); if (q) *q = '.'; - *pval = strdup(val); + *pval = xstrdup(val); return 0; } enoent: - if (dir) - XFREE(dir); + XFREE(dir); return ENOENT; } diff --git a/amd/info_sun.c b/amd/info_sun.c new file mode 100644 index 00000000000..3f56965ff74 --- /dev/null +++ b/amd/info_sun.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/amd/info_sun.c + * + */ + +/* + * Get info from Sun automount-style /etc/auto_master, possibly following + * into multiple info services (via /etc/nsswitch.conf). + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include +#include + + +/* XXX: just a placeholder. fill in */ diff --git a/amd/info_union.c b/amd/info_union.c index 8f0631c64ac..df480317bdd 100644 --- a/amd/info_union.c +++ b/amd/info_union.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -77,7 +73,7 @@ union_init(mnt_map *m, char *map, time_t *tp) int union_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) { - char *mapd = strdup(map + UNION_PREFLEN); + char *mapd = xstrdup(map + UNION_PREFLEN); char **v = strsplit(mapd, ':', '\"'); char **p; size_t l; @@ -95,14 +91,15 @@ union_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) int union_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *)) { - char *mapd = strdup(map + UNION_PREFLEN); + static const char fseq[] = "fs:="; + char *mapd = xstrdup(map + UNION_PREFLEN); char **v = strsplit(mapd, ':', '\"'); char **dir; /* * Add fake /defaults entry */ - (*fn) (m, strdup("/defaults"), strdup("type:=link;opts:=nounmount;sublink:=${key}")); + (*fn) (m, xstrdup("/defaults"), xstrdup("type:=link;opts:=nounmount;sublink:=${key}")); for (dir = v; *dir; dir++) { size_t l; @@ -113,7 +110,7 @@ union_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *)) plog(XLOG_USER, "Cannot read directory %s: %m", *dir); continue; } - l = strlen(*dir) + 5; + l = strlen(*dir) + sizeof(fseq); dlog("Reading directory %s...", *dir); while ((dp = readdir(dirp))) { @@ -125,8 +122,8 @@ union_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *)) dlog("... gives %s", dp->d_name); val = xmalloc(l); - xsnprintf(val, l + 5, "fs:=%s", *dir); - (*fn) (m, strdup(dp->d_name), val); + xsnprintf(val, l, "%s%s", fseq, *dir); + (*fn) (m, xstrdup(dp->d_name), val); } closedir(dirp); } @@ -135,11 +132,11 @@ union_reload(mnt_map *m, char *map, void (*fn) (mnt_map *, char *, char *)) * Add wildcard entry */ { - size_t l = strlen(*(dir-1)) + 5; + size_t l = strlen(*(dir-1)) + sizeof(fseq); char *val = xmalloc(l); - xsnprintf(val, l, "fs:=%s", *(dir-1)); - (*fn) (m, strdup("*"), val); + xsnprintf(val, l, "%s%s", fseq, *(dir-1)); + (*fn) (m, xstrdup("*"), val); } XFREE(mapd); XFREE(v); diff --git a/amd/map.c b/amd/map.c index 8696dfd6984..fce8273e4ef 100644 --- a/amd/map.c +++ b/amd/map.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -69,7 +65,7 @@ static u_int am_gen = 2; /* Initial generation number */ static int timeout_mp_id; /* Id from last call to timeout */ static am_node *root_node; /* The root of the mount tree */ -static am_node **exported_ap = (am_node **) 0; +static am_node **exported_ap = (am_node **) NULL; static int exported_ap_size = 0; static int first_free_map = 0; /* First available free slot */ static int last_used_map = -1; /* Last unavailable used slot */ @@ -190,7 +186,7 @@ am_node * get_ap_child(am_node *mp, char *fname) { am_node *new_mp; - mntfs *mf = mp->am_mnt; + mntfs *mf = mp->am_al->al_mnt; /* * Allocate a new map @@ -280,7 +276,7 @@ exported_ap_free(am_node *mp) /* * Zero the slot pointer to avoid double free's */ - exported_ap[mp->am_mapno] = 0; + exported_ap[mp->am_mapno] = NULL; /* * Update the free and last_used indices @@ -325,7 +321,7 @@ insert_am(am_node *mp, am_node *p_mp) mp->am_osib->am_ysib = mp; p_mp->am_child = mp; #ifdef HAVE_FS_AUTOFS - if (p_mp->am_mnt->mf_flags & MFF_IS_AUTOFS) + if (p_mp->am_al->al_mnt->mf_flags & MFF_IS_AUTOFS) mp->am_flags |= AMF_AUTOFS; #endif /* HAVE_FS_AUTOFS */ } @@ -408,13 +404,14 @@ init_map(am_node *mp, char *dir) * mp->am_mapno is initialized by exported_ap_alloc * other fields don't need to be set to zero. */ - mp->am_mnt = new_mntfs(); - mp->am_mfarray = 0; - mp->am_name = strdup(dir); - mp->am_path = strdup(dir); + + mp->am_al = new_loc(); + mp->am_alarray = NULL; + mp->am_name = xstrdup(dir); + mp->am_path = xstrdup(dir); mp->am_gen = new_gen(); #ifdef HAVE_FS_AUTOFS - mp->am_autofs_fh = 0; + mp->am_autofs_fh = NULL; #endif /* HAVE_FS_AUTOFS */ mp->am_timeo = gopt.am_timeo; @@ -430,6 +427,30 @@ init_map(am_node *mp, char *dir) mp->am_stats.s_mtime = mp->am_fattr.na_atime.nt_seconds; mp->am_dev = -1; mp->am_rdev = -1; + mp->am_fd[0] = -1; + mp->am_fd[1] = -1; +} + + +void +notify_child(am_node *mp, au_etype au_etype, int au_errno, int au_signal) +{ + amq_sync_umnt rv; + int err; + + if (mp->am_fd[1] >= 0) { /* we have a child process */ + rv.au_etype = au_etype; + rv.au_signal = au_signal; + rv.au_errno = au_errno; + + err = write(mp->am_fd[1], &rv, sizeof(rv)); + /* XXX: do something else on err? */ + if (err < sizeof(rv)) + plog(XLOG_INFO, "notify_child: write returned %d instead of %d.", + err, (int) sizeof(rv)); + close(mp->am_fd[1]); + mp->am_fd[1] = -1; + } } @@ -442,25 +463,24 @@ free_map(am_node *mp) { remove_am(mp); - if (mp->am_link) - XFREE(mp->am_link); - if (mp->am_name) - XFREE(mp->am_name); - if (mp->am_path) - XFREE(mp->am_path); - if (mp->am_pref) - XFREE(mp->am_pref); - if (mp->am_transp) - XFREE(mp->am_transp); + if (mp->am_fd[1] != -1) + plog(XLOG_FATAL, "free_map: called prior to notifying the child for %s.", + mp->am_path); - if (mp->am_mnt) - free_mntfs(mp->am_mnt); + XFREE(mp->am_link); + XFREE(mp->am_name); + XFREE(mp->am_path); + XFREE(mp->am_pref); + XFREE(mp->am_transp); - if (mp->am_mfarray) { - mntfs **temp_mf; - for (temp_mf = mp->am_mfarray; *temp_mf; temp_mf++) - free_mntfs(*temp_mf); - XFREE(mp->am_mfarray); + if (mp->am_al) + free_loc(mp->am_al); + + if (mp->am_alarray) { + am_loc **temp_al; + for (temp_al = mp->am_alarray; *temp_al; temp_al++) + free_loc(*temp_al); + XFREE(mp->am_alarray); } #ifdef HAVE_FS_AUTOFS @@ -480,8 +500,8 @@ find_ap_recursive(char *dir, am_node *mp) if (STREQ(mp->am_path, dir)) return mp; - if ((mp->am_mnt->mf_flags & MFF_MOUNTED) && - STREQ(mp->am_mnt->mf_mount, dir)) + if ((mp->am_al->al_mnt->mf_flags & MFF_MOUNTED) && + STREQ(mp->am_al->al_mnt->mf_mount, dir)) return mp; mp2 = find_ap_recursive(dir, mp->am_osib); @@ -517,38 +537,21 @@ find_ap(char *dir) } -/* - * Find the mount node corresponding - * to the mntfs structure. - */ -am_node * -find_mf(mntfs *mf) -{ - int i; - - for (i = last_used_map; i >= 0; --i) { - am_node *mp = exported_ap[i]; - if (mp && mp->am_mnt == mf) - return mp; - } - - return 0; -} - - /* * Get the filehandle for a particular named directory. * This is used during the bootstrap to tell the kernel * the filehandles of the initial automount points. */ -am_nfs_fh * -get_root_nfs_fh(char *dir) +am_nfs_handle_t * +get_root_nfs_fh(char *dir, am_nfs_handle_t *nfh) { - static am_nfs_fh nfh; am_node *mp = get_root_ap(dir); if (mp) { - mp_to_fh(mp, &nfh); - return &nfh; + if (nfs_dispatcher == nfs_program_2) + mp_to_fh(mp, &nfh->v2); + else + mp_to_fh3(mp, &nfh->v3); + return nfh; } /* @@ -584,7 +587,8 @@ map_flush_srvr(fserver *fs) for (i = last_used_map; i >= 0; --i) { am_node *mp = exported_ap[i]; - if (mp && mp->am_mnt && mp->am_mnt->mf_server == fs) { + + if (mp && mp->am_al->al_mnt && mp->am_al->al_mnt->mf_server == fs) { plog(XLOG_INFO, "Flushed %s; dependent on %s", mp->am_path, fs->fs_host); mp->am_ttl = clocktime(NULL); done = 1; @@ -608,7 +612,7 @@ mount_auto_node(char *dir, opaque_t arg) am_node *mp = (am_node *) arg; am_node *new_mp; - new_mp = mp->am_mnt->mf_ops->lookup_child(mp, dir, &error, VLOOK_CREATE); + new_mp = mp->am_al->al_mnt->mf_ops->lookup_child(mp, dir, &error, VLOOK_CREATE); if (new_mp && error < 0) { /* * We can't allow the fileid of the root node to change. @@ -616,7 +620,7 @@ mount_auto_node(char *dir, opaque_t arg) */ new_mp->am_gen = new_mp->am_fattr.na_fileid = 1; - new_mp = mp->am_mnt->mf_ops->mount_child(new_mp, &error); + (void) mp->am_al->al_mnt->mf_ops->mount_child(new_mp, &error); } if (error > 0) { @@ -647,7 +651,7 @@ mount_exported(void) void make_root_node(void) { - mntfs *root_mnt; + mntfs *root_mf; char *rootmap = ROOT_MAP; root_node = exported_ap_alloc(); @@ -659,24 +663,24 @@ make_root_node(void) /* * Allocate a new mounted filesystem */ - root_mnt = find_mntfs(&amfs_root_ops, (am_opts *) 0, "", rootmap, "", "", ""); + root_mf = find_mntfs(&amfs_root_ops, (am_opts *) NULL, "", rootmap, "", "", ""); /* * Replace the initial null reference */ - free_mntfs(root_node->am_mnt); - root_node->am_mnt = root_mnt; + free_mntfs(root_node->am_al->al_mnt); + root_node->am_al->al_mnt = root_mf; /* * Initialize the root */ - if (root_mnt->mf_ops->fs_init) - (*root_mnt->mf_ops->fs_init) (root_mnt); + if (root_mf->mf_ops->fs_init) + (*root_mf->mf_ops->fs_init) (root_mf); /* * Mount the root */ - root_mnt->mf_error = root_mnt->mf_ops->mount_fs(root_node, root_mnt); + root_mf->mf_error = root_mf->mf_ops->mount_fs(root_node, root_mf); } @@ -687,68 +691,81 @@ make_root_node(void) void umount_exported(void) { - int i; + int i, work_done; - for (i = last_used_map; i >= 0; --i) { - am_node *mp = exported_ap[i]; - mntfs *mf; + do { + work_done = 0; - if (!mp) - continue; + for (i = last_used_map; i >= 0; --i) { + am_node *mp = exported_ap[i]; + mntfs *mf; - mf = mp->am_mnt; - if (mf->mf_flags & MFF_UNMOUNTING) { - /* - * If this node is being unmounted then just ignore it. However, - * this could prevent amd from finishing if the unmount gets blocked - * since the am_node will never be free'd. am_unmounted needs - * telling about this possibility. - XXX - */ - continue; - } - - if (!(mf->mf_fsflags & FS_DIRECTORY)) - /* - * When shutting down this had better - * look like a directory, otherwise it - * can't be unmounted! - */ - mk_fattr(&mp->am_fattr, NFDIR); - - if ((--immediate_abort < 0 && - !(mp->am_flags & AMF_ROOT) && mp->am_parent) || - (mf->mf_flags & MFF_RESTART)) { + if (!mp) + continue; /* - * Just throw this node away without bothering to unmount it. If - * the server is not known to be up then don't discard the mounted - * on directory or Amd might hang... + * Wait for children to be removed first */ - if (mf->mf_server && - (mf->mf_server->fs_flags & (FSF_DOWN | FSF_VALID)) != FSF_VALID) - mf->mf_flags &= ~MFF_MKMNT; - if (gopt.flags & CFM_UNMOUNT_ON_EXIT || mp->am_flags & AMF_AUTOFS) { - plog(XLOG_INFO, "on-exit attempt to unmount %s", mf->mf_mount); + if (mp->am_child) + continue; + + mf = mp->am_al->al_mnt; + if (mf->mf_flags & MFF_UNMOUNTING) { /* - * use unmount_mp, not unmount_node, so that unmounts be - * backgrounded as needed. + * If this node is being unmounted then just ignore it. However, + * this could prevent amd from finishing if the unmount gets blocked + * since the am_node will never be free'd. am_unmounted needs + * telling about this possibility. - XXX */ - unmount_mp((opaque_t) mp); - } else { - am_unmounted(mp); + continue; + } + + if (!(mf->mf_fsflags & FS_DIRECTORY)) + /* + * When shutting down this had better + * look like a directory, otherwise it + * can't be unmounted! + */ + mk_fattr(&mp->am_fattr, NFDIR); + + if ((--immediate_abort < 0 && + !(mp->am_flags & AMF_ROOT) && mp->am_parent) || + (mf->mf_flags & MFF_RESTART)) { + + work_done++; + + /* + * Just throw this node away without bothering to unmount it. If + * the server is not known to be up then don't discard the mounted + * on directory or Amd might hang... + */ + if (mf->mf_server && + (mf->mf_server->fs_flags & (FSF_DOWN | FSF_VALID)) != FSF_VALID) + mf->mf_flags &= ~MFF_MKMNT; + if (gopt.flags & CFM_UNMOUNT_ON_EXIT || mp->am_flags & AMF_AUTOFS) { + plog(XLOG_INFO, "on-exit attempt to unmount %s", mf->mf_mount); + /* + * use unmount_mp, not unmount_node, so that unmounts be + * backgrounded as needed. + */ + unmount_mp((opaque_t) mp); + } else { + am_unmounted(mp); + } + if (!(mf->mf_flags && (MFF_UNMOUNTING|MFF_MOUNTED))) + exported_ap[i] = NULL; + } else { + /* + * Any other node gets forcibly timed out. + */ + mp->am_flags &= ~AMF_NOTIMEOUT; + mp->am_al->al_mnt->mf_flags &= ~MFF_RSTKEEP; + mp->am_ttl = 0; + mp->am_timeo = 1; + mp->am_timeo_w = 0; } - exported_ap[i] = 0; - } else { - /* - * Any other node gets forcibly timed out. - */ - mp->am_flags &= ~AMF_NOTIMEOUT; - mp->am_mnt->mf_flags &= ~MFF_RSTKEEP; - mp->am_ttl = 0; - mp->am_timeo = 1; - mp->am_timeo_w = 0; } - } + } while (work_done); } @@ -762,7 +779,7 @@ int mount_node(opaque_t arg) { am_node *mp = (am_node *) arg; - mntfs *mf = mp->am_mnt; + mntfs *mf = mp->am_al->al_mnt; int error = 0; #ifdef HAVE_FS_AUTOFS @@ -784,7 +801,7 @@ static int unmount_node(opaque_t arg) { am_node *mp = (am_node *) arg; - mntfs *mf = mp->am_mnt; + mntfs *mf = mp->am_al->al_mnt; int error = 0; if (mf->mf_flags & MFF_ERROR) { @@ -805,7 +822,7 @@ unmount_node(opaque_t arg) } /* do this again, it might have changed */ - mf = mp->am_mnt; + mf = mp->am_al->al_mnt; if (error) { errno = error; /* XXX */ dlog("%s: unmount: %m", mf->mf_mount); @@ -819,7 +836,7 @@ static void free_map_if_success(int rc, int term, opaque_t arg) { am_node *mp = (am_node *) arg; - mntfs *mf = mp->am_mnt; + mntfs *mf = mp->am_al->al_mnt; wchan_t wchan = get_mntfs_wchan(mf); /* @@ -836,6 +853,7 @@ free_map_if_success(int rc, int term, opaque_t arg) reschedule_timeout_mp(); } if (term) { + notify_child(mp, AMQ_UMNT_SIGNAL, 0, term); plog(XLOG_ERROR, "unmount for %s got signal %d", mp->am_path, term); #if defined(DEBUG) && defined(SIGTRAP) /* @@ -852,18 +870,24 @@ free_map_if_success(int rc, int term, opaque_t arg) #endif /* HAVE_FS_AUTOFS */ amd_stats.d_uerr++; } else if (rc) { + notify_child(mp, AMQ_UMNT_FAILED, rc, 0); if (mf->mf_ops == &amfs_program_ops || rc == EBUSY) plog(XLOG_STATS, "\"%s\" on %s still active", mp->am_path, mf->mf_mount); else plog(XLOG_ERROR, "%s: unmount: %s", mp->am_path, strerror(rc)); #ifdef HAVE_FS_AUTOFS - if (mf->mf_flags & MFF_IS_AUTOFS) - autofs_get_mp(mp); - if (mp->am_flags & AMF_AUTOFS) - autofs_umount_failed(mp); + if (rc != ENOENT) { + if (mf->mf_flags & MFF_IS_AUTOFS) + autofs_get_mp(mp); + if (mp->am_flags & AMF_AUTOFS) + autofs_umount_failed(mp); + } #endif /* HAVE_FS_AUTOFS */ amd_stats.d_uerr++; } else { + /* + * am_unmounted() will call notify_child() appropriately. + */ am_unmounted(mp); } @@ -878,11 +902,11 @@ int unmount_mp(am_node *mp) { int was_backgrounded = 0; - mntfs *mf = mp->am_mnt; + mntfs *mf = mp->am_al->al_mnt; #ifdef notdef plog(XLOG_INFO, "\"%s\" on %s timed out (flags 0x%x)", - mp->am_path, mp->am_mnt->mf_mount, (int) mf->mf_flags); + mp->am_path, mf->mf_mount, (int) mf->mf_flags); #endif /* notdef */ #ifndef MNT2_NFS_OPT_SYMTTL @@ -914,10 +938,11 @@ unmount_mp(am_node *mp) plog(XLOG_STATS, "file server %s is down - timeout of \"%s\" ignored", mf->mf_server->fs_host, mp->am_path); mf->mf_flags |= MFF_LOGDOWN; } + notify_child(mp, AMQ_UMNT_SERVER, 0, 0); return 0; } - dlog("\"%s\" on %s timed out", mp->am_path, mp->am_mnt->mf_mount); + dlog("\"%s\" on %s timed out", mp->am_path, mf->mf_mount); mf->mf_flags |= MFF_UNMOUNTING; #ifdef HAVE_FS_AUTOFS @@ -926,7 +951,8 @@ unmount_mp(am_node *mp) #endif /* HAVE_FS_AUTOFS */ if ((mf->mf_fsflags & FS_UBACKGROUND) && - (mf->mf_flags & MFF_MOUNTED)) { + (mf->mf_flags & MFF_MOUNTED) && + !(mf->mf_flags & MFF_ON_AUTOFS)) { dlog("Trying unmount in background"); run_task(unmount_node, (opaque_t) mp, free_map_if_success, (opaque_t) mp); @@ -964,7 +990,7 @@ timeout_mp(opaque_t v) /* argument not used?! */ /* * Pick up mounted filesystem */ - mf = mp->am_mnt; + mf = mp->am_al->al_mnt; if (!mf) continue; @@ -1056,7 +1082,7 @@ timeout_mp(opaque_t v) /* argument not used?! */ t = now + 1; dlog("Next mount timeout in %lds", (long) (t - now)); - timeout_mp_id = timeout(t - now, timeout_mp, 0); + timeout_mp_id = timeout(t - now, timeout_mp, NULL); } @@ -1068,5 +1094,5 @@ reschedule_timeout_mp(void) { if (timeout_mp_id) untimeout(timeout_mp_id); - timeout_mp_id = timeout(0, timeout_mp, 0); + timeout_mp_id = timeout(0, timeout_mp, NULL); } diff --git a/amd/mapc.c b/amd/mapc.c index d7efdbcfd21..cd4b9b956a0 100644 --- a/amd/mapc.c +++ b/amd/mapc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -96,7 +92,7 @@ static struct opt_tab mapc_opt[] = {"regexp", MAPC_RE}, #endif /* HAVE_REGEXEC */ {"sync", MAPC_SYNC}, - {0, 0} + {NULL, 0} }; /* @@ -137,6 +133,7 @@ static const char *get_full_path(const char *map, const char *path, const char * static int mapc_meta_search(mnt_map *, char *, char **, int); static void mapc_sync(mnt_map *); static void mapc_clear(mnt_map *); +static void mapc_clear_kvhash(kv **); /* ROOT MAP */ static int root_init(mnt_map *, char *, time_t *); @@ -198,12 +195,6 @@ extern int ndbm_search(mnt_map *, char *, char *, char **, time_t *); extern int ndbm_mtime(mnt_map *, char *, time_t *); #endif /* HAVE_MAP_NDBM */ -/* EXECUTABLE MAPS */ -#ifdef HAVE_MAP_EXEC -extern int exec_init(mnt_map *, char *, time_t *); -extern int exec_search(mnt_map *, char *, char *, char **, time_t *); -#endif /* HAVE_MAP_EXEC */ - /* FILE MAPS */ #ifdef HAVE_MAP_FILE extern int file_init_or_mtime(mnt_map *, char *, time_t *); @@ -211,6 +202,16 @@ extern int file_reload(mnt_map *, char *, add_fn *); extern int file_search(mnt_map *, char *, char *, char **, time_t *); #endif /* HAVE_MAP_FILE */ +/* EXECUTABLE MAPS */ +#ifdef HAVE_MAP_EXEC +extern int exec_init(mnt_map *, char *, time_t *); +extern int exec_search(mnt_map *, char *, char *, char **, time_t *); +#endif /* HAVE_MAP_EXEC */ + +/* Sun-syntax MAPS */ +#ifdef HAVE_MAP_SUN +/* XXX: fill in */ +#endif /* HAVE_MAP_SUN */ /* note that the choice of MAPC_{INC,ALL} will affect browsable_dirs */ static map_type maptypes[] = @@ -323,6 +324,20 @@ static map_type maptypes[] = MAPC_INC }, #endif /* HAVE_MAP_EXEC */ +#ifdef notyet /* probe function needs to be there or SEGV */ +#ifdef HAVE_MAP_SUN + { + /* XXX: fill in */ + "sun", + NULL, + NULL, + NULL, /* isup function */ + NULL, + NULL, + 0 + }, +#endif /* HAVE_MAP_SUN */ +#endif { "error", error_init, @@ -412,6 +427,44 @@ mapc_add_kv(mnt_map *m, char *key, char *val) dlog("add_kv: %s -> %s", key, val); + if (val != NULL && strchr(val, '\n') != NULL) { + /* + * If the entry value contains multiple lines we need to break + * them up and add them recursively. This is a workaround to + * support Sun style multi-mounts. Amd converts Sun style + * mulit-mounts to type:=auto. The problem is that Sun packs all + * the entries on one line. When Amd does the conversion it puts + * each type:=auto entry on the same line separated by '\n'. + */ + char *entry, *tok; + + /* + * The first line should contain the first entry. The key for + * this entry is the key passed into this function. + */ + if ((tok = strtok(val, "\n")) != NULL) { + mapc_add_kv(m, key, xstrdup(tok)); + } + + /* + * For the rest of the entries we need to tokenize them by '\n' + * and separate the keys from there entries. + */ + while ((tok = strtok(NULL, "\n")) != NULL) { + key = tok; + /* find the entry */ + for (entry = key; *entry && !isspace((unsigned char)*entry); entry++); + if (*entry) { + *entry++ = '\0'; + } + + mapc_add_kv(m, xstrdup(key), xstrdup(entry)); + } + + XFREE(val); + return; + } + #ifdef HAVE_REGEXEC if (MAPC_ISRE(m)) { char pattern[MAXPATHLEN]; @@ -431,7 +484,8 @@ mapc_add_kv(mnt_map *m, char *key, char *val) plog(XLOG_USER, "error compiling RE \"%s\": %s", pattern, errstr); return; } - } + } else + memset(&re, 0, sizeof(re)); #endif /* HAVE_REGEXEC */ h = &m->kvhash[hash]; @@ -443,6 +497,7 @@ mapc_add_kv(mnt_map *m, char *key, char *val) n->val = val; n->next = *h; *h = n; + m->nentries++; } @@ -506,7 +561,7 @@ mapc_find_wildcard(mnt_map *m) int rc = search_map(m, wildcard, &m->wildcard); if (rc != 0) - m->wildcard = 0; + m->wildcard = NULL; } @@ -520,7 +575,7 @@ static int mapc_reload_map(mnt_map *m) { int error, ret = 0; - kv *maphash[NKVHASH], *tmphash[NKVHASH]; + kv *maphash[NKVHASH]; time_t t; error = (*m->mtime) (m, m->map_name, &t); @@ -546,6 +601,7 @@ mapc_reload_map(mnt_map *m) memset((voidp) m->kvhash, 0, sizeof(m->kvhash)); dlog("calling map reload on %s", m->map_name); + m->nentries = 0; error = (*m->reload) (m, m->map_name, mapc_add_kv); if (error) { if (m->reloads == 0) @@ -561,19 +617,19 @@ mapc_reload_map(mnt_map *m) else plog(XLOG_INFO, "reload #%d of map %s succeeded", m->reloads, m->map_name); - memcpy((voidp) tmphash, (voidp) m->kvhash, sizeof(m->kvhash)); - memcpy((voidp) m->kvhash, (voidp) maphash, sizeof(m->kvhash)); - mapc_clear(m); - memcpy((voidp) m->kvhash, (voidp) tmphash, sizeof(m->kvhash)); + mapc_clear_kvhash(maphash); + if (m->wildcard) { + XFREE(m->wildcard); + m->wildcard = NULL; + } m->modify = t; ret = 1; } - m->wildcard = 0; dlog("calling mapc_search for wildcard"); error = mapc_search(m, wildcard, &m->wildcard); if (error) - m->wildcard = 0; + m->wildcard = NULL; return ret; } @@ -582,12 +638,12 @@ mapc_reload_map(mnt_map *m) * Create a new map */ static mnt_map * -mapc_create(char *map, char *opt, const char *type) +mapc_create(char *map, char *opt, const char *type, const char *mntpt) { mnt_map *m = ALLOC(struct mnt_map); map_type *mt; time_t modify = 0; - int alloc = 0; + u_int alloc = 0; cmdoption(opt, mapc_opt, &alloc); @@ -632,6 +688,7 @@ mapc_create(char *map, char *opt, const char *type) /* assert: mt in maptypes */ m->flags = alloc & ~MAPC_CACHE_MASK; + m->nentries = 0; alloc &= MAPC_CACHE_MASK; if (alloc == MAPC_DFLT) @@ -678,12 +735,12 @@ mapc_create(char *map, char *opt, const char *type) m->search = alloc >= MAPC_ALL ? error_search : mt->search; m->mtime = mt->mtime; memset((voidp) m->kvhash, 0, sizeof(m->kvhash)); - m->map_name = strdup(map); + m->map_name = xstrdup(map); m->refc = 1; - m->wildcard = 0; + m->wildcard = NULL; m->reloads = 0; - /* Unfortunately with current code structure, this cannot be initialized here */ - m->cfm = NULL; + /* initialize per-map information (flags, etc.) */ + m->cfm = find_cf_map(mntpt); /* * synchronize cache with reality @@ -695,10 +752,10 @@ mapc_create(char *map, char *opt, const char *type) /* - * Free the cached data in a map + * Free the cached data in a map hash */ static void -mapc_clear(mnt_map *m) +mapc_clear_kvhash(kv **kvhash) { int i; @@ -707,16 +764,25 @@ mapc_clear(mnt_map *m) * along free'ing the data. */ for (i = 0; i < NKVHASH; i++) { - kv *k = m->kvhash[i]; + kv *k = kvhash[i]; while (k) { kv *n = k->next; XFREE(k->key); - if (k->val) - XFREE(k->val); + XFREE(k->val); XFREE(k); k = n; } } +} + + +/* + * Free the cached data in a map + */ +static void +mapc_clear(mnt_map *m) +{ + mapc_clear_kvhash(m->kvhash); /* * Zero the hash slots @@ -726,10 +792,10 @@ mapc_clear(mnt_map *m) /* * Free the wildcard if it exists */ - if (m->wildcard) { - XFREE(m->wildcard); - m->wildcard = 0; - } + XFREE(m->wildcard); + m->wildcard = NULL; + + m->nentries = 0; } @@ -737,7 +803,7 @@ mapc_clear(mnt_map *m) * Find a map, or create one if it does not exist */ mnt_map * -mapc_find(char *map, char *opt, const char *maptype) +mapc_find(char *map, char *opt, const char *maptype, const char *mntpt) { mnt_map *m; @@ -751,7 +817,7 @@ mapc_find(char *map, char *opt, const char *maptype) ITER(m, mnt_map, &map_list_head) if (STREQ(m->map_name, map)) return mapc_dup(m); - m = mapc_create(map, opt, maptype); + m = mapc_create(map, opt, maptype, mntpt); ins_que(&m->hdr, &map_list_head); return m; @@ -788,7 +854,7 @@ static int mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse) { int error = 0; - kv *k = 0; + kv *k = NULL; /* * Firewall @@ -839,7 +905,7 @@ mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse) int retval; /* XXX: this code was recently ported, and must be tested -Erez */ - retval = regexec(&k->re, key, 0, 0, 0); + retval = regexec(&k->re, key, 0, NULL, 0); if (retval == 0) { /* succeeded */ break; } else { /* failed to match, log error */ @@ -863,7 +929,7 @@ mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse) */ if (k) { if (k->val) - *pval = strdup(k->val); + *pval = xstrdup(k->val); else error = ENOENT; } else if (m->alloc >= MAPC_ALL) { @@ -880,7 +946,7 @@ mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse) */ error = search_map(m, key, pval); if (!error && m->alloc == MAPC_INC) - mapc_add_kv(m, strdup(key), strdup(*pval)); + mapc_add_kv(m, xstrdup(key), xstrdup(*pval)); } /* @@ -911,11 +977,11 @@ mapc_meta_search(mnt_map *m, char *key, char **pval, int recurse) dlog("mapc recurses on %s", wildname); error = mapc_meta_search(m, wildname, pval, MREC_PART); if (error) - *subp = 0; + *subp = '\0'; } if (error > 0 && m->wildcard) { - *pval = strdup(m->wildcard); + *pval = xstrdup(m->wildcard); error = 0; } } @@ -1031,7 +1097,7 @@ root_newmap(const char *dir, const char *opts, const char *map, const cf_map_t * * First make sure we have a root map to talk about... */ if (!root_map) - root_map = mapc_find(ROOT_MAP, "mapdefault", NULL); + root_map = mapc_find(ROOT_MAP, "mapdefault", NULL, NULL); /* * Then add the entry... @@ -1071,7 +1137,7 @@ root_newmap(const char *dir, const char *opts, const char *map, const cf_map_t * else xstrlcpy(str, opts, sizeof(str)); } - mapc_repl_kv(root_map, strdup((char *)dir), strdup(str)); + mapc_repl_kv(root_map, xstrdup(dir), xstrdup(str)); } diff --git a/amd/mntfs.c b/amd/mntfs.c index 6021838425c..a26ff8f553f 100644 --- a/amd/mntfs.c +++ b/amd/mntfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -52,6 +48,16 @@ qelem mfhead = {&mfhead, &mfhead}; int mntfs_allocated; +am_loc * +dup_loc(am_loc *loc) +{ + loc->al_refc++; + if (loc->al_mnt) { + dup_mntfs(loc->al_mnt); + } + return loc; +} + mntfs * dup_mntfs(mntfs *mf) { @@ -71,24 +77,27 @@ init_mntfs(mntfs *mf, am_ops *ops, am_opts *mo, char *mp, char *info, char *auto { mf->mf_ops = ops; mf->mf_fsflags = ops->nfs_fs_flags; - mf->mf_fo = mo; - mf->mf_mount = strdup(mp); - mf->mf_info = strdup(info); - mf->mf_auto = strdup(auto_opts); - mf->mf_mopts = strdup(mopts); - mf->mf_remopts = strdup(remopts); + mf->mf_fo = 0; + if (mo) + mf->mf_fo = copy_opts(mo); + + mf->mf_mount = xstrdup(mp); + mf->mf_info = xstrdup(info); + mf->mf_auto = xstrdup(auto_opts); + mf->mf_mopts = xstrdup(mopts); + mf->mf_remopts = xstrdup(remopts); mf->mf_loopdev = NULL; mf->mf_refc = 1; mf->mf_flags = 0; mf->mf_error = -1; mf->mf_cid = 0; - mf->mf_private = 0; - mf->mf_prfree = 0; + mf->mf_private = NULL; + mf->mf_prfree = NULL; if (ops->ffserver) mf->mf_server = (*ops->ffserver) (mf); else - mf->mf_server = 0; + mf->mf_server = NULL; } @@ -138,7 +147,7 @@ locate_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info, char *auto_opts, ch } dlog("mf->mf_flags = %#x", mf->mf_flags); - mf->mf_fo = mo; + if ((mf->mf_flags & MFF_RESTART) && amd_state < Finishing) { /* * Restart a previously mounted filesystem. @@ -171,7 +180,7 @@ locate_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info, char *auto_opts, ch if (mf->mf_private && mf->mf_prfree) { mf->mf_prfree(mf->mf_private); - mf->mf_private = 0; + mf->mf_private = NULL; } fs = ops->ffserver ? (*ops->ffserver) (mf) : (fserver *) NULL; @@ -202,26 +211,35 @@ find_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info, char *auto_opts, char mntfs * new_mntfs(void) { - return alloc_mntfs(&amfs_error_ops, (am_opts *) 0, "//nil//", ".", "", "", ""); + return alloc_mntfs(&amfs_error_ops, (am_opts *) NULL, "//nil//", ".", "", "", ""); +} + +am_loc * +new_loc(void) +{ + am_loc *loc = CALLOC(struct am_loc); + loc->al_fo = 0; + loc->al_mnt = new_mntfs(); + loc->al_refc = 1; + return loc; } static void uninit_mntfs(mntfs *mf) { - if (mf->mf_auto) - XFREE(mf->mf_auto); - if (mf->mf_mopts) - XFREE(mf->mf_mopts); - if (mf->mf_remopts) - XFREE(mf->mf_remopts); - if (mf->mf_info) - XFREE(mf->mf_info); + if (mf->mf_fo) { + free_opts(mf->mf_fo); + XFREE(mf->mf_fo); + } + XFREE(mf->mf_auto); + XFREE(mf->mf_mopts); + XFREE(mf->mf_remopts); + XFREE(mf->mf_info); if (mf->mf_private && mf->mf_prfree) (*mf->mf_prfree) (mf->mf_private); - if (mf->mf_mount) - XFREE(mf->mf_mount); + XFREE(mf->mf_mount); /* * Clean up the file server @@ -255,6 +273,16 @@ discard_mntfs(voidp v) --mntfs_allocated; } +static void +discard_loc(voidp v) +{ + am_loc *loc = v; + if (loc->al_fo) { + free_opts(loc->al_fo); + XFREE(loc->al_fo); + } + XFREE(loc); +} void flush_mntfs(void) @@ -270,6 +298,23 @@ flush_mntfs(void) } } +void +free_loc(opaque_t arg) +{ + am_loc *loc = (am_loc *) arg; + dlog("free_loc %p", loc); + + if (loc->al_refc <= 0) { + plog(XLOG_ERROR, "IGNORING free_loc for 0x%p", loc); + return; + } + + if (loc->al_mnt) + free_mntfs(loc->al_mnt); + if (--loc->al_refc == 0) { + discard_loc(loc); + } +} void free_mntfs(opaque_t arg) @@ -356,7 +401,6 @@ realloc_mntfs(mntfs *mf, am_ops *ops, am_opts *mo, char *mp, char *info, char *a if (mf->mf_ops != &amfs_error_ops && (mf->mf_flags & MFF_MOUNTED) && !FSRV_ISDOWN(mf->mf_server)) { - mf->mf_fo = mo; return mf; } diff --git a/amd/nfs_prot_svc.c b/amd/nfs_prot_svc.c index 0dd6992cf9e..cbde17274ae 100644 --- a/amd/nfs_prot_svc.c +++ b/amd/nfs_prot_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -69,6 +65,7 @@ extern nfsstatfsres *nfsproc_statfs_2_svc(am_nfs_fh *, struct svc_req *); /* global variables */ SVCXPRT *current_transp; +dispatcher_t nfs_dispatcher = nfs_program_2; /* typedefs */ typedef char *(*nfssvcproc_t)(voidp, struct svc_req *); @@ -299,3 +296,193 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp) going_down(1); } } + +void +nfs_program_3(struct svc_req *rqstp, register SVCXPRT *transp) +{ + union { + am_GETATTR3args am_nfs3_getattr_3_arg; + am_SETATTR3args am_nfs3_setattr_3_arg; + am_LOOKUP3args am_nfs3_lookup_3_arg; + am_ACCESS3args am_nfs3_access_3_arg; + am_READLINK3args am_nfs3_readlink_3_arg; + am_READ3args am_nfs3_read_3_arg; + am_WRITE3args am_nfs3_write_3_arg; + am_CREATE3args am_nfs3_create_3_arg; + am_MKDIR3args am_nfs3_mkdir_3_arg; + am_SYMLINK3args am_nfs3_symlink_3_arg; + am_MKNOD3args am_nfs3_mknod_3_arg; + am_REMOVE3args am_nfs3_remove_3_arg; + am_RMDIR3args am_nfs3_rmdir_3_arg; + am_RENAME3args am_nfs3_rename_3_arg; + am_LINK3args am_nfs3_link_3_arg; + am_READDIR3args am_nfs3_readdir_3_arg; + am_READDIRPLUS3args am_nfs3_readdirplus_3_arg; + am_FSSTAT3args am_nfs3_fsstat_3_arg; + am_FSINFO3args am_nfs3_fsinfo_3_arg; + am_PATHCONF3args am_nfs3_pathconf_3_arg; + am_COMMIT3args am_nfs3_commit_3_arg; + } argument; + char *result; + xdrproc_t _xdr_argument, _xdr_result; + nfssvcproc_t local; + + switch (rqstp->rq_proc) { + case AM_NFS3_NULL: + _xdr_argument = (xdrproc_t) xdr_void; + _xdr_result = (xdrproc_t) xdr_void; + local = (nfssvcproc_t) am_nfs3_null_3_svc; + break; + + case AM_NFS3_GETATTR: + _xdr_argument = (xdrproc_t) xdr_am_GETATTR3args; + _xdr_result = (xdrproc_t) xdr_am_GETATTR3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_getattr_3_svc; + break; + + case AM_NFS3_SETATTR: + _xdr_argument = (xdrproc_t) xdr_am_SETATTR3args; + _xdr_result = (xdrproc_t) xdr_am_SETATTR3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_setattr_3_svc; + break; + + case AM_NFS3_LOOKUP: + _xdr_argument = (xdrproc_t) xdr_am_LOOKUP3args; + _xdr_result = (xdrproc_t) xdr_am_LOOKUP3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_lookup_3_svc; + break; + + case AM_NFS3_ACCESS: + _xdr_argument = (xdrproc_t) xdr_am_ACCESS3args; + _xdr_result = (xdrproc_t) xdr_am_ACCESS3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_access_3_svc; + break; + + case AM_NFS3_READLINK: + _xdr_argument = (xdrproc_t) xdr_am_READLINK3args; + _xdr_result = (xdrproc_t) xdr_am_READLINK3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_readlink_3_svc; + break; + + case AM_NFS3_READ: + _xdr_argument = (xdrproc_t) xdr_am_READ3args; + _xdr_result = (xdrproc_t) xdr_am_READ3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_read_3_svc; + break; + + case AM_NFS3_WRITE: + _xdr_argument = (xdrproc_t) xdr_am_WRITE3args; + _xdr_result = (xdrproc_t) xdr_am_WRITE3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_write_3_svc; + break; + + case AM_NFS3_CREATE: + _xdr_argument = (xdrproc_t) xdr_am_CREATE3args; + _xdr_result = (xdrproc_t) xdr_am_CREATE3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_create_3_svc; + break; + + case AM_NFS3_MKDIR: + _xdr_argument = (xdrproc_t) xdr_am_MKDIR3args; + _xdr_result = (xdrproc_t) xdr_am_MKDIR3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_mkdir_3_svc; + break; + + case AM_NFS3_SYMLINK: + _xdr_argument = (xdrproc_t) xdr_am_SYMLINK3args; + _xdr_result = (xdrproc_t) xdr_am_SYMLINK3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_symlink_3_svc; + break; + + case AM_NFS3_MKNOD: + _xdr_argument = (xdrproc_t) xdr_am_MKNOD3args; + _xdr_result = (xdrproc_t) xdr_am_MKNOD3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_mknod_3_svc; + break; + + case AM_NFS3_REMOVE: + _xdr_argument = (xdrproc_t) xdr_am_REMOVE3args; + _xdr_result = (xdrproc_t) xdr_am_REMOVE3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_remove_3_svc; + break; + + case AM_NFS3_RMDIR: + _xdr_argument = (xdrproc_t) xdr_am_RMDIR3args; + _xdr_result = (xdrproc_t) xdr_am_RMDIR3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_rmdir_3_svc; + break; + + case AM_NFS3_RENAME: + _xdr_argument = (xdrproc_t) xdr_am_RENAME3args; + _xdr_result = (xdrproc_t) xdr_am_RENAME3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_rename_3_svc; + break; + + case AM_NFS3_LINK: + _xdr_argument = (xdrproc_t) xdr_am_LINK3args; + _xdr_result = (xdrproc_t) xdr_am_LINK3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_link_3_svc; + break; + + case AM_NFS3_READDIR: + _xdr_argument = (xdrproc_t) xdr_am_READDIR3args; + _xdr_result = (xdrproc_t) xdr_am_READDIR3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_readdir_3_svc; + break; + + case AM_NFS3_READDIRPLUS: + _xdr_argument = (xdrproc_t) xdr_am_READDIRPLUS3args; + _xdr_result = (xdrproc_t) xdr_am_READDIRPLUS3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_readdirplus_3_svc; + break; + + case AM_NFS3_FSSTAT: + _xdr_argument = (xdrproc_t) xdr_am_FSSTAT3args; + _xdr_result = (xdrproc_t) xdr_am_FSSTAT3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_fsstat_3_svc; + break; + + case AM_NFS3_FSINFO: + _xdr_argument = (xdrproc_t) xdr_am_FSINFO3args; + _xdr_result = (xdrproc_t) xdr_am_FSINFO3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_fsinfo_3_svc; + break; + + case AM_NFS3_PATHCONF: + _xdr_argument = (xdrproc_t) xdr_am_PATHCONF3args; + _xdr_result = (xdrproc_t) xdr_am_PATHCONF3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_pathconf_3_svc; + break; + + case AM_NFS3_COMMIT: + _xdr_argument = (xdrproc_t) xdr_am_COMMIT3args; + _xdr_result = (xdrproc_t) xdr_am_COMMIT3res; + local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_commit_3_svc; + break; + + default: + svcerr_noproc (transp); + return; + } + + memset ((char *)&argument, 0, sizeof (argument)); + + if (!svc_getargs(transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { + plog(XLOG_ERROR, + "NFS xdr decode failed for %d %d %d", + (int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc); + svcerr_decode(transp); + return; + } + + result = (*local) (&argument, rqstp); + if (result != NULL && !svc_sendreply(transp, (xdrproc_t) _xdr_result, result)) { + svcerr_systemerr (transp); + } + + if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { + plog(XLOG_FATAL, "unable to free rpc arguments in nfs_program_3"); + going_down(1); + } + return; +} diff --git a/amd/nfs_start.c b/amd/nfs_start.c index f6aba94e2b6..b6c544ddf17 100644 --- a/amd/nfs_start.c +++ b/amd/nfs_start.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -65,12 +61,11 @@ u_short nfs_port = 0; static void checkup(void) { - static int max_fd = 0; - static char *max_mem = 0; - + static char *max_mem = NULL; int next_fd = dup(0); caddr_t next_mem = sbrk(0); + close(next_fd); if (max_fd < next_fd) { @@ -135,8 +130,8 @@ do_select(int smask, int fds, fd_set *fdp, struct timeval *tvp) /* * Wait for input */ - nsel = select(fds, fdp, (fd_set *) 0, (fd_set *) 0, - tvp->tv_sec ? tvp : (struct timeval *) 0); + nsel = select(fds, fdp, (fd_set *) NULL, (fd_set *) NULL, + tvp->tv_sec ? tvp : (struct timeval *) NULL); } #ifdef HAVE_SIGACTION @@ -171,7 +166,7 @@ rpc_pending_now(void) FD_SET(fwd_sock, &readfds); tvv.tv_sec = tvv.tv_usec = 0; - nsel = select(FD_SETSIZE, &readfds, (fd_set *) 0, (fd_set *) 0, &tvv); + nsel = select(FD_SETSIZE, &readfds, (fd_set *) NULL, (fd_set *) NULL, &tvv); if (nsel < 1) return (0); if (FD_ISSET(fwd_sock, &readfds)) @@ -365,15 +360,16 @@ mount_automounter(int ppid) * already created the service during restart_automounter_nodes(). */ if (nfs_port == 0) { - ret = create_nfs_service(&soNFS, &nfs_port, &nfsxprt, nfs_program_2); + ret = create_nfs_service(&soNFS, &nfs_port, &nfsxprt, nfs_dispatcher, + get_nfs_dispatcher_version(nfs_dispatcher)); if (ret != 0) return ret; } xsnprintf(pid_fsname, sizeof(pid_fsname), "%s:(pid%ld,port%u)", am_get_hostname(), (long) am_mypid, nfs_port); - /* security: if user sets -D amq, don't even create listening socket */ - if (!amuDebug(D_AMQ)) { + /* security: if user sets -D noamq, don't even create listening socket */ + if (amuDebug(D_AMQ)) { ret = create_amq_service(&udp_soAMQ, &udp_amqp, &udp_amqncp, @@ -416,25 +412,33 @@ mount_automounter(int ppid) return 0; } - if (!amuDebug(D_AMQ)) { + if (amuDebug(D_AMQ)) { /* * Complete registration of amq (first TCP service then UDP) */ - unregister_amq(); + int tcp_ok = 0, udp_ok = 0; - ret = amu_svc_register(tcp_amqp, get_amd_program_number(), AMQ_VERSION, - amq_program_1, IPPROTO_TCP, tcp_amqncp); - if (ret != 1) { - plog(XLOG_FATAL, "unable to register (AMQ_PROGRAM=%d, AMQ_VERSION, tcp)", get_amd_program_number()); + unregister_amq(); /* unregister leftover Amd, if any, just in case */ + + tcp_ok = amu_svc_register(tcp_amqp, get_amd_program_number(), AMQ_VERSION, + amq_program_1, IPPROTO_TCP, tcp_amqncp); + if (!tcp_ok) + plog(XLOG_FATAL, + "unable to register (AMQ_PROGRAM=%lu, AMQ_VERSION, tcp)", + get_amd_program_number()); + + udp_ok = amu_svc_register(udp_amqp, get_amd_program_number(), AMQ_VERSION, + amq_program_1, IPPROTO_UDP, udp_amqncp); + if (!udp_ok) + plog(XLOG_FATAL, + "unable to register (AMQ_PROGRAM=%lu, AMQ_VERSION, udp)", + get_amd_program_number()); + + /* return error only if both failed */ + if (!tcp_ok && !udp_ok) { + amd_state = Done; return 3; } - - ret = amu_svc_register(udp_amqp, get_amd_program_number(), AMQ_VERSION, - amq_program_1, IPPROTO_UDP, udp_amqncp); - if (ret != 1) { - plog(XLOG_FATAL, "unable to register (AMQ_PROGRAM=%d, AMQ_VERSION, udp)", get_amd_program_number()); - return 4; - } } /* diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c index 80d3ca8e311..e463ff72c63 100644 --- a/amd/nfs_subr.c +++ b/amd/nfs_subr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -78,6 +74,17 @@ struct am_fh { } u; }; +struct am_fh3 { + u_int fhh_gen; /* generation number */ + union { + struct { + int fhh_type; /* old or new am_fh */ + pid_t fhh_pid; /* process id */ + int fhh_id; /* map id */ + } s; + char fhh_path[AM_FHSIZE3-sizeof(u_int)]; /* path to am_node */ + } u; +}; /* forward declarations */ /* converting am-filehandles to mount-points */ @@ -96,10 +103,10 @@ do_readlink(am_node *mp, int *error_return) * otherwise if a link exists use that, * otherwise use the mount point. */ - if (mp->am_mnt->mf_ops->readlink) { + if (mp->am_al->al_mnt->mf_ops->readlink) { int retry = 0; - mp = (*mp->am_mnt->mf_ops->readlink) (mp, &retry); - if (mp == 0) { + mp = (*mp->am_al->al_mnt->mf_ops->readlink) (mp, &retry); + if (mp == NULL) { *error_return = retry; return 0; } @@ -109,7 +116,7 @@ do_readlink(am_node *mp, int *error_return) if (mp->am_link) { ln = mp->am_link; } else { - ln = mp->am_mnt->mf_mount; + ln = mp->am_al->al_mnt->mf_mount; } return ln; @@ -130,14 +137,14 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) { static nfsattrstat res; am_node *mp; - int retry; + int retry = 0; time_t now = clocktime(NULL); if (amuDebug(D_TRACE)) plog(XLOG_DEBUG, "getattr:"); mp = fh_to_mp3(argp, &retry, VLOOK_CREATE); - if (mp == 0) { + if (mp == NULL) { if (amuDebug(D_TRACE)) plog(XLOG_DEBUG, "\tretry=%d", retry); @@ -209,7 +216,7 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp) xsnprintf(opt_gid, sizeof(gid_str), "%d", (int) gid); mp = fh_to_mp3(&argp->da_fhandle, &retry, VLOOK_CREATE); - if (mp == 0) { + if (mp == NULL) { if (retry < 0) { amd_stats.d_drops++; return 0; @@ -220,9 +227,9 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp) am_node *ap; if (amuDebug(D_TRACE)) plog(XLOG_DEBUG, "\tlookup(%s, %s)", mp->am_path, argp->da_name); - ap = mp->am_mnt->mf_ops->lookup_child(mp, argp->da_name, &error, VLOOK_CREATE); + ap = mp->am_al->al_mnt->mf_ops->lookup_child(mp, argp->da_name, &error, VLOOK_CREATE); if (ap && error < 0) - ap = mp->am_mnt->mf_ops->mount_child(ap, &error); + ap = mp->am_al->al_mnt->mf_ops->mount_child(ap, &error); if (ap == 0) { if (error < 0) { amd_stats.d_drops++; @@ -285,7 +292,7 @@ nfs_quick_reply(am_node *mp, int error) * Free up transp. It's only used for one reply. */ XFREE(mp->am_transp); - dlog("Quick reply sent for %s", mp->am_mnt->mf_mount); + dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount); } } @@ -301,7 +308,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) plog(XLOG_DEBUG, "readlink:"); mp = fh_to_mp3(argp, &retry, VLOOK_CREATE); - if (mp == 0) { + if (mp == NULL) { readlink_retry: if (retry < 0) { amd_stats.d_drops++; @@ -379,7 +386,7 @@ unlink_or_rmdir(nfsdiropargs *argp, struct svc_req *rqstp, int unlinkp) int retry; am_node *mp = fh_to_mp3(&argp->da_fhandle, &retry, VLOOK_DELETE); - if (mp == 0) { + if (mp == NULL) { if (retry < 0) { amd_stats.d_drops++; return 0; @@ -396,8 +403,8 @@ unlink_or_rmdir(nfsdiropargs *argp, struct svc_req *rqstp, int unlinkp) if (amuDebug(D_TRACE)) plog(XLOG_DEBUG, "\tremove(%s, %s)", mp->am_path, argp->da_name); - mp = mp->am_mnt->mf_ops->lookup_child(mp, argp->da_name, &retry, VLOOK_DELETE); - if (mp == 0) { + mp = mp->am_al->al_mnt->mf_ops->lookup_child(mp, argp->da_name, &retry, VLOOK_DELETE); + if (mp == NULL) { /* * Ignore retries... */ @@ -510,7 +517,7 @@ nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp) plog(XLOG_DEBUG, "readdir:"); mp = fh_to_mp3(&argp->rda_fhandle, &retry, VLOOK_CREATE); - if (mp == 0) { + if (mp == NULL) { if (retry < 0) { amd_stats.d_drops++; return 0; @@ -519,7 +526,7 @@ nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp) } else { if (amuDebug(D_TRACE)) plog(XLOG_DEBUG, "\treaddir(%s)", mp->am_path); - res.rdr_status = nfs_error((*mp->am_mnt->mf_ops->readdir) + res.rdr_status = nfs_error((*mp->am_al->al_mnt->mf_ops->readdir) (mp, argp->rda_cookie, &res.rdr_u.rdr_reply_u, e_res, argp->rda_count)); mp->am_stats.s_readdir++; @@ -541,7 +548,7 @@ nfsproc_statfs_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) plog(XLOG_DEBUG, "statfs:"); mp = fh_to_mp3(argp, &retry, VLOOK_CREATE); - if (mp == 0) { + if (mp == NULL) { if (retry < 0) { amd_stats.d_drops++; return 0; @@ -562,8 +569,8 @@ nfsproc_statfs_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) /* check if map is browsable and show_statfs_entries=yes */ if ((gopt.flags & CFM_SHOW_STATFS_ENTRIES) && - mp->am_mnt && mp->am_mnt->mf_mopts) { - mnt.mnt_opts = mp->am_mnt->mf_mopts; + mp->am_al->al_mnt && mp->am_al->al_mnt->mf_mopts) { + mnt.mnt_opts = mp->am_al->al_mnt->mf_mopts; if (amu_hasmntopt(&mnt, "browsable")) { count_map_entries(mp, &fp->sfrok_blocks, @@ -599,7 +606,7 @@ count_map_entries(const am_node *mp, u_int *out_blocks, u_int *out_bfree, u_int blocks = bfree = bavail = 0; if (!mp) goto out; - mf = mp->am_mnt; + mf = mp->am_al->al_mnt; if (!mf) goto out; mmp = (mnt_map *) mf->mf_private; @@ -625,58 +632,18 @@ out: *out_bavail = bavail; } - -/* - * Convert from file handle to automount node. - */ static am_node * -fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop) +validate_ap(am_node *node, int *rp, u_int fhh_gen) { - struct am_fh *fp = (struct am_fh *) fhp; - am_node *ap = 0; - - if (fp->u.s.fhh_type != 0) { - /* New filehandle type */ - int len = sizeof(*fhp) - sizeof(fp->fhh_gen); - char *path = xmalloc(len+1); - /* - * Because fhp is treated as a filehandle we use memcpy - * instead of xstrlcpy. - */ - memcpy(path, (char *) fp->u.fhh_path, len); - path[len] = '\0'; - /* dlog("fh_to_mp3: new filehandle: %s", path); */ - - ap = path_to_exported_ap(path); - XFREE(path); - } else { - /* dlog("fh_to_mp3: old filehandle: %d", fp->u.s.fhh_id); */ - /* - * Check process id matches - * If it doesn't then it is probably - * from an old kernel-cached filehandle - * which is now out of date. - */ - if (fp->u.s.fhh_pid != get_server_pid()) { - dlog("fh_to_mp3: wrong pid %ld != my pid %ld", - (long) fp->u.s.fhh_pid, get_server_pid()); - goto drop; - } - - /* - * Get hold of the supposed mount node - */ - ap = get_exported_ap(fp->u.s.fhh_id); - } - + am_node *ap = node; /* * Check the generation number in the node * matches the one from the kernel. If not * then the old node has been timed out and * a new one allocated. */ - if (ap != NULL && ap->am_gen != fp->fhh_gen) - ap = 0; + if (node != NULL && node->am_gen != fhh_gen) + ap = NULL; /* * If it doesn't exists then drop the request @@ -690,12 +657,12 @@ fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop) * for it. This implements the replicated filesystem * retries. */ - if (ap->am_mnt && FSRV_ISDOWN(ap->am_mnt->mf_server) && ap->am_parent) { + if (ap->am_al->al_mnt && FSRV_ISDOWN(ap->am_al->al_mnt->mf_server) && ap->am_parent) { int error; am_node *orig_ap = ap; - dlog("fh_to_mp3: %s (%s) is hung: lookup alternative file server", - orig_ap->am_path, orig_ap->am_mnt->mf_info); + dlog("%s: %s (%s) is hung: lookup alternative file server", __func__, + orig_ap->am_path, orig_ap->am_al->al_mnt->mf_info); /* * Update modify time of parent node. @@ -712,11 +679,11 @@ fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop) * to the caller. */ if (vop == VLOOK_CREATE) { - ap = orig_ap->am_parent->am_mnt->mf_ops->lookup_child(orig_ap->am_parent, orig_ap->am_name, &error, vop); + ap = orig_ap->am_parent->am_al->al_mnt->mf_ops->lookup_child(orig_ap->am_parent, orig_ap->am_name, &error, vop); if (ap && error < 0) - ap = orig_ap->am_parent->am_mnt->mf_ops->mount_child(ap, &error); + ap = orig_ap->am_parent->am_al->al_mnt->mf_ops->mount_child(ap, &error); } else { - ap = 0; + ap = NULL; error = ESTALE; } if (ap == 0) { @@ -735,13 +702,13 @@ fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop) new_ttl(orig_ap); } -#endif +#endif /* 0 */ /* * Disallow references to objects being unmounted, unless * they are automount points. */ - if (ap->am_mnt && (ap->am_mnt->mf_flags & MFF_UNMOUNTING) && + if (ap->am_al->al_mnt && (ap->am_al->al_mnt->mf_flags & MFF_UNMOUNTING) && !(ap->am_flags & AMF_ROOT)) { if (amd_state == Finishing) *rp = ENOENT; @@ -752,7 +719,7 @@ fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop) new_ttl(ap); drop: - if (!ap || !ap->am_mnt) { + if (!ap || !ap->am_al->al_mnt) { /* * If we are shutting down then it is likely * that this node has disappeared because of @@ -764,14 +731,60 @@ drop: */ if (amd_state == Finishing) *rp = ENOENT; - else + else { *rp = ESTALE; - amd_stats.d_stale++; + amd_stats.d_stale++; + } } return ap; } +/* + * Convert from file handle to automount node. + */ +static am_node * +fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop) +{ + struct am_fh *fp = (struct am_fh *) fhp; + am_node *ap = NULL; + + if (fp->u.s.fhh_type != 0) { + /* New filehandle type */ + int len = sizeof(*fhp) - sizeof(fp->fhh_gen); + char *path = xmalloc(len+1); + /* + * Because fhp is treated as a filehandle we use memcpy + * instead of xstrlcpy. + */ + memcpy(path, (char *) fp->u.fhh_path, len); + path[len] = '\0'; + dlog("%s: new filehandle: %s", __func__, path); + + ap = path_to_exported_ap(path); + XFREE(path); + } else { + dlog("%s: old filehandle: %d", __func__, fp->u.s.fhh_id); + /* + * Check process id matches + * If it doesn't then it is probably + * from an old kernel-cached filehandle + * which is now out of date. + */ + if (fp->u.s.fhh_pid != get_server_pid()) { + dlog("%s: wrong pid %ld != my pid %ld", __func__, + (long) fp->u.s.fhh_pid, get_server_pid()); + goto done; + } + + /* + * Get hold of the supposed mount node + */ + ap = get_exported_ap(fp->u.s.fhh_id); + } +done: + return validate_ap(ap, rp, fp->fhh_gen); +} static am_node * fh_to_mp(am_nfs_fh *fhp) @@ -781,6 +794,56 @@ fh_to_mp(am_nfs_fh *fhp) return fh_to_mp3(fhp, &dummy, VLOOK_CREATE); } +static am_node * +fh3_to_mp3(am_nfs_fh3 *fhp, int *rp, int vop) +{ + struct am_fh3 *fp = (struct am_fh3 *) fhp->am_fh3_data; + am_node *ap = NULL; + + if (fp->u.s.fhh_type != 0) { + /* New filehandle type */ + int len = sizeof(*fp) - sizeof(fp->fhh_gen); + char *path = xmalloc(len+1); + /* + * Because fhp is treated as a filehandle we use memcpy + * instead of xstrlcpy. + */ + memcpy(path, (char *) fp->u.fhh_path, len); + path[len] = '\0'; + dlog("%s: new filehandle: %s", __func__, path); + + ap = path_to_exported_ap(path); + XFREE(path); + } else { + dlog("%s: old filehandle: %d", __func__, fp->u.s.fhh_id); + /* + * Check process id matches + * If it doesn't then it is probably + * from an old kernel-cached filehandle + * which is now out of date. + */ + if (fp->u.s.fhh_pid != get_server_pid()) { + dlog("%s: wrong pid %ld != my pid %ld", __func__, + (long) fp->u.s.fhh_pid, get_server_pid()); + goto done; + } + + /* + * Get hold of the supposed mount node + */ + ap = get_exported_ap(fp->u.s.fhh_id); + } +done: + return validate_ap(ap, rp, fp->fhh_gen); +} + +static am_node * +fh3_to_mp(am_nfs_fh3 *fhp) +{ + int dummy; + + return fh3_to_mp3(fhp, &dummy, VLOOK_CREATE); +} /* * Convert from automount node to file handle. @@ -826,3 +889,975 @@ mp_to_fh(am_node *mp, am_nfs_fh *fhp) /* dlog("mp_to_fh: old filehandle: %d", fp->u.s.fhh_id); */ } } +void +mp_to_fh3(am_node *mp, am_nfs_fh3 *fhp) +{ + u_int pathlen; + struct am_fh3 *fp = (struct am_fh3 *) fhp->am_fh3_data; + + memset((char *) fhp, 0, sizeof(am_nfs_fh3)); + fhp->am_fh3_length = AM_FHSIZE3; + + /* Store the generation number */ + fp->fhh_gen = mp->am_gen; + + pathlen = strlen(mp->am_path); + if (pathlen <= sizeof(*fp) - sizeof(fp->fhh_gen)) { + /* dlog("mp_to_fh: new filehandle: %s", mp->am_path); */ + + /* + * Because fhp is treated as a filehandle we use memcpy instead of + * xstrlcpy. + */ + memcpy(fp->u.fhh_path, mp->am_path, pathlen); /* making a filehandle */ + } else { + /* + * Take the process id + */ + fp->u.s.fhh_pid = get_server_pid(); + + /* + * ... the map number + */ + fp->u.s.fhh_id = mp->am_mapno; + + /* + * ... and the generation number (previously stored) + * to make a "unique" triple that will never + * be reallocated except across reboots (which doesn't matter) + * or if we are unlucky enough to be given the same + * pid as a previous amd (very unlikely). + */ + /* dlog("mp_to_fh: old filehandle: %d", fp->u.s.fhh_id); */ + } +} + +#ifdef HAVE_FS_NFS3 +static am_ftype3 ftype_to_ftype3(nfsftype ftype) +{ + if (ftype == NFFIFO) + return AM_NF3FIFO; + else + return ftype; +} + +static void nfstime_to_am_nfstime3(nfstime *time, am_nfstime3 *time3) +{ + time3->seconds = time->seconds; + time3->nseconds = time->useconds * 1000; +} + +static void rdev_to_am_specdata3(u_int rdev, am_specdata3 *rdev3) +{ + /* No device node here */ + rdev3->specdata1 = (u_int) -1; + rdev3->specdata2 = (u_int) -1; +} + +static void fattr_to_fattr3(nfsfattr *fattr, am_fattr3 *fattr3) +{ + fattr3->type = ftype_to_ftype3(fattr->na_type); + fattr3->mode = (am_mode3) fattr->na_mode; + fattr3->nlink = fattr->na_nlink; + fattr3->uid = (am_uid3) fattr->na_uid; + fattr3->gid = (am_uid3) fattr->na_gid; + fattr3->size = (am_size3) fattr->na_size; + fattr3->used = (am_size3) fattr->na_size; + rdev_to_am_specdata3(fattr->na_rdev, &fattr3->rdev); + fattr3->fsid = (uint64) fattr->na_fsid; + fattr3->fileid = (uint64) fattr->na_fileid; + nfstime_to_am_nfstime3(&fattr->na_atime, &fattr3->atime); + nfstime_to_am_nfstime3(&fattr->na_mtime, &fattr3->mtime); + nfstime_to_am_nfstime3(&fattr->na_ctime, &fattr3->ctime); +} + +static void fattr_to_wcc_attr(nfsfattr *fattr, am_wcc_attr *wcc_attr) +{ + wcc_attr->size = (am_size3) fattr->na_size; + nfstime_to_am_nfstime3(&fattr->na_mtime, &wcc_attr->mtime); + nfstime_to_am_nfstime3(&fattr->na_ctime, &wcc_attr->ctime); +} + +static am_nfsstat3 return_estale_or_rofs(am_nfs_fh3 *fh, + am_pre_op_attr *pre_op, + am_post_op_attr *post_op) +{ + am_node *mp; + + mp = fh3_to_mp(fh); + if (!mp) { + pre_op->attributes_follow = 0; + post_op->attributes_follow = 0; + return nfs_error(ESTALE); + } else { + am_fattr3 *fattr3 = &post_op->am_post_op_attr_u.attributes; + am_wcc_attr *wcc_attr = &pre_op->am_pre_op_attr_u.attributes; + nfsfattr *fattr = &mp->am_fattr; + pre_op->attributes_follow = 1; + fattr_to_wcc_attr(fattr, wcc_attr); + post_op->attributes_follow = 1; + fattr_to_fattr3(fattr, fattr3); + return nfs_error(EROFS); + } +} + +static am_nfsstat3 unlink3_or_rmdir3(am_diropargs3 *argp, + am_wcc_data *wcc_data, int unlinkp) +{ + static am_nfsstat3 res; + am_nfs_fh3 *dir = &argp->dir; + am_filename3 name = argp->name; + am_pre_op_attr *pre_op_dir = &wcc_data->before; + am_post_op_attr *post_op_dir = &wcc_data->after; + nfsfattr *fattr; + am_wcc_attr *wcc_attr; + am_node *mp, *ap; + int retry; + + post_op_dir->attributes_follow = 0; + + mp = fh3_to_mp3(dir, &retry, VLOOK_DELETE); + if (!mp) { + pre_op_dir->attributes_follow = 0; + if (retry < 0) { + amd_stats.d_drops++; + return 0; + } + res = nfs_error(retry); + goto out; + } + + pre_op_dir->attributes_follow = 1; + fattr = &mp->am_fattr; + wcc_attr = &pre_op_dir->am_pre_op_attr_u.attributes; + fattr_to_wcc_attr(fattr, wcc_attr); + + if (mp->am_fattr.na_type != NFDIR) { + res = nfs_error(ENOTDIR); + goto out; + } + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\tremove(%s, %s)", mp->am_path, name); + + ap = mp->am_al->al_mnt->mf_ops->lookup_child(mp, name, &retry, VLOOK_DELETE); + if (!ap) { + /* + * Ignore retries... + */ + if (retry < 0) + retry = 0; + /* + * Usual NFS workaround... + */ + else if (retry == ENOENT) + retry = 0; + res = nfs_error(retry); + } else { + forcibly_timeout_mp(mp); + res = AM_NFS3_OK; + } + +out: + return res; +} + +voidp +am_nfs3_null_3_svc(voidp argp, struct svc_req *rqstp) +{ + static char * result; + + return (voidp) &result; +} + +am_GETATTR3res * +am_nfs3_getattr_3_svc(am_GETATTR3args *argp, struct svc_req *rqstp) +{ + static am_GETATTR3res result; + am_nfs_fh3 *fh = (am_nfs_fh3 *) &argp->object; + am_fattr3 *fattr3; + nfsfattr *fattr; + am_node *mp; + int retry = 0; + time_t now = clocktime(NULL); + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "getattr_3:"); + + mp = fh3_to_mp3(fh, &retry, VLOOK_CREATE); + if (!mp) { + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\tretry=%d", retry); + + if (retry < 0) { + amd_stats.d_drops++; + return 0; + } + result.status = nfs_error(retry); + return &result; + } + + fattr = &mp->am_fattr; + fattr3 = (am_fattr3 *) &result.res_u.ok.obj_attributes; + fattr_to_fattr3(fattr, fattr3); + + result.status = AM_NFS3_OK; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\tstat(%s), size = %lu, mtime=%d.%d", + mp->am_path, + (am_size3) fattr3->size, + (u_int) fattr3->mtime.seconds, + (u_int) fattr3->mtime.nseconds); + + /* Delay unmount of what was looked up */ + if (mp->am_timeo_w < 4 * gopt.am_timeo_w) + mp->am_timeo_w += gopt.am_timeo_w; + mp->am_ttl = now + mp->am_timeo_w; + + mp->am_stats.s_getattr++; + + return &result; +} + +am_SETATTR3res * +am_nfs3_setattr_3_svc(am_SETATTR3args *argp, struct svc_req *rqstp) +{ + static am_SETATTR3res result; + am_nfs_fh3 *fh = (am_nfs_fh3 *) &argp->object; + am_pre_op_attr *pre_op_obj = &result.res_u.fail.obj_wcc.before; + am_post_op_attr *post_op_obj = &result.res_u.fail.obj_wcc.after; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "setattr_3:"); + + result.status = return_estale_or_rofs(fh, pre_op_obj, post_op_obj); + + return &result; +} + +am_LOOKUP3res * +am_nfs3_lookup_3_svc(am_LOOKUP3args *argp, struct svc_req *rqstp) +{ + static am_LOOKUP3res result; + am_nfs_fh3 *dir = &argp->what.dir; + am_post_op_attr *post_op_dir; + am_post_op_attr *post_op_obj; + am_node *mp; + int retry; + uid_t uid; + gid_t gid; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "lookup_3:"); + + /* finally, find the effective uid/gid from RPC request */ + if (getcreds(rqstp, &uid, &gid, nfsxprt) < 0) + plog(XLOG_ERROR, "cannot get uid/gid from RPC credentials"); + xsnprintf(opt_uid, sizeof(uid_str), "%d", (int) uid); + xsnprintf(opt_gid, sizeof(gid_str), "%d", (int) gid); + + mp = fh3_to_mp3(dir, &retry, VLOOK_CREATE); + if (!mp) { + post_op_dir = &result.res_u.fail.dir_attributes; + post_op_dir->attributes_follow = 0; + if (retry < 0) { + amd_stats.d_drops++; + return 0; + } + result.status = nfs_error(retry); + } else { + post_op_dir = &result.res_u.ok.dir_attributes; + post_op_obj = &result.res_u.ok.obj_attributes; + am_filename3 name; + am_fattr3 *fattr3; + nfsfattr *fattr; + am_node *ap; + int error; + + /* dir attributes */ + post_op_dir->attributes_follow = 1; + fattr = &mp->am_fattr; + fattr3 = &post_op_dir->am_post_op_attr_u.attributes; + fattr_to_fattr3(fattr, fattr3); + + post_op_obj->attributes_follow = 0; + + name = argp->what.name; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\tlookup_3(%s, %s)", mp->am_path, name); + + ap = mp->am_al->al_mnt->mf_ops->lookup_child(mp, name, &error, VLOOK_CREATE); + if (ap && error < 0) + ap = mp->am_al->al_mnt->mf_ops->mount_child(ap, &error); + if (ap == 0) { + if (error < 0) { + amd_stats.d_drops++; + return 0; + } + result.status = nfs_error(error); + } else { + /* + * XXX: EXPERIMENTAL! Delay unmount of what was looked up. This + * should reduce the chance for race condition between unmounting an + * entry synchronously, and re-mounting it asynchronously. + */ + if (ap->am_ttl < mp->am_ttl) + ap->am_ttl = mp->am_ttl; + + mp_to_fh3(ap, &result.res_u.ok.object); + + /* mount attributes */ + post_op_obj->attributes_follow = 1; + fattr = &ap->am_fattr; + fattr3 = &post_op_obj->am_post_op_attr_u.attributes; + fattr_to_fattr3(fattr, fattr3); + + result.status = AM_NFS3_OK; + } + mp->am_stats.s_lookup++; + } + return &result; +} + +am_ACCESS3res * +am_nfs3_access_3_svc(am_ACCESS3args *argp, struct svc_req *rqstp) +{ + static am_ACCESS3res result; + + am_nfs_fh3 *obj = &argp->object; + u_int accessbits = argp->access; + u_int accessmask = AM_ACCESS3_LOOKUP|AM_ACCESS3_READ; + am_post_op_attr *post_op_obj; + am_node *mp; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "access_3:"); + + mp = fh3_to_mp(obj); + if (!mp) { + post_op_obj = &result.res_u.fail.obj_attributes; + post_op_obj->attributes_follow = 0; + result.status = nfs_error(ENOENT); + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "access_3: ENOENT"); + } else { + nfsfattr *fattr = &mp->am_fattr; + am_fattr3 *fattr3; + post_op_obj = &result.res_u.ok.obj_attributes; + fattr3 = &post_op_obj->am_post_op_attr_u.attributes; + post_op_obj->attributes_follow = 1; + fattr_to_fattr3(fattr, fattr3); + + result.res_u.ok.access = accessbits & accessmask; + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "access_3: b=%x m=%x", accessbits, accessmask); + + result.status = AM_NFS3_OK; + } + + return &result; +} + +am_READLINK3res * +am_nfs3_readlink_3_svc(am_READLINK3args *argp, struct svc_req *rqstp) +{ + static am_READLINK3res result; + + am_nfs_fh3 *symlink = (am_nfs_fh3 *) &argp->symlink; + am_post_op_attr *post_op_sym; + am_node *mp; + int retry = 0; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "readlink_3:"); + + mp = fh3_to_mp3(symlink, &retry, VLOOK_CREATE); + if (!mp) { + readlink_retry: + if (retry < 0) { + amd_stats.d_drops++; + return 0; + } + post_op_sym = &result.res_u.fail.symlink_attributes; + post_op_sym->attributes_follow = 0; + result.status = nfs_error(retry); + } else { + nfsfattr *fattr; + am_fattr3 *fattr3; + char *ln; + + ln = do_readlink(mp, &retry); + if (!ln) + goto readlink_retry; + + if (amuDebug(D_TRACE) && ln) + plog(XLOG_DEBUG, "\treadlink_3(%s) = %s", mp->am_path, ln); + + result.res_u.ok.data = ln; + + post_op_sym = &result.res_u.ok.symlink_attributes; + post_op_sym->attributes_follow = 1; + fattr = &mp->am_fattr; + fattr3 = &post_op_sym->am_post_op_attr_u.attributes; + fattr_to_fattr3(fattr, fattr3); + + mp->am_stats.s_readlink++; + result.status = AM_NFS3_OK; + } + + return &result; +} + +am_READ3res * +am_nfs3_read_3_svc(am_READ3args *argp, struct svc_req *rqstp) +{ + static am_READ3res result; + + am_nfs_fh3 *file = (am_nfs_fh3 *) &argp->file; + am_post_op_attr *post_op_file; + am_node *mp; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "read_3:"); + + post_op_file = &result.res_u.fail.file_attributes; + result.status = nfs_error(EACCES); + + mp = fh3_to_mp(file); + if (!mp) + post_op_file->attributes_follow = 0; + else { + nfsfattr *fattr = &mp->am_fattr; + am_fattr3 *fattr3 = &post_op_file->am_post_op_attr_u.attributes; + post_op_file->attributes_follow = 1; + fattr_to_fattr3(fattr, fattr3); + } + + return &result; +} + +am_WRITE3res * +am_nfs3_write_3_svc(am_WRITE3args *argp, struct svc_req *rqstp) +{ + static am_WRITE3res result; + + am_nfs_fh3 *file = (am_nfs_fh3 *) &argp->file; + am_pre_op_attr *pre_op_file = &result.res_u.fail.file_wcc.before; + am_post_op_attr *post_op_file = &result.res_u.fail.file_wcc.after; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "write_3:"); + + result.status = return_estale_or_rofs(file, pre_op_file, post_op_file); + + return &result; +} + +am_CREATE3res * +am_nfs3_create_3_svc(am_CREATE3args *argp, struct svc_req *rqstp) +{ + static am_CREATE3res result; + + am_nfs_fh3 *dir = (am_nfs_fh3 *) &argp->where.dir; + am_pre_op_attr *pre_op_dir = &result.res_u.fail.dir_wcc.before; + am_post_op_attr *post_op_dir = &result.res_u.fail.dir_wcc.after; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "create_3:"); + + result.status = return_estale_or_rofs(dir, pre_op_dir, post_op_dir); + + return &result; +} + +am_MKDIR3res * +am_nfs3_mkdir_3_svc(am_MKDIR3args *argp, struct svc_req *rqstp) +{ + static am_MKDIR3res result; + + am_nfs_fh3 *dir = (am_nfs_fh3 *) &argp->where.dir; + am_pre_op_attr *pre_op_dir = &result.res_u.fail.dir_wcc.before; + am_post_op_attr *post_op_dir = &result.res_u.fail.dir_wcc.after; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "mkdir_3:"); + + result.status = return_estale_or_rofs(dir, pre_op_dir, post_op_dir); + + return &result; +} + +am_SYMLINK3res * +am_nfs3_symlink_3_svc(am_SYMLINK3args *argp, struct svc_req *rqstp) +{ + static am_SYMLINK3res result; + + am_nfs_fh3 *dir = (am_nfs_fh3 *) &argp->where.dir; + am_pre_op_attr *pre_op_dir = &result.res_u.fail.dir_wcc.before; + am_post_op_attr *post_op_dir = &result.res_u.fail.dir_wcc.after; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "symlink_3:"); + + result.status = return_estale_or_rofs(dir, pre_op_dir, post_op_dir); + + return &result; +} + +am_MKNOD3res * +am_nfs3_mknod_3_svc(am_MKNOD3args *argp, struct svc_req *rqstp) +{ + static am_MKNOD3res result; + + am_nfs_fh3 *dir = (am_nfs_fh3 *) &argp->where.dir; + am_pre_op_attr *pre_op_dir = &result.res_u.fail.dir_wcc.before; + am_post_op_attr *post_op_dir = &result.res_u.fail.dir_wcc.after; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "mknod_3:"); + + result.status = return_estale_or_rofs(dir, pre_op_dir, post_op_dir); + return &result; +} + +am_REMOVE3res * +am_nfs3_remove_3_svc(am_REMOVE3args *argp, struct svc_req *rqstp) +{ + static am_REMOVE3res result; + + am_diropargs3 *obj = &argp->object; + am_wcc_data dir_wcc; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "remove_3:"); + + result.status = unlink3_or_rmdir3(obj, &dir_wcc, TRUE); + + result.res_u.ok.dir_wcc = dir_wcc; + + return &result; +} + +am_RMDIR3res * +am_nfs3_rmdir_3_svc(am_RMDIR3args *argp, struct svc_req *rqstp) +{ + static am_RMDIR3res result; + + am_diropargs3 *obj = &argp->object; + am_wcc_data dir_wcc; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "rmdir_3:"); + + result.status = unlink3_or_rmdir3(obj, &dir_wcc, TRUE); + + result.res_u.ok.dir_wcc = dir_wcc; + + return &result; +} + +am_RENAME3res * +am_nfs3_rename_3_svc(am_RENAME3args *argp, struct svc_req *rqstp) +{ + static am_RENAME3res result; + + am_nfs_fh3 *fromdir = (am_nfs_fh3 *) &argp->from.dir; + am_nfs_fh3 *todir = (am_nfs_fh3 *) &argp->to.dir; + am_filename3 name = argp->to.name; + am_node *to_mp, *from_mp; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "rename_3:"); + + if (!(from_mp = fh3_to_mp(fromdir)) || !(to_mp = fh3_to_mp(todir))) + result.status = nfs_error(ESTALE); + /* + * If the kernel is doing clever things with referenced files + * then let it pretend... + */ + else { + am_wcc_attr *wcc_attr; + am_fattr3 *fattr3; + am_wcc_data *to_wcc_data, *from_wcc_data; + am_pre_op_attr *pre_op_to, *pre_op_from; + am_post_op_attr *post_op_to, *post_op_from; + nfsfattr *fattr; + + to_wcc_data = &result.res_u.ok.todir_wcc; + + pre_op_to = &to_wcc_data->before; + post_op_to = &to_wcc_data->after; + + pre_op_to->attributes_follow = 1; + fattr = &to_mp->am_fattr; + wcc_attr = &pre_op_to->am_pre_op_attr_u.attributes; + fattr_to_wcc_attr(fattr, wcc_attr); + post_op_to->attributes_follow = 1; + fattr3 = &post_op_to->am_post_op_attr_u.attributes; + fattr_to_fattr3(fattr, fattr3); + + from_wcc_data = &result.res_u.ok.fromdir_wcc; + + pre_op_from = &from_wcc_data->before; + post_op_from = &from_wcc_data->after; + + pre_op_from->attributes_follow = 1; + fattr = &from_mp->am_fattr; + wcc_attr = &pre_op_from->am_pre_op_attr_u.attributes; + fattr_to_wcc_attr(fattr, wcc_attr); + post_op_from->attributes_follow = 1; + fattr3 = &post_op_from->am_post_op_attr_u.attributes; + fattr_to_fattr3(fattr, fattr3); + + if (NSTREQ(name, ".nfs", 4)) + result.status = AM_NFS3_OK; + /* + * otherwise a failure + */ + else + result.status = nfs_error(EROFS); + } + + return &result; +} + +am_LINK3res * +am_nfs3_link_3_svc(am_LINK3args *argp, struct svc_req *rqstp) +{ + static am_LINK3res result; + + am_nfs_fh3 *file = (am_nfs_fh3 *) &argp->file; + am_nfs_fh3 *dir = (am_nfs_fh3 *) &argp->link.dir; + am_post_op_attr *post_op_file; + am_pre_op_attr *pre_op_dir; + am_post_op_attr *post_op_dir; + am_node *mp_file, *mp_dir; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "link_3:"); + + post_op_file = &result.res_u.fail.file_attributes; + post_op_file->attributes_follow = 0; + + mp_file = fh3_to_mp(file); + if (mp_file) { + nfsfattr *fattr = &mp_file->am_fattr; + am_fattr3 *fattr3 = &post_op_file->am_post_op_attr_u.attributes; + fattr_to_fattr3(fattr, fattr3); + } + + pre_op_dir = &result.res_u.fail.linkdir_wcc.before; + pre_op_dir->attributes_follow = 0; + post_op_dir = &result.res_u.fail.linkdir_wcc.after; + post_op_dir->attributes_follow = 0; + + mp_dir = fh3_to_mp(dir); + if (mp_dir) { + nfsfattr *fattr = &mp_dir->am_fattr; + am_fattr3 *fattr3 = &post_op_dir->am_post_op_attr_u.attributes; + am_wcc_attr *wcc_attr = &pre_op_dir->am_pre_op_attr_u.attributes; + + pre_op_dir->attributes_follow = 1; + fattr_to_wcc_attr(fattr, wcc_attr); + post_op_dir->attributes_follow = 1; + fattr_to_fattr3(fattr, fattr3); + } + + if (!mp_file || !mp_dir) + result.status = nfs_error(ESTALE); + else + result.status = nfs_error(EROFS); + + return &result; +} + +am_READDIR3res * +am_nfs3_readdir_3_svc(am_READDIR3args *argp, struct svc_req *rqstp) +{ + static am_READDIR3res result; + static am_entry3 entries[MAX_READDIR_ENTRIES]; + am_nfs_fh3 *dir = (am_nfs_fh3 *) &argp->dir; + am_cookie3 cookie = argp->cookie; + am_cookieverf3 cookieverf; + am_count3 count = argp->count; + am_post_op_attr *post_op_dir; + am_node *mp; + int retry; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "readdir_3:"); + + memcpy(&cookieverf, &argp->cookieverf, sizeof(am_cookieverf3)); + + mp = fh3_to_mp3(dir, &retry, VLOOK_CREATE); + if (mp == NULL) { + if (retry < 0) { + amd_stats.d_drops++; + return 0; + } + post_op_dir = &result.res_u.fail.dir_attributes; + post_op_dir->attributes_follow = 0; + result.status = nfs_error(retry); + } else { + am_dirlist3 *list = &result.res_u.ok.reply; + am_nfsstat3 status; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\treaddir_3(%s)", mp->am_path); + + status = mp->am_al->al_mnt->mf_ops->readdir(mp, + (voidp)&cookie, list, entries, count); + if (status == 0) { + post_op_dir = &result.res_u.ok.dir_attributes; + nfsfattr *fattr; + am_fattr3 *fattr3; + + fattr = &mp->am_fattr; + fattr3 = &post_op_dir->am_post_op_attr_u.attributes; + post_op_dir->attributes_follow = 1; + fattr_to_fattr3(fattr, fattr3); + result.status = AM_NFS3_OK; + } else { + post_op_dir = &result.res_u.fail.dir_attributes; + post_op_dir->attributes_follow = 0; + result.status = nfs_error(status); + } + + mp->am_stats.s_readdir++; + } + + return &result; +} + +am_READDIRPLUS3res * +am_nfs3_readdirplus_3_svc(am_READDIRPLUS3args *argp, struct svc_req *rqstp) +{ + static am_READDIRPLUS3res result; + am_nfs_fh3 *dir = (am_nfs_fh3 *) &argp->dir; + am_post_op_attr *post_op_dir; + nfsfattr *fattr; + am_fattr3 *fattr3; + am_node *mp; + int retry; + + mp = fh3_to_mp3(dir, &retry, VLOOK_CREATE); + if (mp == NULL) { + if (retry < 0) { + amd_stats.d_drops++; + return 0; + } + post_op_dir = &result.res_u.fail.dir_attributes; + post_op_dir->attributes_follow = 0; + result.status = nfs_error(retry); + } else { + post_op_dir = &result.res_u.ok.dir_attributes; + fattr = &mp->am_fattr; + fattr3 = &post_op_dir->am_post_op_attr_u.attributes; + post_op_dir->attributes_follow = 1; + fattr_to_fattr3(fattr, fattr3); + result.status = AM_NFS3ERR_NOTSUPP; + } + + return &result; +} + +am_FSSTAT3res * +am_nfs3_fsstat_3_svc(am_FSSTAT3args *argp, struct svc_req *rqstp) +{ + static am_FSSTAT3res result; + + am_nfs_fh3 *fsroot = (am_nfs_fh3 *) &argp->fsroot; + am_post_op_attr *post_op_fsroot; + am_node *mp; + int retry; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "fsstat_3:"); + + mp = fh3_to_mp3(fsroot, &retry, VLOOK_CREATE); + if (!mp) { + if (retry < 0) { + amd_stats.d_drops++; + return 0; + } + post_op_fsroot = &result.res_u.fail.obj_attributes; + post_op_fsroot->attributes_follow = 0; + result.status = nfs_error(retry); + } else { + am_FSSTAT3resok *ok = &result.res_u.ok; + u_int blocks, bfree, bavail; + nfsfattr *fattr; + am_fattr3 *fattr3; + mntent_t mnt; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\tfsstat_3(%s)", mp->am_path); + + fattr = &mp->am_fattr; + post_op_fsroot = &ok->obj_attributes; + post_op_fsroot->attributes_follow = 1; + fattr3 = &post_op_fsroot->am_post_op_attr_u.attributes; + fattr_to_fattr3(fattr, fattr3); + + /* + * just return faked up file system information + */ + ok->tbytes = 1024; + ok->invarsec = 0; + + /* check if map is browsable and show_statfs_entries=yes */ + if ((gopt.flags & CFM_SHOW_STATFS_ENTRIES) && + mp->am_al->al_mnt && mp->am_al->al_mnt->mf_mopts) { + mnt.mnt_opts = mp->am_al->al_mnt->mf_mopts; + if (amu_hasmntopt(&mnt, "browsable")) { + count_map_entries(mp, &blocks, &bfree, &bavail); + } + ok->fbytes = bfree; + ok->abytes = bavail; + ok->ffiles = bfree; + ok->afiles = bavail; + ok->tfiles = blocks; + } else { + ok->fbytes = 0; + ok->abytes = 0; + ok->ffiles = 0; + ok->afiles = 0; + ok->tfiles = 0; /* set to 1 if you don't want empty automounts */ + } + + result.status = AM_NFS3_OK; + mp->am_stats.s_statfs++; + } + + return &result; +} + +#define FSF3_HOMOGENEOUS 0x0008 + +am_FSINFO3res * +am_nfs3_fsinfo_3_svc(am_FSINFO3args *argp, struct svc_req *rqstp) +{ + static am_FSINFO3res result; + + am_nfs_fh3 *fsroot = (am_nfs_fh3 *) &argp->fsroot; + am_post_op_attr *post_op_fsroot; + am_node *mp; + int retry; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "fsinfo_3:"); + + mp = fh3_to_mp3(fsroot, &retry, VLOOK_CREATE); + if (!mp) { + if (retry < 0) { + amd_stats.d_drops++; + return 0; + } + post_op_fsroot = &result.res_u.fail.obj_attributes; + post_op_fsroot->attributes_follow = 0; + result.status = nfs_error(retry); + } else { + am_FSINFO3resok *ok = &result.res_u.ok; + nfsfattr *fattr; + am_fattr3 *fattr3; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\tfsinfo_3(%s)", mp->am_path); + + fattr = &mp->am_fattr; + post_op_fsroot = &ok->obj_attributes; + post_op_fsroot->attributes_follow = 1; + fattr3 = &post_op_fsroot->am_post_op_attr_u.attributes; + fattr_to_fattr3(fattr, fattr3); + + /* + * just return faked up file system information + */ + ok->rtmax = 0; + ok->rtpref = 0; + ok->rtmult = 0; + ok->wtmax = 0; + ok->wtpref = 0; + ok->wtmult = 0; + ok->dtpref = 1024; + ok->maxfilesize = 0; + ok->time_delta.seconds = 1; + ok->time_delta.nseconds = 0; + ok->properties = FSF3_HOMOGENEOUS; + + result.status = AM_NFS3_OK; + mp->am_stats.s_fsinfo++; + } + + return &result; +} + +am_PATHCONF3res * +am_nfs3_pathconf_3_svc(am_PATHCONF3args *argp, struct svc_req *rqstp) +{ + static am_PATHCONF3res result; + + am_nfs_fh3 *obj = (am_nfs_fh3 *) &argp->object; + am_post_op_attr *post_op_obj; + am_node *mp; + int retry; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "pathconf_3:"); + + mp = fh3_to_mp3(obj, &retry, VLOOK_CREATE); + if (!mp) { + if (retry < 0) { + amd_stats.d_drops++; + return 0; + } + post_op_obj = &result.res_u.fail.obj_attributes; + post_op_obj->attributes_follow = 0; + result.status = nfs_error(retry); + } else { + am_PATHCONF3resok *ok = &result.res_u.ok; + nfsfattr *fattr; + am_fattr3 *fattr3; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\tpathconf_3(%s)", mp->am_path); + + fattr = &mp->am_fattr; + post_op_obj = &ok->obj_attributes; + post_op_obj->attributes_follow = 1; + fattr3 = &post_op_obj->am_post_op_attr_u.attributes; + fattr_to_fattr3(fattr, fattr3); + + ok->linkmax = 0; + ok->name_max = NAME_MAX; + ok->no_trunc = 1; + ok->chown_restricted = 1; + ok->case_insensitive = 0; + ok->case_preserving = 1; + + result.status = AM_NFS3_OK; + mp->am_stats.s_pathconf++; + } + + return &result; +} + +am_COMMIT3res * +am_nfs3_commit_3_svc(am_COMMIT3args *argp, struct svc_req *rqstp) +{ + static am_COMMIT3res result; + + am_nfs_fh3 *file = (am_nfs_fh3 *) &argp->file; + am_pre_op_attr *pre_op_file = &result.res_u.fail.file_wcc.before; + am_post_op_attr *post_op_file = &result.res_u.fail.file_wcc.after; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "commit_3:"); + + result.status = return_estale_or_rofs(file, pre_op_file, post_op_file); + + return &result; +} +#endif /* HAVE_FS_NFS3 */ diff --git a/amd/ops_TEMPLATE.c b/amd/ops_TEMPLATE.c index 3f742198441..b873c8ece27 100644 --- a/amd/ops_TEMPLATE.c +++ b/amd/ops_TEMPLATE.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -64,7 +60,7 @@ static int foofs_init(mntfs *mf); static int foofs_mount(am_node *mp, mntfs *mf); static int foofs_umount(am_node *mp, mntfs *mf); static am_node *foofs_lookuppn(am_node *mp, char *fname, int *error_return, int op); -static int foofs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count); +static int foofs_readdir(am_node *mp, void cookie, voidp dp, voidp ep, u_int count); static am_node *foofs_readlink(am_node *mp, int *error_return); static void foofs_mounted(am_node *am, mntfs *mf); static void foofs_umounted(am_node *mp, mntfs *mf); @@ -220,7 +216,7 @@ foofs_lookuppn(am_node *mp, char *fname, int *error_return, int op) * If OK, fills in ep with chain of directory entries. */ static int -foofs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count) +foofs_readdir(am_node *mp, void cookie, voidp dp, voidp ep, u_int count) { int error = 0; diff --git a/amd/ops_autofs.c b/amd/ops_autofs.c deleted file mode 100644 index bd0bb122fe0..00000000000 --- a/amd/ops_autofs.c +++ /dev/null @@ -1,1279 +0,0 @@ -/* - * Copyright (c) 1997-2001 Erez Zadok - * Copyright (c) 1990 Jan-Simon Pendry - * Copyright (c) 1990 Imperial College of Science, Technology & Medicine - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Jan-Simon Pendry at Imperial College, London. - * - * 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 acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. - * - * %W% (Berkeley) %G% - * - * $Id: ops_autofs.c,v 1.7.2.4 2001/04/24 06:17:40 ib42 Exp $ - * - */ - -/* - * Automounter filesystem - */ - -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ -#include -#include - -/* - * KLUDGE: wrap whole file in HAVE_FS_AUTOFS, because - * not all systems with an automounter file system are supported - * by am-utils yet... - */ - -#ifdef HAVE_FS_AUTOFS - -/* - * MACROS: - */ -#ifndef AUTOFS_NULL -# define AUTOFS_NULL ((u_long)0) -#endif /* not AUTOFS_NULL */ - -/* - * VARIABLES: - */ - -/* forward declarations */ -static int mount_autofs(char *dir, char *opts); -static int autofs_mount_1_svc(struct mntrequest *mr, struct mntres *result, struct authunix_parms *cred); -static int autofs_unmount_1_svc(struct umntrequest *ur, struct umntres *result, struct authunix_parms *cred); - -/* external declarations */ -extern bool_t xdr_mntrequest(XDR *, mntrequest *); -extern bool_t xdr_mntres(XDR *, mntres *); -extern bool_t xdr_umntrequest(XDR *, umntrequest *); -extern bool_t xdr_umntres(XDR *, umntres *); - -/* - * STRUCTURES: - */ - -/* Sun's kernel-based automounter-supporting file system */ -am_ops autofs_ops = -{ - "autofs", - amfs_auto_match, - 0, /* amfs_auto_init */ - autofs_mount, - 0, - autofs_umount, - 0, - amfs_auto_lookuppn, - amfs_auto_readdir, /* browsable version of readdir() */ - 0, /* autofs_readlink */ - autofs_mounted, - 0, /* autofs_umounted */ - find_amfs_auto_srvr, - FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY -}; - - -/**************************************************************************** - *** FUNCTIONS *** - ****************************************************************************/ - -/* - * Mount the top-level using autofs - */ -int -autofs_mount(am_node *mp) -{ - mntfs *mf = mp->am_mnt; - struct stat stb; - char opts[256], preopts[256]; - int error; - char *mnttype; - - /* - * Mounting the automounter. - * Make sure the mount directory exists, construct - * the mount options and call the mount_autofs routine. - */ - - if (stat(mp->am_path, &stb) < 0) { - return errno; - } else if ((stb.st_mode & S_IFMT) != S_IFDIR) { - plog(XLOG_WARNING, "%s is not a directory", mp->am_path); - return ENOTDIR; - } - if (mf->mf_ops == &autofs_ops) - mnttype = "indirect"; - else if (mf->mf_ops == &amfs_direct_ops) - mnttype = "direct"; -#ifdef HAVE_AMU_FS_UNION - else if (mf->mf_ops == &amfs_union_ops) - mnttype = "union"; -#endif /* HAVE_AMU_FS_UNION */ - else - mnttype = "auto"; - - /* - * Construct some mount options: - * - * Tack on magic map= option in mtab to emulate - * SunOS automounter behavior. - */ - preopts[0] = '\0'; -#ifdef MNTTAB_OPT_INTR - strcat(preopts, MNTTAB_OPT_INTR); - strcat(preopts, ","); -#endif /* MNTTAB_OPT_INTR */ -#ifdef MNTTAB_OPT_IGNORE - strcat(preopts, MNTTAB_OPT_IGNORE); - strcat(preopts, ","); -#endif /* MNTTAB_OPT_IGNORE */ - sprintf(opts, "%s%s,%s=%d,%s=%d,%s=%d,%s,map=%s", - preopts, - MNTTAB_OPT_RW, - MNTTAB_OPT_PORT, nfs_port, - MNTTAB_OPT_TIMEO, gopt.amfs_auto_timeo, - MNTTAB_OPT_RETRANS, gopt.amfs_auto_retrans, - mnttype, mf->mf_info); - - /* now do the mount */ - error = mount_autofs(mf->mf_mount, opts); - if (error) { - errno = error; - plog(XLOG_FATAL, "mount_autofs: %m"); - return error; - } - return 0; -} - - -void -autofs_mounted(mntfs *mf) -{ - amfs_auto_mkcacheref(mf); -} - - -/* - * Unmount a top-level automount node - */ -int -autofs_umount(am_node *mp) -{ - int error; - struct stat stb; - - /* - * The lstat is needed if this mount is type=direct. When that happens, - * the kernel cache gets confused between the underlying type (dir) and - * the mounted type (link) and so needs to be re-synced before the - * unmount. This is all because the unmount system call follows links and - * so can't actually unmount a link (stupid!). It was noted that doing an - * ls -ld of the mount point to see why things were not working actually - * fixed the problem - so simulate an ls -ld here. - */ - if (lstat(mp->am_path, &stb) < 0) { -#ifdef DEBUG - dlog("lstat(%s): %m", mp->am_path); -#endif /* DEBUG */ - } - error = UMOUNT_FS(mp->am_path, mnttab_file_name); - if (error == EBUSY && mp->am_flags & AMF_AUTOFS) { - plog(XLOG_WARNING, "autofs_unmount of %s busy (autofs). exit", mp->am_path); - error = 0; /* fake unmount was ok */ - } - return error; -} - - -/* - * Mount an automounter directory. - * The automounter is connected into the system - * as a user-level NFS server. mount_autofs constructs - * the necessary NFS parameters to be given to the - * kernel so that it will talk back to us. - */ -static int -mount_autofs(char *dir, char *opts) -{ - char fs_hostname[MAXHOSTNAMELEN + MAXPATHLEN + 1]; - char *map_opt, buf[MAXHOSTNAMELEN]; - int retry, error, flags; - struct utsname utsname; - mntent_t mnt; - autofs_args_t autofs_args; - MTYPE_TYPE type = MOUNT_TYPE_AUTOFS; - - memset((voidp) &autofs_args, 0, sizeof(autofs_args)); /* Paranoid */ - - memset((voidp) &mnt, 0, sizeof(mnt)); - mnt.mnt_dir = dir; - mnt.mnt_fsname = pid_fsname; - mnt.mnt_opts = opts; - mnt.mnt_type = type; - - retry = hasmntval(&mnt, "retry"); - if (retry <= 0) - retry = 2; /* XXX */ - - /* - * SET MOUNT ARGS - */ - if (uname(&utsname) < 0) { - strcpy(buf, "localhost.autofs"); - } else { - strcpy(buf, utsname.nodename); - strcat(buf, ".autofs"); - } -#ifdef HAVE_FIELD_AUTOFS_ARGS_T_ADDR - autofs_args.addr.buf = buf; - autofs_args.addr.len = strlen(autofs_args.addr.buf); - autofs_args.addr.maxlen = autofs_args.addr.len; -#endif /* HAVE_FIELD_AUTOFS_ARGS_T_ADDR */ - - autofs_args.path = dir; - autofs_args.opts = opts; - - map_opt = hasmntopt(&mnt, "map"); - if (map_opt) { - map_opt += sizeof("map="); /* skip the "map=" */ - if (map_opt == NULL) { - plog(XLOG_WARNING, "map= has a null map name. reset to amd.unknown"); - map_opt = "amd.unknown"; - } - } - autofs_args.map = map_opt; - - /* XXX: these I set arbitrarily... */ - autofs_args.mount_to = 300; - autofs_args.rpc_to = 60; - autofs_args.direct = 0; - - /* - * Make a ``hostname'' string for the kernel - */ - sprintf(fs_hostname, "pid%ld@%s:%s", - (long) (foreground ? am_mypid : getppid()), - am_get_hostname(), dir); - - /* - * Most kernels have a name length restriction. - */ - if (strlen(fs_hostname) >= MAXHOSTNAMELEN) - strcpy(fs_hostname + MAXHOSTNAMELEN - 3, ".."); - - /* - * Finally we can compute the mount flags set above. - */ - flags = compute_mount_flags(&mnt); - - /* - * This is it! Here we try to mount amd on its mount points. - */ - error = mount_fs(&mnt, flags, (caddr_t) &autofs_args, retry, type, 0, NULL, mnttab_file_name); - return error; -} - - -/****************************************************************************/ -/* autofs program dispatcher */ -void -autofs_program_1(struct svc_req *rqstp, SVCXPRT *transp) -{ - int ret; - union { - mntrequest autofs_mount_1_arg; - umntrequest autofs_umount_1_arg; - } argument; - union { - mntres mount_res; - umntres umount_res; - } result; - - bool_t (*xdr_argument)(), (*xdr_result)(); - int (*local)(); - - switch (rqstp->rq_proc) { - - case AUTOFS_NULL: - svc_sendreply(transp, - (XDRPROC_T_TYPE) xdr_void, - (SVC_IN_ARG_TYPE) NULL); - return; - - case AUTOFS_MOUNT: - xdr_argument = xdr_mntrequest; - xdr_result = xdr_mntres; - local = (int (*)()) autofs_mount_1_svc; - break; - - case AUTOFS_UNMOUNT: - xdr_argument = xdr_umntrequest; - xdr_result = xdr_umntres; - local = (int (*)()) autofs_unmount_1_svc; - break; - - default: - svcerr_noproc(transp); - return; - } - - memset((char *) &argument, 0, sizeof(argument)); - if (!svc_getargs(transp, - (XDRPROC_T_TYPE) xdr_argument, - (SVC_IN_ARG_TYPE) &argument)) { - plog(XLOG_ERROR, - "AUTOFS xdr decode failed for %d %d %d", - (int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc); - svcerr_decode(transp); - return; - } - - ret = (*local) (&argument, &result, rqstp); - if (!svc_sendreply(transp, - (XDRPROC_T_TYPE) xdr_result, - (SVC_IN_ARG_TYPE) &result)) { - svcerr_systemerr(transp); - } - - if (!svc_freeargs(transp, - (XDRPROC_T_TYPE) xdr_argument, - (SVC_IN_ARG_TYPE) &argument)) { - plog(XLOG_FATAL, "unable to free rpc arguments in autofs_program_1"); - going_down(1); - } -} - - -static int -autofs_mount_1_svc(struct mntrequest *mr, struct mntres *result, struct authunix_parms *cred) -{ - int err = 0; - am_node *anp, *anp2; - - plog(XLOG_INFO, "XXX: autofs_mount_1_svc: %s:%s:%s:%s", - mr->map, mr->name, mr->opts, mr->path); - - /* look for map (eg. "/home") */ - anp = find_ap(mr->path); - if (!anp) { - plog(XLOG_ERROR, "map %s not found", mr->path); - err = ENOENT; - goto out; - } - /* turn on autofs in map flags */ - if (!(anp->am_flags & AMF_AUTOFS)) { - plog(XLOG_INFO, "turning on AMF_AUTOFS for node %s", mr->path); - anp->am_flags |= AMF_AUTOFS; - } - - /* - * Look for (and create if needed) the new node. - * - * If an error occurred, return it. If a -1 was returned, that indicates - * that a mount is in progress, so sleep a while (while the backgrounded - * mount is happening), and then signal the autofs to retry the mount. - * - * There's something I don't understand. I was thinking that this code - * here is the one which will succeed eventually and will send an RPC - * reply to the kernel, but apparently that happens somewhere else, not - * here. It works though, just that I don't know how. Arg. -Erez. - * */ - err = 0; - anp2 = autofs_lookuppn(anp, mr->name, &err, VLOOK_CREATE); - if (!anp2) { - if (err == -1) { /* then tell autofs to retry */ - sleep(1); - err = EAGAIN; - } - goto out; - } - -out: - result->status = err; - return err; -} - - -static int -autofs_unmount_1_svc(struct umntrequest *ur, struct umntres *result, struct authunix_parms *cred) -{ - int err = 0; - -#ifdef HAVE_FIELD_UMNTREQUEST_RDEVID - plog(XLOG_INFO, "XXX: autofs_unmount_1_svc: %d:%lu:%lu:0x%lx", - ur->isdirect, (unsigned long) ur->devid, (unsigned long) ur->rdevid, - (unsigned long) ur->next); -#else /* HAVE_FIELD_UMNTREQUEST_RDEVID */ - plog(XLOG_INFO, "XXX: autofs_unmount_1_svc: %d:%lu:0x%lx", - ur->isdirect, (unsigned long) ur->devid, - (unsigned long) ur->next); -#endif /* HAVE_FIELD_UMNTREQUEST_RDEVID */ - - err = EINVAL; /* XXX: not implemented yet */ - goto out; - -out: - result->status = err; - return err; -} - - -/* - * Pick a file system to try mounting and - * do that in the background if necessary - * - For each location: - if it is new -defaults then - extract and process - continue; - fi - if it is a cut then - if a location has been tried then - break; - fi - continue; - fi - parse mount location - discard previous mount location if required - find matching mounted filesystem - if not applicable then - this_error = No such file or directory - continue - fi - if the filesystem failed to be mounted then - this_error = error from filesystem - elif the filesystem is mounting or unmounting then - this_error = -1 - elif the fileserver is down then - this_error = -1 - elif the filesystem is already mounted - this_error = 0 - break - fi - if no error on this mount then - this_error = initialize mount point - fi - if no error on this mount and mount is delayed then - this_error = -1 - fi - if this_error < 0 then - retry = true - fi - if no error on this mount then - make mount point if required - fi - if no error on this mount then - if mount in background then - run mount in background - return -1 - else - this_error = mount in foreground - fi - fi - if an error occurred on this mount then - update stats - save error in mount point - fi - endfor - */ -static int -autofs_bgmount(struct continuation *cp, int mpe) -{ - mntfs *mf = cp->mp->am_mnt; /* Current mntfs */ - mntfs *mf_retry = 0; /* First mntfs which needed retrying */ - int this_error = -1; /* Per-mount error */ - int hard_error = -1; - int mp_error = mpe; - - /* - * Try to mount each location. - * At the end: - * hard_error == 0 indicates something was mounted. - * hard_error > 0 indicates everything failed with a hard error - * hard_error < 0 indicates nothing could be mounted now - */ - for (; this_error && *cp->ivec; cp->ivec++) { - am_ops *p; - am_node *mp = cp->mp; - char *link_dir; - int dont_retry; - - if (hard_error < 0) - hard_error = this_error; - - this_error = -1; - - if (**cp->ivec == '-') { - /* - * Pick up new defaults - */ - if (cp->auto_opts && *cp->auto_opts) - cp->def_opts = str3cat(cp->def_opts, cp->auto_opts, ";", *cp->ivec + 1); - else - cp->def_opts = strealloc(cp->def_opts, *cp->ivec + 1); -#ifdef DEBUG - dlog("Setting def_opts to \"%s\"", cp->def_opts); -#endif /* DEBUG */ - continue; - } - /* - * If a mount has been attempted, and we find - * a cut then don't try any more locations. - */ - if (STREQ(*cp->ivec, "/") || STREQ(*cp->ivec, "||")) { - if (cp->tried) { -#ifdef DEBUG - dlog("Cut: not trying any more locations for %s", - mp->am_path); -#endif /* DEBUG */ - break; - } - continue; - } - - /* match the operators */ - p = ops_match(&cp->fs_opts, *cp->ivec, cp->def_opts, mp->am_path, cp->key, mp->am_parent->am_mnt->mf_info); - - /* - * Find a mounted filesystem for this node. - */ - mp->am_mnt = mf = realloc_mntfs(mf, p, &cp->fs_opts, - cp->fs_opts.opt_fs, - cp->fs_opts.fs_mtab, - cp->auto_opts, - cp->fs_opts.opt_opts, - cp->fs_opts.opt_remopts); - - p = mf->mf_ops; -#ifdef DEBUG - dlog("Got a hit with %s", p->fs_type); -#endif /* DEBUG */ - - /* - * Note whether this is a real mount attempt - */ - if (p == &amfs_error_ops) { - plog(XLOG_MAP, "Map entry %s for %s did not match", *cp->ivec, mp->am_path); - if (this_error <= 0) - this_error = ENOENT; - continue; - } else { - if (cp->fs_opts.fs_mtab) { - plog(XLOG_MAP, "Trying mount of %s on \"%s\" fstype %s", - cp->fs_opts.fs_mtab, mp->am_path, p->fs_type); - } - cp->tried = TRUE; - } - - this_error = 0; - dont_retry = FALSE; - - if (mp->am_link) { - XFREE(mp->am_link); - mp->am_link = 0; - } - link_dir = mf->mf_fo->opt_sublink; - - if (link_dir && *link_dir) { - if (*link_dir == '/') { - mp->am_link = strdup(link_dir); - } else { - /* - * try getting fs option from continuation, not mountpoint! - * Don't try logging the string from mf, since it may be bad! - */ - if (cp->fs_opts.opt_fs != mf->mf_fo->opt_fs) - plog(XLOG_ERROR, "use %s instead of 0x%lx", - cp->fs_opts.opt_fs, (unsigned long) mf->mf_fo->opt_fs); - - mp->am_link = str3cat((char *) 0, - cp->fs_opts.opt_fs, "/", link_dir); - - normalize_slash(mp->am_link); - } - } - - if (mf->mf_error > 0) { - this_error = mf->mf_error; - } else if (mf->mf_flags & (MFF_MOUNTING | MFF_UNMOUNTING)) { - /* - * Still mounting - retry later - */ -#ifdef DEBUG - dlog("Duplicate pending mount fstype %s", p->fs_type); -#endif /* DEBUG */ - this_error = -1; - } else if (FSRV_ISDOWN(mf->mf_server)) { - /* - * Would just mount from the same place - * as a hung mount - so give up - */ -#ifdef DEBUG - dlog("%s is already hung - giving up", mf->mf_mount); -#endif /* DEBUG */ - mp_error = EWOULDBLOCK; - dont_retry = TRUE; - this_error = -1; - } else if (mf->mf_flags & MFF_MOUNTED) { -#ifdef DEBUG - dlog("duplicate mount of \"%s\" ...", mf->mf_info); -#endif /* DEBUG */ - - /* - * Just call mounted() - */ - am_mounted(mp); - - this_error = 0; - break; - } - - /* - * Will usually need to play around with the mount nodes - * file attribute structure. This must be done here. - * Try and get things initialized, even if the fileserver - * is not known to be up. In the common case this will - * progress things faster. - */ - if (!this_error) { - /* - * Fill in attribute fields. - */ - if (mf->mf_ops->fs_flags & FS_DIRECTORY) - mk_fattr(mp, NFDIR); - else - mk_fattr(mp, NFLNK); - - if (p->fs_init) - this_error = (*p->fs_init) (mf); - } - - /* - * Make sure the fileserver is UP before doing any more work - */ - if (!FSRV_ISUP(mf->mf_server)) { -#ifdef DEBUG - dlog("waiting for server %s to become available", mf->mf_server->fs_host); -#endif /* DEBUG */ - this_error = -1; - } - - if (!this_error && mf->mf_fo->opt_delay) { - /* - * If there is a delay timer on the mount - * then don't try to mount if the timer - * has not expired. - */ - int i = atoi(mf->mf_fo->opt_delay); - if (i > 0 && clocktime() < (cp->start + i)) { -#ifdef DEBUG - dlog("Mount of %s delayed by %lds", mf->mf_mount, i - clocktime() + cp->start); -#endif /* DEBUG */ - this_error = -1; - } - } - - if (this_error < 0 && !dont_retry) { - if (!mf_retry) - mf_retry = dup_mntfs(mf); - cp->retry = TRUE; - } - - if (!this_error) { - if (p->fs_flags & FS_MBACKGROUND) { - mf->mf_flags |= MFF_MOUNTING; /* XXX */ -#ifdef DEBUG - dlog("backgrounding mount of \"%s\"", mf->mf_mount); -#endif /* DEBUG */ - if (cp->callout) { - untimeout(cp->callout); - cp->callout = 0; - } - run_task(try_mount, (voidp) mp, amfs_auto_cont, (voidp) cp); - mf->mf_flags |= MFF_MKMNT; /* XXX */ - if (mf_retry) - free_mntfs(mf_retry); - return -1; - } else { -#ifdef DEBUG - dlog("foreground mount of \"%s\" ...", mf->mf_info); -#endif /* DEBUG */ - this_error = try_mount((voidp) mp); - if (this_error < 0) { - if (!mf_retry) - mf_retry = dup_mntfs(mf); - cp->retry = TRUE; - } - } - } - - if (this_error >= 0) { - if (this_error > 0) { - amd_stats.d_merr++; - if (mf != mf_retry) { - mf->mf_error = this_error; - mf->mf_flags |= MFF_ERROR; - } - } - - /* - * Wakeup anything waiting for this mount - */ - wakeup((voidp) mf); - } - } - - if (this_error && cp->retry) { - free_mntfs(mf); - mf = cp->mp->am_mnt = mf_retry; - /* - * Not retrying again (so far) - */ - cp->retry = FALSE; - cp->tried = FALSE; - /* - * Start at the beginning. - * Rewind the location vector and - * reset the default options. - */ - cp->ivec = cp->xivec; - cp->def_opts = strealloc(cp->def_opts, cp->auto_opts); - /* - * Arrange that autofs_bgmount is called - * after anything else happens. - */ -#ifdef DEBUG - dlog("Arranging to retry mount of %s", cp->mp->am_path); -#endif /* DEBUG */ - sched_task(amfs_auto_retry, (voidp) cp, (voidp) mf); - if (cp->callout) - untimeout(cp->callout); - cp->callout = timeout(RETRY_INTERVAL, wakeup, (voidp) mf); - - cp->mp->am_ttl = clocktime() + RETRY_INTERVAL; - - /* - * Not done yet - so don't return anything - */ - return -1; - } - - if (hard_error < 0 || this_error == 0) - hard_error = this_error; - - /* - * Discard handle on duff filesystem. - * This should never happen since it - * should be caught by the case above. - */ - if (mf_retry) { - if (hard_error) - plog(XLOG_ERROR, "discarding a retry mntfs for %s", mf_retry->mf_mount); - free_mntfs(mf_retry); - } - - /* - * If we get here, then either the mount succeeded or - * there is no more mount information available. - */ - if (hard_error < 0 && mp_error) - hard_error = cp->mp->am_error = mp_error; - if (hard_error > 0) { - /* - * Set a small(ish) timeout on an error node if - * the error was not a time out. - */ - switch (hard_error) { - case ETIMEDOUT: - case EWOULDBLOCK: - cp->mp->am_timeo = 17; - break; - default: - cp->mp->am_timeo = 5; - break; - } - new_ttl(cp->mp); - } - - /* - * Make sure that the error value in the mntfs has a - * reasonable value. - */ - if (mf->mf_error < 0) { - mf->mf_error = hard_error; - if (hard_error) - mf->mf_flags |= MFF_ERROR; - } - - /* - * In any case we don't need the continuation any more - */ - free_continuation(cp); - - return hard_error; -} - - -/* - * Automount interface to RPC lookup routine - * Find the corresponding entry and return - * the file handle for it. - */ -am_node * -autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op) -{ - am_node *ap, *new_mp, *ap_hung; - char *info; /* Mount info - where to get the file system */ - char **ivec, **xivec; /* Split version of info */ - char *auto_opts; /* Automount options */ - int error = 0; /* Error so far */ - char path_name[MAXPATHLEN]; /* General path name buffer */ - char apath[MAXPATHLEN]; /* autofs path (added space) */ - char *pfname; /* Path for database lookup */ - struct continuation *cp; /* Continuation structure if need to mount */ - int in_progress = 0; /* # of (un)mount in progress */ - char *dflts; - mntfs *mf; - -#ifdef DEBUG - dlog("in autofs_lookuppn"); -#endif /* DEBUG */ - - /* - * If the server is shutting down - * then don't return information - * about the mount point. - */ - if (amd_state == Finishing) { -#ifdef DEBUG - if ((mf = mp->am_mnt) == 0 || mf->mf_ops == &amfs_direct_ops) { - dlog("%s mount ignored - going down", fname); - } else { - dlog("%s/%s mount ignored - going down", mp->am_path, fname); - } -#endif /* DEBUG */ - ereturn(ENOENT); - } - - /* - * Handle special case of "." and ".." - */ - if (fname[0] == '.') { - if (fname[1] == '\0') - return mp; /* "." is the current node */ - if (fname[1] == '.' && fname[2] == '\0') { - if (mp->am_parent) { -#ifdef DEBUG - dlog(".. in %s gives %s", mp->am_path, mp->am_parent->am_path); -#endif /* DEBUG */ - return mp->am_parent; /* ".." is the parent node */ - } - ereturn(ESTALE); - } - } - - /* - * Check for valid key name. - * If it is invalid then pretend it doesn't exist. - */ - if (!valid_key(fname)) { - plog(XLOG_WARNING, "Key \"%s\" contains a disallowed character", fname); - ereturn(ENOENT); - } - - /* - * Expand key name. - * fname is now a private copy. - */ - fname = expand_key(fname); - - for (ap_hung = 0, ap = mp->am_child; ap; ap = ap->am_osib) { - /* - * Otherwise search children of this node - */ - if (FSTREQ(ap->am_name, fname)) { - mf = ap->am_mnt; - if (ap->am_error) { - error = ap->am_error; - continue; - } - /* - * If the error code is undefined then it must be - * in progress. - */ - if (mf->mf_error < 0) - goto in_progrss; - - /* - * Check for a hung node - */ - if (FSRV_ISDOWN(mf->mf_server)) { -#ifdef DEBUG - dlog("server hung"); -#endif /* DEBUG */ - error = ap->am_error; - ap_hung = ap; - continue; - } - /* - * If there was a previous error with this node - * then return that error code. - */ - if (mf->mf_flags & MFF_ERROR) { - error = mf->mf_error; - continue; - } - if (!(mf->mf_flags & MFF_MOUNTED) || (mf->mf_flags & MFF_UNMOUNTING)) { - in_progrss: - /* - * If the fs is not mounted or it is unmounting then there - * is a background (un)mount in progress. In this case - * we just drop the RPC request (return nil) and - * wait for a retry, by which time the (un)mount may - * have completed. - */ -#ifdef DEBUG - dlog("ignoring mount of %s in %s -- flags (%x) in progress", - fname, mf->mf_mount, mf->mf_flags); -#endif /* DEBUG */ - in_progress++; - continue; - } - - /* - * Otherwise we have a hit: return the current mount point. - */ -#ifdef DEBUG - dlog("matched %s in %s", fname, ap->am_path); -#endif /* DEBUG */ - XFREE(fname); - return ap; - } - } - - if (in_progress) { -#ifdef DEBUG - dlog("Waiting while %d mount(s) in progress", in_progress); -#endif /* DEBUG */ - XFREE(fname); - ereturn(-1); - } - - /* - * If an error occurred then return it. - */ - if (error) { -#ifdef DEBUG - errno = error; /* XXX */ - dlog("Returning error: %m"); -#endif /* DEBUG */ - XFREE(fname); - ereturn(error); - } - - /* - * If doing a delete then don't create again! - */ - switch (op) { - case VLOOK_DELETE: - ereturn(ENOENT); - - case VLOOK_CREATE: - break; - - default: - plog(XLOG_FATAL, "Unknown op to autofs_lookuppn: 0x%x", op); - ereturn(EINVAL); - } - - /* - * If the server is going down then just return, - * don't try to mount any more file systems - */ - if ((int) amd_state >= (int) Finishing) { -#ifdef DEBUG - dlog("not found - server going down anyway"); -#endif /* DEBUG */ - XFREE(fname); - ereturn(ENOENT); - } - - /* - * If we get there then this is a reference to an, - * as yet, unknown name so we need to search the mount - * map for it. - */ - if (mp->am_pref) { - sprintf(path_name, "%s%s", mp->am_pref, fname); - pfname = path_name; - } else { - pfname = fname; - } - - mf = mp->am_mnt; - -#ifdef DEBUG - dlog("will search map info in %s to find %s", mf->mf_info, pfname); -#endif /* DEBUG */ - /* - * Consult the oracle for some mount information. - * info is malloc'ed and belongs to this routine. - * It ends up being free'd in free_continuation(). - * - * Note that this may return -1 indicating that information - * is not yet available. - */ - error = mapc_search((mnt_map *) mf->mf_private, pfname, &info); - if (error) { - if (error > 0) - plog(XLOG_MAP, "No map entry for %s", pfname); - else - plog(XLOG_MAP, "Waiting on map entry for %s", pfname); - XFREE(fname); - ereturn(error); - } -#ifdef DEBUG - dlog("mount info is %s", info); -#endif /* DEBUG */ - - /* - * Split info into an argument vector. - * The vector is malloc'ed and belongs to - * this routine. It is free'd in free_continuation() - */ - xivec = ivec = strsplit(info, ' ', '\"'); - - /* - * Default error code... - */ - if (ap_hung) - error = EWOULDBLOCK; - else - error = ENOENT; - - /* - * Allocate a new map - */ - new_mp = exported_ap_alloc(); - if (new_mp == 0) { - XFREE(xivec); - XFREE(info); - XFREE(fname); - ereturn(ENOSPC); - } - if (mf->mf_auto) - auto_opts = mf->mf_auto; - else - auto_opts = ""; - - auto_opts = strdup(auto_opts); - -#ifdef DEBUG - dlog("searching for /defaults entry"); -#endif /* DEBUG */ - if (mapc_search((mnt_map *) mf->mf_private, "/defaults", &dflts) == 0) { - char *dfl; - char **rvec; -#ifdef DEBUG - dlog("/defaults gave %s", dflts); -#endif /* DEBUG */ - if (*dflts == '-') - dfl = dflts + 1; - else - dfl = dflts; - - /* - * Chop the defaults up - */ - rvec = strsplit(dfl, ' ', '\"'); - - if (gopt.flags & CFM_SELECTORS_IN_DEFAULTS) { - /* - * Pick whichever first entry matched the list of selectors. - * Strip the selectors from the string, and assign to dfl the - * rest of the string. - */ - if (rvec) { - am_opts ap; - am_ops *pt; - char **sp = rvec; - while (*sp) { /* loop until you find something, if any */ - memset((char *) &ap, 0, sizeof(am_opts)); - pt = ops_match(&ap, *sp, "", mp->am_path, "/defaults", - mp->am_parent->am_mnt->mf_info); - free_opts(&ap); /* don't leak */ - if (pt == &amfs_error_ops) { - plog(XLOG_MAP, "did not match defaults for \"%s\"", *sp); - } else { - dfl = strip_selectors(*sp, "/defaults"); - plog(XLOG_MAP, "matched default selectors \"%s\"", dfl); - break; - } - ++sp; - } - } - } else { /* not selectors_in_defaults */ - /* - * Extract first value - */ - dfl = rvec[0]; - } - - /* - * If there were any values at all... - */ - if (dfl) { - /* - * Log error if there were other values - */ - if (!(gopt.flags & CFM_SELECTORS_IN_DEFAULTS) && rvec[1]) { -# ifdef DEBUG - dlog("/defaults chopped into %s", dfl); -# endif /* DEBUG */ - plog(XLOG_USER, "More than a single value for /defaults in %s", mf->mf_info); - } - - /* - * Prepend to existing defaults if they exist, - * otherwise just use these defaults. - */ - if (*auto_opts && *dfl) { - char *nopts = (char *) xmalloc(strlen(auto_opts) + strlen(dfl) + 2); - sprintf(nopts, "%s;%s", dfl, auto_opts); - XFREE(auto_opts); - auto_opts = nopts; - } else if (*dfl) { - auto_opts = strealloc(auto_opts, dfl); - } - } - XFREE(dflts); - /* - * Don't need info vector any more - */ - XFREE(rvec); - } - - /* - * Fill it in - */ - init_map(new_mp, fname); - - /* - * Turn on autofs flag if needed. - */ - if (mp->am_flags & AMF_AUTOFS) { - new_mp->am_flags |= AMF_AUTOFS; - } - - /* - * Put it in the table - */ - insert_am(new_mp, mp); - - /* - * Fill in some other fields, - * path and mount point. - * - * bugfix: do not prepend old am_path if direct map - * William Sebok - */ - - strcpy(apath, fname); - strcat(apath, " "); - new_mp->am_path = str3cat(new_mp->am_path, - mf->mf_ops == &amfs_direct_ops ? "" : mp->am_path, - *fname == '/' ? "" : "/", - apath); - -#ifdef DEBUG - dlog("setting path to \"%s\"", new_mp->am_path); -#endif /* DEBUG */ - - /* - * Take private copy of pfname - */ - pfname = strdup(pfname); - - /* - * Construct a continuation - */ - cp = ALLOC(struct continuation); - cp->callout = 0; - cp->mp = new_mp; - cp->xivec = xivec; - cp->ivec = ivec; - cp->info = info; - cp->key = pfname; - cp->auto_opts = auto_opts; - cp->retry = FALSE; - cp->tried = FALSE; - cp->start = clocktime(); - cp->def_opts = strdup(auto_opts); - memset((voidp) &cp->fs_opts, 0, sizeof(cp->fs_opts)); - - /* - * Try and mount the file system. If this succeeds immediately (possible - * for a ufs file system) then return the attributes, otherwise just - * return an error. - */ - error = autofs_bgmount(cp, error); - reschedule_timeout_mp(); - if (!error) { - XFREE(fname); - return new_mp; - } - - /* - * Code for quick reply. If nfs_program_2_transp is set, then - * its the transp that's been passed down from nfs_program_2(). - * If new_mp->am_transp is not already set, set it by copying in - * nfs_program_2_transp. Once am_transp is set, quick_reply() can - * use it to send a reply to the client that requested this mount. - */ - if (nfs_program_2_transp && !new_mp->am_transp) { - new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); - *(new_mp->am_transp) = *nfs_program_2_transp; - } - if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) - new_mp->am_error = error; - - assign_error_mntfs(new_mp); - - XFREE(fname); - - ereturn(error); -} -#endif /* HAVE_FS_AUTOFS */ diff --git a/amd/ops_cachefs.c b/amd/ops_cachefs.c index d3e303bc2bf..26a33352745 100644 --- a/amd/ops_cachefs.c +++ b/amd/ops_cachefs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -99,7 +95,7 @@ cachefs_match(am_opts *fo) dlog("CACHEFS: using cache directory \"%s\"", fo->opt_cachedir); /* determine magic cookie to put in mtab */ - return strdup(fo->opt_cachedir); + return xstrdup(fo->opt_cachedir); } @@ -114,7 +110,7 @@ cachefs_init(mntfs *mf) * Save cache directory name */ if (!mf->mf_private) { - mf->mf_private = (voidp) strdup(mf->mf_fo->opt_cachedir); + mf->mf_private = (voidp) xstrdup(mf->mf_fo->opt_cachedir); mf->mf_prfree = (void (*)(voidp)) free; } diff --git a/amd/ops_cdfs.c b/amd/ops_cdfs.c index 40355ac5c07..6ceb76408b0 100644 --- a/amd/ops_cdfs.c +++ b/amd/ops_cdfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -97,7 +93,7 @@ cdfs_match(am_opts *fo) /* * Determine magic cookie to put in mtab */ - return strdup(fo->opt_dev); + return xstrdup(fo->opt_dev); } @@ -148,6 +144,7 @@ mount_cdfs(char *mntdir, char *fs_name, char *opts, int on_autofs) if (amu_hasmntopt(&mnt, MNTTAB_OPT_RRIP)) cdfs_flags |= MNT2_CDFS_OPT_RRIP; #endif /* defined(MNT2_CDFS_OPT_RRIP) && defined(MNTTAB_OPT_RRIP) */ + #if defined(MNT2_CDFS_OPT_NORRIP) && defined(MNTTAB_OPT_NORRIP) if (amu_hasmntopt(&mnt, MNTTAB_OPT_NORRIP)) cdfs_flags |= MNT2_CDFS_OPT_NORRIP; @@ -157,11 +154,27 @@ mount_cdfs(char *mntdir, char *fs_name, char *opts, int on_autofs) if (amu_hasmntopt(&mnt, MNTTAB_OPT_GENS)) cdfs_flags |= MNT2_CDFS_OPT_GENS; #endif /* defined(MNT2_CDFS_OPT_GENS) && defined(MNTTAB_OPT_GENS) */ + #if defined(MNT2_CDFS_OPT_EXTATT) && defined(MNTTAB_OPT_EXTATT) if (amu_hasmntopt(&mnt, MNTTAB_OPT_EXTATT)) cdfs_flags |= MNT2_CDFS_OPT_EXTATT; #endif /* defined(MNT2_CDFS_OPT_EXTATT) && defined(MNTTAB_OPT_EXTATT) */ +#if defined(MNT2_CDFS_OPT_NOCASETRANS) && defined(MNTTAB_OPT_NOCASETRANS) + if (amu_hasmntopt(&mnt, MNTTAB_OPT_NOCASETRANS)) + cdfs_flags |= MNT2_CDFS_OPT_NOCASETRANS; +#endif /* defined(MNT2_CDFS_OPT_NOCASETRANS) && defined(MNTTAB_OPT_NOCASETRANS) */ + +#if defined(MNT2_CDFS_OPT_NOJOLIET) && defined(MNTTAB_OPT_NOJOLIET) + if (amu_hasmntopt(&mnt, MNTTAB_OPT_NOJOLIET)) + cdfs_flags |= MNT2_CDFS_OPT_NOJOLIET; +#endif /* defined(MNT2_CDFS_OPT_NOJOLIET) && defined(MNTTAB_OPT_NOJOLIET) */ + +#if defined(MNT2_CDFS_OPT_RRCASEINS) && defined(MNTTAB_OPT_RRCASEINS) + if (amu_hasmntopt(&mnt, MNTTAB_OPT_RRCASEINS)) + cdfs_flags |= MNT2_CDFS_OPT_RRCASEINS; +#endif /* defined(MNT2_CDFS_OPT_RRCASEINS) && defined(MNTTAB_OPT_RRCASEINS) */ + genflags = compute_mount_flags(&mnt); #ifdef HAVE_FS_AUTOFS if (on_autofs) diff --git a/amd/ops_efs.c b/amd/ops_efs.c index 047fe1e4690..58bf8f0b76c 100644 --- a/amd/ops_efs.c +++ b/amd/ops_efs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -98,7 +94,7 @@ efs_match(am_opts *fo) /* * Determine magic cookie to put in mtab */ - return strdup(fo->opt_dev); + return xstrdup(fo->opt_dev); } @@ -137,6 +133,9 @@ mount_efs(char *mntdir, char *fs_name, char *opts, int on_autofs) #ifdef HAVE_EFS_ARGS_T_FSPEC efs_args.fspec = fs_name; #endif /* HAVE_EFS_ARGS_T_FSPEC */ +#if defined(HAVE_EFS_ARGS_T_VERSION) && defined(EFS_MNT_VERSION) + efs_args.version = EFS_MNT_VERSION; +#endif /* HAVE_EFS_ARGS_T_VERSION && EFS_MNT_VERSION */ /* * Call generic mount routine diff --git a/amd/ops_ext.c b/amd/ops_ext.c new file mode 100644 index 00000000000..106ab31f374 --- /dev/null +++ b/amd/ops_ext.c @@ -0,0 +1,223 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/amd/ops_ext.c + * + */ + +/* + * Irix UN*X file system: EXT (Extended File System) + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* forward declarations */ +static char *ext_match(am_opts *fo); +static int ext2_mount(am_node *am, mntfs *mf); +static int ext3_mount(am_node *am, mntfs *mf); +static int ext4_mount(am_node *am, mntfs *mf); +static int ext_umount(am_node *am, mntfs *mf); + +/* + * Ops structure + */ +am_ops ext2_ops = +{ + "ext2", + ext_match, + 0, /* ext_init */ + ext2_mount, + ext_umount, + amfs_error_lookup_child, + amfs_error_mount_child, + amfs_error_readdir, + 0, /* ext_readlink */ + 0, /* ext_mounted */ + 0, /* ext_umounted */ + amfs_generic_find_srvr, + 0, /* ext_get_wchan */ + FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */ +#ifdef HAVE_FS_AUTOFS + AUTOFS_EXT_FS_FLAGS, +#endif /* HAVE_FS_AUTOFS */ +}; + +am_ops ext3_ops = +{ + "ext3", + ext_match, + 0, /* ext_init */ + ext3_mount, + ext_umount, + amfs_error_lookup_child, + amfs_error_mount_child, + amfs_error_readdir, + 0, /* ext_readlink */ + 0, /* ext_mounted */ + 0, /* ext_umounted */ + amfs_generic_find_srvr, + 0, /* ext_get_wchan */ + FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */ +#ifdef HAVE_FS_AUTOFS + AUTOFS_EXT_FS_FLAGS, +#endif /* HAVE_FS_AUTOFS */ +}; + +am_ops ext4_ops = +{ + "ext4", + ext_match, + 0, /* ext_init */ + ext4_mount, + ext_umount, + amfs_error_lookup_child, + amfs_error_mount_child, + amfs_error_readdir, + 0, /* ext_readlink */ + 0, /* ext_mounted */ + 0, /* ext_umounted */ + amfs_generic_find_srvr, + 0, /* ext_get_wchan */ + FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */ +#ifdef HAVE_FS_AUTOFS + AUTOFS_EXT_FS_FLAGS, +#endif /* HAVE_FS_AUTOFS */ +}; + +/* + * EXT needs local filesystem and device. + */ +static char * +ext_match(am_opts *fo) +{ + + if (!fo->opt_dev) { + plog(XLOG_USER, "ext: no device specified"); + return 0; + } + + dlog("EXT: mounting device \"%s\" on \"%s\"", fo->opt_dev, fo->opt_fs); + + /* + * Determine magic cookie to put in mtab + */ + return xstrdup(fo->opt_dev); +} + + +static int +mount_ext(char *mntdir, char *fs_name, char *opts, int on_autofs, char * + mount_type, const char *mnttab_type) +{ + ext_args_t ext_args; + mntent_t mnt; + int flags; + + /* + * Figure out the name of the file system type. + */ + MTYPE_TYPE type = mount_type; + + memset((voidp) &ext_args, 0, sizeof(ext_args)); /* Paranoid */ + + /* + * Fill in the mount structure + */ + memset((voidp) &mnt, 0, sizeof(mnt)); + mnt.mnt_dir = mntdir; + mnt.mnt_fsname = fs_name; + mnt.mnt_type = mnttab_type; + mnt.mnt_opts = opts; + + flags = compute_mount_flags(&mnt); +#ifdef HAVE_FS_AUTOFS + if (on_autofs) + flags |= autofs_compute_mount_flags(&mnt); +#endif /* HAVE_FS_AUTOFS */ + + /* + * Call generic mount routine + */ + return mount_fs(&mnt, flags, (caddr_t) &ext_args, 0, type, 0, NULL, mnttab_file_name, on_autofs); +} + + +static int +ext_mount(am_node *am, mntfs *mf, char *mount_type, + const char *mnttab_type) +{ + int on_autofs = mf->mf_flags & MFF_ON_AUTOFS; + int error; + + error = mount_ext(mf->mf_mount, mf->mf_info, mf->mf_mopts, on_autofs, + mount_type, mnttab_type); + if (error) { + errno = error; + plog(XLOG_ERROR, "mount_ext: %m"); + return error; + } + + return 0; +} + +static int +ext2_mount(am_node *am, mntfs *mf) +{ + return ext_mount(am, mf, MOUNT_TYPE_EXT2, MNTTAB_TYPE_EXT2); +} + +static int +ext3_mount(am_node *am, mntfs *mf) +{ + return ext_mount(am, mf, MOUNT_TYPE_EXT3, MNTTAB_TYPE_EXT3); +} + +static int +ext4_mount(am_node *am, mntfs *mf) +{ + return ext_mount(am, mf, MOUNT_TYPE_EXT4, MNTTAB_TYPE_EXT4); +} + +static int +ext_umount(am_node *am, mntfs *mf) +{ + int unmount_flags = (mf->mf_flags & MFF_ON_AUTOFS) ? AMU_UMOUNT_AUTOFS : 0; + + return UMOUNT_FS(mf->mf_mount, mnttab_file_name, unmount_flags); +} diff --git a/amd/ops_lofs.c b/amd/ops_lofs.c index 26fdc9f9b62..b04f64399c1 100644 --- a/amd/ops_lofs.c +++ b/amd/ops_lofs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -97,7 +93,7 @@ lofs_match(am_opts *fo) /* * Determine magic cookie to put in mtab */ - return strdup(fo->opt_rfs); + return xstrdup(fo->opt_rfs); } diff --git a/amd/ops_lustre.c b/amd/ops_lustre.c new file mode 100644 index 00000000000..1b321ce4e8c --- /dev/null +++ b/amd/ops_lustre.c @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2011 Christos Zoulas + * 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 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. + * + * + * File: am-utils/amd/ops_lustre.c + * + */ + +/* + * Lustre file system + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#ifdef HAVE_FS_LUSTRE +#include +#include + +/* forward declarations */ +static char *lustre_match(am_opts *fo); +static int lustre_mount(am_node *am, mntfs *mf); +static int lustre_umount(am_node *am, mntfs *mf); + +/* + * Ops structure + */ +am_ops lustre_ops = +{ + "lustre", + lustre_match, + 0, /* lustre_init */ + lustre_mount, + lustre_umount, + amfs_error_lookup_child, + amfs_error_mount_child, + amfs_error_readdir, + 0, /* lustre_readlink */ + 0, /* lustre_mounted */ + 0, /* lustre_umounted */ + amfs_generic_find_srvr, + 0, /* lustre_get_wchan */ + FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */ +#ifdef HAVE_FS_AUTOFS + AUTOFS_LUSTRE_FS_FLAGS, +#endif /* HAVE_FS_AUTOFS */ +}; + + +/* + * Lustre needs remote filesystem and host. + */ +static char * +lustre_match(am_opts *fo) +{ + char *xmtab, *cp; + size_t l; + char *rhost, *ptr, *remhost; + struct in_addr addr; + + if (fo->opt_fs && !fo->opt_rfs) + fo->opt_rfs = fo->opt_fs; + if (!fo->opt_rfs) { + plog(XLOG_USER, "lustre: no remote filesystem specified"); + return NULL; + } + if (!fo->opt_rhost) { + plog(XLOG_USER, "lustre: no remote host specified"); + return NULL; + } + + /* + * Determine magic cookie to put in mtab + */ + rhost = xstrdup(fo->opt_rhost); + remhost = NULL; + for (ptr = strtok(rhost, ":"); ptr; ptr = strtok(NULL, ":")) { + char *at = strchr(ptr, '@'); + if (at == NULL) { + plog(XLOG_USER, "lustre: missing protocol in host `%s'", ptr); + XFREE(rhost); + return NULL; + } + *at = '\0'; + /* + * Convert symbolic addresses to numbers that the kernel likes + */ + if (inet_aton(ptr, &addr) == 0) { + struct hostent *hp; + if ((hp = gethostbyname(ptr)) == NULL) { + plog(XLOG_USER, "lustre: unknown host `%s'", ptr); + XFREE(rhost); + return NULL; + } + if (hp->h_length != sizeof(addr.s_addr)) { + plog(XLOG_USER, "lustre: bad address length %zu != %d for %s", + sizeof(addr), hp->h_length, ptr); + XFREE(rhost); + return NULL; + } + memcpy(&addr.s_addr, hp->h_addr, sizeof(addr)); + } + *at = '@'; + + cp = remhost; + if (remhost) + remhost = strvcat(cp, ":", inet_ntoa(addr), at, NULL); + else + remhost = strvcat(inet_ntoa(addr), at, NULL); + XFREE(cp); + } + if (remhost == NULL) { + plog(XLOG_USER, "lustre: empty host"); + XFREE(rhost); + return NULL; + } + + XFREE(rhost); + XFREE(fo->opt_rhost); + fo->opt_rhost = remhost; + + l = strlen(fo->opt_rhost) + strlen(fo->opt_rfs) + 2; + xmtab = xmalloc(l); + xsnprintf(xmtab, l, "%s:%s", fo->opt_rhost, fo->opt_rfs); + dlog("lustre: mounting remote server \"%s\", remote fs \"%s\" on \"%s\"", + fo->opt_rhost, fo->opt_rfs, fo->opt_fs); + + + return xmtab; +} + +static int +lustre_mount(am_node *am, mntfs *mf) +{ + mntent_t mnt; + int genflags, error; + int on_autofs = mf->mf_flags & MFF_ON_AUTOFS; + + /* + * Figure out the name of the file system type. + */ + MTYPE_TYPE type = MOUNT_TYPE_LUSTRE; + + /* + * Fill in the mount structure + */ + memset(&mnt, 0, sizeof(mnt)); + mnt.mnt_dir = mf->mf_mount; + mnt.mnt_fsname = mf->mf_info; + mnt.mnt_type = MNTTAB_TYPE_LUSTRE; + mnt.mnt_opts = mf->mf_mopts; + + genflags = compute_mount_flags(&mnt); +#ifdef HAVE_FS_AUTOFS + if (on_autofs) + genflags |= autofs_compute_mount_flags(&mnt); +#endif /* HAVE_FS_AUTOFS */ + + /* + * Call generic mount routine + */ + error = mount_fs(&mnt, genflags, NULL, 0, type, 0, + NULL, mnttab_file_name, on_autofs); + if (error) { + errno = error; + plog(XLOG_ERROR, "mount_lustre: %m"); + return error; + } + + return 0; +} + + +static int +lustre_umount(am_node *am, mntfs *mf) +{ + int unmount_flags = (mf->mf_flags & MFF_ON_AUTOFS) ? AMU_UMOUNT_AUTOFS : 0; + + return UMOUNT_FS(mf->mf_mount, mnttab_file_name, unmount_flags); +} +#endif diff --git a/amd/ops_mfs.c b/amd/ops_mfs.c index ccaa49c569c..822a2659317 100644 --- a/amd/ops_mfs.c +++ b/amd/ops_mfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/amd/ops_nfs.c b/amd/ops_nfs.c index a6a85858d48..2dbfa5b5e2e 100644 --- a/amd/ops_nfs.c +++ b/amd/ops_nfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -113,6 +109,13 @@ static int call_mountd(fh_cache *fp, u_long proc, fwd_fun f, wchan_t wchan); static int webnfs_lookup(fh_cache *fp, fwd_fun f, wchan_t wchan); static int fh_id = 0; +/* + * clamp the filehandle version to 3, so that we can fail back to nfsv3 + * since nfsv4 does not have file handles + */ +#define SET_FH_VERSION(fs) \ + (fs)->fs_version > NFS_VERSION3 ? NFS_VERSION3 : (fs)->fs_version; + /* globals */ AUTH *nfs_auth; qelem fh_head = {&fh_head, &fh_head}; @@ -145,7 +148,7 @@ am_ops nfs_ops = static fh_cache * find_nfs_fhandle_cache(opaque_t arg, int done) { - fh_cache *fp, *fp2 = 0; + fh_cache *fp, *fp2 = NULL; int id = (long) arg; /* for 64-bit archs */ ITER(fp, fh_cache, &fh_head) { @@ -201,6 +204,10 @@ got_nfs_fh_mount(voidp pkt, int len, struct sockaddr_in *sa, struct sockaddr_in memmove(fp->fh_nfs_handle.v3.am_fh3_data, res3.mountres3_u.mountinfo.fhandle.fhandle3_val, fp->fh_nfs_handle.v3.am_fh3_length); + + XFREE(res3.mountres3_u.mountinfo.fhandle.fhandle3_val); + if (res3.mountres3_u.mountinfo.auth_flavors.auth_flavors_val) + XFREE(res3.mountres3_u.mountinfo.auth_flavors.auth_flavors_val); } else { #endif /* HAVE_FS_NFS3 */ memset(&res, 0, sizeof(res)); @@ -326,8 +333,7 @@ discard_fh(opaque_t arg) dlog("Discarding filehandle for %s:%s", fp->fh_fs->fs_host, fp->fh_path); free_srvr(fp->fh_fs); } - if (fp->fh_path) - XFREE(fp->fh_path); + XFREE(fp->fh_path); XFREE(fp); } @@ -338,7 +344,7 @@ discard_fh(opaque_t arg) static int prime_nfs_fhandle_cache(char *path, fserver *fs, am_nfs_handle_t *fhbuf, mntfs *mf) { - fh_cache *fp, *fp_save = 0; + fh_cache *fp, *fp_save = NULL; int error; int reuse_id = FALSE; @@ -466,11 +472,11 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, am_nfs_handle_t *fhbuf, mntfs * fp->fh_sin = *fs->fs_ip; if (!(mf->mf_flags & MFF_WEBNFS)) fp->fh_sin.sin_port = 0; - fp->fh_nfs_version = fs->fs_version; + fp->fh_nfs_version = SET_FH_VERSION(fs); } fp->fh_fs = dup_srvr(fs); - fp->fh_path = strdup(path); + fp->fh_path = xstrdup(path); if (mf->mf_flags & MFF_WEBNFS) error = webnfs_lookup(fp, got_nfs_fh_webnfs, get_mntfs_wchan(mf)); @@ -544,7 +550,9 @@ call_mountd(fh_cache *fp, u_long proc, fwd_fun fun, wchan_t wchan) if (error) return error; fp->fh_sin.sin_port = mountd_port; - } + dlog("%s: New %d mountd port", __func__, fp->fh_sin.sin_port); + } else + dlog("%s: Already had %d mountd port", __func__, fp->fh_sin.sin_port); /* find the right version of the mount protocol */ #ifdef HAVE_FS_NFS3 @@ -605,7 +613,7 @@ webnfs_lookup(fh_cache *fp, fwd_fun fun, wchan_t wchan) nfsdiropargs args; #ifdef HAVE_FS_NFS3 am_LOOKUP3args args3; -#endif +#endif /* HAVE_FS_NFS3 */ char *wnfs_path; size_t l; @@ -724,6 +732,17 @@ nfs_init(mntfs *mf) am_nfs_handle_t fhs; char *colon; +#ifdef NO_FALLBACK + /* + * We don't need file handles for NFS version 4, but we can fall back to + * version 3, so we allocate anyway + */ +#ifdef HAVE_FS_NFS4 + if (mf->mf_server->fs_version == NFS_VERSION4) + return 0; +#endif /* HAVE_FS_NFS4 */ +#endif /* NO_FALLBACK */ + if (mf->mf_private) { if (mf->mf_flags & MFF_NFS_SCALEDOWN) { fserver *fs; @@ -732,6 +751,9 @@ nfs_init(mntfs *mf) mf->mf_ops->umounted(mf); mf->mf_prfree(mf->mf_private); + mf->mf_private = NULL; + mf->mf_prfree = NULL; + fs = mf->mf_ops->ffserver(mf); free_srvr(mf->mf_server); mf->mf_server = fs; @@ -769,7 +791,11 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *mntdir, char *fs_name, mntfs *mf) int retry; int proto = AMU_TYPE_NONE; mntent_t mnt; + void *argsp; nfs_args_t nfs_args; +#ifdef HAVE_FS_NFS4 + nfs4_args_t nfs4_args; +#endif /* HAVE_FS_NFS4 */ /* * Extract HOST name to give to kernel. @@ -829,10 +855,7 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *mntdir, char *fs_name, mntfs *mf) /* * Set mount types accordingly */ -#ifndef HAVE_FS_NFS3 - type = MOUNT_TYPE_NFS; - mnt.mnt_type = MNTTAB_TYPE_NFS; -#else /* HAVE_FS_NFS3 */ +#ifdef HAVE_FS_NFS3 if (nfs_version == NFS_VERSION3) { type = MOUNT_TYPE_NFS3; /* @@ -843,16 +866,25 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *mntdir, char *fs_name, mntfs *mf) * So on those systems, set it to "nfs". * Note: MNTTAB_OPT_VERS is always set for NFS3 (see am_compat.h). */ + argsp = &nfs_args; # if defined(MNTTAB_OPT_VERS) && defined(MOUNT_TABLE_ON_FILE) mnt.mnt_type = MNTTAB_TYPE_NFS; # else /* defined(MNTTAB_OPT_VERS) && defined(MOUNT_TABLE_ON_FILE) */ mnt.mnt_type = MNTTAB_TYPE_NFS3; # endif /* defined(MNTTAB_OPT_VERS) && defined(MOUNT_TABLE_ON_FILE) */ - } else { +# ifdef HAVE_FS_NFS4 + } else if (nfs_version == NFS_VERSION4) { + argsp = &nfs4_args; + type = MOUNT_TYPE_NFS4; + mnt.mnt_type = MNTTAB_TYPE_NFS4; +# endif /* HAVE_FS_NFS4 */ + } else +#endif /* HAVE_FS_NFS3 */ + { + argsp = &nfs_args; type = MOUNT_TYPE_NFS; mnt.mnt_type = MNTTAB_TYPE_NFS; } -#endif /* HAVE_FS_NFS3 */ plog(XLOG_INFO, "mount_nfs_fh: NFS version %d", (int) nfs_version); plog(XLOG_INFO, "mount_nfs_fh: using NFS transport %s", nfs_proto); @@ -866,32 +898,44 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char *mntdir, char *fs_name, mntfs *mf) genflags |= autofs_compute_mount_flags(&mnt); #endif /* HAVE_FS_AUTOFS */ - /* setup the many fields and flags within nfs_args */ - compute_nfs_args(&nfs_args, - &mnt, - genflags, - NULL, /* struct netconfig *nfsncp */ - fs->fs_ip, - nfs_version, - nfs_proto, - fhp, - host, - fs_name); + /* setup the many fields and flags within nfs_args */ + compute_nfs_args(argsp, + &mnt, + genflags, + NULL, /* struct netconfig *nfsncp */ + fs->fs_ip, + nfs_version, + nfs_proto, + fhp, + host, + fs_name); /* finally call the mounting function */ if (amuDebug(D_TRACE)) { - print_nfs_args(&nfs_args, nfs_version); + print_nfs_args(argsp, nfs_version); plog(XLOG_DEBUG, "Generic mount flags 0x%x used for NFS mount", genflags); } - error = mount_fs(&mnt, genflags, (caddr_t) &nfs_args, retry, type, - nfs_version, nfs_proto, mnttab_file_name, on_autofs); - XFREE(xopts); + error = mount_fs(&mnt, genflags, argsp, retry, type, + nfs_version, nfs_proto, mnttab_file_name, on_autofs); + XFREE(mnt.mnt_opts); + discard_nfs_args(argsp, nfs_version); -#ifdef HAVE_TRANSPORT_TYPE_TLI - free_knetconfig(nfs_args.knconf); - if (nfs_args.addr) - XFREE(nfs_args.addr); /* allocated in compute_nfs_args() */ -#endif /* HAVE_TRANSPORT_TYPE_TLI */ +#ifdef HAVE_FS_NFS4 +# ifndef NO_FALLBACK + /* + * If we are using a v4 file handle, we try a v3 if we get back: + * ENOENT: NFS v4 has a different export list than v3 + * EPERM: Kernels <= 2.6.18 return that, instead of ENOENT + */ + if ((error == ENOENT || error == EPERM) && nfs_version == NFS_VERSION4) { + plog(XLOG_DEBUG, "Could not find NFS 4 mount, trying again with NFS 3"); + fs->fs_version = NFS_VERSION3; + error = mount_nfs_fh(fhp, mntdir, fs_name, mf); + if (error) + fs->fs_version = NFS_VERSION4; + } +# endif /* NO_FALLBACK */ +#endif /* HAVE_FS_NFS4 */ return error; } @@ -903,11 +947,16 @@ nfs_mount(am_node *am, mntfs *mf) int error = 0; mntent_t mnt; - if (!mf->mf_private) { + if (!mf->mf_private && mf->mf_server->fs_version != 4) { plog(XLOG_ERROR, "Missing filehandle for %s", mf->mf_info); return EINVAL; } + if (mf->mf_mopts == NULL) { + plog(XLOG_ERROR, "Missing mount options for %s", mf->mf_info); + return EINVAL; + } + mnt.mnt_opts = mf->mf_mopts; if (amu_hasmntopt(&mnt, "softlookup") || (amu_hasmntopt(&mnt, "soft") && !amu_hasmntopt(&mnt, "nosoftlookup"))) @@ -932,6 +981,7 @@ nfs_umount(am_node *am, mntfs *mf) { int unmount_flags, new_unmount_flags, error; + dlog("attempting nfs umount"); unmount_flags = (mf->mf_flags & MFF_ON_AUTOFS) ? AMU_UMOUNT_AUTOFS : 0; error = UMOUNT_FS(mf->mf_mount, mnttab_file_name, unmount_flags); @@ -1031,12 +1081,12 @@ nfs_umounted(mntfs *mf) f.fh_path = path; f.fh_sin = *fs->fs_ip; f.fh_sin.sin_port = (u_short) 0; - f.fh_nfs_version = fs->fs_version; + f.fh_nfs_version = SET_FH_VERSION(fs); f.fh_fs = fs; f.fh_id = 0; f.fh_error = 0; - prime_nfs_fhandle_cache(colon + 1, mf->mf_server, (am_nfs_handle_t *) 0, mf); - call_mountd(&f, MOUNTPROC_UMNT, (fwd_fun *) 0, (wchan_t) 0); + prime_nfs_fhandle_cache(colon + 1, mf->mf_server, (am_nfs_handle_t *) NULL, mf); + call_mountd(&f, MOUNTPROC_UMNT, (fwd_fun *) NULL, (wchan_t) NULL); *colon = ':'; } } diff --git a/amd/ops_nfs3.c b/amd/ops_nfs3.c index db3c7f9d265..e07811b808e 100644 --- a/amd/ops_nfs3.c +++ b/amd/ops_nfs3.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/amd/ops_nfs4.c b/amd/ops_nfs4.c new file mode 100644 index 00000000000..3798590837f --- /dev/null +++ b/amd/ops_nfs4.c @@ -0,0 +1,50 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/amd/ops_nfs4.c + * + */ + +/* + * Network file system version 4.0 + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* FEEL FREE TO IMPLEMENT THIS... :-) */ diff --git a/amd/ops_nullfs.c b/amd/ops_nullfs.c index cf621ec33ff..73d1f0e53f1 100644 --- a/amd/ops_nullfs.c +++ b/amd/ops_nullfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/amd/ops_pcfs.c b/amd/ops_pcfs.c index 527dc926ca7..b4c8dcd5fec 100644 --- a/amd/ops_pcfs.c +++ b/amd/ops_pcfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -97,7 +93,7 @@ pcfs_match(am_opts *fo) /* * Determine magic cookie to put in mtab */ - return strdup(fo->opt_dev); + return xstrdup(fo->opt_dev); } diff --git a/amd/ops_tfs.c b/amd/ops_tfs.c index 142c3202293..3276a6e62ff 100644 --- a/amd/ops_tfs.c +++ b/amd/ops_tfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/amd/ops_tmpfs.c b/amd/ops_tmpfs.c index eddd75569e9..d9a15ea0434 100644 --- a/amd/ops_tmpfs.c +++ b/amd/ops_tmpfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -51,4 +47,146 @@ #include #include -/* FEEL FREE TO IMPLEMENT THIS... :-) */ +/* forward declarations */ +static char *tmpfs_match(am_opts *fo); +static int tmpfs_mount(am_node *am, mntfs *mf); +static int tmpfs_umount(am_node *am, mntfs *mf); + +/* + * Ops structure + */ +am_ops tmpfs_ops = +{ + "tmpfs", + tmpfs_match, + 0, /* tmpfs_init */ + tmpfs_mount, + tmpfs_umount, + amfs_error_lookup_child, + amfs_error_mount_child, + amfs_error_readdir, + 0, /* tmpfs_readlink */ + 0, /* tmpfs_mounted */ + 0, /* tmpfs_umounted */ + amfs_generic_find_srvr, + 0, /* tmpfs_get_wchan */ + FS_MKMNT | FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */ +#if defined(HAVE_FS_AUTOFS) && defined(AUTOFS_TMPFS_FS_FLAGS) + AUTOFS_TMPFS_FS_FLAGS, +#endif /* HAVE_FS_AUTOFS */ +}; + + +/* + * EFS needs local filesystem and device. + */ +static char * +tmpfs_match(am_opts *fo) +{ + + if (!fo->opt_dev) { + plog(XLOG_USER, "tmpfs: no device specified"); + return 0; + } + + dlog("EFS: mounting device \"%s\" on \"%s\"", fo->opt_dev, fo->opt_fs); + + /* + * Determine magic cookie to put in mtab + */ + return xstrdup(fo->opt_dev); +} + + +static int +mount_tmpfs(char *mntdir, char *fs_name, char *opts, int on_autofs) +{ + tmpfs_args_t tmpfs_args; + mntent_t mnt; + int flags; + const char *p; + + /* + * Figure out the name of the file system type. + */ + MTYPE_TYPE type = MOUNT_TYPE_TMPFS; + + p = NULL; + memset((voidp) &tmpfs_args, 0, sizeof(tmpfs_args)); /* Paranoid */ + + /* + * Fill in the mount structure + */ + memset((voidp) &mnt, 0, sizeof(mnt)); + mnt.mnt_dir = mntdir; + mnt.mnt_fsname = fs_name; + mnt.mnt_type = MNTTAB_TYPE_TMPFS; + mnt.mnt_opts = opts; + + flags = compute_mount_flags(&mnt); +#ifdef HAVE_FS_AUTOFS + if (on_autofs) + flags |= autofs_compute_mount_flags(&mnt); +#endif /* HAVE_FS_AUTOFS */ + +#if defined(HAVE_TMPFS_ARGS_T_TA_VERSION) && defined(TMPFS_ARGS_VERSION) + tmpfs_args.ta_version = TMPFS_ARGS_VERSION; +#endif /* HAVE_TMPFS_ARGS_T_TA_VERSION && TMPFS_ARGS_VERSION */ +#ifdef HAVE_TMPFS_ARGS_T_TA_NODES_MAX + if ((p = amu_hasmntopt(&mnt, "nodes")) == NULL) + p = "1000000"; + tmpfs_args.ta_nodes_max = atoi(p); +#endif /* HAVE_TMPFS_ARGS_T_TA_SIZE_MAX */ +#ifdef HAVE_TMPFS_ARGS_T_TA_SIZE_MAX + if ((p = amu_hasmntopt(&mnt, "size")) == NULL) + p = "10000000"; + tmpfs_args.ta_size_max = atoi(p); +#endif /* HAVE_TMPFS_ARGS_T_TA_SIZE_MAX */ +#ifdef HAVE_TMPFS_ARGS_T_TA_ROOT_UID + if ((p = amu_hasmntopt(&mnt, "uid")) == NULL) + p = "0"; + tmpfs_args.ta_root_uid = atoi(p); +#endif /* HAVE_TMPFS_ARGS_T_TA_ROOT_UID */ +#ifdef HAVE_TMPFS_ARGS_T_TA_ROOT_GID + if ((p = amu_hasmntopt(&mnt, "gid")) == NULL) + p = "0"; + tmpfs_args.ta_root_gid = atoi(p); +#endif /* HAVE_TMPFS_ARGS_T_TA_ROOT_GID */ +#ifdef HAVE_TMPFS_ARGS_T_TA_ROOT_MODE + if ((p = amu_hasmntopt(&mnt, "mode")) == NULL) + p = "01777"; + tmpfs_args.ta_root_mode = strtol(p, NULL, 8); +#endif /* HAVE_TMPFS_ARGS_T_TA_ROOT_MODE */ + + /* + * Call generic mount routine + */ + return mount_fs(&mnt, flags, (caddr_t) &tmpfs_args, 0, type, 0, NULL, mnttab_file_name, on_autofs); +} + + +static int +tmpfs_mount(am_node *am, mntfs *mf) +{ + int on_autofs = mf->mf_flags & MFF_ON_AUTOFS; + int error; + + error = mount_tmpfs(mf->mf_mount, mf->mf_info, mf->mf_mopts, on_autofs); + if (error) { + errno = error; + plog(XLOG_ERROR, "mount_tmpfs: %m"); + return error; + } + + return 0; +} + + +static int +tmpfs_umount(am_node *am, mntfs *mf) +{ + int unmount_flags = (mf->mf_flags & MFF_ON_AUTOFS) ? AMU_UMOUNT_AUTOFS : 0; + + return UMOUNT_FS(mf->mf_mount, mnttab_file_name, unmount_flags); +} + diff --git a/amd/ops_udf.c b/amd/ops_udf.c new file mode 100644 index 00000000000..b029365c68f --- /dev/null +++ b/amd/ops_udf.c @@ -0,0 +1,272 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/amd/ops_udf.c + * + */ + +/* + * UDF file system + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* forward definitions */ +static char *udf_match(am_opts *fo); +static int udf_mount(am_node *am, mntfs *mf); +static int udf_umount(am_node *am, mntfs *mf); + +/* + * Ops structure + */ +am_ops udf_ops = +{ + "udf", + udf_match, + 0, /* udf_init */ + udf_mount, + udf_umount, + amfs_error_lookup_child, + amfs_error_mount_child, + amfs_error_readdir, + 0, /* udf_readlink */ + 0, /* udf_mounted */ + 0, /* udf_umounted */ + amfs_generic_find_srvr, + 0, /* udf_get_wchan */ + FS_MKMNT | FS_UBACKGROUND | FS_AMQINFO, /* nfs_fs_flags */ +#ifdef HAVE_FS_AUTOFS + AUTOFS_UDF_FS_FLAGS, +#endif /* HAVE_FS_AUTOFS */ +}; + +#if defined(HAVE_UDF_ARGS_T_NOBODY_GID) || defined(HAVE_UDF_ARGS_T_NOBODY_UID) +static int +a_num(const char *s, const char *id_type) +{ + int id; + char *ep; + + id = strtol(s, &ep, 0); + if (*ep || s == ep || id < 0) { + plog(XLOG_ERROR, "mount_udf: unknown %s: %s", id_type, s); + return 0; + } + return id; +} +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_GID) || defined(HAVE_UDF_ARGS_T_NOBODY_UID) */ + +#if defined(HAVE_UDF_ARGS_T_NOBODY_GID) +static gid_t +a_gid(const char *s, const char *id_type) +{ + struct group *gr; + + if ((gr = getgrnam(s)) != NULL) + return gr->gr_gid; + return a_num(s, id_type); +} +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_GID) */ + +#if defined(HAVE_UDF_ARGS_T_NOBODY_UID) +static uid_t +a_uid(const char *s, const char *id_type) +{ + struct passwd *pw; + + if ((pw = getpwnam(s)) != NULL) + return pw->pw_uid; + return a_num(s, id_type); +} +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_UID) */ + +/* + * UDF needs remote filesystem. + */ +static char * +udf_match(am_opts *fo) +{ + + if (!fo->opt_dev) { + plog(XLOG_USER, "udf: no source device specified"); + return 0; + } + dlog("UDF: mounting device \"%s\" on \"%s\"", fo->opt_dev, fo->opt_fs); + + /* + * Determine magic cookie to put in mtab + */ + return xstrdup(fo->opt_dev); +} + +static int +mount_udf(char *mntdir, char *fs_name, char *opts, int on_autofs) +{ + udf_args_t udf_args; + mntent_t mnt; + int flags; + char *str; +#if defined(HAVE_UDF_ARGS_T_NOBODY_UID) || defined(HAVE_UDF_ARGS_T_ANON_UID) + uid_t uid_nobody; + gid_t gid_nobody; +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_UID) || defined(HAVE_UDF_ARGS_T_ANON_UID) */ + /* + * Figure out the name of the file system type. + */ + MTYPE_TYPE type = MOUNT_TYPE_UDF; + +#if defined(HAVE_UDF_ARGS_T_NOBODY_UID) || defined(HAVE_UDF_ARGS_T_ANON_UID) + uid_nobody = a_uid("nobody", "user"); + if (uid_nobody == 0) { + plog(XLOG_ERROR, "mount_udf: invalid uid for nobody"); + return EPERM; + } +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_UID) || defined(HAVE_UDF_ARGS_T_ANON_UID) */ + +#if defined(HAVE_UDF_ARGS_T_NOBODY_GID) || defined(HAVE_UDF_ARGS_T_ANON_GID) + gid_nobody = a_gid("nobody", "group"); + if (gid_nobody == 0) { + plog(XLOG_ERROR, "mount_udf: invalid gid for nobody"); + return EPERM; + } +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_GID) || defined(HAVE_UDF_ARGS_T_ANON_GID) */ + + str = NULL; + memset((voidp) &udf_args, 0, sizeof(udf_args)); /* Paranoid */ + + /* + * Fill in the mount structure + */ + memset((voidp)&mnt, 0, sizeof(mnt)); + mnt.mnt_dir = mntdir; + mnt.mnt_fsname = fs_name; + mnt.mnt_type = MNTTAB_TYPE_UDF; + mnt.mnt_opts = opts; + + flags = compute_mount_flags(&mnt); + +#ifdef HAVE_UDF_ARGS_T_UDFMFLAGS +# if defined(MNT2_UDF_OPT_CLOSESESSION) && defined(MNTTAB_OPT_CLOSESESSION) + if (amu_hasmntopt(&mnt, MNTTAB_OPT_CLOSESESSION)) + udf_args.udfmflags |= MNT2_UDF_OPT_CLOSESESSION; +# endif /* defined(MNT2_UDF_OPT_CLOSESESSION) && defined(MNTTAB_OPT_CLOSESESSION) */ +#endif /* HAVE_UDF_ARGS_T_UDFMFLAGS */ + +#ifdef HAVE_UDF_ARGS_T_NOBODY_UID + udf_args.nobody_uid = uid_nobody; +#endif /* HAVE_UDF_ARGS_T_NOBODY_UID */ + +#ifdef HAVE_UDF_ARGS_T_NOBODY_GID + udf_args.nobody_gid = gid_nobody; +#endif /* HAVE_UDF_ARGS_T_NOBODY_GID */ + +#ifdef HAVE_UDF_ARGS_T_ANON_UID + udf_args.anon_uid = uid_nobody; /* default to nobody */ + if ((str = hasmntstr(&mnt, MNTTAB_OPT_USER)) != NULL) { + udf_args.anon_uid = a_uid(str, MNTTAB_OPT_USER); + XFREE(str); + } +#endif /* HAVE_UDF_ARGS_T_ANON_UID */ + +#ifdef HAVE_UDF_ARGS_T_ANON_GID + udf_args.anon_gid = gid_nobody; /* default to nobody */ + if ((str = hasmntstr(&mnt, MNTTAB_OPT_GROUP)) != NULL) { + udf_args.anon_gid = a_gid(str, MNTTAB_OPT_GROUP); + XFREE(str); + } +#endif /* HAVE_UDF_ARGS_T_ANON_GID */ + +#ifdef HAVE_UDF_ARGS_T_GMTOFF + udf_args.gmtoff = 0; + if ((str = hasmntstr(&mnt, MNTTAB_OPT_GMTOFF)) != NULL) { + udf_args.gmtoff = a_num(str, MNTTAB_OPT_GMTOFF); + XFREE(str); + } +#endif /* HAVE_UDF_ARGS_T_GMTOFF */ + +#ifdef HAVE_UDF_ARGS_T_SESSIONNR + udf_args.sessionnr = 0; + if ((str = hasmntstr(&mnt, MNTTAB_OPT_SESSIONNR)) != NULL) { + udf_args.sessionnr = a_num(str, MNTTAB_OPT_SESSIONNR); + XFREE(str); + } +#endif /* HAVE_UDF_ARGS_T_SESSIONNR */ + +#ifdef HAVE_UDF_ARGS_T_VERSION +# ifdef UDFMNT_VERSION + udf_args.version = UDFMNT_VERSION; +# endif /* UDFMNT_VERSION */ +#endif /* HAVE_UDF_ARGS_T_VERSION */ + +#ifdef HAVE_UFS_ARGS_T_FSPEC + udf_args.fspec = fs_name; +#endif /* HAVE_UFS_ARGS_T_FSPEC */ + + /* + * Call generic mount routine + */ + return mount_fs(&mnt, flags, (caddr_t)&udf_args, 0, type, 0, NULL, + mnttab_file_name, on_autofs); +} + +static int +udf_mount(am_node *am, mntfs *mf) +{ + int on_autofs; + int error; + + on_autofs = mf->mf_flags & MFF_ON_AUTOFS; + error = mount_udf(mf->mf_mount, mf->mf_info, mf->mf_mopts, on_autofs); + if (error) { + errno = error; + plog(XLOG_ERROR, "mount_udf: %m"); + return error; + } + return 0; +} + + +static int +udf_umount(am_node *am, mntfs *mf) +{ + int unmount_flags; + + unmount_flags = (mf->mf_flags & MFF_ON_AUTOFS) ? AMU_UMOUNT_AUTOFS : 0; + return UMOUNT_FS(mf->mf_mount, mnttab_file_name, unmount_flags); +} diff --git a/amd/ops_ufs.c b/amd/ops_ufs.c index fd82a5cd222..0d8f3068dbe 100644 --- a/amd/ops_ufs.c +++ b/amd/ops_ufs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -61,7 +57,11 @@ static int ufs_umount(am_node *am, mntfs *mf); */ am_ops ufs_ops = { +#ifndef __NetBSD__ "ufs", +#else + "ffs", +#endif ufs_match, 0, /* ufs_init */ ufs_mount, @@ -98,7 +98,7 @@ ufs_match(am_opts *fo) /* * Determine magic cookie to put in mtab */ - return strdup(fo->opt_dev); + return xstrdup(fo->opt_dev); } diff --git a/amd/ops_umapfs.c b/amd/ops_umapfs.c index 5ba735e39c6..6f9d39d9d5d 100644 --- a/amd/ops_umapfs.c +++ b/amd/ops_umapfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/amd/ops_unionfs.c b/amd/ops_unionfs.c index 73f8d667620..e6286133cbf 100644 --- a/amd/ops_unionfs.c +++ b/amd/ops_unionfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/amd/ops_xfs.c b/amd/ops_xfs.c index e0e740bc0a0..6e1495e295f 100644 --- a/amd/ops_xfs.c +++ b/amd/ops_xfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -98,7 +94,7 @@ xfs_match(am_opts *fo) /* * Determine magic cookie to put in mtab */ - return strdup(fo->opt_dev); + return xstrdup(fo->opt_dev); } diff --git a/amd/opts.c b/amd/opts.c index a3d35343adc..4bc833a8dd8 100644 --- a/amd/opts.c +++ b/amd/opts.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -539,7 +535,7 @@ eval_selectors(char *opts, char *mapkey) char *f; int ret = 0; - o = old_o = strdup(opts); + o = old_o = xstrdup(opts); /* * For each user-specified option @@ -570,7 +566,7 @@ eval_selectors(char *opts, char *mapkey) /* null-terminate the argument */ *arg++ = '\0'; fx = strchr(arg, ')'); - if (!arg || fx == arg) { + if (fx == NULL || fx == arg) { plog(XLOG_USER, "key %s: Malformed function in \"%s\"", mapkey, f); continue; } @@ -606,8 +602,10 @@ eval_selectors(char *opts, char *mapkey) } } else { if (eq[1] == '\0' || eq == f) { - /* misformed selector */ +#ifdef notdef + /* We allow empty assignments */ plog(XLOG_USER, "key %s: Bad selector \"%s\"", mapkey, f); +#endif continue; } } @@ -968,9 +966,7 @@ f_true(char *arg) static void free_op(opt_apply *p, int b) { - if (*p->opt) { - XFREE(*p->opt); - } + XFREE(*p->opt); } @@ -1016,7 +1012,7 @@ normalize_slash(char *p) /* assert(*f == 0 || *f == '/'); */ } while (*f); - *t = 0; /* derived from fix by Steven Glassman */ + *t = '\0'; /* derived from fix by Steven Glassman */ } } @@ -1238,8 +1234,14 @@ expand_op(char *opt, int sel_p) } if (BUFSPACE(ep, vlen+1)) { - xstrlcpy(ep, vptr, vlen+1); + /* + * Don't call xstrlcpy() to truncate a string here. It causes + * spurious xstrlcpy() syslog() errors. Use memcpy() and + * explicitly terminate the string. + */ + memcpy(ep, vptr, vlen+1); ep += vlen; + *ep = '\0'; } else { plog(XLOG_ERROR, EXPAND_ERROR, opt); goto out; @@ -1292,7 +1294,7 @@ out: * Handle common case - no expansion */ if (cp == opt) { - opt = strdup(cp); + opt = xstrdup(cp); } else { /* * Finish off the expansion @@ -1308,7 +1310,7 @@ out: /* * Save the expansion */ - opt = strdup(expbuf); + opt = xstrdup(expbuf); } normalize_slash(opt); @@ -1372,6 +1374,45 @@ free_opts(am_opts *fo) apply_opts(free_op, to_free, FALSE); } +am_opts * +copy_opts(am_opts *old) +{ + am_opts *newopts; + newopts = CALLOC(struct am_opts); + +#define _AM_OPT_COPY(field) do { \ + if (old->field) \ + newopts->field = xstrdup(old->field); \ + } while (0) + + _AM_OPT_COPY(fs_glob); + _AM_OPT_COPY(fs_local); + _AM_OPT_COPY(fs_mtab); + _AM_OPT_COPY(opt_dev); + _AM_OPT_COPY(opt_delay); + _AM_OPT_COPY(opt_dir); + _AM_OPT_COPY(opt_fs); + _AM_OPT_COPY(opt_group); + _AM_OPT_COPY(opt_mount); + _AM_OPT_COPY(opt_opts); + _AM_OPT_COPY(opt_remopts); + _AM_OPT_COPY(opt_pref); + _AM_OPT_COPY(opt_cache); + _AM_OPT_COPY(opt_rfs); + _AM_OPT_COPY(opt_rhost); + _AM_OPT_COPY(opt_sublink); + _AM_OPT_COPY(opt_type); + _AM_OPT_COPY(opt_mount_type); + _AM_OPT_COPY(opt_unmount); + _AM_OPT_COPY(opt_umount); + _AM_OPT_COPY(opt_user); + _AM_OPT_COPY(opt_maptype); + _AM_OPT_COPY(opt_cachedir); + _AM_OPT_COPY(opt_addopts); + + return newopts; +} + /* * Expand selectors (variables that cannot be assigned to or overridden) diff --git a/amd/readdir.c b/amd/readdir.c index 49f89943cfb..4b5e61b3d56 100644 --- a/amd/readdir.c +++ b/amd/readdir.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -109,14 +105,14 @@ make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable plog(XLOG_DEBUG, "make_entry_chain: mp is (NULL)"); return retval; } - mf = mp->am_mnt; + mf = mp->am_al->al_mnt; if (!mf) { - plog(XLOG_DEBUG, "make_entry_chain: mp->am_mnt is (NULL)"); + plog(XLOG_DEBUG, "make_entry_chain: mp->am_al->al_mnt is (NULL)"); return retval; } mmp = (mnt_map *) mf->mf_private; if (!mmp) { - plog(XLOG_DEBUG, "make_entry_chain: mp->am_mnt->mf_private is (NULL)"); + plog(XLOG_DEBUG, "make_entry_chain: mp->am_al->al_mnt->mf_private is (NULL)"); return retval; } @@ -171,7 +167,7 @@ make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable /* out of space */ plog(XLOG_DEBUG, "make_entry_chain: no more space in chain"); if (num_entries > 0) { - chain[num_entries - 1].ne_nextentry = 0; + chain[num_entries - 1].ne_nextentry = NULL; retval = &chain[0]; } return retval; @@ -192,7 +188,7 @@ make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable /* terminate chain */ if (num_entries > 0) { - chain[num_entries - 1].ne_nextentry = 0; + chain[num_entries - 1].ne_nextentry = NULL; retval = &chain[0]; } @@ -225,7 +221,7 @@ amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry * * to be returned in a single packet. If it isn't (which would be * fairly unbelievable) then tough. */ - dlog("amfs_readdir_browsable: default search"); + dlog("%s: default search", __func__); /* * Check for enough room. This is extremely approximate but is more * than enough space. Really need 2 times: @@ -264,8 +260,8 @@ amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry * ep[1].ne_fileid = mp->am_gen; ep[1].ne_name = ".."; - ep[1].ne_nextentry = 0; - *(u_int *) ep[1].ne_cookie = DOT_DOT_COOKIE; + ep[1].ne_nextentry = NULL; + (void)memcpy(ep[1].ne_cookie, &dotdotcookie, sizeof(dotdotcookie)); /* * If map is browsable, call a function make_entry_chain() to construct @@ -313,12 +309,12 @@ amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry * return 0; } /* end of "if (gen == 0)" statement */ - dlog("amfs_readdir_browsable: real child"); + dlog("%s: real child", __func__); if (gen == DOT_DOT_COOKIE) { - dlog("amfs_readdir_browsable: End of readdir in %s", mp->am_path); + dlog("%s: End of readdir in %s", __func__, mp->am_path); dp->dl_eof = TRUE; - dp->dl_entries = 0; + dp->dl_entries = NULL; return 0; } @@ -332,7 +328,7 @@ amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry * te = te_next; /* reset 'te' from last saved te_next */ if (!te) { /* another indicator of end of readdir */ - dp->dl_entries = 0; + dp->dl_entries = NULL; return 0; } /* @@ -365,29 +361,14 @@ amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry * return 0; } - -/* - * This readdir function which call a special version of it that allows - * browsing if browsable_dirs=yes was set on the map. - */ -int -amfs_generic_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count) +static int +amfs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count) { u_int gen = *(u_int *) cookie; am_node *xp; - mntent_t mnt; dp->dl_eof = FALSE; /* assume readdir not done */ - /* check if map is browsable */ - if (mp->am_mnt && mp->am_mnt->mf_mopts) { - mnt.mnt_opts = mp->am_mnt->mf_mopts; - if (amu_hasmntopt(&mnt, "fullybrowsable")) - return amfs_readdir_browsable(mp, cookie, dp, ep, count, TRUE); - if (amu_hasmntopt(&mnt, "browsable")) - return amfs_readdir_browsable(mp, cookie, dp, ep, count, FALSE); - } - /* when gen is 0, we start reading from the beginning of the directory */ if (gen == 0) { /* @@ -398,7 +379,7 @@ amfs_generic_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep * to be returned in a single packet. If it isn't (which would be * fairly unbelievable) then tough. */ - dlog("amfs_generic_readdir: default search"); + dlog("%s: default search", __func__); /* * Check for enough room. This is extremely approximate but is more * than enough space. Really need 2 times: @@ -407,8 +388,11 @@ amfs_generic_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep * 4byte name length * 4byte name * plus the dirlist structure */ - if (count < (2 * (2 * (sizeof(*ep) + sizeof("..") + 4) + sizeof(*dp)))) +#define NEEDROOM (2 * (2 * (sizeof(*ep) + sizeof("..") + 4) + sizeof(*dp))) + if (count < NEEDROOM) { + dlog("%s: not enough room %u < %zu", __func__, count, NEEDROOM); return EINVAL; + } xp = next_nonerror_node(mp->am_child); dp->dl_entries = ep; @@ -425,8 +409,9 @@ amfs_generic_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep else ep[1].ne_fileid = mp->am_gen; ep[1].ne_name = ".."; - ep[1].ne_nextentry = 0; - *(u_int *) ep[1].ne_cookie = (xp ? xp->am_gen : DOT_DOT_COOKIE); + ep[1].ne_nextentry = NULL; + (void)memcpy(ep[1].ne_cookie, (xp ? &xp->am_gen : &dotdotcookie), + sizeof(dotdotcookie)); if (!xp) dp->dl_eof = TRUE; /* by default assume readdir done */ @@ -443,12 +428,12 @@ amfs_generic_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep } return 0; } - dlog("amfs_generic_readdir: real child"); + dlog("%s: real child", __func__); if (gen == DOT_DOT_COOKIE) { - dlog("amfs_generic_readdir: End of readdir in %s", mp->am_path); + dlog("%s: End of readdir in %s", __func__, mp->am_path); dp->dl_eof = TRUE; - dp->dl_entries = 0; + dp->dl_entries = NULL; if (amuDebug(D_READDIR)) plog(XLOG_DEBUG, "end of readdir eof=TRUE, dl_entries=0\n"); return 0; @@ -491,7 +476,7 @@ amfs_generic_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep } } while (todo > 0); - ep->ne_nextentry = 0; + ep->ne_nextentry = NULL; if (amuDebug(D_READDIR)) { nfsentry *ne; @@ -507,3 +492,460 @@ amfs_generic_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep } return ESTALE; } + +/* + * Search a chain for an entry with some name. + */ +static int +key_already_in_chain3(char *keyname, const am_entry3 *chain) +{ + const am_entry3 *tmpchain = chain; + + while (tmpchain) { + if (keyname && tmpchain->name && STREQ(keyname, tmpchain->name)) + return 1; + tmpchain = tmpchain->nextentry; + } + + return 0; +} + +/* + * Create a chain of entries which are not linked. + */ +static am_entry3 * +make_entry_chain3(am_node *mp, const am_entry3 *current_chain, int fully_browsable) +{ + static uint64 last_cookie = (uint64) 2; /* monotonically increasing */ + static am_entry3 chain[MAX_CHAIN]; + static int max_entries = MAX_CHAIN; + char *key; + int num_entries = 0, i; + u_int preflen = 0; + am_entry3 *retval = (am_entry3 *) NULL; + mntfs *mf; + mnt_map *mmp; + + if (!mp) { + plog(XLOG_DEBUG, "make_entry_chain3: mp is (NULL)"); + return retval; + } + mf = mp->am_al->al_mnt; + if (!mf) { + plog(XLOG_DEBUG, "make_entry_chain3: mp->am_al->al_mnt is (NULL)"); + return retval; + } + mmp = (mnt_map *) mf->mf_private; + if (!mmp) { + plog(XLOG_DEBUG, "make_entry_chain3: mp->am_al->al_mnt->mf_private is (NULL)"); + return retval; + } + + if (mp->am_pref) + preflen = strlen(mp->am_pref); + + /* iterate over keys */ + for (i = 0; i < NKVHASH; i++) { + kv *k; + for (k = mmp->kvhash[i]; k ; k = k->next) { + + /* + * Skip unwanted entries which are either not real entries or + * very difficult to interpret (wildcards...) This test needs + * lots of improvement. Any takers? + */ + key = k->key; + if (!key) + continue; + + /* Skip '/defaults' */ + if (STREQ(key, "/defaults")) + continue; + + /* Skip '*' */ + if (!fully_browsable && strchr(key, '*')) + continue; + + /* + * If the map has a prefix-string then check if the key starts with + * this string, and if it does, skip over this prefix. If it has a + * prefix and it doesn't match the start of the key, skip it. + */ + if (preflen) { + if (preflen > strlen(key)) + continue; + if (!NSTREQ(key, mp->am_pref, preflen)) + continue; + key += preflen; + } + + /* no more '/' are allowed, unless browsable_dirs=full was used */ + if (!fully_browsable && strchr(key, '/')) + continue; + + /* no duplicates allowed */ + if (key_already_in_chain3(key, current_chain)) + continue; + + /* fill in a cell and link the entry */ + if (num_entries >= max_entries) { + /* out of space */ + plog(XLOG_DEBUG, "make_entry_chain3: no more space in chain"); + if (num_entries > 0) { + chain[num_entries - 1].nextentry = NULL; + retval = &chain[0]; + } + return retval; + } + + /* we have space. put entry in next cell */ + ++last_cookie; + chain[num_entries].fileid = last_cookie; + chain[num_entries].cookie = last_cookie; + chain[num_entries].name = key; + if (num_entries < max_entries - 1) { /* link to next one */ + chain[num_entries].nextentry = &chain[num_entries + 1]; + } + ++num_entries; + } /* end of "while (k)" */ + } /* end of "for (i ... NKVHASH ..." */ + + /* terminate chain */ + if (num_entries > 0) { + chain[num_entries - 1].nextentry = NULL; + retval = &chain[0]; + } + + return retval; +} + +static size_t needroom3(void) +{ + /* + * Check for enough room. This is extremely approximate but should + * be enough space. Really need 2 times: + * (8byte fileid + * 8byte cookie + * 8byte name pointer + * 8byte next entry addres) = sizeof(am_entry3) + * 2byte name + 1byte terminator + * plus the size of the am_dirlist3 structure */ + return ((2 * ((sizeof(am_entry3) + sizeof("..") + 1))) + sizeof(am_dirlist3)); +} + +/* This one is called only if map is browsable */ +static int +amfs_readdir3_browsable(am_node *mp, am_cookie3 cookie, + am_dirlist3 *dp, am_entry3 *ep, u_int count, + int fully_browsable) +{ + uint64 gen = *(uint64 *) cookie; + int chain_length, i; + static am_entry3 *te, *te_next; + static int j; + + dp->eof = FALSE; /* assume readdir not done */ + + if (amuDebug(D_READDIR)) + plog(XLOG_DEBUG, "amfs_readdir3_browsable gen=%lu, count=%d", gen, count); + + if (gen == 0) { + size_t needed = needroom3(); + /* + * In the default instance (which is used to start a search) we return + * "." and "..". + * + * This assumes that the count is big enough to allow both "." and ".." + * to be returned in a single packet. If it isn't (which would be + * fairly unbelievable) then tough. + */ + dlog("%s: default search", __func__); + + if (count < needed) { + dlog("%s: not enough room %u < %zu", __func__, count, needed); + return EINVAL; + } + + /* + * compute # of entries to send in this chain. + * heuristics: 128 bytes per entry. + * This is too much probably, but it seems to work better because + * of the re-entrant nature of nfs_readdir, and esp. on systems + * like OpenBSD 2.2. + */ + chain_length = count / 128; + + /* reset static state counters */ + te = te_next = NULL; + + dp->entries = ep; + + /* construct "." */ + ep[0].fileid = mp->am_gen; + ep[0].name = "."; + ep[0].nextentry = &ep[1]; + ep[0].cookie = 0; + + /* construct ".." */ + if (mp->am_parent) + ep[1].fileid = mp->am_parent->am_gen; + else + ep[1].fileid = mp->am_gen; + + ep[1].name = ".."; + ep[1].nextentry = NULL; + ep[1].cookie = dotdotcookie; + + /* + * If map is browsable, call a function make_entry_chain() to construct + * a linked list of unmounted keys, and return it. Then link the chain + * to the regular list. Get the chain only once, but return + * chunks of it each time. + */ + te = make_entry_chain3(mp, dp->entries, fully_browsable); + if (!te) + return 0; + if (amuDebug(D_READDIR)) { + am_entry3 *ne; + for (j = 0, ne = te; ne; ne = ne->ne_nextentry) + plog(XLOG_DEBUG, "gen1 key %4d \"%s\"", j++, ne->ne_name); + } + + /* return only "chain_length" entries */ + te_next = te; + for (i=1; inextentry; + if (!te_next) + break; + } + if (te_next) { + am_entry3 *te_saved = te_next->nextentry; + te_next->nextentry = NULL; /* terminate "te" chain */ + te_next = te_saved; /* save rest of "te" for next iteration */ + dp->eof = FALSE; /* tell readdir there's more */ + } else { + dp->eof = TRUE; /* tell readdir that's it */ + } + ep[1].nextentry = te; /* append this chunk of "te" chain */ + if (amuDebug(D_READDIR)) { + am_entry3 *ne; + for (j = 0, ne = te; ne; ne = ne->ne_nextentry) + plog(XLOG_DEBUG, "gen2 key %4d \"%s\"", j++, ne->name); + for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) { + plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%lu ck=%lu", + j++, ne->name, ne->fileid, ne->cookie); + } + plog(XLOG_DEBUG, "EOF is %d", dp->eof); + } + return 0; + } /* end of "if (gen == 0)" statement */ + + dlog("%s: real child", __func__); + + if (gen == DOT_DOT_COOKIE) { + dlog("%s: End of readdir in %s", __func__, mp->am_path); + dp->eof = TRUE; + dp->entries = NULL; + return 0; + } + + /* + * If browsable directories, then continue serving readdir() with another + * chunk of entries, starting from where we left off (when gen was equal + * to 0). Once again, assume last chunk served to readdir. + */ + dp->eof = TRUE; + dp->entries = ep; + + te = te_next; /* reset 'te' from last saved te_next */ + if (!te) { /* another indicator of end of readdir */ + dp->entries = NULL; + return 0; + } + /* + * compute # of entries to send in this chain. + * heuristics: 128 bytes per entry. + */ + chain_length = count / 128; + + /* return only "chain_length" entries */ + for (i = 1; i < chain_length; ++i) { + te_next = te_next->nextentry; + if (!te_next) + break; + } + if (te_next) { + am_entry3 *te_saved = te_next->nextentry; + te_next->nextentry = NULL; /* terminate "te" chain */ + te_next = te_saved; /* save rest of "te" for next iteration */ + dp->eof = FALSE; /* tell readdir there's more */ + } + ep = te; /* send next chunk of "te" chain */ + dp->entries = ep; + if (amuDebug(D_READDIR)) { + am_entry3 *ne; + plog(XLOG_DEBUG, + "entries=%p, te_next=%p, eof=%d", dp->entries, te_next, dp->eof); + for (ne = te; ne; ne = ne->nextentry) + plog(XLOG_DEBUG, "gen3 key %4d \"%s\"", j++, ne->name); + } + return 0; +} + +static int +amfs_readdir3(am_node *mp, am_cookie3 cookie, + am_dirlist3 *dp, am_entry3 *ep, u_int count) +{ + uint64 gen = *(uint64 *) cookie; + am_node *xp; + + if (amuDebug(D_READDIR)) + plog(XLOG_DEBUG, "amfs_readdir3 gen=%lu, count=%d", gen, count); + + dp->eof = FALSE; /* assume readdir not done */ + + /* when gen is 0, we start reading from the beginning of the directory */ + if (gen == 0) { + size_t needed = needroom3(); + /* + * In the default instance (which is used to start a search) we return + * "." and "..". + * + * This assumes that the count is big enough to allow both "." and ".." + * to be returned in a single packet. If it isn't (which would be + * fairly unbelievable) then tough. + */ + dlog("%s: default search", __func__); + + if (count < needed) { + dlog("%s: not enough room %u < %zu", __func__, count, needed); + return EINVAL; + } + + xp = next_nonerror_node(mp->am_child); + dp->entries = ep; + + /* construct "." */ + ep[0].fileid = mp->am_gen; + ep[0].name = "."; + ep[0].cookie = 0; + ep[0].nextentry = &ep[1]; + + /* construct ".." */ + if (mp->am_parent) + ep[1].fileid = mp->am_parent->am_gen; + else + ep[1].fileid = mp->am_gen; + ep[1].name = ".."; + ep[1].nextentry = NULL; + ep[1].cookie = (xp ? xp->am_gen : dotdotcookie); + + if (!xp) + dp->eof = TRUE; /* by default assume readdir done */ + + if (amuDebug(D_READDIR)) { + am_entry3 *ne; + int j; + for (j = 0, ne = ep; ne; ne = ne->nextentry) { + plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%lu ck=%lu", + j++, ne->name, ne->fileid, ne->cookie); + } + } + return 0; + } + dlog("%s: real child", __func__); + + if (gen == (uint64) DOT_DOT_COOKIE) { + dlog("%s: End of readdir in %s", __func__, mp->am_path); + dp->eof = TRUE; + dp->entries = NULL; + if (amuDebug(D_READDIR)) + plog(XLOG_DEBUG, "end of readdir eof=TRUE, dl_entries=0\n"); + return 0; + } + + /* non-browsable directories code */ + xp = mp->am_child; + while (xp && xp->am_gen != gen) + xp = xp->am_osib; + + if (xp) { + int nbytes = count / 2; /* conservative */ + int todo = MAX_READDIR_ENTRIES; + + dp->entries = ep; + do { + am_node *xp_next = next_nonerror_node(xp->am_osib); + + if (xp_next) { + ep->cookie = xp_next->am_gen; + } else { + ep->cookie = (uint64) dotdotcookie; + dp->eof = TRUE; + } + + ep->fileid = xp->am_gen; + ep->name = xp->am_name; + nbytes -= sizeof(*ep) + 1; + if (xp->am_name) + nbytes -= strlen(xp->am_name); + + xp = xp_next; + + if (nbytes > 0 && !dp->dl_eof && todo > 1) { + ep->nextentry = ep + 1; + ep++; + --todo; + } else { + todo = 0; + } + } while (todo > 0); + + ep->nextentry = NULL; + + if (amuDebug(D_READDIR)) { + am_entry3 *ne; + int j; + for (j = 0, ne = ep; ne; ne = ne->nextentry) { + plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%lu ck=%lu", + j++, ne->name, ne->fileid, ne->cookie); + } + } + return 0; + } + return ESTALE; +} + +/* + * This readdir function which call a special version of it that allows + * browsing if browsable_dirs=yes was set on the map. + */ +int +amfs_generic_readdir(am_node *mp, voidp cookie, voidp dp, voidp ep, u_int count) +{ + int browsable, full; + + /* check if map is browsable */ + browsable = 0; + if (mp->am_al->al_mnt && mp->am_al->al_mnt->mf_mopts) { + mntent_t mnt; + mnt.mnt_opts = mp->am_al->al_mnt->mf_mopts; + if (amu_hasmntopt(&mnt, "fullybrowsable")) + browsable = 2; + else if (amu_hasmntopt(&mnt, "browsable")) + browsable = 1; + } + full = (browsable == 2); + + if (nfs_dispatcher == nfs_program_2) { + if (browsable) + return amfs_readdir_browsable(mp, cookie, dp, ep, count, full); + else + return amfs_readdir(mp, cookie, dp, ep, count); + } else { + if (browsable) + return amfs_readdir3_browsable(mp, (am_cookie3) cookie, dp, ep, count, full); + else + return amfs_readdir3(mp, (am_cookie3) cookie, dp, ep, count); + } +} diff --git a/amd/restart.c b/amd/restart.c index 4f71e381e25..de38bcfb274 100644 --- a/amd/restart.c +++ b/amd/restart.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -59,21 +55,21 @@ restart_fake_mntfs(mntent_t *me, am_ops *fs_ops) * Partially fake up an opts structure */ memset(&mo, 0, sizeof(mo)); - mo.opt_rhost = 0; - mo.opt_rfs = 0; + mo.opt_rhost = NULL; + mo.opt_rfs = NULL; cp = strchr(me->mnt_fsname, ':'); if (cp) { *cp = '\0'; - mo.opt_rhost = strdup(me->mnt_fsname); - mo.opt_rfs = strdup(cp + 1); + mo.opt_rhost = xstrdup(me->mnt_fsname); + mo.opt_rfs = xstrdup(cp + 1); *cp = ':'; } else if (STREQ(me->mnt_type, MNTTAB_TYPE_NFS)) { /* * Hacky workaround for mnttab NFS entries that only list the server */ plog(XLOG_WARNING, "NFS server entry assumed to be %s:/", me->mnt_fsname); - mo.opt_rhost = strdup(me->mnt_fsname); - mo.opt_rfs = strdup("/"); + mo.opt_rhost = xstrdup(me->mnt_fsname); + mo.opt_rfs = xstrdup("/"); me->mnt_fsname = str3cat(me->mnt_fsname, mo.opt_rhost, ":", "/"); } mo.opt_fs = me->mnt_dir; @@ -87,7 +83,6 @@ restart_fake_mntfs(mntent_t *me, am_ops *fs_ops) if (mf->mf_refc == 1) { mf->mf_flags |= MFF_RESTART | MFF_MOUNTED; mf->mf_error = 0; /* Already mounted correctly */ - mf->mf_fo = 0; /* * Only timeout non-NFS entries */ @@ -110,10 +105,8 @@ restart_fake_mntfs(mntent_t *me, am_ops *fs_ops) /* * Clean up mo */ - if (mo.opt_rhost) - XFREE(mo.opt_rhost); - if (mo.opt_rfs) - XFREE(mo.opt_rfs); + XFREE(mo.opt_rhost); + XFREE(mo.opt_rfs); } @@ -140,7 +133,7 @@ restart(void) mlp; mlp = mlp->mnext) { mntent_t *me = mlp->mnt; - am_ops *fs_ops = 0; + am_ops *fs_ops = NULL; if (STREQ(me->mnt_type, MNTTAB_TYPE_NFS)) { /* @@ -203,7 +196,7 @@ restart_automounter_nodes(void) mlp; mlp = mlp->mnext) { mntent_t *me = mlp->mnt; - am_ops *fs_ops = 0; + am_ops *fs_ops = NULL; char *colon; long pid; u_short port; @@ -263,7 +256,8 @@ restart_automounter_nodes(void) if (old_ports[i] == 0) { int soNFS; SVCXPRT *nfsxprt; - if (create_nfs_service(&soNFS, &port, &nfsxprt, nfs_program_2) != 0) { + if (create_nfs_service(&soNFS, &port, &nfsxprt, nfs_dispatcher, + get_nfs_dispatcher_version(nfs_dispatcher)) != 0) { plog(XLOG_WARNING, "Can't bind to port %u", port); goto give_up; } diff --git a/amd/rpc_fwd.c b/amd/rpc_fwd.c index b3c8be4fa3b..757b4371024 100644 --- a/amd/rpc_fwd.c +++ b/amd/rpc_fwd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -94,7 +90,7 @@ static rpc_forward * fwd_alloc(void) { time_t now = clocktime(NULL); - rpc_forward *p = 0, *p2; + rpc_forward *p = NULL, *p2; /* * First search for an existing expired one. @@ -183,7 +179,7 @@ fwd_init(void) /* * Some things we talk to require a priv port - so make one here */ - if (bind_resv_port(fwd_sock, (u_short *) 0) < 0) + if (bind_resv_port(fwd_sock, (u_short *) NULL) < 0) plog(XLOG_ERROR, "can't bind privileged port (rpc_fwd)"); if (fcntl(fwd_sock, F_SETFL, FNDELAY) < 0 diff --git a/amd/sched.c b/amd/sched.c index 8efe57a3ab8..5c816b4c205 100644 --- a/amd/sched.c +++ b/amd/sched.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -262,7 +258,7 @@ sigchld(int sig) #ifdef HAVE_WAITPID while ((pid = waitpid((pid_t) -1, &w, WNOHANG)) > 0) { #else /* not HAVE_WAITPID */ - while ((pid = wait3( &w, WNOHANG, (struct rusage *) 0)) > 0) { + while ((pid = wait3( &w, WNOHANG, (struct rusage *) NULL)) > 0) { #endif /* not HAVE_WAITPID */ pjob *p, *p2; diff --git a/amd/srvr_amfs_auto.c b/amd/srvr_amfs_auto.c index 4742cf6f750..44b130254d3 100644 --- a/amd/srvr_amfs_auto.c +++ b/amd/srvr_amfs_auto.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -69,14 +65,14 @@ amfs_generic_find_srvr(mntfs *mf) if (!fs) { fs = ALLOC(struct fserver); fs->fs_refc = 0; - fs->fs_host = strdup("localhost"); - fs->fs_ip = 0; + fs->fs_host = xstrdup("localhost"); + fs->fs_ip = NULL; fs->fs_cid = 0; fs->fs_pinger = AM_PINGER; fs->fs_flags = FSF_VALID | FSF_PING_UNINIT; fs->fs_type = "local"; - fs->fs_private = 0; - fs->fs_prfree = 0; + fs->fs_private = NULL; + fs->fs_prfree = NULL; ins_que(&fs->fs_q, &amfs_auto_srvr_list); @@ -135,8 +131,7 @@ timeout_srvr(voidp v) /* * Free the net address */ - if (fs->fs_ip) - XFREE(fs->fs_ip); + XFREE(fs->fs_ip); /* * Free the host name. diff --git a/amd/srvr_nfs.c b/amd/srvr_nfs.c index 0c74a658e5e..b7c852c9e1d 100644 --- a/amd/srvr_nfs.c +++ b/amd/srvr_nfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -75,6 +71,7 @@ typedef struct nfs_private { u_short np_mountd; /* Mount daemon port number */ char np_mountd_inval; /* Port *may* be invalid */ + /* 'Y' invalid, 'N' valid, 'P' permanent */ int np_ping; /* Number of failed ping attempts */ time_t np_ttl; /* Time when server is thought dead */ int np_xid; /* RPC transaction id for pings */ @@ -88,7 +85,9 @@ qelem nfs_srvr_list = {&nfs_srvr_list, &nfs_srvr_list}; static int global_xid; /* For NFS pings */ #define XID_ALLOC() (++global_xid) -#ifdef HAVE_FS_NFS3 +#if defined(HAVE_FS_NFS4) +# define NUM_NFS_VERS 3 +#elif defined(HAVE_FS_NFS3) # define NUM_NFS_VERS 2 #else /* not HAVE_FS_NFS3 */ # define NUM_NFS_VERS 1 @@ -124,8 +123,8 @@ flush_srvr_nfs_cache(fserver *fs) ITER(fs2, fserver, &nfs_srvr_list) { if (fs == NULL || fs == fs2) { nfs_private *np = (nfs_private *) fs2->fs_private; - if (np) { - np->np_mountd_inval = TRUE; + if (np && np->np_mountd_inval != 'P') { + np->np_mountd_inval = 'Y'; np->np_error = -1; } } @@ -147,9 +146,9 @@ create_ping_payload(u_long nfs_version) */ if (nfs_version == 0) { nfs_version = NFS_VERSION; - plog(XLOG_WARNING, "create_ping_payload: nfs_version = 0, changed to 2"); + plog(XLOG_WARNING, "%s: nfs_version = 0, changed to 2", __func__); } else - plog(XLOG_INFO, "create_ping_payload: nfs_version: %d", (int) nfs_version); + plog(XLOG_INFO, "%s: nfs_version: %d", __func__, (int) nfs_version); rpc_msg_init(&ping_msg, NFS_PROGRAM, nfs_version, NFSPROC_NULL); @@ -164,6 +163,7 @@ create_ping_payload(u_long nfs_version) if (!xdr_callmsg(&ping_xdr, &ping_msg)) { plog(XLOG_ERROR, "Couldn't create ping RPC message"); going_down(3); + return; } /* * Find out how long it is @@ -184,7 +184,7 @@ static void got_portmap(voidp pkt, int len, struct sockaddr_in *sa, struct sockaddr_in *ia, voidp idv, int done) { fserver *fs2 = (fserver *) idv; - fserver *fs = 0; + fserver *fs = NULL; /* * Find which fileserver we are talking about @@ -207,7 +207,7 @@ got_portmap(voidp pkt, int len, struct sockaddr_in *sa, struct sockaddr_in *ia, * network ordering. */ np->np_mountd = htons((u_short) port); - np->np_mountd_inval = FALSE; + np->np_mountd_inval = 'N'; np->np_error = 0; } else { dlog("Error fetching port for mountd on %s", fs->fs_host); @@ -291,9 +291,9 @@ recompute_portmap(fserver *fs) } if (fs->fs_version == 0) - plog(XLOG_WARNING, "recompute_portmap: nfs_version = 0 fixed"); + plog(XLOG_WARNING, "%s: nfs_version = 0 fixed", __func__); - plog(XLOG_INFO, "recompute_portmap: NFS version %d on %s", + plog(XLOG_INFO, "%s: NFS version %d on %s", __func__, (int) fs->fs_version, fs->fs_host); #ifdef HAVE_FS_NFS3 if (fs->fs_version == NFS_VERSION3) @@ -311,6 +311,7 @@ int get_mountd_port(fserver *fs, u_short *port, wchan_t wchan) { int error = -1; + if (FSRV_ISDOWN(fs)) return EWOULDBLOCK; @@ -329,10 +330,18 @@ get_mountd_port(fserver *fs, u_short *port, wchan_t wchan) * indication that the mountd may be invalid, not * that it is known to be invalid. */ - if (np->np_mountd_inval) + switch (np->np_mountd_inval) { + case 'Y': recompute_portmap(fs); - else - np->np_mountd_inval = TRUE; + break; + case 'N': + np->np_mountd_inval = 'Y'; + break; + case 'P': + break; + default: + abort(); + } } if (error < 0 && wchan && !(fs->fs_flags & FSF_WANT)) { /* @@ -425,7 +434,7 @@ nfs_keepalive_callback(voidp pkt, int len, struct sockaddr_in *sp, struct sockad /* * Recompute portmap information if not known */ - if (np->np_mountd_inval) + if (np->np_mountd_inval == 'Y') recompute_portmap(fs); found_map++; @@ -454,7 +463,7 @@ check_fs_addr_change(fserver *fs) sizeof(fs->fs_ip->sin_addr)) == 0) return; /* if got here: downed server changed IP address */ - old_ipaddr = strdup(inet_ntoa(fs->fs_ip->sin_addr)); + old_ipaddr = xstrdup(inet_ntoa(fs->fs_ip->sin_addr)); memmove((voidp) &ia, (voidp) hp->h_addr, sizeof(struct in_addr)); new_ipaddr = inet_ntoa(ia); /* ntoa uses static buf */ plog(XLOG_WARNING, "EZK: down fileserver %s changed ip: %s -> %s", @@ -474,7 +483,7 @@ check_fs_addr_change(fserver *fs) #if 0 flush_nfs_fhandle_cache(fs); /* done in caller: nfs_keepalive_timeout */ /* XXX: need to purge nfs_private so that somehow it will get re-initialized? */ -#endif +#endif /* 0 */ } @@ -562,22 +571,24 @@ nfs_keepalive(voidp v) int error; nfs_private *np = (nfs_private *) fs->fs_private; int fstimeo = -1; + int fs_version = nfs_valid_version(gopt.nfs_vers_ping) && + gopt.nfs_vers_ping < fs->fs_version ? gopt.nfs_vers_ping : fs->fs_version; /* * Send an NFS ping to this node */ - if (ping_len[fs->fs_version - NFS_VERSION] == 0) - create_ping_payload(fs->fs_version); + if (ping_len[fs_version - NFS_VERSION] == 0) + create_ping_payload(fs_version); /* * Queue the packet... */ error = fwd_packet(MK_RPC_XID(RPC_XID_NFSPING, np->np_xid), - ping_buf[fs->fs_version - NFS_VERSION], - ping_len[fs->fs_version - NFS_VERSION], + ping_buf[fs_version - NFS_VERSION], + ping_len[fs_version - NFS_VERSION], fs->fs_ip, - (struct sockaddr_in *) 0, + (struct sockaddr_in *) NULL, (voidp) ((long) np->np_xid), /* cast needed for 64-bit archs */ nfs_keepalive_callback); @@ -673,7 +684,7 @@ start_nfs_pings(fserver *fs, int pingval) fserver * find_nfs_srvr(mntfs *mf) { - char *host = mf->mf_fo->opt_rhost; + char *host; fserver *fs; int pingval; mntent_t mnt; @@ -687,6 +698,11 @@ find_nfs_srvr(mntfs *mf) int nfs_port_opt = 0; int fserver_is_down = 0; + if (mf->mf_fo == NULL) { + plog(XLOG_ERROR, "%s: NULL mf_fo", __func__); + return NULL; + } + host = mf->mf_fo->opt_rhost; /* * Get ping interval from mount options. * Current only used to decide whether pings @@ -702,7 +718,8 @@ find_nfs_srvr(mntfs *mf) */ nfs_version = NFS_VERSION; nfs_proto = "udp"; - plog(XLOG_WARNING, "find_nfs_srvr: NFS mount failed, trying again with NFSv2/UDP"); + plog(XLOG_WARNING, "%s: NFS mount failed, trying again with NFSv2/UDP", + __func__); mf->mf_flags &= ~MFF_NFS_SCALEDOWN; } else { /* @@ -742,12 +759,13 @@ find_nfs_srvr(mntfs *mf) /* check if we've globally overridden the NFS version/protocol */ if (gopt.nfs_vers) { nfs_version = gopt.nfs_vers; - plog(XLOG_INFO, "find_nfs_srvr: force NFS version to %d", + plog(XLOG_INFO, "%s: force NFS version to %d", __func__, (int) nfs_version); } if (gopt.nfs_proto) { nfs_proto = gopt.nfs_proto; - plog(XLOG_INFO, "find_nfs_srvr: force NFS protocol transport to %s", nfs_proto); + plog(XLOG_INFO, "%s: force NFS protocol transport to %s", __func__, + nfs_proto); } } @@ -769,7 +787,7 @@ find_nfs_srvr(mntfs *mf) if (hp) { switch (hp->h_addrtype) { case AF_INET: - ip = ALLOC(struct sockaddr_in); + ip = CALLOC(struct sockaddr_in); memset((voidp) ip, 0, sizeof(*ip)); /* as per POSIX, sin_len need not be set (used internally by kernel) */ ip->sin_family = AF_INET; @@ -795,8 +813,7 @@ find_nfs_srvr(mntfs *mf) STREQ(host, fs->fs_host)) { plog(XLOG_WARNING, "fileserver %s is already hung - not running NFS proto/version discovery", host); fs->fs_refc++; - if (ip) - XFREE(ip); + XFREE(ip); return fs; } } @@ -821,10 +838,12 @@ find_nfs_srvr(mntfs *mf) plog(XLOG_INFO, "%s option used, NOT contacting the portmapper on %s", MNTTAB_OPT_PUBLIC, host); /* - * Prefer NFSv3/tcp if the client supports it (cf. RFC 2054, 7). + * Prefer NFSv4/tcp if the client supports it (cf. RFC 2054, 7). */ if (!nfs_version) { -#ifdef HAVE_FS_NFS3 +#if defined(HAVE_FS_NFS4) + nfs_version = NFS_VERSION4; +#elif defined(HAVE_FS_NFS3) nfs_version = NFS_VERSION3; #else /* not HAVE_FS_NFS3 */ nfs_version = NFS_VERSION; @@ -833,11 +852,11 @@ find_nfs_srvr(mntfs *mf) (int) nfs_version); } if (!nfs_proto) { -#if defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3) +#if defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3) || defined(HAVE_FS_NFS4) nfs_proto = "tcp"; -#else /* not defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3) */ +#else /* not defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3) || defined(HAVE_FS_NFS4) */ nfs_proto = "udp"; -#endif /* not defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3) */ +#endif /* not defined(MNTTAB_OPT_PROTO) || defined(HAVE_FS_NFS3) || defined(HAVE_FS_NFS4) */ plog(XLOG_INFO, "No NFS protocol transport specified, will use %s", nfs_proto); } @@ -849,7 +868,8 @@ find_nfs_srvr(mntfs *mf) */ if (check_pmap_up(host, ip)) { if (nfs_proto) { - best_nfs_version = get_nfs_version(host, ip, nfs_version, nfs_proto); + best_nfs_version = get_nfs_version(host, ip, nfs_version, nfs_proto, + gopt.nfs_vers); nfs_port = ip->sin_port; } #ifdef MNTTAB_OPT_PROTO @@ -858,8 +878,8 @@ find_nfs_srvr(mntfs *mf) char **p; for (p = protocols; *p; p++) { - proto_nfs_version = get_nfs_version(host, ip, nfs_version, *p); - + proto_nfs_version = get_nfs_version(host, ip, nfs_version, *p, + gopt.nfs_vers); if (proto_nfs_version > best_nfs_version) { best_nfs_version = proto_nfs_version; nfs_proto = *p; @@ -908,8 +928,8 @@ find_nfs_srvr(mntfs *mf) if (!nfs_port) nfs_port = htons(NFS_PORT); - dlog("find_nfs_srvr: using port %d for nfs on %s", - (int) ntohs(nfs_port), host); + dlog("%s: using port %d for nfs on %s", __func__, + (int) ntohs(nfs_port), host); ip->sin_port = nfs_port; no_dns: @@ -935,7 +955,7 @@ no_dns: sizeof(fs->fs_ip->sin_addr)) != 0) { struct in_addr ia; char *old_ipaddr, *new_ipaddr; - old_ipaddr = strdup(inet_ntoa(fs->fs_ip->sin_addr)); + old_ipaddr = xstrdup(inet_ntoa(fs->fs_ip->sin_addr)); memmove((voidp) &ia, (voidp) hp->h_addr, sizeof(struct in_addr)); new_ipaddr = inet_ntoa(ia); /* ntoa uses static buf */ plog(XLOG_WARNING, "fileserver %s changed ip: %s -> %s", @@ -962,24 +982,28 @@ no_dns: */ if (!(fs->fs_flags & FSF_PINGING)) { np = (nfs_private *) fs->fs_private; - np->np_mountd_inval = TRUE; - np->np_xid = XID_ALLOC(); - np->np_error = -1; - np->np_ping = 0; - /* - * Initially the server will be deemed dead - * after MAX_ALLOWED_PINGS of the fast variety - * have failed. - */ - np->np_ttl = MAX_ALLOWED_PINGS * FAST_NFS_PING + clocktime(NULL) - 1; - start_nfs_pings(fs, pingval); - if (fserver_is_down) - fs->fs_flags |= FSF_VALID | FSF_DOWN; + if (np->np_mountd_inval != 'P') { + np->np_mountd_inval = TRUE; + np->np_xid = XID_ALLOC(); + np->np_error = -1; + np->np_ping = 0; + /* + * Initially the server will be deemed dead + * after MAX_ALLOWED_PINGS of the fast variety + * have failed. + */ + np->np_ttl = MAX_ALLOWED_PINGS * FAST_NFS_PING + clocktime(NULL) - 1; + start_nfs_pings(fs, pingval); + if (fserver_is_down) + fs->fs_flags |= FSF_VALID | FSF_DOWN; + } else { + fs->fs_flags = FSF_VALID; + } + } fs->fs_refc++; - if (ip) - XFREE(ip); + XFREE(ip); return fs; } } @@ -993,7 +1017,7 @@ no_dns: */ fs = ALLOC(struct fserver); fs->fs_refc = 1; - fs->fs_host = strdup(hp ? hp->h_name : "unknown_hostname"); + fs->fs_host = xstrdup(hp ? hp->h_name : "unknown_hostname"); if (gopt.flags & CFM_NORMALIZE_HOSTNAMES) host_normalize(&fs->fs_host); fs->fs_ip = ip; @@ -1014,9 +1038,18 @@ no_dns: fs->fs_flags |= FSF_PING_UNINIT; /* pinger hasn't been initialized */ np = ALLOC(struct nfs_private); memset((voidp) np, 0, sizeof(*np)); - np->np_mountd_inval = TRUE; - np->np_xid = XID_ALLOC(); - np->np_error = -1; + np->np_mountd = htons(hasmntval(&mnt, "mountport")); + if (np->np_mountd == 0) { + np->np_mountd_inval = 'Y'; + np->np_xid = XID_ALLOC(); + np->np_error = -1; + } else { + plog(XLOG_INFO, "%s: using mountport: %d", __func__, + (int) ntohs(np->np_mountd)); + np->np_mountd_inval = 'P'; + np->np_xid = 0; + np->np_error = 0; + } /* * Initially the server will be deemed dead after diff --git a/amd/sun2amd.8 b/amd/sun2amd.8 new file mode 100644 index 00000000000..67d241f32cd --- /dev/null +++ b/amd/sun2amd.8 @@ -0,0 +1,92 @@ +.\" +.\" Copyright (c) 1997-2014 Erez Zadok +.\" Copyright (c) 2005 Daniel P. Ottavio +.\" Copyright (c) 1990 Jan-Simon Pendry +.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine +.\" Copyright (c) 1990 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Jan-Simon Pendry at Imperial College, London. +.\" +.\" 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. +.\" +.\" +.\" File: am-utils/amd/sun2amd.8 +.\" +.TH SUN2AMD 8L "14 August 2005" + +.SH NAME +sun2amd \- converts Sun automount maps to Amd maps + +.SH SYNOPSIS +.B sun2amd +[-hH] [-i infile] [-o outfile] + +.SH DESCRIPTION +.B sun2amd +is used to convert Sun style automount maps to Amd style automount +maps. By default +.B sun2amd +reads from stdin and writes to stdout. + +.SH OPTIONS +.TP +.B -h +Help +.TP +.B -i +Read Sun map information from specified file. +.TP +.B -o +Write Amd map information to specified file. + +.SH EXAMPLE +To convert a Sun automount file called auto_foo to an Amd file called +auto.amd type: + +.B sun2amd +-i auto_foo -o auto.amd + +.SH BUGS +* Can not convert master maps yet. + +* NFS is the only automount type currently supported. + +total_bug_count = number_found + 1; + +.SH "SEE ALSO" +.BR automount(8), +.BR amd(8) + +.I "Linux NFS and Automounter Administration" +by Erez Zadok, ISBN 0-7821-2739-8, (Sybex, 2001). +.LP +.I http://www.am-utils.org +.LP + +.SH AUTHOR +Daniel P. Ottavio +.I diff --git a/amd/sun2amd.c b/amd/sun2amd.c new file mode 100644 index 00000000000..ee6fbb59626 --- /dev/null +++ b/amd/sun2amd.c @@ -0,0 +1,203 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 2005 Daniel P. Ottavio + * Copyright (c) 1989 Jan-Simon Pendry + * Copyright (c) 1989 Imperial College of Science, Technology & Medicine + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/amd/sun2amd.c + * + */ + +/* + * Translate Sun-syntax maps to Amd maps + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include +#include + + +/* dummies to make the program compile and link */ +struct amu_global_options gopt; +#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) +# ifdef NEED_LIBWRAP_SEVERITY_VARIABLES +/* + * Some systems that define libwrap already define these two variables + * in libwrap, while others don't: so I need to know precisely iff + * to define these two severity variables. + */ +int allow_severity=0, deny_severity=0, rfc931_timeout=0; +# endif /* NEED_LIBWRAP_SEVERITY_VARIABLES */ +#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */ + + +/* + * Parse the stream sun_in, convert the map information to amd, write + * the results to amd_out. + */ +static int +sun2amd_convert(FILE *sun_in, FILE *amd_out) +{ + char line_buff[INFO_MAX_LINE_LEN], *tmp, *key, *entry; + int pos, line = 0, retval = 1; + + /* just to be safe */ + memset(line_buff, 0, sizeof(line_buff)); + + /* Read the input line by line and do the conversion. */ + while ((pos = file_read_line(line_buff, sizeof(line_buff), sun_in))) { + line++; + line_buff[pos - 1] = '\0'; + + /* remove comments */ + if ((tmp = strchr(line_buff, '#')) != NULL) { + *tmp = '\0'; + } + + /* find start of key */ + key = line_buff; + while (*key != '\0' && isspace((unsigned char)*key)) { + key++; + } + + /* ignore blank lines */ + if (*key == '\0') { + continue; + } + + /* find the end of the key and NULL terminate */ + tmp = key; + while (*tmp != '\0' && isspace((unsigned char)*tmp) == 0) { + tmp++; + } + if (*tmp == '\0') { + plog(XLOG_ERROR, "map line %d has no entry", line); + goto err; + } + *tmp++ = '\0'; + if (*tmp == '\0') { + plog(XLOG_ERROR, "map line %d has no entry", line); + goto err; + } + entry = tmp; + + /* convert the sun entry to an amd entry */ + if ((tmp = sun_entry2amd(key, entry)) == NULL) { + plog(XLOG_ERROR, "parse error on line %d", line); + goto err; + } + + if (fprintf(amd_out, "%s %s\n", key, tmp) < 0) { + plog(XLOG_ERROR, "can't write to output stream: %s", strerror(errno)); + goto err; + } + + /* just to be safe */ + memset(line_buff, 0, sizeof(line_buff)); + } + + /* success */ + retval = 0; + + err: + return retval; +} + + +/* + * wrapper open function + */ +static FILE * +sun2amd_open(const char *path, const char *mode) +{ + FILE *retval = NULL; + + if ((retval = fopen(path,mode)) == NULL) { + plog(XLOG_ERROR,"could not open file %s",path); + } + + return retval; +} + + +/* + * echo the usage and exit + */ +static void +sun2amd_usage(void) +{ + fprintf(stderr, + "usage : sun2amd [-hH] [-i infile] [-o outfile]\n" + "-h\thelp\n" + "-i\tspecify an infile (defaults to stdin)\n" + "-o\tspecify an outfile (defaults to stdout)\n"); +} + + +int +main(int argc, char **argv) +{ + /* default in/out to stdin/stdout */ + FILE *sun_in = stdin, *amd_out = stdout; + int opt, retval = 1; + + while ((opt = getopt(argc, argv , "i:o:hH")) != -1) { + switch (opt) { + + case 'i': + if ((sun_in = sun2amd_open(optarg,"r")) == NULL) { + goto err; + } + break; + + case 'o': + if ((amd_out = sun2amd_open(optarg,"w")) == NULL) { + goto err; + } + break; + + case 'h': + case 'H': + sun2amd_usage(); + goto err; + } + } + + retval = sun2amd_convert(sun_in,amd_out); + + err: + exit(retval); +} diff --git a/amd/sun_map.c b/amd/sun_map.c new file mode 100644 index 00000000000..8e3559960cd --- /dev/null +++ b/amd/sun_map.c @@ -0,0 +1,595 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 2005 Daniel P. Ottavio + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/amd/sun_map.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include +#include + + + +/* + * Add a data pointer to the end of the list. + */ +void +sun_list_add(struct sun_list *list, qelem *item) +{ + if (list->last == NULL) { + list->last = item; + list->first = item; + item->q_back = NULL; + } + else { + list->last->q_forw = item; + item->q_back = list->last; + list->last = item; + } + + item->q_forw = NULL; +} + + +/* + * Sun2Amd conversion routines + */ + +/* + * AMD entry keywords + */ +#define AMD_OPTS_KW "addopts:=" /* add entry options */ +#define AMD_RHOST_KW "rhost:=" /* remote host */ +#define AMD_RFS_KW "rfs:=" /* remote file system */ +#define AMD_FS_KW "fs:=" /* local file system */ +#define AMD_DEV_KW "dev:=" /* device */ +#define AMD_TYPE_NFS_KW "type:=nfs;" /* fs type nfs */ +#define AMD_TYPE_AUTO_KW "type:=auto;" /* fs type auto */ +#define AMD_TYPE_CDFS_KW "type:=cdfs;" /* fs type cd */ +#define AMD_MAP_FS_KW "fs:=${map};" /* set the mount map as current map */ +#define AMD_MAP_PREF_KW "pref:=${key}/" /* set the mount map as current map */ + +/* + * A set of string Sun fstypes. + */ +#define SUN_NFS_TYPE "nfs" +#define SUN_HSFS_TYPE "hsfs" /* CD fs */ +#define SUN_AUTOFS_TYPE "autofs" +#define SUN_CACHEFS_TYPE "cachefs" + +#define SUN_KEY_SUB "&" /* Sun key substitution */ + +/* a set a Sun variable substitutions for map entries */ +#define SUN_ARCH "$ARCH" /* host architecture */ +#define SUN_CPU "$CPU" /* processor type */ +#define SUN_HOST "$HOST" /* host name */ +#define SUN_OSNAME "$OSNAME" /* OS name */ +#define SUN_OSREL "$OSREL" /* OS release */ +#define SUN_OSVERS "$OSVERS" /* OS version */ +#define SUN_NATISA "$NATISA" /* native instruction set */ + +/* a set of Amd variable substitutions */ +#define AMD_ARCH "${arch}" /* host architecture */ +#define AMD_HOST "${host}" /* host name */ +#define AMD_OSNAME "${os}" /* OS name */ +#define AMD_OSVER "${osver}" /* OS version */ + + +/* + * Return a copy of src that has all occurrences of 'str' replaced + * with sub. + * + * param src - the original string + * param str - string that is the replaced with str + * param sub - string that replaces an occurrences of 'delim' + * + * return - new string with str substitutions, NULL on error + */ +static char * +sun_strsub(const char *src, const char *str, const char *sub) +{ + + char *retval = NULL, *str_start, *str_end, *src_end; + size_t total_size, first_half, second_half, sub_size; + + /* assign pointers to the start and end of str */ + if ((str_start = strstr(src, str)) == NULL) { + return retval; + } + str_end = (strlen(str) - 1) + str_start; + + /* assign to the end of the src. */ + src_end = (strlen(src) - 1) + (char*)src; + + /* size from the beginning of src to the start of str */ + first_half = (size_t)(str_start - src); + + /* size from the end of str to the end of src */ + second_half = (size_t)(src_end - str_end); + + sub_size = strlen(sub); + + total_size = (first_half + sub_size + second_half + 1); + + retval = (char*)xmalloc(total_size); + memset(retval, 0, total_size); + + /* + * Put together the string such that the first half is copied + * followed the sub and second half. + * + * We use strncpy instead of xstrlcpy because we are intentionally + * causing truncation and we don't want this to cause errors in the + * log. + */ + (void)strncpy(retval, src, first_half); + (void)strncat(retval, sub, sub_size); + (void)strncat(retval, str_end + 1, second_half); + + if (strstr(retval, str) != NULL) { + /* + * If there is another occurrences of str call this function + * recursively. + */ + char* tmp; + if ((tmp = sun_strsub(retval, str, sub)) != NULL) { + XFREE(retval); + retval = tmp; + } + } + return retval; +} + + +/* + * Return a new string that is a copy of str, all occurrences of a Sun + * variable substitutions are replaced by there equivalent Amd + * substitutions. + * + * param str - source string + * + * return - A new string with the expansions, NULL if str does not + * exist in src or error. + */ +static char * +sun_expand2amd(const char *str) +{ + + char *retval = NULL, *tmp = NULL, *tmp2 = NULL; + const char *pos; + + /* + * Iterator through the string looking for '$' chars. For each '$' + * found try to replace it with Sun variable substitutions. If we + * find a '$' that is not a substation each of the i.e $blah than + * each of the replace attempt will fail and we'll move on to the + * next char. + */ + tmp = xstrdup(str); + for (pos = str; *pos != '\0'; pos++) { + if (*pos != '$') { + continue; + } + if (tmp2 != NULL) { + XFREE(tmp); + tmp = tmp2; + } + + /* + * If a 'replace' does not return NULL than a variable was + * successfully substituted. + */ + + /* architecture */ + if ((tmp2 = sun_strsub(tmp, SUN_ARCH, AMD_ARCH)) != NULL) { + continue; + } + /* cpu - there is not POSIX uname for cpu so just use machine */ + if ((tmp2 = sun_strsub(tmp, SUN_CPU, AMD_ARCH)) != NULL) { + continue; + } + /* hostname */ + if ((tmp2 = sun_strsub(tmp, SUN_HOST, AMD_HOST)) != NULL) { + continue; + } + /* os name */ + if ((tmp2 = sun_strsub(tmp, SUN_OSNAME, AMD_OSNAME)) != NULL) { + continue; + } + /* + * os release - Amd doesn't hava a OS release var just usr os + * version or now. + */ + if ((tmp2 = sun_strsub(tmp, SUN_OSREL, AMD_OSVER)) != NULL) { + continue; + } + /* os version */ + if ((tmp2 = sun_strsub(tmp, SUN_OSVERS, AMD_OSVER)) != NULL) { + continue; + } + /* native instruction set - there is no POSIX natisa so just use system */ + if ((tmp2 = sun_strsub(tmp, SUN_NATISA, AMD_ARCH)) != NULL) { + continue; + } + } + if (tmp2 == NULL) { + retval = tmp; + } + else { + retval = tmp2; + XFREE(tmp); + } + + return retval; +} + + +/* + * This is a wrapper function for appending Amd entry information to a + * buffer. Any Sun variable substitutions will be converted into Amd + * equivalents. + * + * param dest - destination buffer + * param deslen - destination buffer length + * param key - entry key, this might be needed for key substitutions + * param str - string to append + */ +static void +sun_append_str(char *dest, + size_t destlen, + const char *key, + const char *str) +{ + char *sub = NULL, *sub2 = NULL, *out = NULL; + + /* By default we are going to just write the original string. */ + out = (char*)str; + + /* + * Resolve variable substitutions in two steps; 1) replace any key + * map substitutions with the entry key 2) expand any variable + * substitutions i.e $HOST. + * + * Try to replace the key substitution '&'. If this function returns + * with a new string, one or more key subs. where replaced with the + * entry key. + */ + if ((sub = sun_strsub(str, SUN_KEY_SUB, "${key}")) != NULL) { + out = sub; + /* + * Try to convert any variable substitutions. If this function + * returns a new string one or more var subs where expanded. + */ + if ((sub2 = sun_expand2amd(sub)) != NULL) { + out = sub2; + } + } + /* + * Try to convert any variable substitutions. If this function + * returns a new string one or more var subs where expanded. + */ + else if (out != NULL && (sub = sun_expand2amd(out)) != NULL) { + out = sub; + } + + if (out != NULL) { + xstrlcat(dest, out, destlen); + } + XFREE(sub); + XFREE(sub2); +} + + +/* + * Convert the list of Sun mount options to Amd mount options. The + * result is concatenated to dest. + * + * param dest - destination buffer + * param destlen - destination buffer length + * param key - automount key + * param opt_list - list of Sun mount options + */ +static void +sun_opts2amd(char *dest, + size_t destlen, + const char *key, + const struct sun_opt *opt_list) +{ + const struct sun_opt *opt; + + xstrlcat(dest, AMD_OPTS_KW, destlen); + + /* Iterate through each option and append it to the buffer. */ + for(opt = opt_list; opt != NULL; opt = NEXT(struct sun_opt, opt)) { + sun_append_str(dest, destlen, key, opt->str); + /* If there are more options add some commas. */ + if (NEXT(struct sun_opt, opt) != NULL) { + xstrlcat(dest, ",", destlen); + } + } + xstrlcat(dest, ";", destlen); +} + + +/* + * Convert the list of Sun mount locations to a list of Amd mount + * locations. The result is concatenated to dest. + * + * param dest - destination buffer + * param destlen - destination buffer length + * param key - automount key + * param local_list - list of Sun mount locations + */ +static void +sun_locations2amd(char *dest, + size_t destlen, + const char *key, + const struct sun_location *local_list) +{ + const struct sun_location *local; + const struct sun_host *host; + + for (local = local_list; + local != NULL; + local = NEXT(struct sun_location,local)) { + /* + * Check to see if the list of hosts is empty. Some mount types + * i.e cd-rom may have mount location with no host. + */ + if (local->host_list != NULL) { + /* Write each host that belongs to this location. */ + for (host = local->host_list; + host != NULL; + host = NEXT(struct sun_host, host)) { + /* set fstype NFS */ + xstrlcat(dest, AMD_TYPE_NFS_KW, destlen); + /* add rhost key word */ + xstrlcat(dest, AMD_RHOST_KW, destlen); + /* add host name */ + sun_append_str(dest, destlen, key, host->name); + xstrlcat(dest, ";", destlen); + /* add remote fs key word */ + xstrlcat(dest, AMD_RFS_KW, destlen); + /* add local path */ + sun_append_str(dest, destlen, key, local->path); + if (NEXT(struct sun_host, host) != NULL) { + xstrlcat(dest, ";", destlen); + xstrlcat(dest, " ", destlen); + } + } + } + else { + /* no host location */ + xstrlcat(dest, AMD_FS_KW, destlen); + sun_append_str(dest, destlen, key, local->path); + } + if (NEXT(struct sun_location, local) != NULL) { + /* add a space to separate each location */ + xstrlcat(dest, " ", destlen); + } + } +} + + +/* + * Convert a Sun HSFS mount point to an Amd. The result is + * concatenated intp dest. + * + * param dest - destination buffer + * param destlen - destination buffer length + * param key - automount key + * param s_entry - Sun entry + */ +static void +sun_hsfs2amd(char *dest, + size_t destlen, + const char *key, + const struct sun_entry *s_entry) +{ + /* set fstype CDFS */ + xstrlcat(dest, AMD_TYPE_CDFS_KW, destlen); + /* set the cdrom device */ + xstrlcat(dest, AMD_DEV_KW, destlen); + /* XXX: For now just assume that there is only one device. */ + xstrlcat(dest, s_entry->location_list->path, destlen); +} + + +/* + * Convert a Sun NFS automount entry to an Amd. The result is concatenated + * into dest. + * + * param dest - destination buffer + * param destlen - destination buffer length + * param key - automount key + * param s_entry - Sun entry + */ +static void +sun_nfs2amd(char *dest, + size_t destlen, + const char *key, + const struct sun_entry *s_entry) +{ + if (s_entry->location_list != NULL) { + /* write out the list of mountpoint locations */ + sun_locations2amd(dest, destlen, key, s_entry->location_list); + } +} + + +/* + * Convert a Sun multi-mount point entry to an Amd. This is done + * using the Amd type auto. Each auto entry is separated with a \n. + * + * param dest - destination buffer + * param destlen - destination buffer length + * param key - automount key + * param s_entry - Sun entry + */ +static void +sun_multi2amd(char *dest, + size_t destlen, + const char *key, + const struct sun_entry *s_entry) +{ + const struct sun_mountpt *mountpt; + + /* We need to setup a auto fs Amd automount point. */ + xstrlcat(dest, AMD_TYPE_AUTO_KW, destlen); + xstrlcat(dest, AMD_MAP_FS_KW, destlen); + xstrlcat(dest, AMD_MAP_PREF_KW, destlen); + + /* write the mountpts to dest */ + for (mountpt = s_entry->mountpt_list; + mountpt != NULL; + mountpt = NEXT(struct sun_mountpt, mountpt)) { + xstrlcat(dest, "\n", destlen); + /* write the key */ + xstrlcat(dest, key, destlen); + /* write the mount path */ + sun_append_str(dest, destlen, key, mountpt->path); + /* space */ + xstrlcat(dest, " ", destlen); + /* Write all the host locations for this mount point. */ + sun_locations2amd(dest, destlen, key, mountpt->location_list); + } +} + + +/* + * Convert the sun_entry into an Amd equivalent string. + * + * param key - automount key + * param s_entry - Sun style automap entry + * + * return - Amd entry on succes, NULL on error + */ +char * +sun_entry2amd(const char *key, const char *s_entry_str) +{ + char *retval = NULL; + char line_buff[INFO_MAX_LINE_LEN]; + int ws; + struct sun_entry *s_entry = NULL; + + /* The key should not be NULL. */ + if (key == NULL) { + plog(XLOG_ERROR,"Sun key value was null"); + goto err; + } + /* The Sun entry string should never be NULL. */ + if (s_entry_str == NULL) { + plog(XLOG_ERROR,"Sun entry value was null"); + goto err; + } + + /* Make sure there are no trailing white spaces or '\n'. */ + xstrlcpy(line_buff, s_entry_str, sizeof(line_buff)); + ws = strlen(line_buff) - 1; + while (ws >= 0 && (isspace((unsigned char)line_buff[ws]) || line_buff[ws] == '\n')) { + line_buff[ws--] = '\0'; + } + + /* Parse the sun entry line. */ + s_entry = sun_map_parse_read(line_buff); + if (s_entry == NULL) { + plog(XLOG_ERROR,"could not parse Sun style map"); + goto err; + } + + memset(line_buff, 0, sizeof(line_buff)); + + if (s_entry->opt_list != NULL) { + /* write the mount options to the buffer */ + sun_opts2amd(line_buff, sizeof(line_buff), key, s_entry->opt_list); + } + + /* Check if this is a multi-mount entry. */ + if (s_entry->mountpt_list != NULL) { + /* multi-mount point */ + sun_multi2amd(line_buff, sizeof(line_buff), key, s_entry); + retval = xstrdup(line_buff); + } + else { + /* single mount point */ + if (s_entry->fstype != NULL) { + if (NSTREQ(s_entry->fstype, SUN_NFS_TYPE, strlen(SUN_NFS_TYPE))) { + /* NFS Type */ + sun_nfs2amd(line_buff, sizeof(line_buff), key, s_entry); + retval = xstrdup(line_buff); + } + else if (NSTREQ(s_entry->fstype, SUN_HSFS_TYPE, strlen(SUN_HSFS_TYPE))) { + /* HSFS Type (CD fs) */ + sun_hsfs2amd(line_buff, sizeof(line_buff), key, s_entry); + retval = xstrdup(line_buff); + } + /* + * XXX: The following fstypes are not yet supported. + */ + else if (NSTREQ(s_entry->fstype, SUN_AUTOFS_TYPE, strlen(SUN_AUTOFS_TYPE))) { + /* AutoFS Type */ + plog(XLOG_ERROR, "Sun fstype %s is currently not supported by Amd.", + s_entry->fstype); + goto err; + + } + else if (NSTREQ(s_entry->fstype, SUN_CACHEFS_TYPE, strlen(SUN_CACHEFS_TYPE))) { + /* CacheFS Type */ + plog(XLOG_ERROR, "Sun fstype %s is currently not supported by Amd.", + s_entry->fstype); + goto err; + } + else { + plog(XLOG_ERROR, "Sun fstype %s is currently not supported by Amd.", + s_entry->fstype); + goto err; + } + } + else { + plog(XLOG_INFO, "No SUN fstype specified defaulting to NFS."); + sun_nfs2amd(line_buff, sizeof(line_buff), key, s_entry); + retval = xstrdup(line_buff); + } + } + + err: + XFREE(s_entry); + return retval; +} diff --git a/amd/sun_map.h b/amd/sun_map.h new file mode 100644 index 00000000000..75e707ae700 --- /dev/null +++ b/amd/sun_map.h @@ -0,0 +1,123 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 2005 Daniel P. Ottavio + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/amd/sun_map.h + * + */ + +#ifndef _SUN_MAP_H +#define _SUN_MAP_H + +/* host */ +struct sun_host { + qelem head; /* link-list header */ + char *name; /* hostname */ + int weight; /* weight given to the host */ +}; + +/* location */ +struct sun_location { + qelem head; /* link-list header */ + char *path; /* server path */ + struct sun_host *host_list; /* list of hosts */ +}; + +/* sun mount option */ +struct sun_opt { + qelem head; /* link-list header */ + char *str; /* option string */ +}; + +/* mount point */ +struct sun_mountpt { + qelem head; /* link-list header */ + char *path; /* optional mount point path */ + char *fstype; /* filesystem type */ + struct sun_opt *opt_list; /* list of option strings */ + struct sun_location *location_list; /* list of 'struct s2a_location' */ +}; + +/* automount entry */ +struct sun_entry { + qelem head; /* link-list header */ + char *key; /* auto map key */ + char *fstype; /* filesystem type */ + struct sun_opt *opt_list; /* list of mount options */ + struct sun_location *location_list; /* list of mount locations */ + struct sun_mountpt *mountpt_list; /* list of mount points */ +}; + +/* + * automount map file + * + * XXX: Only a place holder structure, not implemented yet. + */ +struct sun_map { + qelem head; /* link-list header */ + char *path; /* directory path of the map file */ + char *mount_dir; /* top level mount point for this map */ + int lookup; /* lookup type i.e file, yp, program, etc. */ + int direct_bool; /* set true if this map is a direct map */ + struct sun_opt *opt_list; /* list of global map options */ + struct sun_opt *include_list; /* list of included map files */ + struct sun_entry *entry_list; /* list of 'struct s2a_entry' */ +}; + +/* + * master map file + * + * XXX: Only a place holder structure, not implemented yet. + */ +struct sun_mmap { + qelem head; /* link-list header */ + struct sun_opt *include_list; /* list of included master maps */ + struct sun_map *amap_list; /* list of 'struct s2a_amap' */ +}; + +struct sun_list { + qelem *first; + qelem *last; +}; + + +/* + * EXTERNS + */ +extern char *sun_entry2amd(const char *, const char *); +extern struct sun_entry *sun_map_parse_read(const char *); +extern void sun_list_add(struct sun_list *, qelem *); + +#endif /* not _SUN_MAP_H */ diff --git a/amd/sun_map_parse.y b/amd/sun_map_parse.y new file mode 100644 index 00000000000..ccf258e2dcc --- /dev/null +++ b/amd/sun_map_parse.y @@ -0,0 +1,492 @@ +%{ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 2005 Daniel P. Ottavio + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/amd/sun_map_parse.y + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include +#include + + +#define SUN_FSTYPE_STR "fstype=" + + +extern int sun_map_lex(void); +extern int sun_map_error(const char *); +extern void sun_map_tok_setbuff(const char *); +extern int sun_map_parse(void); + +struct sun_entry *sun_map_parse_read(const char *); + +static struct sun_list *sun_entry_list = NULL; +static struct sun_list *sun_opt_list = NULL; +static struct sun_list *sun_host_list = NULL; +static struct sun_list *sun_location_list = NULL; +static struct sun_list *mountpt_list = NULL; +static char *tmpFsType = NULL; + + +/* + * Each get* function returns a pointer to the corresponding global + * list structure. If the structure is NULL than a new instance is + * returned. + */ +static struct sun_list *get_sun_opt_list(void); +static struct sun_list *get_sun_host_list(void); +static struct sun_list *get_sun_location_list(void); +static struct sun_list *get_mountpt_list(void); +static struct sun_list *get_sun_entry_list(void); + +%} + +%union { + char strval[2048]; +} + +%token NEWLINE COMMENT WSPACE +%token WORD + +%% + +amap : file + ; + +file : new_lines entries + | entries + ; + +entries : entry + | entry new_lines + | entry new_lines entries + ; + +new_lines : NEWLINE + | NEWLINE new_lines + ; + +entry : locations { + + struct sun_list *list; + struct sun_entry *entry; + + /* allocate an entry */ + entry = CALLOC(struct sun_entry); + + /* + * Assign the global location list to this entry and reset the + * global pointer. Reseting the global pointer will create a new + * list instance next time get_sun_location_list() is called. + */ + list = get_sun_location_list(); + entry->location_list = (struct sun_location *)list->first; + sun_location_list = NULL; + + /* Add this entry to the entry list. */ + sun_list_add(get_sun_entry_list(), (qelem *)entry); +} + +| '-' options WSPACE locations { + + struct sun_list *list; + struct sun_entry *entry; + + entry = CALLOC(struct sun_entry); + + /* An fstype may have been defined in the 'options'. */ + if (tmpFsType != NULL) { + entry->fstype = tmpFsType; + tmpFsType = NULL; + } + + /* + * Assign the global location list to this entry and reset the + * global pointer. Reseting the global pointer will create a new + * list instance next time get_sun_location_list() is called. + */ + list = get_sun_location_list(); + entry->location_list = (struct sun_location *)list->first; + sun_location_list = NULL; + + /* + * Assign the global opt list to this entry and reset the global + * pointer. Reseting the global pointer will create a new list + * instance next time get_sun_opt_list() is called. + */ + list = get_sun_opt_list(); + entry->opt_list = (struct sun_opt *)list->first; + sun_opt_list = NULL; + + /* Add this entry to the entry list. */ + sun_list_add(get_sun_entry_list(), (qelem *)entry); +} + +| mountpoints { + + struct sun_list *list; + struct sun_entry *entry; + + /* allocate an entry */ + entry = CALLOC(struct sun_entry); + + /* + * Assign the global mountpt list to this entry and reset the global + * pointer. Reseting the global pointer will create a new list + * instance next time get_mountpt_list() is called. + */ + list = get_mountpt_list(); + entry->mountpt_list = (struct sun_mountpt *)list->first; + mountpt_list = NULL; + + /* Add this entry to the entry list. */ + sun_list_add(get_sun_entry_list(), (qelem *)entry); +} + +| '-' options WSPACE mountpoints { + + struct sun_list *list; + struct sun_entry *entry; + + /* allocate an entry */ + entry = CALLOC(struct sun_entry); + + /* An fstype may have been defined in the 'options'. */ + if (tmpFsType != NULL) { + entry->fstype = tmpFsType; + tmpFsType = NULL; + } + + /* + * Assign the global mountpt list to this entry and reset the global + * pointer. Reseting the global pointer will create a new list + * instance next time get_mountpt_list() is called. + */ + list = get_mountpt_list(); + entry->mountpt_list = (struct sun_mountpt *)list->first; + mountpt_list = NULL; + + /* + * Assign the global opt list to this entry and reset the global + * pointer. Reseting the global pointer will create a new list + * instance next time get_sun_opt_list() is called. + */ + list = get_sun_opt_list(); + entry->opt_list = (struct sun_opt *)list->first; + sun_opt_list = NULL; + + /* Add this entry to the entry list. */ + sun_list_add(get_sun_entry_list(), (qelem *)entry); +} +; + +mountpoints : mountpoint + | mountpoint WSPACE mountpoints + ; + +mountpoint : WORD WSPACE location { + + struct sun_list *list; + struct sun_mountpt *mountpt; + + /* allocate a mountpt */ + mountpt = CALLOC(struct sun_mountpt); + + /* + * Assign the global loaction list to this entry and reset the + * global pointer. Reseting the global pointer will create a new + * list instance next time get_sun_location_list() is called. + */ + list = get_sun_location_list(); + mountpt->location_list = (struct sun_location *)list->first; + sun_location_list = NULL; + + mountpt->path = xstrdup($1); + + /* Add this mountpt to the mountpt list. */ + sun_list_add(get_mountpt_list(), (qelem *)mountpt); +} + +| WORD WSPACE '-' options WSPACE location { + + struct sun_list *list; + struct sun_mountpt *mountpt; + + /* allocate a mountpt */ + mountpt = CALLOC(struct sun_mountpt); + + /* An fstype may have been defined in the 'options'. */ + if (tmpFsType != NULL) { + mountpt->fstype = tmpFsType; + tmpFsType = NULL; + } + + /* + * Assign the global location list to this entry and reset the + * global pointer. Reseting the global pointer will create a new + * list instance next time get_sun_location_list() is called. + */ + list = get_sun_location_list(); + mountpt->location_list = (struct sun_location *)list->first; + sun_location_list = NULL; + + /* + * Assign the global opt list to this entry and reset the global + * pointer. Reseting the global pointer will create a new list + * instance next time get_sun_opt_list() is called. + */ + list = get_sun_opt_list(); + mountpt->opt_list = (struct sun_opt *)list->first; + sun_opt_list = NULL; + + mountpt->path = xstrdup($1); + + /* Add this mountpt to the mountpt list. */ + sun_list_add(get_mountpt_list(), (qelem *)mountpt); +} +; + +locations : location + | location WSPACE locations + ; + +location : hosts ':' WORD { + + struct sun_list *list; + struct sun_location *location; + + /* allocate a new location */ + location = CALLOC(struct sun_location); + + /* + * Assign the global opt list to this entry and reset the global + * pointer. Reseting the global pointer will create a new list + * instance next time get_sun_opt_list() is called. + */ + list = get_sun_host_list(); + location->host_list = (struct sun_host *)list->first; + sun_host_list = NULL; + + location->path = xstrdup($3); + + /* Add this location to the location list. */ + sun_list_add(get_sun_location_list(), (qelem *)location); +} + +| ':' WORD { + + struct sun_location *location; + + /* allocate a new location */ + location = CALLOC(struct sun_location); + + location->path = xstrdup($2); + + /* Add this location to the location list. */ + sun_list_add(get_sun_location_list(), (qelem *)location); +} +; + +hosts : host + | host ',' hosts + ; + +host : WORD { + + /* allocate a new host */ + struct sun_host *host = CALLOC(struct sun_host); + + host->name = xstrdup($1); + + /* Add this host to the host list. */ + sun_list_add(get_sun_host_list(),(qelem *)host); +} + +| WORD weight { + + /* + * It is assumed that the host for this rule was allocated by the + * 'weight' rule and assigned to be the last host item on the host + * list. + */ + struct sun_host *host = (struct sun_host *)sun_host_list->last; + + host->name = xstrdup($1); +} +; + +weight : '(' WORD ')' { + + int val; + /* allocate a new host */ + struct sun_host *host = CALLOC(struct sun_host); + + val = atoi($2); + + host->weight = val; + + /* Add this host to the host list. */ + sun_list_add(get_sun_host_list(), (qelem *)host); +} +; + +options : option + | option ',' options + ; + +option : WORD { + + char *type; + + /* check if this is an fstype option */ + if ((type = strstr($1,SUN_FSTYPE_STR)) != NULL) { + /* parse out the fs type from the Sun fstype keyword */ + if ((type = type + strlen(SUN_FSTYPE_STR)) != NULL) { + /* + * This global fstype str will be assigned to the current being + * parsed later in the parsing. + */ + tmpFsType = xstrdup(type); + } + } + else { + /* + * If it is not an fstype option allocate an opt struct and assign + * the value. + */ + struct sun_opt *opt = CALLOC(struct sun_opt); + opt->str = xstrdup($1); + /* Add this opt to the opt list. */ + sun_list_add(get_sun_opt_list(), (qelem *)opt); + } +} + +; + +%% + +/* + * Parse 'map_data' which is assumed to be a Sun-syle map. If + * successful a sun_entry is returned. + * + * The parser is designed to parse map entries with out the keys. For + * example the entry: + * + * usr -ro pluto:/usr/local + * + * should be passed to the parser as: + * + * -ro pluto:/usr/local + * + * The reason for this is that the Amd info services already strip off + * the key when they read map info. + */ +struct sun_entry * +sun_map_parse_read(const char *map_data) +{ + struct sun_entry *retval = NULL; + + /* pass map_data to lex */ + sun_map_tok_setbuff(map_data); + + /* call yacc */ + sun_map_parse(); + + if (sun_entry_list != NULL) { + /* return the first Sun entry in the list */ + retval = (struct sun_entry*)sun_entry_list->first; + sun_entry_list = NULL; + } + else { + plog(XLOG_ERROR, "Sun map parser did not produce data structs."); + } + + return retval; +} + + +static struct sun_list * +get_sun_entry_list(void) +{ + if (sun_entry_list == NULL) { + sun_entry_list = CALLOC(struct sun_list); + } + return sun_entry_list; +} + + +static struct sun_list * +get_mountpt_list(void) +{ + if (mountpt_list == NULL) { + mountpt_list = CALLOC(struct sun_list); + } + return mountpt_list; +} + + +static struct sun_list * +get_sun_location_list(void) +{ + if (sun_location_list == NULL) { + sun_location_list = CALLOC(struct sun_list); + } + return sun_location_list; +} + + +static struct sun_list * +get_sun_host_list(void) +{ + if (sun_host_list == NULL) { + sun_host_list = CALLOC(struct sun_list); + } + return sun_host_list; +} + + +static struct sun_list * +get_sun_opt_list(void) +{ + if (sun_opt_list == NULL) { + sun_opt_list = CALLOC(struct sun_list); + } + return sun_opt_list; +} diff --git a/amd/sun_map_tok.l b/amd/sun_map_tok.l new file mode 100644 index 00000000000..f979bea4cf1 --- /dev/null +++ b/amd/sun_map_tok.l @@ -0,0 +1,233 @@ +%{ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 2005 Daniel P. Ottavio + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/amd/sun_map_tok.l + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +/* + * Some systems include a definition for the macro ECHO in , + * and their (bad) version of lex defines it too at the very beginning of + * the generated lex.yy.c file (before it can be easily undefined), + * resulting in a conflict. So undefine it here before needed. + * Luckily, it does not appear that this macro is actually used in the rest + * of the generated lex.yy.c file. + */ +#ifdef ECHO +# undef ECHO +#endif /* ECHO */ +#include +#include +#include +/* and once again undefine this, just in case */ +#ifdef ECHO +# undef ECHO +#endif /* ECHO */ + +/* + * There are some things that need to be defined only if using GNU flex. + * These must not be defined if using standard lex + */ +#ifdef FLEX_SCANNER +# ifndef ECHO +# define ECHO __IGNORE(fwrite( yytext, yyleng, 1, yyout )) +# endif /* not ECHO */ +#endif /* FLEX_SCANNER */ + +int yylex(void); +int sun_map_error(const char *); + +/* + * We need to configure lex to parse from a string + * instead of a file. Each version of lex has it's + * own way of doing this (sigh). + */ + +/* assign the buffer to parse */ +void sun_map_tok_setbuff(const char* buff); + +/* buffer that contains the string to parse */ +const char *sun_map_tok_buff = NULL; + +#ifdef FLEX_SCANNER +/* + * The flex scanner uses the YY_INPUT to parse the input. + * We need to redefine it so that it can parse strings. + * In addition to the above string buffer we need to have + * a position pointer and a end pointer. + */ + +/* current position of the buffer */ +const char *sun_map_tok_pos = NULL; + +/* size of the buffer */ +const char *sun_map_tok_end = NULL; + +/* copies the current position + maxsize into buff */ +int sun_map_input(char *buff, int maxsize); + +# undef YY_INPUT +# define YY_INPUT(buff,result,maxsize) (result = sun_map_input(buff,maxsize)) + +#else +/* + * If this is not Flex than fall back to an AT&T style lex. + * We can parse strings by redefining input and unput. + */ +#undef input +#undef unput +#define input() (*(char *)sun_map_tok_buff++) +#define unput(c) (*(char *)--sun_map_tok_buff = c) + +#endif /* FLEX_SCANNER */ + +/* + * some systems such as DU-4.x have a different GNU flex in /usr/bin + * which automatically generates yywrap macros and symbols. So I must + * distinguish between them and when yywrap is actually needed. + */ +#if !defined(yywrap) || defined(yylex) +int yywrap(void); +#endif /* not yywrap or yylex */ + +/* no need to use yywrap() */ +#define YY_SKIP_YYWRAP + +int sun_map_line = 1; +int sun_map_tokpos = 1; + +%} + +/* This option causes Solaris lex to fail. Use flex. See BUGS file */ +/* no need to use yyunput() */ +%option nounput +%option noinput + +/* allocate more output slots so lex scanners don't run out of mem */ +%o 1024 + +WORD_REX [A-Za-z0-9_/&\.$=]+[A-Za-z0-9_/&\.$=-]* +COMMENT_REX ^#.*\n +WSPACE_REX [ \t]* +NEWLINE_REX [ \t]*\n +CONTINUE_REX "\\"\n + +%% + +{WORD_REX} { + sun_map_tokpos += yyleng; + xstrlcpy((char *)sun_map_lval.strval,(const char *)yytext,sizeof(sun_map_lval.strval)); + return WORD; + } + +{WSPACE_REX} { + sun_map_tokpos += yyleng; + return WSPACE; + } + +{NEWLINE_REX} { + sun_map_tokpos = 0; + sun_map_line++; + return NEWLINE; + } + +{CONTINUE_REX} { + sun_map_tokpos = 0; + sun_map_line++; + } + +{COMMENT_REX} { + sun_map_line++; + } + +. { + return yytext[0]; + } + +%% + + +int +sun_map_error(const char* s) +{ + return 1; +} + +#ifdef FLEX_SCANNER +void +sun_map_tok_setbuff(const char* buff) +{ + sun_map_tok_end = buff + strlen(buff); + sun_map_tok_pos = buff; + sun_map_tok_buff = buff; +} + + +int +sun_map_input(char *buff, int maxsize) +{ + int size = MIN(maxsize, (sun_map_tok_end - sun_map_tok_pos)); + if (size > 0) { + memcpy(buff,sun_map_tok_pos,size); + sun_map_tok_pos += size; + } + + return size; +} +#else +void +sun_map_tok_setbuff(const char* buff) +{ + sun_map_tok_buff = buff; +} + +#endif /* FLEX_SCANNER */ + +/* + * some systems such as DU-4.x have a different GNU flex in /usr/bin + * which automatically generates yywrap macros and symbols. So I must + * distinguish between them and when yywrap is actually needed. + */ +#if !defined(yywrap) || defined(yylex) +int yywrap(void) +{ + return 1; +} +#endif /* not yywrap or yylex */ diff --git a/amd/test1.sh b/amd/test1.sh new file mode 100755 index 00000000000..44cafbcbc71 --- /dev/null +++ b/amd/test1.sh @@ -0,0 +1,2 @@ +#!/bin/sh +./amd -v 2> /dev/null diff --git a/amq/Makefile.am b/amq/Makefile.am new file mode 100644 index 00000000000..ec54eb5ae0f --- /dev/null +++ b/amq/Makefile.am @@ -0,0 +1,41 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Makefile for amq/ directory +# Author: Erez Zadok + +sbin_PROGRAMS = amq +bin_PROGRAMS = pawd + +# man pages +man_MANS = amq.8 pawd.1 + +# headers this depends on, not to be installed +noinst_HEADERS = amq.h + +amq_SOURCES = amq.c amq_clnt.c amq_xdr.c +pawd_SOURCES = amq_clnt.c amq_xdr.c pawd.c + +LDADD = ../libamu/libamu.la + +AM_CPPFLAGS = -I$(top_srcdir)/include + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) + +# dependencies +$(PROGRAMS): $(LDADD) +$(amq_OBJECTS) $(pawd_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) diff --git a/amq/Makefile.in b/amq/Makefile.in new file mode 100644 index 00000000000..13cd97bc89e --- /dev/null +++ b/amq/Makefile.in @@ -0,0 +1,851 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Makefile for amq/ directory +# Author: Erez Zadok + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +sbin_PROGRAMS = amq$(EXEEXT) +bin_PROGRAMS = pawd$(EXEEXT) +subdir = amq +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ + $(noinst_HEADERS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" +PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) +am_amq_OBJECTS = amq.$(OBJEXT) amq_clnt.$(OBJEXT) amq_xdr.$(OBJEXT) +amq_OBJECTS = $(am_amq_OBJECTS) +amq_LDADD = $(LDADD) +amq_DEPENDENCIES = ../libamu/libamu.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_pawd_OBJECTS = amq_clnt.$(OBJEXT) amq_xdr.$(OBJEXT) pawd.$(OBJEXT) +pawd_OBJECTS = $(am_pawd_OBJECTS) +pawd_LDADD = $(LDADD) +pawd_DEPENDENCIES = ../libamu/libamu.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(amq_SOURCES) $(pawd_SOURCES) +DIST_SOURCES = $(amq_SOURCES) $(pawd_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man1dir = $(mandir)/man1 +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# man pages +man_MANS = amq.8 pawd.1 + +# headers this depends on, not to be installed +noinst_HEADERS = amq.h +amq_SOURCES = amq.c amq_clnt.c amq_xdr.c +pawd_SOURCES = amq_clnt.c amq_xdr.c pawd.c +LDADD = ../libamu/libamu.la +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu amq/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu amq/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +amq$(EXEEXT): $(amq_OBJECTS) $(amq_DEPENDENCIES) $(EXTRA_amq_DEPENDENCIES) + @rm -f amq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(amq_OBJECTS) $(amq_LDADD) $(LIBS) + +pawd$(EXEEXT): $(pawd_OBJECTS) $(pawd_DEPENDENCIES) $(EXTRA_pawd_DEPENDENCIES) + @rm -f pawd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pawd_OBJECTS) $(pawd_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amq_clnt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amq_xdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pawd.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) +install-man8: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-sbinPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-sbinPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man1 install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-man \ + uninstall-sbinPROGRAMS + +uninstall-man: uninstall-man1 uninstall-man8 + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool \ + clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man1 install-man8 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sbinPROGRAMS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-man uninstall-man1 uninstall-man8 \ + uninstall-sbinPROGRAMS + + +# dependencies +$(PROGRAMS): $(LDADD) +$(amq_OBJECTS) $(pawd_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/amq/amq.8 b/amq/amq.8 index 203a5293801..feff75433ea 100644 --- a/amq/amq.8 +++ b/amq/amq.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1990 Jan-Simon Pendry .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -36,17 +32,16 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %W% (Berkeley) %G% .\" -.\" $Id: amq.8,v 1.15.2.1 2006/01/02 18:48:24 ezk Exp $ +.\" File: am-utils/amq/amq.8 .\" -.TH AMQ 8 "25 April 1989" +.TH AMQ 8 "15 September 2011" .SH NAME amq \- automounter query tool .SH SYNOPSIS .B amq [ -.BI \-fmpsvwHTU +.BI \-fimpqsvwHTU ] [ .BI \-h " hostname" ] [ @@ -93,6 +88,10 @@ an cluster, the root server is queried by default, since that is the system on which the automounter is normally run. +.TP +.BI \-i +Print information about the mount maps. + .TP .BI \-l " log_file" Tell amd to use @@ -116,6 +115,13 @@ search through the process table. This option is used in the .I ctl-amd script. +.TP +.B \-q +Suppress error messages produced when attempting synchronous unmounts +with the +.B \-u +option. + .TP .B \-s Ask the automounter to provide system-wide mount statistics. @@ -129,6 +135,16 @@ information about them. Unmounts are requested, not forced. They merely cause the mounted filesystem to timeout, which will be picked up by .BR amd 's main scheduler thus causing the normal timeout action to be taken. +If the +.B \-u +option is repeated, +.B amq +will attempt to unmount the file system synchronously by waiting until +the timeout action is taken and returning an error if the unmount +fails. +Any error messages produced may be suppressed with the +.B \-q +option. .TP .B \-v @@ -141,7 +157,7 @@ option. .TP .B \-w Translate a full pathname as returned by -.IR getpwd (3) +.IR getcwd (3) into a short .B Amd pathname that goes through its mount points. This option requires that @@ -152,10 +168,11 @@ is running. .BI \-x " log_options" Ask the automounter to use the logging options specified in .I log_options -from now on. +from now on. Note that the "fatal" and "error" options cannot be turned +off. .TP -.BI \-D " log_options" +.BI \-D " debug_options" Ask the automounter to use the debugging options specified in .I debug_options from now on. @@ -236,7 +253,7 @@ amd: ALL .SH "SEE ALSO" .BR amd (8), -.BR ctl-amd (8), +.\" .BR ctl-amd (8), .BR amd.conf (5), .BR hosts_access (5). .LP diff --git a/amq/amq.c b/amq/amq.c index 2379b621476..e99732fded5 100644 --- a/amq/amq.c +++ b/amq/amq.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -53,14 +49,17 @@ /* locals */ static int flush_flag; -static int minfo_flag; static int getpid_flag; -static int unmount_flag; -static int stats_flag; -static int getvers_flag; -static int amd_program_number = AMQ_PROGRAM; -static int use_tcp_flag, use_udp_flag; static int getpwd_flag; +static int getvers_flag; +static int minfo_flag; +static int mapinfo_flag; +static int quiet_flag; +static int stats_flag; +static int unmount_flag; +static int use_tcp_flag; +static int use_udp_flag; +static u_long amd_program_number = AMQ_PROGRAM; static char *debug_opts; static char *amq_logfile; static char *xlog_optstr; @@ -77,6 +76,17 @@ enum show_opt { }; +static void +time_print(time_type tt) +{ + time_t t = (time_t)tt; + struct tm *tp = localtime(&t); + printf("%02d/%02d/%04d %02d:%02d:%02d", + tp->tm_mon + 1, tp->tm_mday, + tp->tm_year < 1900 ? tp->tm_year + 1900 : tp->tm_year, + tp->tm_hour, tp->tm_min, tp->tm_sec); +} + /* * If (e) is Calc then just calculate the sizes * Otherwise display the mount node on stdout @@ -101,8 +111,7 @@ show_mti(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, int *twid) case Full: { - struct tm *tp = localtime((time_t *) ((voidp) &mt->mt_mounttime)); - printf("%-*.*s %-*.*s %-*.*s %s\n\t%-5d %-7d %-6d %-7d %-7d %-6d %02d/%02d/%04d %02d:%02d:%02d\n", + printf("%-*.*s %-*.*s %-*.*s %s\n\t%-5d %-7d %-6d %-7d %-7d %-6d", *dwid, *dwid, *mt->mt_directory ? mt->mt_directory : "/", /* XXX */ *twid, *twid, @@ -116,18 +125,15 @@ show_mti(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, int *twid) mt->mt_lookup, mt->mt_readdir, mt->mt_readlink, - mt->mt_statfs, - - tp->tm_mon + 1, tp->tm_mday, - tp->tm_year < 1900 ? tp->tm_year + 1900 : tp->tm_year, - tp->tm_hour, tp->tm_min, tp->tm_sec); + mt->mt_statfs); + time_print(mt->mt_mounttime); + printf("\n"); } break; case Stats: { - struct tm *tp = localtime((time_t *) ((voidp) &mt->mt_mounttime)); - printf("%-*.*s %-5d %-7d %-6d %-7d %-7d %-6d %02d/%02d/%02d %02d:%02d:%04d\n", + printf("%-*.*s %-5d %-7d %-6d %-7d %-7d %-6d ", *dwid, *dwid, *mt->mt_directory ? mt->mt_directory : "/", /* XXX */ @@ -136,11 +142,9 @@ show_mti(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, int *twid) mt->mt_lookup, mt->mt_readdir, mt->mt_readlink, - mt->mt_statfs, - - tp->tm_mon + 1, tp->tm_mday, - tp->tm_year < 1900 ? tp->tm_year + 1900 : tp->tm_year, - tp->tm_hour, tp->tm_min, tp->tm_sec); + mt->mt_statfs); + time_print(mt->mt_mounttime); + printf("\n"); } break; @@ -229,7 +233,7 @@ show_mi(amq_mount_info_list *ml, enum show_opt e, int *mwid, int *dwid, int *twi { for (i = 0; i < ml->amq_mount_info_list_len; i++) { amq_mount_info *mi = &ml->amq_mount_info_list_val[i]; - printf("%-*.*s %-*.*s %-*.*s %-3d %s is %s", + printf("%-*.*s %-*.*s %-*.*s %-3d %s is %s ", *mwid, *mwid, mi->mi_mountinfo, *dwid, *dwid, mi->mi_mountpt, *twid, *twid, mi->mi_type, @@ -251,6 +255,55 @@ show_mi(amq_mount_info_list *ml, enum show_opt e, int *mwid, int *dwid, int *twi } } +static void +show_map(amq_map_info *mi) +{ +} + +static void +show_mapinfo(amq_map_info_list *ml, enum show_opt e, int *nwid, int *wwid) +{ + u_int i; + + switch (e) { + + case Calc: + { + for (i = 0; i < ml->amq_map_info_list_len; i++) { + amq_map_info *mi = &ml->amq_map_info_list_val[i]; + int nw = strlen(mi->mi_name); + int ww = strlen(mi->mi_wildcard ? mi->mi_wildcard : "(null"); + if (nw > *nwid) + *nwid = nw; + if (ww > *wwid) + *wwid = ww; + } + } + break; + + case Full: + { + printf("%-*.*s %-*.*s %-8.8s %-7.7s %-7.7s %-7.7s %-s Modified\n", + *nwid, *nwid, "Name", + *wwid, *wwid, "Wild", + "Flags", "Refcnt", "Entries", "Reloads", "Stat"); + for (i = 0; i < ml->amq_map_info_list_len; i++) { + amq_map_info *mi = &ml->amq_map_info_list_val[i]; + printf("%-*.*s %*.*s %-8x %-7d %-7d %-7d %s ", + *nwid, *nwid, mi->mi_name, + *wwid, *wwid, mi->mi_wildcard, + mi->mi_flags, mi->mi_refc, mi->mi_nentries, mi->mi_reloads, + mi->mi_up == -1 ? "root" : (mi->mi_up ? " up" : "down")); + time_print(mi->mi_modify); + fputc('\n', stdout); + } + } + break; + + default: + break; + } +} /* * Display general mount statistics @@ -287,6 +340,72 @@ cluster_server(void) #endif /* defined(HAVE_CLUSTER_H) && defined(HAVE_CNODEID) && defined(HAVE_GETCCENT) */ +static void +print_umnt_error(amq_sync_umnt *rv, const char *fs) +{ + + switch (rv->au_etype) { + case AMQ_UMNT_OK: + break; + case AMQ_UMNT_FAILED: + printf("unmount failed: %s\n", strerror(rv->au_errno)); + break; + case AMQ_UMNT_FORK: + if (rv->au_errno == 0) + printf("%s is not mounted\n", fs); + else + printf("falling back to asynchronous unmount: %s\n", + strerror(rv->au_errno)); + break; + case AMQ_UMNT_READ: + printf("pipe read error: %s\n", strerror(rv->au_errno)); + break; + case AMQ_UMNT_SERVER: + printf("amd server down\n"); + break; + case AMQ_UMNT_SIGNAL: + printf("got signal: %d\n", rv->au_signal); + break; + /* + * Omit default so the compiler can check for missing cases. + * + default: + break; + */ + } +} + + +static int +amu_sync_umnt_to_retval(amq_sync_umnt *rv) +{ + switch (rv->au_etype) { + case AMQ_UMNT_FORK: + if (rv->au_errno == 0) { + /* + * We allow this error so that things like: + * amq -uu /l/cd0d && eject cd0 + * will work when /l/cd0d is not mounted. + * XXX - We still print an error message. + */ + return 0; + } + /*FALLTHROUGH*/ + default: + return rv->au_etype; + } +} + + +static int +clnt_failed(CLIENT *clnt, char *server) +{ + fprintf(stderr, "%s: ", am_get_progname()); + clnt_perror(clnt, server); + return 1; +} + + /* * MAIN */ @@ -320,7 +439,7 @@ main(int argc, char *argv[]) /* * Parse arguments */ - while ((opt_ch = getopt(argc, argv, "Hfh:l:msuvx:D:pP:TUw")) != -1) + while ((opt_ch = getopt(argc, argv, "Hfh:il:mqsuvx:D:pP:TUw")) != -1) switch (opt_ch) { case 'H': goto show_usage; @@ -335,6 +454,11 @@ main(int argc, char *argv[]) def_server = optarg; break; + case 'i': + mapinfo_flag = 1; + nodefault = 1; + break; + case 'l': amq_logfile = optarg; nodefault = 1; @@ -350,13 +474,18 @@ main(int argc, char *argv[]) nodefault = 1; break; + case 'q': + quiet_flag = 1; + nodefault = 1; + break; + case 's': stats_flag = 1; nodefault = 1; break; case 'u': - unmount_flag = 1; + unmount_flag++; nodefault = 1; break; @@ -403,9 +532,9 @@ main(int argc, char *argv[]) if (errs) { show_usage: fprintf(stderr, "\ -Usage: %s [-fmpsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\ +Usage: %s [-fimpqsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\ \t[-x log_options] [-D debug_options]\n\ -\t[-P program_number] [[-u] directory ...]\n", +\t[-P program_number] [[-u[u]] directory ...]\n", am_get_progname() ); exit(1); @@ -538,16 +667,19 @@ Usage: %s [-fmpsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\ */ if (getpwd_flag) { char path[MAXPATHLEN+1]; - char *wd = getcwd(path, MAXPATHLEN+1); - amq_mount_tree_list *mlp = amqproc_export_1((voidp) 0, clnt); + char *wd; + amq_mount_tree_list *mlp; amq_mount_tree_p mt; u_int i; int flag; + wd = getcwd(path, MAXPATHLEN+1); if (!wd) { - perror("getcwd"); + fprintf(stderr, "%s: getcwd failed (%s)", am_get_progname(), + strerror(errno)); exit(1); } + mlp = amqproc_export_1((voidp) 0, clnt); for (i = 0; mlp && i < mlp->amq_mount_tree_list_len; i++) { mt = mlp->amq_mount_tree_list_val[i]; while (1) { @@ -582,6 +714,26 @@ Usage: %s [-fmpsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\ } } + + /* + * Map + */ + if (mapinfo_flag) { + int dummy; + amq_map_info_list *ml = amqproc_getmapinfo_1(&dummy, clnt); + if (ml) { + int mwid = 0, wwid = 0; + show_mapinfo(ml, Calc, &mwid, &wwid); + mwid++; + if (wwid) + wwid++; + show_mapinfo(ml, Full, &mwid, &wwid); + } else { + fprintf(stderr, "%s: amd on %s cannot provide map info\n", + am_get_progname(), server); + } + } + /* * Get Version */ @@ -616,7 +768,20 @@ Usage: %s [-fmpsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\ if (optind < argc) { do { char *fs = argv[optind++]; - if (unmount_flag) { + if (unmount_flag > 1) { + amq_sync_umnt *sup; + /* + * Synchronous unmount request + */ + sup = amqproc_sync_umnt_1(&fs, clnt); + if (sup) { + if (quiet_flag == 0) + print_umnt_error(sup, fs); + errs = amu_sync_umnt_to_retval(sup); + } else { + errs = clnt_failed(clnt, server); + } + } else if (unmount_flag) { /* * Unmount request */ @@ -641,9 +806,7 @@ Usage: %s [-fmpsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\ } xdr_pri_free((XDRPROC_T_TYPE) xdr_amq_mount_tree_p, (caddr_t) mtp); } else { - fprintf(stderr, "%s: ", am_get_progname()); - clnt_perror(clnt, server); - errs = 1; + errs = clnt_failed(clnt, server); } } } while (optind < argc); @@ -656,9 +819,7 @@ Usage: %s [-fmpsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\ if (ms) { show_ms(ms); } else { - fprintf(stderr, "%s: ", am_get_progname()); - clnt_perror(clnt, server); - errs = 1; + errs = clnt_failed(clnt, server); } } else if (!nodefault) { @@ -682,9 +843,7 @@ Usage: %s [-fmpsvwHTU] [-h hostname] [-l log_file|\"syslog\"]\n\ } } else { - fprintf(stderr, "%s: ", am_get_progname()); - clnt_perror(clnt, server); - errs = 1; + errs = clnt_failed(clnt, server); } } exit(errs); diff --git a/amq/amq.h b/amq/amq.h index 2f36b819445..3c894d687f5 100644 --- a/amq/amq.h +++ b/amq/amq.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -51,10 +47,12 @@ extern voidp amqproc_null_1(voidp argp, CLIENT *rqstp); extern amq_mount_tree_p *amqproc_mnttree_1(amq_string *argp, CLIENT *rqstp); extern voidp amqproc_umnt_1(amq_string *argp, CLIENT *rqstp); +extern amq_sync_umnt *amqproc_sync_umnt_1(amq_string *argp, CLIENT *rqstp); extern amq_mount_stats *amqproc_stats_1(voidp argp, CLIENT *rqstp); extern amq_mount_tree_list *amqproc_export_1(voidp argp, CLIENT *rqstp); extern int *amqproc_setopt_1(amq_setopt *argp, CLIENT *rqstp); extern amq_mount_info_list *amqproc_getmntfs_1(voidp argp, CLIENT *rqstp); +extern amq_map_info_list *amqproc_getmapinfo_1(voidp argp, CLIENT *rqstp); extern int *amqproc_mount_1(voidp argp, CLIENT *rqstp); extern amq_string *amqproc_getvers_1(voidp argp, CLIENT *rqstp); extern int *amqproc_getpid_1(voidp argp, CLIENT *rqstp); diff --git a/amq/amq_clnt.c b/amq/amq_clnt.c index ddfeb675c99..c5f1e87d97f 100644 --- a/amq/amq_clnt.c +++ b/amq/amq_clnt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -99,6 +95,23 @@ amqproc_umnt_1(amq_string *argp, CLIENT *clnt) } +amq_sync_umnt * +amqproc_sync_umnt_1(amq_string *argp, CLIENT *clnt) +{ + static amq_sync_umnt res; + enum clnt_stat rv; + + memset((char *) &res, 0, sizeof(res)); + if ((rv = clnt_call(clnt, AMQPROC_SYNC_UMNT, + (XDRPROC_T_TYPE) xdr_amq_string, (SVC_IN_ARG_TYPE) argp, + (XDRPROC_T_TYPE) xdr_amq_sync_umnt, (SVC_IN_ARG_TYPE) &res, + TIMEOUT)) != RPC_SUCCESS) { + return (NULL); + } + return &res; +} + + amq_mount_stats * amqproc_stats_1(voidp argp, CLIENT *clnt) { @@ -161,6 +174,20 @@ amqproc_getmntfs_1(voidp argp, CLIENT *clnt) return (&res); } +amq_map_info_list * +amqproc_getmapinfo_1(voidp argp, CLIENT *clnt) +{ + static amq_map_info_list res; + + memset((char *) &res, 0, sizeof(res)); + if (clnt_call(clnt, AMQPROC_GETMAPINFO, (XDRPROC_T_TYPE) xdr_void, argp, + (XDRPROC_T_TYPE) xdr_amq_map_info_list, + (SVC_IN_ARG_TYPE) &res, TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&res); +} + int * amqproc_mount_1(voidp argp, CLIENT *clnt) diff --git a/amq/amq_xdr.c b/amq/amq_xdr.c index 692a0a40860..b9a1c20fbf1 100644 --- a/amq/amq_xdr.c +++ b/amq/amq_xdr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -187,6 +183,59 @@ xdr_amq_mount_info_list(XDR *xdrs, amq_mount_info_list *objp) return (TRUE); } +bool_t +xdr_amq_map_info(XDR *xdrs, amq_map_info *objp) +{ + if (!xdr_amq_string(xdrs, &objp->mi_name)) { + return (FALSE); + } + + if (!xdr_amq_string(xdrs, &objp->mi_wildcard)) { + return (FALSE); + } + + if (!xdr_time_type(xdrs, &objp->mi_modify)) { + return (FALSE); + } + + if (!xdr_int(xdrs, &objp->mi_flags)) { + return (FALSE); + } + + if (!xdr_int(xdrs, &objp->mi_nentries)) { + return (FALSE); + } + + if (!xdr_int(xdrs, &objp->mi_reloads)) { + return (FALSE); + } + + if (!xdr_int(xdrs, &objp->mi_refc)) { + return (FALSE); + } + + if (!xdr_int(xdrs, &objp->mi_up)) { + return (FALSE); + } + + return (TRUE); +} + + +bool_t +xdr_amq_map_info_list(XDR *xdrs, amq_map_info_list *objp) +{ + if (!xdr_array(xdrs, + (char **) ((voidp) &objp->amq_map_info_list_val), + (u_int *) &objp->amq_map_info_list_len, + ~0, + sizeof(amq_map_info), + (XDRPROC_T_TYPE) xdr_amq_map_info)) { + return (FALSE); + } + return (TRUE); +} + bool_t xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp) diff --git a/amq/pawd.1 b/amq/pawd.1 index 73a16b59b55..ce1b5fc8f61 100644 --- a/amq/pawd.1 +++ b/amq/pawd.1 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1990 Jan-Simon Pendry .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -36,9 +32,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %W% (Berkeley) %G% .\" -.\" $Id: pawd.1,v 1.9.2.1 2006/01/02 18:48:24 ezk Exp $ +.\" File: am-utils/amq/pawd.1 .\" .TH PAWD 1 "6 Jan 1998" .SH NAME @@ -67,9 +62,9 @@ will print the automounter adjusted current working directory. With any number of arguments, it will print the adjusted path of each one of the arguments. .SH "SEE ALSO" +.BR pwd (1). .BR amd (8), .BR amq (8), -.BR pwd (1). .LP ``am-utils'' .BR info (1) diff --git a/amq/pawd.c b/amq/pawd.c index c9a32b16189..bab6657521b 100644 --- a/amq/pawd.c +++ b/amq/pawd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/bootstrap b/bootstrap index 6c351382caa..000b01670ab 100755 --- a/bootstrap +++ b/bootstrap @@ -5,6 +5,16 @@ # this is not meant to go into the distributions # Erez Zadok +validateversion() { + local v="$(autoreconf --version 2>&1 | head -1)" + case "$v" in + *2.69) ;; + *) echo "am-utils requires autoconf 2.69, you have:" + echo " $v" + exit 1;; + esac +} + # test cwd test -f ../amd/amd.c && cd .. if [ ! -f amd/amd.c ]; then @@ -37,67 +47,13 @@ test -f acinclude.m4 && mv -f acinclude.m4 acinclude.m4.old cat TRAILER ) > acinclude.m4 -# generate aclocal.m4 file -echo "AMU: aclocal..." -test -f aclocal.m4 && mv -f aclocal.m4 aclocal.m4.old -# show version -aclocal --version 2>&1 | head -1 -if aclocal ; then +# generate the rest of the scripts +echo "AMU: autoreconf..." +validateversion +if autoreconf -f -i; then : else - echo "aclocal command failed. fix errors and rerun $0." - exit 2 -fi - -# produce new configure.in (temp) script -echo "AMU: autoconf..." -# show version -autoconf --version 2>&1 | head -1 -LOG=/tmp/amu-$$.log -rm -f ${LOG} -autoconf configure.in > configure.new 2> ${LOG} -# until Automake requires Autoconf 2.50, manual says to ignore this -CUTWARNMSG1="warning: AC_PROG_LEX invoked multiple times|do not use m4_(patsubst|regexp):" -egrep -v "${CUTWARNMSG1}" ${LOG} > ${LOG}.new -mv ${LOG}.new ${LOG} -if test -s ${LOG}; then - echo "AUTOCONF ERRORS (MUST FIX):" - cat ${LOG} - rm -f ${LOG} - exit 2 -fi -# now prepare the real configure script -test -f configure && mv -f configure configure.old -mv -f configure.new configure -chmod a+rx configure -rm -f configure.old - -# run autoheader to produce C header .in files -echo "AMU: autoheader..." -# show version -autoheader --version 2>&1 | head -1 -autoheader configure.in > config.h.in 2> ${LOG} -CUTWARNMSG2="autoheader: \`config.h.in' is updated" -egrep -v "${CUTWARNMSG2}" ${LOG} > ${LOG}.new -mv ${LOG}.new ${LOG} -if test -s ${LOG}; then - echo "AUTOHEADER ERRORS (MUST FIX):" - cat ${LOG} - rm -f ${LOG} - exit 2 -fi -rm -f ${LOG} - -# generate makefiles -cmd="automake --add-missing --copy --ignore-deps" -#cmd="automake --add-missing" -echo "AMU: $cmd..." -# show version -automake --version 2>&1 | head -1 -if ${cmd} ; then - : -else - echo "automake command failed. fix errors and rerun $0." + echo "autoreconf command failed. fix errors and rerun $0." exit 2 fi diff --git a/buildall b/buildall new file mode 100755 index 00000000000..f5aaf3aa685 --- /dev/null +++ b/buildall @@ -0,0 +1,364 @@ +#!/bin/sh +# Build all of the am-utils package in a directory A. +# Used by am-utils users. +# Erez Zadok +# +# run "buildall -h" to get usage +# +#set -x + +############################################################################## +# first test if we are in the right directory to run this script +# change to the right directory +test -f ../config.guess && cd .. +test -f ../../config.guess && cd ../.. +pwd=$(pwd) +host_alias=$(cd /tmp; $pwd/config.guess.long) +if test -z "$host_alias" ; then + echo "$0: must run from the source or the A. directory." + echo "$0: cannot find $pwd/config.guess" + exit 1 +else + : +fi + +############################################################################## +# pattern of lines to remove from config.cache (for developers only) +# Example: if you change TRY_COMPILE_NFS, redo these: +#pat='fhandle|nfs_fh|nfs_args|struct_nfs|opt' +#pat='style_|mount_trap|mtype|transport|dref' +#pat='mntent|mnttab' +#pat='nfs_args|fh_len|irix|proto|vers' +#pat='3|proto|tcp|ver|nfs_prot|mtype' +#pat='trap|style|mtype|transport|os_libs|restartable|unmount_args|yp_order' +#pat='yp_all|nsl|nis' + +############################################################################## +# initialize variables (build command, config command, variables) +bld_cmd="" +bld_flags="" +cnf_cmd="" +cnf_flags="-C" # use config.cache cache file +inst_cmd="" +inst_flags="" +mkcnf_cmd="" +vars="" +expvars="" +default=yes + +############################################################################## +# check if CFLAGS or AM_CFLAGS was passed +test -z "$CFLAGS" || vars="$vars CFLAGS=\"${CFLAGS}\"" +test -z "$CFLAGS" || expvars="$expvars CFLAGS" +test -z "$AM_CFLAGS" || vars="$vars AM_CFLAGS=\"${AM_CFLAGS}\"" + +############################################################################## +# functions + +add_gcc_flags1 () { + case "${CC}" in + cc | */cc ) + # do nothing + ;; + * ) + vars="$vars AM_CFLAGS=\"-Werror\"" + AM_CFLAGS="-Werror" + expvars="$expvars AM_CFLAGS" + ;; + esac +} + +add_gcc_flags2 () { + case "${CC}" in + cc | */cc ) + # do nothing + ;; + * ) + vars="$vars AM_CFLAGS=\"-Wall -Werror\"" + AM_CFLAGS="-Wall -Werror" + expvars="$expvars AM_CFLAGS" + ;; + esac +} + +add_shared_flags () { + cnf_cmd="$cnf_cmd --enable-shared --disable-static" +} + +add_prefix_flags () { + cnf_cmd="$cnf_cmd --prefix=/usr/local/AMD" +} + +############################################################################## +# iterate over all options, and set the command to run with any variables +while [ $# != 0 ]; do +case "$1" in + -b ) + # look for GNU make if possible + gmake --version -f /dev/null > /dev/null 2>&1 + if [ $? = 0 ] + then + bld_cmd="${MAKE:-gmake}" + else + bld_cmd="${MAKE:-make}" + fi + default=no + shift + ;; + + -i ) + # look for GNU make if possible + gmake --version -f /dev/null > /dev/null 2>&1 + if [ $? = 0 ] + then + inst_cmd="${MAKE:-gmake} install" + else + inst_cmd="${MAKE:-make} install" + fi + default=no + shift + ;; + + -c ) + cnf_cmd="../configure --enable-debug=yes" +# add_gcc_flags1 + default=no + shift + ;; + + -cs ) + cnf_cmd="../configure --enable-debug=yes" + add_shared_flags +# add_gcc_flags1 + default=no + shift + ;; + + -C ) + cnf_cmd="../configure --enable-debug=yes" + add_gcc_flags2 + default=no + shift + ;; + + -Cs ) + cnf_cmd="../configure --enable-debug=yes" + add_shared_flags + add_gcc_flags2 + default=no + shift + ;; + + -d ) + cnf_cmd="../configure --enable-debug=yes" + add_prefix_flags +# add_gcc_flags1 + default=no + shift + ;; + + -ds ) + cnf_cmd="../configure --enable-debug=yes" + add_prefix_flags + add_shared_flags +# add_gcc_flags1 + default=no + shift + ;; + + -D ) + cnf_cmd="../configure --enable-debug=yes" + add_prefix_flags + add_gcc_flags2 + default=no + shift + ;; + + -Ds ) + cnf_cmd="../configure -enable-debug=yes" +# cnf_cmd="../configure -enable-debug=mem" +# cnf_cmd="../configure --prefix=/usr/local/AMD --enable-debug=yes --enable-shared --disable-static \ +# --enable-cppflags=\"-I${HOME}/ldap/include -I${HOME}/hesiod/include\" \ +# --enable-ldflags=\"-L${HOME}/ldap/lib -L${HOME}/hesiod/lib\"" +# cnf_cmd="$cnf_cmd \ +# --enable-cppflags=-I${HOME}/ldap/include \ +# --enable-ldflags=-L${HOME}/ldap/lib" +# cnf_cmd="../configure -enable-debug=yes --enable-cppflags=-I/usr/local/include --enable-ldflags=-L/usr/local/lib" + add_prefix_flags + add_shared_flags + add_gcc_flags2 + default=no + shift + ;; + + -K ) +# mkcnf_cmd="../m4/mkconf" + mkcnf_cmd="../bootstrap" + if test -f bootstrap ; then + : + else + echo "am-utils maintainer option only!" + exit 1 + fi + default=no + shift + ;; + + -q ) + cnf_cmd="./config.status" + default=no + shift + ;; + + -- ) + shift + cmdline_cnf_flags="$*" + break # from while loop + ;; + + -h | * ) +cat < /dev/null 2>&1 + if [ $? = 0 ] + then + bld_cmd="${MAKE:-gmake}" + else + bld_cmd="${MAKE:-make}" + fi + cnf_cmd="../configure" +else + : +fi + +############################################################################## +# make build directory if needed +if test -d ./A.${host_alias} ; then + : +else + mkdir ./A.${host_alias} +fi +echo "Configuring/building am-utils in directory ./A.${host_alias} ..." +echo cd ./A.${host_alias} +cd ./A.${host_alias} || exit 1 + +############################################################################## +# this is for developers only (remove config.cache entries) +if test -n "$pat"; then + if test -f config.cache; then + egrep $pat config.cache | while read i; do echo ' '$i;done + egrep -v $pat config.cache > tmp.$$ && \ + mv config.cache config.cache.old && mv tmp.$$ config.cache + else + : + fi +else + : +fi + +############################################################################## +# Some system's /bin/sh has limits/bugs which prevent it from being used +# with configure +case "${host_alias}" in + *hpux9* | *aix5.1* ) + if test -n "$cnf_cmd"; then + if test -f /bin/bash; then + cnf_cmd="/bin/bash $cnf_cmd" + elif test -f /bin/ksh; then + cnf_cmd="/bin/ksh $cnf_cmd" + fi + else + : + fi + echo "WARNING: do not use /bin/make under this system." + echo "Instead, use GNU make or 'ksh ./configure' directly." + ;; + mips-sgi-irix5.2) + echo "WARNING: do not use /bin/make under this system." + echo "Instead, use GNU make or ./configure directly." + ;; +esac + +############################################################################## +# see if need to run mkconf +if test -n "$mkcnf_cmd"; then + echo $mkcnf_cmd + $mkcnf_cmd || exit 1 +else + : +fi + +############################################################################## +# see if need to [re]configure +if test -n "$cnf_cmd"; then + if test -n "$vars"; then + echo $vars + eval $vars + echo export $expvars + export $expvars + else + : + fi + if test -z "${cnf_flags}${extra_cnf_flags}"; then + echo $cnf_cmd $cmdline_cnf_flags + eval $cnf_cmd $cmdline_cnf_flags || exit 1 + else + echo $cnf_cmd $cnf_flags $extra_cnf_flags $cmdline_cnf_flags + eval $cnf_cmd $cnf_flags $extra_cnf_flags $cmdline_cnf_flags || exit 1 + fi +else + : +fi + +############################################################################## +# if need to [re]build +if test -n "$bld_cmd"; then + echo $bld_cmd $bld_flags + $bld_cmd $bld_flags || exit 1 +else + : +fi + +############################################################################## +# if need to install +if test -n "$inst_cmd"; then + echo $inst_cmd $inst_flags + $inst_cmd $inst_flags || exit 1 +else + : +fi + +############################################################################## diff --git a/compile b/compile new file mode 100755 index 00000000000..531136b068e --- /dev/null +++ b/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/conf/autofs/autofs_default.c b/conf/autofs/autofs_default.c new file mode 100644 index 00000000000..ae75f4de553 --- /dev/null +++ b/conf/autofs/autofs_default.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 1999-2003 Ion Badulescu + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/autofs/autofs_default.c + * + */ + +/* + * Default Automounter filesystem (empty) + */ diff --git a/conf/autofs/autofs_default.h b/conf/autofs/autofs_default.h new file mode 100644 index 00000000000..6668eb64025 --- /dev/null +++ b/conf/autofs/autofs_default.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 1999-2003 Ion Badulescu + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/autofs/autofs_default.h + * + */ + +/* + * Default automounter filesystem + */ + +/* + * Autofs is not supported on this platform, + * so disable it if it gets detected. + */ + +#ifdef MNTTYPE_AUTOFS +# undef MNTTYPE_AUTOFS +#endif /* MNTTYPE_AUTOFS */ +#ifdef MNTTAB_TYPE_AUTOFS +# undef MNTTAB_TYPE_AUTOFS +#endif /* MNTTAB_TYPE_AUTOFS */ +#ifdef HAVE_FS_AUTOFS +# undef HAVE_FS_AUTOFS +#endif /* HAVE_FS_AUTOFS */ diff --git a/conf/autofs/autofs_linux.c b/conf/autofs/autofs_linux.c new file mode 100644 index 00000000000..d543979d3e4 --- /dev/null +++ b/conf/autofs/autofs_linux.c @@ -0,0 +1,909 @@ +/* + * Copyright (c) 1999-2003 Ion Badulescu + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/autofs/autofs_linux.c + * + */ + +/* + * Automounter filesystem for Linux + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +#ifdef HAVE_FS_AUTOFS + +/* + * MACROS: + */ + +#define AUTOFS_MIN_VERSION 3 +#if AUTOFS_MAX_PROTO_VERSION >= 5 +/* + * Autofs version 5 support is experimental; change this to 5 you want + * to play with, it. There are reports it does not work. + */ +#define AUTOFS_MAX_VERSION 4 /* we only know up to version 5 */ +#else +#define AUTOFS_MAX_VERSION AUTOFS_MAX_PROTO_VERSION +#endif + +/* + * STRUCTURES: + */ + +/* + * VARIABLES: + */ + +static int autofs_max_fds; +static am_node **hash; +static int *list; +static int numfds = 0; +static int bind_works = 1; + + +static void +hash_init(void) +{ + int i; + struct rlimit rlim; + + if (getrlimit(RLIMIT_NOFILE, &rlim) < 0) { + plog(XLOG_ERROR, "getrlimit failed, defaulting to 256 fd's"); + autofs_max_fds = 256; + } else { + autofs_max_fds = (rlim.rlim_cur > 1024) ? 1024 : rlim.rlim_cur; + plog(XLOG_INFO, "%d fd's available for autofs", autofs_max_fds); + } + + list = malloc(autofs_max_fds * sizeof(*list)); + hash = malloc(autofs_max_fds * sizeof(*hash)); + + for (i = 0 ; i < autofs_max_fds; i++) { + hash[i] = NULL; + list[i] = -1; + } +} + + +static void +hash_insert(int fd, am_node *mp) +{ + if (hash[fd] != 0) + plog(XLOG_ERROR, "file descriptor %d already in the hash", fd); + + hash[fd] = mp; + list[numfds] = fd; + numfds++; +} + + +static void +hash_delete(int fd) +{ + int i; + + if (hash[fd] == 0) + plog(XLOG_WARNING, "file descriptor %d not in the hash", fd); + + hash[fd] = NULL; + numfds--; + for (i = 0; i < numfds; i++) + if (list[i] == fd) { + list[i] = list[numfds]; + break; + } +} + + +int +autofs_get_fh(am_node *mp) +{ + int fds[2]; + autofs_fh_t *fh; + + plog(XLOG_DEBUG, "autofs_get_fh for %s", mp->am_path); + if (pipe(fds) < 0) + return errno; + + /* sanity check */ + if (fds[0] > autofs_max_fds) { + close(fds[0]); + close(fds[1]); + return EMFILE; + } + + fh = ALLOC(autofs_fh_t); + fh->fd = fds[0]; + fh->kernelfd = fds[1]; + fh->ioctlfd = -1; + fh->pending_mounts = NULL; + fh->pending_umounts = NULL; + + mp->am_autofs_fh = fh; + + return 0; +} + + +void +autofs_mounted(am_node *mp) +{ + autofs_fh_t *fh = mp->am_autofs_fh; + unsigned long timeout = gopt.am_timeo; + + close(fh->kernelfd); + fh->kernelfd = -1; + + autofs_get_mp(mp); + + /* Get autofs protocol version */ + if (ioctl(fh->ioctlfd, AUTOFS_IOC_PROTOVER, &fh->version) < 0) { + plog(XLOG_ERROR, "AUTOFS_IOC_PROTOVER: %s", strerror(errno)); + fh->version = AUTOFS_MIN_VERSION; + plog(XLOG_ERROR, "autofs: assuming protocol version %d", fh->version); + } else + plog(XLOG_INFO, "autofs: using protocol version %d", fh->version); + + /* set expiration timeout */ + if (ioctl(fh->ioctlfd, AUTOFS_IOC_SETTIMEOUT, &timeout) < 0) + plog(XLOG_ERROR, "AUTOFS_IOC_SETTIMEOUT: %s", strerror(errno)); + + /* tell the daemon to call us for expirations */ + mp->am_autofs_ttl = clocktime(NULL) + gopt.am_timeo_w; +} + + +void +autofs_get_mp(am_node *mp) +{ + autofs_fh_t *fh = mp->am_autofs_fh; + dlog("autofs: getting mount point"); + if (fh->ioctlfd < 0) + fh->ioctlfd = open(mp->am_path, O_RDONLY); + hash_insert(fh->fd, mp); +} + + +void +autofs_release_mp(am_node *mp) +{ + autofs_fh_t *fh = mp->am_autofs_fh; + dlog("autofs: releasing mount point"); + if (fh->ioctlfd >= 0) { + close(fh->ioctlfd); + fh->ioctlfd = -1; + } + /* + * take the kernel fd out of the hash/fdset + * so select() doesn't go crazy if the umount succeeds + */ + if (fh->fd >= 0) + hash_delete(fh->fd); +} + + +void +autofs_release_fh(am_node *mp) +{ + autofs_fh_t *fh = mp->am_autofs_fh; + struct autofs_pending_mount **pp, *p; + struct autofs_pending_umount **upp, *up; + + dlog("autofs: releasing file handle"); + if (fh) { + /* + * if a mount succeeded, the kernel fd was closed on + * the amd side, so it might have been reused. + * we set it to -1 after closing it, to avoid the problem. + */ + if (fh->kernelfd >= 0) + close(fh->kernelfd); + + if (fh->ioctlfd >= 0) + close(fh->ioctlfd); + + if (fh->fd >= 0) + close(fh->fd); + + pp = &fh->pending_mounts; + while (*pp) { + p = *pp; + XFREE(p->name); + *pp = p->next; + XFREE(p); + } + + upp = &fh->pending_umounts; + while (*upp) { + up = *upp; + XFREE(up->name); + *upp = up->next; + XFREE(up); + } + + XFREE(fh); + mp->am_autofs_fh = NULL; + } +} + + +void +autofs_add_fdset(fd_set *readfds) +{ + int i; + for (i = 0; i < numfds; i++) + FD_SET(list[i], readfds); +} + + +static ssize_t +autofs_get_pkt(int fd, void *buf, size_t bytes) +{ + ssize_t i; + + do { + i = read(fd, buf, bytes); + + if (i <= 0) + break; + + buf = (char *)buf + i; + bytes -= i; + } while (bytes); + + return bytes; +} + + +static void +send_fail(int fd, autofs_wqt_t token) +{ + if (token == 0) + return; + if (ioctl(fd, AUTOFS_IOC_FAIL, token) < 0) + plog(XLOG_ERROR, "AUTOFS_IOC_FAIL: %s", strerror(errno)); +} + + +static void +send_ready(int fd, autofs_wqt_t token) +{ + if (token == 0) + return; + if (ioctl(fd, AUTOFS_IOC_READY, token) < 0) + plog(XLOG_ERROR, "AUTOFS_IOC_READY: %s", strerror(errno)); +} + + +static void +autofs_lookup_failed(am_node *mp, char *name) +{ + autofs_fh_t *fh = mp->am_autofs_fh; + struct autofs_pending_mount **pp, *p; + + pp = &fh->pending_mounts; + while (*pp && !STREQ((*pp)->name, name)) + pp = &(*pp)->next; + + /* sanity check */ + if (*pp == NULL) + return; + + p = *pp; + plog(XLOG_INFO, "autofs: lookup of %s failed", name); + send_fail(fh->ioctlfd, p->wait_queue_token); + + XFREE(p->name); + *pp = p->next; + XFREE(p); +} + + +static void +autofs_expire_one(am_node *mp, char *name, autofs_wqt_t token) +{ + autofs_fh_t *fh; + am_node *ap; + struct autofs_pending_umount *p; + char *ap_path; + + fh = mp->am_autofs_fh; + + ap_path = str3cat(NULL, mp->am_path, "/", name); + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\tumount(%s)", ap_path); + + p = fh->pending_umounts; + while (p && p->wait_queue_token != token) + p = p->next; + + if (p) { + /* already pending */ + dlog("Umounting of %s already pending", ap_path); + amd_stats.d_drops++; + goto out; + } + + ap = find_ap(ap_path); + if (ap == NULL) { + /* not found??? not sure what to do here... */ + send_fail(fh->ioctlfd, token); + goto out; + } + + p = ALLOC(struct autofs_pending_umount); + p->wait_queue_token = token; + p->name = xstrdup(name); + p->next = fh->pending_umounts; + fh->pending_umounts = p; + + unmount_mp(ap); + +out: + XFREE(ap_path); +} + + +static void +autofs_missing_one(am_node *mp, autofs_wqt_t wait_queue_token, char *name) +{ + autofs_fh_t *fh; + mntfs *mf; + am_node *ap; + struct autofs_pending_mount *p; + int error; + + mf = mp->am_al->al_mnt; + fh = mp->am_autofs_fh; + + p = fh->pending_mounts; + while (p && p->wait_queue_token != wait_queue_token) + p = p->next; + + if (p) { + /* already pending */ + dlog("Mounting of %s/%s already pending", + mp->am_path, name); + amd_stats.d_drops++; + return; + } + + p = ALLOC(struct autofs_pending_mount); + p->wait_queue_token = wait_queue_token; + p->name = xstrdup(name); + p->next = fh->pending_mounts; + fh->pending_mounts = p; + + if (amuDebug(D_TRACE)) + plog(XLOG_DEBUG, "\tlookup(%s, %s)", mp->am_path, name); + ap = mf->mf_ops->lookup_child(mp, name, &error, VLOOK_CREATE); + if (ap && error < 0) + ap = mf->mf_ops->mount_child(ap, &error); + + /* some of the rest can be done in amfs_auto_cont */ + + if (ap == 0) { + if (error < 0) { + dlog("Mount still pending, not sending autofs reply yet"); + return; + } + autofs_lookup_failed(mp, name); + } + mp->am_stats.s_lookup++; +} + + +static void +autofs_handle_expire(am_node *mp, struct autofs_packet_expire *pkt) +{ + autofs_expire_one(mp, pkt->name, 0); +} + + +static void +autofs_handle_missing(am_node *mp, struct autofs_packet_missing *pkt) +{ + autofs_missing_one(mp, pkt->wait_queue_token, pkt->name); +} + + +#if AUTOFS_MAX_PROTO_VERSION >= 4 +static void +autofs_handle_expire_multi(am_node *mp, struct autofs_packet_expire_multi *pkt) +{ + autofs_expire_one(mp, pkt->name, pkt->wait_queue_token); +} +#endif /* AUTOFS_MAX_PROTO_VERSION >= 4 */ + + +#if AUTOFS_MAX_PROTO_VERSION >= 5 +static void +autofs_handle_expire_direct(am_node *mp, + autofs_packet_expire_direct_t *pkt) +{ + autofs_expire_one(mp, pkt->name, 0); +} + +static void +autofs_handle_expire_indirect(am_node *mp, + autofs_packet_expire_indirect_t *pkt) +{ + autofs_expire_one(mp, pkt->name, 0); +} + + +static void +autofs_handle_missing_direct(am_node *mp, + autofs_packet_missing_direct_t *pkt) +{ + autofs_missing_one(mp, pkt->wait_queue_token, pkt->name); +} + + +static void +autofs_handle_missing_indirect(am_node *mp, + autofs_packet_missing_indirect_t *pkt) +{ + autofs_missing_one(mp, pkt->wait_queue_token, pkt->name); +} +#endif /* AUTOFS_MAX_PROTO_VERSION >= 5 */ + + +int +autofs_handle_fdset(fd_set *readfds, int nsel) +{ + int i; + union { +#if AUTOFS_MAX_PROTO_VERSION >= 5 + union autofs_v5_packet_union pkt5; +#endif + union autofs_packet_union pkt; + } p; + autofs_fh_t *fh; + am_node *mp; + size_t len; + + for (i = 0; nsel && i < numfds; i++) { + if (!FD_ISSET(list[i], readfds)) + continue; + + nsel--; + FD_CLR(list[i], readfds); + mp = hash[list[i]]; + fh = mp->am_autofs_fh; + +#if AUTOFS_MAX_PROTO_VERSION >= 5 + if (fh->version < 5) { + len = sizeof(p.pkt); + } else { + len = sizeof(p.pkt5); + } +#else + len = sizeof(p.pkt); +#endif /* AUTOFS_MAX_PROTO_VERSION >= 5 */ + + if (autofs_get_pkt(fh->fd, &p, len)) + continue; + + switch (p.pkt.hdr.type) { + case autofs_ptype_missing: + autofs_handle_missing(mp, &p.pkt.missing); + break; + case autofs_ptype_expire: + autofs_handle_expire(mp, &p.pkt.expire); + break; +#if AUTOFS_MAX_PROTO_VERSION >= 4 + case autofs_ptype_expire_multi: + autofs_handle_expire_multi(mp, &p.pkt.expire_multi); + break; +#endif /* AUTOFS_MAX_PROTO_VERSION >= 4 */ +#if AUTOFS_MAX_PROTO_VERSION >= 5 + case autofs_ptype_expire_indirect: + autofs_handle_expire_indirect(mp, &p.pkt5.expire_direct); + break; + case autofs_ptype_expire_direct: + autofs_handle_expire_direct(mp, &p.pkt5.expire_direct); + break; + case autofs_ptype_missing_indirect: + autofs_handle_missing_indirect(mp, &p.pkt5.missing_direct); + break; + case autofs_ptype_missing_direct: + autofs_handle_missing_direct(mp, &p.pkt5.missing_direct); + break; +#endif /* AUTOFS_MAX_PROTO_VERSION >= 5 */ + default: + plog(XLOG_ERROR, "Unknown autofs packet type %d", + p.pkt.hdr.type); + } + } + return nsel; +} + + +int +create_autofs_service(void) +{ + hash_init(); + + /* not the best place, but... */ + if (linux_version_code() < KERNEL_VERSION(2,4,0)) + bind_works = 0; + + return 0; +} + + +int +destroy_autofs_service(void) +{ + /* Nothing to do */ + return 0; +} + + +static int +autofs_bind_umount(char *mountpoint) +{ + int err = 1; +#ifdef MNT2_GEN_OPT_BIND + if (bind_works && gopt.flags & CFM_AUTOFS_USE_LOFS) { + struct stat buf; + + if ((err = lstat(mountpoint, &buf))) + return errno; + if (S_ISLNK(buf.st_mode)) + goto use_symlink; + + plog(XLOG_INFO, "autofs: un-bind-mounting %s", mountpoint); + err = umount_fs(mountpoint, mnttab_file_name, 1); + if (err) + plog(XLOG_INFO, "autofs: unmounting %s failed: %m", mountpoint); + else + err = rmdir(mountpoint); + goto out; + } +#endif /* MNT2_GEN_OPT_BIND */ + use_symlink: + plog(XLOG_INFO, "autofs: deleting symlink %s", mountpoint); + err = unlink(mountpoint); + + out: + if (err) + return errno; + return 0; +} + + +int +autofs_mount_fs(am_node *mp, mntfs *mf) +{ + char *target, *target2 = NULL; + int err = 0; + + if (mf->mf_flags & MFF_ON_AUTOFS) { + if ((err = mkdir(mp->am_path, 0555))) + return errno; + } + + /* + * For sublinks, we could end up here with an already mounted f/s. + * Don't do anything in that case. + */ + if (!(mf->mf_flags & MFF_MOUNTED)) + err = mf->mf_ops->mount_fs(mp, mf); + + if (err) { + if (mf->mf_flags & MFF_ON_AUTOFS) + rmdir(mp->am_path); + return err; + } + + if (mf->mf_flags & MFF_ON_AUTOFS) + /* Nothing else to do */ + return 0; + + if (mp->am_link) + target = mp->am_link; + else + target = mf->mf_fo->opt_fs; + +#ifdef MNT2_GEN_OPT_BIND + if (bind_works && gopt.flags & CFM_AUTOFS_USE_LOFS) { + struct stat buf; + + /* + * HACK ALERT! + * + * Since the bind mount mechanism doesn't allow mountpoint crossing, + * we _must_ use symlinks for the host mount case. Otherwise we end up + * with a bunch of empty mountpoints... + */ + if (mf->mf_ops == &amfs_host_ops) + goto use_symlink; + + if (target[0] != '/') + target2 = str3cat(NULL, mp->am_parent->am_path, "/", target); + else + target2 = xstrdup(target); + + /* + * We need to stat() the destination, because the bind mount does not + * follow symlinks and/or allow for non-existent destinations. + * We fall back to symlinks if there are problems. + * + * We also need to temporarily change pgrp, otherwise our stat() won't + * trigger whatever cascading mounts are needed. + * + * WARNING: we will deadlock if this function is called from the master + * amd process and it happens to trigger another auto mount. Therefore, + * this function should be called only from a child amd process, or + * at the very least it should not be called from the parent unless we + * know for sure that it won't cause a recursive mount. We refuse to + * cause the recursive mount anyway if called from the parent amd. + */ + if (!foreground) { + pid_t pgrp = getpgrp(); + setpgrp(); + err = stat(target2, &buf); + if ((err = setpgid(0, pgrp))) { + plog(XLOG_ERROR, "autofs: cannot restore pgrp: %s", strerror(errno)); + plog(XLOG_ERROR, "autofs: aborting the mount"); + goto out; + } + if (err) + goto use_symlink; + } + if ((err = lstat(target2, &buf))) + goto use_symlink; + if (S_ISLNK(buf.st_mode)) + goto use_symlink; + + plog(XLOG_INFO, "autofs: bind-mounting %s -> %s", mp->am_path, target2); + mkdir(mp->am_path, 0555); + err = mount_lofs(mp->am_path, target2, mf->mf_mopts, 1); + if (err) { + rmdir(mp->am_path); + plog(XLOG_INFO, "autofs: bind-mounting %s -> %s failed", mp->am_path, target2); + goto use_symlink; + } + goto out; + } +#endif /* MNT2_GEN_OPT_BIND */ + use_symlink: + plog(XLOG_INFO, "autofs: symlinking %s -> %s", mp->am_path, target); + err = symlink(target, mp->am_path); + + out: + if (target2) + XFREE(target2); + + if (err) + return errno; + return 0; +} + + +int +autofs_umount_fs(am_node *mp, mntfs *mf) +{ + int err = 0; + if (!(mf->mf_flags & MFF_ON_AUTOFS)) { + err = autofs_bind_umount(mp->am_path); + if (err) + return err; + } + + /* + * Multiple sublinks could reference this f/s. + * Don't actually unmount it unless we're holding the last reference. + */ + if (mf->mf_refc == 1) { + err = mf->mf_ops->umount_fs(mp, mf); + if (err) + return err; + if (mf->mf_flags & MFF_ON_AUTOFS) + rmdir(mp->am_path); + } + return 0; +} + + +int +autofs_umount_succeeded(am_node *mp) +{ + autofs_fh_t *fh = mp->am_parent->am_autofs_fh; + struct autofs_pending_umount **pp, *p; + + /* Already gone? */ + if (fh == NULL) + return 0; + + pp = &fh->pending_umounts; + while (*pp && !STREQ((*pp)->name, mp->am_name)) + pp = &(*pp)->next; + + /* sanity check */ + if (*pp == NULL) + return -1; + + p = *pp; + plog(XLOG_INFO, "autofs: unmounting %s succeeded", mp->am_path); + send_ready(fh->ioctlfd, p->wait_queue_token); + + XFREE(p->name); + *pp = p->next; + XFREE(p); + return 0; +} + + +int +autofs_umount_failed(am_node *mp) +{ + autofs_fh_t *fh = mp->am_parent->am_autofs_fh; + struct autofs_pending_umount **pp, *p; + + pp = &fh->pending_umounts; + while (*pp && !STREQ((*pp)->name, mp->am_name)) + pp = &(*pp)->next; + + /* sanity check */ + if (*pp == NULL) + return -1; + + p = *pp; + plog(XLOG_INFO, "autofs: unmounting %s failed", mp->am_path); + send_fail(fh->ioctlfd, p->wait_queue_token); + + XFREE(p->name); + *pp = p->next; + XFREE(p); + return 0; +} + + +void +autofs_mount_succeeded(am_node *mp) +{ + autofs_fh_t *fh = mp->am_parent->am_autofs_fh; + struct autofs_pending_mount **pp, *p; + + /* + * don't expire the entries -- the kernel will do it for us. + * + * but it won't do autofs filesystems, so we expire them the old + * fashioned way instead. + */ + if (!(mp->am_al->al_mnt->mf_flags & MFF_IS_AUTOFS)) + mp->am_flags |= AMF_NOTIMEOUT; + + pp = &fh->pending_mounts; + while (*pp && !STREQ((*pp)->name, mp->am_name)) + pp = &(*pp)->next; + + /* sanity check */ + if (*pp == NULL) + return; + + p = *pp; + plog(XLOG_INFO, "autofs: mounting %s succeeded", mp->am_path); + send_ready(fh->ioctlfd, p->wait_queue_token); + + XFREE(p->name); + *pp = p->next; + XFREE(p); +} + + +void +autofs_mount_failed(am_node *mp) +{ + autofs_fh_t *fh = mp->am_parent->am_autofs_fh; + struct autofs_pending_mount **pp, *p; + + pp = &fh->pending_mounts; + while (*pp && !STREQ((*pp)->name, mp->am_name)) + pp = &(*pp)->next; + + /* sanity check */ + if (*pp == NULL) + return; + + p = *pp; + plog(XLOG_INFO, "autofs: mounting %s failed", mp->am_path); + send_fail(fh->ioctlfd, p->wait_queue_token); + + XFREE(p->name); + *pp = p->next; + XFREE(p); +} + + +void +autofs_get_opts(char *opts, size_t l, autofs_fh_t *fh) +{ + xsnprintf(opts, l, "fd=%d,minproto=%d,maxproto=%d", + fh->kernelfd, AUTOFS_MIN_VERSION, AUTOFS_MAX_VERSION); +} + + +int +autofs_compute_mount_flags(mntent_t *mnt) +{ + return 0; +} + + +#if AUTOFS_MAX_PROTO_VERSION >= 4 +static int autofs_timeout_mp_task(void *arg) +{ + am_node *mp = (am_node *)arg; + autofs_fh_t *fh = mp->am_autofs_fh; + int now = 0; + + while (ioctl(fh->ioctlfd, AUTOFS_IOC_EXPIRE_MULTI, &now) == 0); + return 0; +} +#endif /* AUTOFS_MAX_PROTO_VERSION >= 4 */ + + +void autofs_timeout_mp(am_node *mp) +{ + autofs_fh_t *fh = mp->am_autofs_fh; + time_t now = clocktime(NULL); + + /* update the ttl */ + mp->am_autofs_ttl = now + gopt.am_timeo_w; + + if (fh->version < 4) { + struct autofs_packet_expire pkt; + while (ioctl(fh->ioctlfd, AUTOFS_IOC_EXPIRE, &pkt) == 0) + autofs_handle_expire(mp, &pkt); + return; + } + +#if AUTOFS_MAX_PROTO_VERSION >= 4 + run_task(autofs_timeout_mp_task, mp, NULL, NULL); +#endif /* AUTOFS_MAX_PROTO_VERSION >= 4 */ +} + +#endif /* HAVE_FS_AUTOFS */ diff --git a/conf/autofs/autofs_linux.h b/conf/autofs/autofs_linux.h new file mode 100644 index 00000000000..885bfc07133 --- /dev/null +++ b/conf/autofs/autofs_linux.h @@ -0,0 +1,109 @@ +/* + * Copyright (c) 1999-2003 Ion Badulescu + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/autofs/autofs_linux.h + * + */ + +/* + * Automounter filesystem headers for Linux + */ + +#if !defined(HAVE_LINUX_AUTO_FS_H) && !defined(HAVE_LINUX_AUTO_FS4_H) +/* We didn't find the headers, so we can't compile in the autofs support */ +# undef HAVE_FS_AUTOFS +# undef MNTTAB_TYPE_AUTOFS +#endif /* !HAVE_LINUX_AUTO_FS_H && !HAVE_LINUX_AUTO_FS4_H */ + +#ifdef HAVE_FS_AUTOFS + +struct autofs_pending_mount { + unsigned long wait_queue_token; /* Associated kernel wait token */ + char *name; + struct autofs_pending_mount *next; +}; + +struct autofs_pending_umount { + unsigned long wait_queue_token; /* Associated kernel wait token */ + char *name; + struct autofs_pending_umount *next; +}; + +typedef struct { + int fd; + int kernelfd; + int ioctlfd; + int version; + struct autofs_pending_mount *pending_mounts; + struct autofs_pending_umount *pending_umounts; +} autofs_fh_t; + +#ifndef HAVE_LINUX_AUTO_FS4_H +union autofs_packet_union { + struct autofs_packet_hdr hdr; + struct autofs_packet_missing missing; + struct autofs_packet_expire expire; +}; + +/* typedef unsigned long autofs_wqt_t; */ +#endif /* not HAVE_LINUX_AUTO_FS4_H */ + +#define AUTOFS_AUTO_FS_FLAGS (FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS | FS_ON_AUTOFS) +#define AUTOFS_DIRECT_FS_FLAGS (FS_DIRECT | FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO) +#define AUTOFS_ERROR_FS_FLAGS (FS_DISCARD) +#define AUTOFS_HOST_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO) +#define AUTOFS_LINK_FS_FLAGS (FS_MBACKGROUND) +#define AUTOFS_LINKX_FS_FLAGS (FS_MBACKGROUND) +#define AUTOFS_NFSL_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_NFSX_FS_FLAGS (/* FS_UBACKGROUND| */ FS_AMQINFO ) +#define AUTOFS_PROGRAM_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO) +#define AUTOFS_ROOT_FS_FLAGS (FS_NOTIMEOUT | FS_AMQINFO | FS_DIRECTORY) +#define AUTOFS_TOPLVL_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS) +#define AUTOFS_UNION_FS_FLAGS (FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_ON_AUTOFS) + +#define AUTOFS_CACHEFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_CDFS_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_UDF_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_LUSTRE_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_EFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_LOFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_NFS_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_PCFS_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_UFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_XFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_EXT_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_TMPFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#endif /* HAVE_FS_AUTOFS */ diff --git a/conf/autofs/autofs_solaris_v1.c b/conf/autofs/autofs_solaris_v1.c new file mode 100644 index 00000000000..fcce6e3de00 --- /dev/null +++ b/conf/autofs/autofs_solaris_v1.c @@ -0,0 +1,719 @@ +/* + * Copyright (c) 1999-2003 Ion Badulescu + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/autofs/autofs_solaris_v1.c + * + */ + +/* + * Automounter filesystem + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +#ifdef HAVE_FS_AUTOFS + +/* + * MACROS: + */ +#ifndef AUTOFS_NULL +# define AUTOFS_NULL NULLPROC +#endif /* not AUTOFS_NULL */ + +/* + * STRUCTURES: + */ + +/* + * VARIABLES: + */ + +/* forward declarations */ +# ifndef HAVE_XDR_MNTREQUEST +bool_t xdr_mntrequest(XDR *xdrs, mntrequest *objp); +# endif /* not HAVE_XDR_MNTREQUEST */ +# ifndef HAVE_XDR_MNTRES +bool_t xdr_mntres(XDR *xdrs, mntres *objp); +# endif /* not HAVE_XDR_MNTRES */ +# ifndef HAVE_XDR_UMNTREQUEST +bool_t xdr_umntrequest(XDR *xdrs, umntrequest *objp); +# endif /* not HAVE_XDR_UMNTREQUEST */ +# ifndef HAVE_XDR_UMNTRES +bool_t xdr_umntres(XDR *xdrs, umntres *objp); +# endif /* not HAVE_XDR_UMNTRES */ +static int autofs_mount_1_req(struct mntrequest *mr, struct mntres *result, struct authunix_parms *cred, SVCXPRT *transp); +static int autofs_unmount_1_req(struct umntrequest *ur, struct umntres *result, struct authunix_parms *cred, SVCXPRT *transp); + +/**************************************************************************** + *** VARIABLES *** + ****************************************************************************/ + +/**************************************************************************** + *** FUNCTIONS *** + ****************************************************************************/ + +/* + * AUTOFS XDR FUNCTIONS: + */ + +#ifndef HAVE_XDR_MNTREQUEST +bool_t +xdr_mntrequest(XDR *xdrs, mntrequest *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_mntrequest:"); + + if (!xdr_string(xdrs, &objp->name, A_MAXNAME)) + return (FALSE); + + if (!xdr_string(xdrs, &objp->map, A_MAXNAME)) + return (FALSE); + + if (!xdr_string(xdrs, &objp->opts, A_MAXOPTS)) + return (FALSE); + + if (!xdr_string(xdrs, &objp->path, A_MAXPATH)) + return (FALSE); + + return (TRUE); +} +#endif /* not HAVE_XDR_MNTREQUEST */ + + +#ifndef HAVE_XDR_MNTRES +bool_t +xdr_mntres(XDR *xdrs, mntres *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_mntres:"); + + if (!xdr_int(xdrs, &objp->status)) + return (FALSE); + + return (TRUE); +} +# endif /* not HAVE_XDR_MNTRES */ + + +#ifndef HAVE_XDR_UMNTREQUEST +bool_t +xdr_umntrequest(XDR *xdrs, umntrequest *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_umntrequest:"); + + if (!xdr_int(xdrs, (int *) &objp->isdirect)) + return (FALSE); + + if (!xdr_u_int(xdrs, (u_int *) &objp->devid)) + return (FALSE); + +#ifdef HAVE_UMNTREQUEST_RDEVID + if (!xdr_u_long(xdrs, &objp->rdevid)) + return (FALSE); +#endif /* HAVE_UMNTREQUEST_RDEVID */ + + if (!xdr_pointer(xdrs, (char **) &objp->next, sizeof(umntrequest), (XDRPROC_T_TYPE) xdr_umntrequest)) + return (FALSE); + + return (TRUE); +} +#endif /* not HAVE_XDR_UMNTREQUEST */ + + +#ifndef HAVE_XDR_UMNTRES +bool_t +xdr_umntres(XDR *xdrs, umntres *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_mntres:"); + + if (!xdr_int(xdrs, &objp->status)) + return (FALSE); + + return (TRUE); +} +#endif /* not HAVE_XDR_UMNTRES */ + + +/* + * AUTOFS RPC methods + */ + +static int +autofs_mount_1_req(struct mntrequest *m, + struct mntres *res, + struct authunix_parms *cred, + SVCXPRT *transp) +{ + int err = 0; + int isdirect = 0; + am_node *mp, *ap; + mntfs *mf; + + dlog("MOUNT REQUEST: name=%s map=%s opts=%s path=%s", + m->name, m->map, m->opts, m->path); + + /* find the effective uid/gid from RPC request */ + xsnprintf(opt_uid, sizeof(uid_str), "%d", (int) cred->aup_uid); + xsnprintf(opt_gid, sizeof(gid_str), "%d", (int) cred->aup_gid); + + mp = find_ap(m->path); + if (!mp) { + plog(XLOG_ERROR, "map %s not found", m->path); + err = ENOENT; + goto out; + } + + mf = mp->am_al->al_mnt; + isdirect = (mf->mf_fsflags & FS_DIRECT) ? 1 : 0; + ap = mf->mf_ops->lookup_child(mp, m->name + isdirect, &err, VLOOK_CREATE); + if (ap && err < 0) + ap = mf->mf_ops->mount_child(ap, &err); + if (ap == NULL) { + if (err < 0) { + /* we're working on it */ + amd_stats.d_drops++; + return 1; + } + err = ENOENT; + goto out; + } + +out: + if (err) { + if (isdirect) { + /* direct mount */ + plog(XLOG_ERROR, "mount of %s failed", m->path); + } else { + /* indirect mount */ + plog(XLOG_ERROR, "mount of %s/%s failed", m->path, m->name); + } + } + + dlog("MOUNT REPLY: status=%d (%s)", err, strerror(err)); + + res->status = err; + return 0; +} + + +static int +autofs_unmount_1_req(struct umntrequest *ul, + struct umntres *res, + struct authunix_parms *cred, + SVCXPRT *transp) +{ + int mapno, err; + am_node *mp = NULL; + + dlog("UNMOUNT REQUEST: dev=%lx rdev=%lx %s", + (u_long) ul->devid, + (u_long) ul->rdevid, + ul->isdirect ? "direct" : "indirect"); + + /* by default, and if not found, succeed */ + res->status = 0; + + for (mapno = 0; ; mapno++) { + mp = get_exported_ap(mapno); + if (!mp) + break; + if (mp->am_dev == ul->devid && + (ul->rdevid == 0 || mp->am_rdev == ul->rdevid)) + break; + } + + if (mp) { + /* save RPC context */ + if (!mp->am_transp && transp) { + mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); + *(mp->am_transp) = *transp; + } + + mapno = mp->am_mapno; + err = unmount_mp(mp); + + if (err) + /* backgrounded, don't reply yet */ + return 1; + + if (get_exported_ap(mapno)) + /* unmounting failed, tell the kernel */ + res->status = 1; + } + + dlog("UNMOUNT REPLY: status=%d", res->status); + return 0; +} + + +/****************************************************************************/ +/* autofs program dispatcher */ +static void +autofs_program_1(struct svc_req *rqstp, SVCXPRT *transp) +{ + union { + mntrequest autofs_mount_1_arg; + umntrequest autofs_umount_1_arg; + } argument; + union { + mntres mount_res; + umntres umount_res; + } result; + int ret; + + bool_t (*xdr_argument)(); + bool_t (*xdr_result)(); + int (*local)(); + + current_transp = transp; + + switch (rqstp->rq_proc) { + + case AUTOFS_NULL: + svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_void, + (SVC_IN_ARG_TYPE) NULL); + return; + + case AUTOFS_MOUNT: + xdr_argument = xdr_mntrequest; + xdr_result = xdr_mntres; + local = autofs_mount_1_req; + break; + + case AUTOFS_UNMOUNT: + xdr_argument = xdr_umntrequest; + xdr_result = xdr_umntres; + local = autofs_unmount_1_req; + break; + + default: + svcerr_noproc(transp); + return; + } + + memset((char *) &argument, 0, sizeof(argument)); + if (!svc_getargs(transp, + (XDRPROC_T_TYPE) xdr_argument, + (SVC_IN_ARG_TYPE) &argument)) { + plog(XLOG_ERROR, + "AUTOFS xdr decode failed for %d %d %d", + (int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc); + svcerr_decode(transp); + return; + } + + memset((char *)&result, 0, sizeof(result)); + ret = (*local) (&argument, &result, rqstp, transp); + + current_transp = NULL; + + /* send reply only if the RPC method returned 0 */ + if (!ret) { + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_result, + (SVC_IN_ARG_TYPE) &result)) { + svcerr_systemerr(transp); + } + } + + if (!svc_freeargs(transp, + (XDRPROC_T_TYPE) xdr_argument, + (SVC_IN_ARG_TYPE) &argument)) { + plog(XLOG_FATAL, "unable to free rpc arguments in autofs_program_1"); + } +} + + +int +autofs_get_fh(am_node *mp) +{ + autofs_fh_t *fh; + char buf[MAXHOSTNAMELEN]; + mntfs *mf = mp->am_al->al_mnt; + struct utsname utsname; + + plog(XLOG_DEBUG, "autofs_get_fh for %s", mp->am_path); + fh = ALLOC(autofs_fh_t); + memset((voidp) fh, 0, sizeof(autofs_fh_t)); /* Paranoid */ + + /* + * SET MOUNT ARGS + */ + if (uname(&utsname) < 0) { + xstrlcpy(buf, "localhost.autofs", sizeof(buf)); + } else { + xstrlcpy(buf, utsname.nodename, sizeof(buf)); + xstrlcat(buf, ".autofs", sizeof(buf)); + } +#ifdef HAVE_AUTOFS_ARGS_T_ADDR + fh->addr.buf = xstrdup(buf); + fh->addr.len = fh->addr.maxlen = strlen(buf); +#endif /* HAVE_AUTOFS_ARGS_T_ADDR */ + + fh->direct = (mf->mf_fsflags & FS_DIRECT) ? 1 : 0; + fh->rpc_to = 1; /* XXX: arbitrary */ + fh->mount_to = mp->am_timeo; + fh->path = mp->am_path; + fh->opts = ""; /* XXX: arbitrary */ + fh->map = mp->am_path; /* this is what we get back in readdir */ + + mp->am_autofs_fh = fh; + return 0; +} + + +void +autofs_mounted(am_node *mp) +{ + /* We don't want any timeouts on autofs nodes */ + mp->am_autofs_ttl = NEVER; +} + + +void +autofs_release_fh(am_node *mp) +{ + autofs_fh_t *fh = mp->am_autofs_fh; +#ifdef HAVE_AUTOFS_ARGS_T_ADDR + XFREE(fh->addr.buf); +#endif /* HAVE_AUTOFS_ARGS_T_ADDR */ + XFREE(fh); + mp->am_autofs_fh = NULL; +} + + +void +autofs_get_mp(am_node *mp) +{ + /* nothing to do */ +} + + +void +autofs_release_mp(am_node *mp) +{ + /* nothing to do */ +} + + +void +autofs_add_fdset(fd_set *readfds) +{ + /* nothing to do */ +} + + +int +autofs_handle_fdset(fd_set *readfds, int nsel) +{ + /* nothing to do */ + return nsel; +} + + +/* + * Create the autofs service for amd + */ +int +create_autofs_service(void) +{ + dlog("creating autofs service listener"); + return register_autofs_service(AUTOFS_CONFTYPE, autofs_program_1); +} + + +int +destroy_autofs_service(void) +{ + dlog("destroying autofs service listener"); + return unregister_autofs_service(AUTOFS_CONFTYPE); +} + + +int +autofs_mount_fs(am_node *mp, mntfs *mf) +{ + int err = 0; + char *target, *target2 = NULL; + char *space_hack = autofs_strdup_space_hack(mp->am_path); + struct stat buf; + + if (mf->mf_flags & MFF_ON_AUTOFS) { + if ((err = mkdir(space_hack, 0555))) + goto out; + } + + /* + * For sublinks, we could end up here with an already mounted f/s. + * Don't do anything in that case. + */ + if (!(mf->mf_flags & MFF_MOUNTED)) + err = mf->mf_ops->mount_fs(mp, mf); + + if (err) { + if (mf->mf_flags & MFF_ON_AUTOFS) + rmdir(space_hack); + errno = err; + goto out; + } + + /* + * Autofs v1 doesn't support symlinks, + * so we ignore the CFM_AUTOFS_USE_LOFS flag + */ + if (mf->mf_flags & MFF_ON_AUTOFS) + /* Nothing to do */ + goto out; + + if (mp->am_link) + target = mp->am_link; + else + target = mf->mf_mount; + + if (target[0] != '/') + target2 = str3cat(NULL, mp->am_parent->am_path, "/", target); + else + target2 = xstrdup(target); + + plog(XLOG_INFO, "autofs: converting from link to lofs (%s -> %s)", mp->am_path, target2); + /* + * we need to stat() the destination, because the bind mount does not + * follow symlinks and/or allow for non-existent destinations. + * + * WARNING: we will deadlock if this function is called from the master + * amd process and it happens to trigger another auto mount. Therefore, + * this function should be called only from a child amd process, or + * at the very least it should not be called from the parent unless we + * know for sure that it won't cause a recursive mount. We refuse to + * cause the recursive mount anyway if called from the parent amd. + */ + if (!foreground) { + if ((err = stat(target2, &buf))) + goto out; + } + if ((err = lstat(target2, &buf))) + goto out; + + if ((err = mkdir(space_hack, 0555))) + goto out; + + if ((err = mount_lofs(mp->am_path, target2, mf->mf_mopts, 1))) { + errno = err; + goto out; + } + + out: + XFREE(space_hack); + if (target2) + XFREE(target2); + + if (err) + return errno; + return 0; +} + + +int +autofs_umount_fs(am_node *mp, mntfs *mf) +{ + int err = 0; + char *space_hack = autofs_strdup_space_hack(mp->am_path); + + /* + * Autofs v1 doesn't support symlinks, + * so we ignore the CFM_AUTOFS_USE_LOFS flag + */ + if (!(mf->mf_flags & MFF_ON_AUTOFS)) { + err = UMOUNT_FS(mp->am_path, mnttab_file_name, 1); + if (err) + goto out; + rmdir(space_hack); + } + + /* + * Multiple sublinks could reference this f/s. + * Don't actually unmount it unless we're holding the last reference. + */ + if (mf->mf_refc == 1) { + if ((err = mf->mf_ops->umount_fs(mp, mf))) + goto out; + + if (mf->mf_flags & MFF_ON_AUTOFS) + rmdir(space_hack); + } + + out: + XFREE(space_hack); + return err; +} + + +int +autofs_umount_succeeded(am_node *mp) +{ + umntres res; + SVCXPRT *transp = mp->am_transp; + + if (transp) { + res.status = 0; + + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_umntres, + (SVC_IN_ARG_TYPE) &res)) + svcerr_systemerr(transp); + + dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount); + XFREE(transp); + mp->am_transp = NULL; + } + + plog(XLOG_INFO, "autofs: unmounting %s succeeded", mp->am_path); + return 0; +} + + +int +autofs_umount_failed(am_node *mp) +{ + umntres res; + SVCXPRT *transp = mp->am_transp; + + if (transp) { + res.status = 1; + + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_umntres, + (SVC_IN_ARG_TYPE) &res)) + svcerr_systemerr(transp); + + dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount); + XFREE(transp); + mp->am_transp = NULL; + } + + plog(XLOG_INFO, "autofs: unmounting %s failed", mp->am_path); + return 0; +} + + +void +autofs_mount_succeeded(am_node *mp) +{ + SVCXPRT *transp = mp->am_transp; + struct stat stb; + char *space_hack; + + if (transp) { + /* this was a mount request */ + mntres res; + res.status = 0; + + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_mntres, + (SVC_IN_ARG_TYPE) &res)) + svcerr_systemerr(transp); + + dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount); + XFREE(transp); + mp->am_transp = NULL; + } + + space_hack = autofs_strdup_space_hack(mp->am_path); + if (!lstat(space_hack, &stb)) { + mp->am_dev = stb.st_dev; + mp->am_rdev = stb.st_rdev; + } + XFREE(space_hack); + /* don't expire the entries -- the kernel will do it for us */ + mp->am_flags |= AMF_NOTIMEOUT; + + plog(XLOG_INFO, "autofs: mounting %s succeeded", mp->am_path); +} + + +void +autofs_mount_failed(am_node *mp) +{ + SVCXPRT *transp = mp->am_transp; + + if (transp) { + /* this was a mount request */ + mntres res; + res.status = ENOENT; + + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_mntres, + (SVC_IN_ARG_TYPE) &res)) + svcerr_systemerr(transp); + + dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount); + XFREE(transp); + mp->am_transp = NULL; + } + + plog(XLOG_INFO, "autofs: mounting %s failed", mp->am_path); +} + + +void +autofs_get_opts(char *opts, size_t l, autofs_fh_t *fh) +{ + xsnprintf(opts, l, "%sdirect", + fh->direct ? "" : "in"); +} + + +int +autofs_compute_mount_flags(mntent_t *mntp) +{ + /* Must use overlay mounts */ + return MNT2_GEN_OPT_OVERLAY; +} + + +void autofs_timeout_mp(am_node *mp) +{ + /* We don't want any timeouts on autofs nodes */ + mp->am_autofs_ttl = NEVER; +} +#endif /* HAVE_FS_AUTOFS */ diff --git a/conf/autofs/autofs_solaris_v1.h b/conf/autofs/autofs_solaris_v1.h new file mode 100644 index 00000000000..1c11c998743 --- /dev/null +++ b/conf/autofs/autofs_solaris_v1.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 1999-2003 Ion Badulescu + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/autofs/autofs_solaris_v1.h + * + */ + +/* + * Automounter filesystem header for Solaris v1 + */ + +#ifndef autofs_args_t +# undef HAVE_FS_AUTOFS +# undef MNTTAB_TYPE_AUTOFS +#endif /* !autofs_args_t */ + +#ifdef HAVE_FS_AUTOFS +typedef autofs_args_t autofs_fh_t; + +#define NEED_AUTOFS_SPACE_HACK +/* + * autofs hack: append a space to the directory name + * to stop the kernel->daemon recursion. + * + * Returns malloc'ed space which needs to be freed by the caller. + */ +#define autofs_strdup_space_hack(s) str3cat(NULL, (s), " ", "") + +#define AUTOFS_AUTO_FS_FLAGS (FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS | FS_ON_AUTOFS) +#define AUTOFS_DIRECT_FS_FLAGS (FS_DIRECT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS) +#define AUTOFS_ERROR_FS_FLAGS (FS_DISCARD) +#define AUTOFS_HOST_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO) +#define AUTOFS_LINK_FS_FLAGS (FS_MBACKGROUND) +#define AUTOFS_LINKX_FS_FLAGS (FS_MBACKGROUND) +#define AUTOFS_NFSL_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_NFSX_FS_FLAGS (/* FS_UBACKGROUND| */ FS_AMQINFO ) +#define AUTOFS_PROGRAM_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO) +#define AUTOFS_ROOT_FS_FLAGS (FS_NOTIMEOUT | FS_AMQINFO | FS_DIRECTORY) +#define AUTOFS_TOPLVL_FS_FLAGS (FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS) +#define AUTOFS_UNION_FS_FLAGS (FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_ON_AUTOFS) + +#define AUTOFS_CACHEFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_CDFS_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_EFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_LOFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_NFS_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_PCFS_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_UFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_XFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#endif /* HAVE_FS_AUTOFS */ diff --git a/conf/autofs/autofs_solaris_v2_v3.c b/conf/autofs/autofs_solaris_v2_v3.c new file mode 100644 index 00000000000..f3b653e7ea9 --- /dev/null +++ b/conf/autofs/autofs_solaris_v2_v3.c @@ -0,0 +1,1292 @@ +/* + * Copyright (c) 1999-2003 Ion Badulescu + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/autofs/autofs_solaris_v2_v3.c + * + */ + +/* + * Automounter filesystem + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* + * MACROS: + */ +#ifndef AUTOFS_NULL +# define AUTOFS_NULL NULLPROC +#endif /* not AUTOFS_NULL */ + +/* + * STRUCTURES: + */ + +struct amd_rddirres { + enum autofs_res rd_status; + u_long rd_bufsize; + nfsdirlist rd_dl; +}; +typedef struct amd_rddirres amd_rddirres; + +/* + * VARIABLES: + */ + +SVCXPRT *autofs_xprt = NULL; + +/* forward declarations */ +bool_t xdr_umntrequest(XDR *xdrs, umntrequest *objp); +bool_t xdr_umntres(XDR *xdrs, umntres *objp); +bool_t xdr_autofs_lookupargs(XDR *xdrs, autofs_lookupargs *objp); +bool_t xdr_autofs_mountres(XDR *xdrs, autofs_mountres *objp); +bool_t xdr_autofs_lookupres(XDR *xdrs, autofs_lookupres *objp); +bool_t xdr_autofs_rddirargs(XDR *xdrs, autofs_rddirargs *objp); +static bool_t xdr_amd_rddirres(XDR *xdrs, amd_rddirres *objp); + +/* + * These exist only in the AutoFS V2 protocol. + */ +#ifdef AUTOFS_POSTUNMOUNT +bool_t xdr_postumntreq(XDR *xdrs, postumntreq *objp); +bool_t xdr_postumntres(XDR *xdrs, postumntres *objp); +bool_t xdr_postmountreq(XDR *xdrs, postmountreq *objp); +bool_t xdr_postmountres(XDR *xdrs, postmountres *objp); +#endif /* AUTOFS_POSTUMOUNT */ + +/* + * AUTOFS XDR FUNCTIONS: + */ + +bool_t +xdr_autofs_stat(XDR *xdrs, autofs_stat *objp) +{ + if (!xdr_enum(xdrs, (enum_t *)objp)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_autofs_action(XDR *xdrs, autofs_action *objp) +{ + if (!xdr_enum(xdrs, (enum_t *)objp)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_linka(XDR *xdrs, linka *objp) +{ + if (!xdr_string(xdrs, &objp->dir, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->link, AUTOFS_MAXPATHLEN)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_autofs_netbuf(XDR *xdrs, struct netbuf *objp) +{ + bool_t dummy; + + if (!xdr_u_long(xdrs, (u_long *) &objp->maxlen)) + return (FALSE); + dummy = xdr_bytes(xdrs, (char **)&(objp->buf), + (u_int *)&(objp->len), objp->maxlen); + return (dummy); +} + + +bool_t +xdr_autofs_args(XDR *xdrs, autofs_args *objp) +{ + if (!xdr_autofs_netbuf(xdrs, &objp->addr)) + return (FALSE); + if (!xdr_string(xdrs, &objp->path, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->opts, AUTOFS_MAXOPTSLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->map, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->subdir, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->key, AUTOFS_MAXCOMPONENTLEN)) + return (FALSE); + if (!xdr_int(xdrs, &objp->mount_to)) + return (FALSE); + if (!xdr_int(xdrs, &objp->rpc_to)) + return (FALSE); + if (!xdr_int(xdrs, &objp->direct)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_mounta(XDR *xdrs, struct mounta *objp) +{ + if (!xdr_string(xdrs, &objp->spec, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->dir, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_int(xdrs, &objp->flags)) + return (FALSE); + if (!xdr_string(xdrs, &objp->fstype, AUTOFS_MAXCOMPONENTLEN)) + return (FALSE); + if (!xdr_pointer(xdrs, (char **)&objp->dataptr, sizeof(autofs_args), + (XDRPROC_T_TYPE) xdr_autofs_args)) + return (FALSE); + if (!xdr_int(xdrs, &objp->datalen)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_action_list_entry(XDR *xdrs, action_list_entry *objp) +{ + if (!xdr_autofs_action(xdrs, &objp->action)) + return (FALSE); + switch (objp->action) { + case AUTOFS_MOUNT_RQ: + if (!xdr_mounta(xdrs, &objp->action_list_entry_u.mounta)) + return (FALSE); + break; + case AUTOFS_LINK_RQ: + if (!xdr_linka(xdrs, &objp->action_list_entry_u.linka)) + return (FALSE); + break; + default: + break; + } + return (TRUE); +} + + +bool_t +xdr_action_list(XDR *xdrs, action_list *objp) +{ + if (!xdr_action_list_entry(xdrs, &objp->action)) + return (FALSE); + if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(action_list), + (XDRPROC_T_TYPE) xdr_action_list)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_umntrequest(XDR *xdrs, umntrequest *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_umntrequest:"); + + if (!xdr_bool_t(xdrs, &objp->isdirect)) + return (FALSE); +#ifdef HAVE_STRUCT_UMNTREQUEST_DEVID + if (!xdr_dev_t(xdrs, &objp->devid)) + return (FALSE); + if (!xdr_dev_t(xdrs, &objp->rdevid)) + return (FALSE); +#else /* not HAVE_STRUCT_UMNTREQUEST_DEVID */ + if (!xdr_string(xdrs, &objp->mntresource, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->mntpnt, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->fstype, AUTOFS_MAXCOMPONENTLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->mntopts, AUTOFS_MAXOPTSLEN)) + return (FALSE); +#endif /* not HAVE_STRUCT_UMNTREQUEST_DEVID */ + if (!xdr_pointer(xdrs, (char **) &objp->next, sizeof(umntrequest), + (XDRPROC_T_TYPE) xdr_umntrequest)) + return (FALSE); + + return (TRUE); +} + + +bool_t +xdr_umntres(XDR *xdrs, umntres *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_mntres:"); + + if (!xdr_int(xdrs, &objp->status)) + return (FALSE); + return (TRUE); +} + + +/* + * These exist only in the AutoFS V2 protocol. + */ +#ifdef AUTOFS_POSTUNMOUNT +bool_t +xdr_postumntreq(XDR *xdrs, postumntreq *objp) +{ + if (!xdr_dev_t(xdrs, &objp->devid)) + return (FALSE); + if (!xdr_dev_t(xdrs, &objp->rdevid)) + return (FALSE); + if (!xdr_pointer(xdrs, (char **)&objp->next, + sizeof(struct postumntreq), + (XDRPROC_T_TYPE) xdr_postumntreq)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_postumntres(XDR *xdrs, postumntres *objp) +{ + if (!xdr_int(xdrs, &objp->status)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_postmountreq(XDR *xdrs, postmountreq *objp) +{ + if (!xdr_string(xdrs, &objp->special, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->mountp, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->fstype, AUTOFS_MAXCOMPONENTLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->mntopts, AUTOFS_MAXOPTSLEN)) + return (FALSE); + if (!xdr_dev_t(xdrs, &objp->devid)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_postmountres(XDR *xdrs, postmountres *objp) +{ + if (!xdr_int(xdrs, &objp->status)) + return (FALSE); + return (TRUE); +} +#endif /* AUTOFS_POSTUNMOUNT */ + + +bool_t +xdr_autofs_res(XDR *xdrs, autofs_res *objp) +{ + if (!xdr_enum(xdrs, (enum_t *)objp)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_autofs_lookupargs(XDR *xdrs, autofs_lookupargs *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_autofs_lookupargs:"); + + if (!xdr_string(xdrs, &objp->map, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->path, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->name, AUTOFS_MAXCOMPONENTLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->subdir, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_string(xdrs, &objp->opts, AUTOFS_MAXOPTSLEN)) + return (FALSE); + if (!xdr_bool_t(xdrs, &objp->isdirect)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_mount_result_type(XDR *xdrs, mount_result_type *objp) +{ + if (!xdr_autofs_stat(xdrs, &objp->status)) + return (FALSE); + switch (objp->status) { + case AUTOFS_ACTION: + if (!xdr_pointer(xdrs, + (char **)&objp->mount_result_type_u.list, + sizeof(action_list), (XDRPROC_T_TYPE) xdr_action_list)) + return (FALSE); + break; + case AUTOFS_DONE: + if (!xdr_int(xdrs, &objp->mount_result_type_u.error)) + return (FALSE); + break; + } + return (TRUE); +} + + +bool_t +xdr_autofs_mountres(XDR *xdrs, autofs_mountres *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_mntres:"); + + if (!xdr_mount_result_type(xdrs, &objp->mr_type)) + return (FALSE); + if (!xdr_int(xdrs, &objp->mr_verbose)) + return (FALSE); + + return (TRUE); +} + + +bool_t +xdr_lookup_result_type(XDR *xdrs, lookup_result_type *objp) +{ + if (!xdr_autofs_action(xdrs, &objp->action)) + return (FALSE); + switch (objp->action) { + case AUTOFS_LINK_RQ: + if (!xdr_linka(xdrs, &objp->lookup_result_type_u.lt_linka)) + return (FALSE); + break; + default: + break; + } + return (TRUE); +} + + +bool_t +xdr_autofs_lookupres(XDR *xdrs, autofs_lookupres *objp) +{ + if (!xdr_autofs_res(xdrs, &objp->lu_res)) + return (FALSE); + if (!xdr_lookup_result_type(xdrs, &objp->lu_type)) + return (FALSE); + if (!xdr_int(xdrs, &objp->lu_verbose)) + return (FALSE); + return (TRUE); +} + + +bool_t +xdr_autofs_rddirargs(XDR *xdrs, autofs_rddirargs *objp) +{ + if (!xdr_string(xdrs, &objp->rda_map, AUTOFS_MAXPATHLEN)) + return (FALSE); + if (!xdr_u_int(xdrs, (u_int *) &objp->rda_offset)) + return (FALSE); + if (!xdr_u_int(xdrs, (u_int *) &objp->rda_count)) + return (FALSE); + return (TRUE); +} + + +/* + * ENCODE ONLY + * + * Solaris automountd uses struct autofsrddir to pass the results. + * We use the traditional nfsreaddirres and do the conversion ourselves. + */ +static bool_t +xdr_amd_putrddirres(XDR *xdrs, nfsdirlist *dp, ulong reqsize) +{ + nfsentry *ep; + char *name; + u_int namlen; + bool_t true = TRUE; + bool_t false = FALSE; + int entrysz; + int tofit; + int bufsize; + u_long ino, off; + + bufsize = 1 * BYTES_PER_XDR_UNIT; + for (ep = dp->dl_entries; ep; ep = ep->ne_nextentry) { + name = ep->ne_name; + namlen = strlen(name); + ino = (u_long) ep->ne_fileid; + off = (u_long) ep->ne_cookie + AUTOFS_DAEMONCOOKIE; + entrysz = (1 + 1 + 1 + 1) * BYTES_PER_XDR_UNIT + + roundup(namlen, BYTES_PER_XDR_UNIT); + tofit = entrysz + 2 * BYTES_PER_XDR_UNIT; + if (bufsize + tofit > reqsize) { + dp->dl_eof = FALSE; + break; + } + if (!xdr_bool(xdrs, &true) || + !xdr_u_long(xdrs, &ino) || + !xdr_bytes(xdrs, &name, &namlen, AUTOFS_MAXPATHLEN) || + !xdr_u_long(xdrs, &off)) { + return (FALSE); + } + bufsize += entrysz; + } + if (!xdr_bool(xdrs, &false)) { + return (FALSE); + } + if (!xdr_bool(xdrs, &dp->dl_eof)) { + return (FALSE); + } + return (TRUE); +} + + +static bool_t +xdr_amd_rddirres(XDR *xdrs, amd_rddirres *objp) +{ + if (!xdr_enum(xdrs, (enum_t *)&objp->rd_status)) + return (FALSE); + if (objp->rd_status != AUTOFS_OK) + return (TRUE); + return (xdr_amd_putrddirres(xdrs, &objp->rd_dl, objp->rd_bufsize)); +} + + +/* + * AUTOFS RPC methods + */ + +static int +autofs_lookup_2_req(autofs_lookupargs *m, + autofs_lookupres *res, + struct authunix_parms *cred, + SVCXPRT *transp) +{ + int err; + am_node *mp, *new_mp; + mntfs *mf; + + dlog("LOOKUP REQUEST: name=%s[%s] map=%s opts=%s path=%s direct=%d", + m->name, m->subdir, m->map, m->opts, + m->path, m->isdirect); + + /* find the effective uid/gid from RPC request */ + xsnprintf(opt_uid, sizeof(uid_str), "%d", (int) cred->aup_uid); + xsnprintf(opt_gid, sizeof(gid_str), "%d", (int) cred->aup_gid); + + mp = find_ap(m->path); + if (!mp) { + plog(XLOG_ERROR, "map %s not found", m->path); + err = AUTOFS_NOENT; + goto out; + } + + mf = mp->am_al->al_mnt; + new_mp = mf->mf_ops->lookup_child(mp, m->name, &err, VLOOK_LOOKUP); + if (!new_mp) { + err = AUTOFS_NOENT; + goto out; + } + + if (err == 0) { + plog(XLOG_ERROR, "autofs requests to mount an already mounted node???"); + } else { + free_map(new_mp); + } + err = AUTOFS_OK; + res->lu_type.action = AUTOFS_NONE; + + out: + res->lu_res = err; + res->lu_verbose = 1; + + dlog("LOOKUP REPLY: status=%d", res->lu_res); + return 0; +} + + +static void +autofs_lookup_2_free(autofs_lookupres *res) +{ + struct linka link; + + if ((res->lu_res == AUTOFS_OK) && + (res->lu_type.action == AUTOFS_LINK_RQ)) { + /* + * Free link information + */ + link = res->lu_type.lookup_result_type_u.lt_linka; + if (link.dir) + XFREE(link.dir); + if (link.link) + XFREE(link.link); + } +} + + +static int +autofs_mount_2_req(autofs_lookupargs *m, + autofs_mountres *res, + struct authunix_parms *cred, + SVCXPRT *transp) +{ + int err = AUTOFS_OK; + am_node *mp, *new_mp; + mntfs *mf; + + dlog("MOUNT REQUEST: name=%s[%s] map=%s opts=%s path=%s direct=%d", + m->name, m->subdir, m->map, m->opts, + m->path, m->isdirect); + + /* find the effective uid/gid from RPC request */ + xsnprintf(opt_uid, sizeof(uid_str), "%d", (int) cred->aup_uid); + xsnprintf(opt_gid, sizeof(gid_str), "%d", (int) cred->aup_gid); + + mp = find_ap(m->path); + if (!mp) { + plog(XLOG_ERROR, "map %s not found", m->path); + res->mr_type.status = AUTOFS_DONE; + res->mr_type.mount_result_type_u.error = AUTOFS_NOENT; + goto out; + } + + mf = mp->am_al->al_mnt; + new_mp = mf->mf_ops->lookup_child(mp, m->name + m->isdirect, &err, VLOOK_CREATE); + if (new_mp && err < 0) { + /* new_mp->am_transp = transp; */ + new_mp = mf->mf_ops->mount_child(new_mp, &err); + } + if (new_mp == NULL) { + if (err < 0) { + /* we're working on it */ + amd_stats.d_drops++; + return 1; + } + res->mr_type.status = AUTOFS_DONE; + res->mr_type.mount_result_type_u.error = AUTOFS_NOENT; + goto out; + } + + if (gopt.flags & CFM_AUTOFS_USE_LOFS || + new_mp->am_al->al_mnt->mf_flags & MFF_ON_AUTOFS) { + res->mr_type.status = AUTOFS_DONE; + res->mr_type.mount_result_type_u.error = AUTOFS_OK; + } else { + struct action_list *list = malloc(sizeof(struct action_list)); + char *target; + if (new_mp->am_link) + target = new_mp->am_link; + else + target = new_mp->am_al->al_mnt->mf_mount; + list->action.action = AUTOFS_LINK_RQ; + list->action.action_list_entry_u.linka.dir = xstrdup(new_mp->am_name); + list->action.action_list_entry_u.linka.link = xstrdup(target); + list->next = NULL; + res->mr_type.status = AUTOFS_ACTION; + res->mr_type.mount_result_type_u.list = list; + } + +out: + res->mr_verbose = 1; + + switch (res->mr_type.status) { + case AUTOFS_ACTION: + dlog("MOUNT REPLY: status=%d, AUTOFS_ACTION", err); + break; + case AUTOFS_DONE: + dlog("MOUNT REPLY: status=%d, AUTOFS_DONE", err); + break; + default: + dlog("MOUNT REPLY: status=%d, UNKNOWN(%d)", err, res->mr_type.status); + } + + if (err) { + if (m->isdirect) { + /* direct mount */ + plog(XLOG_ERROR, "mount of %s failed", m->path); + } else { + /* indirect mount */ + plog(XLOG_ERROR, "mount of %s/%s failed", m->path, m->name); + } + } + return 0; +} + + +static void +autofs_mount_2_free(struct autofs_mountres *res) +{ + if (res->mr_type.status == AUTOFS_ACTION && + res->mr_type.mount_result_type_u.list != NULL) { + autofs_action action; + dlog("freeing action list"); + action = res->mr_type.mount_result_type_u.list->action.action; + if (action == AUTOFS_LINK_RQ) { + /* + * Free link information + */ + struct linka *link; + link = &(res->mr_type.mount_result_type_u.list->action.action_list_entry_u.linka); + if (link->dir) + XFREE(link->dir); + if (link->link) + XFREE(link->link); + } else if (action == AUTOFS_MOUNT_RQ) { + struct mounta *mnt; + mnt = &(res->mr_type.mount_result_type_u.list->action.action_list_entry_u.mounta); + if (mnt->spec) + XFREE(mnt->spec); + if (mnt->dir) + XFREE(mnt->dir); + if (mnt->fstype) + XFREE(mnt->fstype); + if (mnt->dataptr) + XFREE(mnt->dataptr); +#ifdef HAVE_MOUNTA_OPTPTR + if (mnt->optptr) + XFREE(mnt->optptr); +#endif /* HAVE_MOUNTA_OPTPTR */ + } + XFREE(res->mr_type.mount_result_type_u.list); + } +} + + +static int +autofs_unmount_2_req(umntrequest *ul, + umntres *res, + struct authunix_parms *cred, + SVCXPRT *transp) +{ + int mapno, err; + am_node *mp = NULL; + +#ifdef HAVE_STRUCT_UMNTREQUEST_DEVID + dlog("UNMOUNT REQUEST: dev=%lx rdev=%lx %s", + (u_long) ul->devid, + (u_long) ul->rdevid, + ul->isdirect ? "direct" : "indirect"); +#else /* not HAVE_STRUCT_UMNTREQUEST_DEVID */ + dlog("UNMOUNT REQUEST: mntresource='%s' mntpnt='%s' fstype='%s' mntopts='%s' %s", + ul->mntresource, + ul->mntpnt, + ul->fstype, + ul->mntopts, + ul->isdirect ? "direct" : "indirect"); +#endif /* not HAVE_STRUCT_UMNTREQUEST_DEVID */ + + /* by default, and if not found, succeed */ + res->status = 0; + +#ifdef HAVE_STRUCT_UMNTREQUEST_DEVID + for (mp = get_first_exported_ap(&mapno); + mp; + mp = get_next_exported_ap(&mapno)) { + if (mp->am_dev == ul->devid && + mp->am_rdev == ul->rdevid) + break; + } +#else /* not HAVE_STRUCT_UMNTREQUEST_DEVID */ + mp = find_ap(ul->mntpnt); +#endif /* not HAVE_STRUCT_UMNTREQUEST_DEVID */ + + if (mp) { + /* save RPC context */ + if (!mp->am_transp && transp) { + mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); + *(mp->am_transp) = *transp; + } + + mapno = mp->am_mapno; + err = unmount_mp(mp); + + if (err) + /* backgrounded, don't reply yet */ + return 1; + + if (get_exported_ap(mapno)) + /* unmounting failed, tell the kernel */ + res->status = 1; + } + + dlog("UNMOUNT REPLY: status=%d", res->status); + return 0; +} + + +/* + * These exist only in the AutoFS V2 protocol. + */ +#ifdef AUTOFS_POSTUNMOUNT +/* XXX not implemented */ +static int +autofs_postunmount_2_req(postumntreq *req, + postumntres *res, + struct authunix_parms *cred, + SVCXPRT *transp) +{ + postumntreq *ul = req; + + dlog("POSTUNMOUNT REQUEST: dev=%lx rdev=%lx", + (u_long) ul->devid, + (u_long) ul->rdevid); + + /* succeed unconditionally */ + res->status = 0; + + dlog("POSTUNMOUNT REPLY: status=%d", res->status); + return 0; +} + + +/* XXX not implemented */ +static int +autofs_postmount_2_req(postmountreq *req, + postmountres *res, + struct authunix_parms *cred, + SVCXPRT *transp) +{ + dlog("POSTMOUNT REQUEST: %s\tdev=%lx\tspecial=%s %s", + req->mountp, (u_long) req->devid, req->special, req->mntopts); + + /* succeed unconditionally */ + res->status = 0; + + dlog("POSTMOUNT REPLY: status=%d", res->status); + return 0; +} +#endif /* AUTOFS_POSTUNMOUNT */ + + +static int +autofs_readdir_2_req(struct autofs_rddirargs *req, + struct amd_rddirres *res, + struct authunix_parms *cred, + SVCXPRT *transp) +{ + am_node *mp; + int err; + static nfsentry e_res[MAX_READDIR_ENTRIES]; + + dlog("READDIR REQUEST: %s @ %d", + req->rda_map, (int) req->rda_offset); + + mp = find_ap(req->rda_map); + if (!mp) { + plog(XLOG_ERROR, "map %s not found", req->rda_map); + res->rd_status = AUTOFS_NOENT; + goto out; + } + + mp->am_stats.s_readdir++; + req->rda_offset -= AUTOFS_DAEMONCOOKIE; + err = mp->am_al->al_mnt->mf_ops->readdir(mp, (char *)&req->rda_offset, + &res->rd_dl, e_res, req->rda_count); + if (err) { + res->rd_status = AUTOFS_ECOMM; + goto out; + } + + res->rd_status = AUTOFS_OK; + res->rd_bufsize = req->rda_count; + +out: + dlog("READDIR REPLY: status=%d", res->rd_status); + return 0; +} + + +/****************************************************************************/ +/* autofs program dispatcher */ +static void +autofs_program_2(struct svc_req *rqstp, SVCXPRT *transp) +{ + union { + autofs_lookupargs autofs_mount_2_arg; + autofs_lookupargs autofs_lookup_2_arg; + umntrequest autofs_umount_2_arg; + autofs_rddirargs autofs_readdir_2_arg; +#ifdef AUTOFS_POSTUNMOUNT + postmountreq autofs_postmount_2_arg; + postumntreq autofs_postumnt_2_arg; +#endif /* AUTOFS_POSTUNMOUNT */ + } argument; + + union { + autofs_mountres mount_res; + autofs_lookupres lookup_res; + umntres umount_res; + amd_rddirres readdir_res; +#ifdef AUTOFS_POSTUNMOUNT + postumntres postumnt_res; + postmountres postmnt_res; +#endif /* AUTOFS_POSTUNMOUNT */ + } result; + int ret; + + bool_t (*xdr_argument)(); + bool_t (*xdr_result)(); + int (*local)(); + void (*local_free)() = NULL; + + current_transp = transp; + + switch (rqstp->rq_proc) { + + case AUTOFS_NULL: + svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_void, + (SVC_IN_ARG_TYPE) NULL); + return; + + case AUTOFS_LOOKUP: + xdr_argument = xdr_autofs_lookupargs; + xdr_result = xdr_autofs_lookupres; + local = autofs_lookup_2_req; + local_free = autofs_lookup_2_free; + break; + + case AUTOFS_MOUNT: + xdr_argument = xdr_autofs_lookupargs; + xdr_result = xdr_autofs_mountres; + local = autofs_mount_2_req; + local_free = autofs_mount_2_free; + break; + + case AUTOFS_UNMOUNT: + xdr_argument = xdr_umntrequest; + xdr_result = xdr_umntres; + local = autofs_unmount_2_req; + break; + +/* + * These exist only in the AutoFS V2 protocol. + */ +#ifdef AUTOFS_POSTUNMOUNT + case AUTOFS_POSTUNMOUNT: + xdr_argument = xdr_postumntreq; + xdr_result = xdr_postumntres; + local = autofs_postunmount_2_req; + break; + + case AUTOFS_POSTMOUNT: + xdr_argument = xdr_postmountreq; + xdr_result = xdr_postmountres; + local = autofs_postmount_2_req; + break; +#endif /* AUTOFS_POSTUNMOUNT */ + + case AUTOFS_READDIR: + xdr_argument = xdr_autofs_rddirargs; + xdr_result = xdr_amd_rddirres; + local = autofs_readdir_2_req; + break; + + default: + svcerr_noproc(transp); + return; + } + + memset((char *) &argument, 0, sizeof(argument)); + if (!svc_getargs(transp, + (XDRPROC_T_TYPE) xdr_argument, + (SVC_IN_ARG_TYPE) &argument)) { + plog(XLOG_ERROR, "AUTOFS xdr decode failed for %d %d %d", + (int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc); + svcerr_decode(transp); + return; + } + + memset((char *)&result, 0, sizeof(result)); + ret = (*local) (&argument, &result, rqstp->rq_clntcred, transp); + + current_transp = NULL; + + /* send reply only if the RPC method returned 0 */ + if (!ret) { + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_result, + (SVC_IN_ARG_TYPE) &result)) { + svcerr_systemerr(transp); + } + } + + if (!svc_freeargs(transp, + (XDRPROC_T_TYPE) xdr_argument, + (SVC_IN_ARG_TYPE) &argument)) { + plog(XLOG_FATAL, "unable to free rpc arguments in autofs_program_2"); + } + + if (local_free) + (*local_free)(&result); +} + + +int +autofs_get_fh(am_node *mp) +{ + autofs_fh_t *fh; + char buf[MAXHOSTNAMELEN]; + mntfs *mf = mp->am_al->al_mnt; + struct utsname utsname; + + plog(XLOG_DEBUG, "autofs_get_fh for %s", mp->am_path); + fh = ALLOC(autofs_fh_t); + memset((voidp) fh, 0, sizeof(autofs_fh_t)); /* Paranoid */ + + /* + * SET MOUNT ARGS + */ + if (uname(&utsname) < 0) { + xstrlcpy(buf, "localhost.autofs", sizeof(buf)); + } else { + xstrlcpy(buf, utsname.nodename, sizeof(buf)); + xstrlcat(buf, ".autofs", sizeof(buf)); + } +#ifdef HAVE_AUTOFS_ARGS_T_ADDR + fh->addr.buf = xstrdup(buf); + fh->addr.len = fh->addr.maxlen = strlen(buf); +#endif /* HAVE_AUTOFS_ARGS_T_ADDR */ + + fh->direct = ((mf->mf_ops->autofs_fs_flags & FS_DIRECT) == FS_DIRECT); + fh->rpc_to = 1; /* XXX: arbitrary */ + fh->mount_to = mp->am_timeo; + fh->path = mp->am_path; + fh->opts = ""; /* XXX: arbitrary */ + fh->map = mp->am_path; /* this is what we get back in readdir */ + fh->subdir = ""; + if (fh->direct) + fh->key = mp->am_name; + else + fh->key = ""; + + mp->am_autofs_fh = fh; + return 0; +} + + +void +autofs_mounted(am_node *mp) +{ + /* We don't want any timeouts on autofs nodes */ + mp->am_autofs_ttl = NEVER; +} + + +void +autofs_release_fh(am_node *mp) +{ + autofs_fh_t *fh = mp->am_autofs_fh; +#ifdef HAVE_AUTOFS_ARGS_T_ADDR + XFREE(fh->addr.buf); +#endif /* HAVE_AUTOFS_ARGS_T_ADDR */ + XFREE(fh); + mp->am_autofs_fh = NULL; +} + + +void +autofs_get_mp(am_node *mp) +{ + /* nothing to do */ +} + + +void +autofs_release_mp(am_node *mp) +{ + /* nothing to do */ +} + + +void +autofs_add_fdset(fd_set *readfds) +{ + /* nothing to do */ +} + + +int +autofs_handle_fdset(fd_set *readfds, int nsel) +{ + /* nothing to do */ + return nsel; +} + + +/* + * Create the autofs service for amd + */ +int +create_autofs_service(void) +{ + dlog("creating autofs service listener"); + return register_autofs_service(AUTOFS_CONFTYPE, autofs_program_2); +} + + +int +destroy_autofs_service(void) +{ + dlog("destroying autofs service listener"); + return unregister_autofs_service(AUTOFS_CONFTYPE); +} + + +int +autofs_mount_fs(am_node *mp, mntfs *mf) +{ + int err = 0; + char *target, *target2 = NULL; + struct stat buf; + + /* + * For sublinks, we could end up here with an already mounted f/s. + * Don't do anything in that case. + */ + if (!(mf->mf_flags & MFF_MOUNTED)) + err = mf->mf_ops->mount_fs(mp, mf); + + if (err || mf->mf_flags & MFF_ON_AUTOFS) + /* Nothing else to do */ + return err; + + if (!(gopt.flags & CFM_AUTOFS_USE_LOFS)) + /* Symlinks will be requested in autofs_mount_succeeded */ + return 0; + + if (mp->am_link) + target = mp->am_link; + else + target = mf->mf_mount; + + if (target[0] != '/') + target2 = str3cat(NULL, mp->am_parent->am_path, "/", target); + else + target2 = xstrdup(target); + + plog(XLOG_INFO, "autofs: converting from link to lofs (%s -> %s)", mp->am_path, target2); + + /* + * we need to stat() the destination, because the bind mount does not + * follow symlinks and/or allow for non-existent destinations. + * we fall back to symlinks if there are problems. + * + * we need to temporarily change pgrp, otherwise our stat() won't + * trigger whatever cascading mounts are needed. + * + * WARNING: we will deadlock if this function is called from the master + * amd process and it happens to trigger another auto mount. Therefore, + * this function should be called only from a child amd process, or + * at the very least it should not be called from the parent unless we + * know for sure that it won't cause a recursive mount. We refuse to + * cause the recursive mount anyway if called from the parent amd. + */ + if (!foreground) { + if ((err = stat(target2, &buf))) + goto out; + } + if ((err = lstat(target2, &buf))) + goto out; + + if ((err = mount_lofs(mp->am_path, target2, mf->mf_mopts, 1))) { + errno = err; + goto out; + } + + out: + if (target2) + XFREE(target2); + + if (err) + return errno; + return 0; +} + + +int +autofs_umount_fs(am_node *mp, mntfs *mf) +{ + int err = 0; + if (!(mf->mf_flags & MFF_ON_AUTOFS) && + gopt.flags & CFM_AUTOFS_USE_LOFS) { + err = UMOUNT_FS(mp->am_path, mnttab_file_name, 1); + if (err) + return err; + } + + /* + * Multiple sublinks could reference this f/s. + * Don't actually unmount it unless we're holding the last reference. + */ + if (mf->mf_refc == 1) + err = mf->mf_ops->umount_fs(mp, mf); + return err; +} + + +int +autofs_umount_succeeded(am_node *mp) +{ + umntres res; + SVCXPRT *transp = mp->am_transp; + + if (transp) { + res.status = 0; + + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_umntres, + (SVC_IN_ARG_TYPE) &res)) + svcerr_systemerr(transp); + + dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount); + XFREE(transp); + mp->am_transp = NULL; + } + + plog(XLOG_INFO, "autofs: unmounting %s succeeded", mp->am_path); + return 0; +} + + +int +autofs_umount_failed(am_node *mp) +{ + umntres res; + SVCXPRT *transp = mp->am_transp; + + if (transp) { + res.status = 1; + + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_umntres, + (SVC_IN_ARG_TYPE) &res)) + svcerr_systemerr(transp); + + dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount); + XFREE(transp); + mp->am_transp = NULL; + } + + plog(XLOG_INFO, "autofs: unmounting %s failed", mp->am_path); + return 0; +} + + +void +autofs_mount_succeeded(am_node *mp) +{ + SVCXPRT *transp = mp->am_transp; + struct stat stb; + + /* + * Store dev and rdev -- but not for symlinks + */ + if (gopt.flags & CFM_AUTOFS_USE_LOFS || + mp->am_al->al_mnt->mf_flags & MFF_ON_AUTOFS) { + if (!lstat(mp->am_path, &stb)) { + mp->am_dev = stb.st_dev; + mp->am_rdev = stb.st_rdev; + } + /* don't expire the entries -- the kernel will do it for us */ + mp->am_flags |= AMF_NOTIMEOUT; + } + + if (transp) { + autofs_mountres res; + res.mr_type.status = AUTOFS_DONE; + res.mr_type.mount_result_type_u.error = AUTOFS_OK; + res.mr_verbose = 1; + + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_autofs_mountres, + (SVC_IN_ARG_TYPE) &res)) + svcerr_systemerr(transp); + + dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount); + XFREE(transp); + mp->am_transp = NULL; + } + + plog(XLOG_INFO, "autofs: mounting %s succeeded", mp->am_path); +} + + +void +autofs_mount_failed(am_node *mp) +{ + SVCXPRT *transp = mp->am_transp; + + if (transp) { + autofs_mountres res; + res.mr_type.status = AUTOFS_DONE; + res.mr_type.mount_result_type_u.error = AUTOFS_NOENT; + res.mr_verbose = 1; + + if (!svc_sendreply(transp, + (XDRPROC_T_TYPE) xdr_autofs_mountres, + (SVC_IN_ARG_TYPE) &res)) + svcerr_systemerr(transp); + + dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount); + XFREE(transp); + mp->am_transp = NULL; + } + + plog(XLOG_INFO, "autofs: mounting %s failed", mp->am_path); +} + + +void +autofs_get_opts(char *opts, size_t l, autofs_fh_t *fh) +{ + xsnprintf(opts, l, "%sdirect", + fh->direct ? "" : "in"); +} + + +int +autofs_compute_mount_flags(mntent_t *mntp) +{ + /* Must use overlay mounts */ + return MNT2_GEN_OPT_OVERLAY; +} + + +void autofs_timeout_mp(am_node *mp) +{ + /* We don't want any timeouts on autofs nodes */ + mp->am_autofs_ttl = NEVER; +} diff --git a/conf/autofs/autofs_solaris_v2_v3.h b/conf/autofs/autofs_solaris_v2_v3.h new file mode 100644 index 00000000000..5d6ec54509c --- /dev/null +++ b/conf/autofs/autofs_solaris_v2_v3.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 1999-2003 Ion Badulescu + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/autofs/autofs_solaris_v2_v3.h + * + */ + +/* + * Automounter filesystem headers for Solaris v2-v3 + */ + +#ifdef HAVE_FS_AUTOFS +typedef struct autofs_args autofs_fh_t; + +#define AUTOFS_AUTO_FS_FLAGS (FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS | FS_ON_AUTOFS) +#define AUTOFS_DIRECT_FS_FLAGS (FS_DIRECT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS) +#define AUTOFS_ERROR_FS_FLAGS (FS_DISCARD) +#define AUTOFS_HOST_FS_FLAGS (FS_MKMNT | FS_BACKGROUND | FS_AMQINFO) +#define AUTOFS_LINK_FS_FLAGS (FS_MBACKGROUND) +#define AUTOFS_LINKX_FS_FLAGS (FS_MBACKGROUND) +#define AUTOFS_NFSL_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_NFSX_FS_FLAGS (/* FS_UBACKGROUND| */ FS_AMQINFO ) +#define AUTOFS_PROGRAM_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO) +#define AUTOFS_ROOT_FS_FLAGS (FS_NOTIMEOUT | FS_AMQINFO | FS_DIRECTORY) +#define AUTOFS_TOPLVL_FS_FLAGS (FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS) +#define AUTOFS_UNION_FS_FLAGS (FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_ON_AUTOFS) + +#define AUTOFS_CACHEFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_CDFS_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_EFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_LOFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_NFS_FS_FLAGS (FS_BACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_PCFS_FS_FLAGS (FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_UFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#define AUTOFS_XFS_FS_FLAGS (FS_NOTIMEOUT | FS_UBACKGROUND | FS_AMQINFO | FS_ON_AUTOFS) +#endif /* HAVE_FS_AUTOFS */ diff --git a/conf/checkmount/checkmount_aix.c b/conf/checkmount/checkmount_aix.c new file mode 100644 index 00000000000..599c136facf --- /dev/null +++ b/conf/checkmount/checkmount_aix.c @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/checkmount/checkmount_aix.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include + + +/* + * These were missing external definitions from old AIX's headers. They + * appear to be available in on AIX 5.3, and possibly + * earlier. Hence I commented this out. + */ +#ifndef HAVE_EXTERN_MNTCTL +extern int mntctl(int cmd, int size, voidp buf); +#endif /* not HAVE_EXTERN_MNTCTL */ +extern int is_same_host(char *name1, char *name2, struct in_addr addr2); + + +int +fixmount_check_mount(char *host, struct in_addr hostaddr, char *path) +{ + int ret, i; + char *mntinfo = NULL, *cp; + char *short_hostname, *long_hostname, *mount_point; + struct vmount *vp; + + /* + * First figure out size of mount table and allocate space for a copy... + * Then get mount table for real. + */ + ret = mntctl(MCTL_QUERY, sizeof(i), (char *) &i); + if (ret == 0) { + mntinfo = xmalloc(i); + ret = mntctl(MCTL_QUERY, i, mntinfo); + } + if (ret <= 0) { + fprintf(stderr, "mntctl: %m"); + XFREE(mntinfo); + exit(1); + } + + /* iterate over each vmount structure */ + for (i = 0, cp = mntinfo; i < ret; i++, cp += vp->vmt_length) { + vp = (struct vmount *) cp; + mount_point = vmt2dataptr(vp, VMT_STUB); + long_hostname = vmt2dataptr(vp, VMT_HOSTNAME); + short_hostname = vmt2dataptr(vp, VMT_HOST); + if (STREQ(path, mount_point) && + (is_same_host(long_hostname, host, hostaddr) || + is_same_host(short_hostname, host, hostaddr))) + return 1; + } + + return 0; +} diff --git a/conf/checkmount/checkmount_bsd44.c b/conf/checkmount/checkmount_bsd44.c index a6ec2438da8..6c6b21dcb4a 100644 --- a/conf/checkmount/checkmount_bsd44.c +++ b/conf/checkmount/checkmount_bsd44.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -45,6 +41,9 @@ # include #endif /* HAVE_CONFIG_H */ #include +#if __NetBSD_Version__ > 200030000 +#define statfs statvfs +#endif extern int is_same_host(char *name1, char *name2, struct in_addr addr2); int fixmount_check_mount(char *host, struct in_addr hostaddr, char *path); diff --git a/conf/checkmount/checkmount_default.c b/conf/checkmount/checkmount_default.c new file mode 100644 index 00000000000..18d8fe335fe --- /dev/null +++ b/conf/checkmount/checkmount_default.c @@ -0,0 +1,105 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/checkmount/checkmount_default.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include + +#ifndef _PATH_MTAB +#define _PATH_MTAB "/etc/mtab" +#endif /* not _PATH_MTAB */ + +extern int is_same_host(char *name1, char *name2, struct in_addr addr2); + + +int +fixmount_check_mount(char *host, struct in_addr hostaddr, char *path) +{ + FILE *mtab; + mntent_t *ment; + int found = 0; + + /* scan mtab for path */ + if (!(mtab = setmntent(_PATH_MTAB, "r"))) { + perror(_PATH_MTAB); + exit(1); + } + + /* + * setmntent() doesn't do locking in read-only mode. Too bad -- it seems to + * rely on mount() and friends to do atomic updates by renaming the file. + * Well, our patched amd rewrites mtab in place to avoid NFS lossage, so + * better do the locking ourselves. + */ +#ifdef HAVE_FLOCK + if (flock(fileno(mtab), LOCK_SH) < 0) { +#else /* not HAVE_FLOCK */ + if (lockf(fileno(mtab), F_LOCK, 0) < 0) { +#endif /* not HAVE_FLOCK */ + perror(_PATH_MTAB); + exit(1); + } + + while (!found && (ment = getmntent(mtab))) { + char *colon; + + if ((colon = strchr(ment->mnt_fsname, ':'))) { + *colon = '\0'; + if ((STREQ(colon + 1, path) || + STREQ(ment->mnt_dir, path)) && + is_same_host(ment->mnt_fsname, host, hostaddr)) + found = 1; + } + } + + (void) endmntent(mtab); + + if (!found) { + char *swap; + + /* swap files never show up in mtab, only root fs */ + if ((swap = strstr(path, "swap"))) { + strncpy(swap, "root", 4); /* this should NOT use xstrlcpy */ + found = fixmount_check_mount(host, hostaddr, path); + strncpy(swap, "swap", 4); /* this should NOT use xstrlcpy */ + } + } + return found; +} diff --git a/conf/checkmount/checkmount_osf.c b/conf/checkmount/checkmount_osf.c new file mode 100644 index 00000000000..530433ce232 --- /dev/null +++ b/conf/checkmount/checkmount_osf.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/checkmount/checkmount_osf.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include + +extern int is_same_host(char *name1, char *name2, struct in_addr addr2); + + +int +fixmount_check_mount(char *host, struct in_addr hostaddr, char *path) +{ + int nentries, i; + struct statfs *fslist; + int found = 0; + + nentries = getmntinfo(&fslist, MNT_NOWAIT); + if (nentries <= 0) { + perror("getmntinfo"); + exit(1); + } + + for (i = 0; !found && (i < nentries); i++) { + char *delim; + + /* + * Apparently two forms of nfs mount syntax are + * accepted: host:/path or /path@host + */ + if ((delim = strchr(fslist[i].f_mntfromname, ':'))) { + *delim = '\0'; + if ((STREQ(delim + 1, path) || + STREQ(fslist[i].f_mntonname, path)) && + is_same_host(fslist[i].f_mntfromname, + host, hostaddr)) + found = 1; + } else if ((delim = strchr(fslist[i].f_mntfromname, '@'))) { + *delim = '\0'; + if ((STREQ(fslist[i].f_mntfromname, path) || + STREQ(fslist[i].f_mntonname, path)) && + is_same_host(delim + 1, host, hostaddr)) + found = 1; + } + } + + return found; +} diff --git a/conf/checkmount/checkmount_svr4.c b/conf/checkmount/checkmount_svr4.c new file mode 100644 index 00000000000..4294c2cd42a --- /dev/null +++ b/conf/checkmount/checkmount_svr4.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/checkmount/checkmount_svr4.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include + +extern int is_same_host(char *name1, char *name2, struct in_addr addr2); + + +int +fixmount_check_mount(char *host, struct in_addr hostaddr, char *path) +{ + FILE *mtab; + struct mnttab ment; + int err = 0; + int found = 0; + + /* scan mtab for path */ + if (!(mtab = fopen(MNTTAB, "r"))) { + perror(MNTTAB); + exit(1); + } + + while (!found && (err = getmntent(mtab, &ment)) == 0) { + char *colon; + + if ((colon = strchr(ment.mnt_fsname, ':'))) { + *colon = '\0'; + if ((STREQ(colon + 1, path) || + STREQ(ment.mnt_dir, path)) && + is_same_host(ment.mnt_fsname, host, hostaddr)) + found = 1; + } + } + + if (err > 0) { + fprintf(stderr, "getmntent: %s: %s\n", MNTTAB, + err == MNT_TOOLONG ? "entry exceeds MNT_LINE_MAX" : + err == MNT_TOOMANY ? "too many fields in line" : + err == MNT_TOOFEW ? "too few fields in line" : + "unknown error code"); + exit(1); + } + (void) fclose(mtab); + + /* XXX: Is this still valid in SunOS 5.x ? */ + if (!found) { + char *swap; + + /* swap files never show up in mtab, only root fs */ + if ((swap = strstr(path, "swap"))) { + strncpy(swap, "root", 4); /* this should NOT use xstrlcpy */ + found = fixmount_check_mount(host, hostaddr, path); + strncpy(swap, "swap", 4); /* this should NOT use xstrlcpy */ + } + } + return found; +} diff --git a/conf/checkmount/checkmount_ultrix.c b/conf/checkmount/checkmount_ultrix.c new file mode 100644 index 00000000000..fd67ff453a3 --- /dev/null +++ b/conf/checkmount/checkmount_ultrix.c @@ -0,0 +1,75 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/checkmount/checkmount_ultrix.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include + +extern int is_same_host(char *name1, char *name2, struct in_addr addr2); + + +int +fixmount_check_mount(char *host, struct in_addr hostaddr, char *path) +{ + int start = 0; + int err = 0; + struct fs_data ment; + int found = 0; + + /* scan mtab for path */ + while (!found && (err = getmnt(&start, &ment, sizeof(ment), + NOSTAT_MANY, NULL)) > 0) { + char *colon; + + if (colon = strchr(ment.fd_devname, ':')) { + *colon = '\0'; + if ((STREQ(colon + 1, path) || + STREQ(ment.fd_path, path)) && + is_same_host(ment.fd_devname, host, hostaddr)) + found = 1; + } + } + + if (!found && err < 0) { + perror("getmnt"); + exit(1); + } + return found; +} diff --git a/conf/fh_dref/fh_dref_aix3.h b/conf/fh_dref/fh_dref_aix3.h new file mode 100644 index 00000000000..c7abaa03b1b --- /dev/null +++ b/conf/fh_dref/fh_dref_aix3.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_aix3.h */ +#define NFS_FH_DREF(dst, src) memcpy((char *) &(dst.x), (char *) src, sizeof(struct nfs_fh)) diff --git a/conf/fh_dref/fh_dref_aix42.h b/conf/fh_dref/fh_dref_aix42.h new file mode 100644 index 00000000000..02ba3050227 --- /dev/null +++ b/conf/fh_dref/fh_dref_aix42.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_aix42.h */ +#define NFS_FH_DREF(dst, src) (dst) = (caddr_t)(src) diff --git a/conf/fh_dref/fh_dref_bsd44.h b/conf/fh_dref/fh_dref_bsd44.h new file mode 100644 index 00000000000..72ec8cfa620 --- /dev/null +++ b/conf/fh_dref/fh_dref_bsd44.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_bsd44.h */ +#define NFS_FH_DREF(dst, src) (dst) = (nfsv2fh_t *) (src) diff --git a/conf/fh_dref/fh_dref_default.h b/conf/fh_dref/fh_dref_default.h new file mode 100644 index 00000000000..9a074760fae --- /dev/null +++ b/conf/fh_dref/fh_dref_default.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_default.h */ +#define NFS_FH_DREF(dst, src) (dst) = (src) diff --git a/conf/fh_dref/fh_dref_hpux.h b/conf/fh_dref/fh_dref_hpux.h new file mode 100644 index 00000000000..b3a75708f8d --- /dev/null +++ b/conf/fh_dref/fh_dref_hpux.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_hpux.h */ +#define NFS_FH_DREF(dst, src) (dst) = (fhandle_t *) (src) diff --git a/conf/fh_dref/fh_dref_irix.h b/conf/fh_dref/fh_dref_irix.h new file mode 100644 index 00000000000..1a5de2026bd --- /dev/null +++ b/conf/fh_dref/fh_dref_irix.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_irix.h */ +#define NFS_FH_DREF(dst, src) (dst) = (fhandle_t *) (src) diff --git a/conf/fh_dref/fh_dref_isc3.h b/conf/fh_dref/fh_dref_isc3.h new file mode 100644 index 00000000000..0ff1ad4b915 --- /dev/null +++ b/conf/fh_dref/fh_dref_isc3.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_isc3.h */ +#define NFS_FH_DREF(dst, src) (dst) = *(src) diff --git a/conf/fh_dref/fh_dref_linux.h b/conf/fh_dref/fh_dref_linux.h new file mode 100644 index 00000000000..7ffa5b50695 --- /dev/null +++ b/conf/fh_dref/fh_dref_linux.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_linux.h */ +#define NFS_FH_DREF(dst, src) memcpy((char *) &(dst.data), (char *) src, sizeof(struct nfs_fh)) diff --git a/conf/fh_dref/fh_dref_nextstep.h b/conf/fh_dref/fh_dref_nextstep.h new file mode 100644 index 00000000000..819035443ea --- /dev/null +++ b/conf/fh_dref/fh_dref_nextstep.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_nextstep.h */ +#define NFS_FH_DREF(dst, src) (dst) = (caddr_t) (src) diff --git a/conf/fh_dref/fh_dref_osf2.h b/conf/fh_dref/fh_dref_osf2.h new file mode 100644 index 00000000000..74669a76b7d --- /dev/null +++ b/conf/fh_dref/fh_dref_osf2.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_osf2.h */ +#define NFS_FH_DREF(dst, src) (dst) = (nfsv2fh_t *) (src) diff --git a/conf/fh_dref/fh_dref_osf4.h b/conf/fh_dref/fh_dref_osf4.h new file mode 100644 index 00000000000..5bb073c2763 --- /dev/null +++ b/conf/fh_dref/fh_dref_osf4.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_osf4.h */ +#define NFS_FH_DREF(dst, src) (dst) = (caddr_t) (src) diff --git a/conf/fh_dref/fh_dref_sunos3.h b/conf/fh_dref/fh_dref_sunos3.h new file mode 100644 index 00000000000..c3dd0b60441 --- /dev/null +++ b/conf/fh_dref/fh_dref_sunos3.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_sunos3.h */ +#define NFS_FH_DREF(dst, src) (dst) = (caddr_t) (src) diff --git a/conf/fh_dref/fh_dref_sunos4.h b/conf/fh_dref/fh_dref_sunos4.h new file mode 100644 index 00000000000..f13c6bef3d4 --- /dev/null +++ b/conf/fh_dref/fh_dref_sunos4.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_sunos4.h */ +#define NFS_FH_DREF(dst, src) (dst) = (caddr_t) (src) diff --git a/conf/fh_dref/fh_dref_svr4.h b/conf/fh_dref/fh_dref_svr4.h new file mode 100644 index 00000000000..2b9b686b88f --- /dev/null +++ b/conf/fh_dref/fh_dref_svr4.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/fh_dref/fh_dref_svr4.h */ +#define NFS_FH_DREF(dst, src) (dst) = (caddr_t) (src) diff --git a/conf/hn_dref/hn_dref_isc3.h b/conf/hn_dref/hn_dref_isc3.h new file mode 100644 index 00000000000..82291c19fcf --- /dev/null +++ b/conf/hn_dref/hn_dref_isc3.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/hn_dref/hn_dref_isc3.h */ +#define NFS_HN_DREF(dst, src) xstrlcpy((dst), (src), MAXHOSTNAMELEN) diff --git a/conf/hn_dref/hn_dref_linux.h b/conf/hn_dref/hn_dref_linux.h new file mode 100644 index 00000000000..cf01d300a8a --- /dev/null +++ b/conf/hn_dref/hn_dref_linux.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/hn_dref/hn_dref_linux.h */ +#define NFS_HN_DREF(dst, src) xstrlcpy((dst), (src), MAXHOSTNAMELEN) diff --git a/conf/mount/mount_aix.c b/conf/mount/mount_aix.c new file mode 100644 index 00000000000..6cb83261114 --- /dev/null +++ b/conf/mount/mount_aix.c @@ -0,0 +1,182 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_aix.c + * + */ + +/* + * AIX 5.x Mount helper + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +#define VMT_ROUNDUP(len) (4 * ((len + 3) / 4)) +#define VMT_ASSIGN(vp, idx, data, size) \ + vp->vmt_data[idx].vmt_off = p - (char *) vp; \ + vp->vmt_data[idx].vmt_size = size; \ + memmove(p, data, size); \ + p += VMT_ROUNDUP(size); + +/* missing external definitions from AIX's headers */ +extern int vmount(struct vmount *vmount, int size); + + +static int +aix5_mkvp(char *p, int gfstype, int flags, char *object, char *stub, char *host, char *info, int info_size, char *args) +{ + struct vmount *vp = (struct vmount *) p; + + memset((voidp) vp, 0, sizeof(*vp)); + /* + * Fill in standard fields + */ + vp->vmt_revision = VMT_REVISION; + vp->vmt_flags = flags; + vp->vmt_gfstype = gfstype; + + /* + * Fill in all variable length data + */ + p += sizeof(*vp); + + VMT_ASSIGN(vp, VMT_OBJECT, object, strlen(object) + 1); + VMT_ASSIGN(vp, VMT_STUB, stub, strlen(stub) + 1); + VMT_ASSIGN(vp, VMT_HOST, host, strlen(host) + 1); + VMT_ASSIGN(vp, VMT_HOSTNAME, host, strlen(host) + 1); + VMT_ASSIGN(vp, VMT_INFO, info, info_size); + VMT_ASSIGN(vp, VMT_ARGS, args, strlen(args) + 1); + + /* + * Return length + */ + return vp->vmt_length = p - (char *) vp; +} + + +/* + * Map from conventional mount arguments to AIX 3,x style arguments. + * But we avoid all the messy BIS stuff for AIX 5.x + */ +int +mount_aix3(char *fsname, char *dir, int flags, int type, void *data, char *mnt_opts) +{ + char buf[4096]; + int size, ret; + int real_size = sizeof(nfs_args_t); /* size passed to aix5_mkvp() */ + char *real_args = data; /* args passed to aix5_mkvp() */ + char *host, *rfs, *idx; + int aix_type = type; +#ifdef HAVE_FS_NFS3 + struct nfs_args v2args; + nfs_args_t *v3args = (nfs_args_t *) data; +#endif /* HAVE_FS_NFS3 */ + +#ifdef DEBUG + dlog("mount_aix3: fsname %s, dir %s, type %d", fsname, dir, type); +#endif /* DEBUG */ + + switch (aix_type) { + + case MOUNT_TYPE_NFS: + +#ifdef HAVE_FS_NFS3 + /* + * This is tricky. If we have v3 support, but this nfs mount is v2, + * then I must copy the arguments from the v3 nfs_args to the v2 one. + */ + memmove((voidp) &v2args.addr, (voidp) &v3args->addr, sizeof(struct sockaddr_in)); + v2args.hostname = v3args->hostname; + v2args.netname = v3args->netname; + memmove((voidp) v2args.fh.x, v3args->fh, FHSIZE); + v2args.flags = v3args->flags; + v2args.wsize = v3args->wsize; + v2args.rsize = v3args->rsize; + v2args.timeo = v3args->timeo; + v2args.retrans = v3args->retrans; + v2args.acregmin = v3args->acregmin; + v2args.acregmax = v3args->acregmax; + v2args.acdirmin = v3args->acdirmin; + v2args.acdirmax = v3args->acdirmax; + v2args.pathconf = v3args->pathconf; + + /* now set real_* stuff */ + real_size = sizeof(v2args); + real_args = (char *) &v2args; + + case MOUNT_TYPE_NFS3: +#endif /* HAVE_FS_NFS3 */ + + idx = strchr(fsname, ':'); + if (idx) { + *idx = '\0'; + rfs = xstrdup(idx + 1); + host = xstrdup(fsname); + *idx = ':'; + } else { + rfs = xstrdup(fsname); + host = xstrdup(am_get_hostname()); + } + + size = aix5_mkvp(buf, type, flags, rfs, dir, host, + real_args, real_size, mnt_opts); + XFREE(rfs); + XFREE(host); + break; + + case MOUNT_TYPE_UFS: + /* Need to open block device and extract log device info from sblk. */ + return EINVAL; + + default: + return EINVAL; + } + + /* + * XXX: Warning, if vmount() hangs your amd in AIX 5.1, it + * is because of a kernel bug in the NFS code. Get a patch from IBM + * or upgrade to 5.2. + */ + ret = vmount((struct vmount *)buf, size); + if (ret < 0) { + plog(XLOG_ERROR, "mount_aix3: vmount failed with errno %d", errno); + perror ("vmount"); + } + return ret; +} diff --git a/conf/mount/mount_aix3.c b/conf/mount/mount_aix3.c new file mode 100644 index 00000000000..5e66791b270 --- /dev/null +++ b/conf/mount/mount_aix3.c @@ -0,0 +1,225 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_aix3.c + * + */ + +/* + * AIX 3.x/4.x Mount helper + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +#define VMT_ROUNDUP(len) (4 * ((len + 3) / 4)) +#define VMT_ASSIGN(vp, idx, data, size) \ + vp->vmt_data[idx].vmt_off = p - (char *) vp; \ + vp->vmt_data[idx].vmt_size = size; \ + memmove(p, data, size); \ + p += VMT_ROUNDUP(size); + +/* missing external definitions from AIX's headers */ +extern int vmount(struct vmount *vmount, int size); + + +static int +aix3_mkvp(char *p, int gfstype, int flags, char *object, char *stub, char *host, char *info, int info_size, char *args) +{ + struct vmount *vp = (struct vmount *) p; + + memset((voidp) vp, 0, sizeof(*vp)); + /* + * Fill in standard fields + */ + vp->vmt_revision = VMT_REVISION; + vp->vmt_flags = flags; + vp->vmt_gfstype = gfstype; + + /* + * Fill in all variable length data + */ + p += sizeof(*vp); + + VMT_ASSIGN(vp, VMT_OBJECT, object, strlen(object) + 1); + VMT_ASSIGN(vp, VMT_STUB, stub, strlen(stub) + 1); + VMT_ASSIGN(vp, VMT_HOST, host, strlen(host) + 1); + VMT_ASSIGN(vp, VMT_HOSTNAME, host, strlen(host) + 1); + VMT_ASSIGN(vp, VMT_INFO, info, info_size); + VMT_ASSIGN(vp, VMT_ARGS, args, strlen(args) + 1); + + /* + * Return length + */ + return vp->vmt_length = p - (char *) vp; +} + + +/* + * Map from conventional mount arguments + * to AIX 3-style arguments. + */ +int +mount_aix3(char *fsname, char *dir, int flags, int type, void *data, char *mnt_opts) +{ + char buf[4096]; + int size, ret; + int real_size = sizeof(nfs_args_t); /* size passed to aix3_mkvp() */ + char *real_args = data; /* args passed to aix3_mkvp() */ + char *host, *rfs, *idx; + int aix_type = type; +#ifdef HAVE_FS_NFS3 + struct nfs_args v2args; + nfs_args_t *v3args = (nfs_args_t *) data; +#ifdef MOUNT_TYPE_NFS3_BIS + struct aix4_nfs_args_bis v3args_bis; +#endif /* MOUNT_TYPE_NFS3_BIS */ +#endif /* HAVE_FS_NFS3 */ + +#ifdef DEBUG + dlog("mount_aix3: fsname %s, dir %s, type %d", fsname, dir, type); +#endif /* DEBUG */ + +#ifdef MOUNT_TYPE_NFS3_BIS + retry_ibm_buggy_service_pack: +#endif /* MOUNT_TYPE_NFS3_BIS */ + switch (aix_type) { + + case MOUNT_TYPE_NFS: + +#ifdef HAVE_FS_NFS3 + /* + * This is tricky. If we have v3 support, but this nfs mount is v2, + * then I must copy the arguments from the v3 nfs_args to the v2 one. + */ + memmove((voidp) &v2args.addr, (voidp) &v3args->addr, sizeof(struct sockaddr_in)); + v2args.hostname = v3args->hostname; + v2args.netname = v3args->netname; + memmove((voidp) v2args.fh, v3args->fh, FHSIZE); + v2args.flags = v3args->flags; + v2args.wsize = v3args->wsize; + v2args.rsize = v3args->rsize; + v2args.timeo = v3args->timeo; + v2args.retrans = v3args->retrans; + v2args.acregmin = v3args->acregmin; + v2args.acregmax = v3args->acregmax; + v2args.acdirmin = v3args->acdirmin; + v2args.acdirmax = v3args->acdirmax; + v2args.pathconf = v3args->pathconf; + + /* now set real_* stuff */ + real_size = sizeof(v2args); + real_args = (char *) &v2args; + + case MOUNT_TYPE_NFS3: +#ifdef MOUNT_TYPE_NFS3_BIS + case MOUNT_TYPE_NFS3_BIS: + /* just fall through */ + if (aix_type == MOUNT_TYPE_NFS3_BIS) { + dlog("mount_aix3: creating alternate nfs3_args structure"); + memmove((voidp) &v3args_bis.addr, (voidp) &v3args->addr, sizeof(struct sockaddr_in)); + v3args_bis.syncaddr = v3args->syncaddr; + v3args_bis.proto = v3args->proto; + v3args_bis.hostname = v3args->hostname; + v3args_bis.netname = v3args->netname; + v3args_bis.fh = v3args->fh; + v3args_bis.flags = v3args->flags; + v3args_bis.wsize = v3args->wsize; + v3args_bis.rsize = v3args->rsize; + v3args_bis.timeo = v3args->timeo; + v3args_bis.retrans = v3args->retrans; + v3args_bis.acregmin = v3args->acregmin; + v3args_bis.acregmax = v3args->acregmax; + v3args_bis.acdirmin = v3args->acdirmin; + v3args_bis.acdirmax = v3args->acdirmax; + v3args_bis.pathconf = v3args->pathconf; + v3args_bis.biods = v3args->biods; + v3args_bis.numclust = v3args->numclust; + /* now set real_* stuff */ + real_size = sizeof(v3args_bis); + real_args = (char *) &v3args_bis; + } +#endif /* MOUNT_TYPE_NFS3_BIS */ +#endif /* HAVE_FS_NFS3 */ + + idx = strchr(fsname, ':'); + if (idx) { + *idx = '\0'; + rfs = xstrdup(idx + 1); + host = xstrdup(fsname); + *idx = ':'; + } else { + rfs = xstrdup(fsname); + host = xstrdup(am_get_hostname()); + } + + size = aix3_mkvp(buf, type, flags, rfs, dir, host, + real_args, real_size, mnt_opts); + XFREE(rfs); + XFREE(host); + break; + + case MOUNT_TYPE_UFS: + /* Need to open block device and extract log device info from sblk. */ + return EINVAL; + + default: + return EINVAL; + } + + /* + * XXX: Warning, if vmount() hangs your amd in AIX 5.1, it + * is because of a kernel bug in the NFS code. Get a patch from IBM + * or upgrade to 5.2. + */ + ret = vmount((struct vmount *)buf, size); + if (ret < 0) { + plog(XLOG_ERROR, "mount_aix3: vmount failed with errno %d", errno); + perror ("vmount"); +#ifdef MOUNT_TYPE_NFS3_BIS + if (aix_type == MOUNT_TYPE_NFS3 && errno == EINVAL) { + aix_type = MOUNT_TYPE_NFS3_BIS; +#ifdef DEBUG + dlog("mount_aix3: retrying with alternate nfs3_args structure"); +#endif /* DEBUG */ + goto retry_ibm_buggy_service_pack; + } +#endif /* MOUNT_TYPE_NFS3_BIS */ + } + return ret; +} diff --git a/conf/mount/mount_bsdi3.c b/conf/mount/mount_bsdi3.c new file mode 100644 index 00000000000..bb39f99a6ce --- /dev/null +++ b/conf/mount/mount_bsdi3.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_bsdi3.c + * + */ + +/* + * BSD/OS 3 Mount helper + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include diff --git a/conf/mount/mount_default.c b/conf/mount/mount_default.c index 1bdf52293cf..9e85e160171 100644 --- a/conf/mount/mount_default.c +++ b/conf/mount/mount_default.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2003 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -36,9 +32,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * %W% (Berkeley) %G% * - * $Id: mount_default.c,v 1.1.2.3 2002/12/27 22:44:48 ezk Exp $ + * File: am-utils/conf/mount/mount_default.c */ /* diff --git a/conf/mount/mount_hpux.c b/conf/mount/mount_hpux.c new file mode 100644 index 00000000000..5a0e0204669 --- /dev/null +++ b/conf/mount/mount_hpux.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_hpux.c + * + */ + +/* + * HPUX: + * HPUX 9.0 and 10.0 Mount helper. + * -Erez Zadok + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +/* + * Map from conventional mount arguments + * to HPUX style arguments. + */ +int +mount_hpux(MTYPE_TYPE type, const char *dir, int flags, caddr_t data) +{ + +#if defined(MOUNT_TYPE_NFS) && defined(MOUNT_NFS) + if (STREQ(type, MOUNT_TYPE_NFS)) + return vfsmount(MOUNT_NFS, dir, flags, data); +#endif /* defined(MOUNT_TYPE_NFS) && defined(MOUNT_NFS) */ + +#if defined(MOUNT_TYPE_UFS) && defined(MOUNT_UFS) + if (STREQ(type, MOUNT_TYPE_UFS)) + return vfsmount(MOUNT_UFS, dir, flags, data); +#endif /* defined(MOUNT_TYPE_UFS) && defined(MOUNT_UFS) */ + +#if defined(MOUNT_TYPE_PCFS) && defined(MOUNT_PC) + /* + * MOUNT_TYPE_PCFS gets redefined in conf/trap/trap_hpux.h because of + * stupidities in HPUX 9.0's headers. + */ + if (STREQ(type, MOUNT_TYPE_PCFS)) + return vfsmount(MOUNT_PC, dir, flags, data); +#endif /* defined(MOUNT_TYPE_PCFS) && defined(MOUNT_PC) */ + +#if defined(MOUNT_TYPE_CDFS) && defined(MOUNT_CDFS) + if (STREQ(type, MOUNT_TYPE_CDFS)) + return vfsmount(MOUNT_CDFS, dir, flags, data); +#endif /* defined(MOUNT_TYPE_CDFS) && defined(MOUNT_CDFS) */ + + return EINVAL; +} diff --git a/conf/mount/mount_irix5.c b/conf/mount/mount_irix5.c new file mode 100644 index 00000000000..359e55a8333 --- /dev/null +++ b/conf/mount/mount_irix5.c @@ -0,0 +1,98 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_irix5.c + * + */ + +/* + * IRIX Mount helper + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +/* + * Map from conventional mount arguments + * to IRIX style arguments. + * + * NOTE: We have to use struct nfs_args (not nfs_args_t) below because + * while IRIX5.3 needs the fh_len field added to struct nfs_args for NFS3 + * mounts to succeed, the the mount syscall fails if the argument size + * includes fh_len! Talk about a broken interface ... -- stolcke 7/4/97 + */ +int +mount_irix(char *fsname, char *dir, int flags, MTYPE_TYPE type, voidp data) +{ + +#ifdef DEBUG + dlog("mount_irix: fsname %s, dir %s, type %d", fsname, dir, type); +#endif /* DEBUG */ + +#ifdef HAVE_FS_NFS3 + if (STREQ(type, MOUNT_TYPE_NFS3)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (struct nfs_args *) data, sizeof(struct nfs_args)); +#endif /* HAVE_FS_NFS3 */ + +#ifdef HAVE_FS_NFS + if (STREQ(type, MOUNT_TYPE_NFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (struct nfs_args *) data, sizeof(struct nfs_args)); +#endif /* HAVE_FS_NFS */ + + /* XXX: do I need to pass {u,x,e}fs_args ? */ + +#ifdef HAVE_FS_UFS + if (STREQ(type, MOUNT_TYPE_UFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | flags), type); +#endif /* HAVE_FS_UFS */ + +#ifdef HAVE_FS_EFS + if (STREQ(type, MOUNT_TYPE_EFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | flags), type); +#endif /* HAVE_FS_EFS */ + +#ifdef HAVE_FS_XFS + if (STREQ(type, MOUNT_TYPE_XFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | flags), type); +#endif /* HAVE_FS_XFS */ + + return EINVAL; +} diff --git a/conf/mount/mount_irix6.c b/conf/mount/mount_irix6.c new file mode 100644 index 00000000000..b0eb55bd633 --- /dev/null +++ b/conf/mount/mount_irix6.c @@ -0,0 +1,106 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_irix6.c + * + */ + +/* + * IRIX Mount helper + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +/* + * Map from conventional mount arguments + * to IRIX style arguments. + */ +int +mount_irix(char *fsname, char *dir, int flags, MTYPE_TYPE type, voidp data) +{ + +#ifdef DEBUG + dlog("mount_irix: fsname %s, dir %s, type %s", fsname, dir, type); +#endif /* DEBUG */ + +#ifdef HAVE_FS_NFS3 + if (STREQ(type, MOUNT_TYPE_NFS3)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (nfs_args_t *) data, sizeof(nfs_args_t)); +#endif /* HAVE_FS_NFS3 */ + +#ifdef HAVE_FS_NFS + if (STREQ(type, MOUNT_TYPE_NFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (nfs_args_t *) data, sizeof(nfs_args_t)); +#endif /* HAVE_FS_NFS */ + +#ifdef HAVE_FS_UFS + if (STREQ(type, MOUNT_TYPE_UFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (ufs_args_t *) data, sizeof(ufs_args_t)); +#endif /* HAVE_FS_UFS */ + +#ifdef HAVE_FS_XFS + if (STREQ(type, MOUNT_TYPE_XFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (xfs_args_t *) data, sizeof(xfs_args_t)); +#endif /* HAVE_FS_XFS */ + +#ifdef HAVE_FS_EFS + if (STREQ(type, MOUNT_TYPE_EFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (efs_args_t *) data, sizeof(efs_args_t)); +#endif /* HAVE_FS_EFS */ + +#ifdef HAVE_FS_AUTOFS + if (STREQ(type, MOUNT_TYPE_AUTOFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (autofs_args_t *) data, sizeof(autofs_args_t)); +#endif /* HAVE_FS_AUTOFS */ + +#ifdef HAVE_FS_LOFS + if (STREQ(type, MOUNT_TYPE_LOFS)) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (char *) NULL, 0); +#endif /* HAVE_FS_LOFS */ + + return EINVAL; +} diff --git a/conf/mount/mount_isc3.c b/conf/mount/mount_isc3.c new file mode 100644 index 00000000000..0896a31b5b4 --- /dev/null +++ b/conf/mount/mount_isc3.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_isc3.c + */ + +/* + * IX/386 Mount helper + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +/* + * Map from conventional mount arguments + * to IX/386 style arguments. + */ +int +mount_isc3(char *fsname, char *dir, int flags, int type, void *data) +{ + +#ifdef DEBUG + dlog("mount_isc3: fsname %s, dir %s, type %d", fsname, dir, type); +#endif /* DEBUG */ + + if (type == MOUNT_TYPE_NFS) + return mount("/dev/nfsd", dir, + (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_DATA | flags), + type, (struct nfs_args *) data, + sizeof(struct nfs_args)); + + if (type == MOUNT_TYPE_UFS) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | flags), type); + + return EINVAL; +} diff --git a/conf/mount/mount_linux.c b/conf/mount/mount_linux.c new file mode 100644 index 00000000000..d3841cedc5f --- /dev/null +++ b/conf/mount/mount_linux.c @@ -0,0 +1,1153 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_linux.c + */ + +/* + * Linux mount helper. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include +#include + +#ifdef HAVE_RPC_AUTH_H +# include +#endif + +#ifndef MOUNT_TYPE_UFS +/* + * Autoconf didn't find any disk-based f/s on this system, + * So provide some default definition for this file to compile. + */ +# define MOUNT_TYPE_UFS "no_disk_fs" +#endif /* not MOUNT_TYPE_UFS */ + +struct opt_map { + const char *opt; /* option name */ + int inv; /* true if flag value should be inverted */ + int mask; /* flag mask value */ +}; + +const struct opt_map opt_map[] = +{ + {"defaults", 0, 0}, + {MNTTAB_OPT_RO, 0, MNT2_GEN_OPT_RDONLY}, + {MNTTAB_OPT_RW, 1, MNT2_GEN_OPT_RDONLY}, + {MNTTAB_OPT_EXEC, 1, MNT2_GEN_OPT_NOEXEC}, + {MNTTAB_OPT_NOEXEC, 0, MNT2_GEN_OPT_NOEXEC}, + {MNTTAB_OPT_SUID, 1, MNT2_GEN_OPT_NOSUID}, + {MNTTAB_OPT_NOSUID, 0, MNT2_GEN_OPT_NOSUID}, +#ifdef MNT2_GEN_OPT_NODEV + {MNTTAB_OPT_NODEV, 0, MNT2_GEN_OPT_NODEV}, +#endif /* MNT2_GEN_OPT_NODEV */ +#ifdef MNT2_GEN_OPT_SYNC + {MNTTAB_OPT_SYNC, 0, MNT2_GEN_OPT_SYNC}, + {MNTTAB_OPT_ASYNC, 1, MNT2_GEN_OPT_SYNC}, +#endif /* MNT2_GEN_OPT_SYNC */ +#ifdef MNT2_GEN_OPT_NOSUB + {MNTTAB_OPT_SUB, 1, MNT2_GEN_OPT_NOSUB}, + {MNTTAB_OPT_NOSUB, 0, MNT2_GEN_OPT_NOSUB}, +#endif /* MNT2_GEN_OPT_NOSUB */ +#ifdef MNT2_GEN_OPT_SYNCHRONOUS + {"synchronous", 0, MNT2_GEN_OPT_SYNCHRONOUS}, +#endif /* MNT2_GEN_OPT_SYNCHRONOUS */ +#ifdef MNT2_GEN_OPT_MANDLOCK + {"mandlock", 0, MNT2_GEN_OPT_MANDLOCK}, +#endif /* MNT2_GEN_OPT_MANDLOCK */ +#ifdef MNT2_GEN_OPT_NOATIME + {"noatime", 0, MNT2_GEN_OPT_NOATIME}, +#endif /* MNT2_GEN_OPT_NOATIME */ +#ifdef MNT2_GEN_OPT_NODIRATIME + {"nodiratime", 0, MNT2_GEN_OPT_NODIRATIME}, +#endif /* MNT2_GEN_OPT_NODIRATIME */ + {NULL, 0, 0} +}; + +struct fs_opts { + const char *opt; + int type; /* XXX: Ion, what is this for? */ +}; + +const struct fs_opts iso_opts[] = { + { "map", 0 }, + { "norock", 0 }, + { "cruft", 0 }, + { "unhide", 0 }, + { "conv", 1 }, + { "block", 1 }, + { "mode", 1 }, + { "gid", 1 }, + { "uid", 1 }, + { NULL, 0 } +}; + +const struct fs_opts dos_opts[] = { + { "check", 1 }, + { "conv", 1 }, + { "uid", 1 }, + { "gid", 1 }, + { "umask", 1 }, + { "debug", 0 }, + { "fat", 1 }, + { "quiet", 0 }, + { "blocksize",1 }, + { NULL, 0 } +}; + +const struct fs_opts autofs_opts[] = { + { "fd", 1 }, + { "pgrp", 1 }, + { "minproto", 1 }, + { "maxproto", 1 }, + { NULL, 0 } +}; + +const struct fs_opts lustre_opts[] = { + { "flock", 0 }, + { "localflock", 0 }, + { NULL, 0 } +}; + +const struct fs_opts null_opts[] = { + { NULL, 0 } +}; + +const struct fs_opts ext2_opts[] = { + { "check", 1 }, + { "nocheck", 0 }, + { "debug", 0 }, + { "errors", 1 }, + { "grpid", 0 }, + { "nogrpid", 0 }, + { "bsdgroups", 0 }, + { "sysvgroups", 0 }, + { "grpquota", 0 }, + { "usrquota", 0 }, + { "noquota", 0 }, + { "quota", 0 }, + { "nouid32", 0 }, + { "oldalloc", 0 }, + { "orlov", 0 }, + { "resgid", 1 }, + { "resuid", 1 }, + { "sb", 1 }, + { "user_xattr", 1 }, + { "nouser_xattr", 1 }, + { "journal_dev", 0 }, + { "norecovery", 0 }, + { "noload", 0 }, + { "data", 1 }, + { "barrier", 1 }, + { "commit", 1 }, + { "user_xattr", 0 }, + { "nouser_xattr", 0 }, + { "acl", 0 }, + { "noacl", 0 }, + { "bsddf", 0 }, + { "minixdf", 0 }, + { "usrjquota", 1 }, + { "grpjquota", 1 }, + { "jqfmt", 1 }, + { NULL, 0 } +}; + +const struct fs_opts ext3_opts[] = { + { "check", 1 }, + { "nocheck", 0 }, + { "debug", 0 }, + { "errors", 1 }, + { "grpid", 0 }, + { "nogrpid", 0 }, + { "bsdgroups", 0 }, + { "sysvgroups", 0 }, + { "grpquota", 0 }, + { "usrquota", 0 }, + { "noquota", 0 }, + { "quota", 0 }, + { "nouid32", 0 }, + { "oldalloc", 0 }, + { "orlov", 0 }, + { "resgid", 1 }, + { "resuid", 1 }, + { "sb", 1 }, + { "user_xattr", 1 }, + { "nouser_xattr", 1 }, + { "journal", 1 }, + { "journal_dev", 1 }, + { "norecovery", 0 }, + { "noload", 0 }, + { "data", 1 }, + { "barrier", 1 }, + { "commit", 1 }, + { "user_xattr", 0 }, + { "nouser_xattr", 0 }, + { "acl", 0 }, + { "noacl", 0 }, + { "bsddf", 0 }, + { "minixdf", 0 }, + { "usrjquota", 1 }, + { "grpjquota", 1 }, + { "jqfmt", 1 }, + { NULL, 0 } +}; + +const struct fs_opts ext4_opts[] = { + { "debug", 0 }, + { "errors", 1 }, + { "grpid", 0 }, + { "nogrpid", 0 }, + { "bsdgroups", 0 }, + { "sysvgroups", 0 }, + { "grpquota", 0 }, + { "usrquota", 0 }, + { "noquota", 0 }, + { "quota", 0 }, + { "oldalloc", 0 }, + { "orlov", 0 }, + { "resgid", 1 }, + { "resuid", 1 }, + { "sb", 1 }, + { "user_xattr", 1 }, + { "nouser_xattr", 1 }, + { "journal", 1 }, + { "journal_dev", 1 }, + { "noload", 0 }, + { "data", 1 }, + { "commit", 1 }, + { "user_xattr", 0 }, + { "nouser_xattr", 0 }, + { "acl", 0 }, + { "noacl", 0 }, + { "bsddf", 0 }, + { "minixdf", 0 }, + { "usrjquota", 1 }, + { "grpjquota", 1 }, + { "jqfmt", 1 }, + { "journal_checksum", 0 }, + { "journal_async_commit", 0 }, + { "journal", 1 }, + { "barrier", 1 }, + { "nobarrier", 0 }, + { "inode_readahead_blks", 1 }, + { "stripe", 1 }, + { "delalloc", 0 }, + { "nodelalloc", 0 }, + { "min_batch_time", 1 }, + { "mxn_batch_time", 1 }, + { "journal_ioprio", 1 }, + { "abort", 0 }, + { "auto_da_alloc", 0 }, + { "noauto_da_alloc", 0 }, + { "discard", 0 }, + { "nodiscard", 0 }, + { "nouid32", 0 }, + { "resize", 0 }, + { "block_validity", 0 }, + { "noblock_validity", 0 }, + { "dioread_lock", 0 }, + { "dioread_nolock", 0 }, + { NULL, 0 } +}; + + +/* + * New parser for linux-specific mounts. + * Should now handle fs-type specific mount-options correctly. + * Currently implemented: msdos, iso9660. + */ +static char * +parse_opts(char *type, const char *optstr, int *flags, char **xopts, int *noauto) +{ + const struct opt_map *std_opts; + const struct fs_opts *dev_opts; + char *opt, *topts, *xoptstr; + size_t l; + + if (optstr == NULL) + return NULL; + + xoptstr = xstrdup(optstr); /* because strtok is destructive below */ + + *noauto = 0; + l = strlen(optstr) + 2; + *xopts = (char *) xmalloc(l); + topts = (char *) xmalloc(l); + *topts = '\0'; + **xopts = '\0'; + + for (opt = strtok(xoptstr, ","); opt; opt = strtok(NULL, ",")) { + /* + * First, parse standard options + */ + std_opts = opt_map; + while (std_opts->opt && + !NSTREQ(std_opts->opt, opt, strlen(std_opts->opt))) + ++std_opts; + if (!(*noauto = STREQ(opt, MNTTAB_OPT_NOAUTO)) || std_opts->opt) { + xstrlcat(topts, opt, l); + xstrlcat(topts, ",", l); + if (std_opts->inv) + *flags &= ~std_opts->mask; + else + *flags |= std_opts->mask; + } + /* + * Next, select which fs-type is to be used + * and parse the fs-specific options + */ +#ifdef MOUNT_TYPE_AUTOFS + if (STREQ(type, MOUNT_TYPE_AUTOFS)) { + dev_opts = autofs_opts; + goto do_opts; + } +#endif /* MOUNT_TYPE_AUTOFS */ +#ifdef MOUNT_TYPE_PCFS + if (STREQ(type, MOUNT_TYPE_PCFS)) { + dev_opts = dos_opts; + goto do_opts; + } +#endif /* MOUNT_TYPE_PCFS */ +#ifdef MOUNT_TYPE_CDFS + if (STREQ(type, MOUNT_TYPE_CDFS)) { + dev_opts = iso_opts; + goto do_opts; + } +#endif /* MOUNT_TYPE_CDFS */ +#ifdef MOUNT_TYPE_LOFS + if (STREQ(type, MOUNT_TYPE_LOFS)) { + dev_opts = null_opts; + goto do_opts; + } +#endif /* MOUNT_TYPE_LOFS */ +#ifdef MOUNT_TYPE_LUSTRE + if (STREQ(type, MOUNT_TYPE_LUSTRE)) { + dev_opts = lustre_opts; + goto do_opts; + } +#endif /* MOUNT_TYPE_LUSTRE */ +#ifdef MOUNT_TYPE_EXT2 + if (STREQ(type, MOUNT_TYPE_EXT2)) { + dev_opts = ext2_opts; + goto do_opts; + } +#endif /* MOUNT_TYPE_EXT2 */ +#ifdef MOUNT_TYPE_EXT3 + if (STREQ(type, MOUNT_TYPE_EXT3)) { + dev_opts = ext3_opts; + goto do_opts; + } +#endif /* MOUNT_TYPE_EXT3 */ +#ifdef MOUNT_TYPE_EXT4 + if (STREQ(type, MOUNT_TYPE_EXT4)) { + dev_opts = ext4_opts; + goto do_opts; + } +#endif /* MOUNT_TYPE_EXT4 */ + plog(XLOG_FATAL, "linux mount: unknown fs-type: %s\n", type); + XFREE(xoptstr); + XFREE(*xopts); + XFREE(topts); + return NULL; + +do_opts: + while (dev_opts->opt && + (!NSTREQ(dev_opts->opt, opt, strlen(dev_opts->opt)))) { + ++dev_opts; + } + if (dev_opts->opt) { + xstrlcat(*xopts, opt, l); + xstrlcat(*xopts, ",", l); + } + } + /* + * All other options are discarded + */ + if (strlen(*xopts)) + *(*xopts + strlen(*xopts)-1) = '\0'; + if (strlen(topts)) + topts[strlen(topts)-1] = '\0'; + XFREE(xoptstr); + return topts; +} + + +/* + * Returns combined linux kernel version number. For a kernel numbered + * x.y.z, returns x*65535+y*256+z. + */ +int +linux_version_code(void) +{ + char *token; + int shift = 16; + struct utsname my_utsname; + static int release = 0; + + if ( release || uname(&my_utsname)) + return release; + + for (token = strtok(my_utsname.release, "."); token && (shift > -1); token = strtok(NULL, ".")) + { + release |= (atoi(token) << shift); + shift -= 8; + } + + return release; +} + + +int +do_mount_linux(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data) +{ + if (amuDebug(D_FULL)) { + plog(XLOG_DEBUG, "do_mount_linux: fsname %s\n", mnt->mnt_fsname); + plog(XLOG_DEBUG, "do_mount_linux: type (mntent) %s\n", mnt->mnt_type); + plog(XLOG_DEBUG, "do_mount_linux: opts %s\n", mnt->mnt_opts); + plog(XLOG_DEBUG, "do_mount_linux: dir %s\n", mnt->mnt_dir); + } + + /* + * If we have an nfs mount, the 5th argument to system mount() must be the + * nfs_mount_data structure, otherwise it is the return from parse_opts() + */ + return mount(mnt->mnt_fsname, + mnt->mnt_dir, + type, + MS_MGC_VAL | flags, + data); +} + +static void +setup_nfs_args(struct nfs_common_args *ca) +{ + if (!ca->timeo) { +#ifdef MNT2_NFS_OPT_TCP + if (ca->flags & MNT2_NFS_OPT_TCP) + ca->timeo = 600; + else +#endif /* MNT2_NFS_OPT_TCP */ + ca->timeo = 7; + } + if (!ca->retrans) + ca->retrans = 3; + +#ifdef MNT2_NFS_OPT_NOAC + if (!(ca->flags & MNT2_NFS_OPT_NOAC)) { + if (!(ca->flags & MNT2_NFS_OPT_ACREGMIN)) + ca->acregmin = 3; + if (!(ca->flags & MNT2_NFS_OPT_ACREGMAX)) + ca->acregmax = 60; + if (!(ca->flags & MNT2_NFS_OPT_ACDIRMIN)) + ca->acdirmin = 30; + if (!(ca->flags & MNT2_NFS_OPT_ACDIRMAX)) + ca->acdirmax = 60; + } +#endif /* MNT2_NFS_OPT_NOAC */ +} + + +int +mount_linux_nfs(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data) +{ + nfs_args_t *mnt_data = (nfs_args_t *) data; + int errorcode; + struct nfs_common_args a; + + /* Fake some values for linux */ + mnt_data->version = NFS_MOUNT_VERSION; + + put_nfs_common_args(mnt_data, a); + setup_nfs_args(&a); + get_nfs_common_args(mnt_data, a); + + /* + * in nfs structure implementation version 4, the old + * filehandle field was renamed "old_root" and left as 3rd field, + * while a new field called "root" was added to the end of the + * structure. Both of them however need a copy of the file handle + * for NFSv2 mounts. + */ +#ifdef MNT2_NFS_OPT_VER3 + if (mnt_data->flags & MNT2_NFS_OPT_VER3) + memset(mnt_data->old_root.data, 0, FHSIZE); + else +#endif /* MNT2_NFS_OPT_VER3 */ + memcpy(mnt_data->old_root.data, mnt_data->root.data, FHSIZE); + +#ifdef HAVE_NFS_ARGS_T_BSIZE + /* linux mount version 3 */ + mnt_data->bsize = 0; /* let the kernel decide */ +#endif /* HAVE_NFS_ARGS_T_BSIZE */ + +#ifdef HAVE_NFS_ARGS_T_NAMLEN + /* linux mount version 2 */ + mnt_data->namlen = NAME_MAX; /* 256 bytes */ +#endif /* HAVE_NFS_ARGS_T_NAMELEN */ + +#ifdef HAVE_NFS_ARGS_T_PSEUDOFLAVOR +# ifdef HAVE_RPC_AUTH_H + mnt_data->pseudoflavor = AUTH_UNIX; +# else + mnt_data->pseudoflavor = 0; +# endif +#endif /* HAVE_NFS_ARGS_T_PSEUDOFLAVOR */ + +#ifdef HAVE_NFS_ARGS_T_CONTEXT + memset(mnt_data->context, 0, sizeof(mnt_data->context)); +#endif /* HAVE_NFS_ARGS_T_CONTEXT */ + + mnt_data->fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + if (mnt_data->fd < 0) { + plog(XLOG_ERROR, "Can't create socket for kernel"); + return 1; + } + if (bindresvport(mnt_data->fd, NULL) < 0) { + plog(XLOG_ERROR, "Can't bind to reserved port"); + errorcode = 1; + goto out; + } + /* + * connect() the socket for kernels 1.3.10 and below + * only to avoid problems with multihomed hosts. + */ + if (linux_version_code() <= 0x01030a) { + int ret = connect(mnt_data->fd, + (struct sockaddr *) &mnt_data->addr, + sizeof(mnt_data->addr)); + if (ret < 0) { + plog(XLOG_ERROR, "Can't connect socket for kernel"); + errorcode = 1; + goto out; + } + } + if (amuDebug(D_FULL)) { + plog(XLOG_DEBUG, "%s: type %s\n", __func__, type); + plog(XLOG_DEBUG, "%s: version %d\n", __func__, mnt_data->version); + plog(XLOG_DEBUG, "%s: fd %d\n", __func__, mnt_data->fd); + plog(XLOG_DEBUG, "%s: hostname %s\n", __func__, + inet_ntoa(mnt_data->addr.sin_addr)); + plog(XLOG_DEBUG, "%s: port %d\n", __func__, + htons(mnt_data->addr.sin_port)); + } + if (amuDebug(D_TRACE)) { + plog(XLOG_DEBUG, "%s: Generic mount flags 0x%x", __func__, + MS_MGC_VAL | flags); + plog(XLOG_DEBUG, "%s: updated nfs_args...", __func__); + print_nfs_args(mnt_data, 0); + } + + mnt_data->flags &= MNT2_NFS_OPT_FLAGMASK; + + errorcode = do_mount_linux(type, mnt, flags, data); + + out: + /* + * If we failed, (i.e. errorcode != 0), then close the socket + * if it is open. + */ + if (errorcode && mnt_data->fd != -1) { + /* save errno, may be clobbered by close() call! */ + int save_errno = errno; + close(mnt_data->fd); + errno = save_errno; + } + return errorcode; +} + +#ifdef HAVE_FS_NFS4 +int +mount_linux_nfs4(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data) +{ + nfs4_args_t *mnt_data = (nfs4_args_t *) data; + int errorcode; + struct nfs_common_args a; + + /* Fake some values for linux */ + mnt_data->version = NFS4_MOUNT_VERSION; + + put_nfs_common_args(mnt_data, a); + setup_nfs_args(&a); + get_nfs_common_args(mnt_data, a); + + if (amuDebug(D_FULL)) { + plog(XLOG_DEBUG, "%s: type %s\n", __func__, type); + plog(XLOG_DEBUG, "%s: version %d\n", __func__, mnt_data->version); + } + if (amuDebug(D_TRACE)) { + plog(XLOG_DEBUG, "%s: Generic mount flags 0x%x", __func__, + MS_MGC_VAL | flags); + plog(XLOG_DEBUG, "%s: updated nfs_args...", __func__); + print_nfs_args(mnt_data, NFS_VERSION4); + } + + errorcode = do_mount_linux(type, mnt, flags, data); + + return errorcode; +} +#endif + +int +mount_linux_nonfs(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data) +{ + char *extra_opts = NULL; + char *tmp_opts = NULL; + char *sub_type = NULL; + char *loopdev = NULL; + int noauto = 0; + int errorcode; + + sub_type = hasmnteq(mnt, "type"); + if (sub_type) { + sub_type = xstrdup(sub_type); + type = strpbrk(sub_type, ",:;\n\t"); + if (type == NULL) + type = MOUNT_TYPE_UFS; + else { + *type = '\0'; + type = sub_type; + } + } + + if (!hasmntopt(mnt, "type")) + mnt->mnt_type = type; + + tmp_opts = parse_opts(type, mnt->mnt_opts, &flags, &extra_opts, &noauto); + +#ifdef MOUNT_TYPE_LOFS + if (STREQ(type, MOUNT_TYPE_LOFS)) { +# ifndef MNT2_GEN_OPT_BIND + size_t l; + /* this is basically a hack to support fist lofs */ + XFREE(extra_opts); + l = strlen(mnt->mnt_fsname) + sizeof("dir=") + 1; + extra_opts = (char *) xmalloc(l); + xsnprintf(extra_opts, l, sizeof(extra_opts), "dir=%s", mnt->mnt_fsname); +# else /* MNT2_GEN_OPT_BIND */ + /* use bind mounts for lofs */ + flags |= MNT2_GEN_OPT_BIND; +# endif /* MNT2_GEN_OPT_BIND */ + errorcode = do_mount_linux(type, mnt, flags, extra_opts); + } else /* end of "if type is LOFS" */ +#endif /* MOUNT_TYPE_LOFS */ + +#ifdef MOUNT_TYPE_LUSTRE + if (STREQ(type, MOUNT_TYPE_LUSTRE)) { + char *topts; + if (*extra_opts) + topts = strvcat(extra_opts, ",device=", mnt->mnt_fsname, NULL); + else + topts = strvcat("device=", mnt->mnt_fsname, NULL); + free(extra_opts); + extra_opts = topts; + } +#endif /* MOUNT_TYPE_LOFS */ + + { +#ifdef HAVE_LOOP_DEVICE + /* + * If the mounted "device" is actually a regular file, + # try to attach a loop device to it. + */ + struct stat buf; + char *old_fsname = NULL; + if (stat(mnt->mnt_fsname, &buf) == 0 && + S_ISREG(buf.st_mode)) { + if ((loopdev = setup_loop_device(mnt->mnt_fsname)) != NULL) { + char *str; + size_t l; + + plog(XLOG_INFO, "setup loop device %s over %s OK", loopdev, mnt->mnt_fsname); + old_fsname = mnt->mnt_fsname; + mnt->mnt_fsname = loopdev; + /* XXX: hack, append loop=/dev/loopX to mnttab opts */ + l = strlen(mnt->mnt_opts) + 7 + strlen(loopdev); + str = (char *) xmalloc(l); + if (str) { + xsnprintf(str, l, "%s,loop=%s", mnt->mnt_opts, loopdev); + XFREE(mnt->mnt_opts); + mnt->mnt_opts = str; + } + } else { + plog(XLOG_ERROR, "failed to set up a loop device: %m"); + errorcode = 1; + goto out; + } + } +#endif /* HAVE_LOOP_DEVICE */ + + errorcode = do_mount_linux(type, mnt, flags, extra_opts); + +#ifdef HAVE_LOOP_DEVICE + /* if mount failed and we used a loop device, then undo it */ + if (errorcode != 0 && loopdev != NULL) { + if (delete_loop_device(loopdev) < 0) + plog(XLOG_WARNING, "mount() failed to release loop device %s: %m", loopdev); + else + plog(XLOG_INFO, "mount() released loop device %s OK", loopdev); + } + if (old_fsname) + mnt->mnt_fsname = old_fsname; +#endif /* HAVE_LOOP_DEVICE */ + } + + /* + * Free all allocated space and return errorcode. + */ +out: +if (loopdev) + XFREE(loopdev); + if (extra_opts != NULL) + XFREE(extra_opts); + if (tmp_opts != NULL) + XFREE(tmp_opts); + if (sub_type != NULL) + XFREE(sub_type); + return errorcode; +} + + +int +mount_linux(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data) +{ + int errorcode; + + if (mnt->mnt_opts && STREQ(mnt->mnt_opts, "defaults")) + mnt->mnt_opts = NULL; + + if (type == NULL) + type = index(mnt->mnt_fsname, ':') ? MOUNT_TYPE_NFS : MOUNT_TYPE_UFS; + +#ifdef HAVE_FS_NFS4 + if (STREQ(type, MOUNT_TYPE_NFS4)) + errorcode = mount_linux_nfs4(type, mnt, flags, data); + else +#endif + if (STREQ(type, MOUNT_TYPE_NFS)) + errorcode = mount_linux_nfs(type, mnt, flags, data); + else /* non-NFS mounts */ + errorcode = mount_linux_nonfs(type, mnt, flags, data); + + return errorcode; +} + + +/****************************************************************************/ +/* + * NFS error numbers and Linux errno's are two different things! Linux is + * `worse' than other OSes in the respect that it loudly complains about + * undefined NFS return value ("bad NFS return value.."). So we should + * translate ANY possible Linux errno to their NFS equivalent. Just, there + * aren't much NFS numbers, so most go to EINVAL or EIO. The mapping below + * should fit at least for Linux/i386 and Linux/68k. I haven't checked + * other architectures yet. + */ + +#define NE_PERM 1 +#define NE_NOENT 2 +#define NE_IO 5 +#define NE_NXIO 6 +#define NE_AGAIN 11 +#define NE_ACCES 13 +#define NE_EXIST 17 +#define NE_NODEV 19 +#define NE_NOTDIR 20 +#define NE_ISDIR 21 +#define NE_INVAL 22 +#define NE_FBIG 27 +#define NE_NOSPC 28 +#define NE_ROFS 30 +#define NE_OPNOTSUPP 45 +#define NE_NAMETOOLONG 63 +#define NE_NOTEMPTY 66 +#define NE_DQUOT 69 +#define NE_STALE 70 +#define NE_REMOTE 71 + +#define NFS_LOMAP 0 +#define NFS_HIMAP 122 + +/* + * The errno's below are correct for Linux/i386. One day, somebody + * with lots of energy ought to verify them against the other ports... + */ +static int nfs_errormap[] = { + 0, /* success(0) */ + NE_PERM, /* EPERM (1) */ + NE_NOENT, /* ENOENT (2) */ + NE_INVAL, /* ESRCH (3) */ + NE_IO, /* EINTR (4) */ + NE_IO, /* EIO (5) */ + NE_NXIO, /* ENXIO (6) */ + NE_INVAL, /* E2BIG (7) */ + NE_INVAL, /* ENOEXEC (8) */ + NE_INVAL, /* EBADF (9) */ + NE_IO, /* ECHILD (10) */ + NE_AGAIN, /* EAGAIN (11) */ + NE_IO, /* ENOMEM (12) */ + NE_ACCES, /* EACCES (13) */ + NE_INVAL, /* EFAULT (14) */ + NE_INVAL, /* ENOTBLK (15) */ + NE_IO, /* EBUSY (16) */ + NE_EXIST, /* EEXIST (17) */ + NE_INVAL, /* EXDEV (18) */ + NE_NODEV, /* ENODEV (19) */ + NE_NOTDIR, /* ENOTDIR (20) */ + NE_ISDIR, /* EISDIR (21) */ + NE_INVAL, /* EINVAL (22) */ + NE_IO, /* ENFILE (23) */ + NE_IO, /* EMFILE (24) */ + NE_INVAL, /* ENOTTY (25) */ + NE_ACCES, /* ETXTBSY (26) */ + NE_FBIG, /* EFBIG (27) */ + NE_NOSPC, /* ENOSPC (28) */ + NE_INVAL, /* ESPIPE (29) */ + NE_ROFS, /* EROFS (30) */ + NE_INVAL, /* EMLINK (31) */ + NE_INVAL, /* EPIPE (32) */ + NE_INVAL, /* EDOM (33) */ + NE_INVAL, /* ERANGE (34) */ + NE_INVAL, /* EDEADLK (35) */ + NE_NAMETOOLONG, /* ENAMETOOLONG (36) */ + NE_INVAL, /* ENOLCK (37) */ + NE_INVAL, /* ENOSYS (38) */ + NE_NOTEMPTY, /* ENOTEMPTY (39) */ + NE_INVAL, /* ELOOP (40) */ + NE_INVAL, /* unused (41) */ + NE_INVAL, /* ENOMSG (42) */ + NE_INVAL, /* EIDRM (43) */ + NE_INVAL, /* ECHRNG (44) */ + NE_INVAL, /* EL2NSYNC (45) */ + NE_INVAL, /* EL3HLT (46) */ + NE_INVAL, /* EL3RST (47) */ + NE_INVAL, /* ELNRNG (48) */ + NE_INVAL, /* EUNATCH (49) */ + NE_INVAL, /* ENOCSI (50) */ + NE_INVAL, /* EL2HLT (51) */ + NE_INVAL, /* EBADE (52) */ + NE_INVAL, /* EBADR (53) */ + NE_INVAL, /* EXFULL (54) */ + NE_INVAL, /* ENOANO (55) */ + NE_INVAL, /* EBADRQC (56) */ + NE_INVAL, /* EBADSLT (57) */ + NE_INVAL, /* unused (58) */ + NE_INVAL, /* EBFONT (59) */ + NE_INVAL, /* ENOSTR (60) */ + NE_INVAL, /* ENODATA (61) */ + NE_INVAL, /* ETIME (62) */ + NE_INVAL, /* ENOSR (63) */ + NE_INVAL, /* ENONET (64) */ + NE_INVAL, /* ENOPKG (65) */ + NE_INVAL, /* EREMOTE (66) */ + NE_INVAL, /* ENOLINK (67) */ + NE_INVAL, /* EADV (68) */ + NE_INVAL, /* ESRMNT (69) */ + NE_IO, /* ECOMM (70) */ + NE_IO, /* EPROTO (71) */ + NE_IO, /* EMULTIHOP (72) */ + NE_IO, /* EDOTDOT (73) */ + NE_INVAL, /* EBADMSG (74) */ + NE_INVAL, /* EOVERFLOW (75) */ + NE_INVAL, /* ENOTUNIQ (76) */ + NE_INVAL, /* EBADFD (77) */ + NE_IO, /* EREMCHG (78) */ + NE_IO, /* ELIBACC (79) */ + NE_IO, /* ELIBBAD (80) */ + NE_IO, /* ELIBSCN (81) */ + NE_IO, /* ELIBMAX (82) */ + NE_IO, /* ELIBEXEC (83) */ + NE_INVAL, /* EILSEQ (84) */ + NE_INVAL, /* ERESTART (85) */ + NE_INVAL, /* ESTRPIPE (86) */ + NE_INVAL, /* EUSERS (87) */ + NE_INVAL, /* ENOTSOCK (88) */ + NE_INVAL, /* EDESTADDRREQ (89) */ + NE_INVAL, /* EMSGSIZE (90) */ + NE_INVAL, /* EPROTOTYPE (91) */ + NE_INVAL, /* ENOPROTOOPT (92) */ + NE_INVAL, /* EPROTONOSUPPORT (93) */ + NE_INVAL, /* ESOCKTNOSUPPORT (94) */ + NE_INVAL, /* EOPNOTSUPP (95) */ + NE_INVAL, /* EPFNOSUPPORT (96) */ + NE_INVAL, /* EAFNOSUPPORT (97) */ + NE_INVAL, /* EADDRINUSE (98) */ + NE_INVAL, /* EADDRNOTAVAIL (99) */ + NE_IO, /* ENETDOWN (100) */ + NE_IO, /* ENETUNREACH (101) */ + NE_IO, /* ENETRESET (102) */ + NE_IO, /* ECONNABORTED (103) */ + NE_IO, /* ECONNRESET (104) */ + NE_IO, /* ENOBUFS (105) */ + NE_IO, /* EISCONN (106) */ + NE_IO, /* ENOTCONN (107) */ + NE_IO, /* ESHUTDOWN (108) */ + NE_IO, /* ETOOMANYREFS (109) */ + NE_IO, /* ETIMEDOUT (110) */ + NE_IO, /* ECONNREFUSED (111) */ + NE_IO, /* EHOSTDOWN (112) */ + NE_IO, /* EHOSTUNREACH (113) */ + NE_IO, /* EALREADY (114) */ + NE_IO, /* EINPROGRESS (115) */ + NE_STALE, /* ESTALE (116) */ + NE_IO, /* EUCLEAN (117) */ + NE_INVAL, /* ENOTNAM (118) */ + NE_INVAL, /* ENAVAIL (119) */ + NE_INVAL, /* EISNAM (120) */ + NE_IO, /* EREMOTEIO (121) */ + NE_DQUOT, /* EDQUOT (122) */ +}; + + +int +linux_nfs_error(int e) +{ + int ret = (nfsstat) NE_IO; + + if (e < NFS_LOMAP || e > NFS_HIMAP) + ret = (nfsstat) NE_IO; + else + ret = nfs_errormap[e - NFS_LOMAP]; + dlog("linux_nfs_error: map error %d to NFS error %d", e, ret); + return (nfsstat) ret; +} + + +#ifdef HAVE_LOOP_DEVICE +/****************************************************************************/ +/*** LOOP DEVICE SUPPORT ***/ +/*** Loop Device setup code taken from mount-2.11g-5.src.rpm, which was ***/ +/*** originally written bt Ted T'so and others. ***/ +/****************************************************************************/ + +#define PROC_DEVICES "/proc/devices" + +#if not_used_yet +static int +show_loop(char *device) +{ + struct loop_info loopinfo; + int fd; + + if ((fd = open(device, O_RDONLY)) < 0) { + dlog("loop: can't open device %s: %m", device); + return -2; + } + if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) < 0) { + dlog("loop: can't get info on device %s: %m", device); + close(fd); + return -1; + } + dlog("show_loop: %s: [%04x]:%ld (%s)", + device, loopinfo.lo_device, loopinfo.lo_inode, + loopinfo.lo_name); + + close(fd); + + return 0; +} + + +static int +is_loop_device(const char *device) +{ + struct stat statbuf; + int loopmajor = 7; + + return (loopmajor && stat(device, &statbuf) == 0 && + S_ISBLK(statbuf.st_mode) && + (statbuf.st_rdev>>8) == loopmajor); +} +#endif /* not_used_yet */ + + +/* + * Just creating a device, say in /tmp, is probably a bad idea - people + * might have problems with backup or so. So, we just try /dev/loop[0-7]. + */ +static char * +find_unused_loop_device(void) +{ + char dev[20]; + char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" }; + int i, j, fd, somedev = 0, someloop = 0, loop_known = 0; + struct stat statbuf; + struct loop_info loopinfo; + FILE *procdev; + +#define LOOP_FMT_SIZE(a) (sizeof(a)/sizeof(a[0])) + for (j = 0; j < (int) LOOP_FMT_SIZE(loop_formats); j++) { + for (i = 0; i < 256; i++) { + xsnprintf(dev, sizeof(dev), loop_formats[j], i); + if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { + somedev++; + fd = open(dev, O_RDONLY); + if (fd >= 0) { + if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) == 0) + someloop++; /* in use */ + else if (errno == ENXIO) { + close(fd); + return xstrdup(dev); /* probably free */ + } + close(fd); + } + continue; /* continue trying as long as devices exist */ + } + break; + } + } + + /* Nothing found. Why not? */ + if ((procdev = fopen(PROC_DEVICES, "r")) != NULL) { + char line[100]; + while (fgets(line, sizeof(line), procdev)) + if (strstr(line, " loop\n")) { + loop_known = 1; + break; + } + fclose(procdev); + if (!loop_known) + loop_known = -1; + } + + if (!somedev) { + dlog("Could not find any device /dev/loop#"); + } else if (!someloop) { + if (loop_known == 1) { + dlog("Could not find any loop device."); + dlog("...Maybe /dev/loop# has a wrong major number?"); + } + else if (loop_known == -1) { + dlog("Could not find any loop device, and, according to %s,", PROC_DEVICES); + dlog("...this kernel does not know about the loop device."); + dlog("... (If so, then recompile or `insmod loop.o'.)"); + } else { + dlog("Could not find any loop device. Maybe this kernel does not know,"); + dlog("...about the loop device (then recompile or `insmod loop.o'), or"); + dlog("...maybe /dev/loop# has the wrong major number?"); + } + } else { + dlog("Could not find any free loop device!"); + } + return NULL; +} + + +/* returns 0 if OK, -1 otherwise */ +char * +setup_loop_device(const char *file) +{ + struct loop_info loopinfo; + int fd, ffd, mode, err = -1; + char *device = find_unused_loop_device(); + + if (!device) { + dlog("no unused loop device"); + goto out; + } + + mode = O_RDWR | O_LARGEFILE; + if ((ffd = open(file, mode)) < 0) { + if (errno == EROFS) { + mode = O_RDONLY | O_LARGEFILE; + ffd = open(file, mode); + } + if (ffd < 0) { + dlog("%s: %m", file); + goto out; + } + } + if ((fd = open(device, mode)) < 0) { + dlog("%s: %m", device); + goto out_close; + } + + memset(&loopinfo, 0, sizeof(loopinfo)); + xstrlcpy(loopinfo.lo_name, file, LO_NAME_SIZE); + loopinfo.lo_offset = 0; + + if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { + dlog("ioctl: LOOP_SET_FD: %m"); + goto out_close_all; + } + if (ioctl(fd, LOOP_SET_STATUS, &loopinfo) < 0) { + (void) ioctl(fd, LOOP_CLR_FD, 0); + dlog("ioctl: LOOP_SET_STATUS: %m"); + goto out_close_all; + } + + /* if gets here, all is OK */ + err = 0; + +out_close_all: + close(fd); +out_close: + close(ffd); +out: + + if (err) { + XFREE(device); + return NULL; + } else { + dlog("setup_loop_device(%s,%s): success", device, file); + return device; + } +} + + +int +delete_loop_device(const char *device) +{ + int fd; + + if ((fd = open(device, O_RDONLY)) < 0) { + dlog("delete_loop_device: can't delete device %s: %m", device); + return -1; + } + if (ioctl(fd, LOOP_CLR_FD, 0) < 0) { + dlog("ioctl: LOOP_CLR_FD: %m"); + return -1; + } + close(fd); + dlog("delete_loop_device(%s): success", device); + return 0; +} +#endif /* HAVE_LOOP_DEVICE */ + + +/****************************************************************************/ diff --git a/conf/mount/mount_mach3.c b/conf/mount/mount_mach3.c new file mode 100644 index 00000000000..5319a92e542 --- /dev/null +++ b/conf/mount/mount_mach3.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_mach3.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +int +mount_mach3(char *type, char *mnt, int flags, caddr_t mnt_data) +{ + int err = 0; + errno = 0; + + if (syscall(SYS_vfsmount, type, mnt->mnt_dir, flags, mnt_data)) { + err = -1; + if (errno == ENODEV) { + /* + * might be an old kernel, need to try again + * with file type number instead of string + */ + int typeno = 1; + plog(XLOG_ERROR, "%s: 1SYS_vfsmount: %m", mnt->mnt_dir); + + if (STREQ(mnt->mnt_type, MOUNT_TYPE_UFS)) + typeno = 0; + else if (STREQ(mnt->mnt_type, MOUNT_TYPE_NFS)) + typeno = 1; + else + plog(XLOG_ERROR, "%s: type defaults to nfs...", mnt->mnt_dir); + + plog(XLOG_ERROR, "%s: retry SYS_vfsmount %s %d", mnt->mnt_dir, + mnt->mnt_type, typeno); + if (typeno >= 0) { + if (syscall(SYS_vfsmount, typeno, mnt->mnt_dir, flags, mnt_data)) { + plog(XLOG_ERROR, "%s: 2SYS_vfsmount: %m", mnt->mnt_dir); + } else { + err = 0; + } + } + } + } + return err; +} diff --git a/conf/mount/mount_freebsd3.c b/conf/mount/mount_stellix.c similarity index 72% rename from conf/mount/mount_freebsd3.c rename to conf/mount/mount_stellix.c index 5888ed949d3..53615d3fce9 100644 --- a/conf/mount/mount_freebsd3.c +++ b/conf/mount/mount_stellix.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -36,14 +32,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * %W% (Berkeley) %G% * - * $Id: mount_freebsd3.c,v 5.2.2.1 1992/02/09 15:10:08 jsp beta $ + * File: am-utils/conf/mount/mount_stellix.c * */ /* - * FreeBSD 3.x (as of snapshot 3.0-980311-SNAP) Mount helper + * STELLIX Mount helper */ #ifdef HAVE_CONFIG_H @@ -52,17 +47,25 @@ #include #include + /* * Map from conventional mount arguments - * to FreeBSD 3.0 style arguments. + * to STELLIX style arguments. */ int -mount_freebsd3(MTYPE_TYPE type, const char *dir, int flags, voidp data) +mount_stellix(char *fsname, char *dir, int flags, int type, void *data) { - char const *namelist[] = INITMOUNTNAMES; - return mount(namelist[type], - dir, - flags, - data); +#ifdef DEBUG + dlog("stellix_mount: fsname %s, dir %s, type %d", fsname, dir, type); +#endif /* DEBUG */ + + if (type == MOUNT_TYPE_NFS) + return mount(dir, dir, (MNT2_GEN_OPT_FSS | MNT2_GEN_OPT_NFS | flags), + type, (caddr_t) data); + + if (type == MOUNT_TYPE_UFS) + return mount(fsname, dir, (MNT2_GEN_OPT_FSS | flags), type); + + return EINVAL; } diff --git a/conf/mount/mount_svr4.c b/conf/mount/mount_svr4.c new file mode 100644 index 00000000000..e139567bfb9 --- /dev/null +++ b/conf/mount/mount_svr4.c @@ -0,0 +1,158 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mount/mount_svr4.c + * + */ + +/* + * SVR4: + * Solaris 2.x (SunOS 5.x) and HPUX-11 Mount helper. + * -Erez Zadok + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +/* + * On Solaris 8 with in-kernel mount table, pass mount options to kernel to + * have them evaluated. They will also show up in /etc/mnttab. + */ +#if defined(MNT2_GEN_OPT_OPTIONSTR) && defined(MAX_MNTOPT_STR) +# define sys_mount(fsname, dir, flags, type, data, datasize) \ + mount((fsname), (dir), (MNT2_GEN_OPT_OPTIONSTR | flags), (type), \ + (data), (datasize), mountopts, sizeof(mountopts)) +#else /* not defined(MNT2_GEN_OPT_OPTIONSTR) && defined(MAX_MNTOPT_STR) */ +# define sys_mount(fsname, dir, flags, type, data, datasize) \ + mount((fsname), (dir), (flags), (type), (data), (datasize)) +#endif /* not defined(MNT2_GEN_OPT_OPTIONSTR) && defined(MAX_MNTOPT_STR) */ + + +/* + * Map from conventional mount arguments + * to Solaris 2.x (SunOS 5.x) style arguments. + */ +int +mount_svr4(char *fsname, char *dir, int flags, MTYPE_TYPE type, caddr_t data, const char *optstr) +{ +#if defined(MNT2_GEN_OPT_OPTIONSTR) && defined(MAX_MNTOPT_STR) + char mountopts[MAX_MNTOPT_STR]; + + /* + * Save a copy of the mount options. The kernel will overwrite them with + * those it recognizes. + */ + xstrlcpy(mountopts, optstr, MAX_MNTOPT_STR); +#endif /* defined(MNT2_GEN_OPT_OPTIONSTR) && defined(MAX_MNTOPT_STR) */ + +#if defined(MOUNT_TYPE_NFS3) && defined(MNTTAB_TYPE_NFS3) + if (STREQ(type, MOUNT_TYPE_NFS3)) { + return sys_mount(fsname, dir, (MNT2_GEN_OPT_DATA | flags), + type, (char *) data, sizeof(nfs_args_t)); + } +#endif /* defined(MOUNT_TYPE_NFS3) && defined(MNTTAB_TYPE_NFS3) */ + +#if defined(MOUNT_TYPE_NFS) && defined(MNTTAB_TYPE_NFS) + if (STREQ(type, MOUNT_TYPE_NFS)) { + return sys_mount(fsname, dir, (MNT2_GEN_OPT_DATA | flags), + type, (char *) data, sizeof(nfs_args_t)); + } +#endif /* defined(MOUNT_TYPE_NFS) && defined(MNTTAB_TYPE_NFS) */ + +#if defined(MOUNT_TYPE_AUTOFS) && defined(MNTTAB_TYPE_AUTOFS) + if (STREQ(type, MOUNT_TYPE_AUTOFS)) { + return sys_mount(fsname, dir, (MNT2_GEN_OPT_DATA | flags), + type, (char *) data, sizeof(autofs_args_t)); + } +#endif /* defined(MOUNT_TYPE_AUTOFS) && defined(MNTTAB_TYPE_AUTOFS) */ + +#if defined(MOUNT_TYPE_UFS) && defined(MNTTAB_TYPE_UFS) + if (STREQ(type, MOUNT_TYPE_UFS)) + return sys_mount(fsname, dir, (MNT2_GEN_OPT_DATA | flags), + type, (char *) data, sizeof(ufs_args_t)); +#endif /* defined(MOUNT_TYPE_UFS) && defined(MNTTAB_TYPE_UFS) */ + +#if defined(MOUNT_TYPE_PCFS) && defined(MNTTAB_TYPE_PCFS) + if (STREQ(type, MOUNT_TYPE_PCFS)) + return sys_mount(fsname, dir, (MNT2_GEN_OPT_DATA | flags), + type, (char *) data, sizeof(pcfs_args_t)); +#endif /* defined(MOUNT_TYPE_PCFS) && defined(MNTTAB_TYPE_PCFS) */ + +#if defined(MOUNT_TYPE_CDFS) && defined(MNTTAB_TYPE_CDFS) + /* + * HSFS on Solaris allows for 3 HSFSMNT_* flags to be passed + * as arguments to the mount(). These flags are bit fields in an + * integer, and that integer is passed as the "data" of this system + * call. The flags are described in . However, + * Solaris does not have an interface to these. It does not define + * a structure hsfs_args or anything that one can figure out what + * arguments to pass to mount(2) for this type of filesystem. + * Therefore, until Sun does, no arguments are passed to this mount + * below. + * -Erez Zadok . + */ + if (STREQ(type, MOUNT_TYPE_CDFS)) + return sys_mount(fsname, dir, (MNT2_GEN_OPT_FSS | flags), + type, (char *) NULL, 0); +#endif /* defined(MOUNT_TYPE_CDFS) && defined(MNTTAB_TYPE_CDFS) */ + +#if defined(MOUNT_TYPE_LOFS) && defined(MNTTAB_TYPE_LOFS) + if (STREQ(type, MOUNT_TYPE_LOFS)) + return sys_mount(fsname, dir, (MNT2_GEN_OPT_FSS | flags), + type, (char *) NULL, 0); +#endif /* defined(MOUNT_TYPE_LOFS) && defined(MNTTAB_TYPE_LOFS) */ + +#ifdef HAVE_FS_CACHEFS +# if defined(MOUNT_TYPE_CACHEFS) && defined(MNTTAB_TYPE_CACHEFS) + if (STREQ(type, MOUNT_TYPE_CACHEFS)) + return sys_mount(fsname, dir, (MNT2_GEN_OPT_DATA | flags), + type, (char *) data, sizeof(cachefs_args_t)); +# endif /* defined(MOUNT_TYPE_CACHEFS) && defined(MNTTAB_TYPE_CACHEFS) */ +#endif /*HAVE_FS_CACHEFS */ + +#ifdef HAVE_FS_AUTOFS +# if defined(MOUNT_TYPE_AUTOFS) && defined(MNTTAB_TYPE_AUTOFS) + if (STREQ(type, MOUNT_TYPE_AUTOFS)) + return sys_mount(fsname, dir, (MNT2_GEN_OPT_DATA | flags), + type, (char *) data, sizeof(autofs_args_t)); +# endif /* defined(MOUNT_TYPE_AUTOFS) && defined(MNTTAB_TYPE_AUTOFS) */ +#endif /* HAVE_FS_AUTOFS */ + + return EINVAL; +} diff --git a/conf/mtab/mtab_aix.c b/conf/mtab/mtab_aix.c new file mode 100644 index 00000000000..072adc74151 --- /dev/null +++ b/conf/mtab/mtab_aix.c @@ -0,0 +1,178 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mtab/mtab_aix.c + * + */ + +/* + * AIX systems don't write their mount tables on a file. Instead, they + * use a (better) system where the kernel keeps this state, and you access + * the mount tables via a known interface. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* + * These were missing external definitions from old AIX's headers. They + * appear to be available in on AIX 5.3, and possibly + * earlier. Hence I commented this out. + */ +#ifndef HAVE_EXTERN_MNTCTL +extern int mntctl(int cmd, int size, voidp buf); +#endif /* not HAVE_EXTERN_MNTCTL */ + + +static mntent_t * +mnt_dup(struct vmount *mp) +{ + mntent_t *new_mp = ALLOC(mntent_t); + char *ty; + char *fsname = xstrdup(vmt2dataptr(mp, VMT_OBJECT)); + + new_mp->mnt_dir = strdup(vmt2dataptr(mp, VMT_STUB)); + new_mp->mnt_opts = strdup(vmt2dataptr(mp, VMT_ARGS)); + + switch (mp->vmt_gfstype) { + + case MOUNT_TYPE_UFS: + ty = MNTTAB_TYPE_UFS; + new_mp->mnt_fsname = xstrdup(fsname); + break; + + case MOUNT_TYPE_NFS: + ty = MNTTAB_TYPE_NFS; + new_mp->mnt_fsname = str3cat((char *) NULL, + vmt2dataptr(mp, VMT_HOSTNAME), ":", + fsname); + break; + +#ifdef HAVE_FS_NFS3 + case MOUNT_TYPE_NFS3: + ty = MNTTAB_TYPE_NFS3; + new_mp->mnt_fsname = str3cat((char *) NULL, + vmt2dataptr(mp, VMT_HOSTNAME), ":", + fsname); + break; +#endif /* HAVE_FS_NFS3 */ + + default: + ty = "unknown"; + new_mp->mnt_fsname = xstrdup(fsname); + break; + + } + + new_mp->mnt_type = xstrdup(ty); + /* store the VFS ID for uvmount() */ + new_mp->mnt_passno = mp->vmt_vfsnumber; + new_mp->mnt_freq = 0; + + XFREE(fsname); + + return new_mp; +} + + +/* + * Read a mount table into memory + */ +mntlist * +read_mtab(char *fs, const char *mnttabname) +{ + mntlist **mpp, *mhp; + int i; + char *mntinfo = NULL, *cp; + struct vmount *vp; + int ret; + int maxtry = 10; /* maximum number of times to try mntctl */ + + /* + * Figure out size of mount table and allocate space for a copy. Then get + * mount table for real. We repeat this loop at most 10 times to minimze + * the chance of a race condition (something gets un/mounted in between + * calls to mntctl() + */ + i = sizeof(int); + do { + if (mntinfo) + XFREE(mntinfo); + mntinfo = xmalloc(i); + ret = mntctl(MCTL_QUERY, i, mntinfo); + if (ret == 0) + i = *(int*) mntinfo; + if (--maxtry <= 0) { + plog(XLOG_ERROR, "mntctl: could not get a stable result"); + ret = -1; + errno = EINVAL; + break; + } + } while (ret == 0); + if (ret < 0) { + plog(XLOG_ERROR, "mntctl: %m"); + goto out; + } + + mpp = &mhp; + for (i = 0, cp = mntinfo; i < ret; i++, cp += vp->vmt_length) { + vp = (struct vmount *) cp; + + /* + * Allocate a new slot + */ + *mpp = ALLOC(struct mntlist); + + /* + * Copy the data returned by mntctl + */ + (*mpp)->mnt = mnt_dup(vp); + + /* + * Move to next pointer + */ + mpp = &(*mpp)->mnext; + } + + *mpp = NULL; + +out: + if (mntinfo) + XFREE(mntinfo); + return mhp; +} diff --git a/conf/mtab/mtab_bsd.c b/conf/mtab/mtab_bsd.c index fe3991aa575..203a265e13a 100644 --- a/conf/mtab/mtab_bsd.c +++ b/conf/mtab/mtab_bsd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -53,6 +49,9 @@ #include #include +#if __NetBSD_Version__ > 200030000 +#define statfs statvfs +#endif static mntent_t * mnt_dup(struct statfs *mp) @@ -60,8 +59,8 @@ mnt_dup(struct statfs *mp) mntent_t *new_mp = ALLOC(mntent_t); char *ty; - new_mp->mnt_fsname = strdup(mp->f_mntfromname); - new_mp->mnt_dir = strdup(mp->f_mntonname); + new_mp->mnt_fsname = xstrdup(mp->f_mntfromname); + new_mp->mnt_dir = xstrdup(mp->f_mntonname); #ifdef HAVE_STRUCT_STATFS_F_FSTYPENAME ty = mp->f_fstypename; @@ -93,8 +92,8 @@ mnt_dup(struct statfs *mp) } #endif /* not HAVE_STRUCT_STATFS_F_FSTYPENAME */ - new_mp->mnt_type = strdup(ty); - new_mp->mnt_opts = strdup("unset"); + new_mp->mnt_type = xstrdup(ty); + new_mp->mnt_opts = xstrdup("unset"); new_mp->mnt_freq = 0; new_mp->mnt_passno = 0; @@ -138,7 +137,7 @@ read_mtab(char *fs, const char *mnttabname) /* * Terminate the list */ - *mpp = 0; + *mpp = NULL; return mhp; } diff --git a/conf/mtab/mtab_file.c b/conf/mtab/mtab_file.c new file mode 100644 index 00000000000..5004ef5f0e6 --- /dev/null +++ b/conf/mtab/mtab_file.c @@ -0,0 +1,454 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mtab/mtab_file.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +#define NFILE_RETRIES 10 /* number of retries (seconds) */ + +#ifdef MOUNT_TABLE_ON_FILE + +static FILE *mnt_file; + + +/* + * If the system is being trashed by something, then + * opening mtab may fail with ENFILE. So, go to sleep + * for a second and try again. (Yes - this has happened to me.) + * + * Note that this *may* block the automounter, oh well. + * If we get to this state then things are badly wrong anyway... + * + * Give the system 10 seconds to recover but then give up. + * Hopefully something else will exit and free up some file + * table slots in that time. + */ +# ifdef HAVE_FLOCK +# define lock(fd) (flock((fd), LOCK_EX)) +# else /* not HAVE_FLOCK */ +static int +lock(int fd) +{ + int rc; + struct flock lk; + + lk.l_type = F_WRLCK; + lk.l_whence = 0; + lk.l_start = 0; + lk.l_len = 0; + +again: + rc = fcntl(fd, F_SETLKW, (caddr_t) & lk); + if (rc < 0 && (errno == EACCES || errno == EAGAIN)) { +# ifdef DEBUG + dlog("Blocked, trying to obtain exclusive mtab lock"); +# endif /* DEBUG */ + sleep(1); + goto again; + } + return rc; +} +# endif /* not HAVE_FLOCK */ + + +static FILE * +open_locked_mtab(const char *mnttabname, char *mode, char *fs) +{ + FILE *mfp = NULL; + + /* + * There is a possible race condition if two processes enter + * this routine at the same time. One will be blocked by the + * exclusive lock below (or by the shared lock in setmntent) + * and by the time the second process has the exclusive lock + * it will be on the wrong underlying object. To check for this + * the mtab file is stat'ed before and after all the locking + * sequence, and if it is a different file then we assume that + * it may be the wrong file (only "may", since there is another + * race between the initial stat and the setmntent). + * + * Simpler solutions to this problem are invited... + */ + int racing = 2; + int rc; + int retries = 0; + struct stat st_before, st_after; + + if (mnt_file) { +# ifdef DEBUG + dlog("Forced close on %s in read_mtab", mnttabname); +# endif /* DEBUG */ + endmntent(mnt_file); + mnt_file = NULL; + } +again: + if (mfp) { + endmntent(mfp); + mfp = NULL; + } + if (stat(mnttabname, &st_before) < 0) { + plog(XLOG_ERROR, "%s: stat: %m", mnttabname); + if (errno == ESTALE) { + /* happens occasionally */ + sleep(1); + goto again; + } + /* + * If 'mnttabname' file does not exist give setmntent() a + * chance to create it (depending on the mode). + * Otherwise, bail out. + */ + else if (errno != ENOENT) { + return 0; + } + } + +eacces: + mfp = setmntent((char *)mnttabname, mode); + if (!mfp) { + /* + * Since setmntent locks the descriptor, it + * is possible it can fail... so retry if + * needed. + */ + if (errno == EACCES || errno == EAGAIN) { +# ifdef DEBUG + dlog("Blocked, trying to obtain exclusive mtab lock"); +# endif /* DEBUG */ + goto eacces; + } else if (errno == ENFILE && retries++ < NFILE_RETRIES) { + sleep(1); + goto eacces; + } + plog(XLOG_ERROR, "setmntent(\"%s\", \"%s\"): %m", mnttabname, mode); + return 0; + } + /* + * At this point we have an exclusive lock on the mount list, + * but it may be the wrong one so... + */ + + /* + * Need to get an exclusive lock on the current + * mount table until we have a new copy written + * out, when the lock is released in free_mntlist. + * flock is good enough since the mount table is + * not shared between machines. + */ + do + rc = lock(fileno(mfp)); + while (rc < 0 && errno == EINTR); + if (rc < 0) { + plog(XLOG_ERROR, "Couldn't lock %s: %m", mnttabname); + endmntent(mfp); + return 0; + } + /* + * Now check whether the mtab file has changed under our feet + */ + if (stat(mnttabname, &st_after) < 0) { + plog(XLOG_ERROR, "%s: stat: %m", mnttabname); + goto again; + } + if (st_before.st_dev != st_after.st_dev || + st_before.st_ino != st_after.st_ino) { + struct timeval tv; + if (racing == 0) { + /* Sometimes print a warning */ + plog(XLOG_WARNING, + "Possible mount table race - retrying %s", fs); + } + racing = (racing + 1) & 3; + /* + * Take a nap. From: Doug Kingston + */ + tv.tv_sec = 0; + tv.tv_usec = (am_mypid & 0x07) << 17; + if (tv.tv_usec) + if (select(0, (voidp) 0, (voidp) 0, (voidp) 0, &tv) < 0) + plog(XLOG_WARNING, "mtab nap failed: %m"); + + goto again; + } + + return mfp; +} + + +/* + * Unlock the mount table + */ +void +unlock_mntlist(void) +{ + /* + * Release file lock, by closing the file + */ + if (mnt_file) { + dlog("unlock_mntlist: releasing"); + endmntent(mnt_file); + mnt_file = NULL; + } +} + + +/* + * Write out a mount list + */ +void +rewrite_mtab(mntlist *mp, const char *mnttabname) +{ + FILE *mfp; + int error = 0; + + /* + * Concoct a temporary name in the same directory as the target mount + * table so that rename() will work. + */ + char tmpname[64]; + int retries; + int tmpfd; + char *cp; + char mcp[128]; + + xstrlcpy(mcp, mnttabname, sizeof(mcp)); + cp = strrchr(mcp, '/'); + if (cp) { + memmove(tmpname, mcp, cp - mcp); + tmpname[cp - mcp] = '\0'; + } else { + plog(XLOG_WARNING, "No '/' in mtab (%s), using \".\" as tmp directory", mnttabname); + tmpname[0] = '.'; + tmpname[1] = '\0'; + } + xstrlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname)); + retries = 0; +enfile1: +#ifdef HAVE_MKSTEMP + tmpfd = mkstemp(tmpname); + fchmod(tmpfd, 0644); +#else /* not HAVE_MKSTEMP */ + mktemp(tmpname); + tmpfd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644); +#endif /* not HAVE_MKSTEMP */ + if (tmpfd < 0) { + if (errno == ENFILE && retries++ < NFILE_RETRIES) { + sleep(1); + goto enfile1; + } + plog(XLOG_ERROR, "%s: open: %m", tmpname); + return; + } + if (close(tmpfd) < 0) + plog(XLOG_ERROR, "Couldn't close tmp file descriptor: %m"); + + retries = 0; +enfile2: + mfp = setmntent(tmpname, "w"); + if (!mfp) { + if (errno == ENFILE && retries++ < NFILE_RETRIES) { + sleep(1); + goto enfile2; + } + plog(XLOG_ERROR, "setmntent(\"%s\", \"w\"): %m", tmpname); + error = 1; + goto out; + } + while (mp) { + if (mp->mnt) { + if (addmntent(mfp, mp->mnt)) { + plog(XLOG_ERROR, "Can't write entry to %s", tmpname); + error = 1; + goto out; + } + } + mp = mp->mnext; + } + + /* + * SunOS 4.1 manuals say that the return code from entmntent() + * is always 1 and to treat as a void. That means we need to + * call fflush() to make sure the new mtab file got written. + */ + if (fflush(mfp)) { + plog(XLOG_ERROR, "flush new mtab file: %m"); + error = 1; + goto out; + } + (void) endmntent(mfp); + + /* + * Rename temporary mtab to real mtab + */ + if (rename(tmpname, mnttabname) < 0) { + plog(XLOG_ERROR, "rename %s to %s: %m", tmpname, mnttabname); + error = 1; + goto out; + } +out: + if (error) + (void) unlink(tmpname); +} + + +static void +mtab_stripnl(char *s) +{ + do { + s = strchr(s, '\n'); + if (s) + *s++ = ' '; + } while (s); +} + + +/* + * Append a mntent structure to the + * current mount table. + */ +void +write_mntent(mntent_t *mp, const char *mnttabname) +{ + int retries = 0; + FILE *mfp; +enfile: + mfp = open_locked_mtab(mnttabname, "a", mp->mnt_dir); + if (mfp) { + mtab_stripnl(mp->mnt_opts); + if (addmntent(mfp, mp)) + plog(XLOG_ERROR, "Couldn't write %s: %m", mnttabname); + if (fflush(mfp)) + plog(XLOG_ERROR, "Couldn't flush %s: %m", mnttabname); + (void) endmntent(mfp); + } else { + if (errno == ENFILE && retries < NFILE_RETRIES) { + sleep(1); + goto enfile; + } + plog(XLOG_ERROR, "setmntent(\"%s\", \"a\"): %m", mnttabname); + } +} + +#endif /* MOUNT_TABLE_ON_FILE */ + + +static mntent_t * +mnt_dup(mntent_t *mp) +{ + mntent_t *new_mp = ALLOC(mntent_t); + + new_mp->mnt_fsname = xstrdup(mp->mnt_fsname); + new_mp->mnt_dir = xstrdup(mp->mnt_dir); + new_mp->mnt_type = xstrdup(mp->mnt_type); + new_mp->mnt_opts = xstrdup(mp->mnt_opts); + + new_mp->mnt_freq = mp->mnt_freq; + new_mp->mnt_passno = mp->mnt_passno; + +#ifdef HAVE_MNTENT_T_MNT_TIME +# ifdef HAVE_MNTENT_T_MNT_TIME_STRING + new_mp->mnt_time = xstrdup(mp->mnt_time); +# else /* not HAVE_MNTENT_T_MNT_TIME_STRING */ + new_mp->mnt_time = mp->mnt_time; +# endif /* not HAVE_MNTENT_T_MNT_TIME_STRING */ +#endif /* HAVE_MNTENT_T_MNT_TIME */ + +#ifdef HAVE_MNTENT_T_MNT_CNODE + new_mp->mnt_cnode = mp->mnt_cnode; +#endif /* HAVE_MNTENT_T_MNT_CNODE */ + + return new_mp; +} + + +/* + * Read a mount table into memory + */ +mntlist * +read_mtab(char *fs, const char *mnttabname) +{ + mntlist **mpp, *mhp; + + mntent_t *mep; + FILE *mfp = open_locked_mtab(mnttabname, "r+", fs); + + if (!mfp) + return 0; + + mpp = &mhp; + +/* + * XXX - In SunOS 4 there is (yet another) memory leak + * which loses 1K the first time getmntent is called. + * (jsp) + */ + while ((mep = getmntent(mfp))) { + /* + * Allocate a new slot + */ + *mpp = ALLOC(struct mntlist); + + /* + * Copy the data returned by getmntent + */ + (*mpp)->mnt = mnt_dup(mep); + + /* + * Move to next pointer + */ + mpp = &(*mpp)->mnext; + } + *mpp = NULL; + +#ifdef MOUNT_TABLE_ON_FILE + /* + * If we are not updating the mount table then we + * can free the resources held here, otherwise they + * must be held until the mount table update is complete + */ + mnt_file = mfp; +#else /* not MOUNT_TABLE_ON_FILE */ + endmntent(mfp); +#endif /* not MOUNT_TABLE_ON_FILE */ + + return mhp; +} diff --git a/conf/mtab/mtab_isc3.c b/conf/mtab/mtab_isc3.c new file mode 100644 index 00000000000..9c8df1bae7d --- /dev/null +++ b/conf/mtab/mtab_isc3.c @@ -0,0 +1,269 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mtab/mtab_isc3.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* fd for /etc/.mnt.lock (also act as flag for: is_locked) */ +static int mtlckf = 0; +static char mtlckname[] = "/etc/.mnt.lock"; +static char mnttabname[] = "/etc/mnttab"; + + +static void +unlockmnttab(void) +{ + if (mtlckf) { + close(mtlckf); + mtlckf = 0; + } +} + + +static +lockfile(int fd, int type) +{ + struct flock lk; + + lk.l_type = type; + lk.l_whence = 0; + lk.l_start = 0; + lk.l_len = 0; + + return fcntl(fd, F_SETLKW, &lk); +} + + +static +lockmnttab(void) +{ + if (mtlckf == 0) { /* need lock on /etc/.mnt.lock */ + mtlckf = open(mtlckname, O_RDWR); + if (mtlckf >= 0) { + if (lockfile(mtlckf, F_WRLCK) < 0) { + close(mtlckf); + mtlckf = 0; +#ifdef DEBUG + dlog("lock failed %m"); +#endif /* DEBUG */ + } else { + return 0; + } + } + } + plog(XLOG_ERROR, "Unable to lock %s: %m", mtlckname); + return -1; +} + + +void +unlock_mntlist(void) +{ + dlog("unlock_mntlist: releasing"); + unlockmnttab(); +} + + +/* convert from ix386 mnttab to amd mntent */ +static mntent_t * +mnt_dup(mntent_t *mp) +{ + /* note: may not be null terminated */ + mntent_t *new_mp = ALLOC(mntent_t); + char nullcpy[128]; + + xstrlcpy(nullcpy, mp->mt_dev, 32); + new_mp->mnt_fsname = xstrdup(nullcpy); + + xstrlcpy(nullcpy, mp->mt_filsys, 32); + new_mp->mnt_dir = xstrdup(nullcpy); + + xstrlcpy(nullcpy, mp->mt_fstyp, 16); + new_mp->mnt_type = xstrdup(nullcpy); + + xstrlcpy(nullcpy, mp->mt_mntopts, 64); + new_mp->mnt_opts = xstrdup(nullcpy); + + new_mp->mnt_freq = 0; + new_mp->mnt_passno = 0; + + new_mp->mnt_time = mp->mt_time; + new_mp->mnt_ro = mp->mt_ro_flg; + + return new_mp; +} + + +/* convert back (static alloc) */ +static mntent_t * +mtab_of(mntent_t *mnt) +{ + static mntent_t mt; + + xstrlcpy(mt.mt_dev, mnt->mnt_fsname, 32); + xstrlcpy(mt.mt_filsys, mnt->mnt_dir, 32); + + mt.mt_ro_flg = mnt->mnt_ro; + mt.mt_time = mnt->mnt_time; + + xstrlcpy(mt.mt_fstyp, mnt->mnt_type, 16); + xstrlcpy(mt.mt_mntopts, mnt->mnt_opts, 64); + + return &mt; +} + + +/* + * Read a mount table into memory + */ +mntlist * +read_mtab(char *fs, const char *mnttabname) +{ + mntlist **mpp, *mhp; + /* From: Piete Brooks */ + int fd; + mntent_t mountbuffer[NMOUNT], *fs_data; + int ret; + int nmts; + + if (lockmnttab() != 0) + return (mntlist *) NULL; + + fd = open(mnttabname, O_RDONLY); + if (fd < 0) { + plog(XLOG_ERROR, "Can't open %s: %m", mnttabname); + return (mntlist *) NULL; + } + mpp = &mhp; + while ((ret = read(fd, (char *) mountbuffer, NMOUNT * sizeof(mntent_t))) > 0) { + nmts = ret / sizeof(mntent_t); + for (fs_data = mountbuffer; fs_data < &mountbuffer[nmts]; fs_data++) { + /* + * Allocate a new slot + */ + *mpp = ALLOC(struct mntlist); + + /* + * Copy the data returned by getmntent + */ + (*mpp)->mnt = mnt_dup(fs_data); + + /* + * Move to next pointer + */ + mpp = &(*mpp)->mnext; + } + } + if (ret < 0) { + plog(XLOG_ERROR, "read error on %s: %m", mnttabname); + unlockmnttab(); + mhp = (mntlist *) NULL; + } + *mpp = NULL; + + close(fd); + return mhp; +} + + +static +write_mntent_to_mtab(int fd, mntent_t *mnt) +{ + int wr; + +eagain: + wr = write(fd, (char *) mtab_of(mnt), sizeof(mntent_t)); + if (wr < 0) { + switch (wr) { + case EAGAIN: + goto eagain; + default: + return -1; + } + } + if (wr != sizeof(mntent_t)) + plog(XLOG_ERROR, "Can't write entry to %s: %m", mnttabname); + return 0; +} + + +void +rewrite_mtab(mntlist *mp, const char *mnttabname) +{ + int fd; + + assert(mtlckf != 0); + + fd = open(mnttabname, O_RDWR | O_TRUNC); + if (fd < 0) { + plog(XLOG_ERROR, "Can't open %s: %m", mnttabname); + unlockmnttab(); + } + while (mp) { + if (mp->mnt) + write_mntent_to_mtab(fd, mp->mnt); + mp = mp->mnext; + } + + close(fd); + unlockmnttab(); +} + + +void +write_mntent(mntent_t *mp, const char *mnttabname) +{ + int fd; + + if (lockmnttab() == -1) + return; + + fd = open(mnttabname, O_RDWR | O_APPEND); + if (fd < 0) { + plog(XLOG_ERROR, "Unable to append %s: %m", mnttabname); + return; + } + write_mntent_to_mtab(fd, mp); + + close(fd); + unlockmnttab(); +} diff --git a/conf/mtab/mtab_linux.c b/conf/mtab/mtab_linux.c new file mode 100644 index 00000000000..829c97a57a3 --- /dev/null +++ b/conf/mtab/mtab_linux.c @@ -0,0 +1,565 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mtab/mtab_linux.c + * + */ + +/* This file was adapted by Red Hat for Linux from mtab_file.c */ + +/* + * The locking code must be kept in sync with that used + * by the mount command in util-linux, otherwise you'll + * end with with race conditions leading to a corrupt + * /etc/mtab, particularly when AutoFS is used on same + * machine as AMD. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +#define NFILE_RETRIES 10 /* number of retries (seconds) */ +#define LOCK_TIMEOUT 10 + +#ifdef MOUNT_TABLE_ON_FILE + +# define PROC_MOUNTS "/proc/mounts" + +static FILE *mnt_file = NULL; +/* Information about mtab. ------------------------------------*/ +static int have_mtab_info = 0; +static int var_mtab_does_not_exist = 0; +static int var_mtab_is_a_symlink = 0; +/* Flag for already existing lock file. */ +static int we_created_lockfile = 0; +static int lockfile_fd = -1; + + +static void +get_mtab_info(void) +{ + struct stat mtab_stat; + + if (!have_mtab_info) { + if (lstat(MOUNTED, &mtab_stat)) + var_mtab_does_not_exist = 1; + else if (S_ISLNK(mtab_stat.st_mode)) + var_mtab_is_a_symlink = 1; + have_mtab_info = 1; + } +} + + +static int +mtab_is_a_symlink(void) +{ + get_mtab_info(); + return var_mtab_is_a_symlink; +} + + +static int +mtab_is_writable() +{ + static int ret = -1; + + /* + * Should we write to /etc/mtab upon an update? Probably not if it is a + * symlink to /proc/mounts, since that would create a file /proc/mounts in + * case the proc filesystem is not mounted. + */ + if (mtab_is_a_symlink()) + return 0; + + if (ret == -1) { + int fd = open(MOUNTED, O_RDWR | O_CREAT, 0644); + if (fd >= 0) { + close(fd); + ret = 1; + } else + ret = 0; + } + return ret; +} + + +static void +setlkw_timeout(int sig) +{ + /* nothing, fcntl will fail anyway */ +} + + +/* + * Create the lock file. + * The lock file will be removed if we catch a signal or when we exit. + * + * The old code here used flock on a lock file /etc/mtab~ and deleted + * this lock file afterwards. However, as rgooch remarks, that has a + * race: a second mount may be waiting on the lock and proceed as + * soon as the lock file is deleted by the first mount, and immediately + * afterwards a third mount comes, creates a new /etc/mtab~, applies + * flock to that, and also proceeds, so that the second and third mount + * now both are scribbling in /etc/mtab. + * The new code uses a link() instead of a creat(), where we proceed + * only if it was us that created the lock, and hence we always have + * to delete the lock afterwards. Now the use of flock() is in principle + * superfluous, but avoids an arbitrary sleep(). + */ + +/* + * Where does the link point to? Obvious choices are mtab and mtab~~. + * HJLu points out that the latter leads to races. Right now we use + * mtab~. instead. + */ +#define MOUNTED_LOCK "/etc/mtab~" +#define MOUNTLOCK_LINKTARGET MOUNTED_LOCK "%d" + +int +lock_mtab(void) +{ + int tries = 100000, i; + char *linktargetfile; + size_t l; + int rc = 1; + + /* + * Redhat's original code set a signal handler called "handler()" for all + * non-ALRM signals. The handler called unlock_mntlist(), plog'ed the + * signal name, and then exit(1)! Never, ever, exit() from inside a + * utility function. This messed up Amd's careful signal-handling code, + * and caused Amd to abort uncleanly only any other "innocent" signal + * (even simple SIGUSR1), leaving behind a hung Amd mnt point. That code + * should have at least restored the signal handlers' states upon a + * successful mtab unlocking. Anyway, that handler was unnecessary, + * because will call unlock_mntlist() properly anyway on exit. + */ + setup_sighandler(SIGALRM, setlkw_timeout); + + /* somewhat clumsy, but some ancient systems do not have snprintf() */ + /* use 20 as upper bound for the length of %d output */ + l = strlen(MOUNTLOCK_LINKTARGET) + 20; + linktargetfile = xmalloc(l); + xsnprintf(linktargetfile, l, MOUNTLOCK_LINKTARGET, getpid()); + + i = open(linktargetfile, O_WRONLY|O_CREAT, 0); + if (i < 0) { + int errsv = errno; + /* + * linktargetfile does not exist (as a file) and we cannot create + * it. Read-only filesystem? Too many files open in the system? + * Filesystem full? + */ + plog(XLOG_ERROR, "%s: can't create lock file %s: %s " + "(use -n flag to override)", __func__, + linktargetfile, strerror(errsv)); + goto error; + } + close(i); + + + /* Repeat until it was us who made the link */ + while (!we_created_lockfile) { + struct flock flock; + int errsv, j; + + j = link(linktargetfile, MOUNTED_LOCK); + errsv = errno; + + if (j < 0 && errsv != EEXIST) { + (void) unlink(linktargetfile); + plog(XLOG_ERROR, "can't link lock file %s: %s ", + MOUNTED_LOCK, strerror(errsv)); + rc = 0; + goto error; + } + + lockfile_fd = open(MOUNTED_LOCK, O_WRONLY); + if (lockfile_fd < 0) { + int errsv = errno; + /* Strange... Maybe the file was just deleted? */ + if (errno == ENOENT && tries-- > 0) { + if (tries % 200 == 0) + usleep(30); + continue; + } + (void) unlink(linktargetfile); + plog(XLOG_ERROR,"%s: can't open lock file %s: %s ", __func__, + MOUNTED_LOCK, strerror(errsv)); + rc = 0; + goto error; + } + + flock.l_type = F_WRLCK; + flock.l_whence = SEEK_SET; + flock.l_start = 0; + flock.l_len = 0; + + if (j == 0) { + /* We made the link. Now claim the lock. */ + if (fcntl(lockfile_fd, F_SETLK, &flock) == -1) { + int errsv = errno; + plog(XLOG_ERROR, "%s: Can't lock lock file %s: %s", __func__, + MOUNTED_LOCK, strerror(errsv)); + /* proceed, since it was us who created the lockfile anyway */ + } + we_created_lockfile = 1; + (void) unlink(linktargetfile); + } else { + static int tries = 0; + + /* Someone else made the link. Wait. */ + alarm(LOCK_TIMEOUT); + + if (fcntl(lockfile_fd, F_SETLKW, &flock) == -1) { + int errsv = errno; + (void) unlink(linktargetfile); + plog(XLOG_ERROR, "%s: can't lock lock file %s: %s", __func__, + MOUNTED_LOCK, (errno == EINTR) ? + "timed out" : strerror(errsv)); + rc = 0; + goto error; + } + alarm(0); + /* + * Limit the number of iterations - maybe there + * still is some old /etc/mtab~ + */ + ++tries; + if (tries % 200 == 0) + usleep(30); + if (tries > 100000) { + (void) unlink(linktargetfile); + close(lockfile_fd); + plog(XLOG_ERROR, + "%s: Cannot create link %s; Perhaps there is a stale lock file?", + __func__, MOUNTED_LOCK); + rc = 0; + goto error; + } + close(lockfile_fd); + } + } + +error: + XFREE(linktargetfile); + + return rc; +} + + +static FILE * +open_locked_mtab(const char *mnttabname, char *mode, char *fs) +{ + FILE *mfp = NULL; + + if (mnt_file) { + dlog("Forced close on %s in read_mtab", mnttabname); + endmntent(mnt_file); + mnt_file = NULL; + } + + if (!mtab_is_a_symlink() && + !lock_mtab()) { + plog(XLOG_ERROR, "%s: Couldn't lock mtab", __func__); + return 0; + } + + mfp = setmntent((char *)mnttabname, mode); + if (!mfp) { + plog(XLOG_ERROR, "%s: setmntent(\"%s\", \"%s\"): %m", __func__, mnttabname, + mode); + return 0; + } + return mfp; +} + + +/* + * Unlock the mount table + */ +void +unlock_mntlist(void) +{ + if (mnt_file || we_created_lockfile) + dlog("unlock_mntlist: releasing"); + if (mnt_file) { + endmntent(mnt_file); + mnt_file = NULL; + } + if (we_created_lockfile) { + close(lockfile_fd); + lockfile_fd = -1; + unlink(MOUNTED_LOCK); + we_created_lockfile = 0; + } +} + + +/* + * Write out a mount list + */ +void +rewrite_mtab(mntlist *mp, const char *mnttabname) +{ + FILE *mfp; + int error = 0; + char tmpname[64]; + int retries; + int tmpfd; + char *cp; + char mcp[128]; + + if (!mtab_is_writable()) { + return; + } + + /* + * Concoct a temporary name in the same directory as the target mount + * table so that rename() will work. + */ + xstrlcpy(mcp, mnttabname, sizeof(mcp)); + cp = strrchr(mcp, '/'); + if (cp) { + memmove(tmpname, mcp, cp - mcp); + tmpname[cp - mcp] = '\0'; + } else { + plog(XLOG_WARNING, "No '/' in mtab (%s), using \".\" as tmp directory", mnttabname); + tmpname[0] = '.'; + tmpname[1] = '\0'; + } + xstrlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname)); + retries = 0; + enfile1: +#ifdef HAVE_MKSTEMP + tmpfd = mkstemp(tmpname); + fchmod(tmpfd, 0644); +#else /* not HAVE_MKSTEMP */ + mktemp(tmpname); + tmpfd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644); +#endif /* not HAVE_MKSTEMP */ + if (tmpfd < 0) { + if (errno == ENFILE && retries++ < NFILE_RETRIES) { + sleep(1); + goto enfile1; + } + plog(XLOG_ERROR, "%s: open: %m", tmpname); + return; + } + if (close(tmpfd) < 0) + plog(XLOG_ERROR, "%s: Couldn't close tmp file descriptor: %m", __func__); + + retries = 0; + enfile2: + mfp = setmntent(tmpname, "w"); + if (!mfp) { + if (errno == ENFILE && retries++ < NFILE_RETRIES) { + sleep(1); + goto enfile2; + } + plog(XLOG_ERROR, "%s: setmntent(\"%s\", \"w\"): %m", __func__, tmpname); + error = 1; + goto out; + } + while (mp) { + if (mp->mnt) { + if (addmntent(mfp, mp->mnt)) { + plog(XLOG_ERROR, "%s: Can't write entry to %s", __func__, tmpname); + error = 1; + goto out; + } + } + mp = mp->mnext; + } + + /* + * SunOS 4.1 manuals say that the return code from entmntent() + * is always 1 and to treat as a void. That means we need to + * call fflush() to make sure the new mtab file got written. + */ + if (fflush(mfp)) { + plog(XLOG_ERROR, "flush new mtab file: %m"); + error = 1; + goto out; + } + (void) endmntent(mfp); + + /* + * Rename temporary mtab to real mtab + */ + if (rename(tmpname, mnttabname) < 0) { + plog(XLOG_ERROR, "rename %s to %s: %m", tmpname, mnttabname); + error = 1; + goto out; + } + out: + if (error) + (void) unlink(tmpname); +} + + +static void +mtab_stripnl(char *s) +{ + do { + s = strchr(s, '\n'); + if (s) + *s++ = ' '; + } while (s); +} + + +/* + * Append a mntent structure to the + * current mount table. + */ +void +write_mntent(mntent_t *mp, const char *mnttabname) +{ + int retries = 0; + FILE *mfp; + + if (!mtab_is_writable()) { + return; + } + + enfile: + mfp = open_locked_mtab(mnttabname, "a", mp->mnt_dir); + if (mfp) { + mtab_stripnl(mp->mnt_opts); + if (addmntent(mfp, mp)) + plog(XLOG_ERROR, "%s: Couldn't write %s: %m", __func__, mnttabname); + if (fflush(mfp)) + plog(XLOG_ERROR, "%s: Couldn't flush %s: %m", __func__, mnttabname); + (void) endmntent(mfp); + } else { + if (errno == ENFILE && retries < NFILE_RETRIES) { + sleep(1); + goto enfile; + } + plog(XLOG_ERROR, "%s: setmntent(\"%s\", \"a\"): %m", __func__, mnttabname); + } + + unlock_mntlist(); +} + +#endif /* MOUNT_TABLE_ON_FILE */ + + +static mntent_t * +mnt_dup(mntent_t *mp) +{ + mntent_t *new_mp = ALLOC(mntent_t); + + new_mp->mnt_fsname = xstrdup(mp->mnt_fsname); + new_mp->mnt_dir = xstrdup(mp->mnt_dir); + new_mp->mnt_type = xstrdup(mp->mnt_type); + new_mp->mnt_opts = xstrdup(mp->mnt_opts); + + new_mp->mnt_freq = mp->mnt_freq; + new_mp->mnt_passno = mp->mnt_passno; + +#ifdef HAVE_MNTENT_T_MNT_TIME +# ifdef HAVE_MNTENT_T_MNT_TIME_STRING + new_mp->mnt_time = xstrdup(mp->mnt_time); +# else /* not HAVE_MNTENT_T_MNT_TIME_STRING */ + new_mp->mnt_time = mp->mnt_time; +# endif /* not HAVE_MNTENT_T_MNT_TIME_STRING */ +#endif /* HAVE_MNTENT_T_MNT_TIME */ + +#ifdef HAVE_MNTENT_T_MNT_CNODE + new_mp->mnt_cnode = mp->mnt_cnode; +#endif /* HAVE_MNTENT_T_MNT_CNODE */ + + return new_mp; +} + + +/* + * Read a mount table into memory + */ +mntlist * +read_mtab(char *fs, const char *mnttabname) +{ + mntlist **mpp, *mhp; + + mntent_t *mep; + + FILE *mfp = open_locked_mtab(mnttabname, "r+", fs); + + if (!mfp) + return 0; + + mpp = &mhp; + + /* + * XXX - In SunOS 4 there is (yet another) memory leak + * which loses 1K the first time getmntent is called. + * (jsp) + */ + while ((mep = getmntent(mfp))) { + /* + * Allocate a new slot + */ + *mpp = ALLOC(struct mntlist); + + /* + * Copy the data returned by getmntent + */ + (*mpp)->mnt = mnt_dup(mep); + + /* + * Move to next pointer + */ + mpp = &(*mpp)->mnext; + } + *mpp = NULL; + +#ifdef MOUNT_TABLE_ON_FILE + /* + * If we are not updating the mount table then we + * can free the resources held here, otherwise they + * must be held until the mount table update is complete + */ + mnt_file = mfp; +#else /* not MOUNT_TABLE_ON_FILE */ + endmntent(mfp); +#endif /* not MOUNT_TABLE_ON_FILE */ + + return mhp; +} diff --git a/conf/mtab/mtab_mach3.c b/conf/mtab/mtab_mach3.c new file mode 100644 index 00000000000..af1313d3d8d --- /dev/null +++ b/conf/mtab/mtab_mach3.c @@ -0,0 +1,501 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mtab/mtab_mach3.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +#define NFILE_RETRIES 10 /* number of retries (seconds) */ + +static FILE *mnt_file; + + +/* + * If the system is being trashed by something, then + * opening mtab may fail with ENFILE. So, go to sleep + * for a second and try again. (Yes - this has happened to me.) + * + * Note that this *may* block the automounter, oh well. + * If we get to this state then things are badly wrong anyway... + * + * Give the system 10 seconds to recover but then give up. + * Hopefully something else will exit and free up some file + * table slots in that time. + */ +#ifdef HAVE_FCNTL_H +static int +lock(int fd) +{ + int rc; + struct flock lk; + + lk.l_type = F_WRLCK; + lk.l_whence = 0; + lk.l_start = 0; + lk.l_len = 0; + +again: + rc = fcntl(fd, F_SETLKW, (caddr_t) & lk); + if (rc < 0 && (errno == EACCES || errno == EAGAIN)) { +# ifdef DEBUG + dlog("Blocked, trying to obtain exclusive mtab lock"); +# endif /* DEBUG */ + sleep(1); + goto again; + } + return rc; +} +#else /* not HAVE_FCNTL_H */ +# define lock(fd) (flock((fd), LOCK_EX)) +#endif /* not HAVE_FCNTL_H */ + + +static FILE * +open_locked_mtab(char *mnttabname, char *mode, char *fs) +{ + FILE *mfp = NULL; + + /* + * There is a possible race condition if two processes enter + * this routine at the same time. One will be blocked by the + * exclusive lock below (or by the shared lock in setmntent) + * and by the time the second process has the exclusive lock + * it will be on the wrong underlying object. To check for this + * the mtab file is stat'ed before and after all the locking + * sequence, and if it is a different file then we assume that + * it may be the wrong file (only "may", since there is another + * race between the initial stat and the setmntent). + * + * Simpler solutions to this problem are invited... + */ + int racing = 2; + int rc; + int retries = 0; + struct stat st_before, st_after; + + if (mnt_file) { +#ifdef DEBUG + dlog("Forced close on %s in read_mtab", mnttabname); +#endif /* DEBUG */ + endmntent(mnt_file); + mnt_file = NULL; + } +again: + if (mfp) { + endmntent(mfp); + mfp = NULL; + } + if (stat(mnttabname, &st_before) < 0) { + plog(XLOG_ERROR, "%s: stat: %m", mnttabname); + if (errno == ESTALE) { + /* happens occasionally */ + sleep(1); + goto again; + } + /* + * If 'mnttabname' file does not exist give setmntent() a + * chance to create it (depending on the mode). + * Otherwise, bail out. + */ + else if (errno != ENOENT) { + return 0; + } + } +eacces: + mfp = setmntent(mnttabname, mode); + if (!mfp) { + /* + * Since setmntent locks the descriptor, it + * is possible it can fail... so retry if + * needed. + */ + if (errno == EACCES || errno == EAGAIN) { +#ifdef DEBUG + dlog("Blocked, trying to obtain exclusive mtab lock"); +#endif /* DEBUG */ + goto eacces; + } else if (errno == ENFILE && retries++ < NFILE_RETRIES) { + sleep(1); + goto eacces; + } + plog(XLOG_ERROR, "setmntent(\"%s\", \"%s\"): %m", mnttabname, mode); + return 0; + } + /* + * At this point we have an exclusive lock on the mount list, + * but it may be the wrong one so... + */ + + /* + * Need to get an exclusive lock on the current + * mount table until we have a new copy written + * out, when the lock is released in free_mntlist. + * flock is good enough since the mount table is + * not shared between machines. + */ + do + rc = lock(fileno(mfp)); + while (rc < 0 && errno == EINTR); + if (rc < 0) { + plog(XLOG_ERROR, "Couldn't lock %s: %m", mnttabname); + endmntent(mfp); + return 0; + } + /* + * Now check whether the mtab file has changed under our feet + */ + if (stat(mnttabname, &st_after) < 0) { + plog(XLOG_ERROR, "%s: stat", mnttabname); + goto again; + } + if (st_before.st_dev != st_after.st_dev || + st_before.st_ino != st_after.st_ino) { + struct timeval tv; + if (racing == 0) { + /* Sometimes print a warning */ + plog(XLOG_WARNING, + "Possible mount table race - retrying %s", fs); + } + racing = (racing + 1) & 3; + /* + * Take a nap. From: Doug Kingston + */ + tv.tv_sec = 0; + tv.tv_usec = (am_mypid & 0x07) << 17; + if (tv.tv_usec) + if (select(0, (voidp) 0, (voidp) 0, (voidp) 0, &tv) < 0) + plog(XLOG_WARNING, "mtab nap failed: %m"); + + goto again; + } + return mfp; +} + + +/* + * Unlock the mount table + */ +void +unlock_mntlist(void) +{ + /* + * Release file lock, by closing the file + */ + if (mnt_file) { + dlog("unlock_mntlist: releasing"); + endmntent(mnt_file); + mnt_file = NULL; + } +} + + +/* + * routine to convert notation "/@honeydew" to the notation + * honeydew:/ and vice versa (honeydew:/ to /@honeydew) + * This lets you put /@honeydew in /etc/fstab without changing + * fstab.c and it lets you use EITHER notation on the command line! + */ +static char * +convert(register char *s, char bad, char good) +{ + char *index(); + register char *t, *p; + register int len1, len2, i; + char *ptr; + + if ((p = index(s, bad)) == NULL) { + return (s); + } + ptr = t = (char *) xzalloc(MAXPATHLEN * sizeof(char)); + len1 = p - s; + len2 = strlen(s) - len1 - 1; + p++; + for (i = 0; i < len2; i++) + *t++ = p[i]; + *t++ = good; + for (i = 0; i < len1; i++) + *t++ = s[i]; + return (ptr); +} + + +static +mntprtent3(FILE *mnttabp, register mntent_t *mnt) +{ + char *cvtd = convert(mnt->mnt_fsname, ':', '@'); + + dlog("%x:%s:%s:%s:%d:%d:%s:%s:\n", + mnttabp, + (cvtd ? cvtd : ""), + (mnt->mnt_dir ? mnt->mnt_dir : ""), + (mnt->mnt_opts ? mnt->mnt_opts : ""), + mnt->mnt_freq, + mnt->mnt_passno, + (mnt->mnt_type ? mnt->mnt_type : ""), + (mnt->mnt_opts2 ? mnt->mnt_opts2 : "") + ); + fprintf(mnttabp, "%s:%s:%s:%d:%d:%s:%s:\n", + (cvtd ? cvtd : ""), + (mnt->mnt_dir ? mnt->mnt_dir : ""), + (mnt->mnt_opts ? mnt->mnt_opts : ""), + mnt->mnt_freq, + mnt->mnt_passno, + (mnt->mnt_type ? mnt->mnt_type : ""), + (mnt->mnt_opts2 ? mnt->mnt_opts2 : "") + ); + XFREE(cvtd); + cvtd = NULL; + return (0); +} + + +addmntent3(FILE *mnttabp, register mntent_t *mnt) +{ + if (fseek(mnttabp, 0, 2) < 0) { + return (1); + } + mntprtent3(mnttabp, mnt); + return (0); +} + + +/* + * Write out a mount list + */ +void +rewrite_mtab(mntlist *mp, const char *mnttabname) +{ + FILE *mfp; + int error = 0; + /* + * Concoct a temporary name in the same directory as the target mount + * table so that rename() will work. + */ + char tmpname[64]; + int retries; + int tmpfd; + char *cp; + char *mcp = mnttabname; + + cp = strrchr(mcp, '/'); + if (cp) { + memmove(tmpname, mcp, cp - mcp); + tmpname[cp - mcp] = '\0'; + } else { + plog(XLOG_WARNING, "No '/' in mtab (%s), using \".\" as tmp directory", mnttabname); + tmpname[0] = '.'; + tmpname[1] = '\0'; + } + xstrlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname)); + retries = 0; +enfile1: +#ifdef HAVE_MKSTEMP + tmpfd = mkstemp(tmpname); + fchmod(tmpfd, 0644); +#else /* not HAVE_MKSTEMP */ + mktemp(tmpname); + tmpfd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644); +#endif /* not HAVE_MKSTEMP */ + if (tmpfd < 0) { + if (errno == ENFILE && retries++ < NFILE_RETRIES) { + sleep(1); + goto enfile1; + } + plog(XLOG_ERROR, "%s: open: %m", tmpname); + return; + } + if (close(tmpfd) < 0) + plog(XLOG_ERROR, "Couldn't close tmp file descriptor: %m"); + + retries = 0; +enfile2: + mfp = setmntent(tmpname, "w"); + if (!mfp) { + if (errno == ENFILE && retries++ < NFILE_RETRIES) { + sleep(1); + goto enfile2; + } + plog(XLOG_ERROR, "setmntent(\"%s\", \"w\"): %m", tmpname); + error = 1; + goto out; + } + while (mp) { + if (mp->mnt) { + if (addmntent3(mfp, mp->mnt)) { + plog(XLOG_ERROR, "Can't write entry to %s", tmpname); + error = 1; + goto out; + } + } + mp = mp->mnext; + } + + /* + * SunOS 4.1 manuals say that the return code from endmntent() + * is always 1 and to treat as a void. That means we need to + * call fflush() to make sure the new mtab file got written. + */ + if (fflush(mfp)) { + plog(XLOG_ERROR, "flush new mtab file: %m"); + error = 1; + goto out; + } + (void) endmntent(mfp); + + /* + * Rename temporary mtab to real mtab + */ + if (rename(tmpname, mnttabname) < 0) { + plog(XLOG_ERROR, "rename %s to %s: %m", tmpname, mnttabname); + error = 1; + goto out; + } +out: + if (error) + (void) unlink(tmpname); +} + + +static void +mtab_stripnl(char *s) +{ + do { + s = strchr(s, '\n'); + if (s) + *s++ = ' '; + } while (s); +} + + +/* + * Append a mntent structure to the + * current mount table. + */ +void +write_mntent(mntent_t *mp, const char *mnttabname) +{ + int retries = 0; + FILE *mfp; +enfile: + mfp = open_locked_mtab(mnttabname, "a", mp->mnt_dir); + if (mfp) { + mtab_stripnl(mp->mnt_opts); + if (addmntent3(mfp, mp)) + plog(XLOG_ERROR, "Couldn't write %s: %m", mnttabname); + if (fflush(mfp)) + plog(XLOG_ERROR, "Couldn't flush %s: %m", mnttabname); + (void) endmntent(mfp); + } else { + if (errno == ENFILE && retries < NFILE_RETRIES) { + sleep(1); + goto enfile; + } + plog(XLOG_ERROR, "setmntent(\"%s\", \"a\"): %m", mnttabname); + } +} + + +static mntent_t * +mnt_dup(mntent_t *mp) +{ + mntent_t *new_mp = ALLOC(mntent_t); + + new_mp->mnt_fsname = convert(mp->mnt_fsname, '@', ':'); + + new_mp->mnt_dir = xstrdup(mp->mnt_dir); + new_mp->mnt_type = xstrdup(mp->mnt_type); + new_mp->mnt_opts = xstrdup(mp->mnt_opts); + + new_mp->mnt_freq = mp->mnt_freq; + new_mp->mnt_passno = mp->mnt_passno; + + return new_mp; +} + + +/* + * Read a mount table into memory + */ +mntlist * +read_mtab(char *fs, const char *mnttabname) +{ + mntlist **mpp, *mhp; + + mntent_t *mep; + FILE *mfp = open_locked_mtab(mnttabname, "r+", fs); + + if (!mfp) + return 0; + + mpp = &mhp; + +/* + * XXX - In SunOS 4 there is (yet another) memory leak + * which loses 1K the first time getmntent is called. + * (jsp) + */ + while (mep = getmntent(mfp)) { + /* + * Allocate a new slot + */ + *mpp = ALLOC(struct mntlist); + + /* + * Copy the data returned by getmntent + */ + (*mpp)->mnt = mnt_dup(mep); + + /* + * Move to next pointer + */ + mpp = &(*mpp)->mnext; + } + *mpp = NULL; + + /* + * If we are not updating the mount table then we + * can free the resources held here, otherwise they + * must be held until the mount table update is complete + */ + mnt_file = mfp; + + return mhp; +} diff --git a/conf/mtab/mtab_osf.c b/conf/mtab/mtab_osf.c new file mode 100644 index 00000000000..b9a1de53323 --- /dev/null +++ b/conf/mtab/mtab_osf.c @@ -0,0 +1,146 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mtab/mtab_osf.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +static mntent_t * +mnt_dup(struct statfs *mp) +{ + mntent_t *new_mp = ALLOC(mntent_t); + char *ty; + char *at; + char mntfrombuf[MNAMELEN]; + char *mntfromptr; + + /* + * Under DEC OSF/1 T1.2-2 the f_mntfromname fields of + * the statfs structure can be in the format @ + * instead of :. Here we check for this and + * reformat it if necessary. + */ + mntfromptr = mp->f_mntfromname; + + switch (mp->f_type) { + case MOUNT_TYPE_NFS: +#ifdef HAVE_FS_NFS3 + case MOUNT_TYPE_NFS3: +#endif /* HAVE_FS_NFS3 */ + at = strchr(mp->f_mntfromname, '@'); + if (at != '\0') { + xstrlcpy(mntfrombuf, (at + 1), sizeof(mntfrombuf)); + xstrlcat(mntfrombuf, ":", sizeof(mntfrombuf)); + strncat(mntfrombuf, mp->f_mntfromname, (at - mp->f_mntfromname)); + mntfromptr = mntfrombuf; + } + } + new_mp->mnt_fsname = xstrdup(mntfromptr); + + new_mp->mnt_dir = xstrdup(mp->f_mntonname); + switch (mp->f_type) { + case MOUNT_TYPE_UFS: + ty = MNTTAB_TYPE_UFS; + break; +#ifdef HAVE_FS_NFS3 + case MOUNT_TYPE_NFS3: + ty = MNTTAB_TYPE_NFS3; + break; +#endif /* HAVE_FS_NFS3 */ + case MOUNT_TYPE_NFS: + ty = MNTTAB_TYPE_NFS; + break; + case MOUNT_TYPE_MFS: + ty = MNTTAB_TYPE_MFS; + break; + default: + ty = "unknown"; + break; + } + + new_mp->mnt_type = xstrdup(ty); + new_mp->mnt_opts = xstrdup("unset"); + new_mp->mnt_freq = 0; + new_mp->mnt_passno = 0; + + return new_mp; +} + + +/* + * Read a mount table into memory + */ +mntlist * +read_mtab(char *fs, const char *mnttabname) +{ + mntlist **mpp, *mhp; + struct statfs *mntbufp, *mntp; + + int nloc = getmntinfo(&mntbufp, MNT_NOWAIT); + + if (nloc == 0) { + plog(XLOG_ERROR, "Can't read mount table"); + return 0; + } + mpp = &mhp; + for (mntp = mntbufp; mntp < mntbufp + nloc; mntp++) { + /* + * Allocate a new slot + */ + *mpp = ALLOC(struct mntlist); + + /* + * Copy the data returned by getmntent + */ + (*mpp)->mnt = mnt_dup(mntp); + + /* + * Move to next pointer + */ + mpp = &(*mpp)->mnext; + } + + /* terminate the linked list */ + *mpp = NULL; + + return mhp; +} diff --git a/conf/mtab/mtab_svr4.c b/conf/mtab/mtab_svr4.c new file mode 100644 index 00000000000..b9a310a1903 --- /dev/null +++ b/conf/mtab/mtab_svr4.c @@ -0,0 +1,302 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mtab/mtab_svr4.c + * + * How to manage the mount table file. Based on other SVR3 ports. + * -Erez Zadok + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* + * file descriptor for lock file + * values: -1 no file-descriptor was set yet (or mnttab unlocked, or error + * in locking). + * >=0 legal file-descriptor value (file lock succeeded) + */ +static int mntent_lock_fd = -1; + + +#ifdef MOUNT_TABLE_ON_FILE +static char mtlckname[] = "/etc/.mnttab.lock"; +#endif /* MOUNT_TABLE_ON_FILE */ + + +/****************************************************************************/ +/*** Private functions */ +/****************************************************************************/ + +static void +unlockmnttab(void) +{ +#ifdef MOUNT_TABLE_ON_FILE + if (mntent_lock_fd >= 0) { + close(mntent_lock_fd); + mntent_lock_fd = -1; + } +#endif /* MOUNT_TABLE_ON_FILE */ +} + + +#ifdef MOUNT_TABLE_ON_FILE +static int +lockfile(int fd, int type) +{ + struct flock lk; + int ret; + + lk.l_type = type; + lk.l_whence = 0; + lk.l_start = 0; + lk.l_len = 0; + + /* + * F_SETLKW means to block until the read or write block is free to be + * locked. + */ + ret = fcntl(fd, F_SETLKW, &lk); + return ret; +} +#endif /* MOUNT_TABLE_ON_FILE */ + + +/* return 0 if locking succeeded, -1 if failed */ +static int +lockmnttab(void) +{ +#ifdef MOUNT_TABLE_ON_FILE + /* if mnttab file is locked, all is well */ + if (mntent_lock_fd >= 0) + return 0; + + /* need to lock mnttab file. first, open the file */ + mntent_lock_fd = open(mtlckname, O_RDWR | O_CREAT, 0600); + if (mntent_lock_fd < 0) { + plog(XLOG_ERROR, "Unable to open/creat %s: %m", mtlckname); + return -1; + } + + /* if succeeded in opening the file, try to lock it */ + if (lockfile(mntent_lock_fd, F_WRLCK) < 0) { + close(mntent_lock_fd); + mntent_lock_fd = -1; +#ifdef DEBUG + dlog("lock %s failed: %m", mtlckname); +#endif /* DEBUG */ + return -1; + } +#else /* not MOUNT_TABLE_ON_FILE */ + /* fake lock for in-kernel mount table */ +#endif /* not MOUNT_TABLE_ON_FILE */ + + /* finally, succeeded in also locking the file */ + return 0; +} + + +/* + * Convert from solaris mnttab to Amd mntent. Since am-utils uses + * native "struct mnttab" if available, this really copies fields of + * the same structure. + */ +static mntent_t * +mnt_dup(const mntent_t *mtp) +{ + mntent_t *mep = ALLOC(mntent_t); + + mep->mnt_fsname = xstrdup(mtp->mnt_fsname); + mep->mnt_dir = xstrdup(mtp->mnt_dir); + mep->mnt_type = xstrdup(mtp->mnt_type); + mep->mnt_opts = xstrdup(mtp->mnt_opts); + mep->mnt_time = xstrdup(mtp->mnt_time); + + return mep; +} + + +/* + * Adjust arguments in mntent_t. + */ +#ifdef MOUNT_TABLE_ON_FILE +static mntent_t * +update_mnttab_fields(const mntent_t *mnt) +{ + static mntent_t mt; + static char timestr[16]; + struct timeval tv; + + /* most fields don't change, only update mnt_time below */ + mt.mnt_fsname = mnt->mnt_fsname; + mt.mnt_dir = mnt->mnt_dir; + mt.mnt_type = mnt->mnt_type; + mt.mnt_opts = mnt->mnt_opts; + + /* + * Solaris 2.5 and newer take a second argument to gettimeofday(). If you + * find a useful svr4-like OS that uses the old style, and this code here + * fails, then create a new autoconf test that will determine the number + * of arguments gettimeofday() takes. -Erez. + */ + if (gettimeofday(&tv, NULL) < 0) + timestr[0] = '\0'; + else + xsnprintf(timestr, sizeof(timestr), "%ld", tv.tv_sec); + + mt.mnt_time = timestr; + + return &mt; +} +#endif /* MOUNT_TABLE_ON_FILE */ + + +static void +write_mntent_to_mtab(FILE *fp, const mntent_t *mnt) +{ +#ifdef MOUNT_TABLE_ON_FILE + putmntent(fp, update_mnttab_fields(mnt)); +#endif /* MOUNT_TABLE_ON_FILE */ +} + + +/****************************************************************************/ +/*** Public functions */ +/****************************************************************************/ + + +void +unlock_mntlist(void) +{ + unlockmnttab(); +} + + +/* + * Read a mount table into memory + */ +mntlist * +read_mtab(char *fs, const char *mnttabname) +{ + mntlist **mpp, *mhp; + FILE *fp; + mntent_t mountbuf; + int ret; + + if (lockmnttab() < 0) /* failed locking */ + return NULL; + + fp = fopen(mnttabname, "r"); + if (fp == NULL) { + plog(XLOG_ERROR, "Can't open %s: %m", mnttabname); + return NULL; + } + mpp = &mhp; + + while ((ret = getmntent(fp, &mountbuf)) == 0) { + /* + * Allocate a new slot + */ + *mpp = ALLOC(struct mntlist); + + /* + * Copy the data returned by getmntent + */ + (*mpp)->mnt = mnt_dup(&mountbuf); + + /* + * Move to next pointer + */ + mpp = &(*mpp)->mnext; + } + + if (ret > 0) { + plog(XLOG_ERROR, "read error on %s: %m", mnttabname); + unlockmnttab(); + mhp = NULL; + } + *mpp = NULL; + + fclose(fp); + return mhp; +} + + +void +rewrite_mtab(mntlist *mp, const char *mnttabname) +{ + FILE *fp; + + assert(mntent_lock_fd >= 0); /* ensure lock fd is valid */ + + fp = fopen(mnttabname, "r+"); + if (fp == NULL) { + plog(XLOG_ERROR, "Can't open %s: %m", mnttabname); + unlockmnttab(); + return; + } + while (mp) { + if (mp->mnt) + write_mntent_to_mtab(fp, mp->mnt); + mp = mp->mnext; + } + + ftruncate(fileno(fp), ftell(fp)); + fclose(fp); + unlockmnttab(); +} + + +void +write_mntent(mntent_t *mtp, const char *mnttabname) +{ + FILE *fp; + + if (lockmnttab() < 0) + return; + + fp = fopen(mnttabname, "a"); + if (fp == NULL) { + plog(XLOG_ERROR, "Unable to append %s: %m", mnttabname); + return; + } + write_mntent_to_mtab(fp, mtp); + + fclose(fp); + unlockmnttab(); +} diff --git a/conf/mtab/mtab_ultrix.c b/conf/mtab/mtab_ultrix.c new file mode 100644 index 00000000000..ea0eed6e8cf --- /dev/null +++ b/conf/mtab/mtab_ultrix.c @@ -0,0 +1,119 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/mtab/mtab_ultrix.c + * + */ + +/* + * Include before config.h to force single definition of gt_names[] here. + * This can be done unconditionally since this file is Ultrix specific + * anyway and is properly protected from multiple inclusion. + * - Rainer Orth + * Hack hack hack. Sigh. -Erez. + */ +#include + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +#ifndef NMOUNT +# define NMOUNT 20 +#endif /* NMOUNT */ + + +static mntent_t * +mnt_dup(struct fs_data *mp) +{ + mntent_t *new_mp = ALLOC(mntent_t); + + new_mp->mnt_fsname = xstrdup(mp->fd_devname); + new_mp->mnt_dir = xstrdup(mp->fd_path); + if (mp->fd_fstype >= GT_NUMTYPES) + mp->fd_fstype = GT_UNKWN; + else if (gt_names[mp->fd_fstype] == 0) + mp->fd_fstype = GT_UNKWN; + new_mp->mnt_type = xstrdup(gt_names[mp->fd_fstype]); + new_mp->mnt_opts = xstrdup("unset"); + + new_mp->mnt_freq = 0; + new_mp->mnt_passno = mp->fd_dev; + + return new_mp; +} + + +/* + * Read a mount table into memory + */ +mntlist * +read_mtab(char *fs, const char *mnttabname) +{ + mntlist **mpp, *mhp; + /* From: Piete Brooks */ + int loc = 0; + struct fs_data mountbuffer[NMOUNT], *fs_data; + int ret; + + mpp = &mhp; + while ((ret = getmountent(&loc, mountbuffer, NMOUNT)) > 0) { + for (fs_data = mountbuffer; fs_data < &mountbuffer[ret]; fs_data++) { + /* + * Allocate a new slot + */ + *mpp = ALLOC(struct mntlist); + + /* + * Copy the data returned by getmntent + */ + (*mpp)->mnt = mnt_dup(fs_data); + + /* + * Move to next pointer + */ + mpp = &(*mpp)->mnext; + } + } + if (ret < 0) { + plog(XLOG_ERROR, "getmountent: %m"); + return 0; + } + *mpp = NULL; + + return mhp; +} diff --git a/conf/nfs_prot/nfs_prot_aix3.h b/conf/nfs_prot/nfs_prot_aix3.h new file mode 100644 index 00000000000..360f14a7803 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_aix3.h @@ -0,0 +1,212 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_aix3.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ + +/* don't include this one */ +#ifdef HAVE_RPCSVC_MOUNT_H_not +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + + +/* + * MACROS + */ + +#ifndef MNTPATHLEN +# define MNTPATHLEN 1024 +#endif /* not MNTPATHLEN */ +#ifndef MNTNAMLEN +# define MNTNAMLEN 255 +#endif /* not MNTNAMLEN */ + +/* map field names */ +#define ex_dir ex_name +#define gr_name g_name +#define gr_next g_next +#define ml_directory ml_path +#define ml_hostname ml_name +#define ml_next ml_nxt + +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *name; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct mountlist *mountlist; + +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropokres nfsdiropokres; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readokres nfsreadokres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattr nfssattr; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + +/* + * EXTERNALS: + */ +extern bool_t xdr_groups(XDR *xdrs, groups *objp); + +/* + * STRUCTURES: + */ + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_aix4.h b/conf/nfs_prot/nfs_prot_aix4.h new file mode 100644 index 00000000000..44f07eb4eca --- /dev/null +++ b/conf/nfs_prot/nfs_prot_aix4.h @@ -0,0 +1,210 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_aix4.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + + +/* + * MACROS + */ + +#ifndef MNTPATHLEN +# define MNTPATHLEN 1024 +#endif /* not MNTPATHLEN */ +#ifndef MNTNAMLEN +# define MNTNAMLEN 255 +#endif /* not MNTNAMLEN */ + +/* map field names */ +#define ex_dir ex_name +#define gr_name g_name +#define gr_next g_next +#define ml_directory ml_path +#define ml_hostname ml_name +#define ml_next ml_nxt + +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *name; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct mountlist *mountlist; + +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropokres nfsdiropokres; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readokres nfsreadokres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattr nfssattr; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + +/* + * EXTERNALS: + */ +extern bool_t xdr_groups(XDR *xdrs, groups *objp); + +/* + * STRUCTURES: + */ + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_aix4_2.h b/conf/nfs_prot/nfs_prot_aix4_2.h new file mode 100644 index 00000000000..40acae9369e --- /dev/null +++ b/conf/nfs_prot/nfs_prot_aix4_2.h @@ -0,0 +1,249 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_aix4_2.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + + +/* + * AIX 4.2 and newer support NFS V.3, hence the separate header. + */ + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + + +/* + * MACROS + */ + +#ifndef MNTPATHLEN +# define MNTPATHLEN 1024 +#endif /* not MNTPATHLEN */ +#ifndef MNTNAMLEN +# define MNTNAMLEN 255 +#endif /* not MNTNAMLEN */ + +/* map field names */ +#define ex_dir ex_name +#define gr_name g_name +#define gr_next g_next +#define ml_directory ml_path +#define ml_hostname ml_name +#define ml_next ml_nxt + +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *name; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct mountlist *mountlist; + +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropokres nfsdiropokres; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readokres nfsreadokres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattr nfssattr; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + + +/* + * STRUCTURES: + */ + +/* + * AIX 4.2 has NFS V3, but it is undefined in the header files. + * so I define everything that's needed for NFS V3 here. + */ +#ifdef MNT_NFS3 + +struct aix4_nfs_args { + struct sockaddr_in addr; /* server address and port */ + caddr_t u0; /* ??? UNKNOWN ??? */ + unsigned long proto; /* IPPROTO_TCP/IPPROTO_UDP */ + char *hostname; /* pointer to hostname? */ + char *netname; /* pointer to netname? */ + caddr_t fh; /* pointer to NFS v3 fh? */ + unsigned long flags; /* flags */ + unsigned long wsize; /* wsize */ + unsigned long rsize; /* rsize */ + unsigned long timeo; /* timeo */ + unsigned long retrans; /* retrans */ + unsigned long acregmin; /* acregmin */ + unsigned long acregmax; /* acregmax */ + unsigned long acdirmin; /* acdirmin */ + unsigned long acdirmax; /* acdirmax */ + unsigned long u14; /* ??? UNKNOWN ??? */ + struct pathcnf *pathconf; /* pathconf */ +}; + +#endif /* MNT_NFS3 */ + +/* + * EXTERNALS: + */ +extern bool_t xdr_groups(XDR *xdrs, groups *objp); + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_aix4_3.h b/conf/nfs_prot/nfs_prot_aix4_3.h new file mode 100644 index 00000000000..442cd174e3e --- /dev/null +++ b/conf/nfs_prot/nfs_prot_aix4_3.h @@ -0,0 +1,317 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_aix4_3.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + + +/* + * AIX 4.3 and newer support NFS V.3, hence the separate header. + */ + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + + +/* + * MACROS + */ + +#ifndef MNTPATHLEN +# define MNTPATHLEN 1024 +#endif /* not MNTPATHLEN */ +#ifndef MNTNAMLEN +# define MNTNAMLEN 255 +#endif /* not MNTNAMLEN */ + +/* map field names */ +#define ex_dir ex_name +#define gr_name g_name +#define gr_next g_next +#define ml_directory ml_path +#define ml_hostname ml_name +#define ml_next ml_nxt + +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *name; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct mountlist *mountlist; + +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropokres nfsdiropokres; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readokres nfsreadokres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattr nfssattr; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + + +/* + * STRUCTURES: + */ + +/* + * AIX 4.3 has NFS V3, but it is undefined in the header files. + * so I define everything that's needed for NFS V3 here. + */ +#ifdef MNT_NFS3 + +struct aix4_nfs_args { + struct sockaddr_in addr; /* file server address */ + struct sockaddr_in *syncaddr; /* secure NFS time sync addr */ + int proto; /* IPPROTO_TCP/IPPROTO_UDP ??? */ + char *hostname; /* server's hostname */ + char *netname; /* server's netname */ + caddr_t fh; /* File handle to be mounted */ + int flags; /* flags */ + int wsize; /* write size in bytes */ + int rsize; /* read size in bytes */ + int timeo; /* initial timeout in .1 secs */ + int retrans; /* times to retry send */ + int acregmin; /* attr cache file min secs */ + int acregmax; /* attr cache file max secs */ + int acdirmin; /* attr cache dir min secs */ + int acdirmax; /* attr cache dir max secs */ + struct ppathcnf *pathconf; /* static pathconf kludge */ + int biods; /* biods per mount */ + int numclust; /* numclust per mount */ +}; + +#if 0 +/* old structure we hand crafted. no longer needed */ +struct aix4_nfs_args { + struct sockaddr_in addr; /* server address and port */ + caddr_t u0; /* ??? UNKNOWN ??? */ + unsigned long proto; /* IPPROTO_TCP/IPPROTO_UDP */ + char *hostname; /* pointer to hostname? */ + char *netname; /* pointer to netname? */ + caddr_t fh; /* pointer to NFS v3 fh? */ + unsigned long flags; /* flags */ + unsigned long wsize; /* wsize */ + unsigned long rsize; /* rsize */ + unsigned long timeo; /* timeo */ + unsigned long retrans; /* retrans */ + unsigned long acregmin; /* acregmin */ + unsigned long acregmax; /* acregmax */ + unsigned long acdirmin; /* acdirmin */ + unsigned long acdirmax; /* acdirmax */ + unsigned long u14; /* ??? UNKNOWN ??? */ + struct pathcnf *pathconf; /* pathconf */ +}; +#endif /* 0 */ + +/* + * IBM is in dire need of taking a soft-eng class. + * They changed the API/ABI (namely the nfs3_args structure) + * in a service pack... + * + * All the following *_bis junk is here to try and deal with this idiocy. + */ +#define MOUNT_TYPE_NFS3_BIS 0x12344321 +struct aix4_nfs_args_bis { + struct sockaddr_in addr; /* server address and port */ + struct sockaddr_in *syncaddr; /* secure NFS time sync addr */ + int proto; /* IPPROTO_TCP/IPPROTO_UDP ??? */ + char *hostname; /* pointer to hostname? */ + char *netname; /* pointer to netname? */ + caddr_t fh; /* pointer to NFS v3 fh? */ + unsigned long flags; /* flags */ + unsigned long wsize; /* wsize */ + unsigned long rsize; /* rsize */ + unsigned long timeo; /* timeo */ + unsigned long retrans; /* retrans */ + unsigned long acregmin; /* acregmin */ + unsigned long acregmax; /* acregmax */ + unsigned long acdirmin; /* acdirmin */ + unsigned long acdirmax; /* acdirmax */ + unsigned long u14; /* ??? UNKNOWN ??? */ + struct ppathcnf *pathconf; /* static pathconf kludge */ + int biods; /* biods per mount */ + int numclust; /* numclust per mount */ +}; + +#endif /* MNT_NFS3 */ + +/* + ************************************************************************** + * AIX 4.3's autofs is not ported or tested yet... + * For now, undefine it or define dummy entries. + ************************************************************************** + */ +#ifdef MNT_AUTOFS +# undef MNT_AUTOFS +#endif /* MNT_AUTOFS */ +#ifdef HAVE_FS_AUTOFS +# undef HAVE_FS_AUTOFS +#endif /* HAVE_FS_AUTOFS */ + +/* + * EXTERNALS: + */ +extern bool_t xdr_groups(XDR *xdrs, groups *objp); +extern char *yperr_string (int incode); + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_aix5_1.h b/conf/nfs_prot/nfs_prot_aix5_1.h index e7fb47861c7..a4e67d0fc5f 100644 --- a/conf/nfs_prot/nfs_prot_aix5_1.h +++ b/conf/nfs_prot/nfs_prot_aix5_1.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2003 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -36,9 +32,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * %W% (Berkeley) %G% * - * $Id: nfs_prot_aix5_1.h,v 1.1.2.3 2002/12/27 22:44:53 ezk Exp $ + * File: am-utils/conf/nfs_prot/nfs_prot_aix5_1.h * */ @@ -47,7 +42,7 @@ /* - * AIX 5.1 has a different aix51_nfs_args structure, hence the separate header. + * AIX 5.1 has a different aix5_nfs_args structure, hence the separate header. */ #ifdef HAVE_RPCSVC_NFS_PROT_H @@ -224,19 +219,7 @@ typedef writeargs nfswriteargs; */ #ifdef MNT_NFS3 -#define FHSIZE3 64 /* size in bytes of a file handle (v3) */ -#define NFS3_FHSIZE 64 -#define MOUNTVERS3 ((unsigned long)(3)) -#define NFS_V3 ((unsigned long)(3)) - -#if 0 -struct nfs_fh3 { - u_int len; - char val[64]; /* !!! */ -}; -#endif - -struct aix51_nfs_args { +struct aix5_nfs_args { struct sockaddr_in addr; /* server address and port */ caddr_t u0; /* ??? UNKNOWN ??? */ unsigned long proto; /* IPPROTO_TCP/IPPROTO_UDP */ @@ -257,55 +240,57 @@ struct aix51_nfs_args { struct pathcnf *pathconf; /* pathconf */ }; -typedef struct { - u_int fhandle3_len; - char *fhandle3_val; -} fhandle3; - -enum mountstat3 { - MNT3_OK = 0, - MNT3ERR_PERM = 1, - MNT3ERR_NOENT = 2, - MNT3ERR_IO = 5, - MNT3ERR_ACCES = 13, - MNT3ERR_NOTDIR = 20, - MNT3ERR_INVAL = 22, - MNT3ERR_NAMETOOLONG = 63, - MNT3ERR_NOTSUPP = 10004, - MNT3ERR_SERVERFAULT = 10006 -}; -typedef enum mountstat3 mountstat3; - -struct mountres3_ok { - fhandle3 fhandle; - struct { - u_int auth_flavors_len; - int *auth_flavors_val; - } auth_flavors; -}; -typedef struct mountres3_ok mountres3_ok; - -struct mountres3 { - mountstat3 fhs_status; - union { - mountres3_ok mountinfo; - } mountres3_u; -}; -typedef struct mountres3 mountres3; - -struct nfs_fh3 { - u_int fh3_length; - union nfs_fh3_u { - struct nfs_fh3_i { - fhandle_t fh3_i; - } nfs_fh3_i; - char data[NFS3_FHSIZE]; - } fh3_u; -}; -typedef struct nfs_fh3 nfs_fh3; - #endif /* MNT_NFS3 */ +#ifdef MNT_AUTOFS +#define A_MAXNAME 255 +#define A_MAXOPTS 255 +#define A_MAXPATH 1024 + +struct mntrequest { + char *name; + char *map; + char *opts; + char *path; +}; +typedef struct mntrequest mntrequest; + +struct mntres { + int status; +}; +typedef struct mntres mntres; + +struct umntrequest { + int isdirect; + u_int devid; + u_long rdevid; + struct umntrequest *next; +}; +typedef struct umntrequest umntrequest; + +struct umntres { + int status; +}; +typedef struct umntres umntres; + +#define AUTOFS_PROG ((unsigned long)(100099)) +#define AUTOFS_VERS ((unsigned long)(1)) + +#endif /* MNT_AUTOFS */ + +/* + ************************************************************************** + * AIX 5.1's autofs is not ported or tested yet... + * For now, undefine it or define dummy entries. + ************************************************************************** + */ +#ifdef MNT_AUTOFS +# undef MNT_AUTOFS +#endif /* MNT_AUTOFS */ +#ifdef HAVE_FS_AUTOFS +# undef HAVE_FS_AUTOFS +#endif /* HAVE_FS_AUTOFS */ + /* * EXTERNALS: */ diff --git a/conf/nfs_prot/nfs_prot_aix5_2.h b/conf/nfs_prot/nfs_prot_aix5_2.h new file mode 100644 index 00000000000..887379055f1 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_aix5_2.h @@ -0,0 +1,365 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_aix5_2.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + + +/* + * AIX 5.2 has a different aix5_nfs_args structure, hence the separate header. + */ + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +/* + * AIX 5.2 wants 'struct pathcnf', but I couldn't find its definition + * anywhere. Luckily, amd doesn't need the size of this structure in + * any other structure that it uses. So we sidestep it for now. + */ +struct pathcnf; +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ +#ifdef HAVE_SYS_VFS_H +/* AIX 5.3 (ppc) wants definition of kernel-specific structure */ +struct thread_credentials; +#endif /* HAVE_SYS_VFS_H */ + +/* + * MACROS + */ + +#ifndef MNTPATHLEN +# define MNTPATHLEN 1024 +#endif /* not MNTPATHLEN */ +#ifndef MNTNAMLEN +# define MNTNAMLEN 255 +#endif /* not MNTNAMLEN */ + +/* compatible macro name with other OSs */ +#ifdef UVMNT_FORCE +# define MS_FORCE UVMNT_FORCE +#endif /* UVMNT_FORCE */ + +/********************************************************************************/ +/* + * NFS mount option flags (out of mount.h) + * Maybe one day IBM will include them in system headers. + */ +#ifndef MNTOPT_ACDIRMAX +# define MNTOPT_ACDIRMAX "acdirmax" /* max ac timeout for dirs (sec) */ +# define MNTOPT_ACDIRMIN "acdirmin" /* min ac timeout for dirs (sec) */ +# define MNTOPT_ACREGMAX "acregmax" /* max ac timeout for reg files (sec) */ +# define MNTOPT_ACREGMIN "acregmin" /* min ac timeout for reg files (sec) */ +# define MNTOPT_ACTIMEO "actimeo" /* attr cache timeout (sec) */ +# define MNTOPT_BG "bg" /* mount op in background if 1st attempt fails */ +# define MNTOPT_FASTATTR "fastattr" /* no sync_vp in nfs3_getattr */ +# define MNTOPT_FG "fg" /* mount op in fg if 1st attempt fails, default */ +# define MNTOPT_GRPID "grpid" /* SysV-compatible group-id on create */ +# define MNTOPT_HARD "hard" /* hard mount (default) */ +# define MNTOPT_INTR "intr" /* allow interrupts on hard mount */ +# define MNTOPT_NOAC "noac" /* don't cache file attributes */ +# define MNTOPT_NOACL "noacl" /* don't read acl's from server - default */ +# define MNTOPT_ACL "acl" /* read acl's from server means we load ksec */ +# define MNTOPT_NOAUTO "noauto"/* hide entry from mount -a */ +# define MNTOPT_NOCTO "nocto" /* no "close to open" attr consistency */ +# define MNTOPT_NODEV "nodev" /*don't allow opening of devices accross mount*/ +# define MNTOPT_NOINTR "nointr" /* don't allow interrupts on hard mounts */ +# define MNTOPT_NOQUOTA "noquota" /* don't check quotas */ +# define MNTOPT_NOSUID "nosuid" /* no set uid allowed */ +# define MNTOPT_BSY "bsy" +# define MNTOPT_PORT "port" /* server IP port number */ +# define MNTOPT_POSIX "posix" /* ask for static pathconf values from mountd */ +# define MNTOPT_QUOTA "quota" /* quotas */ +# define MNTOPT_RETRANS "retrans" /* set number of request retries */ +# define MNTOPT_RETRYS "retry" /* # of times mount is attempted, def=10000*/ +# define MNTOPT_RMNT "remount" /* remount to rw if mode ro */ +# define MNTOPT_RO "ro" /* read only */ +# define MNTOPT_RSIZE "rsize" /* set read size (bytes) */ +# define MNTOPT_RW "rw" /* read/write */ +# define MNTOPT_SECURE "secure"/* use secure RPC for NFS */ +# define MNTOPT_SHORTDEV "shortdev" /* server dev */ +# define MNTOPT_SOFT "soft" /* soft mount */ +# define MNTOPT_TIMEO "timeo" /* set initial timeout (1/10 sec) */ +# define MNTOPT_WSIZE "wsize" /* set write size (bytes) */ +# define MNTOPT_VERS "vers" /* protocol version number indicator */ +# define MNTOPT_PROTO "proto" /* protocol network_id indicator */ +# define MNTOPT_LLOCK "llock" /* Local locking (no lock manager) */ +# define MNTOPT_BIODS "biods" /* max biods per mount */ +# define MNTOPT_EXTATTR "extraattr" /* extended attribute usage */ +# define MNTOPT_COMBEHND "combehind" /* extended attribute usage */ +# define MNTOPT_NUMCLUST "numclust" /* max numclust per mount */ +# define MNTOPT_NODIRCACHE "nodircache" /* No readdir cache */ + +# define NFSMNT_NOACL 0x0 /* turn off acl support (not supported) */ +# define NFSMNT_SHORTDEV 0x0 /* server does not support 32-bit device no. + (not supported) */ +# define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */ +# define NFSMNT_WSIZE 0x002 /* set write size */ +# define NFSMNT_RSIZE 0x004 /* set read size */ +# define NFSMNT_TIMEO 0x008 /* set initial timeout */ +# define NFSMNT_RETRANS 0x010 /* set number of request retrys */ +# define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */ +# define NFSMNT_INT 0x040 /* allow interrupts on hard mount */ +# define NFSMNT_NOAC 0x080 /* don't cache attributes */ +# define NFSMNT_ACREGMIN 0x0100 /* set min secs for file attr cache */ +# define NFSMNT_ACREGMAX 0x0200 /* set max secs for file attr cache */ +# define NFSMNT_ACDIRMIN 0x0400 /* set min secs for dir attr cache */ +# define NFSMNT_ACDIRMAX 0x0800 /* set max secs for dir attr cache */ +# define NFSMNT_SECURE 0x1000 /* secure mount */ +# define NFSMNT_NOCTO 0x2000 /* no close-to-open consistency */ +# define NFSMNT_KNCONF 0x4000 /* transport's knetconfig structure */ +# define NFSMNT_GRPID 0x8000 /* System V-style gid inheritance */ +# define NFSMNT_RPCTIMESYNC 0x10000 /* use RPC to do secure NFS time sync */ +# define NFSMNT_KERBEROS 0x20000 /* use kerberos credentials */ +# define NFSMNT_POSIX 0x40000 /* static pathconf kludge info */ +# define NFSMNT_LLOCK 0x80000 /* Local locking (no lock manager) */ +# define NFSMNT_ACL 0x100000 /* turn on acl support */ +# define NFSMNT_BIODS 0x200000 /* number of biods per mount */ +# define NFSMNT_EXTATTR 0x400000 /* extended attribute usage */ +# define NFSMNT_FASTATTR 0x800000 /* no sync_vp in nfs3_getattr */ +# define NFSMNT_COMBEHND 0x1000000 /* allow commit behind */ +# define NFSMNT_NUMCLUST 0x2000000 /* number of cluster per mount */ +# define NFSMNT_NODIRCACHE 0x4000000 /* No readdir cache */ +#endif /* not MNTOPT_ACDIRMAX */ +/********************************************************************************/ + +/* map field names */ +#define ex_dir ex_name +#define gr_name g_name +#define gr_next g_next +#define ml_directory ml_path +#define ml_hostname ml_name +#define ml_next ml_nxt + +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *name; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct mountlist *mountlist; + +/* + * If these definitions fail to compile on your AIX 5.2 system, be + * sure you install all of the necessary header files. + */ +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropokres nfsdiropokres; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readokres nfsreadokres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattr nfssattr; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + + +/* + * STRUCTURES: + */ + +/* + * AIX 5.2 has NFS V3, but it is undefined in the header files. + * so I define everything that's needed for NFS V3 here. + */ +#ifdef MNT_NFS3 + +struct aix5_nfs_args { + struct sockaddr_in addr; /* file server address */ + struct sockaddr_in *syncaddr; /* secure NFS time sync addr */ + int proto; + char *hostname; /* server's hostname */ + char *netname; /* server's netname */ + caddr_t fh; /* File handle to be mounted */ + int flags; /* flags */ + int wsize; /* write size in bytes */ + int rsize; /* read size in bytes */ + int timeo; /* initial timeout in .1 secs */ + int retrans; /* times to retry send */ + int acregmin; /* attr cache file min secs */ + int acregmax; /* attr cache file max secs */ + int acdirmin; /* attr cache dir min secs */ + int acdirmax; /* attr cache dir max secs */ + struct ppathcnf *pathconf; /* static pathconf kludge */ + int biods; /* biods per mount */ + int numclust; /* numclust per mount */ +}; + +#endif /* MNT_NFS3 */ + +/* + ************************************************************************** + * AIX 5.2's autofs is not ported or tested yet... + * For now, undefine it or define dummy entries. + ************************************************************************** + */ +#ifdef MNT_AUTOFS +# undef MNT_AUTOFS +#endif /* MNT_AUTOFS */ +#ifdef HAVE_FS_AUTOFS +# undef HAVE_FS_AUTOFS +#endif /* HAVE_FS_AUTOFS */ + +/* + * EXTERNALS: + */ +extern bool_t xdr_groups(XDR *xdrs, groups *objp); +extern char *yperr_string (int incode); + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_bsdi2.h b/conf/nfs_prot/nfs_prot_bsdi2.h new file mode 100644 index 00000000000..74866e062ba --- /dev/null +++ b/conf/nfs_prot/nfs_prot_bsdi2.h @@ -0,0 +1,496 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_bsdi2.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +/* fake structure: too difficult to include other headers here */ +struct netexport { int this_is_SO_wrong; }; +# include +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ + +/* + * is for kernel only on bsdi2, so do not + * include it. + */ +#ifndef ____MSDOSFS_MSDOSFSMOUNT_H__ +# define ____MSDOSFS_MSDOSFSMOUNT_H__ +#endif /* ____MSDOSFS_MSDOSFSMOUNT_H__ */ + +/* + * getifaddrs() on bsdi2 is broken. Don't use it. + */ +#ifdef HAVE_GETIFADDRS +# undef HAVE_GETIFADDRS +#endif /* HAVE_GETIFADDRS */ + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#ifndef NFS_MAXDATA +# define NFS_MAXDATA 8192 +#endif /* NFS_MAXDATA */ +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +/* + * BSD/OS 2.1 deprecated NFSPROC_ROOT and NFSPROC_WRITECACHE and set them + * to NFSPROC_NOOP. + * Since amd is its own NFS server, reinstate them. + */ +#if (NFSPROC_ROOT == NFSPROC_NOOP) +# undef NFSPROC_ROOT +# define NFSPROC_ROOT 3 +#endif /* (NFSPROC_ROOT == NFSPROC_NOOP) */ +#if (NFSPROC_WRITECACHE == NFSPROC_NOOP) +# undef NFSPROC_WRITECACHE +# define NFSPROC_WRITECACHE 7 +#endif /* (NFSPROC_WRITECACHE == NFSPROC_NOOP) */ + +/* map field names */ +#define ex_dir ex_name +#define gr_name g_name +#define gr_next g_next +#define ml_directory ml_path +#define ml_hostname ml_name +#define ml_next ml_nxt +#define fh_data fh_bytes + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef nfstype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fattr nfsfattr; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct linkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern nfsattrstat *nfsproc_getattr_2_svc(nfsv2fh_t *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfsv2fh_t *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfsv2fh_t *, struct svc_req *); +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); + +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_mountlist(XDR *xdrs, mountlist *objp); +extern bool_t xdr_nfs_fh(XDR *, nfsv2fh_t*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); + + +/* + * ENUMS: + */ + +/* + * Use AMU_ prefixes so as to not conflict with #define's in . + * It is vital! that the AMU_* match one-to-one with the NFS_OK and NFSERR_* + * codes listed in . + */ +enum nfsstat { + AMU_NFS_OK = 0, + AMU_NFSERR_PERM = 1, + AMU_NFSERR_NOENT = 2, + AMU_NFSERR_IO = 5, + AMU_NFSERR_NXIO = 6, + AMU_NFSERR_ACCES = 13, + AMU_NFSERR_EXIST = 17, + AMU_NFSERR_NODEV = 19, + AMU_NFSERR_NOTDIR = 20, + AMU_NFSERR_ISDIR = 21, + AMU_NFSERR_FBIG = 27, + AMU_NFSERR_NOSPC = 28, + AMU_NFSERR_ROFS = 30, + AMU_NFSERR_NAMETOOLONG = 63, + AMU_NFSERR_NOTEMPTY = 66, + AMU_NFSERR_DQUOT = 69, + AMU_NFSERR_STALE = 70, + AMU_NFSERR_WFLUSH = 99 +}; + + +/* + * STRUCTURES: + */ + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfsv2fh_t sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfsv2fh_t da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfsv2fh_t drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfsv2fh_t ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfsv2fh_t wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfsv2fh_t la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfsv2fh_t rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + + +/****************************************************************************/ +/*** XDR ADDITIONS ***/ +/****************************************************************************/ + +struct exports { + dirpath ex_dir; + groups ex_groups; + exports ex_next; +}; + +typedef char fhandle[NFS_FHSIZE]; + +struct fhstatus { + u_int fhs_status; + union { + fhandle fhs_fhandle; + } fhstatus_u; +}; + +struct groups { + name gr_name; + groups gr_next; +}; + +struct mountlist { + name ml_hostname; + dirpath ml_directory; + mountlist ml_next; +}; + + +/****************************************************************************/ +/*** NFS ADDITIONS ***/ +/****************************************************************************/ + +#ifndef MOUNTPROG +# define MOUNTPROG RPCPROG_MNT +#endif /* not MOUNTPROG */ + +#ifndef MOUNTVERS +# define MOUNTVERS RPCMNT_VER1 +#endif /* not MOUNTVERS */ + +#ifndef MOUNTPROC_MNT +# define MOUNTPROC_MNT RPCMNT_MOUNT +#endif /* not MOUNTPROC_MNT */ + +#ifndef MOUNTPROC_DUMP +# define MOUNTPROC_DUMP RPCMNT_DUMP +#endif /* not MOUNTPROC_DUMP */ + +#ifndef MOUNTPROC_UMNT +# define MOUNTPROC_UMNT RPCMNT_UMOUNT +#endif /* not MOUNTPROC_UMNT */ + +#ifndef MOUNTPROC_UMNTALL +# define MOUNTPROC_UMNTALL RPCMNT_UMNTALL +#endif /* not MOUNTPROC_UMNTALL */ + +#ifndef MOUNTPROC_EXPORT +# define MOUNTPROC_EXPORT RPCMNT_EXPORT +#endif /* not MOUNTPROC_EXPORT */ + + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_bsdi3.h b/conf/nfs_prot/nfs_prot_bsdi3.h new file mode 100644 index 00000000000..5e387acfcb7 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_bsdi3.h @@ -0,0 +1,181 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_bsdi3.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ + +#ifndef NFS_NPROCS +# define NFS_NPROCS 26 +#endif /* not NFS_NPROCS */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ + +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# include +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ + +/****************************************************************************/ +/* + * NFS V3 support: + * BSD/OS 3.0 has it but no easy way to figure it out from the header files. + */ +#ifndef MNTTYPE_NFS3 +# define MNTTYPE_NFS3 "nfs" +#endif /* MNTTYPE_NFS3 */ + +/****************************************************************************/ + + +/* + * MACROS: + */ +#define dr_drok_u diropres +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_size size +#define na_type type +#define na_gid gid +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_status status +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_from from +#define wra_fhandle file + + +/* + * TYPEDEFS: + */ +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + +/* missing definitions from bsdi4 */ +#if defined(HAVE_MAP_HESIOD) && !defined(HAVE_HESIOD_H) +extern int hesiod_init(void **context); +#endif /* defined(HAVE_MAP_HESIOD) && !defined(HAVE_HESIOD_H) */ + +/* + * On bsdi4, NFS V3/tcp mounts should not use the default resvport option. + * Defining this mnt option string will force compute_nfs_args() to not + * use reserved ports unless it was specified as a mount option. + */ +#ifndef MNTTAB_OPT_RESVPORT +# define MNTTAB_OPT_RESVPORT "resvport" +#endif /* not MNTTAB_OPT_RESVPORT */ + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_darwin.h b/conf/nfs_prot/nfs_prot_darwin.h index 9ef1e721e60..a505254a456 100644 --- a/conf/nfs_prot/nfs_prot_darwin.h +++ b/conf/nfs_prot/nfs_prot_darwin.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2003 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -36,9 +32,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * %W% (Berkeley) %G% * - * $Id: nfs_prot_darwin.h,v 1.1.2.4 2002/12/27 22:44:54 ezk Exp $ + * File: am-utils/conf/nfs_prot/nfs_prot_darwin.h * */ @@ -58,46 +53,6 @@ # include #endif /* HAVE_UFS_UFS_UFSMOUNT_H */ -#define MOUNTVERS3 ((unsigned long)(3)) - -typedef struct { - u_int fhandle3_len; - char *fhandle3_val; -} fhandle3; - - -enum mountstat3 { - MNT3_OK = 0, - MNT3ERR_PERM = 1, - MNT3ERR_NOENT = 2, - MNT3ERR_IO = 5, - MNT3ERR_ACCES = 13, - MNT3ERR_NOTDIR = 20, - MNT3ERR_INVAL = 22, - MNT3ERR_NAMETOOLONG = 63, - MNT3ERR_NOTSUPP = 10004, - MNT3ERR_SERVERFAULT = 10006 -}; -typedef enum mountstat3 mountstat3; - -struct mountres3_ok { - fhandle3 fhandle; - struct { - u_int auth_flavors_len; - int *auth_flavors_val; - } auth_flavors; -}; -typedef struct mountres3_ok mountres3_ok; - -struct mountres3 { - mountstat3 fhs_status; - union { - mountres3_ok mountinfo; - } mountres3_u; -}; -typedef struct mountres3 mountres3; - - /* * MACROS: */ @@ -215,45 +170,11 @@ typedef symlinkargs nfssymlinkargs; typedef writeargs nfswriteargs; -/* - * - * FreeBSD-3.0-RELEASE has NFS V3. Older versions had it only defined - * in the rpcgen source file. If you are on an older system, and you - * want NFSv3 support, you need to regenerate the rpcsvc header files as - * follows: - * cd /usr/include/rpcsvc - * rpcgen -h -C -DWANT_NFS3 mount.x - * rpcgen -h -C -DWANT_NFS3 nfs_prot.x - * If you don't want NFSv3, then you will have to turn off the NFSMNT_NFSV3 - * macro below. If the code doesn't compile, upgrade to the latest 3.0 - * version... - */ #ifdef NFSMNT_NFSV3 # define MOUNT_NFS3 "nfs" /* is this right? */ # define MNTOPT_NFS3 "nfs" -/* - * as of 3.0-RELEASE the nfs_fh3 that is defined in the system headers - * (or the one generated by rpcgen) lacks the proper full definition, - * listed below. A special macro (m4/macros/struct_nfs_fh3.m4) searches - * for this special name before other names. - */ - -#define NFS3_FHSIZE 64 -#define FHSIZE3 64 - -struct nfs_fh3_freebsd3 { - u_int fh3_length; - union nfs_fh3_u { - struct nfs_fh3_i { - fhandle_t fh3_i; - } nfs_fh3_i; - char data[NFS3_FHSIZE]; - } fh3_u; -}; -typedef struct nfs_fh3_freebsd3 nfs_fh3; - #endif /* NFSMNT_NFSV3 */ #endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_default.h b/conf/nfs_prot/nfs_prot_default.h new file mode 100644 index 00000000000..c5f047d99bf --- /dev/null +++ b/conf/nfs_prot/nfs_prot_default.h @@ -0,0 +1,166 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_default.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ + + +/* + * MACROS: + */ +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + + +/* + * TYPEDEFS: + */ +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropokres nfsdiropokres; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readokres nfsreadokres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattr nfssattr; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_freebsd2.h b/conf/nfs_prot/nfs_prot_freebsd2.h index cf7ba33ee47..73661c9da3d 100644 --- a/conf/nfs_prot/nfs_prot_freebsd2.h +++ b/conf/nfs_prot/nfs_prot_freebsd2.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -139,7 +135,7 @@ typedef writeargs nfswriteargs; */ #if 0 #define MOUNT_NFS3 MOUNT_NFS -#endif +#endif /* 0 */ #endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_freebsd3.h b/conf/nfs_prot/nfs_prot_freebsd3.h index edcc57540fe..51ac31d2aec 100644 --- a/conf/nfs_prot/nfs_prot_freebsd3.h +++ b/conf/nfs_prot/nfs_prot_freebsd3.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/conf/nfs_prot/nfs_prot_hpux.h b/conf/nfs_prot/nfs_prot_hpux.h new file mode 100644 index 00000000000..9d64360afb5 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_hpux.h @@ -0,0 +1,398 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_hpux.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_NFS_EXPORT_H_not +/* don't include this b/c it'll get included twice */ +# include +#endif /* HAVE_NFS_EXPORT_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + +#ifdef HAVE_NETDB_H +extern int h_errno; /* missing from older hpux10 systems */ +#endif /* HAVE_NETDB_H */ + + +/* + * Turn off NFS V.3 support to avoid confusing am-utils. + * 10.20 with some patches has incomplete support. + */ +#undef MNTTYPE_NFS3 +#undef MNTTAB_TYPE_NFS3 +#undef HAVE_FS_NFS3 + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* map field names */ +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +#ifndef HAVE_FHANDLE +typedef fhandle_t fhandle; +#endif /* not HAVE_FHANDLE */ +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fattr nfsfattr; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct linkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_getattr_2_svc(fhandle_t *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(fhandle_t *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(fhandle_t *, struct svc_req *); + +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_nfs_fh(XDR *, fhandle_t*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); + + +/* + * STRUCTURES: + */ + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + fhandle_t sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + fhandle_t da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + fhandle_t drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + fhandle_t ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + fhandle_t wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + fhandle_t la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + fhandle_t rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_hpux11.h b/conf/nfs_prot/nfs_prot_hpux11.h new file mode 100644 index 00000000000..0dd0286c638 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_hpux11.h @@ -0,0 +1,595 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_hpux11.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +/* + * NOTE: HPUX 11 is missing many header definitions which had to be + * guessed and copied over from HPUX 10.20. + */ + +/* don't include this file as it isn't needed on hpux */ +#ifndef _TIUSER_H +# define _TIUSER_H +#endif /* TIUSER_H */ +#ifndef _TIUSER_INCLUDED +# define _TIUSER_INCLUDED +#endif /* TIUSER_INCLUDED */ +#ifndef _SYS_TIUSER_INCLUDED +# define _SYS_TIUSER_INCLUDED +#endif /* _SYS_TIUSER_INCLUDED */ +/* if T_NULL is defined, undefine it due to a conflict with */ +#ifdef T_NULL +# undef T_NULL +#endif /* T_NULL */ + +#ifdef HAVE_NFS_EXPORT_H_not +/* don't include this b/c it'll get included twice */ +# include +#endif /* HAVE_NFS_EXPORT_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 +#define HOSTNAMESZ 32 /* Max size of hostname in struct nfs_args */ + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* + * NFS mount option flags + */ +#define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */ +#define NFSMNT_WSIZE 0x002 /* set write size */ +#define NFSMNT_RSIZE 0x004 /* set read size */ +#define NFSMNT_TIMEO 0x008 /* set initial timeout */ +#define NFSMNT_RETRANS 0x010 /* set number of request retries */ +#define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */ +#define NFSMNT_INT 0x040 /* allow interrupts on hard mount */ +#define NFSMNT_NOAC 0x080 /* don't cache attributes */ +#define NFSMNT_ACREGMIN 0x0100 /* set min secs for file attr cache */ +#define NFSMNT_ACREGMAX 0x0200 /* set max secs for file attr cache */ +#define NFSMNT_ACDIRMIN 0x0400 /* set min secs for dir attr cache */ +#define NFSMNT_ACDIRMAX 0x0800 /* set max secs for dir attr cache */ +#define NFSMNT_SECURE 0x1000 /* secure mount */ +#define NFSMNT_NOCTO 0x2000 /* no close-to-open consistency */ +#define NFSMNT_KNCONF 0x4000 /* transport's knetconfig structure */ +#define NFSMNT_GRPID 0x8000 /* System V-style gid inheritance */ +#define NFSMNT_RPCTIMESYNC 0x10000 /* use RPC to do secure NFS time sync */ +#define NFSMNT_KERBEROS 0x20000 /* use kerberos credentials */ +#define NFSMNT_POSIX 0x40000 /* static pathconf kludge info */ +#define NFSMNT_LLOCK 0x80000 /* Local locking (no lock manager) */ +#define NFSMNT_REMOUNT 0x100000 /* Remount from r/o to r/w */ + +#define NFSMNT_FSNAME 0x1000000 /* FS name e.g. "host:/path/" */ +#define NFSMNT_NODEVS 0x2000000 /* no devices access (default on) */ +#define NFSMNT_IGNORE 0x4000000 /* ignore in mnttab */ + +#define MS_FSS 0x00 /* fake flag to do nothing */ + +/* + * ENUMS: + */ + +/* + * Error status + * Should include all possible net errors. + * For now we just cast errno into an enum nfsstat. + */ +enum nfsstat { + NFS_OK = 0, /* no error */ + NFSERR_PERM = 1, /* Not owner */ + NFSERR_NOENT = 2, /* No such file or directory */ + NFSERR_IO = 5, /* I/O error */ + NFSERR_NXIO = 6, /* No such device or address */ + NFSERR_ACCES = 13, /* Permission denied */ + NFSERR_EXIST = 17, /* File exists */ + NFSERR_XDEV = 18, /* Cross-device link */ + NFSERR_NODEV = 19, /* No such device */ + NFSERR_NOTDIR = 20, /* Not a directory */ + NFSERR_ISDIR = 21, /* Is a directory */ + NFSERR_INVAL = 22, /* Invalid argument */ + NFSERR_FBIG = 27, /* File too large */ + NFSERR_NOSPC = 28, /* No space left on device */ + NFSERR_ROFS = 30, /* Read-only file system */ + NFSERR_OPNOTSUPP = 45, /* Operation not supported */ + NFSERR_NAMETOOLONG = 63, /* File name too long */ + NFSERR_NOTEMPTY = 66, /* Directory not empty */ + NFSERR_DQUOT = 69, /* Disc quota exceeded */ + NFSERR_STALE = 70, /* Stale NFS file handle */ + NFSERR_REMOTE = 71, /* Object is remote */ + NFSERR_WFLUSH /* write cache flushed */ +}; + +/* + * File types + */ +enum nfsftype { + NFNON, + NFREG, /* regular file */ + NFDIR, /* directory */ + NFBLK, /* block special */ + NFCHR, /* character special */ + NFLNK, /* symbolic link */ + NFSOC /* socket */ +}; + + +/* + * TYPEDEFS: + */ +typedef struct nfs_fh nfs_fh; +typedef char *filename; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct fattr nfsfattr; +typedef struct linkargs nfslinkargs; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + +/* + * NFSv3 handle (copied from am_xdr_func.h, because it is needed here) + * we use a different name but same storage size/alignment to avoid + * conflicts. Sigh, this is so hacky. -ezk + */ +#define HPUX11_FHSIZE3 64 /* size in bytes of a file handle (v3) */ +struct hpux11_nfs_fh3 { + u_int am_fh3_length; + char am_fh3_data[HPUX11_FHSIZE3]; +}; +typedef struct hpux11_nfs_fh3 hpux11_nfs_fh3; + +/* + * EXTERNALS: + */ + +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); + +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); + +/* + * STRUCTURES: + */ + +/* This is similar to Solaris 2.5.1 */ +struct nfs_args { + struct netbuf *addr; /* file server address */ + struct netbuf *syncaddr; /* secure NFS time sync addr */ + struct knetconfig *knconf; /* transport netconfig struct */ + char *hostname; /* server's hostname */ + char *netname; /* server's netname */ + caddr_t fh; /* File handle to be mounted */ + int flags; /* flags */ + int wsize; /* write size in bytes */ + int rsize; /* read size in bytes */ + int timeo; /* initial timeout in .1 secs */ + int retrans; /* times to retry send */ + int acregmin; /* attr cache file min secs */ + int acregmax; /* attr cache file max secs */ + int acdirmin; /* attr cache dir min secs */ + int acdirmax; /* attr cache dir max secs */ + char *fsname; /* F/S name */ +#if 0 + struct pathcnf *pathconf; /* static pathconf kludge */ +#endif /* 0 */ +}; + +struct nfs_fh { + char fh_data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfs_fh sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfs_fh da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfs_fh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfs_fh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfs_fh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfs_fh la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfs_fh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +/* + ************************************************************************** + * HP-UX 11 has Autofs support, but we don't support it yet. + * For now, undefine it or define dummy entries. + ************************************************************************** + */ +#ifdef MNTTYPE_AUTOFS +# undef MNTTYPE_AUTOFS +#endif /* MNTTYPE_AUTOFS */ +#ifdef MNTTAB_TYPE_AUTOFS +# undef MNTTAB_TYPE_AUTOFS +#endif /* MNTTAB_TYPE_AUTOFS */ +#ifdef HAVE_FS_AUTOFS +# undef HAVE_FS_AUTOFS +#endif /* HAVE_FS_AUTOFS */ + +#ifdef MNTTYPE_NFS3 + +#define NFSPROC3_LOOKUP ((u_long) 3) +enum nfsstat3 { + NFS3_OK = 0, + NFS3ERR_PERM = 1, + NFS3ERR_NOENT = 2, + NFS3ERR_IO = 5, + NFS3ERR_NXIO = 6, + NFS3ERR_ACCES = 13, + NFS3ERR_EXIST = 17, + NFS3ERR_XDEV = 18, + NFS3ERR_NODEV = 19, + NFS3ERR_NOTDIR = 20, + NFS3ERR_ISDIR = 21, + NFS3ERR_INVAL = 22, + NFS3ERR_FBIG = 27, + NFS3ERR_NOSPC = 28, + NFS3ERR_ROFS = 30, + NFS3ERR_MLINK = 31, + NFS3ERR_NAMETOOLONG = 63, + NFS3ERR_NOTEMPTY = 66, + NFS3ERR_DQUOT = 69, + NFS3ERR_STALE = 70, + NFS3ERR_REMOTE = 71, + NFS3ERR_BADHANDLE = 10001, + NFS3ERR_NOT_SYNC = 10002, + NFS3ERR_BAD_COOKIE = 10003, + NFS3ERR_NOTSUPP = 10004, + NFS3ERR_TOOSMALL = 10005, + NFS3ERR_SERVERFAULT = 10006, + NFS3ERR_BADTYPE = 10007, + NFS3ERR_JUKEBOX = 10008 +}; +typedef enum nfsstat3 nfsstat3; + +typedef char *filename3; + +struct diropargs3 { + hpux11_nfs_fh3 dir; + filename3 name; +}; +typedef struct diropargs3 diropargs3; + +struct LOOKUP3args { + diropargs3 what; +}; +typedef struct LOOKUP3args LOOKUP3args; + +struct LOOKUP3resok { + hpux11_nfs_fh3 object; +#if 0 + post_op_attr obj_attributes; + post_op_attr dir_attributes; +#endif /* 0 */ +}; +typedef struct LOOKUP3resok LOOKUP3resok; + +struct LOOKUP3resfail { + int dummy; +#if 0 + post_op_attr dir_attributes; +#endif /* 0 */ +}; +typedef struct LOOKUP3resfail LOOKUP3resfail; + +struct LOOKUP3res { + nfsstat3 status; + union { + LOOKUP3resok ok; + LOOKUP3resfail fail; + } res_u; +}; +typedef struct LOOKUP3res LOOKUP3res; + +# endif /* MNTTYPE_NFS3 */ + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_irix5.h b/conf/nfs_prot/nfs_prot_irix5.h new file mode 100644 index 00000000000..de4312a4d40 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_irix5.h @@ -0,0 +1,450 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_irix5.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +#ifdef HAVE_SYS_UIO_H +# define _KMEMUSER +# include +# undef _KMEMUSER +#endif /* HAVE_SYS_UIO_H */ +#ifdef HAVE_SYS_VNODE_H +# include +#endif /* HAVE_SYS_VNODE_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ + +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ +#ifdef HAVE_SYS_FSTYP_H +# include +#endif /* HAVE_SYS_FSTYP_H */ + +/* XFS isn't really supported in 5.3, but the header files are confusing */ +#undef MNTTYPE_XFS +#undef MNTTAB_TYPE_XFS + +/****************************************************************************/ +/* + * NFS V3 SUPPORT: + * + * IRIX5.3 requires the fh_len field to be added to the struct nfs_args + * defined in for NFS3 mounts (it doesn't hurt for + * NFS2 mounts). The mount syscall however always expects the argument + * structure size to be sizeof(struct nfs_args). + * So we need to use an extended struct nfs_args in amd/ops_nfs.c, + * while using the original struct nfs_arg in libamu/mountutil.c. + * -- stolcke 7/4/97 + */ + +/* + * NFS arguments to the mount system call. + */ +struct irix5_nfs_args { + struct sockaddr_in *addr; /* file server address */ + fhandle_t *fh; /* File handle to be mounted */ + int flags; /* flags */ + u_int wsize; /* write size in bytes */ + u_int rsize; /* read size in bytes */ + u_int timeo; /* initial timeout in .1 secs */ + u_int retrans; /* times to retry send */ + char *hostname; /* server's name */ + u_int acregmin; /* attr cache file min secs */ + u_int acregmax; /* attr cache file max secs */ + u_int acdirmin; /* attr cache dir min secs */ + u_int acdirmax; /* attr cache dir max secs */ + u_int symttl; /* symlink cache time-to-live */ + char base[FSTYPSZ]; /* base type for statvfs */ + u_int namemax; /* name length for statvfs */ + u_int fh_len; /* length for a v3 filehandle */ +}; + +#ifndef MNTOPT_PROTO +# define MNTOPT_PROTO "proto" +#endif /* not MNTOPT_PROTO */ +#ifndef MNTOPT_VERS +# define MNTOPT_VERS "vers" +#endif /* not MNTOPT_VERS */ + +/****************************************************************************/ + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#ifndef FHSIZE +/* Irix 5.2 is missing the definition for FHSIZE */ +# define FHSIZE NFS_FHSIZE +#endif /* not FHSIZE */ +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* map field names */ +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fattr nfsfattr; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct linkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct nfs_fh nfs_fh; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); + +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); + + +/* + * STRUCTURES: + */ + +struct nfs_fh { + char fh_data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfs_fh sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfs_fh da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfs_fh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfs_fh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfs_fh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfs_fh la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfs_fh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_irix6.h b/conf/nfs_prot/nfs_prot_irix6.h new file mode 100644 index 00000000000..159dfe7ad6f --- /dev/null +++ b/conf/nfs_prot/nfs_prot_irix6.h @@ -0,0 +1,496 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_irix6.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ + +#ifdef HAVE_RPCSVC_MOUNT_H_off +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + +/* evil: don't include */ +#undef HAVE_RPCSVC_MOUNT_H + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 +#define FHSIZE 32 + +#define MOUNTPROG 100005 +#define MOUNTPROC_MNT 1 +#define MOUNTPROC_DUMP 2 +#define MOUNTPROC_UMNT 3 +#define MOUNTPROC_UMNTALL 4 +#define MOUNTPROC_EXPORT 5 +#define MOUNTPROC_EXPORTALL 6 +#define MOUNTVERS_ORIG 1 +#define MOUNTVERS 1 +#define MOUNTVERS3 3 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* map field names */ +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name + +/* + * Irix 6.2 does not define the proto/dev options, although they + * do support them for NFS V3. + */ +#ifdef MNTTYPE_NFS3 +# ifndef MNTOPT_PROTO +# define MNTOPT_PROTO "proto" +# endif /* not MNTOPT_PROTO */ +# ifndef MNTOPT_VERS +# define MNTOPT_VERS "vers" +# endif /* not MNTOPT_VERS */ +#endif /* MNTTYPE_NFS3 */ + +#define AUTOFS_CONFTYPE "udp" + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fattr nfsfattr; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct linkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct nfs_fh nfs_fh; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); + +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); + + +/* + * STRUCTURES: + */ + +struct nfs_fh { + char fh_data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfs_fh sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfs_fh da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfs_fh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfs_fh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfs_fh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfs_fh la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfs_fh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + + +/* + * Partial definitions from rpcsvc/mount.h (can't use that header + * because it includes other "bad" stuff wrt xdr_groups. + */ + +struct mountlist { + char *ml_name; + char *ml_path; + struct mountlist *ml_nxt; +}; + +struct fhstatus { + int fhs_status; + fhandle_t fhs_fh; +}; + +typedef char fhandle[FHSIZE]; + +typedef struct { + u_int fhandle3_len; + char *fhandle3_val; +} fhandle3; + +enum mountstat3 { + MNT_OK = 0, + MNT3ERR_PERM = 1, + MNT3ERR_NOENT = 2, + MNT3ERR_IO = 5, + MNT3ERR_ACCES = 13, + MNT3ERR_NOTDIR = 20, + MNT3ERR_INVAL = 22, + MNT3ERR_NAMETOOLONG = 63, + MNT3ERR_NOTSUPP = 10004, + MNT3ERR_SERVERFAULT = 10006 +}; +typedef enum mountstat3 mountstat3; + +struct mountres3_ok { + fhandle3 fhandle; + struct { + u_int auth_flavors_len; + int *auth_flavors_val; + } auth_flavors; +}; +typedef struct mountres3_ok mountres3_ok; + +struct mountres3 { + mountstat3 fhs_status; + union { + mountres3_ok mountinfo; + } mountres3_u; +}; +typedef struct mountres3 mountres3; + +/* + * List of exported directories + * An export entry with ex_groups + * NULL indicates an entry which is exported to the world. + */ +struct exports { + dev_t ex_dev; /* dev of directory */ + char *ex_name; /* name of directory */ + struct groups *ex_groups; /* groups allowed to mount this entry */ + struct exports *ex_next; + short ex_rootmap; /* id to map root requests to */ + short ex_flags; /* bits to mask off file mode */ +}; + +struct groups { + char *g_name; + struct groups *g_next; +}; + +extern bool_t xdr_groups(XDR *, groups *); +extern bool_t xdr_exports(XDR *, struct exports **); +extern bool_t xdr_mountres3_ok(XDR *, mountres3_ok *); +extern bool_t xdr_mountres3(XDR *, mountres3 *); +extern bool_t xdr_fhstatus(XDR *, struct fhstatus *); +extern bool_t xdr_mountlist(XDR *, struct mountlist **); + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_linux.h b/conf/nfs_prot/nfs_prot_linux.h new file mode 100644 index 00000000000..7ccf18f0020 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_linux.h @@ -0,0 +1,334 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_linux.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ + +/* + * Hard-code support for some file systems so the built amd + * binary can always run them. Also, this helps detection of iso9660 + * file system for which the module isn't named as the file system mount + * name. + */ +#include +#ifndef KERNEL_VERSION +# define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) +#endif /* not KERNEL_VERSION */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) +# ifndef MS_BIND +# define MS_BIND 4096 +# endif /* not MS_BIND */ + +# ifndef MNTTYPE_LOFS +# define MNTTYPE_LOFS "bind" +# endif /* not MNTTYPE_LOFS */ +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) */ + +#ifndef MNTTYPE_ISO9660 +# define MNTTYPE_ISO9660 "iso9660" +#endif /* not MNTTYPE_ISO9660 */ + +#ifndef FHSIZE +# define FHSIZE 32 +#endif /* not FHSIZE */ +#ifndef FHSIZE3 +# define FHSIZE3 64 +#endif /* not FHSIZE3 */ + +#ifdef HAVE_FS_NFS3 +#ifndef MNTTYPE_NFS3 +# define MNTTYPE_NFS3 "nfs" +#endif /* not MNTTYPE_NFS3 */ +#endif /* HAVE_FS_NFS3 */ + +/* + * These two force/lazy unmount flags are sometimes missing from some linux + * systems' headers. + */ +#ifdef HAVE_UMOUNT2 +# ifndef MNT_FORCE +# define MNT_FORCE 0x1 /* from */ +# endif /* not MNT_FORCE */ +# ifndef MNT_DETACH +# define MNT_DETACH 0x2 /* from kernel */ +# endif /* not MNT_DETACH */ +#endif /* HAVE_UMOUNT2 */ + +/* XXX: hack until we have a better way to detect /dev/loop devices */ +#ifdef HAVE_LINUX_LOOP_H +# define HAVE_LOOP_DEVICE +extern char *setup_loop_device(const char *file); +extern int delete_loop_device(const char *device); +#endif /* HAVE_LINUX_LOOP_H */ + + +/* + * MACROS: + */ +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define fhsize root.size +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + + +/* + * TYPEDEFS: + */ +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropokres nfsdiropokres; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readokres nfsreadokres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattr nfssattr; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + +/* Autofs trick */ +typedef int autofs_args_t; + +/* + * We use our own definitions here, because the definitions in the + * kernel change the API (though not the ABI) *way* too often. + */ +#undef nfs_args_t +struct nfs2_fh { + char data[FHSIZE]; +}; + +struct nfs3_fh { + u_short size; + u_char data[FHSIZE3]; +}; + +struct nfs_args { + int version; /* 1 */ + int fd; /* 1 */ + struct nfs2_fh old_root; /* 1 */ + int flags; /* 1 */ + int rsize; /* 1 */ + int wsize; /* 1 */ + int timeo; /* 1 */ + int retrans; /* 1 */ + int acregmin; /* 1 */ + int acregmax; /* 1 */ + int acdirmin; /* 1 */ + int acdirmax; /* 1 */ + struct sockaddr_in addr; /* 1 */ + char hostname[256]; /* 1 */ + int namlen; /* 2 */ + unsigned int bsize; /* 3 */ + struct nfs3_fh root; /* 4 */ + int pseudoflavor; /* 5 */ + char context[256 + 1];/* 6 */ +}; +typedef struct nfs_args nfs_args_t; + +#define NFS4_MOUNT_VERSION 1 + +struct nfs_string { + unsigned int len; + char *data; +}; + +struct nfs4_args { + int version; /* 1 */ + int flags; /* 1 */ + int rsize; /* 1 */ + int wsize; /* 1 */ + int timeo; /* 1 */ + int retrans; /* 1 */ + int acregmin; /* 1 */ + int acregmax; /* 1 */ + int acdirmin; /* 1 */ + int acdirmax; /* 1 */ + struct nfs_string client_addr; /* 1 */ + struct nfs_string mnt_path; /* 1 */ + struct nfs_string hostname; /* 1 */ + unsigned int host_addrlen; /* 1 */ + struct sockaddr *host_addr; /* 1 */ + int proto; /* 1 */ + int auth_flavourlen;/* 1 */ + int *auth_flavours; /* 1 */ +}; + +typedef struct nfs4_args nfs4_args_t; + +/* HACK: these are not defined on Linux but we still need them + * internally. We have to be able to differentiate between having a + * timeout value set to zero and not having the option at all. These + * flags are masked off before passing the nfs_args structure to + * mount2() */ + +#define MNT2_NFS_OPT_ACREGMIN 0x10000 +#define MNT2_NFS_OPT_ACREGMAX 0x20000 +#define MNT2_NFS_OPT_ACDIRMIN 0x40000 +#define MNT2_NFS_OPT_ACDIRMAX 0x80000 +#define MNT2_NFS_OPT_FLAGMASK 0xFFFF + +/* + * Missing definitions on redhat alpha linux + */ +#ifdef _SELECTBITS_H +# ifndef __FD_ZERO +/* This line MUST be split! Otherwise m4 will not change it. */ +# define __FD_ZERO(set) \ + ((void) memset ((__ptr_t) (set), 0, sizeof(fd_set))) +# endif /* not __FD_ZERO */ +# ifndef __FD_SET +# define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) +# endif /* not __FD_SET */ +# ifndef __FD_CLR +# define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) +# endif /* not __FD_CLR */ +# ifndef __FD_ISSET +# define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) +# endif /* not __FD_ISSET */ + +#endif /* _SELECTBITS_H */ + +/* turn off this (b/c of hlfsd) */ +#undef HAVE_RPC_AUTH_DES_H + +extern int linux_version_code(); +/* use a private mapper from errno's to NFS errors */ +extern int linux_nfs_error(int e); +#define nfs_error(e) linux_nfs_error(e) + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_ncr2.h b/conf/nfs_prot/nfs_prot_ncr2.h new file mode 100644 index 00000000000..7e64f5c692d --- /dev/null +++ b/conf/nfs_prot/nfs_prot_ncr2.h @@ -0,0 +1,476 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_ncr2.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +/* + * Do NOT include to get NFS V2 specs, because + * it will result in conflicts with . The latter is a must + * for NFS V3 specs. + */ + +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ + +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ + + +/* + * MACROS + */ + +/* ncr2 does not define this one! Incredible */ +#ifndef MNTTYPE_NFS +# define MNTTYPE_NFS "nfs" +#endif /* MNTTYPE_NFS */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#define NFSPROC_NULL ((unsigned long)(0)) +#define NFSPROC_GETATTR ((unsigned long)(1)) +#define NFSPROC_SETATTR ((unsigned long)(2)) +#define NFSPROC_ROOT ((unsigned long)(3)) +#define NFSPROC_LOOKUP ((unsigned long)(4)) +#define NFSPROC_READLINK ((unsigned long)(5)) +#define NFSPROC_READ ((unsigned long)(6)) +#define NFSPROC_WRITECACHE ((unsigned long)(7)) +#define NFSPROC_WRITE ((unsigned long)(8)) +#define NFSPROC_CREATE ((unsigned long)(9)) +#define NFSPROC_REMOVE ((unsigned long)(10)) +#define NFSPROC_RENAME ((unsigned long)(11)) +#define NFSPROC_LINK ((unsigned long)(12)) +#define NFSPROC_SYMLINK ((unsigned long)(13)) +#define NFSPROC_MKDIR ((unsigned long)(14)) +#define NFSPROC_RMDIR ((unsigned long)(15)) +#define NFSPROC_READDIR ((unsigned long)(16)) +#define NFSPROC_STATFS ((unsigned long)(17)) + +/* map field names */ +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct fattr nfsfattr; +typedef struct linkargs nfslinkargs; +typedef struct nfs_fh nfs_fh; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + +typedef char *name; +typedef fhandle_t fhandle; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; + + +/* + * EXTERNALS: + */ + +extern bool_t xdr_nfsstat(XDR *, nfsstat *); +extern bool_t xdr_ftype(XDR *, nfsftype *); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh *); +extern bool_t xdr_nfstime(XDR *, nfstime *); +extern bool_t xdr_fattr(XDR *, nfsfattr *); +extern bool_t xdr_sattr(XDR *, nfssattr *); +extern bool_t xdr_filename(XDR *, filename *); +extern bool_t xdr_nfspath(XDR *, nfspath *); +extern bool_t xdr_attrstat(XDR *, nfsattrstat *); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs *); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs *); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres *); +extern bool_t xdr_diropres(XDR *, nfsdiropres *); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres *); +extern bool_t xdr_readargs(XDR *, nfsreadargs *); +extern bool_t xdr_readokres(XDR *, nfsreadokres *); +extern bool_t xdr_readres(XDR *, nfsreadres *); +extern bool_t xdr_writeargs(XDR *, nfswriteargs *); +extern bool_t xdr_createargs(XDR *, nfscreateargs *); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs *); +extern bool_t xdr_linkargs(XDR *, nfslinkargs *); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs *); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs *); +extern bool_t xdr_entry(XDR *, nfsentry *); +extern bool_t xdr_dirlist(XDR *, nfsdirlist *); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres *); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres *); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres *); + +extern nfsattrstat *nfsproc_getattr_2(nfs_fh *, CLIENT *); +extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2(nfssattrargs *, CLIENT *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2(nfswriteargs *, CLIENT *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2(nfsdiropargs *, CLIENT *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2(nfslinkargs *, CLIENT *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2(nfsrenameargs *, CLIENT *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2(nfssymlinkargs *, CLIENT *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2(nfsreaddirargs *, CLIENT *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2(nfs_fh *, CLIENT *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2(nfsreadargs *, CLIENT *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2(nfs_fh *, CLIENT *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); +extern void *nfsproc_null_2(void *, CLIENT *); +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern void *nfsproc_root_2(void *, CLIENT *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern void *nfsproc_writecache_2(void *, CLIENT *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern int nfs_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); + + +/* + * ENUMS: + */ + + +/* + * STRUCTURES: + */ +/* ncr2 (sysv4) forgets to include this in */ +struct rusage { + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ + long ru_maxrss; /* XXX: 0 */ + long ru_ixrss; /* XXX: 0 */ + long ru_idrss; /* XXX: sum of rm_asrss */ + long ru_isrss; /* XXX: 0 */ + long ru_minflt; /* any page faults not requiring I/O */ + long ru_majflt; /* any page faults requiring I/O */ + long ru_nswap; /* swaps */ + long ru_inblock; /* block input operations */ + long ru_oublock; /* block output operations */ + long ru_msgsnd; /* messages sent */ + long ru_msgrcv; /* messages received */ + long ru_nsignals; /* signals received */ + long ru_nvcsw; /* voluntary context switches */ + long ru_nivcsw; /* involuntary " */ +}; + +/* + * ncr2 has ndbm functions, but no + * only a partial + */ +#define PBLKSIZ 1024 +#define DBLKSIZ 4096 +typedef struct { + int dbm_dirf; /* open directory file */ + int dbm_pagf; /* open page file */ + int dbm_flags; /* flags, see below */ + long dbm_maxbno; /* last ``bit'' in dir file */ + long dbm_bitno; /* current bit number */ + long dbm_hmask; /* hash mask */ + long dbm_blkptr; /* current block for dbm_nextkey */ + int dbm_keyptr; /* current key for dbm_nextkey */ + long dbm_blkno; /* current page to read/write */ + long dbm_pagbno; /* current page in pagbuf */ + char dbm_pagbuf[PBLKSIZ]; /* page file block buffer */ + long dbm_dirbno; /* current block in dirbuf */ + char dbm_dirbuf[DBLKSIZ]; /* directory file block buffer */ +} DBM; +#define _DBM_RDONLY 0x1 /* data base open read-only */ +#define _DBM_IOERR 0x2 /* data base I/O error */ +#define dbm_rdonly(db) ((db)->dbm_flags & _DBM_RDONLY) +#define dbm_error(db) ((db)->dbm_flags & _DBM_IOERR) + /* use this one at your own risk! */ +#define dbm_clearerr(db) ((db)->dbm_flags &= ~_DBM_IOERR) +/* for fstat(2) */ +#define dbm_dirfno(db) ((db)->dbm_dirf) +#define dbm_pagfno(db) ((db)->dbm_pagf) +/* + * flags to dbm_store() + */ +#define DBM_INSERT 0 +#define DBM_REPLACE 1 +extern DBM *dbm_open(char *, int, int); +extern void dbm_close(DBM *); +#ifndef DATUM +typedef struct { + char *dptr; + int dsize; +} datum; +# define DATUM +#endif /* not DATUM */ +extern datum dbm_fetch(DBM *, datum); +extern datum dbm_firstkey(DBM *); +extern datum dbm_nextkey(DBM *); +extern int dbm_delete(DBM *, datum); +extern int dbm_store(DBM *, datum, datum, int); + + +struct nfs_fh { + char fh_data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfs_fh sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfs_fh da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfs_fh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfs_fh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfs_fh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfs_fh la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfs_fh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_netbsd.h b/conf/nfs_prot/nfs_prot_netbsd.h new file mode 100644 index 00000000000..c134240a54d --- /dev/null +++ b/conf/nfs_prot/nfs_prot_netbsd.h @@ -0,0 +1,165 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_netbsd.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ + +#ifndef NFS_NPROCS +# define NFS_NPROCS 26 +#endif /* not NFS_NPROCS */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ + +/* NON-NFS STUFF (doesn't really belong here) */ +#ifndef DEFINED_YPALL_CALLBACK_FXN_T +# define DEFINED_YPALL_CALLBACK_FXN_T +/* this is RIGHT for 1.2G and 1.2.1 */ +typedef int (*ypall_callback_fxn_t)(u_long, char *, int, char *, int, void *); +#if 0 +/* this is right for 1.3beta */ +typedef int (*ypall_callback_fxn_t)(int, char *, int, char *, int, char *); +#endif /* 0 */ +#endif /* DEFINED_YPALL_CALLBACK_FXN_T */ + + +/* + * MACROS: + */ +#define dr_drok_u diropres +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_size size +#define na_type type +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_status status +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_from from +#define wra_fhandle file + + +/* + * TYPEDEFS: + */ +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + + +/* + * + * NetBSD 1.2 has NFS V3, but it is undefined in the header files. + * so I define everything that's needed for NFS V3 here. + */ +#ifdef NFSMNT_NFSV3 + +# define MOUNT_NFS3 MOUNT_NFS +# define MNTOPT_NFS3 "nfs" + +#endif /* NFSMNT_NFSV3 */ + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_netbsd1_3.h b/conf/nfs_prot/nfs_prot_netbsd1_3.h new file mode 100644 index 00000000000..7fbd3a7a4fb --- /dev/null +++ b/conf/nfs_prot/nfs_prot_netbsd1_3.h @@ -0,0 +1,154 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_netbsd1_3.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ + +/* NON-NFS STUFF (doesn't really belong here) */ +#ifndef DEFINED_YPALL_CALLBACK_FXN_T +# define DEFINED_YPALL_CALLBACK_FXN_T +#if 0 +/* this is RIGHT for 1.2G and 1.2.1 */ +typedef int (*ypall_callback_fxn_t)(u_long, char *, int, char *, int, void *); +#endif /* 0 */ +/* this is right for 1.3beta and newer */ +typedef int (*ypall_callback_fxn_t)(int, char *, int, char *, int, char *); +#endif /* DEFINED_YPALL_CALLBACK_FXN_T */ + + +/* + * MACROS: + */ +#define dr_drok_u diropres +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_size size +#define na_type type +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_status status +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_from from +#define wra_fhandle file + + +/* + * TYPEDEFS: + */ +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + +/* + * + * NetBSD 1.2 has NFS V3, but it is undefined in the header files. + * so I define everything that's needed for NFS V3 here. + */ +#ifdef NFSMNT_NFSV3 + +# define MOUNT_NFS3 MOUNT_NFS +# define MNTOPT_NFS3 "nfs" + +#endif /* NFSMNT_NFSV3 */ + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_netbsd1_4.h b/conf/nfs_prot/nfs_prot_netbsd1_4.h new file mode 100644 index 00000000000..c52c75e2cf9 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_netbsd1_4.h @@ -0,0 +1,180 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_netbsd1_4.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifndef NFS_NPROCS +# define NFS_NPROCS 26 +#endif /* not NFS_NPROCS */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +#ifdef HAVE_NFS_NFSMOUNT_H +# include +#endif /* HAVE_NFS_NFSMOUNT_H */ + +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ + +/* NON-NFS STUFF (doesn't really belong here) */ +#ifndef DEFINED_YPALL_CALLBACK_FXN_T +# define DEFINED_YPALL_CALLBACK_FXN_T +#if 0 +/* this is RIGHT for 1.2G and 1.2.1 */ +typedef int (*ypall_callback_fxn_t)(u_long, char *, int, char *, int, void *); +#endif /* 0 */ +/* this is right for 1.3beta and newer */ +typedef int (*ypall_callback_fxn_t)(int, char *, int, char *, int, char *); +#endif /* DEFINED_YPALL_CALLBACK_FXN_T */ + +#ifdef HAVE_STATVFS +# define statfs statvfs +#endif /* HAVE_STATVFS */ + +/* + * MACROS: + */ +#define dr_drok_u diropres +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_uid uid +#define na_type type +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_status status +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_from from +#define wra_fhandle file + + +/* + * TYPEDEFS: + */ +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + +/* + * + * NetBSD 1.2 has NFS V3, but it is undefined in the header files. + * so I define everything that's needed for NFS V3 here. + */ +#ifdef NFSMNT_NFSV3 + +# define MOUNT_NFS3 MOUNT_NFS +# define MNTOPT_NFS3 "nfs" + +#endif /* NFSMNT_NFSV3 */ + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_nextstep.h b/conf/nfs_prot/nfs_prot_nextstep.h new file mode 100644 index 00000000000..fadc004cedf --- /dev/null +++ b/conf/nfs_prot/nfs_prot_nextstep.h @@ -0,0 +1,595 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_nextstep.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_BSD_RPC_RPC_H +# include +#endif /* HAVE_BSD_RPC_RPC_H */ +#ifdef HAVE_SYS_STAT_H +# include +#endif /* HAVE_SYS_STAT_H */ + +/* + * odd problems happen during configuration and nextstep's /bin/cc + * gets strange errors from /bin/sh. I suspect it may be a conflict + * over some memory, a bad /bin/cc, or even kernel bug. + * this is what I get, as a result of running cc inside configure: + * /bin/cc -o conftest -g -O2 -D_POSIX_SOURCE conftest.c -lrpcsvc + * configure:2294: illegal external declaration, found `#' + * configure:2388: illegal file name 'AMU_NFS_PROTOCOL_HEADER' + * configure:2416: illegal external declaration, found `{' + * I have no explanation for it... -Erez + * Solution: don't use /bin/cc, but gcc 2.7.2.1 or better! + */ + +#if 0 +/* cannot include this file b/c it refers to non-existing headers */ +# include +#endif /* 0 */ + + +/* + * MACROS: + */ + +/* ugly: fix up nextstep's nfs mount type */ +#ifdef MOUNT_TYPE_NFS___off_no_longer_needed +# undef MOUNT_TYPE_UFS +# define MOUNT_TYPE_UFS MOUNT_UFS +# undef MOUNT_TYPE_NFS +# define MOUNT_TYPE_NFS MOUNT_NFS +# undef MOUNT_TYPE_PCFS +# define MOUNT_TYPE_PCFS MOUNT_PC +# undef MOUNT_TYPE_LOFS +# define MOUNT_TYPE_LOFS MOUNT_LO +# undef MOUNT_TYPE_SPECFS +# define MOUNT_TYPE_SPECFS MOUNT_SPECFS +# undef MOUNT_TYPE_CFS +# define MOUNT_TYPE_CFS MOUNT_CFS +#endif /* MOUNT_TYPE_NFS */ + +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + +/* map field names */ +#define ex_dir ex_name +#define gr_name g_name +#define gr_next g_next +#define ml_directory ml_path +#define ml_hostname ml_name +#define ml_next ml_nxt + +/* + * NFS mount option flags + */ +#define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */ +#define NFSMNT_WSIZE 0x002 /* set write size */ +#define NFSMNT_RSIZE 0x004 /* set read size */ +#define NFSMNT_TIMEO 0x008 /* set initial timeout */ +#define NFSMNT_RETRANS 0x010 /* set number of request retries */ +#define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */ +#define NFSMNT_INT 0x040 /* allow interrupts on hard mount */ +#define NFSMNT_NOAC 0x080 /* don't cache attributes */ +#define NFSMNT_ACREGMIN 0x0100 /* set min secs for file attr cache */ +#define NFSMNT_ACREGMAX 0x0200 /* set max secs for file attr cache */ +#define NFSMNT_ACDIRMIN 0x0400 /* set min secs for dir attr cache */ +#define NFSMNT_ACDIRMAX 0x0800 /* set max secs for dir attr cache */ +#define NFSMNT_SECURE 0x1000 /* secure mount */ +#define NFSMNT_NOCTO 0x2000 /* no close-to-open consistency */ + +#define NFS_PORT 2049 +#ifndef NFS_MAXDATA +# define NFS_MAXDATA 8192 +#endif /* NFS_MAXDATA */ +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* + * fix up or complete other some definitions... + */ +#define WNOHANG 01 +#define WUNTRACED 02 +#define WIFSTOPPED(status) ((status) & 0100) +#define WSTOPSIG(status) (int)(WIFSTOPPED(status) ? \ + (((status) >> 8) & 0177) : -1) +#define WIFSIGNALED(status) ( !WIFEXITED(status) && \ + !WIFSTOPPED(status) ) +#define WTERMSIG(status) (int)(WIFSIGNALED(status) ? \ + ((status) & 0177) : -1) +/* define missing macros */ +#ifndef S_ISDIR +# ifdef S_IFMT +# define S_ISDIR(mode) (((mode) & (S_IFMT)) == (S_IFDIR)) +# else /* not S_IFMT */ +# define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR)) +# endif /* not S_IFMT */ +#endif /* not S_ISDIR */ + +/* + * ENUMS: + */ + +enum nfstype { + NFNON = 0, + NFREG = 1, + NFDIR = 2, + NFBLK = 3, + NFCHR = 4, + NFLNK = 5, + NFSOCK = 6, + NFBAD = 7, + NFFIFO = 8, +}; + +enum nfsstat { + NFS_OK = 0, /* no error */ + NFSERR_PERM=EPERM, /* Not owner */ + NFSERR_NOENT=ENOENT, /* No such file or directory */ + NFSERR_IO=EIO, /* I/O error */ + NFSERR_NXIO=ENXIO, /* No such device or address */ + NFSERR_ACCES=EACCES, /* Permission denied */ + NFSERR_EXIST=EEXIST, /* File exists */ + NFSERR_NODEV=ENODEV, /* No such device */ + NFSERR_NOTDIR=ENOTDIR, /* Not a directory */ + NFSERR_ISDIR=EISDIR, /* Is a directory */ + NFSERR_FBIG=EFBIG, /* File too large */ + NFSERR_NOSPC=ENOSPC, /* No space left on device */ + NFSERR_ROFS=EROFS, /* Read-only file system */ + NFSERR_NAMETOOLONG=ENAMETOOLONG,/* File name too long */ + NFSERR_NOTEMPTY=ENOTEMPTY, /* Directory not empty */ + NFSERR_DQUOT=EDQUOT, /* Disc quota exceeded */ + NFSERR_STALE=ESTALE, /* Stale NFS file handle */ + NFSERR_WFLUSH /* write cache flushed */ +}; + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char fhandle[NFS_FHSIZE]; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum ftype ftype; +typedef enum nfsstat nfsstat; +typedef enum nfstype nfsftype; +typedef fhandle fhandle_t; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fattr nfsfattr; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct linkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct nfs_fh nfs_fh; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); + +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_mountlist(XDR *xdrs, mountlist *objp); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); + + +/* + * STRUCTURES: + */ + +struct nfs_args { + struct sockaddr_in *addr; /* file server address */ + caddr_t fh; /* File handle to be mounted */ + int flags; /* flags */ + int wsize; /* write size in bytes */ + int rsize; /* read size in bytes */ + int timeo; /* initial timeout in .1 secs */ + int retrans; /* times to retry send */ + char *hostname; /* server's hostname */ + int acregmin; /* attr cache file min secs */ + int acregmax; /* attr cache file max secs */ + int acdirmin; /* attr cache dir min secs */ + int acdirmax; /* attr cache dir max secs */ + char *netname; /* server's netname */ +}; + +struct nfs_fh { + char data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfs_fh sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfs_fh da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfs_fh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfs_fh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfs_fh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfs_fh la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfs_fh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_openbsd.h b/conf/nfs_prot/nfs_prot_openbsd.h new file mode 100644 index 00000000000..e4697845153 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_openbsd.h @@ -0,0 +1,183 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_openbsd.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ + +#ifndef NFS_NPROCS +# define NFS_NPROCS 26 +#endif /* not NFS_NPROCS */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ + +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifdef HAVE_UFS_UFS_EXTATTR_H +/* + * Need to define _KERNEL to include protected definition of struct + * ufs_extattr_per_mount, which is used in struct ufsmount in + * , but is NOT protected by _KERNEL there. + */ +# define _KERNEL +# include +# undef _KERNEL +# endif /* HAVE_UFS_UFS_EXTATTR_H */ +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +/* + * XXX: fake struct nextexport: trying to include proper headers here is too + * difficult: those headers drag many other headers, etc. + */ +struct netexport { int this_is_SO_wrong; }; +# include +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ + + +/* + * MACROS: + */ +#define dr_drok_u diropres +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_size size +#define na_type type +#define na_uid uid +#define na_gid gid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_status status +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_from from +#define wra_fhandle file + + +/* + * TYPEDEFS: + */ +typedef attrstat nfsattrstat; +typedef createargs nfscreateargs; +typedef dirlist nfsdirlist; +typedef diropargs nfsdiropargs; +typedef diropres nfsdiropres; +typedef entry nfsentry; +typedef fattr nfsfattr; +typedef ftype nfsftype; +typedef linkargs nfslinkargs; +typedef readargs nfsreadargs; +typedef readdirargs nfsreaddirargs; +typedef readdirres nfsreaddirres; +typedef readlinkres nfsreadlinkres; +typedef readres nfsreadres; +typedef renameargs nfsrenameargs; +typedef sattrargs nfssattrargs; +typedef statfsokres nfsstatfsokres; +typedef statfsres nfsstatfsres; +typedef symlinkargs nfssymlinkargs; +typedef writeargs nfswriteargs; + + +/* + * OpenBSD 2.2 has NFS V3, but it is undefined in the header files. + * so I define everything that's needed for NFS V3 here. + */ +#ifdef NFSMNT_NFSV3 + +/* + * turn of this function so it cannot be used! OpenBSD seems to + * require that NFS sockets be connected. + * See m4/macros/check_nfs_socket_connection.m4. + */ + +# define MOUNT_NFS3 MOUNT_NFS +# define MNTOPT_NFS3 "nfs" + +#endif /* NFSMNT_NFSV3 */ + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_osf2.h b/conf/nfs_prot/nfs_prot_osf2.h new file mode 100644 index 00000000000..82f8f38f0e8 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_osf2.h @@ -0,0 +1,307 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_osf2.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ + +/* avoid conflicts with Irix's EFS */ +#undef MOUNT_EFS /* DCE Episode FS */ +/* includes a global symbol in every module! */ +#define _SYS_FS_TYPES_H_ + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* map field names */ +#define fh_data fh_bytes + +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name + +#define drok_attributes drok_attr +#define na_fileid na_nodeid +#define la_fhandle la_from +#define nt_seconds tv_sec +#define nt_useconds tv_usec +#define ra_totalcount ra_totcount +#define sla_to sla_tnm +#define sla_attributes sla_sa +#define sag_fhandle saa_fh +#define sag_attributes saa_sa +#define sfrok_tsize fsok_tsize +#define sfrok_bsize fsok_bsize +#define sfrok_blocks fsok_blocks +#define sfrok_bfree fsok_bfree +#define sfrok_bavail fsok_bavail +#define sfr_status fs_status +#define sfr_u fs_u +#define sfr_reply_u fs_fsok_u +#define wra_fhandle wa_fhandle +#define wra_beginoffset wa_begoff +#define wra_offset wa_offset +#define wra_totalcount wa_totcount +#define wra_u wa_mbuf->m_hdr +#define wra_val_u mh_data +#define wra_len_u mh_len + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct nfssvcfh fhandle; +typedef struct nfsattrstat nfsattrstat; +typedef struct nfscreateargs nfscreateargs; +typedef struct nfsdirlist nfsdirlist; +typedef struct nfsdiropargs nfsdiropargs; +typedef struct nfsdrok nfsdiropokres; +typedef struct nfsdiropres nfsdiropres; +typedef struct nfsentry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct nfsfattr nfsfattr; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct nfslinkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct _nfs_fh _nfs_fh; +typedef struct timeval nfstime; +typedef struct nfsreadargs nfsreadargs; +typedef struct nfsreaddirargs nfsreaddirargs; +typedef struct nfsreaddirres nfsreaddirres; +typedef struct nfsreadlinkres nfsreadlinkres; +typedef struct nfsreadokres nfsreadokres; +typedef struct nfsreadres nfsreadres; +typedef struct nfsrenameargs nfsrenameargs; +typedef struct nfssattr nfssattr; +typedef struct nfssaargs nfssattrargs; +typedef struct nfsstatfsok nfsstatfsokres; +typedef struct nfsstatfs nfsstatfsres; +typedef struct nfsslargs nfssymlinkargs; +typedef struct nfswriteargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); + +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); + + +/* + * STRUCTURES: + */ + +struct _nfs_fh { + char data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct nfsreadlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct nfsreadokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct nfsreadres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct nfscreateargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct nfsrenameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct nfsreaddirargs { + nfsv2fh_t rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct nfsentry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct nfsdirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct nfsreaddirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_osf4.h b/conf/nfs_prot/nfs_prot_osf4.h new file mode 100644 index 00000000000..db74b4aa009 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_osf4.h @@ -0,0 +1,417 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_osf4.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNTV3_H +# include +#endif /* HAVE_RPCSVC_MOUNTV3_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ + +/* avoid conflicts with Irix's EFS */ +#undef MOUNT_EFS /* DCE Episode FS */ + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* map field names */ +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name + +#define drok_attributes drok_attr +#define na_fileid na_nodeid +#define la_fhandle la_from +#define nt_seconds tv_sec +#define nt_useconds tv_usec +#define ra_totalcount ra_totcount +#define sla_to sla_tnm +#define sla_attributes sla_sa +#define sag_fhandle saa_fh +#define sag_attributes saa_sa +#define sfrok_tsize fsok_tsize +#define sfrok_bsize fsok_bsize +#define sfrok_blocks fsok_blocks +#define sfrok_bfree fsok_bfree +#define sfrok_bavail fsok_bavail +#define sfr_status fs_status +#define sfr_u fs_u +#define sfr_reply_u fs_fsok_u +#define wra_fhandle wa_fhandle +#define wra_beginoffset wa_begoff +#define wra_offset wa_offset +#define wra_totalcount wa_totcount +#define wra_u wa_mbuf->m_hdr +#define wra_val_u mh_data +#define wra_len_u mh_len + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct nfssvcfh fhandle; +typedef struct nfsattrstat nfsattrstat; +typedef struct nfscreateargs nfscreateargs; +typedef struct nfsdirlist nfsdirlist; +typedef struct nfsdiropargs nfsdiropargs; +typedef struct nfsdrok nfsdiropokres; +typedef struct nfsdiropres nfsdiropres; +typedef struct nfsentry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct nfsfattr nfsfattr; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct nfslinkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct _nfs_fh _nfs_fh; +typedef struct timeval nfstime; +typedef struct nfsreadargs nfsreadargs; +typedef struct nfsreaddirargs nfsreaddirargs; +typedef struct nfsreaddirres nfsreaddirres; +typedef struct nfsreadlinkres nfsreadlinkres; +typedef struct nfsreadokres nfsreadokres; +typedef struct nfsreadres nfsreadres; +typedef struct nfsrenameargs nfsrenameargs; +typedef struct nfssattr nfssattr; +typedef struct nfssaargs nfssattrargs; +typedef struct nfsstatfsok nfsstatfsokres; +typedef struct nfsstatfs nfsstatfsres; +typedef struct nfsslargs nfssymlinkargs; +typedef struct nfswriteargs nfswriteargs; + + +/* + * EXTERNALS: (some are missing from system headers) + */ + +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_getattr_2_svc(struct nfssvcfh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(struct nfssvcfh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(struct nfssvcfh *, struct svc_req *); +extern int plock(int op); +extern const char *hstrerror(int err); +extern int getmntinfo(struct statfs **mntbufp, int flags); + +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_nfs_fh(XDR *, struct nfssvcfh*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); +extern bool_t xdr_exportnode (XDR *, exportnode*); +extern bool_t xdr_groups (XDR *, groups*); + + + +/* + * STRUCTURES: + */ + +struct _nfs_fh { + char data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct _fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct _sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct _attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct _sattrargs { + struct nfssvcfh sag_fhandle; + nfssattr sag_attributes; +}; + +struct _diropargs { + struct nfssvcfh da_fhandle; /* was dir */ + filename da_name; +}; + +struct _diropokres { + struct nfssvcfh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct _diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct nfsreadlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct _readargs { + struct nfssvcfh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct nfsreadokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct nfsreadres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +#if 0 +struct _writeargs { + struct nfssvcfh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; +#endif /* 0 */ + +struct nfscreateargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct nfsrenameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct _linkargs { + struct nfssvcfh la_fhandle; + nfsdiropargs la_to; +}; + +struct _symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct nfsreaddirargs { + struct nfssvcfh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct nfsentry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct nfsdirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct nfsreaddirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct _statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct _statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_osf5.h b/conf/nfs_prot/nfs_prot_osf5.h index 655e98d0390..f091a7a2d61 100644 --- a/conf/nfs_prot/nfs_prot_osf5.h +++ b/conf/nfs_prot/nfs_prot_osf5.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2003 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -36,9 +32,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * %W% (Berkeley) %G% * - * $Id: nfs_prot_osf5.h,v 1.1.2.4 2002/12/27 22:44:57 ezk Exp $ + * File: am-utils/conf/nfs_prot/nfs_prot_osf5.h * */ @@ -365,7 +360,7 @@ struct _writeargs { char *wra_val_u; } wra_u; }; -#endif +#endif /* 0 */ struct nfscreateargs { nfsdiropargs ca_where; @@ -428,4 +423,20 @@ struct _statfsres { } sfr_u; }; +/* + ************************************************************************** + * Tru64 5.1's autofs is not ported or tested yet... + * For now, undefine it or define dummy entries. + ************************************************************************** + */ +#ifdef MNTTYPE_AUTOFS +# undef MNTTYPE_AUTOFS +#endif /* MNTTYPE_AUTOFS */ +#ifdef MNTTAB_TYPE_AUTOFS +# undef MNTTAB_TYPE_AUTOFS +#endif /* MNTTAB_TYPE_AUTOFS */ +#ifdef HAVE_FS_AUTOFS +# undef HAVE_FS_AUTOFS +#endif /* HAVE_FS_AUTOFS */ + #endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_sunos3.h b/conf/nfs_prot/nfs_prot_sunos3.h new file mode 100644 index 00000000000..557a2ccbbd7 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_sunos3.h @@ -0,0 +1,401 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_sunos3.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_SYS_ERRNO_H +#include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_RPC_RPC_H +#include +#endif /* HAVE_RPC_RPC_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +# ifdef HAVE_NFS_NFS_CLNT_H +# include +# endif /* HAVE_NFS_NFS_CLNT_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +/* complete missing definition that is actually used in SunOS 3.x */ +#ifndef MNTOPT_DEV +# define MNTOPT_DEV "dev" +#endif /* not MNTOPT_DEV */ + +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* map field names */ +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name +#define na_fileid na_nodeid +#define la_fhandle la_from +#define ra_totalcount ra_totcount + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef char fhandle[NFS_FHSIZE]; +typedef struct attrstat nfsattrstat; +typedef struct nfscreateargs nfscreateargs; +typedef struct nfsdirlist nfsdirlist; +typedef struct nfsdiropargs nfsdiropargs; +typedef struct nfsdiropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct nfsentry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fattr nfsfattr; +typedef struct nfsfhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct nfslinkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct nfstime nfstime; +typedef struct nfsreadargs nfsreadargs; +typedef struct nfsreaddirargs nfsreaddirargs; +typedef struct nfsreaddirres nfsreaddirres; +typedef struct nfsreadlinkres nfsreadlinkres; +typedef struct nfsreadokres nfsreadokres; +typedef struct nfsreadres nfsreadres; +typedef struct nfsrenameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct nfssattrargs nfssattrargs; +typedef struct nfsstatfsokres nfsstatfsokres; +typedef struct nfsstatfsres nfsstatfsres; +typedef struct nfssymlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_getattr_2_svc(fhandle_t *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(fhandle_t *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(fhandle_t *, struct svc_req *); + +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_nfs_fh(XDR *, fhandle_t*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); + + +/* + * STRUCTURES: + */ + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct nfssattrargs { + fhandle_t sag_fhandle; + nfssattr sag_attributes; +}; + +struct _nfsdiropargs { + fhandle_t da_fhandle; /* was dir */ + filename da_name; +}; + +struct nfsdiropokres { + fhandle_t drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct nfsreadlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct _nfsreadargs { + fhandle_t ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct nfsreadokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct nfsreadres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + fhandle_t wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct nfscreateargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct nfsrenameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct _nfslinkargs { + fhandle_t la_fhandle; + nfsdiropargs la_to; +}; + +struct nfssymlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct nfsreaddirargs { + fhandle_t rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct nfsentry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct nfsdirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct nfsreaddirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct nfsstatfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct nfsstatfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +struct nfsfhstatus { + int fhs_status; + fhandle fhs_fh; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_sunos4.h b/conf/nfs_prot/nfs_prot_sunos4.h new file mode 100644 index 00000000000..c32edd3632b --- /dev/null +++ b/conf/nfs_prot/nfs_prot_sunos4.h @@ -0,0 +1,401 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_sunos4.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_SYS_ERRNO_H +#include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_RPC_RPC_H +#include +#endif /* HAVE_RPC_RPC_H */ +#ifdef HAVE_NFS_NFSV2_H +# include +#endif /* HAVE_NFS_NFSV2_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ +# ifdef HAVE_NFS_NFS_CLNT_H +# include +# endif /* HAVE_NFS_NFS_CLNT_H */ +#ifdef HAVE_SYS_FS_NFS_H +# include +#endif /* HAVE_SYS_FS_NFS_H */ +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ + +/* complete missing definition that is actually used in SunOS 4.x */ +#ifndef MNTOPT_DEV +# define MNTOPT_DEV "dev" +#endif /* not MNTOPT_DEV */ + +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* map field names */ +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name +#define na_fileid na_nodeid +#define la_fhandle la_from +#define ra_totalcount ra_totcount + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef char fhandle[NFS_FHSIZE]; +typedef struct attrstat nfsattrstat; +typedef struct nfscreateargs nfscreateargs; +typedef struct nfsdirlist nfsdirlist; +typedef struct nfsdiropargs nfsdiropargs; +typedef struct nfsdiropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct nfsentry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fattr nfsfattr; +typedef struct nfsfhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct nfslinkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct nfstime nfstime; +typedef struct nfsreadargs nfsreadargs; +typedef struct nfsreaddirargs nfsreaddirargs; +typedef struct nfsreaddirres nfsreaddirres; +typedef struct nfsreadlinkres nfsreadlinkres; +typedef struct nfsreadokres nfsreadokres; +typedef struct nfsreadres nfsreadres; +typedef struct nfsrenameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct nfssattrargs nfssattrargs; +typedef struct nfsstatfsokres nfsstatfsokres; +typedef struct nfsstatfsres nfsstatfsres; +typedef struct nfssymlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_getattr_2_svc(fhandle_t *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(fhandle_t *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(fhandle_t *, struct svc_req *); + +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_nfs_fh(XDR *, fhandle_t*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); + + +/* + * STRUCTURES: + */ + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct nfssattrargs { + fhandle_t sag_fhandle; + nfssattr sag_attributes; +}; + +struct _nfsdiropargs { + fhandle_t da_fhandle; /* was dir */ + filename da_name; +}; + +struct nfsdiropokres { + fhandle_t drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct nfsreadlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct _nfsreadargs { + fhandle_t ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct nfsreadokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct nfsreadres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + fhandle_t wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct nfscreateargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct nfsrenameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct _nfslinkargs { + fhandle_t la_fhandle; + nfsdiropargs la_to; +}; + +struct nfssymlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct nfsreaddirargs { + fhandle_t rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct nfsentry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct nfsdirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct nfsreaddirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct nfsstatfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct nfsstatfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +struct nfsfhstatus { + int fhs_status; + fhandle fhs_fh; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_sunos5_3.h b/conf/nfs_prot/nfs_prot_sunos5_3.h new file mode 100644 index 00000000000..da760dfe0f4 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_sunos5_3.h @@ -0,0 +1,264 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_sunos5_3.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +/* + * Do not include because Solaris 2.3 really does not have NFS + * V.3 support, despite what their header files claim. + */ + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ + +#ifndef fhandle_t +# define fhandle_t nfs_fh +#endif /* not fhandle_t */ + +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ +#ifdef HAVE_RPC_RPC_H +#include +#endif /* HAVE_RPC_RPC_H */ + +/* missing mntent definition for cachefs */ +#ifndef MNTTYPE_CACHEFS +# define MNTTYPE_CACHEFS "cachefs" /* Cache File System */ +#endif /* not MNTTYPE_CACHEFS */ + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define FHSIZE 32 +#define NFS_COOKIESIZE 4 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + +/* map field names */ +#define ex_dir ex_name +#define gr_name g_name +#define gr_next g_next +#define ml_directory ml_path +#define ml_hostname ml_name +#define ml_next ml_nxt + + +/* + * TYPEDEFS: + */ + +typedef char *dirpath; +typedef char *name; +typedef char fhandle[FHSIZE]; +typedef enum ftype nfsftype; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fattr nfsfattr; +typedef struct nfsfhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct linkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern bool_t xdr_createargs(XDR *, nfscreateargs *); +extern bool_t xdr_dirlist(XDR *, nfsdirlist *); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres *); +extern bool_t xdr_entry(XDR *, nfsentry *); +extern bool_t xdr_filename(XDR *, filename *); +extern bool_t xdr_ftype(XDR *, nfsftype *); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh *); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_nfspath(XDR *, nfspath *); +extern bool_t xdr_nfsstat(XDR *, nfsstat *); +extern bool_t xdr_nfstime(XDR *, nfstime *); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs *); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres *); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres *); +extern bool_t xdr_readokres(XDR *, nfsreadokres *); +extern bool_t xdr_readres(XDR *, nfsreadres *); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs *); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs *); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres *); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres *); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs *); + + +/* + * ENUMS: + */ + + +/* + * STRUCTURES: + */ + +struct nfsfhstatus { + int fhs_status; + fhandle fhs_fh; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_sunos5_4.h b/conf/nfs_prot/nfs_prot_sunos5_4.h new file mode 100644 index 00000000000..25dc58b896d --- /dev/null +++ b/conf/nfs_prot/nfs_prot_sunos5_4.h @@ -0,0 +1,266 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_sunos5_4.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +/* + * Do not include because Solaris 2.4 really does not have NFS + * V.3 support, despite what their header files claim. + */ + +#ifdef HAVE_RPCSVC_NFS_PROT_H +# include +#endif /* HAVE_RPCSVC_NFS_PROT_H */ + +#define FHSIZE 32 +typedef char fhandle[FHSIZE]; +#define fhandle_t fhandle + +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ +#ifdef HAVE_RPC_RPC_H +#include +#endif /* HAVE_RPC_RPC_H */ + +/* missing mntent definition for cachefs */ +#ifndef MNTTYPE_CACHEFS +# define MNTTYPE_CACHEFS "cachefs" /* Cache File System */ +#endif /* not MNTTYPE_CACHEFS */ + +/* + * Solaris 2.4 has header definitions for NFS V.3, but does not really + * have NFS V.3 support in the kernel. So I must undefine these. + */ +#ifdef MNTTYPE_NFS3 +# undef MNTTYPE_NFS3 +#endif /* MNTTYPE_NFS3 */ + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#define dr_drok_u diropres +#define ca_attributes attributes +#define ca_where where +#define da_fhandle dir +#define da_name name +#define dl_entries entries +#define dl_eof eof +#define dr_status status +#define dr_u diropres_u +#define drok_attributes attributes +#define drok_fhandle file +#define fh_data data +#define la_fhandle from +#define la_to to +#define na_atime atime +#define na_blocks blocks +#define na_blocksize blocksize +#define na_ctime ctime +#define na_fileid fileid +#define na_fsid fsid +#define na_gid gid +#define na_mode mode +#define na_mtime mtime +#define na_nlink nlink +#define na_rdev rdev +#define na_size size +#define na_type type +#define na_uid uid +#define ne_cookie cookie +#define ne_fileid fileid +#define ne_name name +#define ne_nextentry nextentry +#define ns_attr_u attributes +#define ns_status status +#define ns_u attrstat_u +#define nt_seconds seconds +#define nt_useconds useconds +#define ra_count count +#define ra_fhandle file +#define ra_offset offset +#define ra_totalcount totalcount +#define raok_attributes attributes +#define raok_len_u data_len +#define raok_u data +#define raok_val_u data_val +#define rda_cookie cookie +#define rda_count count +#define rda_fhandle dir +#define rdr_reply_u reply +#define rdr_status status +#define rdr_u readdirres_u +#define rlr_data_u data +#define rlr_status status +#define rlr_u readlinkres_u +#define rna_from from +#define rna_to to +#define rr_reply_u reply +#define rr_status status +#define rr_u readres_u +#define sa_atime atime +#define sa_gid gid +#define sa_mode mode +#define sa_mtime mtime +#define sa_size size +#define sa_uid uid +#define sag_attributes attributes +#define sag_fhandle file +#define sfr_reply_u reply +#define sfr_status status +#define sfr_u statfsres_u +#define sfrok_bavail bavail +#define sfrok_bfree bfree +#define sfrok_blocks blocks +#define sfrok_bsize bsize +#define sfrok_tsize tsize +#define sla_attributes attributes +#define sla_from from +#define sla_to to +#define wra_beginoffset beginoffset +#define wra_fhandle file +#define wra_len_u data_len +#define wra_offset offset +#define wra_totalcount totalcount +#define wra_u data +#define wra_val_u data_val + +/* map field names */ +#define ex_dir ex_name +#define gr_name g_name +#define gr_next g_next +#define ml_directory ml_path +#define ml_hostname ml_name +#define ml_next ml_nxt + + +/* + * TYPEDEFS: + */ + +typedef char *dirpath; +typedef char *name; +typedef enum ftype nfsftype; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fattr nfsfattr; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct linkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern bool_t xdr_createargs(XDR *, nfscreateargs *); +extern bool_t xdr_dirlist(XDR *, nfsdirlist *); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres *); +extern bool_t xdr_entry(XDR *, nfsentry *); +extern bool_t xdr_filename(XDR *, filename *); +extern bool_t xdr_ftype(XDR *, nfsftype *); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh *); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_nfspath(XDR *, nfspath *); +extern bool_t xdr_nfsstat(XDR *, nfsstat *); +extern bool_t xdr_nfstime(XDR *, nfstime *); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs *); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres *); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres *); +extern bool_t xdr_readokres(XDR *, nfsreadokres *); +extern bool_t xdr_readres(XDR *, nfsreadres *); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs *); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs *); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres *); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres *); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs *); + + +/* + * ENUMS: + */ + + +/* + * STRUCTURES: + */ + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_sunos5_5.h b/conf/nfs_prot/nfs_prot_sunos5_5.h new file mode 100644 index 00000000000..6e31ddc242d --- /dev/null +++ b/conf/nfs_prot/nfs_prot_sunos5_5.h @@ -0,0 +1,381 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_sunos5_5.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +/* + * Do NOT include to get NFS V2 specs, because + * it will result in conflicts with . The latter is a must + * for NFS V3 specs. + */ + +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ + +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#define NFSPROC_NULL ((unsigned long)(0)) +#define NFSPROC_GETATTR ((unsigned long)(1)) +#define NFSPROC_SETATTR ((unsigned long)(2)) +#define NFSPROC_ROOT ((unsigned long)(3)) +#define NFSPROC_LOOKUP ((unsigned long)(4)) +#define NFSPROC_READLINK ((unsigned long)(5)) +#define NFSPROC_READ ((unsigned long)(6)) +#define NFSPROC_WRITECACHE ((unsigned long)(7)) +#define NFSPROC_WRITE ((unsigned long)(8)) +#define NFSPROC_CREATE ((unsigned long)(9)) +#define NFSPROC_REMOVE ((unsigned long)(10)) +#define NFSPROC_RENAME ((unsigned long)(11)) +#define NFSPROC_LINK ((unsigned long)(12)) +#define NFSPROC_SYMLINK ((unsigned long)(13)) +#define NFSPROC_MKDIR ((unsigned long)(14)) +#define NFSPROC_RMDIR ((unsigned long)(15)) +#define NFSPROC_READDIR ((unsigned long)(16)) +#define NFSPROC_STATFS ((unsigned long)(17)) + +#define AUTOFS_CONFTYPE "ticlts" + + +/* + * TYPEDEFS: + */ + +typedef char *filename; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct fattr nfsfattr; +typedef struct linkargs nfslinkargs; +typedef struct nfs_fh nfs_fh; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern bool_t xdr_nfsstat(XDR *, nfsstat *); +extern bool_t xdr_ftype(XDR *, nfsftype *); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh *); +extern bool_t xdr_nfstime(XDR *, nfstime *); +extern bool_t xdr_fattr(XDR *, nfsfattr *); +extern bool_t xdr_sattr(XDR *, nfssattr *); +extern bool_t xdr_filename(XDR *, filename *); +extern bool_t xdr_nfspath(XDR *, nfspath *); +extern bool_t xdr_attrstat(XDR *, nfsattrstat *); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs *); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs *); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres *); +extern bool_t xdr_diropres(XDR *, nfsdiropres *); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres *); +extern bool_t xdr_readargs(XDR *, nfsreadargs *); +extern bool_t xdr_readokres(XDR *, nfsreadokres *); +extern bool_t xdr_readres(XDR *, nfsreadres *); +extern bool_t xdr_writeargs(XDR *, nfswriteargs *); +extern bool_t xdr_createargs(XDR *, nfscreateargs *); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs *); +extern bool_t xdr_linkargs(XDR *, nfslinkargs *); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs *); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs *); +extern bool_t xdr_entry(XDR *, nfsentry *); +extern bool_t xdr_dirlist(XDR *, nfsdirlist *); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres *); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres *); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres *); + +extern nfsattrstat *nfsproc_getattr_2(nfs_fh *, CLIENT *); +extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2(nfssattrargs *, CLIENT *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2(nfswriteargs *, CLIENT *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2(nfsdiropargs *, CLIENT *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2(nfslinkargs *, CLIENT *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2(nfsrenameargs *, CLIENT *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2(nfssymlinkargs *, CLIENT *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2(nfsreaddirargs *, CLIENT *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2(nfs_fh *, CLIENT *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2(nfsreadargs *, CLIENT *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2(nfs_fh *, CLIENT *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); +extern void *nfsproc_null_2(void *, CLIENT *); +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern void *nfsproc_root_2(void *, CLIENT *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern void *nfsproc_writecache_2(void *, CLIENT *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern int nfs_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); + + +/* + * ENUMS: + */ + + +/* + * STRUCTURES: + */ + +struct nfs_fh { + char fh_data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfs_fh sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfs_fh da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfs_fh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfs_fh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfs_fh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfs_fh la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfs_fh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_sunos5_6.h b/conf/nfs_prot/nfs_prot_sunos5_6.h new file mode 100644 index 00000000000..36f613f3f7a --- /dev/null +++ b/conf/nfs_prot/nfs_prot_sunos5_6.h @@ -0,0 +1,385 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_sunos5_6.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +/* + * Do NOT include to get NFS V2 specs, because + * it will result in conflicts with . The latter is a must + * for NFS V3 specs. + */ + +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ + +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#define NFSPROC_NULL ((unsigned long)(0)) +#define NFSPROC_GETATTR ((unsigned long)(1)) +#define NFSPROC_SETATTR ((unsigned long)(2)) +#define NFSPROC_ROOT ((unsigned long)(3)) +#define NFSPROC_LOOKUP ((unsigned long)(4)) +#define NFSPROC_READLINK ((unsigned long)(5)) +#define NFSPROC_READ ((unsigned long)(6)) +#define NFSPROC_WRITECACHE ((unsigned long)(7)) +#define NFSPROC_WRITE ((unsigned long)(8)) +#define NFSPROC_CREATE ((unsigned long)(9)) +#define NFSPROC_REMOVE ((unsigned long)(10)) +#define NFSPROC_RENAME ((unsigned long)(11)) +#define NFSPROC_LINK ((unsigned long)(12)) +#define NFSPROC_SYMLINK ((unsigned long)(13)) +#define NFSPROC_MKDIR ((unsigned long)(14)) +#define NFSPROC_RMDIR ((unsigned long)(15)) +#define NFSPROC_READDIR ((unsigned long)(16)) +#define NFSPROC_STATFS ((unsigned long)(17)) + +#define AUTOFS_CONFTYPE "ticotsord" + + +/* + * TYPEDEFS: + */ + +typedef char *filename; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct fattr nfsfattr; +typedef struct linkargs nfslinkargs; +typedef struct nfs_fh nfs_fh; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern bool_t xdr_nfsstat(XDR *, nfsstat *); +extern bool_t xdr_ftype(XDR *, nfsftype *); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh *); +extern bool_t xdr_nfstime(XDR *, nfstime *); +extern bool_t xdr_fattr(XDR *, nfsfattr *); +extern bool_t xdr_sattr(XDR *, nfssattr *); +extern bool_t xdr_filename(XDR *, filename *); +extern bool_t xdr_nfspath(XDR *, nfspath *); +extern bool_t xdr_attrstat(XDR *, nfsattrstat *); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs *); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs *); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres *); +extern bool_t xdr_diropres(XDR *, nfsdiropres *); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres *); +extern bool_t xdr_readargs(XDR *, nfsreadargs *); +extern bool_t xdr_readokres(XDR *, nfsreadokres *); +extern bool_t xdr_readres(XDR *, nfsreadres *); +extern bool_t xdr_writeargs(XDR *, nfswriteargs *); +extern bool_t xdr_createargs(XDR *, nfscreateargs *); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs *); +extern bool_t xdr_linkargs(XDR *, nfslinkargs *); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs *); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs *); +extern bool_t xdr_entry(XDR *, nfsentry *); +extern bool_t xdr_dirlist(XDR *, nfsdirlist *); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres *); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres *); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres *); + +extern nfsattrstat *nfsproc_getattr_2(nfs_fh *, CLIENT *); +extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2(nfssattrargs *, CLIENT *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2(nfswriteargs *, CLIENT *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2(nfsdiropargs *, CLIENT *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2(nfslinkargs *, CLIENT *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2(nfsrenameargs *, CLIENT *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2(nfssymlinkargs *, CLIENT *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2(nfsreaddirargs *, CLIENT *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2(nfs_fh *, CLIENT *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2(nfsreadargs *, CLIENT *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2(nfs_fh *, CLIENT *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); +extern void *nfsproc_null_2(void *, CLIENT *); +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern void *nfsproc_root_2(void *, CLIENT *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern void *nfsproc_writecache_2(void *, CLIENT *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern int nfs_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); + + +/* + * ENUMS: + */ + + +/* + * STRUCTURES: + */ + +struct nfs_fh { + char fh_data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfs_fh sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfs_fh da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfs_fh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfs_fh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfs_fh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfs_fh la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfs_fh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_sunos5_7.h b/conf/nfs_prot/nfs_prot_sunos5_7.h new file mode 100644 index 00000000000..3d0d30f823a --- /dev/null +++ b/conf/nfs_prot/nfs_prot_sunos5_7.h @@ -0,0 +1,396 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_sunos5_7.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +/* + * Do NOT include to get NFS V2 specs, because + * it will result in conflicts with . The latter is a must + * for NFS V3 specs. + */ + +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ + +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#define NFSPROC_NULL ((unsigned long)(0)) +#define NFSPROC_GETATTR ((unsigned long)(1)) +#define NFSPROC_SETATTR ((unsigned long)(2)) +#define NFSPROC_ROOT ((unsigned long)(3)) +#define NFSPROC_LOOKUP ((unsigned long)(4)) +#define NFSPROC_READLINK ((unsigned long)(5)) +#define NFSPROC_READ ((unsigned long)(6)) +#define NFSPROC_WRITECACHE ((unsigned long)(7)) +#define NFSPROC_WRITE ((unsigned long)(8)) +#define NFSPROC_CREATE ((unsigned long)(9)) +#define NFSPROC_REMOVE ((unsigned long)(10)) +#define NFSPROC_RENAME ((unsigned long)(11)) +#define NFSPROC_LINK ((unsigned long)(12)) +#define NFSPROC_SYMLINK ((unsigned long)(13)) +#define NFSPROC_MKDIR ((unsigned long)(14)) +#define NFSPROC_RMDIR ((unsigned long)(15)) +#define NFSPROC_READDIR ((unsigned long)(16)) +#define NFSPROC_STATFS ((unsigned long)(17)) + +#define AUTOFS_CONFTYPE "ticotsord" + +/* Sun has incomplete ldap headers, but libraries are ok */ +#ifndef LDAP_VERSION_MAX +#define LDAP_VERSION_MAX LDAP_VERSION3 +#endif /* LDAP_VERSION_MAX */ + + +/* + * TYPEDEFS: + */ + +typedef char *filename; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct fattr nfsfattr; +typedef struct linkargs nfslinkargs; +typedef struct nfs_fh nfs_fh; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern bool_t xdr_nfsstat(XDR *, nfsstat *); +extern bool_t xdr_ftype(XDR *, nfsftype *); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh *); +extern bool_t xdr_nfstime(XDR *, nfstime *); +extern bool_t xdr_fattr(XDR *, nfsfattr *); +extern bool_t xdr_sattr(XDR *, nfssattr *); +extern bool_t xdr_filename(XDR *, filename *); +extern bool_t xdr_nfspath(XDR *, nfspath *); +extern bool_t xdr_attrstat(XDR *, nfsattrstat *); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs *); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs *); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres *); +extern bool_t xdr_diropres(XDR *, nfsdiropres *); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres *); +extern bool_t xdr_readargs(XDR *, nfsreadargs *); +extern bool_t xdr_readokres(XDR *, nfsreadokres *); +extern bool_t xdr_readres(XDR *, nfsreadres *); +extern bool_t xdr_writeargs(XDR *, nfswriteargs *); +extern bool_t xdr_createargs(XDR *, nfscreateargs *); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs *); +extern bool_t xdr_linkargs(XDR *, nfslinkargs *); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs *); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs *); +extern bool_t xdr_entry(XDR *, nfsentry *); +extern bool_t xdr_dirlist(XDR *, nfsdirlist *); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres *); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres *); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres *); + +extern nfsattrstat *nfsproc_getattr_2(nfs_fh *, CLIENT *); +extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2(nfssattrargs *, CLIENT *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2(nfswriteargs *, CLIENT *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2(nfsdiropargs *, CLIENT *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2(nfslinkargs *, CLIENT *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2(nfsrenameargs *, CLIENT *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2(nfssymlinkargs *, CLIENT *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2(nfsreaddirargs *, CLIENT *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2(nfs_fh *, CLIENT *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2(nfsreadargs *, CLIENT *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2(nfs_fh *, CLIENT *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); +extern void *nfsproc_null_2(void *, CLIENT *); +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern void *nfsproc_root_2(void *, CLIENT *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern void *nfsproc_writecache_2(void *, CLIENT *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern int nfs_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); + +/* Sun has incomplete ldap headers, but libraries are ok */ +#ifdef HAVE_LDAP_H +extern int ldap_set_option(LDAP *, int, const void *); +#endif /* HAVE_LDAP_H */ + + +/* + * ENUMS: + */ + + +/* + * STRUCTURES: + */ + +struct nfs_fh { + char fh_data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfs_fh sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfs_fh da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfs_fh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfs_fh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfs_fh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfs_fh la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfs_fh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_sunos5_8.h b/conf/nfs_prot/nfs_prot_sunos5_8.h index 63926222960..2108a71f6fc 100644 --- a/conf/nfs_prot/nfs_prot_sunos5_8.h +++ b/conf/nfs_prot/nfs_prot_sunos5_8.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2003 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -36,9 +32,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * %W% (Berkeley) %G% * - * $Id: nfs_prot_sunos5_8.h,v 1.2.2.4 2002/12/27 22:44:59 ezk Exp $ + * File: am-utils/conf/nfs_prot/nfs_prot_sunos5_8.h * */ @@ -103,6 +98,7 @@ #define NFSPROC_READDIR ((unsigned long)(16)) #define NFSPROC_STATFS ((unsigned long)(17)) +#define AUTOFS_CONFTYPE "ticotsord" /* * TYPEDEFS: diff --git a/conf/nfs_prot/nfs_prot_svr4.h b/conf/nfs_prot/nfs_prot_svr4.h new file mode 100644 index 00000000000..09a47874549 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_svr4.h @@ -0,0 +1,401 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_svr4.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +/* + * Do NOT include to get NFS V2 specs, because + * it will result in conflicts with . The latter is a must + * for NFS V3 specs. + */ + +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ + +#ifdef HAVE_RPCSVC_MOUNT_H +# include +#endif /* HAVE_RPCSVC_MOUNT_H */ + +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ + + +/* + * MACROS + */ + +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#define NFS_COOKIESIZE 4 + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#define NFSPROC_NULL ((unsigned long)(0)) +#define NFSPROC_GETATTR ((unsigned long)(1)) +#define NFSPROC_SETATTR ((unsigned long)(2)) +#define NFSPROC_ROOT ((unsigned long)(3)) +#define NFSPROC_LOOKUP ((unsigned long)(4)) +#define NFSPROC_READLINK ((unsigned long)(5)) +#define NFSPROC_READ ((unsigned long)(6)) +#define NFSPROC_WRITECACHE ((unsigned long)(7)) +#define NFSPROC_WRITE ((unsigned long)(8)) +#define NFSPROC_CREATE ((unsigned long)(9)) +#define NFSPROC_REMOVE ((unsigned long)(10)) +#define NFSPROC_RENAME ((unsigned long)(11)) +#define NFSPROC_LINK ((unsigned long)(12)) +#define NFSPROC_SYMLINK ((unsigned long)(13)) +#define NFSPROC_MKDIR ((unsigned long)(14)) +#define NFSPROC_RMDIR ((unsigned long)(15)) +#define NFSPROC_READDIR ((unsigned long)(16)) +#define NFSPROC_STATFS ((unsigned long)(17)) + +/* map field names */ +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef struct attrstat nfsattrstat; +typedef struct createargs nfscreateargs; +typedef struct dirlist nfsdirlist; +typedef struct diropargs nfsdiropargs; +typedef struct diropokres nfsdiropokres; +typedef struct diropres nfsdiropres; +typedef struct entry nfsentry; +typedef struct fattr nfsfattr; +typedef struct linkargs nfslinkargs; +typedef struct nfs_fh nfs_fh; +typedef struct nfstime nfstime; +typedef struct readargs nfsreadargs; +typedef struct readdirargs nfsreaddirargs; +typedef struct readdirres nfsreaddirres; +typedef struct readlinkres nfsreadlinkres; +typedef struct readokres nfsreadokres; +typedef struct readres nfsreadres; +typedef struct renameargs nfsrenameargs; +typedef struct sattr nfssattr; +typedef struct sattrargs nfssattrargs; +typedef struct statfsokres nfsstatfsokres; +typedef struct statfsres nfsstatfsres; +typedef struct symlinkargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + +typedef char *name; +typedef fhandle_t fhandle; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; + + +/* + * EXTERNALS: + */ + +extern bool_t xdr_nfsstat(XDR *, nfsstat *); +extern bool_t xdr_ftype(XDR *, nfsftype *); +extern bool_t xdr_nfs_fh(XDR *, nfs_fh *); +extern bool_t xdr_nfstime(XDR *, nfstime *); +extern bool_t xdr_fattr(XDR *, nfsfattr *); +extern bool_t xdr_sattr(XDR *, nfssattr *); +extern bool_t xdr_filename(XDR *, filename *); +extern bool_t xdr_nfspath(XDR *, nfspath *); +extern bool_t xdr_attrstat(XDR *, nfsattrstat *); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs *); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs *); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres *); +extern bool_t xdr_diropres(XDR *, nfsdiropres *); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres *); +extern bool_t xdr_readargs(XDR *, nfsreadargs *); +extern bool_t xdr_readokres(XDR *, nfsreadokres *); +extern bool_t xdr_readres(XDR *, nfsreadres *); +extern bool_t xdr_writeargs(XDR *, nfswriteargs *); +extern bool_t xdr_createargs(XDR *, nfscreateargs *); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs *); +extern bool_t xdr_linkargs(XDR *, nfslinkargs *); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs *); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs *); +extern bool_t xdr_entry(XDR *, nfsentry *); +extern bool_t xdr_dirlist(XDR *, nfsdirlist *); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres *); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres *); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres *); + +extern nfsattrstat *nfsproc_getattr_2(nfs_fh *, CLIENT *); +extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2(nfssattrargs *, CLIENT *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2(nfswriteargs *, CLIENT *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2(nfsdiropargs *, CLIENT *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2(nfscreateargs *, CLIENT *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2(nfslinkargs *, CLIENT *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2(nfsrenameargs *, CLIENT *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2(nfsdiropargs *, CLIENT *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2(nfssymlinkargs *, CLIENT *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2(nfsreaddirargs *, CLIENT *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2(nfs_fh *, CLIENT *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); +extern nfsreadres *nfsproc_read_2(nfsreadargs *, CLIENT *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2(nfs_fh *, CLIENT *); +extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); +extern void *nfsproc_null_2(void *, CLIENT *); +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern void *nfsproc_root_2(void *, CLIENT *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern void *nfsproc_writecache_2(void *, CLIENT *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern int nfs_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); + + +/* + * ENUMS: + */ + + +/* + * STRUCTURES: + */ + +struct nfs_fh { + char fh_data[NFS_FHSIZE]; +}; + +struct nfstime { + u_int nt_seconds; + u_int nt_useconds; +}; + +struct fattr { + nfsftype na_type; + u_int na_mode; + u_int na_nlink; + u_int na_uid; + u_int na_gid; + u_int na_size; + u_int na_blocksize; + u_int na_rdev; + u_int na_blocks; + u_int na_fsid; + u_int na_fileid; + nfstime na_atime; + nfstime na_mtime; + nfstime na_ctime; +}; + +struct sattr { + u_int sa_mode; + u_int sa_uid; + u_int sa_gid; + u_int sa_size; + nfstime sa_atime; + nfstime sa_mtime; +}; + +struct attrstat { + nfsstat ns_status; + union { + nfsfattr ns_attr_u; + } ns_u; +}; + +struct sattrargs { + nfs_fh sag_fhandle; + nfssattr sag_attributes; +}; + +struct diropargs { + nfs_fh da_fhandle; /* was dir */ + filename da_name; +}; + +struct diropokres { + nfs_fh drok_fhandle; + nfsfattr drok_attributes; +}; + +struct diropres { + nfsstat dr_status; /* was status */ + union { + nfsdiropokres dr_drok_u; /* was diropres */ + } dr_u; /* was diropres_u */ +}; + +struct readlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct readargs { + nfs_fh ra_fhandle; + u_int ra_offset; + u_int ra_count; + u_int ra_totalcount; +}; + +struct readokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct readres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + nfs_fh wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct createargs { + nfsdiropargs ca_where; + nfssattr ca_attributes; +}; + +struct renameargs { + nfsdiropargs rna_from; + nfsdiropargs rna_to; +}; + +struct linkargs { + nfs_fh la_fhandle; + nfsdiropargs la_to; +}; + +struct symlinkargs { + nfsdiropargs sla_from; + nfspath sla_to; + nfssattr sla_attributes; +}; + +struct readdirargs { + nfs_fh rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct entry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct dirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct readdirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct statfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct statfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; + +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/nfs_prot/nfs_prot_ultrix.h b/conf/nfs_prot/nfs_prot_ultrix.h new file mode 100644 index 00000000000..216216beb75 --- /dev/null +++ b/conf/nfs_prot/nfs_prot_ultrix.h @@ -0,0 +1,304 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/nfs_prot/nfs_prot_ultrix.h + * + */ + +#ifndef _AMU_NFS_PROT_H +#define _AMU_NFS_PROT_H + +#ifdef HAVE_NFS_NFS_H +# include +#endif /* HAVE_NFS_NFS_H */ + +/* + * MACROS + */ + +#if 0 +/* */ +#define NFS_PORT 2049 +#define NFS_MAXDATA 8192 +#define NFS_MAXPATHLEN 1024 +#define NFS_MAXNAMLEN 255 +#define NFS_FHSIZE 32 +#endif /* 0 */ +/* sizeof(u_long) */ +#define NFS_COOKIESIZE 4 +#if 0 +/* defaults: libamu/amu.h */ +#define MNTPATHLEN 1024 +#define MNTNAMLEN 255 +#endif /* 0 */ + +#define NFSMODE_FMT 0170000 +#define NFSMODE_DIR 0040000 +#define NFSMODE_CHR 0020000 +#define NFSMODE_BLK 0060000 +#define NFSMODE_REG 0100000 +#define NFSMODE_LNK 0120000 +#define NFSMODE_SOCK 0140000 +#define NFSMODE_FIFO 0010000 + +#if 0 +/* */ +#ifndef NFS_PROGRAM +# define NFS_PROGRAM ((u_long)100003) +#endif /* not NFS_PROGRAM */ +#ifndef NFS_VERSION +# define NFS_VERSION ((u_long)2) +#endif /* not NFS_VERSION */ +#endif /* 0 */ + +/* could use (u_long)RFS_* with RFS_* from */ +#define NFSPROC_NULL ((u_long)0) +#define NFSPROC_GETATTR ((u_long)1) +#define NFSPROC_SETATTR ((u_long)2) +#define NFSPROC_ROOT ((u_long)3) +#define NFSPROC_LOOKUP ((u_long)4) +#define NFSPROC_READLINK ((u_long)5) +#define NFSPROC_READ ((u_long)6) +#define NFSPROC_WRITECACHE ((u_long)7) +#define NFSPROC_WRITE ((u_long)8) +#define NFSPROC_CREATE ((u_long)9) +#define NFSPROC_REMOVE ((u_long)10) +#define NFSPROC_RENAME ((u_long)11) +#define NFSPROC_LINK ((u_long)12) +#define NFSPROC_SYMLINK ((u_long)13) +#define NFSPROC_MKDIR ((u_long)14) +#define NFSPROC_RMDIR ((u_long)15) +#define NFSPROC_READDIR ((u_long)16) +#define NFSPROC_STATFS ((u_long)17) + +/* map field names */ +#define ml_hostname ml_name +#define ml_directory ml_path +#define ml_next ml_nxt +#define gr_next g_next +#define gr_name g_name +#define ex_dir ex_name + +#define ca_where ca_da +#define ca_attributes ca_sa +#define drok_attributes drok_attr +#define fh_data fh_pad +#define na_fileid na_nodeid +#define la_fhandle la_from +#define nt_seconds tv_sec +#define nt_useconds tv_usec +#define ra_totalcount ra_totcount +#define rlr_status rl_status +#define rlr_u rl_u +#define sla_to sla_tnm +#define sla_attributes sla_sa +#define sag_fhandle saa_fh +#define sag_attributes saa_sa + + +/* + * TYPEDEFS: + */ +typedef char *dirpath; +typedef char *filename; +typedef char *name; +typedef char *nfspath; +typedef char nfscookie[NFS_COOKIESIZE]; +typedef enum nfsftype nfsftype; +typedef enum nfsstat nfsstat; +typedef fhandle_t fhandle; +typedef struct nfsattrstat nfsattrstat; +typedef struct nfscreatargs nfscreateargs; +typedef struct nfsdirlist nfsdirlist; +typedef struct nfsdiropargs nfsdiropargs; +typedef struct nfsdrok nfsdiropokres; +typedef struct nfsdiropres nfsdiropres; +typedef struct nfsentry nfsentry; +typedef struct exports *exports; +typedef struct exports exportnode; +typedef struct nfsfattr nfsfattr; +typedef struct fhstatus fhstatus; +typedef struct groups *groups; +typedef struct groups groupnode; +typedef struct nfslinkargs nfslinkargs; +typedef struct mountlist *mountlist; +typedef struct mountlist mountbody; +typedef struct timeval nfstime; +typedef struct nfsreadargs nfsreadargs; +typedef struct nfsreaddirargs nfsreaddirargs; +typedef struct nfsreaddirres nfsreaddirres; +typedef struct nfsreadlinkres nfsreadlinkres; +typedef struct nfsreadokres nfsreadokres; +typedef struct nfsreadres nfsreadres; +typedef struct nfsrnmargs nfsrenameargs; +typedef struct nfssattr nfssattr; +typedef struct nfssaargs nfssattrargs; +typedef struct nfsstatfsokres nfsstatfsokres; +typedef struct nfsstatfsres nfsstatfsres; +typedef struct nfsslargs nfssymlinkargs; +typedef struct writeargs nfswriteargs; + + +/* + * EXTERNALS: + */ + +extern void *nfsproc_null_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_getattr_2_svc(fhandle_t *, struct svc_req *); +extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *); +extern void *nfsproc_root_2_svc(void *, struct svc_req *); +extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreadlinkres *nfsproc_readlink_2_svc(fhandle_t *, struct svc_req *); +extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *); +extern void *nfsproc_writecache_2_svc(void *, struct svc_req *); +extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *); +extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *); +extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *); +extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *); +extern nfsstatfsres *nfsproc_statfs_2_svc(fhandle_t *, struct svc_req *); + +extern bool_t xdr_nfsstat(XDR *, nfsstat*); +extern bool_t xdr_ftype(XDR *, nfsftype*); +extern bool_t xdr_nfs_fh(XDR *, fhandle_t*); +extern bool_t xdr_nfstime(XDR *, nfstime*); +extern bool_t xdr_fattr(XDR *, nfsfattr*); +extern bool_t xdr_sattr(XDR *, nfssattr*); +extern bool_t xdr_filename(XDR *, filename*); +extern bool_t xdr_nfspath(XDR *, nfspath*); +extern bool_t xdr_attrstat(XDR *, nfsattrstat*); +extern bool_t xdr_sattrargs(XDR *, nfssattrargs*); +extern bool_t xdr_diropargs(XDR *, nfsdiropargs*); +extern bool_t xdr_diropokres(XDR *, nfsdiropokres*); +extern bool_t xdr_diropres(XDR *, nfsdiropres*); +extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*); +extern bool_t xdr_readargs(XDR *, nfsreadargs*); +extern bool_t xdr_readokres(XDR *, nfsreadokres*); +extern bool_t xdr_readres(XDR *, nfsreadres*); +extern bool_t xdr_writeargs(XDR *, nfswriteargs*); +extern bool_t xdr_createargs(XDR *, nfscreateargs*); +extern bool_t xdr_renameargs(XDR *, nfsrenameargs*); +extern bool_t xdr_linkargs(XDR *, nfslinkargs*); +extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*); +extern bool_t xdr_nfscookie(XDR *, nfscookie); +extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*); +extern bool_t xdr_entry(XDR *, nfsentry*); +extern bool_t xdr_dirlist(XDR *, nfsdirlist*); +extern bool_t xdr_readdirres(XDR *, nfsreaddirres*); +extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*); +extern bool_t xdr_statfsres(XDR *, nfsstatfsres*); + + +/* + * STRUCTURES: + */ + +struct nfsreadlinkres { + nfsstat rlr_status; + union { + nfspath rlr_data_u; + } rlr_u; +}; + +struct nfsreadokres { + nfsfattr raok_attributes; + struct { + u_int raok_len_u; + char *raok_val_u; + } raok_u; +}; + +struct nfsreadres { + nfsstat rr_status; + union { + nfsreadokres rr_reply_u; + } rr_u; +}; + +struct writeargs { + fhandle_t wra_fhandle; + u_int wra_beginoffset; + u_int wra_offset; + u_int wra_totalcount; + struct { + u_int wra_len_u; + char *wra_val_u; + } wra_u; +}; + +struct nfsreaddirargs { + fhandle_t rda_fhandle; + nfscookie rda_cookie; + u_int rda_count; +}; + +struct nfsentry { + u_int ne_fileid; + filename ne_name; + nfscookie ne_cookie; + nfsentry *ne_nextentry; +}; + +struct nfsdirlist { + nfsentry *dl_entries; + bool_t dl_eof; +}; + +struct nfsreaddirres { + nfsstat rdr_status; + union { + nfsdirlist rdr_reply_u; + } rdr_u; +}; + +struct nfsstatfsokres { + u_int sfrok_tsize; + u_int sfrok_bsize; + u_int sfrok_blocks; + u_int sfrok_bfree; + u_int sfrok_bavail; +}; + +struct nfsstatfsres { + nfsstat sfr_status; + union { + nfsstatfsokres sfr_reply_u; + } sfr_u; +}; +#endif /* not _AMU_NFS_PROT_H */ diff --git a/conf/sa_dref/sa_dref_386bsd.h b/conf/sa_dref/sa_dref_386bsd.h new file mode 100644 index 00000000000..2ebadad6353 --- /dev/null +++ b/conf/sa_dref/sa_dref_386bsd.h @@ -0,0 +1,5 @@ +/* $srcdir/conf/sa_dref/sa_dref_386bsd.h */ +#define NFS_SA_DREF(dst, src) { \ + (dst)->addr = (struct sockaddr *) (src); \ + } +#define NFS_ARGS_T_ADDR_IS_POINTER 1 diff --git a/conf/sa_dref/sa_dref_aix3.h b/conf/sa_dref/sa_dref_aix3.h new file mode 100644 index 00000000000..782bcf081d3 --- /dev/null +++ b/conf/sa_dref/sa_dref_aix3.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/sa_dref/sa_dref_aix3.h */ +#define NFS_SA_DREF(dst, src) (dst)->addr = *(src) +/* #undef NFS_ARGS_T_ADDR_IS_POINTER */ diff --git a/conf/sa_dref/sa_dref_aoi.h b/conf/sa_dref/sa_dref_aoi.h new file mode 100644 index 00000000000..4215c04852d --- /dev/null +++ b/conf/sa_dref/sa_dref_aoi.h @@ -0,0 +1,7 @@ +/* $srcdir/conf/sa_dref/sa_dref_aoi.h */ +#define NFS_SA_DREF(dst, src) { \ + (dst)->addr->buf = (char *) (src); \ + (dst)->addr->len = sizeof(struct sockaddr_in); \ + (dst)->addr->maxlen = sizeof(struct sockaddr_in); \ + } +#define NFS_ARGS_T_ADDR_IS_POINTER 1 diff --git a/conf/sa_dref/sa_dref_default.h b/conf/sa_dref/sa_dref_default.h new file mode 100644 index 00000000000..100a04a898a --- /dev/null +++ b/conf/sa_dref/sa_dref_default.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/sa_dref/sa_dref_default.h */ +#define NFS_SA_DREF(dst, src) (dst)->addr = (src) +#define NFS_ARGS_T_ADDR_IS_POINTER 1 diff --git a/conf/sa_dref/sa_dref_isc3.h b/conf/sa_dref/sa_dref_isc3.h new file mode 100644 index 00000000000..43ece8c097c --- /dev/null +++ b/conf/sa_dref/sa_dref_isc3.h @@ -0,0 +1,7 @@ +/* $srcdir/conf/sa_dref/sa_dref_isc3.h */ +#define NFS_SA_DREF(dst, src) { \ + (dst)->raddr.buf = (char *) (src); \ + (dst)->raddr.len = sizeof(struct sockaddr_in); \ + (dst)->trans = 1; \ + } +/* #undef NFS_ARGS_T_ADDR_IS_POINTER */ diff --git a/conf/sa_dref/sa_dref_linux.h b/conf/sa_dref/sa_dref_linux.h new file mode 100644 index 00000000000..50c4c130a75 --- /dev/null +++ b/conf/sa_dref/sa_dref_linux.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/sa_dref/sa_dref_linux.h */ +#define NFS_SA_DREF(dst, src) memmove((char *)&dst->addr, (char *) src, sizeof(struct sockaddr_in)) +/* #undef NFS_ARGS_T_ADDR_IS_POINTER */ diff --git a/conf/sa_dref/sa_dref_svr4.h b/conf/sa_dref/sa_dref_svr4.h new file mode 100644 index 00000000000..c4ecc49ea4f --- /dev/null +++ b/conf/sa_dref/sa_dref_svr4.h @@ -0,0 +1,7 @@ +/* $srcdir/conf/sa_dref/sa_dref_svr4.h */ +#define NFS_SA_DREF(dst, src) { \ + (dst)->addr->buf = (char *) (src); \ + (dst)->addr->len = sizeof(struct sockaddr_in); \ + (dst)->addr->maxlen = sizeof(struct sockaddr_in); \ + } +#define NFS_ARGS_T_ADDR_IS_POINTER 1 diff --git a/conf/transp/transp_sockets.c b/conf/transp/transp_sockets.c index 025e1f3e3cf..b3ad5fc5cbd 100644 --- a/conf/transp/transp_sockets.c +++ b/conf/transp/transp_sockets.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -171,7 +167,7 @@ get_mount_client(char *unused_host, struct sockaddr_in *sin, struct timeval *tv, /* * Bind to a privileged port */ - if (bind_resv_port(*sock, (u_short *) 0) < 0) + if (bind_resv_port(*sock, (u_short *) NULL) < 0) plog(XLOG_ERROR, "can't bind privileged port (socket)"); /* @@ -198,7 +194,7 @@ get_mount_client(char *unused_host, struct sockaddr_in *sin, struct timeval *tv, /* * Bind to a privileged port */ - if (bind_resv_port(*sock, (u_short *) 0) < 0) + if (bind_resv_port(*sock, (u_short *) NULL) < 0) plog(XLOG_ERROR, "can't bind privileged port"); /* @@ -231,13 +227,15 @@ amu_svc_getcaller(SVCXPRT *xprt) /* - * register an RPC server + * Register an RPC server: + * return 1 on success, 0 otherwise. */ int amu_svc_register(SVCXPRT *xprt, u_long prognum, u_long versnum, void (*dispatch)(struct svc_req *rqstp, SVCXPRT *transp), u_long protocol, struct netconfig *dummy) { + /* on Sockets: svc_register returns 1 on success, 0 otherwise */ return svc_register(xprt, prognum, versnum, dispatch, protocol); } @@ -246,9 +244,8 @@ amu_svc_register(SVCXPRT *xprt, u_long prognum, u_long versnum, * Create the nfs service for amd */ int -create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp)) +create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp), u_long nfs_version) { - *soNFSp = socket(AF_INET, SOCK_DGRAM, 0); if (*soNFSp < 0 || bind_resv_port(*soNFSp, nfs_portp) < 0) { @@ -268,9 +265,9 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (* close(*soNFSp); return 1; } - if (!svc_register(*nfs_xprtp, NFS_PROGRAM, NFS_VERSION, dispatch_fxn, 0)) { - plog(XLOG_FATAL, "unable to register (%ld, %ld, 0)", - (u_long) NFS_PROGRAM, (u_long) NFS_VERSION); + if (!svc_register(*nfs_xprtp, NFS_PROGRAM, nfs_version, dispatch_fxn, 0)) { + plog(XLOG_FATAL, "unable to register (%lu, %lu, 0)", + (u_long) NFS_PROGRAM, nfs_version); svc_destroy(*nfs_xprtp); close(*soNFSp); return 3; @@ -386,8 +383,8 @@ int check_pmap_up(char *host, struct sockaddr_in* sin) if (client == (CLIENT *) NULL) { plog(XLOG_ERROR, - "check_pmap_up: cannot create connection to contact portmapper on host \"%s\"%s", - host, clnt_spcreateerror("")); + "%s: cannot create connection to contact portmapper on host \"%s\"%s", + __func__, host, clnt_spcreateerror("")); return 0; } @@ -406,8 +403,8 @@ int check_pmap_up(char *host, struct sockaddr_in* sin) if (clnt_stat == RPC_TIMEDOUT) { plog(XLOG_ERROR, - "check_pmap_up: failed to contact portmapper on host \"%s\": %s", - host, clnt_sperrno(clnt_stat)); + "%s: failed to contact portmapper on host \"%s\": %s", + __func__, host, clnt_sperrno(clnt_stat)); return 0; } return 1; @@ -418,7 +415,7 @@ int check_pmap_up(char *host, struct sockaddr_in* sin) * Find the best NFS version for a host and protocol. */ u_long -get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const char *proto) +get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const char *proto, u_long def) { CLIENT *clnt; int again = 0; @@ -431,68 +428,64 @@ get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const c * If not set or set wrong, then try from NFS_VERS_MAX on down. If * set, then try from nfs_version on down. */ - if (nfs_version <= 0 || nfs_version > NFS_VERS_MAX) { - nfs_version = NFS_VERS_MAX; + if (!nfs_valid_version(nfs_version)) { + if (nfs_valid_version(def)) + nfs_version = def; + else + nfs_version = NFS_VERS_MAX; again = 1; } tv.tv_sec = 2; /* retry every 2 seconds, but also timeout */ tv.tv_usec = 0; -#ifdef HAVE_FS_NFS3 -try_again: -#endif /* HAVE_FS_NFS3 */ + for (; nfs_version >= NFS_VERS_MIN; nfs_version--) { - sock = RPC_ANYSOCK; - errstr = NULL; - if (STREQ(proto, "tcp")) - clnt = clnttcp_create(sin, NFS_PROGRAM, nfs_version, &sock, 0, 0); - else if (STREQ(proto, "udp")) - clnt = clntudp_create(sin, NFS_PROGRAM, nfs_version, tv, &sock); - else - clnt = NULL; + sock = RPC_ANYSOCK; + errstr = NULL; + if (STREQ(proto, "tcp")) + clnt = clnttcp_create(sin, NFS_PROGRAM, nfs_version, &sock, 0, 0); + else if (STREQ(proto, "udp")) + clnt = clntudp_create(sin, NFS_PROGRAM, nfs_version, tv, &sock); + else + clnt = NULL; - if (clnt != NULL) { - /* Try three times (6/2=3) to verify the CLIENT handle. */ - tv.tv_sec = 6; - clnt_stat = clnt_call(clnt, - NFSPROC_NULL, - (XDRPROC_T_TYPE) xdr_void, - 0, - (XDRPROC_T_TYPE) xdr_void, - 0, - tv); + if (clnt != NULL) { + /* Try three times (6/2=3) to verify the CLIENT handle. */ + tv.tv_sec = 6; + clnt_stat = clnt_call(clnt, + NFSPROC_NULL, + (XDRPROC_T_TYPE) xdr_void, + 0, + (XDRPROC_T_TYPE) xdr_void, + 0, + tv); - if (clnt_stat != RPC_SUCCESS) - errstr = clnt_sperrno(clnt_stat); + if (clnt_stat != RPC_SUCCESS) + errstr = clnt_sperrno(clnt_stat); - close(sock); - clnt_destroy(clnt); - } else { -#ifdef HAVE_CLNT_SPCREATEERROR - errstr = clnt_spcreateerror(""); -#else /* not HAVE_CLNT_SPCREATEERROR */ - errstr = ""; -#endif /* not HAVE_CLNT_SPCREATEERROR */ - } - - if (errstr) { - plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s%s", - (int) nfs_version, proto, host, errstr); - if (again) { -#ifdef HAVE_FS_NFS3 - if (nfs_version == NFS_VERSION3) { - nfs_version = NFS_VERSION; - again = 0; - plog(XLOG_INFO, "get_nfs_version trying a lower version: NFS(%d,%s)", (int) nfs_version, proto); - } - goto try_again; -#endif /* HAVE_FS_NFS3 */ + close(sock); + clnt_destroy(clnt); + if (clnt_stat == RPC_SUCCESS) + break; + } else { + #ifdef HAVE_CLNT_SPCREATEERROR + errstr = clnt_spcreateerror(""); + #else /* not HAVE_CLNT_SPCREATEERROR */ + errstr = ""; + #endif /* not HAVE_CLNT_SPCREATEERROR */ + } + + if (errstr) { + plog(XLOG_INFO, "%s: NFS(%lu,%s) failed for %s: %s", __func__, + nfs_version, proto, host, errstr); } - return 0; } - plog(XLOG_INFO, "get_nfs_version: returning NFS(%d,%s) on host %s", - (int) nfs_version, proto, host); + if (nfs_version < NFS_VERS_MIN) + nfs_version = 0; + + plog(XLOG_INFO, "%s: returning NFS(%lu,%s) on host %s", __func__, + nfs_version, proto, host); return nfs_version; } diff --git a/conf/transp/transp_tli.c b/conf/transp/transp_tli.c new file mode 100644 index 00000000000..d26a511bfe4 --- /dev/null +++ b/conf/transp/transp_tli.c @@ -0,0 +1,924 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/transp/transp_tli.c + * + * TLI specific utilities. + * -Erez Zadok + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +struct netconfig *nfsncp; + + +/* + * find the IP address that can be used to connect to the local host + */ +void +amu_get_myaddress(struct in_addr *iap, const char *preferred_localhost) +{ + int ret; + voidp handlep; + struct netconfig *ncp; + struct nd_addrlist *addrs = (struct nd_addrlist *) NULL; + struct nd_hostserv service; + + handlep = setnetconfig(); + ncp = getnetconfig(handlep); + service.h_host = (preferred_localhost ? (char *) preferred_localhost : HOST_SELF_CONNECT); + service.h_serv = (char *) NULL; + + ret = netdir_getbyname(ncp, &service, &addrs); + + if (ret || !addrs || addrs->n_cnt < 1) { + plog(XLOG_FATAL, "cannot get local host address. using 127.0.0.1"); + iap->s_addr = htonl(INADDR_LOOPBACK); + } else { + /* + * XXX: there may be more more than one address for this local + * host. Maybe something can be done with those. + */ + struct sockaddr_in *sinp = (struct sockaddr_in *) addrs->n_addrs[0].buf; + char dq[20]; + if (preferred_localhost) + plog(XLOG_INFO, "localhost_address \"%s\" requested, using %s", + preferred_localhost, inet_dquad(dq, sizeof(dq), iap->s_addr)); + iap->s_addr = sinp->sin_addr.s_addr; /* XXX: used to be htonl() */ + } + + endnetconfig(handlep); /* free's up internal resources too */ + netdir_free((voidp) addrs, ND_ADDRLIST); +} + + +/* + * How to bind to reserved ports. + * TLI handle (socket) and port version. + */ +int +bind_resv_port(int td, u_short *pp) +{ + int rc = -1, port; + struct t_bind *treq, *tret; + struct sockaddr_in *sin; + + treq = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR); + if (!treq) { + plog(XLOG_ERROR, "t_alloc req"); + return -1; + } + tret = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR); + if (!tret) { + t_free((char *) treq, T_BIND); + plog(XLOG_ERROR, "t_alloc ret"); + return -1; + } + memset((char *) treq->addr.buf, 0, treq->addr.len); + sin = (struct sockaddr_in *) treq->addr.buf; + sin->sin_family = AF_INET; + treq->qlen = 64; /* 0 is ok for udp, for tcp you need qlen>0 */ + treq->addr.len = treq->addr.maxlen; + errno = EADDRINUSE; + port = IPPORT_RESERVED; + + do { + --port; + sin->sin_port = htons(port); + rc = t_bind(td, treq, tret); + if (rc < 0) { + plog(XLOG_ERROR, "t_bind"); + } else { + if (memcmp(treq->addr.buf, tret->addr.buf, tret->addr.len) == 0) + break; + else + t_unbind(td); + } + } while ((rc < 0 || errno == EADDRINUSE) && (int) port > IPPORT_RESERVED / 2); + + if (pp) { + if (rc == 0) + *pp = port; + else + plog(XLOG_ERROR, "could not t_bind to any reserved port"); + } + t_free((char *) tret, T_BIND); + t_free((char *) treq, T_BIND); + return rc; +} + + + + +/* + * close a descriptor, TLI style + */ +int +amu_close(int fd) +{ + return t_close(fd); +} + + +/* + * Create an rpc client attached to the mount daemon. + */ +CLIENT * +get_mount_client(char *host, struct sockaddr_in *unused_sin, struct timeval *tv, int *sock, u_long mnt_version) +{ + CLIENT *client; + struct netbuf nb; + struct netconfig *nc = NULL; + struct sockaddr_in sin; + + nb.maxlen = sizeof(sin); + nb.buf = (char *) &sin; + + /* + * First try a TCP handler + */ + + /* + * Find mountd address on TCP + */ + if ((nc = getnetconfigent(NC_TCP)) == NULL) { + plog(XLOG_ERROR, "getnetconfig for tcp failed: %s", nc_sperror()); + goto tryudp; + } + if (!rpcb_getaddr(MOUNTPROG, mnt_version, nc, &nb, host)) { + /* + * don't print error messages here, since mountd might legitimately + * serve udp only + */ + goto tryudp; + } + /* + * Create privileged TCP socket + */ + *sock = t_open(nc->nc_device, O_RDWR, 0); + + if (*sock < 0) { + plog(XLOG_ERROR, "t_open %s: %m", nc->nc_device); + goto tryudp; + } + if (bind_resv_port(*sock, (u_short *) NULL) < 0) + plog(XLOG_ERROR, "couldn't bind mountd socket to privileged port"); + + if ((client = clnt_vc_create(*sock, &nb, MOUNTPROG, mnt_version, 0, 0)) + == (CLIENT *) NULL) { + plog(XLOG_ERROR, "clnt_vc_create failed"); + t_close(*sock); + goto tryudp; + } + /* tcp succeeded */ + dlog("get_mount_client: using tcp, port %d", sin.sin_port); + if (nc) + freenetconfigent(nc); + return client; + +tryudp: + /* first free possibly previously allocated netconfig entry */ + if (nc) + freenetconfigent(nc); + + /* + * TCP failed so try UDP + */ + + /* + * Find mountd address on UDP + */ + if ((nc = getnetconfigent(NC_UDP)) == NULL) { + plog(XLOG_ERROR, "getnetconfig for udp failed: %s", nc_sperror()); + goto badout; + } + if (!rpcb_getaddr(MOUNTPROG, mnt_version, nc, &nb, host)) { + plog(XLOG_ERROR, "%s", + clnt_spcreateerror("couldn't get mountd address on udp")); + goto badout; + } + /* + * Create privileged UDP socket + */ + *sock = t_open(nc->nc_device, O_RDWR, 0); + + if (*sock < 0) { + plog(XLOG_ERROR, "t_open %s: %m", nc->nc_device); + goto badout; /* neither tcp not udp succeeded */ + } + if (bind_resv_port(*sock, (u_short *) NULL) < 0) + plog(XLOG_ERROR, "couldn't bind mountd socket to privileged port"); + + if ((client = clnt_dg_create(*sock, &nb, MOUNTPROG, mnt_version, 0, 0)) + == (CLIENT *) NULL) { + plog(XLOG_ERROR, "clnt_dg_create failed"); + t_close(*sock); + goto badout; /* neither tcp not udp succeeded */ + } + if (clnt_control(client, CLSET_RETRY_TIMEOUT, (char *) tv) == FALSE) { + plog(XLOG_ERROR, "clnt_control CLSET_RETRY_TIMEOUT for udp failed"); + clnt_destroy(client); + goto badout; /* neither tcp not udp succeeded */ + } + /* udp succeeded */ + dlog("get_mount_client: using udp, port %d", sin.sin_port); + return client; + +badout: + /* failed */ + if (nc) + freenetconfigent(nc); + return NULL; +} + + +#ifdef NOT_NEEDED_ON_TLI_SYSTEMS +/* + * find the address of the caller of an RPC procedure. + */ +struct sockaddr_in * +amu_svc_getcaller(SVCXPRT *xprt) +{ + /* + * On TLI systems we don't use an INET network type, but a "ticlts" (see + * /etc/netconfig). This means that packets could only come from the + * loopback interface, and we don't need to check them and filter possibly + * spoofed packets. Therefore we simply return NULL here, and the caller + * will ignore the result. + */ + return NULL; /* tell called to ignore check */ +} +#endif /* NOT_NEEDED_ON_TLI_SYSTEMS */ + + +/* + * Register an RPC server: + * return 1 on success, 0 otherwise. + */ +int +amu_svc_register(SVCXPRT *xprt, u_long prognum, u_long versnum, + void (*dispatch)(struct svc_req *rqstp, SVCXPRT *xprt), + u_long protocol, struct netconfig *ncp) +{ + /* on TLI: svc_reg returns 1 on success, 0 otherwise */ + return svc_reg(xprt, prognum, versnum, dispatch, ncp); +} + + +/* + * Bind to reserved UDP port, for NFS service only. + * Port-only version. + */ +static int +bind_resv_port_only_udp(u_short *pp) +{ + int td, rc = -1, port; + struct t_bind *treq, *tret; + struct sockaddr_in *sin; + extern char *t_errlist[]; + extern int t_errno; + struct netconfig *nc = (struct netconfig *) NULL; + voidp nc_handle; + + if ((nc_handle = setnetconfig()) == (voidp) NULL) { + plog(XLOG_ERROR, "Cannot rewind netconfig: %s", nc_sperror()); + return -1; + } + /* + * Search the netconfig table for INET/UDP. + * This loop will terminate if there was an error in the /etc/netconfig + * file or if you reached the end of the file without finding the udp + * device. Either way your machine has probably far more problems (for + * example, you cannot have nfs v2 w/o UDP). + */ + while (1) { + if ((nc = getnetconfig(nc_handle)) == (struct netconfig *) NULL) { + plog(XLOG_ERROR, "Error accessing getnetconfig: %s", nc_sperror()); + endnetconfig(nc_handle); + return -1; + } + if (STREQ(nc->nc_protofmly, NC_INET) && + STREQ(nc->nc_proto, NC_UDP)) + break; + } + + /* + * This is the primary reason for the getnetconfig code above: to get the + * correct device name to udp, and t_open a descriptor to be used in + * t_bind below. + */ + td = t_open(nc->nc_device, O_RDWR, (struct t_info *) NULL); + endnetconfig(nc_handle); + + if (td < 0) { + plog(XLOG_ERROR, "t_open failed: %d: %s", t_errno, t_errlist[t_errno]); + return -1; + } + treq = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR); + if (!treq) { + plog(XLOG_ERROR, "t_alloc req"); + return -1; + } + tret = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR); + if (!tret) { + t_free((char *) treq, T_BIND); + plog(XLOG_ERROR, "t_alloc ret"); + return -1; + } + memset((char *) treq->addr.buf, 0, treq->addr.len); + sin = (struct sockaddr_in *) treq->addr.buf; + sin->sin_family = AF_INET; + treq->qlen = 64; /* 0 is ok for udp, for tcp you need qlen>0 */ + treq->addr.len = treq->addr.maxlen; + errno = EADDRINUSE; + + if (pp && *pp > 0) { + sin->sin_port = htons(*pp); + rc = t_bind(td, treq, tret); + } else { + port = IPPORT_RESERVED; + + do { + --port; + sin->sin_port = htons(port); + rc = t_bind(td, treq, tret); + if (rc < 0) { + plog(XLOG_ERROR, "t_bind for port %d: %s", port, t_errlist[t_errno]); + } else { + if (memcmp(treq->addr.buf, tret->addr.buf, tret->addr.len) == 0) + break; + else + t_unbind(td); + } + } while ((rc < 0 || errno == EADDRINUSE) && (int) port > IPPORT_RESERVED / 2); + + if (pp && rc == 0) + *pp = port; + } + + t_free((char *) tret, T_BIND); + t_free((char *) treq, T_BIND); + return rc; +} + + +/* + * Bind NFS to a reserved port. + */ +static int +bind_nfs_port(int unused_so, u_short *nfs_portp) +{ + u_short port = 0; + int error = bind_resv_port_only_udp(&port); + + if (error == 0) + *nfs_portp = port; + return error; +} + + +/* + * Create the nfs service for amd + * return 0 (TRUE) if OK, 1 (FALSE) if failed. + */ +int +create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp), u_long nfs_version) +{ + char *nettype = "ticlts"; + + nfsncp = getnetconfigent(nettype); + if (nfsncp == NULL) { + plog(XLOG_ERROR, "cannot getnetconfigent for %s", nettype); + /* failed with ticlts, try plain udp (hpux11) */ + nettype = "udp"; + nfsncp = getnetconfigent(nettype); + if (nfsncp == NULL) { + plog(XLOG_ERROR, "cannot getnetconfigent for %s", nettype); + return 1; + } + } + *nfs_xprtp = svc_tli_create(RPC_ANYFD, nfsncp, NULL, 0, 0); + if (*nfs_xprtp == NULL) { + plog(XLOG_ERROR, "cannot create nfs tli service for amd"); + return 1; + } + + /* + * Get the service file descriptor and check its number to see if + * the t_open failed. If it succeeded, then go on to binding to a + * reserved nfs port. + */ + *soNFSp = (*nfs_xprtp)->xp_fd; + if (*soNFSp < 0 || bind_nfs_port(*soNFSp, nfs_portp) < 0) { + plog(XLOG_ERROR, "Can't create privileged nfs port (TLI)"); + svc_destroy(*nfs_xprtp); + return 1; + } + if (svc_reg(*nfs_xprtp, NFS_PROGRAM, nfs_version, dispatch_fxn, NULL) != 1) { + plog(XLOG_ERROR, "could not register amd NFS service"); + svc_destroy(*nfs_xprtp); + return 1; + } + + return 0; /* all is well */ +} + + +/* + * Bind to preferred AMQ port. + */ +static int +bind_preferred_amq_port(u_short pref_port, + const struct netconfig *ncp, + struct t_bind **tretpp) +{ + int td = -1, rc = -1; + struct t_bind *treq; + struct sockaddr_in *sin, *sin2; + extern char *t_errlist[]; + extern int t_errno; + + if (!ncp) { + plog(XLOG_ERROR, "null ncp"); + return -1; + } + + td = t_open(ncp->nc_device, O_RDWR, (struct t_info *) NULL); + if (td < 0) { + plog(XLOG_ERROR, "t_open failed: %d: %s", t_errno, t_errlist[t_errno]); + return -1; + } + treq = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR); + if (!treq) { + plog(XLOG_ERROR, "t_alloc req"); + return -1; + } + *tretpp = (struct t_bind *) t_alloc(td, T_BIND, T_ADDR); + if (!*tretpp) { + t_free((char *) treq, T_BIND); + plog(XLOG_ERROR, "t_alloc tretpp"); + return -1; + } + memset((char *) treq->addr.buf, 0, treq->addr.len); + sin = (struct sockaddr_in *) treq->addr.buf; + sin->sin_family = AF_INET; + treq->qlen = 64; /* must be greater than 0 to work for TCP connections */ + treq->addr.len = treq->addr.maxlen; + + if (pref_port > 0) { + sin->sin_port = htons(pref_port); + sin->sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* XXX: may not be needed */ + rc = t_bind(td, treq, *tretpp); + if (rc < 0) { + plog(XLOG_ERROR, "t_bind return err %d", rc); + goto out; + } + /* check if we got the port we asked for */ + sin2 = (struct sockaddr_in *) (*tretpp)->addr.buf; + if (sin->sin_port != sin2->sin_port) { + plog(XLOG_ERROR, "asked for port %d, got different one (%d)", + ntohs(sin->sin_port), ntohs(sin2->sin_port)); + t_errno = TNOADDR; /* XXX: is this correct? */ + rc = -1; + goto out; + } + if (sin->sin_addr.s_addr != sin2->sin_addr.s_addr) { + plog(XLOG_ERROR, "asked for address %x, got different one (%x)", + (int) ntohl(sin->sin_addr.s_addr), (int) ntohl(sin2->sin_addr.s_addr)); + t_errno = TNOADDR; /* XXX: is this correct? */ + rc = -1; + goto out; + } + } +out: + t_free((char *) treq, T_BIND); + return (rc < 0 ? rc : td); +} + + +/* + * Create the amq service for amd (both TCP and UDP) + */ +int +create_amq_service(int *udp_soAMQp, + SVCXPRT **udp_amqpp, + struct netconfig **udp_amqncpp, + int *tcp_soAMQp, + SVCXPRT **tcp_amqpp, + struct netconfig **tcp_amqncpp, + u_short preferred_amq_port) +{ + /* + * (partially) create the amq service for amd + * to be completed further in by caller. + * XXX: is this "partially" still true?! See amd/nfs_start.c. -Erez + */ + + /* first create the TCP service */ + if (tcp_amqncpp) + if ((*tcp_amqncpp = getnetconfigent(NC_TCP)) == NULL) { + plog(XLOG_ERROR, "cannot getnetconfigent for %s", NC_TCP); + return 1; + } + + if (tcp_amqpp) { + if (preferred_amq_port > 0) { + struct t_bind *tbp = NULL; + int sock; + + plog(XLOG_INFO, "requesting preferred amq TCP port %d", preferred_amq_port); + sock = bind_preferred_amq_port(preferred_amq_port, *tcp_amqncpp, &tbp); + if (sock < 0) { + plog(XLOG_ERROR, "bind_preferred_amq_port failed for TCP port %d: %s", + preferred_amq_port, t_errlist[t_errno]); + return 1; + } + *tcp_amqpp = svc_tli_create(sock, *tcp_amqncpp, tbp, 0, 0); + if (*tcp_amqpp != NULL) + plog(XLOG_INFO, "amq service bound to TCP port %d", preferred_amq_port); + t_free((char *) tbp, T_BIND); + } else { + /* select any port */ + *tcp_amqpp = svc_tli_create(RPC_ANYFD, *tcp_amqncpp, NULL, 0, 0); + } + if (*tcp_amqpp == NULL) { + plog(XLOG_ERROR, "cannot create (tcp) tli service for amq"); + return 1; + } + } + if (tcp_soAMQp && tcp_amqpp) + *tcp_soAMQp = (*tcp_amqpp)->xp_fd; + + /* next create the UDP service */ + if (udp_amqncpp) + if ((*udp_amqncpp = getnetconfigent(NC_UDP)) == NULL) { + plog(XLOG_ERROR, "cannot getnetconfigent for %s", NC_UDP); + return 1; + } + if (udp_amqpp) { + if (preferred_amq_port > 0) { + struct t_bind *tbp = NULL; + int sock; + + plog(XLOG_INFO, "requesting preferred amq UDP port %d", preferred_amq_port); + sock = bind_preferred_amq_port(preferred_amq_port, *udp_amqncpp, &tbp); + if (sock < 0) { + plog(XLOG_ERROR, "bind_preferred_amq_port failed for UDP port %d: %s", + preferred_amq_port, t_errlist[t_errno]); + return 1; + } + *udp_amqpp = svc_tli_create(sock, *udp_amqncpp, tbp, 0, 0); + if (*udp_amqpp != NULL) + plog(XLOG_INFO, "amq service bound to UDP port %d", preferred_amq_port); + t_free((char *) tbp, T_BIND); + } else { + /* select any port */ + *udp_amqpp = svc_tli_create(RPC_ANYFD, *udp_amqncpp, NULL, 0, 0); + } + if (*udp_amqpp == NULL) { + plog(XLOG_ERROR, "cannot create (udp) tli service for amq"); + return 1; + } + } + if (udp_soAMQp && udp_amqpp) + *udp_soAMQp = (*udp_amqpp)->xp_fd; + + return 0; /* all is well */ +} + + +/* + * Find netconfig info for TCP/UDP device, and fill in the knetconfig + * structure. If in_ncp is not NULL, use that instead of defaulting + * to a TCP/UDP service. If in_ncp is NULL, then use the service type + * specified in nc_protoname (which may be either "tcp" or "udp"). If + * nc_protoname is NULL, default to UDP. + */ +int +get_knetconfig(struct knetconfig **kncpp, struct netconfig *in_ncp, char *nc_protoname) +{ + struct netconfig *ncp = NULL; + struct stat statbuf; + + if (in_ncp) + ncp = in_ncp; + else { + if (nc_protoname) + ncp = getnetconfigent(nc_protoname); + else + ncp = getnetconfigent(NC_UDP); + } + if (!ncp) + return -2; + + *kncpp = (struct knetconfig *) xzalloc(sizeof(struct knetconfig)); + if (*kncpp == (struct knetconfig *) NULL) { + if (!in_ncp) + freenetconfigent(ncp); + return -3; + } + (*kncpp)->knc_semantics = ncp->nc_semantics; + (*kncpp)->knc_protofmly = xstrdup(ncp->nc_protofmly); + (*kncpp)->knc_proto = xstrdup(ncp->nc_proto); + + if (stat(ncp->nc_device, &statbuf) < 0) { + plog(XLOG_ERROR, "could not stat() %s: %m", ncp->nc_device); + XFREE(*kncpp); + *kncpp = NULL; + if (!in_ncp) + freenetconfigent(ncp); + return -3; /* amd will end (free not needed) */ + } + (*kncpp)->knc_rdev = (dev_t) statbuf.st_rdev; + if (!in_ncp) { /* free only if argument not passed */ + freenetconfigent(ncp); + ncp = NULL; + } + return 0; +} + + +/* + * Free a previously allocated knetconfig structure. + */ +void +free_knetconfig(struct knetconfig *kncp) +{ + if (kncp) { + if (kncp->knc_protofmly) + XFREE(kncp->knc_protofmly); + if (kncp->knc_proto) + XFREE(kncp->knc_proto); + XFREE(kncp); + kncp = (struct knetconfig *) NULL; + } +} + + +/* + * Check if the portmapper is running and reachable: 0==down, 1==up + */ +int check_pmap_up(char *host, struct sockaddr_in* sin) +{ + CLIENT *client; + enum clnt_stat clnt_stat = RPC_TIMEDOUT; /* assume failure */ + int socket = RPC_ANYSOCK; + struct timeval timeout; + + timeout.tv_sec = 2; + timeout.tv_usec = 0; + sin->sin_port = htons(PMAPPORT); + client = clntudp_create(sin, PMAPPROG, PMAPVERS, timeout, &socket); + if (client == (CLIENT *) NULL) { + plog(XLOG_ERROR, + "check_pmap_up: cannot create connection to contact portmapper on host \"%s\"%s", + host, clnt_spcreateerror("")); + return 0; + } + + timeout.tv_sec = 6; + /* Ping the portmapper on a remote system by calling the nullproc */ + clnt_stat = clnt_call(client, + PMAPPROC_NULL, + (XDRPROC_T_TYPE) xdr_void, + NULL, + (XDRPROC_T_TYPE) xdr_void, + NULL, + timeout); + clnt_destroy(client); + close(socket); + sin->sin_port = 0; + + if (clnt_stat == RPC_TIMEDOUT) { + plog(XLOG_ERROR, + "check_pmap_up: failed to contact portmapper on host \"%s\": %s", + host, clnt_sperrno(clnt_stat)); + return 0; + } + return 1; +} + + +/* + * Find the best NFS version for a host. + */ +u_long +get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const char *proto, u_long def) +{ + CLIENT *clnt = NULL; + rpcvers_t versout; + struct timeval tv; + + /* + * If not set or set wrong, then try from NFS_VERS_MAX on down. If + * set, then try from nfs_version on down. + */ + if (!nfs_valid_version(nfs_version)) + if (nfs_valid_version(def)) + nfs_version = def; + else + nfs_version = NFS_VERS_MAX; + } + + if (nfs_version == NFS_VERSION) { + dlog("get_nfs_version trying NFS(%d,%s) for %s", + (int) nfs_version, proto, host); + } else { + dlog("get_nfs_version trying NFS(%d-%d,%s) for %s", + (int) NFS_VERSION, (int) nfs_version, proto, host); + } + + /* 3 seconds is more than enough for a LAN */ + memset(&tv, 0, sizeof(tv)); + tv.tv_sec = 3; + tv.tv_usec = 0; + +#ifdef HAVE_CLNT_CREATE_VERS_TIMED + clnt = clnt_create_vers_timed(host, NFS_PROGRAM, &versout, NFS_VERSION, nfs_version, proto, &tv); +#else /* not HAVE_CLNT_CREATE_VERS_TIMED */ + clnt = clnt_create_vers(host, NFS_PROGRAM, &versout, NFS_VERSION, nfs_version, proto); +#endif /* not HAVE_CLNT_CREATE_VERS_TIMED */ + + if (clnt == NULL) { + if (nfs_version == NFS_VERSION) + plog(XLOG_INFO, "get_nfs_version NFS(%d,%s) failed for %s: %s", + (int) nfs_version, proto, host, clnt_spcreateerror("")); + else + plog(XLOG_INFO, "get_nfs_version NFS(%d-%d,%s) failed for %s: %s", + (int) NFS_VERSION, (int) nfs_version, proto, host, clnt_spcreateerror("")); + return 0; + } + clnt_destroy(clnt); + + return versout; +} + + +#if defined(HAVE_FS_AUTOFS) && defined(AUTOFS_PROG) +/* + * find the IP address that can be used to connect autofs service to. + */ +static int +get_autofs_address(struct netconfig *ncp, struct t_bind *tbp) +{ + int ret; + struct nd_addrlist *addrs = (struct nd_addrlist *) NULL; + struct nd_hostserv service; + + service.h_host = HOST_SELF_CONNECT; + service.h_serv = "autofs"; + + ret = netdir_getbyname(ncp, &service, &addrs); + + if (ret) { + plog(XLOG_FATAL, "get_autofs_address: cannot get local host address: %s", netdir_sperror()); + goto out; + } + + /* + * XXX: there may be more more than one address for this local + * host. Maybe something can be done with those. + */ + tbp->addr.len = addrs->n_addrs->len; + tbp->addr.maxlen = addrs->n_addrs->len; + memcpy(tbp->addr.buf, addrs->n_addrs->buf, addrs->n_addrs->len); + /* + * qlen should not be zero for TCP connections. It's not clear what it + * should be for UDP connections, but setting it to something like 64 seems + * to be the safe value that works. + */ + tbp->qlen = 64; + + /* all OK */ + netdir_free((voidp) addrs, ND_ADDRLIST); + +out: + return ret; +} + + +/* + * Register the autofs service for amd + */ +int +register_autofs_service(char *autofs_conftype, + void (*autofs_dispatch)(struct svc_req *rqstp, SVCXPRT *xprt)) +{ + struct t_bind *tbp = NULL; + struct netconfig *autofs_ncp; + SVCXPRT *autofs_xprt = NULL; + int fd = -1, err = 1; /* assume failed */ + + plog(XLOG_INFO, "registering autofs service: %s", autofs_conftype); + autofs_ncp = getnetconfigent(autofs_conftype); + if (autofs_ncp == NULL) { + plog(XLOG_ERROR, "register_autofs_service: cannot getnetconfigent for %s", autofs_conftype); + goto out; + } + + fd = t_open(autofs_ncp->nc_device, O_RDWR, NULL); + if (fd < 0) { + plog(XLOG_ERROR, "register_autofs_service: t_open failed (%s)", + t_errlist[t_errno]); + goto out; + } + + tbp = (struct t_bind *) t_alloc(fd, T_BIND, T_ADDR); + if (!tbp) { + plog(XLOG_ERROR, "register_autofs_service: t_alloc failed"); + goto out; + } + + if (get_autofs_address(autofs_ncp, tbp) != 0) { + plog(XLOG_ERROR, "register_autofs_service: get_autofs_address failed"); + goto out; + } + + autofs_xprt = svc_tli_create(fd, autofs_ncp, tbp, 0, 0); + if (autofs_xprt == NULL) { + plog(XLOG_ERROR, "cannot create autofs tli service for amd"); + goto out; + } + + rpcb_unset(AUTOFS_PROG, AUTOFS_VERS, autofs_ncp); + if (svc_reg(autofs_xprt, AUTOFS_PROG, AUTOFS_VERS, autofs_dispatch, autofs_ncp) == FALSE) { + plog(XLOG_ERROR, "could not register amd AUTOFS service"); + goto out; + } + err = 0; + goto really_out; + +out: + if (autofs_ncp) + freenetconfigent(autofs_ncp); + if (autofs_xprt) + SVC_DESTROY(autofs_xprt); + else { + if (fd > 0) + t_close(fd); + } + +really_out: + if (tbp) + t_free((char *) tbp, T_BIND); + + dlog("register_autofs_service: returning %d\n", err); + return err; +} + + +int +unregister_autofs_service(char *autofs_conftype) +{ + struct netconfig *autofs_ncp; + int err = 1; + + plog(XLOG_INFO, "unregistering autofs service listener: %s", autofs_conftype); + + autofs_ncp = getnetconfigent(autofs_conftype); + if (autofs_ncp == NULL) { + plog(XLOG_ERROR, "destroy_autofs_service: cannot getnetconfigent for %s", autofs_conftype); + goto out; + } + +out: + rpcb_unset(AUTOFS_PROG, AUTOFS_VERS, autofs_ncp); + return err; +} +#endif /* HAVE_FS_AUTOFS && AUTOFS_PROG */ diff --git a/conf/trap/trap_aix3.h b/conf/trap/trap_aix3.h new file mode 100644 index 00000000000..3268eff9ecf --- /dev/null +++ b/conf/trap/trap_aix3.h @@ -0,0 +1,5 @@ +/* $srcdir/conf/trap/trap_aix3.h */ +extern int mount_aix3(char *fsname, char *dir, int flags, int type, void *data, char *mnt_opts); +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_aix3(mnt->mnt_fsname, mnt->mnt_dir, flags, type, mnt_data, mnt->mnt_opts) +/* there is no other better place for this missing external definition */ +extern int uvmount(int VirtualFileSystemID, int Flag); diff --git a/conf/trap/trap_aux.h b/conf/trap/trap_aux.h new file mode 100644 index 00000000000..7aa84cd5d4c --- /dev/null +++ b/conf/trap/trap_aux.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/trap/trap_aux.h */ +#define MOUNT_TRAP(type, mnt, flags, mnt_data) fsmount(type, mnt->mnt_dir, flags, mnt_data) diff --git a/conf/trap/trap_dgux.h b/conf/trap/trap_dgux.h new file mode 100644 index 00000000000..e924dcbeca3 --- /dev/null +++ b/conf/trap/trap_dgux.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/trap/trap_dgux.h */ +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_dgux(type, mnt->mnt_dir, flags, mnt_data) diff --git a/conf/trap/trap_freebsd3.h b/conf/trap/trap_freebsd3.h deleted file mode 100644 index 95c664254c0..00000000000 --- a/conf/trap/trap_freebsd3.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $srcdir/conf/trap/trap_freebsd3.h */ -extern int mount_freebsd3(MTYPE_TYPE type, const char *dir, int flags, voidp data); -#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_freebsd3(type, mnt->mnt_dir, flags, mnt_data) diff --git a/conf/trap/trap_hcx.h b/conf/trap/trap_hcx.h new file mode 100644 index 00000000000..0a51462cd11 --- /dev/null +++ b/conf/trap/trap_hcx.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/trap/trap_hcx.h */ +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mountsyscall(type, mnt->mnt_dir, flags, mnt_data) diff --git a/conf/trap/trap_hpux.h b/conf/trap/trap_hpux.h new file mode 100644 index 00000000000..ba6352afa49 --- /dev/null +++ b/conf/trap/trap_hpux.h @@ -0,0 +1,15 @@ +/* $srcdir/conf/trap/trap_hpux.h */ +extern int mount_hpux(MTYPE_TYPE type, const char *dir, int flags, caddr_t data); +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_hpux(type, mnt->mnt_dir, flags, mnt_data) + +/* + * HPUX 9.x does is not even consistently inconsistent with itself. + * It defines an integer mount type for PCFS, but not a string type as + * with all other mount types. + * + * XXX: remove this ugly hack when HPUX 9.0 is defunct. + */ +#if MOUNT_TYPE_PCFS == MOUNT_PC +# undef MOUNT_TYPE_PCFS +# define MOUNT_TYPE_PCFS "pcfs" +#endif /* MOUNT_TYPE_PCFS == MOUNT_PC */ diff --git a/conf/trap/trap_irix.h b/conf/trap/trap_irix.h new file mode 100644 index 00000000000..e2a7fb6a5e8 --- /dev/null +++ b/conf/trap/trap_irix.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/trap/trap_irix.h */ +extern int mount_irix(char *fsname, char *dir, int flags, MTYPE_TYPE type, voidp data); +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_irix(mnt->mnt_fsname, mnt->mnt_dir, flags, type, mnt_data) diff --git a/conf/trap/trap_isc3.h b/conf/trap/trap_isc3.h new file mode 100644 index 00000000000..8618a86ce58 --- /dev/null +++ b/conf/trap/trap_isc3.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/trap/trap_isc3.h */ +extern int mount_isc3(char *fsname, char *dir, int flags, int type, void *data); +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_isc3(mnt->mnt_fsname, mnt->mnt_dir, flags, type, mnt_data) diff --git a/conf/trap/trap_linux.h b/conf/trap/trap_linux.h new file mode 100644 index 00000000000..accec3f1c24 --- /dev/null +++ b/conf/trap/trap_linux.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/trap/trap_linux.h */ +extern int mount_linux(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data); +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_linux(type, mnt, flags, mnt_data) diff --git a/conf/trap/trap_mach3.h b/conf/trap/trap_mach3.h new file mode 100644 index 00000000000..65af3a705d5 --- /dev/null +++ b/conf/trap/trap_mach3.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/trap/trap_mach3.h */ +extern int mount_mach3(char *type, char *mnt, int flags, caddr_t mnt_data); +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_mach(type, mnt, flags, mnt_data) diff --git a/conf/trap/trap_netbsd.h b/conf/trap/trap_netbsd.h new file mode 100644 index 00000000000..8dd2846d446 --- /dev/null +++ b/conf/trap/trap_netbsd.h @@ -0,0 +1,6 @@ +/* $srcdir/conf/trap/trap_netbsd.h */ +#if __NetBSD_Version__ >= 499002300 +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount(type, mnt->mnt_dir, flags, mnt_data, 0) +#else +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount(type, mnt->mnt_dir, flags, mnt_data) +#endif diff --git a/conf/trap/trap_news4.h b/conf/trap/trap_news4.h new file mode 100644 index 00000000000..76cd429f5f3 --- /dev/null +++ b/conf/trap/trap_news4.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/trap/trap_news4.h */ +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount(type, mnt->mnt_dir, M_NEWTYPE | flags, mnt_data) diff --git a/conf/trap/trap_rtu6.h b/conf/trap/trap_rtu6.h new file mode 100644 index 00000000000..1f9c6e51975 --- /dev/null +++ b/conf/trap/trap_rtu6.h @@ -0,0 +1,2 @@ +/* $srcdir/conf/trap/trap_rtu6.h */ +#define MOUNT_TRAP(type, mnt, flags, mnt_data) vmount(type, mnt->mnt_dir, flags, mnt_data) diff --git a/conf/trap/trap_stellix.h b/conf/trap/trap_stellix.h new file mode 100644 index 00000000000..5a0848e3673 --- /dev/null +++ b/conf/trap/trap_stellix.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/trap/trap_stellix.h */ +extern int mount_stellix(char *fsname, char *dir, int flags, int type, void *data); +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_stellix(mnt->mnt_fsname, mnt->mnt_dir, flags, type, mnt_data) diff --git a/conf/trap/trap_svr4.h b/conf/trap/trap_svr4.h new file mode 100644 index 00000000000..ed8817a867d --- /dev/null +++ b/conf/trap/trap_svr4.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/trap/trap_svr4.h */ +extern int mount_svr4(char *fsname, char *dir, int flags, MTYPE_TYPE type, caddr_t data, const char *optstr); +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount_svr4(mnt->mnt_fsname, mnt->mnt_dir, flags, type, mnt_data, mnt->mnt_opts) diff --git a/conf/trap/trap_ultrix.h b/conf/trap/trap_ultrix.h new file mode 100644 index 00000000000..d5cbbdbd6e9 --- /dev/null +++ b/conf/trap/trap_ultrix.h @@ -0,0 +1,3 @@ +/* $srcdir/conf/trap/trap_ultrix.h */ +/* arg 3 to mount(2) is rwflag */ +#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount(mnt->mnt_fsname, mnt->mnt_dir, flags & MNT2_GEN_OPT_RONLY, type, mnt_data) diff --git a/conf/umount/umount_aix.c b/conf/umount/umount_aix.c new file mode 100644 index 00000000000..f863681ffc4 --- /dev/null +++ b/conf/umount/umount_aix.c @@ -0,0 +1,197 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/umount/umount_aix.c + * + */ + +/* + * AIX method of unmounting filesystems. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +int +umount_fs(char *mntdir, const char *mnttabname, u_int unmount_flags) +{ + mntlist *mlist, *mp, *mp_save = NULL; + int error = 0; + + mp = mlist = read_mtab(mntdir, mnttabname); + + /* + * Search the mount table looking for + * the correct (ie last) matching entry + */ + while (mp) { + if (STREQ(mp->mnt->mnt_dir, mntdir)) + mp_save = mp; + mp = mp->mnext; + } + + if (mp_save) { + dlog("Trying unmount(%s)", mp_save->mnt->mnt_dir); + +#ifdef MOUNT_TABLE_ON_FILE + /* + * This unmount may hang leaving this process with an exclusive lock on + * /etc/mtab. Therefore it is necessary to unlock mtab, do the unmount, + * then lock mtab (again) and reread it and finally update it. + */ + unlock_mntlist(); +#endif /* MOUNT_TABLE_ON_FILE */ + +#ifdef NEED_AUTOFS_SPACE_HACK + if (unmount_flags & AMU_UMOUNT_AUTOFS) { + char *mnt_dir_save = mp_save->mnt->mnt_dir; + mp_save->mnt->mnt_dir = autofs_strdup_space_hack(mnt_dir_save); + error = UNMOUNT_TRAP(mp_save->mnt); + XFREE(mp_save->mnt->mnt_dir); + mp_save->mnt->mnt_dir = mnt_dir_save; + } else +#endif /* NEED_AUTOFS_SPACE_HACK */ + error = UNMOUNT_TRAP(mp_save->mnt); + if (error < 0) { + switch ((error = errno)) { + case EINVAL: + case ENOTBLK: + plog(XLOG_WARNING, "unmount: %s is not mounted", mp_save->mnt->mnt_dir); + error = 0; /* Not really an error */ + break; + + case ENOENT: + /* + * This could happen if the kernel insists on following symlinks + * when we try to unmount a direct mountpoint. We need to propagate + * the error up so that the top layers know it failed and don't + * try to rmdir() the mountpoint or other silly things. + */ + plog(XLOG_ERROR, "mount point %s: %m", mp_save->mnt->mnt_dir); + break; + +#if defined(MNT2_GEN_OPT_FORCE) && defined(HAVE_UVMOUNT) + case EBUSY: + case EIO: + case ESTALE: + /* caller determines if forced unmounts should be used */ + if (unmount_flags & AMU_UMOUNT_FORCE) { + error = umount2_fs(mntdir, unmount_flags); + if (error < 0) + error = errno; + else + break; /* all is OK */ + } + /* fallthrough */ +#endif /* MNT2_GEN_OPT_FORCE && HAVE_UVMOUNT */ + default: + dlog("%s: unmount: %m", mp_save->mnt->mnt_dir); + break; + } + } + dlog("Finished unmount(%s)", mp_save->mnt->mnt_dir); + + if (!error) { +#ifdef MOUNT_TABLE_ON_FILE + free_mntlist(mlist); + mp = mlist = read_mtab(mntdir, mnttabname); + + /* + * Search the mount table looking for + * the correct (ie last) matching entry + */ + mp_save = NULL; + while (mp) { + if (STREQ(mp->mnt->mnt_dir, mntdir)) + mp_save = mp; + mp = mp->mnext; + } + + if (mp_save) { + mnt_free(mp_save->mnt); + mp_save->mnt = NULL; + rewrite_mtab(mlist, mnttabname); + } +#endif /* MOUNT_TABLE_ON_FILE */ + } + + } else { + + plog(XLOG_ERROR, "Couldn't find how to unmount %s", mntdir); + /* + * Assume it is already unmounted + */ + error = 0; + } /* end of "if (mp_save)" statement */ + + free_mntlist(mlist); + + return error; +} + + +#if defined(MNT2_GEN_OPT_FORCE) && defined(HAVE_UVMOUNT) +/* force unmount, no questions asked, without touching mnttab file */ +int +umount2_fs(const char *mntdir, u_int unmount_flags) +{ + int error = 0; +#if 0 + u_int vfs_id = 0; +#endif /* 0 */ + + if (unmount_flags & AMU_UMOUNT_FORCE) { + plog(XLOG_INFO, "**UNIMPLEMENTED**: umount2_fs: trying unmount/forced on %s", mntdir); +#if 0 + /* + * XXX: need to implement. Call read_mtab and search mntlist for VFS ID + * of mntdir, then pass that ID to uvmount(), then call free_mntlist(). + */ + error = uvmount(vfs_id, MNT2_GEN_OPT_FORCE); /* AIX */ + if (error < 0 && (errno == EINVAL || errno == ENOENT)) + error = 0; /* ignore EINVAL/ENOENT */ + if (error < 0) + plog(XLOG_WARNING, "%u: unmount/force: %m", vfs_id); + else + dlog("%s: unmount/force: OK", mntdir); +#endif /* 0 */ + } + return error; +} +#endif /* MNT2_GEN_OPT_FORCE && HAVE_UVMOUNT */ diff --git a/conf/umount/umount_bsd44.c b/conf/umount/umount_bsd44.c index d05944d8f78..da441297798 100644 --- a/conf/umount/umount_bsd44.c +++ b/conf/umount/umount_bsd44.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -105,6 +101,7 @@ int umount2_fs(const char *mntdir, u_int unmount_flags) { int error = 0; + if (unmount_flags & AMU_UMOUNT_FORCE) { plog(XLOG_INFO, "umount2_fs: trying unmount/forced on %s", mntdir); error = unmount(mntdir, MNT2_GEN_OPT_FORCE); diff --git a/conf/umount/umount_default.c b/conf/umount/umount_default.c new file mode 100644 index 00000000000..8319416e527 --- /dev/null +++ b/conf/umount/umount_default.c @@ -0,0 +1,188 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/umount/umount_default.c + * + */ + +/* + * Default method of unmounting filesystems. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +int +umount_fs(char *mntdir, const char *mnttabname, u_int unmount_flags) +{ + mntlist *mlist, *mp, *mp_save = NULL; + int error = 0; + + mp = mlist = read_mtab(mntdir, mnttabname); + + /* + * Search the mount table looking for + * the correct (ie last) matching entry + */ + while (mp) { + if (STREQ(mp->mnt->mnt_dir, mntdir)) + mp_save = mp; + mp = mp->mnext; + } + + if (mp_save) { + dlog("Trying unmount(%s)", mp_save->mnt->mnt_dir); + +#ifdef MOUNT_TABLE_ON_FILE + /* + * This unmount may hang leaving this process with an exclusive lock on + * /etc/mtab. Therefore it is necessary to unlock mtab, do the unmount, + * then lock mtab (again) and reread it and finally update it. + */ + unlock_mntlist(); +#endif /* MOUNT_TABLE_ON_FILE */ + +#ifdef NEED_AUTOFS_SPACE_HACK + if (unmount_flags & AMU_UMOUNT_AUTOFS) { + char *mnt_dir_save = mp_save->mnt->mnt_dir; + mp_save->mnt->mnt_dir = autofs_strdup_space_hack(mnt_dir_save); + error = UNMOUNT_TRAP(mp_save->mnt); + XFREE(mp_save->mnt->mnt_dir); + mp_save->mnt->mnt_dir = mnt_dir_save; + } else +#endif /* NEED_AUTOFS_SPACE_HACK */ + error = UNMOUNT_TRAP(mp_save->mnt); + if (error < 0) { + switch ((error = errno)) { + case EINVAL: + case ENOTBLK: + plog(XLOG_WARNING, "unmount: %s is not mounted", mp_save->mnt->mnt_dir); + error = 0; /* Not really an error */ + break; + + case ENOENT: + /* + * This could happen if the kernel insists on following symlinks + * when we try to unmount a direct mountpoint. We need to propagate + * the error up so that the top layers know it failed and don't + * try to rmdir() the mountpoint or other silly things. + */ + plog(XLOG_ERROR, "mount point %s: %m", mp_save->mnt->mnt_dir); + break; + +#if defined(MNT2_GEN_OPT_FORCE) && defined(HAVE_UMOUNT2) + case EBUSY: + case EIO: + case ESTALE: + /* caller determines if forced unmounts should be used */ + if (unmount_flags & AMU_UMOUNT_FORCE) { + error = umount2_fs(mntdir, unmount_flags); + if (error < 0) + error = errno; + else + break; /* all is OK */ + } + /* fallthrough */ +#endif /* MNT2_GEN_OPT_FORCE && HAVE_UMOUNT2 */ + default: + dlog("%s: unmount: %m", mp_save->mnt->mnt_dir); + break; + } + } + dlog("Finished unmount(%s)", mp_save->mnt->mnt_dir); + + if (!error) { +#ifdef MOUNT_TABLE_ON_FILE + free_mntlist(mlist); + mp = mlist = read_mtab(mntdir, mnttabname); + + /* + * Search the mount table looking for + * the correct (ie last) matching entry + */ + mp_save = NULL; + while (mp) { + if (STREQ(mp->mnt->mnt_dir, mntdir)) + mp_save = mp; + mp = mp->mnext; + } + + if (mp_save) { + mnt_free(mp_save->mnt); + mp_save->mnt = NULL; + rewrite_mtab(mlist, mnttabname); + } +#endif /* MOUNT_TABLE_ON_FILE */ + } + + } else { + + plog(XLOG_ERROR, "Couldn't find how to unmount %s", mntdir); + /* + * Assume it is already unmounted + */ + error = 0; + } /* end of "if (mp_save)" statement */ + + free_mntlist(mlist); + + return error; +} + + +#if defined(MNT2_GEN_OPT_FORCE) && defined(HAVE_UMOUNT2) +/* force unmount, no questions asked, without touching mnttab file */ +int +umount2_fs(const char *mntdir, u_int unmount_flags) +{ + int error = 0; + + if (unmount_flags & AMU_UMOUNT_FORCE) { + plog(XLOG_INFO, "umount2_fs: trying unmount/forced on %s", mntdir); + error = umount2(mntdir, MNT2_GEN_OPT_FORCE); /* Solaris */ + if (error < 0 && (errno == EINVAL || errno == ENOENT)) + error = 0; /* ignore EINVAL/ENOENT */ + if (error < 0) + plog(XLOG_WARNING, "%s: unmount/force: %m", mntdir); + else + dlog("%s: unmount/force: OK", mntdir); + } + return error; +} +#endif /* MNT2_GEN_OPT_FORCE && HAVE_UMOUNT2 */ diff --git a/conf/umount/umount_linux.c b/conf/umount/umount_linux.c new file mode 100644 index 00000000000..873ecf23f66 --- /dev/null +++ b/conf/umount/umount_linux.c @@ -0,0 +1,264 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/umount/umount_linux.c + * + */ + +/* + * Linux method of unmounting filesystems: if umount(2) failed with EIO or + * ESTALE, try umount2(2) with MNT_FORCE+MNT_DETACH. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +int +umount_fs(char *mntdir, const char *mnttabname, u_int unmount_flags) +{ + mntlist *mlist, *mp, *mp_save = NULL; + int error = 0; +#ifdef HAVE_LOOP_DEVICE + char *opt, *xopts = NULL; + char loopstr[] = "loop="; + char *loopdev; +#endif /* HAVE_LOOP_DEVICE */ + unsigned int retries = 8; + + mp = mlist = read_mtab(mntdir, mnttabname); + + /* + * Search the mount table looking for + * the correct (ie last) matching entry + */ + while (mp) { + if (STREQ(mp->mnt->mnt_dir, mntdir)) + mp_save = mp; + mp = mp->mnext; + } + + if (!mp_save) { + plog(XLOG_ERROR, "Couldn't find how to unmount %s", mntdir); + /* Assume it is already unmounted */ + error = 0; + goto out; + } + + plog(XLOG_ERROR, "Trying unmount %s, umount_flags 0x%x", mp_save->mnt->mnt_dir, unmount_flags); + dlog("Trying unmount(%s)", mp_save->mnt->mnt_dir); + +#ifdef MOUNT_TABLE_ON_FILE + /* + * This unmount may hang leaving this process with an exclusive lock on + * /etc/mtab. Therefore it is necessary to unlock mtab, do the unmount, + * then lock mtab (again) and reread it and finally update it. + */ + unlock_mntlist(); +#endif /* MOUNT_TABLE_ON_FILE */ + +again: +#if defined(HAVE_UMOUNT2) && defined(MNT2_GEN_OPT_DETACH) + /* + * If user asked to try forced unmounts, then do a quick check to see if + * the mount point is hung badly. If so, then try to detach it by + * force; if the latter works, we're done. + */ + if (unmount_flags & AMU_UMOUNT_DETACH) { + /* + * Note: we pass both DETACH and FORCE flags, because umount2_fs below + * (on Linux), should try FORCE before DETACH (the latter always + * succeeds). + */ + error = umount2_fs(mp_save->mnt->mnt_dir, + unmount_flags & (AMU_UMOUNT_DETACH|AMU_UMOUNT_FORCE)); + } else +#endif /* defined(HAVE_UMOUNT2) && defined(MNT2_GEN_OPT_DETACH) */ + error = UNMOUNT_TRAP(mp_save->mnt); + + /* Linux kernel can be sluggish for some reason */ + if (error == EBUSY && retries--) { + struct timespec tm = {0, 200000000}; + nanosleep(&tm, NULL); + goto again; + } + + if (error < 0) { + plog(XLOG_WARNING, "unmount(%s) failed: %m", mp_save->mnt->mnt_dir); + switch ((error = errno)) { + case EINVAL: + case ENOTBLK: + plog(XLOG_WARNING, "unmount: %s is not mounted", mp_save->mnt->mnt_dir); + error = 0; /* Not really an error */ + break; + + case ENOENT: + /* + * This could happen if the kernel insists on following symlinks + * when we try to unmount a direct mountpoint. We need to propagate + * the error up so that the top layers know it failed and don't + * try to rmdir() the mountpoint or other silly things. + */ + plog(XLOG_ERROR, "mount point %s: %m", mp_save->mnt->mnt_dir); + break; + +#if defined(HAVE_UMOUNT2) && defined(MNT2_GEN_OPT_FORCE) + case EBUSY: + /* + * Caller determines if forced unmounts should be used now (for + * EBUSY). If caller asked to force an unmount, *and* the above + * "trivial" unmount attempt failed with EBUSY, then try to force + * the unmount. + */ + if (unmount_flags & AMU_UMOUNT_FORCE) { + error = umount2_fs(mp_save->mnt->mnt_dir, + unmount_flags & AMU_UMOUNT_FORCE); + if (error < 0) { + plog(XLOG_WARNING, "%s: unmount/force: %m", + mp_save->mnt->mnt_dir); + error = errno; + } + } + break; +#endif /* defined(HAVE_UMOUNT2) && defined(MNT2_GEN_OPT_FORCE) */ + + default: + dlog("%s: unmount: %m", mp_save->mnt->mnt_dir); + break; + } + } else { + dlog("unmount(%s) succeeded", mp_save->mnt->mnt_dir); + } + dlog("Finished unmount(%s)", mp_save->mnt->mnt_dir); + + /* + * If we are successful or there was an ENOENT, remove + * the mount entry from the mtab file. + */ + if (error && error != ENOENT) + goto out; + +#ifdef HAVE_LOOP_DEVICE + /* look for loop=/dev/loopX in mnt_opts */ + xopts = xstrdup(mp_save->mnt->mnt_opts); /* b/c strtok is destructive */ + for (opt = strtok(xopts, ","); opt; opt = strtok(NULL, ",")) + if (NSTREQ(opt, loopstr, sizeof(loopstr) - 1)) { + loopdev = opt + sizeof(loopstr) - 1; + if (delete_loop_device(loopdev) < 0) + plog(XLOG_WARNING, "unmount() failed to release loop device %s: %m", loopdev); + else + plog(XLOG_INFO, "unmount() released loop device %s OK", loopdev); + break; + } + if (xopts) + XFREE(xopts); +#endif /* HAVE_LOOP_DEVICE */ + +#ifdef MOUNT_TABLE_ON_FILE + free_mntlist(mlist); + mp = mlist = read_mtab(mntdir, mnttabname); + + /* + * Search the mount table looking for + * the correct (ie last) matching entry + */ + mp_save = NULL; + while (mp) { + if (STREQ(mp->mnt->mnt_dir, mntdir)) + mp_save = mp; + mp = mp->mnext; + } + + if (mp_save) { + mnt_free(mp_save->mnt); + mp_save->mnt = NULL; + rewrite_mtab(mlist, mnttabname); + } +#endif /* MOUNT_TABLE_ON_FILE */ + + out: + free_mntlist(mlist); + + return error; +} + + +#if defined(HAVE_UMOUNT2) && (defined(MNT2_GEN_OPT_FORCE) || defined(MNT2_GEN_OPT_DETACH)) +/* + * Force unmount, no questions asked, without touching mnttab file. Try + * detach first because it is safer: will remove the hung mnt point without + * affecting hung applications. "Force" is more risky: it will cause the + * kernel to return EIO to applications stuck on a stat(2) of Amd. + */ +int +umount2_fs(const char *mntdir, u_int unmount_flags) +{ + int error = 0; + +#ifdef MNT2_GEN_OPT_DETACH + if (unmount_flags & AMU_UMOUNT_DETACH) { + error = umount2(mntdir, MNT2_GEN_OPT_DETACH); + if (error < 0 && (errno == EINVAL || errno == ENOENT)) + error = 0; /* ignore EINVAL/ENOENT */ + if (error < 0) { /* don't try FORCE if detach succeeded */ + plog(XLOG_WARNING, "%s: unmount/detach: %m", mntdir); + /* fall through to try "force" (if flag specified) */ + } else { + dlog("%s: unmount/detach: OK", mntdir); + return error; + } + } +#endif /* MNT2_GEN_OPT_DETACH */ + +#ifdef MNT2_GEN_OPT_FORCE + if (unmount_flags & AMU_UMOUNT_FORCE) { + plog(XLOG_INFO, "umount2_fs: trying unmount/forced on %s", mntdir); + error = umount2(mntdir, MNT2_GEN_OPT_FORCE); + if (error < 0 && (errno == EINVAL || errno == ENOENT)) + error = 0; /* ignore EINVAL/ENOENT */ + if (error < 0) + plog(XLOG_WARNING, "%s: unmount/force: %m", mntdir); + else + dlog("%s: unmount/force: OK", mntdir); + /* fall through to return whatever error we got (if any) */ + } +#endif /* MNT2_GEN_OPT_FORCE */ + + return error; +} +#endif /* HAVE_UMOUNT2 && (MNT2_GEN_OPT_FORCE || MNT2_GEN_OPT_DETACH) */ diff --git a/conf/umount/umount_osf.c b/conf/umount/umount_osf.c new file mode 100644 index 00000000000..1aeea1cdfba --- /dev/null +++ b/conf/umount/umount_osf.c @@ -0,0 +1,120 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/conf/umount/umount_osf.c + * + */ + +/* + * Unmounting filesystems under OSF. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +int +umount_fs(char *mntdir, const char *mnttabname, u_int unmount_flags) +{ + int error; + +eintr: + error = umount(mntdir, MNT_NOFORCE); + if (error < 0) + error = errno; + + switch (error) { + case EINVAL: + case ENOTBLK: + plog(XLOG_WARNING, "unmount: %s is not mounted", mntdir); + error = 0; /* Not really an error */ + break; + + case ENOENT: + plog(XLOG_ERROR, "mount point %s: %m", mntdir); + break; + + case EINTR: + /* not sure why this happens, but it does. ask kirk one day... */ + dlog("%s: unmount: %m", mntdir); + goto eintr; + +#ifdef MNT2_GEN_OPT_FORCE + case EBUSY: + case EIO: + case ESTALE: + /* caller determines if forced unmounts should be used */ + if (unmount_flags & AMU_UMOUNT_FORCE) { + error = umount2_fs(mntdir, unmount_flags); + if ((error = umount2_fs(mntdir, unmount_flags)) < 0) + error = errno; + else + return error; + } + /* fallthrough */ +#endif /* MNT2_GEN_OPT_FORCE */ + + default: + dlog("%s: unmount: %m", mntdir); + break; + } + + return error; +} + + +#ifdef MNT2_GEN_OPT_FORCE +/* force unmount, no questions asked, without touching mnttab file */ +int +umount2_fs(const char *mntdir, u_int unmount_flags) +{ + int error = 0; + + if (unmount_flags & AMU_UMOUNT_FORCE) { + plog(XLOG_INFO, "umount2_fs: trying unmount/forced on %s", mntdir); + error = umount((char *)mntdir, MNT2_GEN_OPT_FORCE); + if (error < 0 && (errno == EINVAL || errno == ENOENT)) + error = 0; /* ignore EINVAL/ENOENT */ + if (error < 0) + plog(XLOG_WARNING, "%s: unmount/force: %m", mntdir); + else + dlog("%s: unmount/force: OK", mntdir); + } + return error; +} +#endif /* MNT2_GEN_OPT_FORCE */ diff --git a/config.guess b/config.guess new file mode 100755 index 00000000000..b79252d6b10 --- /dev/null +++ b/config.guess @@ -0,0 +1,1558 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-06-10' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.guess.long b/config.guess.long new file mode 100755 index 00000000000..769d0b9f64b --- /dev/null +++ b/config.guess.long @@ -0,0 +1,83 @@ +#!/bin/sh +# generate long version of output from config.guess +# part of am-utils-6.x +# Erez Zadok +# +#set -x + +# find a single word that prints the version number of the release +getver () { + l=`head $1` + set $l + for i in $* + do + case "$i" in + # look for one digit followed by a sequence of non-spaces + # so it'll catch 7.3 as well as 2.1AW + *[0-9]* ) echo $i; return ;; + esac + done +} + +if test "x$GCONFIG" = "x" ; then + # find dirname of this script + base=`echo $0 | sed 's/\/[^\/]*$//' 2>/dev/null` + PATH=$base:$PATH + export PATH + GCONFIG=`config.guess || echo unknown-config` +fi +case "${GCONFIG}" in + *linux* ) + GCONFIG=`echo ${GCONFIG} | sed -e 's/i.86/i386/' -e 's/linux-gnu/linux/'` + if test -f /etc/redhat-release ; then + long=`getver /etc/redhat-release` + if grep 'Red Hat Enterprise Linux' /etc/redhat-release > /dev/null 2>&1 ; then + echo ${GCONFIG}-rhel${long} + elif grep 'Fedora ' /etc/redhat-release > /dev/null 2>&1 ; then + echo ${GCONFIG}-fc${long} + elif grep 'CentOS' /etc/redhat-release > /dev/null 2>&1 ; then + echo ${GCONFIG}-centos${long} + else + echo ${GCONFIG}-rh${long} + fi + exit 0 + elif test -f /etc/SuSE-release ; then + long=`getver /etc/SuSE-release` + if grep 'Enterprise Server' /etc/SuSE-release > /dev/null 2>&1 ; then + echo ${GCONFIG}-sles${long} + else + echo ${GCONFIG}-suse${long} + fi + exit 0 + elif test -f /etc/debian_version ; then + long=`getver /etc/debian_version` + echo ${GCONFIG}-deb${long} + exit 0 + elif test -f /etc/gentoo-release ; then + long=`getver /etc/gentoo-release` + echo ${GCONFIG}-gentoo${long} + exit 0 + elif test -f /etc/yellowdog-release ; then + long=`getver /etc/yellowdog-release` + echo ${GCONFIG}-yellowdog${long} + exit 0 + else + echo ${GCONFIG} + fi + ;; + *netbsdelf3* ) # remove trailing '.' from beta + echo ${GCONFIG} | sed 's/\.$//g' + ;; + + *solaris* ) + if grep -i nexentaos /etc/release > /dev/null 2>&1 ; then + echo ${GCONFIG}-nexentaos + else + echo ${GCONFIG} + fi + ;; + * ) + echo ${GCONFIG} + ;; +esac +exit 0 diff --git a/config.h.in b/config.h.in new file mode 100644 index 00000000000..1912c5d29a8 --- /dev/null +++ b/config.h.in @@ -0,0 +1,2426 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + + +/* + * Start of am-utils-6.x config.h file. + * Erez Zadok + * + * DO NOT EDIT BY HAND. + * Note: generated by autoheader from configure.in. + */ + +#ifndef _CONFIG_H +#define _CONFIG_H + + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* define name of am-utils' NFS protocol header */ +#undef AMU_NFS_PROTOCOL_HEADER + +/* Type of the 5rd argument to authunix_create() */ +#undef AUTH_CREATE_GIDLIST_TYPE + +/* Define configuration date */ +#undef CONFIG_DATE + +/* Turn off general debugging by default */ +#undef DEBUG + +/* Turn off memory debugging by default */ +#undef DEBUG_MEM + +/* Define name of host OS's distribution name (eg. debian, redhat, suse, etc.) + */ +#undef DISTRO_NAME + +/* Define to the type of elements in the array set by `getgroups'. Usually + this is either `int' or `gid_t'. */ +#undef GETGROUPS_T + +/* Define to 1 if the `getpgrp' function requires zero arguments. */ +#undef GETPGRP_VOID + +/* Define if have automount filesystem */ +#undef HAVE_AMU_FS_AUTO + +/* Define if have direct automount filesystem */ +#undef HAVE_AMU_FS_DIRECT + +/* Define if have error filesystem */ +#undef HAVE_AMU_FS_ERROR + +/* Define if have NFS host-tree filesystem */ +#undef HAVE_AMU_FS_HOST + +/* Define if have symbolic-link filesystem */ +#undef HAVE_AMU_FS_LINK + +/* Define if have symlink with existence check filesystem */ +#undef HAVE_AMU_FS_LINKX + +/* Define if have nfsl (NFS with local link check) filesystem */ +#undef HAVE_AMU_FS_NFSL + +/* Define if have multi-NFS filesystem */ +#undef HAVE_AMU_FS_NFSX + +/* Define if have program filesystem */ +#undef HAVE_AMU_FS_PROGRAM + +/* Define if have "top-level" filesystem */ +#undef HAVE_AMU_FS_TOPLVL + +/* Define if have union filesystem */ +#undef HAVE_AMU_FS_UNION + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_NAMESER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ASSERT_H + +/* Define to 1 if `addr' is member of `autofs_args_t'. */ +#undef HAVE_AUTOFS_ARGS_T_ADDR + +/* define if have a bad version of hasmntopt() */ +#undef HAVE_BAD_HASMNTOPT + +/* define if have a bad version of memcmp() */ +#undef HAVE_BAD_MEMCMP + +/* define if have a bad version of yp_all() */ +#undef HAVE_BAD_YP_ALL + +/* Define to 1 if you have the `bcmp' function. */ +#undef HAVE_BCMP + +/* Define to 1 if you have the `bcopy' function. */ +#undef HAVE_BCOPY + +/* Define to 1 if you have the header file. */ +#undef HAVE_BSD_RPC_RPC_H + +/* Define to 1 if you have the `bzero' function. */ +#undef HAVE_BZERO + +/* System supports C99-style variable-length argument macros */ +#undef HAVE_C99_VARARGS_MACROS + +/* Define to 1 if `flags' is member of `cdfs_args_t'. */ +#undef HAVE_CDFS_ARGS_T_FLAGS + +/* Define to 1 if `fspec' is member of `cdfs_args_t'. */ +#undef HAVE_CDFS_ARGS_T_FSPEC + +/* Define to 1 if `iso_flags' is member of `cdfs_args_t'. */ +#undef HAVE_CDFS_ARGS_T_ISO_FLAGS + +/* Define to 1 if `iso_pgthresh' is member of `cdfs_args_t'. */ +#undef HAVE_CDFS_ARGS_T_ISO_PGTHRESH + +/* Define to 1 if `norrip' is member of `cdfs_args_t'. */ +#undef HAVE_CDFS_ARGS_T_NORRIP + +/* Define to 1 if `ssector' is member of `cdfs_args_t'. */ +#undef HAVE_CDFS_ARGS_T_SSECTOR + +/* Define to 1 if you have the header file. */ +#undef HAVE_CDFS_CDFSMOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_CDFS_CDFS_MOUNT_H + +/* Define to 1 if you have the `clnt_create' function. */ +#undef HAVE_CLNT_CREATE + +/* Define to 1 if you have the `clnt_create_vers' function. */ +#undef HAVE_CLNT_CREATE_VERS + +/* Define to 1 if you have the `clnt_create_vers_timed' function. */ +#undef HAVE_CLNT_CREATE_VERS_TIMED + +/* Define to 1 if you have the `clnt_spcreateerror' function. */ +#undef HAVE_CLNT_SPCREATEERROR + +/* Define to 1 if you have the `clnt_sperrno' function. */ +#undef HAVE_CLNT_SPERRNO + +/* Define to 1 if you have the `clock_gettime' function. */ +#undef HAVE_CLOCK_GETTIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_CLUSTER_H + +/* Define to 1 if you have the `cnodeid' function. */ +#undef HAVE_CNODEID + +/* Define to 1 if you have the header file. */ +#undef HAVE_CTYPE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DB1_NDBM_H + +/* Define to 1 if you have the `dbm_open' function. */ +#undef HAVE_DBM_OPEN + +/* Define to 1 if you have the `dg_mount' function. */ +#undef HAVE_DG_MOUNT + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if `flags' is member of `efs_args_t'. */ +#undef HAVE_EFS_ARGS_T_FLAGS + +/* Define to 1 if `fspec' is member of `efs_args_t'. */ +#undef HAVE_EFS_ARGS_T_FSPEC + +/* Define to 1 if `version' is member of `efs_args_t'. */ +#undef HAVE_EFS_ARGS_T_VERSION + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + +/* does extern definition for clnt_spcreateerror() exist? */ +#undef HAVE_EXTERN_CLNT_SPCREATEERROR + +/* does extern definition for clnt_sperrno() exist? */ +#undef HAVE_EXTERN_CLNT_SPERRNO + +/* does extern definition for free() exist? */ +#undef HAVE_EXTERN_FREE + +/* does extern definition for getccent() (hpux) exist? */ +#undef HAVE_EXTERN_GETCCENT + +/* does extern definition for getdomainname() exist? */ +#undef HAVE_EXTERN_GETDOMAINNAME + +/* does extern definition for getdtablesize() exist? */ +#undef HAVE_EXTERN_GETDTABLESIZE + +/* does extern definition for gethostname() exist? */ +#undef HAVE_EXTERN_GETHOSTNAME + +/* does extern definition for getlogin() exist? */ +#undef HAVE_EXTERN_GETLOGIN + +/* does extern definition for getpagesize() exist? */ +#undef HAVE_EXTERN_GETPAGESIZE + +/* does extern definition for gettablesize() exist? */ +#undef HAVE_EXTERN_GETTABLESIZE + +/* does extern definition for getwd() exist? */ +#undef HAVE_EXTERN_GETWD + +/* does extern definition for get_myaddress() exist? */ +#undef HAVE_EXTERN_GET_MYADDRESS + +/* does extern definition for hosts_ctl() exist? */ +#undef HAVE_EXTERN_HOSTS_CTL + +/* does extern definition for innetgr() exist? */ +#undef HAVE_EXTERN_INNETGR + +/* does extern definition for ldap_enable_cache() exist? */ +#undef HAVE_EXTERN_LDAP_ENABLE_CACHE + +/* does extern definition for mkstemp() exist? */ +#undef HAVE_EXTERN_MKSTEMP + +/* does extern definition for mntctl() exist? */ +#undef HAVE_EXTERN_MNTCTL + +/* does extern definition for optarg exist? */ +#undef HAVE_EXTERN_OPTARG + +/* does extern definition for sbrk() exist? */ +#undef HAVE_EXTERN_SBRK + +/* does extern definition for seteuid() exist? */ +#undef HAVE_EXTERN_SETEUID + +/* does extern definition for setitimer() exist? */ +#undef HAVE_EXTERN_SETITIMER + +/* does extern definition for sleep() exist? */ +#undef HAVE_EXTERN_SLEEP + +/* does extern definition for strcasecmp() exist? */ +#undef HAVE_EXTERN_STRCASECMP + +/* does extern definition for strlcat() exist? */ +#undef HAVE_EXTERN_STRLCAT + +/* does extern definition for strlcpy() exist? */ +#undef HAVE_EXTERN_STRLCPY + +/* does extern definition for strstr() exist? */ +#undef HAVE_EXTERN_STRSTR + +/* does extern definition for sys_errlist[] exist? */ +#undef HAVE_EXTERN_SYS_ERRLIST + +/* does extern definition for ualarm() exist? */ +#undef HAVE_EXTERN_UALARM + +/* does extern definition for usleep() exist? */ +#undef HAVE_EXTERN_USLEEP + +/* does extern definition for vsnprintf() exist? */ +#undef HAVE_EXTERN_VSNPRINTF + +/* does extern definition for wait3() exist? */ +#undef HAVE_EXTERN_WAIT3 + +/* does extern definition for xdr_callmsg() exist? */ +#undef HAVE_EXTERN_XDR_CALLMSG + +/* does extern definition for xdr_opaque_auth() exist? */ +#undef HAVE_EXTERN_XDR_OPAQUE_AUTH + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if `fds_bits' is member of `fd_set'. */ +#undef HAVE_FD_SET_FDS_BITS + +/* Define to 1 if you have the `fgets' function. */ +#undef HAVE_FGETS + +/* Define if plain fhandle type exists */ +#undef HAVE_FHANDLE + +/* Define to 1 if you have the `flock' function. */ +#undef HAVE_FLOCK + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have the `fsmount' function. */ +#undef HAVE_FSMOUNT + +/* Define if have AUTOFS filesystem */ +#undef HAVE_FS_AUTOFS + +/* Define if have CACHEFS filesystem */ +#undef HAVE_FS_CACHEFS + +/* Define if have CDFS filesystem */ +#undef HAVE_FS_CDFS + +/* Define if have CFS (crypto) filesystem */ +#undef HAVE_FS_CFS + +/* Define if have EFS filesystem (irix) */ +#undef HAVE_FS_EFS + +/* Define to 1 if you have the header file. */ +#undef HAVE_FS_EFS_EFS_MOUNT_H + +/* Define if have EXT{2,3,4} filesystem (linux) */ +#undef HAVE_FS_EXT + +/* Define if have FFS filesystem */ +#undef HAVE_FS_FFS + +/* Define if have HSFS filesystem */ +#undef HAVE_FS_HSFS + +/* Define if have LOFS filesystem */ +#undef HAVE_FS_LOFS + +/* Define if have LUSTRE filesystem */ +#undef HAVE_FS_LUSTRE + +/* Define if have MFS filesystem */ +#undef HAVE_FS_MFS + +/* Define to 1 if you have the header file. */ +#undef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H + +/* Define if have NFS filesystem */ +#undef HAVE_FS_NFS + +/* Define if have NFS3 filesystem */ +#undef HAVE_FS_NFS3 + +/* Define if have NFS4 filesystem */ +#undef HAVE_FS_NFS4 + +/* Define if have NULLFS (loopback on bsd44) filesystem */ +#undef HAVE_FS_NULLFS + +/* Define if have PCFS filesystem */ +#undef HAVE_FS_PCFS + +/* Define if have TFS filesystem */ +#undef HAVE_FS_TFS + +/* Define if have TMPFS filesystem */ +#undef HAVE_FS_TMPFS + +/* Define to 1 if you have the header file. */ +#undef HAVE_FS_TMPFS_TMPFS_ARGS_H + +/* Define if have UDF filesystem */ +#undef HAVE_FS_UDF + +/* Define to 1 if you have the header file. */ +#undef HAVE_FS_UDF_UDF_MOUNT_H + +/* Define if have UFS filesystem */ +#undef HAVE_FS_UFS + +/* Define if have UMAPFS (uid/gid mapping) filesystem */ +#undef HAVE_FS_UMAPFS + +/* Define if have UNIONFS filesystem */ +#undef HAVE_FS_UNIONFS + +/* Define if have XFS filesystem (irix) */ +#undef HAVE_FS_XFS + +/* System supports GCC-style variable-length argument macros */ +#undef HAVE_GCC_VARARGS_MACROS + +/* Define to 1 if you have the header file. */ +#undef HAVE_GDBM_NDBM_H + +/* Define to 1 if you have the `getccent' function. */ +#undef HAVE_GETCCENT + +/* Define to 1 if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* Define to 1 if you have the `getdomainname' function. */ +#undef HAVE_GETDOMAINNAME + +/* Define to 1 if you have the `getdtablesize' function. */ +#undef HAVE_GETDTABLESIZE + +/* Define to 1 if you have the `gethostname' function. */ +#undef HAVE_GETHOSTNAME + +/* Define to 1 if you have the `getifaddrs' function. */ +#undef HAVE_GETIFADDRS + +/* Define to 1 if you have the `getmntinfo' function. */ +#undef HAVE_GETMNTINFO + +/* Define to 1 if you have the `getmountent' function. */ +#undef HAVE_GETMOUNTENT + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `getpwnam' function. */ +#undef HAVE_GETPWNAM + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the `get_myaddress' function. */ +#undef HAVE_GET_MYADDRESS + +/* define if your system's getopt() is GNU getopt() (are you using glibc) */ +#undef HAVE_GNU_GETOPT + +/* Define to 1 if you have the header file. */ +#undef HAVE_GRP_H + +/* Define to 1 if you have the `hasmntopt' function. */ +#undef HAVE_HASMNTOPT + +/* Define to 1 if you have the header file. */ +#undef HAVE_HESIOD_H + +/* Define to 1 if you have the `hesiod_init' function. */ +#undef HAVE_HESIOD_INIT + +/* Define to 1 if you have the `hesiod_reload' function. */ +#undef HAVE_HESIOD_RELOAD + +/* Define to 1 if you have the `hesiod_to_bind' function. */ +#undef HAVE_HESIOD_TO_BIND + +/* Define to 1 if you have the `hes_init' function. */ +#undef HAVE_HES_INIT + +/* Define to 1 if you have the header file. */ +#undef HAVE_HSFS_HSFS_H + +/* Define to 1 if you have the `hstrerror' function. */ +#undef HAVE_HSTRERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_IFADDRS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_IRS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ISOFS_CD9660_CD9660_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LBER_H + +/* Define to 1 if you have the `ldap_enable_cache' function. */ +#undef HAVE_LDAP_ENABLE_CACHE + +/* Define to 1 if you have the header file. */ +#undef HAVE_LDAP_H + +/* Define to 1 if you have the `ldap_open' function. */ +#undef HAVE_LDAP_OPEN + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBGEN_H + +/* Define to 1 if you have the `malloc' library (-lmalloc). */ +#undef HAVE_LIBMALLOC + +/* Define to 1 if you have the `mapmalloc' library (-lmapmalloc). */ +#undef HAVE_LIBMAPMALLOC + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define to 1 if you have the `posix4' library (-lposix4). */ +#undef HAVE_LIBPOSIX4 + +/* Define to 1 if you have the `resolv' library (-lresolv). */ +#undef HAVE_LIBRESOLV + +/* Define to 1 if you have the `rpc' library (-lrpc). */ +#undef HAVE_LIBRPC + +/* Define to 1 if you have the `rpcsvc' library (-lrpcsvc). */ +#undef HAVE_LIBRPCSVC + +/* Define to 1 if you have the `rt' library (-lrt). */ +#undef HAVE_LIBRT + +/* does libwrap exist? */ +#undef HAVE_LIBWRAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_AUTO_FS4_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_AUTO_FS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_FS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_KDEV_T_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_LIST_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_LOOP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_NFS2_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_NFS4_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_NFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_NFS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_POSIX_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_SOCKET_H + +/* Define to 1 if you support file names longer than 14 characters. */ +#undef HAVE_LONG_FILE_NAMES + +/* Define to 1 if you have the header file. */ +#undef HAVE_MACHINE_ENDIAN_H + +/* Define to 1 if you have the `madvise' function. */ +#undef HAVE_MADVISE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define if have DBM maps */ +#undef HAVE_MAP_DBM + +/* Define if have executable maps */ +#undef HAVE_MAP_EXEC + +/* Define if have file maps (everyone should have it!) */ +#undef HAVE_MAP_FILE + +/* Define if have HESIOD maps */ +#undef HAVE_MAP_HESIOD + +/* Define if have LDAP maps */ +#undef HAVE_MAP_LDAP + +/* Define if have NDBM maps */ +#undef HAVE_MAP_NDBM + +/* Define if have NIS maps */ +#undef HAVE_MAP_NIS + +/* Define if have NIS+ maps */ +#undef HAVE_MAP_NISPLUS + +/* Define if have PASSWD maps */ +#undef HAVE_MAP_PASSWD + +/* Define if have Sun-syntax maps */ +#undef HAVE_MAP_SUN + +/* Define if have UNION maps */ +#undef HAVE_MAP_UNION + +/* Define to 1 if you have the `memcmp' function. */ +#undef HAVE_MEMCMP + +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the `mkdir' function. */ +#undef HAVE_MKDIR + +/* Define to 1 if you have the `mkstemp' function. */ +#undef HAVE_MKSTEMP + +/* Define to 1 if you have the `mlockall' function. */ +#undef HAVE_MLOCKALL + +/* Define to 1 if you have the `mntctl' function. */ +#undef HAVE_MNTCTL + +/* Define to 1 if you have the header file. */ +#undef HAVE_MNTENT_H + +/* Define to 1 if `mnt_cnode' is member of `mntent_t'. */ +#undef HAVE_MNTENT_T_MNT_CNODE + +/* Define to 1 if `mnt_ro' is member of `mntent_t'. */ +#undef HAVE_MNTENT_T_MNT_RO + +/* Define to 1 if `mnt_time' is member of `mntent_t'. */ +#undef HAVE_MNTENT_T_MNT_TIME + +/* does mntent_t have mnt_time field and is of type "char *" ? */ +#undef HAVE_MNTENT_T_MNT_TIME_STRING + +/* Define to 1 if you have the header file. */ +#undef HAVE_MNTTAB_H + +/* Define to 1 if you have the `mount' function. */ +#undef HAVE_MOUNT + +/* Define to 1 if `optptr' is member of `mounta'. */ +#undef HAVE_MOUNTA_OPTPTR + +/* Define to 1 if you have the `mountsyscall' function. */ +#undef HAVE_MOUNTSYSCALL + +/* Define to 1 if you have the header file. */ +#undef HAVE_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MSDOSFS_MSDOSFSMOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NDBM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETCONFIG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IF_ETHER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_ERRNO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_VAR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_ROUTE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFSCLIENT_NFSARGS_H + +/* Define to 1 if `acdirmax' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_ACDIRMAX + +/* Define to 1 if `acdirmin' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_ACDIRMIN + +/* Define to 1 if `acregmax' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_ACREGMAX + +/* Define to 1 if `acregmin' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_ACREGMIN + +/* Define to 1 if `addrlen' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_ADDRLEN + +/* Define to 1 if `bsize' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_BSIZE + +/* Define to 1 if `context' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_CONTEXT + +/* Define to 1 if `fhsize' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_FHSIZE + +/* Define to 1 if `fh_len' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_FH_LEN + +/* Define to 1 if `gfs_flags' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_GFS_FLAGS + +/* Define to 1 if `namlen' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_NAMLEN + +/* Define to 1 if `optstr' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_OPTSTR + +/* Define to 1 if `pathconf' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_PATHCONF + +/* Define to 1 if `proto' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_PROTO + +/* Define to 1 if `pseudoflavor' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_PSEUDOFLAVOR + +/* Define to 1 if `sotype' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_SOTYPE + +/* Define to 1 if `version' is member of `nfs_args_t'. */ +#undef HAVE_NFS_ARGS_T_VERSION + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_EXPORT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_NFSMOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_NFSPROTO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_NFSV2_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_NFS_CLNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_NFS_GFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_NFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_NFS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_PATHCONF_H + +/* define if the host has NFS protocol headers in system headers */ +#undef HAVE_NFS_PROT_HEADERS + +/* Define to 1 if you have the header file. */ +#undef HAVE_NFS_RPCV2_H + +/* Define to 1 if you have the `nis_domain_of' function. */ +#undef HAVE_NIS_DOMAIN_OF + +/* Define to 1 if you have the header file. */ +#undef HAVE_NSSWITCH_H + +/* Define to 1 if you have the `opendir' function. */ +#undef HAVE_OPENDIR + +/* Define to 1 if `dirmask' is member of `pcfs_args_t'. */ +#undef HAVE_PCFS_ARGS_T_DIRMASK + +/* Define to 1 if `dsttime' is member of `pcfs_args_t'. */ +#undef HAVE_PCFS_ARGS_T_DSTTIME + +/* Define to 1 if `fspec' is member of `pcfs_args_t'. */ +#undef HAVE_PCFS_ARGS_T_FSPEC + +/* Define to 1 if `gid' is member of `pcfs_args_t'. */ +#undef HAVE_PCFS_ARGS_T_GID + +/* Define to 1 if `mask' is member of `pcfs_args_t'. */ +#undef HAVE_PCFS_ARGS_T_MASK + +/* Define to 1 if `secondswest' is member of `pcfs_args_t'. */ +#undef HAVE_PCFS_ARGS_T_SECONDSWEST + +/* Define to 1 if `uid' is member of `pcfs_args_t'. */ +#undef HAVE_PCFS_ARGS_T_UID + +/* Define to 1 if you have the `plock' function. */ +#undef HAVE_PLOCK + +/* Define to 1 if you have the header file. */ +#undef HAVE_PWD_H + +/* Define to 1 if you have the `regcomp' function. */ +#undef HAVE_REGCOMP + +/* Define to 1 if you have the `regexec' function. */ +#undef HAVE_REGEXEC + +/* Define to 1 if you have the header file. */ +#undef HAVE_REGEX_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RESOLV_H + +/* Define to 1 if system calls automatically restart after interruption by a + signal. */ +#undef HAVE_RESTARTABLE_SYSCALLS + +/* Define to 1 if you have the `rmdir' function. */ +#undef HAVE_RMDIR + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_AUTOFS_PROT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_MOUNTV3_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_NFS_PROT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_NIS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_YPCLNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPCSVC_YP_PROT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPC_AUTH_DES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPC_AUTH_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPC_PMAP_CLNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPC_PMAP_PROT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPC_RPC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_RPC_TYPES_H + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `seteuid' function. */ +#undef HAVE_SETEUID + +/* Define to 1 if you have the `setitimer' function. */ +#undef HAVE_SETITIMER + +/* Define to 1 if you have the header file. */ +#undef HAVE_SETJMP_H + +/* Define to 1 if you have the `setresuid' function. */ +#undef HAVE_SETRESUID + +/* Define to 1 if you have the `setsid' function. */ +#undef HAVE_SETSID + +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the `signal' function. */ +#undef HAVE_SIGNAL + +/* Define to 1 if you have the header file. */ +#undef HAVE_SIGNAL_H + +/* Define to 1 if you have the `sigsuspend' function. */ +#undef HAVE_SIGSUSPEND + +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET + +/* Define to 1 if you have the header file. */ +#undef HAVE_SOCKETBITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STATBUF_H + +/* Define to 1 if you have the `statfs' function. */ +#undef HAVE_STATFS + +/* Define to 1 if you have the `statvfs' function. */ +#undef HAVE_STATVFS + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDARG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the `strcspn' function. */ +#undef HAVE_STRCSPN + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strlcat' function. */ +#undef HAVE_STRLCAT + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + +/* Define to 1 if you have the `strspn' function. */ +#undef HAVE_STRSPN + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if `fhs_fh' is member of `struct fhstatus'. */ +#undef HAVE_STRUCT_FHSTATUS_FHS_FH + +/* Define to 1 if `ifa_next' is member of `struct ifaddrs'. */ +#undef HAVE_STRUCT_IFADDRS_IFA_NEXT + +/* Define to 1 if `ifr_addr' is member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_ADDR + +/* Define if have struct mntent in one of the standard headers */ +#undef HAVE_STRUCT_MNTENT + +/* Define if have struct mnttab in one of the standard headers */ +#undef HAVE_STRUCT_MNTTAB + +/* Define if have struct nfs_args in one of the standard nfs headers */ +#undef HAVE_STRUCT_NFS_ARGS + +/* Define if have struct nfs_gfs_mount in one of the standard nfs headers */ +#undef HAVE_STRUCT_NFS_GFS_MOUNT + +/* Define to 1 if `sa_len' is member of `struct sockaddr'. */ +#undef HAVE_STRUCT_SOCKADDR_SA_LEN + +/* Define to 1 if `f_fstypename' is member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FSTYPENAME + +/* Define to 1 if `devid' is member of `struct umntrequest'. */ +#undef HAVE_STRUCT_UMNTREQUEST_DEVID + +/* Define to 1 if you have the `svc_getreq' function. */ +#undef HAVE_SVC_GETREQ + +/* Define to 1 if you have the `svc_getreqset' function. */ +#undef HAVE_SVC_GETREQSET + +/* Define to 1 if you have the `sysfs' function. */ +#undef HAVE_SYSFS + +/* Define to 1 if you have the `syslog' function. */ +#undef HAVE_SYSLOG + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CONFIG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_DG_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_ERRNO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FILE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FSID_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FSTYP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_AUTOFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_AUTOFS_PROT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_CACHEFS_FS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_EFS_CLNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_NFS_CLNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_NFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_NFS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_NFS_NFS_CLNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_PC_FS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_TMP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_UFS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_XFS_CLNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IMMU_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_LOCK_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MACHINE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MBUF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MNTCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MNTENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MNTTAB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_NETCONFIG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PATHCONF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PROC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SEMA_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SIGNAL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATVFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSCALL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSLIMITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSLOG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIUSER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UCRED_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UTSNAME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VMOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VNODE_H + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TCPD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TIUSER_H + +/* Define to 1 if `ta_nodes_max' is member of `tmpfs_args_t'. */ +#undef HAVE_TMPFS_ARGS_T_TA_NODES_MAX + +/* Define to 1 if `ta_root_gid' is member of `tmpfs_args_t'. */ +#undef HAVE_TMPFS_ARGS_T_TA_ROOT_GID + +/* Define to 1 if `ta_root_mode' is member of `tmpfs_args_t'. */ +#undef HAVE_TMPFS_ARGS_T_TA_ROOT_MODE + +/* Define to 1 if `ta_root_uid' is member of `tmpfs_args_t'. */ +#undef HAVE_TMPFS_ARGS_T_TA_ROOT_UID + +/* Define to 1 if `ta_size_max' is member of `tmpfs_args_t'. */ +#undef HAVE_TMPFS_ARGS_T_TA_SIZE_MAX + +/* Define to 1 if `ta_version' is member of `tmpfs_args_t'. */ +#undef HAVE_TMPFS_ARGS_T_TA_VERSION + +/* Define to 1 if you have the header file. */ +#undef HAVE_TMPFS_TMP_H + +/* what type of network transport type is in use? TLI or sockets? */ +#undef HAVE_TRANSPORT_TYPE_TLI + +/* Define to 1 if you have the `ualarm' function. */ +#undef HAVE_UALARM + +/* Define to 1 if `anon_gid' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_ANON_GID + +/* Define to 1 if `anon_uid' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_ANON_UID + +/* Define to 1 if `fspec' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_FSPEC + +/* Define to 1 if `gmtoff' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_GMTOFF + +/* Define to 1 if `nobody_gid' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_NOBODY_GID + +/* Define to 1 if `nobody_uid' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_NOBODY_UID + +/* Define to 1 if `sector_size' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_SECTOR_SIZE + +/* Define to 1 if `sessionnr' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_SESSIONNR + +/* Define to 1 if `udfmflags' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_UDFMFLAGS + +/* Define to 1 if `version' is member of `udf_args_t'. */ +#undef HAVE_UDF_ARGS_T_VERSION + +/* Define to 1 if `flags' is member of `ufs_args_t'. */ +#undef HAVE_UFS_ARGS_T_FLAGS + +/* Define to 1 if `fspec' is member of `ufs_args_t'. */ +#undef HAVE_UFS_ARGS_T_FSPEC + +/* Define to 1 if `ufs_flags' is member of `ufs_args_t'. */ +#undef HAVE_UFS_ARGS_T_UFS_FLAGS + +/* Define to 1 if `ufs_pgthresh' is member of `ufs_args_t'. */ +#undef HAVE_UFS_ARGS_T_UFS_PGTHRESH + +/* Define to 1 if you have the header file. */ +#undef HAVE_UFS_UFS_EXTATTR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UFS_UFS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UFS_UFS_UFSMOUNT_H + +/* Define to 1 if you have the `umount' function. */ +#undef HAVE_UMOUNT + +/* Define to 1 if you have the `umount2' function. */ +#undef HAVE_UMOUNT2 + +/* Define to 1 if you have the `uname' function. */ +#undef HAVE_UNAME + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `unmount' function. */ +#undef HAVE_UNMOUNT + +/* Define to 1 if you have the `uvmount' function. */ +#undef HAVE_UVMOUNT + +/* Define to 1 if you have the header file. */ +#undef HAVE_VARARGS_H + +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_VFORK_H + +/* Define to 1 if you have the `vfsmount' function. */ +#undef HAVE_VFSMOUNT + +/* Define to 1 if you have the `vmount' function. */ +#undef HAVE_VMOUNT + +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + +/* Define to 1 if you have the `wait3' function. */ +#undef HAVE_WAIT3 + +/* Define to 1 if you have the `waitpid' function. */ +#undef HAVE_WAITPID + +/* Define to 1 if `fork' works. */ +#undef HAVE_WORKING_FORK + +/* Define to 1 if `vfork' works. */ +#undef HAVE_WORKING_VFORK + +/* Define to 1 if you have the `xdr_attrstat' function. */ +#undef HAVE_XDR_ATTRSTAT + +/* Define to 1 if you have the `xdr_createargs' function. */ +#undef HAVE_XDR_CREATEARGS + +/* Define to 1 if you have the `xdr_dirlist' function. */ +#undef HAVE_XDR_DIRLIST + +/* Define to 1 if you have the `xdr_diropargs' function. */ +#undef HAVE_XDR_DIROPARGS + +/* Define to 1 if you have the `xdr_diropokres' function. */ +#undef HAVE_XDR_DIROPOKRES + +/* Define to 1 if you have the `xdr_diropres' function. */ +#undef HAVE_XDR_DIROPRES + +/* Define to 1 if you have the `xdr_dirpath' function. */ +#undef HAVE_XDR_DIRPATH + +/* Define to 1 if you have the `xdr_entry' function. */ +#undef HAVE_XDR_ENTRY + +/* Define to 1 if you have the `xdr_exportnode' function. */ +#undef HAVE_XDR_EXPORTNODE + +/* Define to 1 if you have the `xdr_exports' function. */ +#undef HAVE_XDR_EXPORTS + +/* Define to 1 if you have the `xdr_fattr' function. */ +#undef HAVE_XDR_FATTR + +/* Define to 1 if you have the `xdr_fhandle' function. */ +#undef HAVE_XDR_FHANDLE + +/* Define to 1 if you have the `xdr_fhstatus' function. */ +#undef HAVE_XDR_FHSTATUS + +/* Define to 1 if you have the `xdr_filename' function. */ +#undef HAVE_XDR_FILENAME + +/* Define to 1 if you have the `xdr_ftype' function. */ +#undef HAVE_XDR_FTYPE + +/* Define to 1 if you have the `xdr_groupnode' function. */ +#undef HAVE_XDR_GROUPNODE + +/* Define to 1 if you have the `xdr_groups' function. */ +#undef HAVE_XDR_GROUPS + +/* Define to 1 if you have the `xdr_linkargs' function. */ +#undef HAVE_XDR_LINKARGS + +/* Define to 1 if you have the `xdr_mountbody' function. */ +#undef HAVE_XDR_MOUNTBODY + +/* Define to 1 if you have the `xdr_mountlist' function. */ +#undef HAVE_XDR_MOUNTLIST + +/* Define to 1 if you have the `xdr_name' function. */ +#undef HAVE_XDR_NAME + +/* Define to 1 if you have the `xdr_nfscookie' function. */ +#undef HAVE_XDR_NFSCOOKIE + +/* Define to 1 if you have the `xdr_nfspath' function. */ +#undef HAVE_XDR_NFSPATH + +/* Define to 1 if you have the `xdr_nfsstat' function. */ +#undef HAVE_XDR_NFSSTAT + +/* Define to 1 if you have the `xdr_nfstime' function. */ +#undef HAVE_XDR_NFSTIME + +/* Define to 1 if you have the `xdr_nfs_fh' function. */ +#undef HAVE_XDR_NFS_FH + +/* Define to 1 if you have the `xdr_pointer' function. */ +#undef HAVE_XDR_POINTER + +/* Define to 1 if you have the `xdr_readargs' function. */ +#undef HAVE_XDR_READARGS + +/* Define to 1 if you have the `xdr_readdirargs' function. */ +#undef HAVE_XDR_READDIRARGS + +/* Define to 1 if you have the `xdr_readdirres' function. */ +#undef HAVE_XDR_READDIRRES + +/* Define to 1 if you have the `xdr_readlinkres' function. */ +#undef HAVE_XDR_READLINKRES + +/* Define to 1 if you have the `xdr_readokres' function. */ +#undef HAVE_XDR_READOKRES + +/* Define to 1 if you have the `xdr_readres' function. */ +#undef HAVE_XDR_READRES + +/* Define to 1 if you have the `xdr_renameargs' function. */ +#undef HAVE_XDR_RENAMEARGS + +/* Define to 1 if you have the `xdr_sattr' function. */ +#undef HAVE_XDR_SATTR + +/* Define to 1 if you have the `xdr_sattrargs' function. */ +#undef HAVE_XDR_SATTRARGS + +/* Define to 1 if you have the `xdr_statfsokres' function. */ +#undef HAVE_XDR_STATFSOKRES + +/* Define to 1 if you have the `xdr_statfsres' function. */ +#undef HAVE_XDR_STATFSRES + +/* Define to 1 if you have the `xdr_symlinkargs' function. */ +#undef HAVE_XDR_SYMLINKARGS + +/* Define to 1 if you have the `xdr_u_int64_t' function. */ +#undef HAVE_XDR_U_INT64_T + +/* Define to 1 if you have the `xdr_writeargs' function. */ +#undef HAVE_XDR_WRITEARGS + +/* Define to 1 if `flags' is member of `xfs_args_t'. */ +#undef HAVE_XFS_ARGS_T_FLAGS + +/* Define to 1 if `fspec' is member of `xfs_args_t'. */ +#undef HAVE_XFS_ARGS_T_FSPEC + +/* Define to 1 if you have the `yp_all' function. */ +#undef HAVE_YP_ALL + +/* Define to 1 if you have the `yp_get_default_domain' function. */ +#undef HAVE_YP_GET_DEFAULT_DOMAIN + +/* Define to 1 if you have the `_seterr_reply' function. */ +#undef HAVE__SETERR_REPLY + +/* Define to 1 if you have the `__rpc_get_local_uid' function. */ +#undef HAVE___RPC_GET_LOCAL_UID + +/* Define to 1 if you have the `__seterr_reply' function. */ +#undef HAVE___SETERR_REPLY + +/* Name of mount type to hide amd mount from df(1) */ +#undef HIDE_MOUNT_TYPE + +/* Define name of host machine's architecture (eg. sun4) */ +#undef HOST_ARCH + +/* Define name of host machine's cpu (eg. sparc) */ +#undef HOST_CPU + +/* Define the header version of (linux) hosts (eg. 2.2.10) */ +#undef HOST_HEADER_VERSION + +/* Define name of host */ +#undef HOST_NAME + +/* Define name and version of host machine (eg. solaris2.5.1) */ +#undef HOST_OS + +/* Define only name of host machine OS (eg. solaris2) */ +#undef HOST_OS_NAME + +/* Define only version of host machine (eg. 2.5.1) */ +#undef HOST_OS_VERSION + +/* Define name of host machine's vendor (eg. sun) */ +#undef HOST_VENDOR + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Ignore permission bits */ +#undef MNT2_CDFS_OPT_DEFPERM + +/* Enable external attributes */ +#undef MNT2_CDFS_OPT_EXTATT + +/* Show file generations */ +#undef MNT2_CDFS_OPT_GENS + +/* Disable filename case translation */ +#undef MNT2_CDFS_OPT_NOCASETRANS + +/* Use on-disk permission bits */ +#undef MNT2_CDFS_OPT_NODEFPERM + +/* Disable Joliet extensions */ +#undef MNT2_CDFS_OPT_NOJOLIET + +/* Disable Rock Ridge Interchange Protocol (RRIP) extensions */ +#undef MNT2_CDFS_OPT_NORRIP + +/* Strip off extension from version string */ +#undef MNT2_CDFS_OPT_NOVERSION + +/* Enable Rock Ridge Interchange Protocol (RRIP) case insensitive filename + extensions */ +#undef MNT2_CDFS_OPT_RRCASEINS + +/* Use Rock Ridge Interchange Protocol (RRIP) extensions */ +#undef MNT2_CDFS_OPT_RRIP + +/* asynchronous filesystem access */ +#undef MNT2_GEN_OPT_ASYNC + +/* automounter filesystem (ignore) flag, used in bsdi-4.1 */ +#undef MNT2_GEN_OPT_AUTOMNTFS + +/* automounter filesystem flag, used in Mac OS X / Darwin */ +#undef MNT2_GEN_OPT_AUTOMOUNTED + +/* directory hardlink */ +#undef MNT2_GEN_OPT_BIND + +/* cache (what?) */ +#undef MNT2_GEN_OPT_CACHE + +/* 6-argument mount */ +#undef MNT2_GEN_OPT_DATA + +/* Use a lazy unmount (detach) */ +#undef MNT2_GEN_OPT_DETACH + +/* Use a forced unmount */ +#undef MNT2_GEN_OPT_FORCE + +/* old (4-argument) mount (compatibility) */ +#undef MNT2_GEN_OPT_FSS + +/* old BSD group-id on create */ +#undef MNT2_GEN_OPT_GRPID + +/* ignore mount entry in df output */ +#undef MNT2_GEN_OPT_IGNORE + +/* journaling filesystem (AIX's UFS/FFS) */ +#undef MNT2_GEN_OPT_JFS + +/* honor mandatory locking requests */ +#undef MNT2_GEN_OPT_MANDLOCK + +/* do multi-component lookup on files */ +#undef MNT2_GEN_OPT_MULTI + +/* use type string instead of int */ +#undef MNT2_GEN_OPT_NEWTYPE + +/* NFS mount */ +#undef MNT2_GEN_OPT_NFS + +/* don't update access times */ +#undef MNT2_GEN_OPT_NOATIME + +/* nocache (what?) */ +#undef MNT2_GEN_OPT_NOCACHE + +/* do not interpret special device files */ +#undef MNT2_GEN_OPT_NODEV + +/* don't update directory access times */ +#undef MNT2_GEN_OPT_NODIRATIME + +/* no exec calls allowed */ +#undef MNT2_GEN_OPT_NOEXEC + +/* do not interpret special device files */ +#undef MNT2_GEN_OPT_NONDEV + +/* Disallow mounts beneath this mount */ +#undef MNT2_GEN_OPT_NOSUB + +/* Setuid programs disallowed */ +#undef MNT2_GEN_OPT_NOSUID + +/* Return ENAMETOOLONG for long filenames */ +#undef MNT2_GEN_OPT_NOTRUNC + +/* Pass mount option string to kernel */ +#undef MNT2_GEN_OPT_OPTIONSTR + +/* allow overlay mounts */ +#undef MNT2_GEN_OPT_OVERLAY + +/* check quotas */ +#undef MNT2_GEN_OPT_QUOTA + +/* Read-only */ +#undef MNT2_GEN_OPT_RDONLY + +/* change options on an existing mount */ +#undef MNT2_GEN_OPT_REMOUNT + +/* read only */ +#undef MNT2_GEN_OPT_RONLY + +/* synchronize data immediately to filesystem */ +#undef MNT2_GEN_OPT_SYNC + +/* synchronous filesystem access (same as SYNC) */ +#undef MNT2_GEN_OPT_SYNCHRONOUS + +/* Mount with Sys 5-specific semantics */ +#undef MNT2_GEN_OPT_SYS5 + +/* Union mount */ +#undef MNT2_GEN_OPT_UNION + +/* set max secs for dir attr cache */ +#undef MNT2_NFS_OPT_ACDIRMAX + +/* set min secs for dir attr cache */ +#undef MNT2_NFS_OPT_ACDIRMIN + +/* set max secs for file attr cache */ +#undef MNT2_NFS_OPT_ACREGMAX + +/* set min secs for file attr cache */ +#undef MNT2_NFS_OPT_ACREGMIN + +/* Authentication error */ +#undef MNT2_NFS_OPT_AUTHERR + +/* hide mount type from df(1) */ +#undef MNT2_NFS_OPT_AUTO + +/* Linux broken setuid */ +#undef MNT2_NFS_OPT_BROKEN_SUID + +/* set dead server retry thresh */ +#undef MNT2_NFS_OPT_DEADTHRESH + +/* Dismount in progress */ +#undef MNT2_NFS_OPT_DISMINPROG + +/* Dismounted */ +#undef MNT2_NFS_OPT_DISMNT + +/* Don't estimate rtt dynamically */ +#undef MNT2_NFS_OPT_DUMBTIMR + +/* provide name of server's fs to system */ +#undef MNT2_NFS_OPT_FSNAME + +/* System V-style gid inheritance */ +#undef MNT2_NFS_OPT_GRPID + +/* Has authenticator */ +#undef MNT2_NFS_OPT_HASAUTH + +/* set hostname for error printf */ +#undef MNT2_NFS_OPT_HOSTNAME + +/* ignore mount point */ +#undef MNT2_NFS_OPT_IGNORE + +/* allow interrupts on hard mount */ +#undef MNT2_NFS_OPT_INT + +/* Bits set internally */ +#undef MNT2_NFS_OPT_INTERNAL + +/* allow interrupts on hard mount */ +#undef MNT2_NFS_OPT_INTR + +/* Use Kerberos authentication */ +#undef MNT2_NFS_OPT_KERB + +/* use kerberos credentials */ +#undef MNT2_NFS_OPT_KERBEROS + +/* transport's knetconfig structure */ +#undef MNT2_NFS_OPT_KNCONF + +/* set lease term (nqnfs) */ +#undef MNT2_NFS_OPT_LEASETERM + +/* Local locking (no lock manager) */ +#undef MNT2_NFS_OPT_LLOCK + +/* set maximum grouplist size */ +#undef MNT2_NFS_OPT_MAXGRPS + +/* Mnt server for mnt point */ +#undef MNT2_NFS_OPT_MNTD + +/* Assume writes were mine */ +#undef MNT2_NFS_OPT_MYWRITE + +/* mount NFS Version 3 */ +#undef MNT2_NFS_OPT_NFSV3 + +/* don't cache attributes */ +#undef MNT2_NFS_OPT_NOAC + +/* does not support Access Control Lists */ +#undef MNT2_NFS_OPT_NOACL + +/* Don't Connect the socket */ +#undef MNT2_NFS_OPT_NOCONN + +/* no close-to-open consistency */ +#undef MNT2_NFS_OPT_NOCTO + +/* disallow interrupts on hard mounts */ +#undef MNT2_NFS_OPT_NOINT + +/* Don't use locking */ +#undef MNT2_NFS_OPT_NONLM + +/* does not support readdir+ */ +#undef MNT2_NFS_OPT_NORDIRPLUS + +/* Get lease for lookup */ +#undef MNT2_NFS_OPT_NQLOOKLEASE + +/* Use Nqnfs protocol */ +#undef MNT2_NFS_OPT_NQNFS + +/* paging threshold */ +#undef MNT2_NFS_OPT_PGTHRESH + +/* static pathconf kludge info */ +#undef MNT2_NFS_OPT_POSIX + +/* Use local locking */ +#undef MNT2_NFS_OPT_PRIVATE + +/* allow property list operations (ACLs over NFS) */ +#undef MNT2_NFS_OPT_PROPLIST + +/* Rcv socket lock */ +#undef MNT2_NFS_OPT_RCVLOCK + +/* Do lookup with readdir (nqnfs) */ +#undef MNT2_NFS_OPT_RDIRALOOK + +/* Use Readdirplus for NFSv3 */ +#undef MNT2_NFS_OPT_RDIRPLUS + +/* set read ahead */ +#undef MNT2_NFS_OPT_READAHEAD + +/* Set readdir size */ +#undef MNT2_NFS_OPT_READDIRSIZE + +/* Allocate a reserved port */ +#undef MNT2_NFS_OPT_RESVPORT + +/* set number of request retries */ +#undef MNT2_NFS_OPT_RETRANS + +/* read only */ +#undef MNT2_NFS_OPT_RONLY + +/* use RPC to do secure NFS time sync */ +#undef MNT2_NFS_OPT_RPCTIMESYNC + +/* set read size */ +#undef MNT2_NFS_OPT_RSIZE + +/* secure mount */ +#undef MNT2_NFS_OPT_SECURE + +/* Send socket lock */ +#undef MNT2_NFS_OPT_SNDLOCK + +/* soft mount (hard is default) */ +#undef MNT2_NFS_OPT_SOFT + +/* spongy mount */ +#undef MNT2_NFS_OPT_SPONGY + +/* Reserved for nfsv4 */ +#undef MNT2_NFS_OPT_STRICTLOCK + +/* set symlink cache time-to-live */ +#undef MNT2_NFS_OPT_SYMTTL + +/* use TCP for mounts */ +#undef MNT2_NFS_OPT_TCP + +/* set initial timeout */ +#undef MNT2_NFS_OPT_TIMEO + +/* do not use shared cache for all mountpoints */ +#undef MNT2_NFS_OPT_UNSHARED + +/* linux NFSv3 */ +#undef MNT2_NFS_OPT_VER3 + +/* Wait for authentication */ +#undef MNT2_NFS_OPT_WAITAUTH + +/* Wants an authenticator */ +#undef MNT2_NFS_OPT_WANTAUTH + +/* Want receive socket lock */ +#undef MNT2_NFS_OPT_WANTRCV + +/* Want send socket lock */ +#undef MNT2_NFS_OPT_WANTSND + +/* set write size */ +#undef MNT2_NFS_OPT_WSIZE + +/* 32<->64 dir cookie translation */ +#undef MNT2_NFS_OPT_XLATECOOKIE + +/* Force Win95 long names */ +#undef MNT2_PCFS_OPT_LONGNAME + +/* Completely ignore Win95 entries */ +#undef MNT2_PCFS_OPT_NOWIN95 + +/* Force old DOS short names only */ +#undef MNT2_PCFS_OPT_SHORTNAME + +/* Close session when unmounting */ +#undef MNT2_UDF_OPT_CLOSESESSION + +/* Name of mount table file name */ +#undef MNTTAB_FILE_NAME + +/* Mount Table option string: Max attr cache timeout (dirs) */ +#undef MNTTAB_OPT_ACDIRMAX + +/* Mount Table option string: Min attr cache timeout (dirs) */ +#undef MNTTAB_OPT_ACDIRMIN + +/* Mount Table option string: Max attr cache timeout (files) */ +#undef MNTTAB_OPT_ACREGMAX + +/* Mount Table option string: Min attr cache timeout (files) */ +#undef MNTTAB_OPT_ACREGMIN + +/* Mount Table option string: Attr cache timeout (sec) */ +#undef MNTTAB_OPT_ACTIMEO + +/* Mount Table option string: Do mount retries in background */ +#undef MNTTAB_OPT_BG + +/* Mount Table option string: compress */ +#undef MNTTAB_OPT_COMPRESS + +/* Mount Table option string: Device id of mounted fs */ +#undef MNTTAB_OPT_DEV + +/* Mount Table option string: Automount direct map mount */ +#undef MNTTAB_OPT_DIRECT + +/* Mount Table option string: Do mount retries in foreground */ +#undef MNTTAB_OPT_FG + +/* Mount Table option string: Filesystem id of mounted fs */ +#undef MNTTAB_OPT_FSID + +/* Mount Table option string: SysV-compatible gid on create */ +#undef MNTTAB_OPT_GRPID + +/* Mount Table option string: Hard mount */ +#undef MNTTAB_OPT_HARD + +/* Mount Table option string: Ignore this entry */ +#undef MNTTAB_OPT_IGNORE + +/* Mount Table option string: Automount indirect map mount */ +#undef MNTTAB_OPT_INDIRECT + +/* Mount Table option string: Allow NFS ops to be interrupted */ +#undef MNTTAB_OPT_INTR + +/* Mount Table option string: Secure (AUTH_Kerb) mounting */ +#undef MNTTAB_OPT_KERB + +/* Mount Table option string: Local locking (no lock manager) */ +#undef MNTTAB_OPT_LLOCK + +/* Force Win95 long names */ +#undef MNTTAB_OPT_LONGNAME + +/* Mount Table option string: Automount map */ +#undef MNTTAB_OPT_MAP + +/* Mount Table option string: max groups */ +#undef MNTTAB_OPT_MAXGROUPS + +/* Mount Table option string: Do multi-component lookup */ +#undef MNTTAB_OPT_MULTI + +/* Mount Table option string: Don't cache attributes at all */ +#undef MNTTAB_OPT_NOAC + +/* Access Control Lists are not supported */ +#undef MNTTAB_OPT_NOACL + +/* Mount Table option string: No auto (what?) */ +#undef MNTTAB_OPT_NOAUTO + +/* Mount Table option string: No connection */ +#undef MNTTAB_OPT_NOCONN + +/* Mount Table option string: No close-to-open consistency */ +#undef MNTTAB_OPT_NOCTO + +/* Mount Table option string: Don't allow interrupted ops */ +#undef MNTTAB_OPT_NOINTR + +/* Mount Table option string: Don't check quotas */ +#undef MNTTAB_OPT_NOQUOTA + +/* Mount Table option string: Do no allow setting sec attrs */ +#undef MNTTAB_OPT_NOSETSEC + +/* Mount Table option string: Disallow mounts on subdirs */ +#undef MNTTAB_OPT_NOSUB + +/* Mount Table option string: Set uid not allowed */ +#undef MNTTAB_OPT_NOSUID + +/* Completely ignore Win95 entries */ +#undef MNTTAB_OPT_NOWIN95 + +/* Mount Table option string: action to taken on error */ +#undef MNTTAB_OPT_ONERROR + +/* Mount Table option string: paging threshold */ +#undef MNTTAB_OPT_PGTHRESH + +/* Mount Table option string: NFS server IP port number */ +#undef MNTTAB_OPT_PORT + +/* Mount Table option string: Get static pathconf for mount */ +#undef MNTTAB_OPT_POSIX + +/* Mount Table option string: Use local locking */ +#undef MNTTAB_OPT_PRIVATE + +/* Mount Table option string: support property lists (ACLs) */ +#undef MNTTAB_OPT_PROPLIST + +/* Mount Table option string: protocol network_id indicator */ +#undef MNTTAB_OPT_PROTO + +/* Mount Table option string: Check quotas */ +#undef MNTTAB_OPT_QUOTA + +/* Mount Table option string: Change mount options */ +#undef MNTTAB_OPT_REMOUNT + +/* Mount Table option string: Max retransmissions (soft mnts) */ +#undef MNTTAB_OPT_RETRANS + +/* Mount Table option string: Number of mount retries */ +#undef MNTTAB_OPT_RETRY + +/* Mount Table option string: Read only */ +#undef MNTTAB_OPT_RO + +/* Mount Table option string: Read/write with quotas */ +#undef MNTTAB_OPT_RQ + +/* Mount Table option string: Max NFS read size (bytes) */ +#undef MNTTAB_OPT_RSIZE + +/* Mount Table option string: Read/write */ +#undef MNTTAB_OPT_RW + +/* Mount Table option string: Secure (AUTH_DES) mounting */ +#undef MNTTAB_OPT_SECURE + +/* Force old DOS short names only */ +#undef MNTTAB_OPT_SHORTNAME + +/* Mount Table option string: Soft mount */ +#undef MNTTAB_OPT_SOFT + +/* Mount Table option string: spongy mount */ +#undef MNTTAB_OPT_SPONGY + +/* Mount Table option string: Set uid allowed */ +#undef MNTTAB_OPT_SUID + +/* Mount Table option string: set symlink cache time-to-live */ +#undef MNTTAB_OPT_SYMTTL + +/* Mount Table option string: Synchronous local directory ops */ +#undef MNTTAB_OPT_SYNCDIR + +/* Mount Table option string: NFS timeout (1/10 sec) */ +#undef MNTTAB_OPT_TIMEO + +/* Mount Table option string: min. time between inconsistencies */ +#undef MNTTAB_OPT_TOOSOON + +/* Mount Table option string: protocol version number indicator */ +#undef MNTTAB_OPT_VERS + +/* Mount Table option string: Max NFS write size (bytes) */ +#undef MNTTAB_OPT_WSIZE + +/* Mount-table entry name for AUTOFS filesystem */ +#undef MNTTAB_TYPE_AUTOFS + +/* Mount-table entry name for CACHEFS filesystem */ +#undef MNTTAB_TYPE_CACHEFS + +/* Mount-table entry name for CDFS filesystem */ +#undef MNTTAB_TYPE_CDFS + +/* Mount-table entry name for CFS (crypto) filesystem */ +#undef MNTTAB_TYPE_CFS + +/* Mount-table entry name for EFS filesystem (irix) */ +#undef MNTTAB_TYPE_EFS + +/* Mount-table entry name for EXT2 filesystem (linux) */ +#undef MNTTAB_TYPE_EXT2 + +/* Mount-table entry name for EXT3 filesystem (linux) */ +#undef MNTTAB_TYPE_EXT3 + +/* Mount-table entry name for EXT4 filesystem (linux) */ +#undef MNTTAB_TYPE_EXT4 + +/* Mount-table entry name for FFS filesystem */ +#undef MNTTAB_TYPE_FFS + +/* Mount-table entry name for LOFS filesystem */ +#undef MNTTAB_TYPE_LOFS + +/* Mount-table entry name for LUSTRE filesystem */ +#undef MNTTAB_TYPE_LUSTRE + +/* Mount-table entry name for MFS filesystem */ +#undef MNTTAB_TYPE_MFS + +/* Mount-table entry name for NFS filesystem */ +#undef MNTTAB_TYPE_NFS + +/* Mount-table entry name for NFS3 filesystem */ +#undef MNTTAB_TYPE_NFS3 + +/* Mount-table entry name for NFS4 filesystem */ +#undef MNTTAB_TYPE_NFS4 + +/* Mount-table entry name for NULLFS (loopback on bsd44) filesystem */ +#undef MNTTAB_TYPE_NULLFS + +/* Mount-table entry name for PCFS filesystem */ +#undef MNTTAB_TYPE_PCFS + +/* Mount-table entry name for TFS filesystem */ +#undef MNTTAB_TYPE_TFS + +/* Mount-table entry name for TMPFS filesystem */ +#undef MNTTAB_TYPE_TMPFS + +/* Mount-table entry name for UDF filesystem */ +#undef MNTTAB_TYPE_UDF + +/* Mount-table entry name for UFS filesystem */ +#undef MNTTAB_TYPE_UFS + +/* Mount-table entry name for UMAPFS (uid/gid mapping) filesystem */ +#undef MNTTAB_TYPE_UMAPFS + +/* Mount-table entry name for UNIONFS filesystem */ +#undef MNTTAB_TYPE_UNIONFS + +/* Mount-table entry name for XFS filesystem (irix) */ +#undef MNTTAB_TYPE_XFS + +/* Define if mount table is on file, undefine if in kernel */ +#undef MOUNT_TABLE_ON_FILE + +/* Mount(2) type/name for AUTOFS filesystem */ +#undef MOUNT_TYPE_AUTOFS + +/* Mount(2) type/name for CACHEFS filesystem */ +#undef MOUNT_TYPE_CACHEFS + +/* Mount(2) type/name for CDFS filesystem */ +#undef MOUNT_TYPE_CDFS + +/* Mount(2) type/name for CFS (crypto) filesystem */ +#undef MOUNT_TYPE_CFS + +/* Mount(2) type/name for EFS filesystem (irix) */ +#undef MOUNT_TYPE_EFS + +/* Mount(2) type/name for EXT2 filesystem (linux) */ +#undef MOUNT_TYPE_EXT2 + +/* Mount(2) type/name for EXT3 filesystem (linux) */ +#undef MOUNT_TYPE_EXT3 + +/* Mount(2) type/name for EXT4 filesystem (linux) */ +#undef MOUNT_TYPE_EXT4 + +/* Mount(2) type/name for FFS filesystem */ +#undef MOUNT_TYPE_FFS + +/* Mount(2) type/name for IGNORE filesystem (not real just ignore for df) */ +#undef MOUNT_TYPE_IGNORE + +/* Mount(2) type/name for LOFS filesystem */ +#undef MOUNT_TYPE_LOFS + +/* Mount(2) type/name for LUSTRE filesystem */ +#undef MOUNT_TYPE_LUSTRE + +/* Mount(2) type/name for MFS filesystem */ +#undef MOUNT_TYPE_MFS + +/* Mount(2) type/name for NFS filesystem */ +#undef MOUNT_TYPE_NFS + +/* Mount(2) type/name for NFS3 filesystem */ +#undef MOUNT_TYPE_NFS3 + +/* Mount(2) type/name for NFS4 filesystem */ +#undef MOUNT_TYPE_NFS4 + +/* Mount(2) type/name for NULLFS (loopback on bsd44) filesystem */ +#undef MOUNT_TYPE_NULLFS + +/* Mount(2) type/name for PCFS filesystem. XXX: conf/trap/trap_hpux.h may + override this definition for HPUX 9.0 */ +#undef MOUNT_TYPE_PCFS + +/* Mount(2) type/name for TFS filesystem */ +#undef MOUNT_TYPE_TFS + +/* Mount(2) type/name for TMPFS filesystem */ +#undef MOUNT_TYPE_TMPFS + +/* Mount(2) type/name for UDF filesystem */ +#undef MOUNT_TYPE_UDF + +/* Mount(2) type/name for UFS filesystem */ +#undef MOUNT_TYPE_UFS + +/* Mount(2) type/name for UMAPFS (uid/gid mapping) filesystem */ +#undef MOUNT_TYPE_UMAPFS + +/* Mount(2) type/name for UNIONFS filesystem */ +#undef MOUNT_TYPE_UNIONFS + +/* Mount(2) type/name for XFS filesystem (irix) */ +#undef MOUNT_TYPE_XFS + +/* The string used in printf to print the mount-type field of mount(2) */ +#undef MTYPE_PRINTF_TYPE + +/* Type of the mount-type field in the mount() system call */ +#undef MTYPE_TYPE + +/* does libwrap expect caller to define the variables allow_severity and + deny_severity */ +#undef NEED_LIBWRAP_SEVERITY_VARIABLES + +/* Defined to the header file containing ndbm-compatible definitions */ +#undef NEW_DBM_H + +/* Define the field name for the filehandle within nfs_args_t */ +#undef NFS_FH_FIELD + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Type of the 6th argument to recvfrom() */ +#undef RECVFROM_FROMLEN_TYPE + +/* should signal handlers be reinstalled? */ +#undef REINSTALL_SIGNAL_HANDLER + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define to 1 if the `setpgrp' function takes no argument. */ +#undef SETPGRP_VOID + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +#undef STAT_MACROS_BROKEN + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define the type of the 3rd argument ('in') to svc_getargs() */ +#undef SVC_IN_ARG_TYPE + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Define user name */ +#undef USER_NAME + +/* define if must NOT use NFS "noconn" option */ +#undef USE_CONNECTED_NFS_SOCKETS + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* define if must use NFS "noconn" option */ +#undef USE_UNCONNECTED_NFS_SOCKETS + +/* Version number of package */ +#undef VERSION + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define to the type of xdr procedure type */ +#undef XDRPROC_T_TYPE + +/* Type of the 3rd argument to yp_order() */ +#undef YP_ORDER_OUTORDER_TYPE + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#undef YYTEXT_POINTER + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Define a type/structure for an NFS V2 filehandle */ +#undef am_nfs_fh + +/* Define a type/structure for an NFS V3 filehandle */ +#undef am_nfs_fh3 + +/* Define a type for the autofs_args structure */ +#undef autofs_args_t + +/* Define a type for the cachefs_args structure */ +#undef cachefs_args_t + +/* Define a type for the cdfs_args structure */ +#undef cdfs_args_t + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define a type for the efs_args structure */ +#undef efs_args_t + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define a type for the lofs_args structure */ +#undef lofs_args_t + +/* Define a type for the mfs_args structure */ +#undef mfs_args_t + +/* Define to `int' if does not define. */ +#undef mode_t + +/* Define a type for the nfs_args structure */ +#undef nfs_args_t + +/* Define a type for the pcfs_args structure */ +#undef pcfs_args_t + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Check if pte_t is defined in */ +#undef pte_t + +/* Define a type for the rfs_args structure */ +#undef rfs_args_t + +/* Check if rpcvers_t is defined in */ +#undef rpcvers_t + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* Define to `long' if does not define. */ +#undef time_t + +/* Define a type for the tmpfs_args structure */ +#undef tmpfs_args_t + +/* Define a type for the udf_args structure */ +#undef udf_args_t + +/* Define a type for the ufs_args structure */ +#undef ufs_args_t + +/* Define to `int' if doesn't define. */ +#undef uid_t + +/* Define as `fork' if `vfork' does not work. */ +#undef vfork + +/* Define to "void *" if compiler can handle, otherwise "char *" */ +#undef voidp + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +#undef volatile + +/* Define a type for the xfs_args structure */ +#undef xfs_args_t + + +/****************************************************************************/ +/*** INCLUDE localconfig.h if it exists, to allow users to make some ***/ +/*** compile time configuration changes. ***/ +/****************************************************************************/ +/* does a local configuration file exist? */ +#undef HAVE_LOCALCONFIG_H +#ifdef HAVE_LOCALCONFIG_H +# include +#endif /* HAVE_LOCALCONFIG_H */ + +#endif /* not _CONFIG_H */ + +/* + * Local Variables: + * mode: c + * End: + */ + +/* End of am-utils-6.x config.h file */ + diff --git a/config.sub b/config.sub new file mode 100755 index 00000000000..9633db70467 --- /dev/null +++ b/config.sub @@ -0,0 +1,1791 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-08-10' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 \ + | or1k | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or1k-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure new file mode 100755 index 00000000000..045e58f8658 --- /dev/null +++ b/configure @@ -0,0 +1,58747 @@ +#! /bin/sh +# From configure.ac Revision: 1.134 . +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for am-utils 6.2. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +# +# Copyright (c) 1997-2011 Erez Zadok +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://bugzilla.am-utils.org/ or am-utils@am-utils.org +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='am-utils' +PACKAGE_TARNAME='am-utils' +PACKAGE_VERSION='6.2' +PACKAGE_STRING='am-utils 6.2' +PACKAGE_BUGREPORT='https://bugzilla.am-utils.org/ or am-utils@am-utils.org' +PACKAGE_URL='' + +ac_unique_file="amd/amd.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LIBTOOL_DEPS +AMU_LIB_OBJS +LTLIBOBJS +WRAPLIB +am_utils_unmount_args +am_utils_unmount_call +AMU_AUTOFS_PROT_HEADER +AMD_INFO_OBJS +AMD_FS_OBJS +AMU_NFS_PROT_HEADER +LIBOBJS +UNMOUNT_PROGRAM +PERL +LEX_OUTPUT_ROOT +LEXLIB +LEX +YACC +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +SED +LIBTOOL +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +AMU_CFLAGS +EGREP +GREP +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +LIBTOOL_LDFLAGS +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='am_utils_mount_trap +am_utils_nfs_sa_dref +am_utils_nfs_hn_dref +am_utils_nfs_fh_dref' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_dependency_tracking +with_ldap +with_hesiod +with_ndbm +enable_debug +enable_cppflags +enable_libs +enable_ldflags +enable_am_cflags +enable_maintainer_mode +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_largefile +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +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 am-utils 6.2 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/am-utils] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of am-utils 6.2:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-debug=ARG enable debugging (yes/mem/no) + --enable-cppflags=ARG configure/compile with ARG (-I) preprocessor flags + --enable-libs=ARG configure/compile with ARG (-l) library flags + --enable-ldflags=ARG configure/compile with ARG (-L) library flags + --enable-am-cflags=ARG compile package with ARG additional C flags + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-shared[=PKGS] build shared libraries [default=no] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-ldap enable LDAP support (default=yes if found) + --with-hesiod enable HESIOD support (default=yes if found) + --with-ndbm enable NDBM support (default=yes if found) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +am-utils configure 6.2 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. + +Copyright (c) 1997-2011 Erez Zadok +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ---------------------------------------------------------------------- ## +## Report this to https://bugzilla.am-utils.org/ or am-utils@am-utils.org ## +## ---------------------------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type +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 am-utils $as_me 6.2, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** INITIALIZATION ***" >&5 +$as_echo "$as_me: *** INITIALIZATION ***" >&6;} + + +ac_config_headers="$ac_config_headers config.h" + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SYSTEM TYPES ***" >&5 +$as_echo "$as_me: *** SYSTEM TYPES ***" >&6;} +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +# these are defined already by the macro 'CANONICAL_HOST' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking host cpu" >&5 +$as_echo_n "checking host cpu... " >&6; } + cat >>confdefs.h <<_ACEOF +#define HOST_CPU "$host_cpu" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_cpu" >&5 +$as_echo "$host_cpu" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking vendor" >&5 +$as_echo_n "checking vendor... " >&6; } + cat >>confdefs.h <<_ACEOF +#define HOST_VENDOR "$host_vendor" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_vendor" >&5 +$as_echo "$host_vendor" >&6; } + +# if vendor is apple, then check values in /usr/bin/sw_vers + if test "${host_vendor}" = "apple" + then + pn=`sw_vers -productName 2>/dev/null` + pv=`sw_vers -productVersion 2>/dev/null` + if test -n "${pn}" && test -n "${pv}" + then + host_os_name=`echo ${pn} | tr -d ' ' | tr 'A-Z' 'a-z'` + host_os_version="${pv}" + host_os="${host_os_name}-${host_os_version}" + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking host full OS name and version" >&5 +$as_echo_n "checking host full OS name and version... " >&6; } + # normalize some host OS names + case ${host_os} in + # linux is linux is linux, regardless of RMS. + linux-gnu* | lignux* ) host_os=linux ;; + # NetBSD systems today are elf, so no need to distinguish + netbsdelf* ) host_os=`echo ${host_os} | sed 's/^netbsdelf/netbsd/'`;; + esac + cat >>confdefs.h <<_ACEOF +#define HOST_OS "$host_os" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_os" >&5 +$as_echo "$host_os" >&6; } + +# break host_os into host_os_name and host_os_version + { $as_echo "$as_me:${as_lineno-$LINENO}: checking host OS name" >&5 +$as_echo_n "checking host OS name... " >&6; } + host_os_name=`echo $host_os | sed 's/\..*//g'` + # normalize some OS names + case ${host_os_name} in + # linux is linux is linux, regardless of RMS. + linux-gnu* | lignux* ) host_os_name=linux ;; + # all NetBSD systems today should just show up as "netbsd" + netbsd* ) host_os_name=netbsd;; + esac + cat >>confdefs.h <<_ACEOF +#define HOST_OS_NAME "$host_os_name" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_os_name" >&5 +$as_echo "$host_os_name" >&6; } + +# parse out the OS version of the host + { $as_echo "$as_me:${as_lineno-$LINENO}: checking host OS version" >&5 +$as_echo_n "checking host OS version... " >&6; } + host_os_version=`echo $host_os | sed 's/^[^0-9]*//g'` + if test -z "$host_os_version" + then + host_os_version=`(uname -r) 2>/dev/null` || host_os_version=unknown + fi + case ${host_os_version} in + # fixes for some OS versions (solaris used to be here) + * ) # do nothing for now + ;; + esac + cat >>confdefs.h <<_ACEOF +#define HOST_OS_VERSION "$host_os_version" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_os_version" >&5 +$as_echo "$host_os_version" >&6; } + +# figure out host architecture (different than CPU) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking host OS architecture" >&5 +$as_echo_n "checking host OS architecture... " >&6; } + host_arch=`(uname -m) 2>/dev/null` || host_arch=unknown + # normalize some names + case ${host_arch} in + sun4* ) host_arch=sun4 ;; + sun3x ) host_arch=sun3 ;; + sun ) host_arch=`(arch) 2>/dev/null` || host_arch=unknown ;; + i?86 ) host_arch=i386 ;; # all x86 should show up as i386 + Power*Macintosh ) host_arch=powerpc ;; + esac + cat >>confdefs.h <<_ACEOF +#define HOST_ARCH "$host_arch" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_arch" >&5 +$as_echo "$host_arch" >&6; } + +# figure out (linux) distribution, if any + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OS system distribution" >&5 +$as_echo_n "checking OS system distribution... " >&6; } + ac_config_distro=`$SHELL $ac_aux_dir/config.guess.long | cut -d'-' -f4-` + if test -z "$ac_config_distro" + then + ac_config_distro="none" + fi + cat >>confdefs.h <<_ACEOF +#define DISTRO_NAME "$ac_config_distro" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_config_distro" >&5 +$as_echo "$ac_config_distro" >&6; } + +# figure out host name + { $as_echo "$as_me:${as_lineno-$LINENO}: checking host name" >&5 +$as_echo_n "checking host name... " >&6; } + host_name=`(hostname || uname -n) 2>/dev/null` || host_name=unknown + cat >>confdefs.h <<_ACEOF +#define HOST_NAME "$host_name" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_name" >&5 +$as_echo "$host_name" >&6; } + +# figure out user name + { $as_echo "$as_me:${as_lineno-$LINENO}: checking user name" >&5 +$as_echo_n "checking user name... " >&6; } + if test -n "$USER" + then + user_name="$USER" + else + if test -n "$LOGNAME" + then + user_name="$LOGNAME" + else + user_name=`(whoami) 2>/dev/null` || user_name=unknown + fi + fi + cat >>confdefs.h <<_ACEOF +#define USER_NAME "$user_name" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $user_name" >&5 +$as_echo "$user_name" >&6; } + +# figure out configuration date + { $as_echo "$as_me:${as_lineno-$LINENO}: checking configuration date" >&5 +$as_echo_n "checking configuration date... " >&6; } + config_date=`(date) 2>/dev/null` || config_date=unknown_date + cat >>confdefs.h <<_ACEOF +#define CONFIG_DATE "$config_date" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $config_date" >&5 +$as_echo "$config_date" >&6; } + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** PACKAGE NAME AND VERSION ***" >&5 +$as_echo "$as_me: *** PACKAGE NAME AND VERSION ***" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking package name" >&5 +$as_echo_n "checking package name... " >&6; } +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PACKAGE_NAME\"" >&5 +$as_echo "\"$PACKAGE_NAME\"" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of package" >&5 +$as_echo_n "checking version of package... " >&6; } +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PACKAGE_VERSION\"" >&5 +$as_echo "\"$PACKAGE_VERSION\"" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking bug-reporting address" >&5 +$as_echo_n "checking bug-reporting address... " >&6; } +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PACKAGE_BUGREPORT\"" >&5 +$as_echo "\"$PACKAGE_BUGREPORT\"" >&6; } + +am__api_version='1.14' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='am-utils' + VERSION='6.2' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi +LIBTOOL_LDFLAGS="-version-info 4:0:0" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** PARTICULAR PROGRAMS (part 1) ***" >&5 +$as_echo "$as_me: *** PARTICULAR PROGRAMS (part 1) ***" >&6;} +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test "x$CC" != xcc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +if test $ac_cv_c_compiler_gnu = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +$as_echo_n "checking whether $CC needs -traditional... " >&6; } +if ${ac_cv_prog_gcc_traditional+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_pattern="Autoconf.*'x'" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then : + ac_cv_prog_gcc_traditional=yes +else + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then : + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +$as_echo "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 +$as_echo_n "checking for library containing strerror... " >&6; } +if ${ac_cv_search_strerror+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char strerror (); +int +main () +{ +return strerror (); + ; + return 0; +} +_ACEOF +for ac_lib in '' cposix; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_strerror=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_strerror+:} false; then : + break +fi +done +if ${ac_cv_search_strerror+:} false; then : + +else + ac_cv_search_strerror=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 +$as_echo "$ac_cv_search_strerror" >&6; } +ac_res=$ac_cv_search_strerror +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = xyes; then : + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** OPTION PROCESSING ***" >&5 +$as_echo "$as_me: *** OPTION PROCESSING ***" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ldap is wanted" >&5 +$as_echo_n "checking if ldap is wanted... " >&6; } +ac_upcase=`echo ldap|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + +# Check whether --with-ldap was given. +if test "${with_ldap+set}" = set; then : + withval=$with_ldap; +if test "$withval" = "yes"; then + with_ldap=yes +elif test "$withval" = "no"; then + with_ldap=no +else + as_fn_error $? "please use \"yes\" or \"no\" with --with-ldap" "$LINENO" 5 +fi + +else + +with_ldap=yes + +fi + +if test "$with_ldap" = "yes" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will enable if all libraries are found" >&5 +$as_echo "yes, will enable if all libraries are found" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if hesiod is wanted" >&5 +$as_echo_n "checking if hesiod is wanted... " >&6; } +ac_upcase=`echo hesiod|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + +# Check whether --with-hesiod was given. +if test "${with_hesiod+set}" = set; then : + withval=$with_hesiod; +if test "$withval" = "yes"; then + with_hesiod=yes +elif test "$withval" = "no"; then + with_hesiod=no +else + as_fn_error $? "please use \"yes\" or \"no\" with --with-hesiod" "$LINENO" 5 +fi + +else + +with_hesiod=yes + +fi + +if test "$with_hesiod" = "yes" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will enable if all libraries are found" >&5 +$as_echo "yes, will enable if all libraries are found" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ndbm is wanted" >&5 +$as_echo_n "checking if ndbm is wanted... " >&6; } +ac_upcase=`echo ndbm|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + +# Check whether --with-ndbm was given. +if test "${with_ndbm+set}" = set; then : + withval=$with_ndbm; +if test "$withval" = "yes"; then + with_ndbm=yes +elif test "$withval" = "no"; then + with_ndbm=no +else + as_fn_error $? "please use \"yes\" or \"no\" with --with-ndbm" "$LINENO" 5 +fi + +else + +with_ndbm=yes + +fi + +if test "$with_ndbm" = "yes" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will enable if all libraries are found" >&5 +$as_echo "yes, will enable if all libraries are found" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for debugging options" >&5 +$as_echo_n "checking for debugging options... " >&6; } +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; +if test "$enableval" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define DEBUG 1" >>confdefs.h + + ac_cv_opt_debug=yes +elif test "$enableval" = mem; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: mem" >&5 +$as_echo "mem" >&6; } + $as_echo "#define DEBUG 1" >>confdefs.h + + $as_echo "#define DEBUG_MEM 1" >>confdefs.h + + ac_fn_c_check_func "$LINENO" "malloc_verify" "ac_cv_func_malloc_verify" +if test "x$ac_cv_func_malloc_verify" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc_verify in -lmapmalloc" >&5 +$as_echo_n "checking for malloc_verify in -lmapmalloc... " >&6; } +if ${ac_cv_lib_mapmalloc_malloc_verify+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmapmalloc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char malloc_verify (); +int +main () +{ +return malloc_verify (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mapmalloc_malloc_verify=yes +else + ac_cv_lib_mapmalloc_malloc_verify=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mapmalloc_malloc_verify" >&5 +$as_echo "$ac_cv_lib_mapmalloc_malloc_verify" >&6; } +if test "x$ac_cv_lib_mapmalloc_malloc_verify" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMAPMALLOC 1 +_ACEOF + + LIBS="-lmapmalloc $LIBS" + +fi + +fi + + ac_fn_c_check_func "$LINENO" "mallinfo" "ac_cv_func_mallinfo" +if test "x$ac_cv_func_mallinfo" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mallinfo in -lmalloc" >&5 +$as_echo_n "checking for mallinfo in -lmalloc... " >&6; } +if ${ac_cv_lib_malloc_mallinfo+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmalloc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mallinfo (); +int +main () +{ +return mallinfo (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_malloc_mallinfo=yes +else + ac_cv_lib_malloc_mallinfo=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_malloc_mallinfo" >&5 +$as_echo "$ac_cv_lib_malloc_mallinfo" >&6; } +if test "x$ac_cv_lib_malloc_mallinfo" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMALLOC 1 +_ACEOF + + LIBS="-lmalloc $LIBS" + +fi + +fi + + ac_cv_opt_debug=mem +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ac_cv_opt_debug=no +fi + +else + + # default is no debugging + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for configuration/compilation (-I) preprocessor flags" >&5 +$as_echo_n "checking for configuration/compilation (-I) preprocessor flags... " >&6; } +# Check whether --enable-cppflags was given. +if test "${enable_cppflags+set}" = set; then : + enableval=$enable_cppflags; +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + as_fn_error $? "cppflags must be supplied if option is used" "$LINENO" 5 +fi +# use supplied options +CPPFLAGS="$CPPFLAGS $enableval" +export CPPFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 +$as_echo "$enableval" >&6; } + +else + + # default is to have no additional flags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for configuration/compilation (-l) library flags" >&5 +$as_echo_n "checking for configuration/compilation (-l) library flags... " >&6; } +# Check whether --enable-libs was given. +if test "${enable_libs+set}" = set; then : + enableval=$enable_libs; +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + as_fn_error $? "libs must be supplied if option is used" "$LINENO" 5 +fi +# use supplied options +LIBS="$LIBS $enableval" +export LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 +$as_echo "$enableval" >&6; } + +else + + # default is to have no additional flags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for configuration/compilation (-L) library flags" >&5 +$as_echo_n "checking for configuration/compilation (-L) library flags... " >&6; } +# Check whether --enable-ldflags was given. +if test "${enable_ldflags+set}" = set; then : + enableval=$enable_ldflags; +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + as_fn_error $? "ldflags must be supplied if option is used" "$LINENO" 5 +fi +# use supplied options +LDFLAGS="$LDFLAGS $enableval" +export LDFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 +$as_echo "$enableval" >&6; } + +else + + # default is to have no additional flags + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional C option compilation flags" >&5 +$as_echo_n "checking for additional C option compilation flags... " >&6; } +# Check whether --enable-am-cflags was given. +if test "${enable_am_cflags+set}" = set; then : + enableval=$enable_am_cflags; +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + as_fn_error $? "am-cflags must be supplied if option is used" "$LINENO" 5 +fi +# user supplied a cflags option to configure +AMU_CFLAGS="$enableval" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 +$as_echo "$enableval" >&6; } + +else + + # default is to have no additional C flags + AMU_CFLAGS="" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking a local configuration file" >&5 +$as_echo_n "checking a local configuration file... " >&6; } +if test -f localconfig.h +then + $as_echo "#define HAVE_LOCALCONFIG_H 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** LIBTOOL ***" >&5 +$as_echo "$as_me: *** LIBTOOL ***" >&6;} +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=no +fi + + + + + + + + + +case ${host_os} in + # Temporarily undo renaming of "linux-gnu" to "linux", because + # libtool only looks for "linux-gnu". Sigh. + linux ) host_os=linux-gnu ;; +esac +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -rf conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -rf conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -rf conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM -r conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM -r conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM -r conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM -r conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM -r conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM -r conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM -r conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM -r conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM -r conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM -r conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +case ${host_os} in + # end temporary renaming of "linux-gnu" to "linux" + linux-gnu ) host_os=linux ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** EXTRA OPTION PROCESSING ***" >&5 +$as_echo "$as_me: *** EXTRA OPTION PROCESSING ***" >&6;} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional preprocessor flags" >&5 +$as_echo_n "checking additional preprocessor flags... " >&6; } +if ${ac_cv_os_cppflags+:} false; then : + $as_echo_n "(cached) " >&6 +else + +case "${host_os}" in +# off for now, posix may be a broken thing for nextstep3... +# nextstep* ) +# ac_cv_os_cppflags="-D_POSIX_SOURCE" +# ;; + * ) ac_cv_os_cppflags="" ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cppflags" >&5 +$as_echo "$ac_cv_os_cppflags" >&6; } +CPPFLAGS="$CPPFLAGS $ac_cv_os_cppflags" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5 +$as_echo_n "checking additional compiler flags... " >&6; } +if ${ac_cv_os_cflags+:} false; then : + $as_echo_n "(cached) " >&6 +else + +case "${host_os}" in + irix6* ) + case "${CC}" in + cc ) + # do not use 64-bit compiler + ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84" + ;; + esac + ;; + osf[1-3]* ) + # get the right version of struct sockaddr + case "${CC}" in + cc ) + ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO" + ;; + * ) + ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO" + ;; + esac + ;; + osf* ) + # get the right version of struct sockaddr + case "${CC}" in + cc ) + ac_cv_os_cflags="-std -D_SOCKADDR_LEN" + ;; + * ) + ac_cv_os_cflags="-D_SOCKADDR_LEN" + ;; + esac + ;; + aix[1-3]* ) + ac_cv_os_cflags="" ;; + aix4.[0-2]* ) + # turn on additional headers + ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE" + ;; + aix5.3* ) + # avoid circular dependencies in yp headers, and more + ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS -D_MSGQSUPPORT" + ;; + aix* ) + # avoid circular dependencies in yp headers + ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS" + ;; + OFF-sunos4* ) + # make sure passing whole structures is handled in gcc + case "${CC}" in + gcc ) + ac_cv_os_cflags="-fpcc-struct-return" + ;; + esac + ;; + sunos[34]* | solaris1* | solaris2.[0-5] | sunos5.[0-5] | solaris2.5.* | sunos5.5.* ) + ac_cv_os_cflags="" ;; + solaris2* | sunos5* ) + # turn on 64-bit file offset interface + case "${CC}" in + * ) + ac_cv_os_cflags="-D_LARGEFILE64_SOURCE" + ;; + esac + ;; + hpux* ) + # use Ansi compiler on HPUX + case "${CC}" in + cc ) + ac_cv_os_cflags="-Ae" + ;; + esac + ;; + darwin* | macosx* | rhapsody* ) + ac_cv_os_cflags="-D_P1003_1B_VISIBLE" + ;; + * ) + ac_cv_os_cflags="" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cflags" >&5 +$as_echo "$ac_cv_os_cflags" >&6; } +AMU_CFLAGS="$AMU_CFLAGS $ac_cv_os_cflags" +# use same flags for configuring, so it matches what we do at compile time +CFLAGS="$CFLAGS $ac_cv_os_cflags" +export CFLAGS + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5 +$as_echo_n "checking additional linker flags... " >&6; } +if ${ac_cv_os_ldflags+:} false; then : + $as_echo_n "(cached) " >&6 +else + +case "${host_os}" in + solaris2.7* | sunos5.7* ) + # find LDAP: off until Sun includes ldap headers. + case "${CC}" in + * ) + #ac_cv_os_ldflags="-L/usr/lib/fn" + ;; + esac + ;; + * ) ac_cv_os_ldflags="" ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_ldflags" >&5 +$as_echo "$ac_cv_os_ldflags" >&6; } +LDFLAGS="$LDFLAGS $ac_cv_os_ldflags" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** UNIX VARIANTS ***" >&5 +$as_echo "$as_me: *** UNIX VARIANTS ***" >&6;} + +# test sanity of running kernel vs. kernel headers + { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"host headers version\"" >&5 +$as_echo_n "checking \"host headers version\"... " >&6; } + case ${host_os} in + linux ) + host_header_version="bad" + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include +#include + +main(argc) +int argc; +{ + +if (argc > 1) +#ifdef UTS_RELEASE + printf("%s", UTS_RELEASE); +#else +# define AMU_MA(a) ((a) >> 16) +# define AMU_MI(a) (((a) & 0xffff) >> 8) +# define AMU_PL(a) ((a) & 0xff) + printf("%d.%d.%d", AMU_MA(LINUX_VERSION_CODE), AMU_MI(LINUX_VERSION_CODE), AMU_PL(LINUX_VERSION_CODE)); +#endif + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + echo + as_fn_error $? "cannot find UTS_RELEASE in . + This Linux system may be misconfigured or unconfigured!" "$LINENO" 5 + +else + : + host_header_version=$value +fi + + ;; + * ) host_header_version=$host_os_version ;; + esac + cat >>confdefs.h <<_ACEOF +#define HOST_HEADER_VERSION "$host_header_version" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_header_version" >&5 +$as_echo "$host_header_version" >&6; } + + case ${host_os} in + linux ) + if test "$host_os_version" != $host_header_version + then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Linux kernel $host_os_version mismatch with $host_header_version headers!" >&5 +$as_echo "$as_me: WARNING: Linux kernel $host_os_version mismatch with $host_header_version headers!" >&2;} + fi + ;; +esac +ac_cv_os_version=$host_os_version +ac_cv_header_version=$host_header_version + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** PARTICULAR PROGRAMS (part 2) ***" >&5 +$as_echo "$as_me: *** PARTICULAR PROGRAMS (part 2) ***" >&6;} + +for ac_prog in 'bison -y' byacc yacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_YACC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +$as_echo "$YACC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC=":" + +if test "x$YACC" = "x:"; then + as_fn_error $? "cannot find bison/yacc/byacc -- needed for am-utils" "$LINENO" 5 +fi +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LEX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LEX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 +$as_echo "$LEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test -z "$LEXLIB" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yywrap in -lfl" >&5 +$as_echo_n "checking for yywrap in -lfl... " >&6; } +if ${ac_cv_lib_fl_yywrap+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char yywrap (); +int +main () +{ +return yywrap (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_fl_yywrap=yes +else + ac_cv_lib_fl_yywrap=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fl_yywrap" >&5 +$as_echo "$ac_cv_lib_fl_yywrap" >&6; } +if test "x$ac_cv_lib_fl_yywrap" = xyes; then : + LEXLIB="-lfl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yywrap in -ll" >&5 +$as_echo_n "checking for yywrap in -ll... " >&6; } +if ${ac_cv_lib_l_yywrap+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ll $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char yywrap (); +int +main () +{ +return yywrap (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_l_yywrap=yes +else + ac_cv_lib_l_yywrap=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_l_yywrap" >&5 +$as_echo "$ac_cv_lib_l_yywrap" >&6; } +if test "x$ac_cv_lib_l_yywrap" = xyes; then : + LEXLIB="-ll" +fi + +fi + +fi + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ + yyless ((input () != 0)); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ { ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 +$as_echo_n "checking lex output file root... " >&6; } +if ${ac_cv_prog_lex_root+:} false; then : + $as_echo_n "(cached) " >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 +$as_echo "$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 +$as_echo_n "checking lex library... " >&6; } +if ${ac_cv_lib_lex+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_lex=$ac_lib +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 +$as_echo "$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 +$as_echo_n "checking whether yytext is a pointer... " >&6; } +if ${ac_cv_prog_lex_yytext_pointer+:} false; then : + $as_echo_n "(cached) " >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_lex_yytext_pointer=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 +$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +else + as_fn_error $? "cannot find flex/lex -- needed for am-utils" "$LINENO" 5 +fi +if test 0 != 0 ; then +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LEX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LEX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 +$as_echo "$LEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ + yyless ((input () != 0)); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ { ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 +$as_echo_n "checking lex output file root... " >&6; } +if ${ac_cv_prog_lex_root+:} false; then : + $as_echo_n "(cached) " >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 +$as_echo "$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 +$as_echo_n "checking lex library... " >&6; } +if ${ac_cv_lib_lex+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_lex=$ac_lib +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 +$as_echo "$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 +$as_echo_n "checking whether yytext is a pointer... " >&6; } +if ${ac_cv_prog_lex_yytext_pointer+:} false; then : + $as_echo_n "(cached) " >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_lex_yytext_pointer=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 +$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +if test "$LEX" = :; then + LEX=${am_missing_run}flex +fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** GENERIC PROGRAMS ***" >&5 +$as_echo "$as_me: *** GENERIC PROGRAMS ***" >&6;} +for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $AR in + [\\/]* | ?:[\\/]*) + ac_cv_path_AR="$AR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +AR=$ac_cv_path_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break +done +test -n "$AR" || AR=":" + +for ac_prog in perl5 perl4 perl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PERL" && break +done +test -n "$PERL" || PERL="/usr/bin/perl" + +for ac_prog in umount unmount +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_UNMOUNT_PROGRAM+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $UNMOUNT_PROGRAM in + [\\/]* | ?:[\\/]*) + ac_cv_path_UNMOUNT_PROGRAM="$UNMOUNT_PROGRAM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_UNMOUNT_PROGRAM="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +UNMOUNT_PROGRAM=$ac_cv_path_UNMOUNT_PROGRAM +if test -n "$UNMOUNT_PROGRAM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNMOUNT_PROGRAM" >&5 +$as_echo "$UNMOUNT_PROGRAM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$UNMOUNT_PROGRAM" && break +done +test -n "$UNMOUNT_PROGRAM" || UNMOUNT_PROGRAM="/bin/umount" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** LIBRARY FILES ***" >&5 +$as_echo "$as_me: *** LIBRARY FILES ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional OS libraries" >&5 +$as_echo_n "checking for additional OS libraries... " >&6; } +if ${ac_cv_os_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct set of libraries to link with +case "${host_os_name}" in + svr4* | sysv4* | solaris2* | sunos5* | aoi* ) + ac_cv_os_libs="-lsocket -lnsl" ;; + * ) + ac_cv_os_libs=none ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_libs" >&5 +$as_echo "$ac_cv_os_libs" >&6; } +# set list of libraries to link with +if test "$ac_cv_os_libs" != none +then + LIBS="$ac_cv_os_libs $LIBS" +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clnt_sperrno in -lrpc" >&5 +$as_echo_n "checking for clnt_sperrno in -lrpc... " >&6; } +if ${ac_cv_lib_rpc_clnt_sperrno+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrpc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clnt_sperrno (); +int +main () +{ +return clnt_sperrno (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rpc_clnt_sperrno=yes +else + ac_cv_lib_rpc_clnt_sperrno=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpc_clnt_sperrno" >&5 +$as_echo "$ac_cv_lib_rpc_clnt_sperrno" >&6; } +if test "x$ac_cv_lib_rpc_clnt_sperrno" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRPC 1 +_ACEOF + + LIBS="-lrpc $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xdr_fhandle in -lrpcsvc" >&5 +$as_echo_n "checking for xdr_fhandle in -lrpcsvc... " >&6; } +if ${ac_cv_lib_rpcsvc_xdr_fhandle+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrpcsvc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xdr_fhandle (); +int +main () +{ +return xdr_fhandle (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rpcsvc_xdr_fhandle=yes +else + ac_cv_lib_rpcsvc_xdr_fhandle=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpcsvc_xdr_fhandle" >&5 +$as_echo "$ac_cv_lib_rpcsvc_xdr_fhandle" >&6; } +if test "x$ac_cv_lib_rpcsvc_xdr_fhandle" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRPCSVC 1 +_ACEOF + + LIBS="-lrpcsvc $LIBS" + +fi + +ac_fn_c_check_func "$LINENO" "hstrerror" "ac_cv_func_hstrerror" +if test "x$ac_cv_func_hstrerror" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror in -lresolv" >&5 +$as_echo_n "checking for hstrerror in -lresolv... " >&6; } +if ${ac_cv_lib_resolv_hstrerror+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char hstrerror (); +int +main () +{ +return hstrerror (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_resolv_hstrerror=yes +else + ac_cv_lib_resolv_hstrerror=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_hstrerror" >&5 +$as_echo "$ac_cv_lib_resolv_hstrerror" >&6; } +if test "x$ac_cv_lib_resolv_hstrerror" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRESOLV 1 +_ACEOF + + LIBS="-lresolv $LIBS" + +fi + +fi + +ac_fn_c_check_func "$LINENO" "yp_all" "ac_cv_func_yp_all" +if test "x$ac_cv_func_yp_all" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yp_all in -lnsl" >&5 +$as_echo_n "checking for yp_all in -lnsl... " >&6; } +if ${ac_cv_lib_nsl_yp_all+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char yp_all (); +int +main () +{ +return yp_all (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_yp_all=yes +else + ac_cv_lib_nsl_yp_all=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_yp_all" >&5 +$as_echo "$ac_cv_lib_nsl_yp_all" >&6; } +if test "x$ac_cv_lib_nsl_yp_all" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF + + LIBS="-lnsl $LIBS" + +fi + +fi + + +if test "$with_hesiod" = "yes"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_init in -lhesiod" >&5 +$as_echo_n "checking for hes_init in -lhesiod... " >&6; } +ac_lib_var=`echo hesiod'_'hes_init | sed 'y%./+-%__p_%'` +if eval \${ac_cv_lib_$ac_lib_var+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_LIBS="$LIBS" + +# first try with base library, without auxiliary library +LIBS="-lhesiod $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any gcc2 internal prototype to avoid an error. */ + +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char hes_init(); + +int +main () +{ +hes_init() + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "ac_cv_lib_$ac_lib_var=\"hesiod\"" +else + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +# if OK, set to no auxiliary library, else try auxiliary library +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = no"; then + LIBS="-lhesiod -lresolv $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ + + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char hes_init(); + +int +main () +{ +hes_init() + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "ac_cv_lib_$ac_lib_var=\"hesiod -lresolv\"" +else + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +LIBS="$ac_save_LIBS" + +fi +ac_tmp="`eval echo '$''{ac_cv_lib_'$ac_lib_var'}'`" +if test "${ac_tmp}" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: -l$ac_tmp" >&5 +$as_echo "-l$ac_tmp" >&6; } + + ac_tr_lib=HAVE_LIB`echo hesiod | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + + cat >>confdefs.h <<_ACEOF +#define $ac_tr_lib 1 +_ACEOF + + LIBS="-l$ac_tmp $LIBS" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test "$with_ldap" = "yes"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_open in -lldap" >&5 +$as_echo_n "checking for ldap_open in -lldap... " >&6; } +ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` +if eval \${ac_cv_lib_$ac_lib_var+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_LIBS="$LIBS" + +# first try with base library, without auxiliary library +LIBS="-lldap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any gcc2 internal prototype to avoid an error. */ + +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char ldap_open(); + +int +main () +{ +ldap_open() + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "ac_cv_lib_$ac_lib_var=\"ldap\"" +else + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +# if OK, set to no auxiliary library, else try auxiliary library +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = no"; then + LIBS="-lldap -llber $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ + + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char ldap_open(); + +int +main () +{ +ldap_open() + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "ac_cv_lib_$ac_lib_var=\"ldap -llber\"" +else + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +LIBS="$ac_save_LIBS" + +fi +ac_tmp="`eval echo '$''{ac_cv_lib_'$ac_lib_var'}'`" +if test "${ac_tmp}" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: -l$ac_tmp" >&5 +$as_echo "-l$ac_tmp" >&6; } + + ac_tr_lib=HAVE_LIB`echo ldap | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + + cat >>confdefs.h <<_ACEOF +#define $ac_tr_lib 1 +_ACEOF + + LIBS="-l$ac_tmp $LIBS" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +for ac_func in ldap_enable_cache +do : + ac_fn_c_check_func "$LINENO" "ldap_enable_cache" "ac_cv_func_ldap_enable_cache" +if test "x$ac_cv_func_ldap_enable_cache" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LDAP_ENABLE_CACHE 1 +_ACEOF + +fi +done + +fi + +case "$ac_cv_opt_debug" in +yes | mem ) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_clock_gettime=yes +else + ac_cv_lib_rt_clock_gettime=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRT 1 +_ACEOF + + LIBS="-lrt $LIBS" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lposix4" >&5 +$as_echo_n "checking for clock_gettime in -lposix4... " >&6; } +if ${ac_cv_lib_posix4_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix4 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_posix4_clock_gettime=yes +else + ac_cv_lib_posix4_clock_gettime=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_clock_gettime" >&5 +$as_echo "$ac_cv_lib_posix4_clock_gettime" >&6; } +if test "x$ac_cv_lib_posix4_clock_gettime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPOSIX4 1 +_ACEOF + + LIBS="-lposix4 $LIBS" + +fi + +fi + + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** PARTICULAR LIBRARY FUNCTIONS ***" >&5 +$as_echo "$as_me: *** PARTICULAR LIBRARY FUNCTIONS ***" >&6;} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 +$as_echo_n "checking for working memcmp... " >&6; } +if ${ac_cv_func_memcmp_working+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_memcmp_working=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = '\100', c1 = '\200', c2 = '\201'; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + return 1; + + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + return 1; + } + return 0; + } + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_memcmp_working=yes +else + ac_cv_func_memcmp_working=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 +$as_echo "$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in + *" memcmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; +esac + + +if test "$ac_cv_func_memcmp_working" = no +then +$as_echo "#define HAVE_BAD_MEMCMP 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a file-descriptor leakage clean yp_all" >&5 +$as_echo_n "checking for a file-descriptor leakage clean yp_all... " >&6; } +if ${ac_cv_func_yp_all_clean+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# clean by default +ac_cv_func_yp_all_clean=yes +# select the correct type +case "${host_os_name}" in + irix* ) + ac_cv_func_yp_all_clean=no ;; + linux* ) + # RedHat 5.1 systems with glibc glibc-2.0.7-19 or below + # leak a UDP socket from yp_all() + case "`cat /etc/redhat-release /dev/null 2>/dev/null`" in + *5.1* ) + ac_cv_func_yp_all_clean=no ;; + esac +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_yp_all_clean" >&5 +$as_echo "$ac_cv_func_yp_all_clean" >&6; } +if test $ac_cv_func_yp_all_clean = no +then + $as_echo "#define HAVE_BAD_YP_ALL 1" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +for ac_header in vfork.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" +if test "x$ac_cv_header_vfork_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VFORK_H 1 +_ACEOF + +fi + +done + +for ac_func in fork vfork +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test "x$ac_cv_func_fork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 +$as_echo_n "checking for working fork... " >&6; } +if ${ac_cv_func_fork_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_fork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + return fork () < 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_fork_works=yes +else + ac_cv_func_fork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 +$as_echo "$ac_cv_func_fork_works" >&6; } + +else + ac_cv_func_fork_works=$ac_cv_func_fork +fi +if test "x$ac_cv_func_fork_works" = xcross; then + case $host in + *-*-amigaos* | *-*-msdosdjgpp*) + # Override, as these systems have only a dummy fork() stub + ac_cv_func_fork_works=no + ;; + *) + ac_cv_func_fork_works=yes + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} +fi +ac_cv_func_vfork_works=$ac_cv_func_vfork +if test "x$ac_cv_func_vfork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 +$as_echo_n "checking for working vfork... " >&6; } +if ${ac_cv_func_vfork_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_vfork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Paul Eggert for this test. */ +$ac_includes_default +#include +#ifdef HAVE_VFORK_H +# include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. The compiler + is told about this with #include , but some compilers + (e.g. gcc -O) don't grok . Test for this by using a + static variable whose address is put into a register that is + clobbered by the vfork. */ +static void +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} + +int +main () +{ + pid_t parent = getpid (); + pid_t child; + + sparc_address_test (0); + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. This + test uses lots of local variables, at least as many local + variables as main has allocated so far including compiler + temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris + 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should + reuse the register of parent for one of the local variables, + since it will think that parent can't possibly be used any more + in this routine. Assigning to the local variable will thus + munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + + /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent + from child file descriptors. If the child closes a descriptor + before it execs or exits, this munges the parent's descriptor + as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; + + while (wait(&status) != child) + ; + return ( + /* Was there some problem with vforking? */ + child < 0 + + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_vfork_works=yes +else + ac_cv_func_vfork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 +$as_echo "$ac_cv_func_vfork_works" >&6; } + +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} +fi + +if test "x$ac_cv_func_vfork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h + +else + +$as_echo "#define vfork fork" >>confdefs.h + +fi +if test "x$ac_cv_func_fork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wait3 that fills in rusage" >&5 +$as_echo_n "checking for wait3 that fills in rusage... " >&6; } +if ${ac_cv_func_wait3_rusage+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_wait3_rusage=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include +#include +#include +/* HP-UX has wait3 but does not fill in rusage at all. */ +int +main () +{ + struct rusage r; + int i; + /* Use a field that we can force nonzero -- + voluntary context switches. + For systems like NeXT and OSF/1 that don't set it, + also use the system CPU time. And page faults (I/O) for Linux. */ + r.ru_nvcsw = 0; + r.ru_stime.tv_sec = 0; + r.ru_stime.tv_usec = 0; + r.ru_majflt = r.ru_minflt = 0; + switch (fork ()) + { + case 0: /* Child. */ + sleep(1); /* Give up the CPU. */ + _exit(0); + break; + case -1: /* What can we do? */ + _exit(0); + break; + default: /* Parent. */ + wait3(&i, 0, &r); + /* Avoid "text file busy" from rm on fast HP-UX machines. */ + sleep(2); + return (r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 + && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); + } +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_wait3_rusage=yes +else + ac_cv_func_wait3_rusage=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_wait3_rusage" >&5 +$as_echo "$ac_cv_func_wait3_rusage" >&6; } +if test $ac_cv_func_wait3_rusage = yes; then + +$as_echo "#define HAVE_WAIT3 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 +$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } +if ${ac_cv_func_getpgrp_void+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Use it with a single arg. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +getpgrp (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_func_getpgrp_void=no +else + ac_cv_func_getpgrp_void=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 +$as_echo "$ac_cv_func_getpgrp_void" >&6; } +if test $ac_cv_func_getpgrp_void = yes; then + +$as_echo "#define GETPGRP_VOID 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 +$as_echo_n "checking whether setpgrp takes no argument... " >&6; } +if ${ac_cv_func_setpgrp_void+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +/* If this system has a BSD-style setpgrp which takes arguments, + setpgrp(1, 1) will fail with ESRCH and return -1, in that case + exit successfully. */ + return setpgrp (1,1) != -1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_setpgrp_void=no +else + ac_cv_func_setpgrp_void=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 +$as_echo "$ac_cv_func_setpgrp_void" >&6; } +if test $ac_cv_func_setpgrp_void = yes; then + +$as_echo "#define SETPGRP_VOID 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** GENERIC LIBRARY FUNCTIONS ***" >&5 +$as_echo "$as_me: *** GENERIC LIBRARY FUNCTIONS ***" >&6;} +for ac_func in \ + __rpc_get_local_uid \ + __seterr_reply \ + _seterr_reply \ + bcmp \ + bcopy \ + bzero \ + clnt_create \ + clnt_create_vers \ + clnt_create_vers_timed \ + clnt_spcreateerror \ + clock_gettime \ + cnodeid \ + dg_mount \ + flock \ + fsmount \ + get_myaddress \ + getccent \ + getcwd \ + getdomainname \ + getdtablesize \ + gethostname \ + getifaddrs \ + getmntinfo \ + getmountent \ + getpagesize \ + gettimeofday \ + hasmntopt \ + hstrerror \ + madvise \ + memcmp \ + memcpy \ + memmove \ + memset \ + mkdir \ + mkstemp \ + mntctl \ + mlockall \ + mount \ + mountsyscall \ + plock \ + regcomp \ + regexec \ + rmdir \ + select \ + seteuid \ + setitimer \ + setresuid \ + setsid \ + sigaction \ + signal \ + sigsuspend \ + socket \ + statfs \ + statvfs \ + strcasecmp \ + strchr \ + strcspn \ + strdup \ + strerror \ + strlcat \ + strlcpy \ + strspn \ + strstr \ + svc_getreq \ + svc_getreqset \ + sysfs \ + syslog \ + uname \ + umount \ + umount2 \ + unmount \ + uvmount \ + vfork \ + vfsmount \ + vmount \ + vsnprintf \ + wait3 \ + waitpid \ + +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test "$with_hesiod" = "yes"; then +for ac_func in \ + hes_init \ + hesiod_init \ + hesiod_reload \ + hesiod_to_bind \ + +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +fi +ac_fn_c_check_func "$LINENO" "clnt_sperrno" "ac_cv_func_clnt_sperrno" +if test "x$ac_cv_func_clnt_sperrno" = xyes; then : + $as_echo "#define HAVE_CLNT_SPERRNO 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" clnt_sperrno.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS clnt_sperrno.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "hasmntopt" "ac_cv_func_hasmntopt" +if test "x$ac_cv_func_hasmntopt" = xyes; then : + $as_echo "#define HAVE_HASMNTOPT 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" hasmntopt.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS hasmntopt.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes; then : + $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strcasecmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes; then : + $as_echo "#define HAVE_STRDUP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strdup.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strdup.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = xyes; then : + $as_echo "#define HAVE_STRERROR 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strerror.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strerror.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" +if test "x$ac_cv_func_strlcat" = xyes; then : + $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strlcat.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" +if test "x$ac_cv_func_strlcpy" = xyes; then : + $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strlcpy.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" +if test "x$ac_cv_func_strstr" = xyes; then : + $as_echo "#define HAVE_STRSTR 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strstr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "ualarm" "ac_cv_func_ualarm" +if test "x$ac_cv_func_ualarm" = xyes; then : + $as_echo "#define HAVE_UALARM 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" ualarm.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS ualarm.$ac_objext" + ;; +esac + +fi + + +for ac_func in \ + xdr_attrstat \ + xdr_createargs \ + xdr_dirlist \ + xdr_diropargs \ + xdr_diropokres \ + xdr_diropres \ + xdr_dirpath \ + xdr_entry \ + xdr_exportnode \ + xdr_exports \ + xdr_fattr \ + xdr_fhandle \ + xdr_fhstatus \ + xdr_filename \ + xdr_ftype \ + xdr_groupnode \ + xdr_groups \ + xdr_linkargs \ + xdr_mountbody \ + xdr_mountlist \ + xdr_name \ + xdr_nfs_fh \ + xdr_nfscookie \ + xdr_nfspath \ + xdr_nfsstat \ + xdr_nfstime \ + xdr_pointer \ + xdr_u_int64_t \ + xdr_readargs \ + xdr_readdirargs \ + xdr_readdirres \ + xdr_readlinkres \ + xdr_readokres \ + xdr_readres \ + xdr_renameargs \ + xdr_sattr \ + xdr_sattrargs \ + xdr_statfsokres \ + xdr_statfsres \ + xdr_symlinkargs \ + xdr_writeargs \ + +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** PARTICULAR HEADER FILES ***" >&5 +$as_echo "$as_me: *** PARTICULAR HEADER FILES ***" >&6;} +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if eval \${$as_ac_Header+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" +else + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 +$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if ${ac_cv_header_sys_wait_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_sys_wait_h=yes +else + ac_cv_header_sys_wait_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 +$as_echo "$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** GENERIC HEADER FILES ***" >&5 +$as_echo "$as_me: *** GENERIC HEADER FILES ***" >&6;} +for ac_header in \ + arpa/nameser.h \ + arpa/inet.h \ + bsd/rpc/rpc.h \ + cdfs/cdfsmount.h \ + cdfs/cdfs_mount.h \ + fs/udf/udf_mount.h \ + db1/ndbm.h \ + fs/efs/efs_mount.h \ + fs/msdosfs/msdosfsmount.h \ + fs/tmpfs/tmpfs_args.h \ + gdbm/ndbm.h \ + hsfs/hsfs.h \ + linux/fs.h \ + linux/kdev_t.h \ + linux/list.h \ + linux/nfs.h \ + linux/nfs2.h \ + linux/nfs4.h \ + linux/posix_types.h \ + linux/socket.h \ + machine/endian.h \ + net/errno.h \ + net/if_var.h \ + netinet/in.h \ + nfs/export.h \ + nfs/mount.h \ + nfs/nfs_gfs.h \ + nfs/nfs_mount.h \ + nfs/nfsmount.h \ + nfs/nfsproto.h \ + nfs/nfsv2.h \ + nfs/pathconf.h \ + nfs/rpcv2.h \ + nfsclient/nfsargs.h \ + rpc/rpc.h \ + rpc/types.h \ + rpcsvc/autofs_prot.h \ + rpcsvc/mount.h \ + rpcsvc/mountv3.h \ + rpcsvc/nfs_prot.h \ + rpcsvc/nis.h \ + rpcsvc/ypclnt.h \ + sys/config.h \ + sys/dg_mount.h \ + sys/dir.h \ + sys/errno.h \ + sys/file.h \ + sys/fs/autofs.h \ + sys/fs/autofs_prot.h \ + sys/fs/cachefs_fs.h \ + sys/fs/efs_clnt.h \ + sys/fs/nfs.h \ + sys/fs/nfs/mount.h \ + sys/fs/nfs/nfs_clnt.h \ + sys/fs/nfs_clnt.h \ + sys/fs/pc_fs.h \ + sys/fs/tmp.h \ + sys/fs/ufs_mount.h \ + sys/fs/xfs_clnt.h \ + sys/fs_types.h \ + sys/fsid.h \ + sys/fstyp.h \ + sys/ioctl.h \ + sys/immu.h \ + sys/lock.h \ + sys/machine.h \ + sys/mman.h \ + sys/mntctl.h \ + sys/mntent.h \ + sys/mnttab.h \ + sys/mount.h \ + sys/ndir.h \ + sys/netconfig.h \ + sys/param.h \ + sys/pathconf.h \ + sys/resource.h \ + sys/sema.h \ + sys/signal.h \ + sys/socket.h \ + sys/sockio.h \ + sys/stat.h \ + sys/statfs.h \ + sys/statvfs.h \ + sys/syscall.h \ + sys/syslimits.h \ + sys/syslog.h \ + sys/time.h \ + sys/tiuser.h \ + sys/types.h \ + sys/ucred.h \ + sys/uio.h \ + sys/utsname.h \ + sys/vfs.h \ + sys/vmount.h \ + sys/vnode.h \ + ufs/ufs/extattr.h \ + ufs/ufs/ufsmount.h \ + ufs/ufs_mount.h \ + \ + assert.h \ + cluster.h \ + ctype.h \ + errno.h \ + fcntl.h \ + ifaddrs.h \ + irs.h \ + grp.h \ + libgen.h \ + limits.h \ + malloc.h \ + memory.h \ + mntent.h \ + mnttab.h \ + mount.h \ + ndbm.h \ + ndir.h \ + netconfig.h \ + netdb.h \ + netdir.h \ + nsswitch.h \ + pwd.h \ + regex.h \ + setjmp.h \ + signal.h \ + socketbits.h \ + statbuf.h \ + stdarg.h \ + stdlib.h \ + stdio.h \ + string.h \ + strings.h \ + syslog.h \ + tcpd.h \ + time.h \ + tiuser.h \ + varargs.h \ + unistd.h \ + +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in \ + net/if.h \ + net/route.h \ + nfs/nfs_clnt.h \ + +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_SOCKET_H +# include +#endif /* HAVE_SYS_SOCKET_H */ + +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test "$with_ldap" = "yes"; then +for ac_header in \ + lber.h \ + ldap.h \ + +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +fi +if test "$with_hesiod" = "yes"; then +for ac_header in \ + hesiod.h \ + +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +fi +for ac_header in \ + isofs/cd9660/cd9660_mount.h \ + msdosfs/msdosfsmount.h \ + netinet/if_ether.h \ + nfs/nfs.h \ + rpc/auth.h \ + rpc/auth_des.h \ + rpc/pmap_clnt.h \ + rpc/pmap_prot.h \ + rpcsvc/yp_prot.h \ + sys/mbuf.h \ + sys/proc.h \ + resolv.h \ + +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_SOCKET_H +# include +#endif /* HAVE_SYS_SOCKET_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ +#ifdef HAVE_SYS_QUEUE_H +# include +#endif /* HAVE_SYS_QUEUE_H */ +#ifdef HAVE_NET_IF_H +# include +#endif /* HAVE_NET_IF_H */ +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_MOUNT_H +# include +#endif /* HAVE_SYS_MOUNT_H */ +#ifdef HAVE_NFS_NFSMOUNT_H +# include +#endif /* HAVE_NFS_NFSMOUNT_H */ +#ifdef HAVE_RPC_TYPES_H +# include +#endif /* HAVE_RPC_TYPES_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ + +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in \ + linux/auto_fs.h \ + linux/auto_fs4.h \ + linux/loop.h \ + +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " +#ifdef HAVE_SYS_SOCKET_H +# include +#endif /* HAVE_SYS_SOCKET_H */ +#ifdef HAVE_LIMITS_H +# include +#endif /* HAVE_LIMITS_H */ +#ifdef HAVE_LINUX_POSIX_TYPES_H +# include +#endif /* HAVE_LINUX_POSIX_TYPES_H */ +/* next dev_t lines needed due to changes in kernel code */ +#undef dev_t +#define dev_t unsigned short /* compatible with Red Hat and SuSE */ + +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in \ + linux/nfs_mount.h \ + +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " +/* + * Needed to find nfs2_fh and nfs_fh on older systems (yellowdog2.3, gentoo, + * etc.) + * Needs to be defined before so u32 is available for + * . + */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +/* + * It used to be the case that linux/socket.h would define sa_family_t, + * but as of FC15, this is not the case anymore (although the comments + * in some headers say that is true! So we include too. + */ +#ifdef HAVE_LINUX_SOCKET_H +# include +#endif /* HAVE_LINUX_SOCKET_H */ +#ifdef HAVE_SYS_SOCKET_H +#include +#endif /* HAVE_SYS_SOCKET_H */ +#ifdef HAVE_LIMITS_H +# include +#endif /* HAVE_LIMITS_H */ +#ifdef HAVE_LINUX_POSIX_TYPES_H +# include +#endif /* HAVE_LINUX_POSIX_TYPES_H */ +#ifdef HAVE_LINUX_NFS2_H +# if !defined(FHSIZE) && defined(NFS2_FHSIZE) +# define FHSIZE NFS2_FHSIZE +# endif +#ifdef HAVE_LINUX_NFS_H +# include +# if !defined(FHSIZE) && defined(NFS_FHSIZE) +# define FHSIZE NFS_FHSIZE +# endif +#endif +struct nfs2_fh { + char data[FHSIZE]; +}; +# define _LINUX_NFS2_H +#endif /* HAVE_LINUX_NFS2_H */ +/* next dev_t lines needed due to changes in kernel code */ +#undef dev_t +#define dev_t unsigned short /* compatible with Red Hat and SuSE */ + +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test "$with_ndbm" = "yes" +then +if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lndbm" >&5 +$as_echo_n "checking for dbm_open in -lndbm... " >&6; } +if ${ac_cv_lib_ndbm_dbm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lndbm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_open (); +int +main () +{ +return dbm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ndbm_dbm_open=yes +else + ac_cv_lib_ndbm_dbm_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbm_dbm_open" >&5 +$as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; } +if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_pagfno in -lndbm" >&5 +$as_echo_n "checking for dbm_pagfno in -lndbm... " >&6; } +if ${ac_cv_lib_ndbm_dbm_pagfno+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lndbm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_pagfno (); +int +main () +{ +return dbm_pagfno (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ndbm_dbm_pagfno=yes +else + ac_cv_lib_ndbm_dbm_pagfno=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbm_dbm_pagfno" >&5 +$as_echo "$ac_cv_lib_ndbm_dbm_pagfno" >&6; } +if test "x$ac_cv_lib_ndbm_dbm_pagfno" = xyes; then : + ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_pagfno in -lgdbm" >&5 +$as_echo_n "checking for dbm_pagfno in -lgdbm... " >&6; } +if ${ac_cv_lib_gdbm_dbm_pagfno+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgdbm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_pagfno (); +int +main () +{ +return dbm_pagfno (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gdbm_dbm_pagfno=yes +else + ac_cv_lib_gdbm_dbm_pagfno=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_dbm_pagfno" >&5 +$as_echo "$ac_cv_lib_gdbm_dbm_pagfno" >&6; } +if test "x$ac_cv_lib_gdbm_dbm_pagfno" = xyes; then : + ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm -lgdbm" +fi + +fi + +fi + +fi +if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lc" >&5 +$as_echo_n "checking for dbm_open in -lc... " >&6; } +if ${ac_cv_lib_c_dbm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_open (); +int +main () +{ +return dbm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_dbm_open=yes +else + ac_cv_lib_c_dbm_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_dbm_open" >&5 +$as_echo "$ac_cv_lib_c_dbm_open" >&6; } +if test "x$ac_cv_lib_c_dbm_open" = xyes; then : + ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="c" +fi + +fi +if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_db1_ndbm_h" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -ldb1" >&5 +$as_echo_n "checking for dbm_open in -ldb1... " >&6; } +if ${ac_cv_lib_db1_dbm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldb1 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_open (); +int +main () +{ +return dbm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_db1_dbm_open=yes +else + ac_cv_lib_db1_dbm_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_db1_dbm_open" >&5 +$as_echo "$ac_cv_lib_db1_dbm_open" >&6; } +if test "x$ac_cv_lib_db1_dbm_open" = xyes; then : + ac_cv_header_new_dbm="db1/ndbm.h"; ac_cv_lib_new_dbm="db1" +fi + +fi +if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_gdbm_ndbm_h" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lgdbm" >&5 +$as_echo_n "checking for dbm_open in -lgdbm... " >&6; } +if ${ac_cv_lib_gdbm_dbm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgdbm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_open (); +int +main () +{ +return dbm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gdbm_dbm_open=yes +else + ac_cv_lib_gdbm_dbm_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_dbm_open" >&5 +$as_echo "$ac_cv_lib_gdbm_dbm_open" >&6; } +if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then : + ac_cv_header_new_dbm="gdbm/ndbm.h"; ac_cv_lib_new_dbm="gdbm" +fi + +else + # reset any previous knowledge and retest for different header name + # check also gdbm_compat library (Debian 3.1) + unset ac_cv_header_gdbm_ndbm_h + for ac_header in gdbm-ndbm.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "gdbm-ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" +if test "x$ac_cv_header_gdbm_ndbm_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GDBM_NDBM_H 1 +_ACEOF + +fi + +done + + if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_gdbm_ndbm_h" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lgdbm" >&5 +$as_echo_n "checking for dbm_open in -lgdbm... " >&6; } +if ${ac_cv_lib_gdbm_dbm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgdbm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_open (); +int +main () +{ +return dbm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gdbm_dbm_open=yes +else + ac_cv_lib_gdbm_dbm_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_dbm_open" >&5 +$as_echo "$ac_cv_lib_gdbm_dbm_open" >&6; } +if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then : + ac_cv_header_new_dbm="gdbm-ndbm.h"; ac_cv_lib_new_dbm="gdbm" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_open in -lgdbm_compat" >&5 +$as_echo_n "checking for dbm_open in -lgdbm_compat... " >&6; } +if ${ac_cv_lib_gdbm_compat_dbm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgdbm_compat $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_open (); +int +main () +{ +return dbm_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gdbm_compat_dbm_open=yes +else + ac_cv_lib_gdbm_compat_dbm_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_compat_dbm_open" >&5 +$as_echo "$ac_cv_lib_gdbm_compat_dbm_open" >&6; } +if test "x$ac_cv_lib_gdbm_compat_dbm_open" = xyes; then : + ac_cv_header_new_dbm="gdbm-ndbm.h"; ac_cv_lib_new_dbm="gdbm -lgdbm_compat" +fi + + +fi + + fi +fi +if test "$ac_cv_header_new_dbm" != "" -a "$ac_cv_lib_new_dbm" != ""; then + cat >>confdefs.h <<_ACEOF +#define NEW_DBM_H "$ac_cv_header_new_dbm" +_ACEOF + + if test "$ac_cv_lib_new_dbm" != "c" ; then + LIBS="-l$ac_cv_lib_new_dbm $LIBS" + fi +fi +fi + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** PARTICULAR STRUCTURES ***" >&5 +$as_echo "$as_me: *** PARTICULAR STRUCTURES ***" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 +$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } +if ${ac_cv_header_stat_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +#if defined S_ISBLK && defined S_IFDIR +extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; +#endif + +#if defined S_ISBLK && defined S_IFCHR +extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; +#endif + +#if defined S_ISLNK && defined S_IFREG +extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; +#endif + +#if defined S_ISSOCK && defined S_IFREG +extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stat_broken=no +else + ac_cv_header_stat_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 +$as_echo "$ac_cv_header_stat_broken" >&6; } +if test $ac_cv_header_stat_broken = yes; then + +$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if ${ac_cv_struct_tm+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_tm=time.h +else + ac_cv_struct_tm=sys/time.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** GENERIC STRUCTURES ***" >&5 +$as_echo "$as_me: *** GENERIC STRUCTURES ***" >&6;} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking location of NFS protocol header files" >&5 +$as_echo_n "checking location of NFS protocol header files... " >&6; } +if ${ac_cv_nfs_prot_headers+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct style for mounting filesystems +case "${host_os}" in + irix5* ) + ac_cv_nfs_prot_headers=irix5 ;; + irix* ) + ac_cv_nfs_prot_headers=irix6 ;; + sunos3* ) + ac_cv_nfs_prot_headers=sunos3 ;; + sunos4* | solaris1* ) + ac_cv_nfs_prot_headers=sunos4 ;; + sunos5.[0-3] | solaris2.[0-3] ) + ac_cv_nfs_prot_headers=sunos5_3 ;; + sunos5.4* | solaris2.4* ) + ac_cv_nfs_prot_headers=sunos5_4 ;; + sunos5.5* | solaris2.5* ) + ac_cv_nfs_prot_headers=sunos5_5 ;; + sunos5.6* | solaris2.6* ) + ac_cv_nfs_prot_headers=sunos5_6 ;; + sunos5.7* | solaris2.7* ) + ac_cv_nfs_prot_headers=sunos5_7 ;; + sunos5* | solaris2* ) + ac_cv_nfs_prot_headers=sunos5_8 ;; + bsdi2*) + ac_cv_nfs_prot_headers=bsdi2 ;; + bsdi* ) + ac_cv_nfs_prot_headers=bsdi3 ;; + freebsd2* ) + ac_cv_nfs_prot_headers=freebsd2 ;; + freebsd* | freebsdelf* ) + ac_cv_nfs_prot_headers=freebsd3 ;; + netbsd1.[0-2]* ) + ac_cv_nfs_prot_headers=netbsd ;; + netbsd1.3* ) + ac_cv_nfs_prot_headers=netbsd1_3 ;; + netbsd* | netbsdelf* ) + ac_cv_nfs_prot_headers=netbsd1_4 ;; + openbsd* ) + ac_cv_nfs_prot_headers=openbsd ;; + hpux[6-9]* | hpux10* ) + ac_cv_nfs_prot_headers=hpux ;; + hpux* ) + ac_cv_nfs_prot_headers=hpux11 ;; + aix[1-3]* ) + ac_cv_nfs_prot_headers=aix3 ;; + aix4.[01]* ) + ac_cv_nfs_prot_headers=aix4 ;; + aix4.2* ) + ac_cv_nfs_prot_headers=aix4_2 ;; + aix4.3* ) + ac_cv_nfs_prot_headers=aix4_3 ;; + aix5.1* ) + ac_cv_nfs_prot_headers=aix5_1 ;; + aix* ) + ac_cv_nfs_prot_headers=aix5_2 ;; + osf[1-3]* ) + ac_cv_nfs_prot_headers=osf2 ;; + osf4* ) + ac_cv_nfs_prot_headers=osf4 ;; + osf* ) + ac_cv_nfs_prot_headers=osf5 ;; + svr4* ) + ac_cv_nfs_prot_headers=svr4 ;; + sysv4* ) # this is for NCR2 machines + ac_cv_nfs_prot_headers=ncr2 ;; + linux* ) + ac_cv_nfs_prot_headers=linux ;; + nextstep* ) + ac_cv_nfs_prot_headers=nextstep ;; + ultrix* ) + ac_cv_nfs_prot_headers=ultrix ;; + darwin* | macosx* | rhapsody* ) + ac_cv_nfs_prot_headers=darwin ;; + * ) + ac_cv_nfs_prot_headers=default ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nfs_prot_headers" >&5 +$as_echo "$ac_cv_nfs_prot_headers" >&6; } + +# make sure correct header is linked in top build directory +am_utils_nfs_prot_file="amu_nfs_prot.h" +am_utils_link_files=${am_utils_link_files}${am_utils_nfs_prot_file}:conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h" " + +# define the name of the header to be included for other M4 macros +cat >>confdefs.h <<_ACEOF +#define AMU_NFS_PROTOCOL_HEADER "${srcdir}/conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h" +_ACEOF + + +# set headers in a macro for Makefile.am files to use (for dependencies) +AMU_NFS_PROT_HEADER='${top_builddir}/'$am_utils_nfs_prot_file + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct mntent" >&5 +$as_echo_n "checking for struct mntent... " >&6; } +if ${ac_cv_have_struct_mntent+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which may have a definition for the structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + +struct mntent mt; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_struct_mntent=yes +else + ac_cv_have_struct_mntent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_mntent" >&5 +$as_echo "$ac_cv_have_struct_mntent" >&6; } +if test "$ac_cv_have_struct_mntent" = yes +then + $as_echo "#define HAVE_STRUCT_MNTENT 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct mnttab" >&5 +$as_echo_n "checking for struct mnttab... " >&6; } +if ${ac_cv_have_struct_mnttab+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which may have a definition for the structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + +struct mnttab mt; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_struct_mnttab=yes +else + ac_cv_have_struct_mnttab=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_mnttab" >&5 +$as_echo "$ac_cv_have_struct_mnttab" >&6; } +if test "$ac_cv_have_struct_mnttab" = yes +then + $as_echo "#define HAVE_STRUCT_MNTTAB 1" >>confdefs.h + +fi + +if test $ac_cv_func_hasmntopt = yes +then + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working hasmntopt" >&5 +$as_echo_n "checking for working hasmntopt... " >&6; } +if ${ac_cv_func_hasmntopt_working+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef HAVE_MNTENT_H +/* some systems need before is included */ +# ifdef HAVE_STDIO_H +# include +# endif /* HAVE_STDIO_H */ +# include +#endif /* HAVE_MNTENT_H */ +#ifdef HAVE_SYS_MNTENT_H +# include +#endif /* HAVE_SYS_MNTENT_H */ +#ifdef HAVE_SYS_MNTTAB_H +# include +#endif /* HAVE_SYS_MNTTAB_H */ +#if defined(HAVE_MNTTAB_H) && !defined(MNTTAB) +# include +#endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +/* map struct mnttab field names to struct mntent field names */ +# define mnt_opts mnt_mntopts +# endif /* not HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +int main() +{ + mntent_t mnt; + char *tmp = NULL; + + /* + * Test if hasmntopt will incorrectly find the string "soft", which + * is part of the large "softlookup" function. + */ + mnt.mnt_opts = "hard,softlookup,ro"; + + if ((tmp = hasmntopt(&mnt, "soft"))) + exit(1); + exit(0); +} + + + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_hasmntopt_working=yes +else + ac_cv_func_hasmntopt_working=no + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_hasmntopt_working" >&5 +$as_echo "$ac_cv_func_hasmntopt_working" >&6; } +if test $ac_cv_func_hasmntopt_working = no +then + case " $LIBOBJS " in + *" hasmntopt.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS hasmntopt.$ac_objext" + ;; +esac + + $as_echo "#define HAVE_BAD_HASMNTOPT 1" >>confdefs.h + +fi + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct nfs_args" >&5 +$as_echo_n "checking for struct nfs_args... " >&6; } +if ${ac_cv_have_struct_nfs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which may have a definition for the structure +# assume not found +ac_cv_have_struct_nfs_args=notfound + +# look for "struct irix5_nfs_args" (specially set in conf/nfs_prot/) +if test "$ac_cv_have_struct_nfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + struct irix5_nfs_args na; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_struct_nfs_args="struct irix5_nfs_args" +else + ac_cv_have_struct_nfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct aix5_nfs_args" (specially set in conf/nfs_prot/) +if test "$ac_cv_have_struct_nfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + struct aix5_nfs_args na; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_struct_nfs_args="struct aix5_nfs_args" +else + ac_cv_have_struct_nfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct aix4_nfs_args" (specially set in conf/nfs_prot/) +if test "$ac_cv_have_struct_nfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + struct aix4_nfs_args na; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_struct_nfs_args="struct aix4_nfs_args" +else + ac_cv_have_struct_nfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct nfs_args" +if test "$ac_cv_have_struct_nfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + struct nfs_args na; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_struct_nfs_args="struct nfs_args" +else + ac_cv_have_struct_nfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_nfs_args" >&5 +$as_echo "$ac_cv_have_struct_nfs_args" >&6; } + +if test "$ac_cv_have_struct_nfs_args" != notfound +then + $as_echo "#define HAVE_STRUCT_NFS_ARGS 1" >>confdefs.h + + cat >>confdefs.h <<_ACEOF +#define nfs_args_t $ac_cv_have_struct_nfs_args +_ACEOF + +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct nfs_gfs_mount" >&5 +$as_echo_n "checking for struct nfs_gfs_mount... " >&6; } +if ${ac_cv_have_struct_nfs_gfs_mount+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which may have a definition for the structure +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + struct nfs_gfs_mount ngm; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_struct_nfs_gfs_mount=yes +else + ac_cv_have_struct_nfs_gfs_mount=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_nfs_gfs_mount" >&5 +$as_echo "$ac_cv_have_struct_nfs_gfs_mount" >&6; } +if test "$ac_cv_have_struct_nfs_gfs_mount" = yes +then + $as_echo "#define HAVE_STRUCT_NFS_GFS_MOUNT 1" >>confdefs.h + + $as_echo "#define nfs_args_t struct nfs_gfs_mount" >>confdefs.h + +fi + +if test "$ac_cv_have_struct_nfs_args" = notfound && test "$ac_cv_have_struct_nfs_gfs_mount" = no +then +as_fn_error $? "Cannot find any definition for struct nfs_args! +This can be due to several reasons: a misconfigured system, a system that is +missing some vital NFS-related headers or libraries, one for which am-utils +was not ported to yet, or even a bug in the am-utils sources. Check the +BUGS file in this distribution and see if there is any mention relevant to +your system. If that does not help, check the config.log and config.cache +files in this build for details and report them to +https://bugzilla.am-utils.org/ or am-utils@am-utils.org please. +" "$LINENO" 5 +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the name of the nfs filehandle field in nfs_args_t" >&5 +$as_echo_n "checking for the name of the nfs filehandle field in nfs_args_t... " >&6; } +if ${ac_cv_struct_field_nfs_fh+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_struct_field_nfs_fh=notfound +# look for name "fh" (most systems) +if test "$ac_cv_struct_field_nfs_fh" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + nfs_args_t nat; + char *cp = (char *) &(nat.fh); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_field_nfs_fh=fh +else + ac_cv_struct_field_nfs_fh=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for name "root" (for example Linux) +if test "$ac_cv_struct_field_nfs_fh" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + nfs_args_t nat; + char *cp = (char *) &(nat.root); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_field_nfs_fh=root +else + ac_cv_struct_field_nfs_fh=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_field_nfs_fh" >&5 +$as_echo "$ac_cv_struct_field_nfs_fh" >&6; } +if test "$ac_cv_struct_field_nfs_fh" != notfound +then + cat >>confdefs.h <<_ACEOF +#define NFS_FH_FIELD $ac_cv_struct_field_nfs_fh +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type/structure of NFS V2 filehandle" >&5 +$as_echo_n "checking for type/structure of NFS V2 filehandle... " >&6; } +if ${ac_cv_struct_nfs_fh+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which may have a definition for the type +# set to a default value +ac_cv_struct_nfs_fh=notfound + +# look for "nfs_fh" +if test "$ac_cv_struct_nfs_fh" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + nfs_fh nh; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_nfs_fh="nfs_fh" +else + ac_cv_struct_nfs_fh=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct nfs_fh" +if test "$ac_cv_struct_nfs_fh" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + struct nfs_fh nh; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_nfs_fh="struct nfs_fh" +else + ac_cv_struct_nfs_fh=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct nfssvcfh" +if test "$ac_cv_struct_nfs_fh" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + struct nfssvcfh nh; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_nfs_fh="struct nfssvcfh" +else + ac_cv_struct_nfs_fh=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "nfsv2fh_t" +if test "$ac_cv_struct_nfs_fh" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + nfsv2fh_t nh; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_nfs_fh="nfsv2fh_t" +else + ac_cv_struct_nfs_fh=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "fhandle_t" +if test "$ac_cv_struct_nfs_fh" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + fhandle_t nh; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_nfs_fh="fhandle_t" +else + ac_cv_struct_nfs_fh=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_nfs_fh" >&5 +$as_echo "$ac_cv_struct_nfs_fh" >&6; } + +if test "$ac_cv_struct_nfs_fh" != notfound +then + cat >>confdefs.h <<_ACEOF +#define am_nfs_fh $ac_cv_struct_nfs_fh +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type/structure of NFS V3 filehandle" >&5 +$as_echo_n "checking for type/structure of NFS V3 filehandle... " >&6; } +if ${ac_cv_struct_nfs_fh3+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which may have a definition for the type +# set to a default value +ac_cv_struct_nfs_fh3=notfound + +# look for "nfs_fh3" +if test "$ac_cv_struct_nfs_fh3" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + nfs_fh3 nh; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_nfs_fh3="nfs_fh3_netbsd20" +else + ac_cv_struct_nfs_fh3=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct nfs_fh3" +if test "$ac_cv_struct_nfs_fh3" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + struct nfs_fh3 nh; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_nfs_fh3="struct nfs_fh3" +else + ac_cv_struct_nfs_fh3=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_nfs_fh3" >&5 +$as_echo "$ac_cv_struct_nfs_fh3" >&6; } + +if test "$ac_cv_struct_nfs_fh3" != notfound +then + cat >>confdefs.h <<_ACEOF +#define am_nfs_fh3 $ac_cv_struct_nfs_fh3 +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: nfs3)" +else + ac_fs_name=nfs3 + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in nfs3 +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: nfs4)" +else + ac_fs_name=nfs4 + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in nfs4 +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: lustre)" +else + ac_fs_name=lustre + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in lustre +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** PARTICULAR TYPEDEFS ***" >&5 +$as_echo "$as_me: *** PARTICULAR TYPEDEFS ***" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +$as_echo "#define uid_t int" >>confdefs.h + + +$as_echo "#define gid_t int" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 +$as_echo_n "checking type of array argument to getgroups... " >&6; } +if ${ac_cv_type_getgroups+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_type_getgroups=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Mike Rendell for this test. */ +$ac_includes_default +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) + +int +main () +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long int lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test $ac_cv_type_getgroups = cross; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int +fi +rm -f conftest* + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 +$as_echo "$ac_cv_type_getgroups" >&6; } + +cat >>confdefs.h <<_ACEOF +#define GETGROUPS_T $ac_cv_type_getgroups +_ACEOF + + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if ${ac_cv_type_signal+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_signal=int +else + ac_cv_type_signal=void +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +$as_echo "#define uid_t int" >>confdefs.h + + +$as_echo "#define gid_t int" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** GENERIC TYPEDEFS ***" >&5 +$as_echo "$as_me: *** GENERIC TYPEDEFS ***" >&6;} +ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default" +if test "x$ac_cv_type_time_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define time_t long +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "rpcvers_t" "ac_cv_type_rpcvers_t" " +#ifdef HAVE_RPC_TYPES_H +# include +#endif /* HAVE_RPC_TYPES_H */ + +" +if test "x$ac_cv_type_rpcvers_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define rpcvers_t unsigned long +_ACEOF + +fi + +case "${host_os}" in + irix6* ) +ac_fn_c_check_type "$LINENO" "pte_t" "ac_cv_type_pte_t" " +#ifdef HAVE_SYS_IMMU_H +# include +#endif /* HAVE_SYS_IMMU_H */ + +" +if test "x$ac_cv_type_pte_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pte_t unsigned int +_ACEOF + +fi + + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if plain fhandle type exists" >&5 +$as_echo_n "checking if plain fhandle type exists... " >&6; } +if ${ac_cv_have_fhandle+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which may have a definition for the type +# set to a default value +ac_cv_have_fhandle=no +# look for "struct nfs_fh" +if test "$ac_cv_have_fhandle" = no +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +int +main () +{ + fhandle a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_fhandle=yes +else + ac_cv_have_fhandle=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_fhandle" >&5 +$as_echo "$ac_cv_have_fhandle" >&6; } +if test "$ac_cv_have_fhandle" != no +then + $as_echo "#define HAVE_FHANDLE 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of mount type field in mount() call" >&5 +$as_echo_n "checking type of mount type field in mount() call... " >&6; } +if ${ac_cv_mtype_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct type +case "${host_os_name}" in + osf* | freebsd2* | bsdi2* | aix* | ultrix* ) + ac_cv_mtype_type=int ;; + * ) + ac_cv_mtype_type="char *" ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mtype_type" >&5 +$as_echo "$ac_cv_mtype_type" >&6; } +cat >>confdefs.h <<_ACEOF +#define MTYPE_TYPE $ac_cv_mtype_type +_ACEOF + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking printf string to print type field of mount() call" >&5 +$as_echo_n "checking printf string to print type field of mount() call... " >&6; } +if ${ac_cv_mtype_printf_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct printf type +case "${host_os_name}" in + osf* | freebsd2* | bsdi2* | aix* | ultrix* ) + ac_cv_mtype_printf_type="%d" ;; + irix3 | isc3 ) + ac_cv_mtype_printf_type="0x%x" ;; + * ) + ac_cv_mtype_printf_type="%s" ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mtype_printf_type" >&5 +$as_echo "$ac_cv_mtype_printf_type" >&6; } +cat >>confdefs.h <<_ACEOF +#define MTYPE_PRINTF_TYPE "$ac_cv_mtype_printf_type" +_ACEOF + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pointer type of 3rd argument to yp_order()" >&5 +$as_echo_n "checking pointer type of 3rd argument to yp_order()... " >&6; } +if ${ac_cv_yp_order_outorder+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct type +case "${host_os}" in + aix[1-3]* | aix4.[0-2]* | sunos[34]* | solaris1* ) + ac_cv_yp_order_outorder=int ;; + solaris* | svr4* | sysv4* | sunos* | hpux* | aix* ) + ac_cv_yp_order_outorder="unsigned long" ;; + linux* | osf* ) + # DU4 man page is wrong, headers are right + ac_cv_yp_order_outorder="unsigned int" ;; + * ) + ac_cv_yp_order_outorder=int ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_yp_order_outorder" >&5 +$as_echo "$ac_cv_yp_order_outorder" >&6; } +cat >>confdefs.h <<_ACEOF +#define YP_ORDER_OUTORDER_TYPE $ac_cv_yp_order_outorder +_ACEOF + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking non-pointer type of 6th (fromlen) argument to recvfrom()" >&5 +$as_echo_n "checking non-pointer type of 6th (fromlen) argument to recvfrom()... " >&6; } +if ${ac_cv_recvfrom_fromlen+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct type +case "${host_os}" in + linux* ) + ac_cv_recvfrom_fromlen="unsigned int" ;; + aix[1-3]* ) + ac_cv_recvfrom_fromlen="int" ;; + aix* ) + ac_cv_recvfrom_fromlen="size_t" ;; + # old macosx used "int" but all newer ones use socklen_t + macosx-10.[0-3]* ) + ac_cv_recvfrom_fromlen="int" ;; + macosx* ) + ac_cv_recvfrom_fromlen="socklen_t" ;; + *bsd* ) + ac_cv_recvfrom_fromlen="socklen_t" ;; + * ) + ac_cv_recvfrom_fromlen="int" ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_recvfrom_fromlen" >&5 +$as_echo "$ac_cv_recvfrom_fromlen" >&6; } +cat >>confdefs.h <<_ACEOF +#define RECVFROM_FROMLEN_TYPE $ac_cv_recvfrom_fromlen +_ACEOF + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking argument type of 5rd argument to authunix_create()" >&5 +$as_echo_n "checking argument type of 5rd argument to authunix_create()... " >&6; } +if ${ac_cv_auth_create_gidlist+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct type +case "${host_os_name}" in + sunos[34]* | bsdi2* | sysv4* | hpux10.10 | ultrix* | aix4* ) + ac_cv_auth_create_gidlist="int" ;; + # old macosx used "gid_t" but all newer ones use int + macosx-10.[0-3]* ) + ac_cv_auth_create_gidlist="gid_t" ;; + macosx* ) + ac_cv_auth_create_gidlist="int" ;; + *bsd* ) + ac_cv_auth_create_gidlist="int" ;; + * ) + ac_cv_auth_create_gidlist="gid_t" ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_auth_create_gidlist" >&5 +$as_echo "$ac_cv_auth_create_gidlist" >&6; } +cat >>confdefs.h <<_ACEOF +#define AUTH_CREATE_GIDLIST_TYPE $ac_cv_auth_create_gidlist +_ACEOF + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of 3rd arg ('in') arg to svc_sendreply()" >&5 +$as_echo_n "checking for type of 3rd arg ('in') arg to svc_sendreply()... " >&6; } +if ${ac_cv_type_svc_in_arg+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which may have a definition for the type +# set to a default value +ac_cv_type_svc_in_arg=notfound +# look for "caddr_t" +if test "$ac_cv_type_svc_in_arg" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ +/* Prevent multiple inclusion on Ultrix 4 */ +#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) +# include +#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */ + +int +main () +{ + SVCXPRT *SX; + xdrproc_t xp; + caddr_t p; + svc_sendreply(SX, xp, p); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_svc_in_arg="caddr_t" +else + ac_cv_type_svc_in_arg=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +# look for "char *" +if test "$ac_cv_type_svc_in_arg" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ +/* Prevent multiple inclusion on Ultrix 4 */ +#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) +# include +#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */ + +int +main () +{ + SVCXPRT *SX; + xdrproc_t xp; + char *p; + svc_sendreply(SX, xp, p); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_svc_in_arg="char *" +else + ac_cv_type_svc_in_arg=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_svc_in_arg" >&5 +$as_echo "$ac_cv_type_svc_in_arg" >&6; } +if test "$ac_cv_type_svc_in_arg" != notfound +then + cat >>confdefs.h <<_ACEOF +#define SVC_IN_ARG_TYPE $ac_cv_type_svc_in_arg +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of autofs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of autofs mount(2) arguments... " >&6; } +if ${ac_cv_type_autofs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_autofs_args=notfound + +# look for "struct auto_args" +if test "$ac_cv_type_autofs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct auto_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_autofs_args="struct auto_args" +else + ac_cv_type_autofs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct autofs_args" +if test "$ac_cv_type_autofs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct autofs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_autofs_args="struct autofs_args" +else + ac_cv_type_autofs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_autofs_args" >&5 +$as_echo "$ac_cv_type_autofs_args" >&6; } +if test "$ac_cv_type_autofs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define autofs_args_t $ac_cv_type_autofs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of cachefs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of cachefs mount(2) arguments... " >&6; } +if ${ac_cv_type_cachefs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_cachefs_args=notfound +# look for "struct cachefs_mountargs" +if test "$ac_cv_type_cachefs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct cachefs_mountargs a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_cachefs_args="struct cachefs_mountargs" +else + ac_cv_type_cachefs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_cachefs_args" >&5 +$as_echo "$ac_cv_type_cachefs_args" >&6; } +if test "$ac_cv_type_cachefs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define cachefs_args_t $ac_cv_type_cachefs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of cdfs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of cdfs mount(2) arguments... " >&6; } +if ${ac_cv_type_cdfs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_cdfs_args=notfound + +# look for "struct iso_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct iso_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_cdfs_args="struct iso_args" +else + ac_cv_type_cdfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct iso9660_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct iso9660_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_cdfs_args="struct iso9660_args" +else + ac_cv_type_cdfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct cdfs_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct cdfs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_cdfs_args="struct cdfs_args" +else + ac_cv_type_cdfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct hsfs_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct hsfs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_cdfs_args="struct hsfs_args" +else + ac_cv_type_cdfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct iso_specific" (ultrix) +if test "$ac_cv_type_cdfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct iso_specific a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_cdfs_args="struct iso_specific" +else + ac_cv_type_cdfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_cdfs_args" >&5 +$as_echo "$ac_cv_type_cdfs_args" >&6; } +if test "$ac_cv_type_cdfs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define cdfs_args_t $ac_cv_type_cdfs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of udf mount(2) arguments" >&5 +$as_echo_n "checking for structure type of udf mount(2) arguments... " >&6; } +if ${ac_cv_type_udf_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_udf_args=notfound + +# look for "struct udf_args" +if test "$ac_cv_type_udf_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct udf_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_udf_args="struct udf_args" +else + ac_cv_type_udf_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_udf_args" >&5 +$as_echo "$ac_cv_type_udf_args" >&6; } +if test "$ac_cv_type_udf_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define udf_args_t $ac_cv_type_udf_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of lofs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of lofs mount(2) arguments... " >&6; } +if ${ac_cv_type_lofs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_lofs_args=notfound +# look for "struct lofs_args" +if test "$ac_cv_type_lofs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct lofs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_lofs_args="struct lofs_args" +else + ac_cv_type_lofs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +# look for "struct lo_args" +if test "$ac_cv_type_lofs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct lo_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_lofs_args="struct lo_args" +else + ac_cv_type_lofs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_lofs_args" >&5 +$as_echo "$ac_cv_type_lofs_args" >&6; } +if test "$ac_cv_type_lofs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define lofs_args_t $ac_cv_type_lofs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of mfs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of mfs mount(2) arguments... " >&6; } +if ${ac_cv_type_mfs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_mfs_args=notfound +# look for "struct mfs_args" +if test "$ac_cv_type_mfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct mfs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_mfs_args="struct mfs_args" +else + ac_cv_type_mfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mfs_args" >&5 +$as_echo "$ac_cv_type_mfs_args" >&6; } +if test "$ac_cv_type_mfs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define mfs_args_t $ac_cv_type_mfs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of pcfs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of pcfs mount(2) arguments... " >&6; } +if ${ac_cv_type_pcfs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_pcfs_args=notfound + +# look for "struct msdos_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct msdos_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_pcfs_args="struct msdos_args" +else + ac_cv_type_pcfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct pc_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct pc_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_pcfs_args="struct pc_args" +else + ac_cv_type_pcfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct pcfs_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct pcfs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_pcfs_args="struct pcfs_args" +else + ac_cv_type_pcfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct msdosfs_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct msdosfs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_pcfs_args="struct msdosfs_args" +else + ac_cv_type_pcfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_pcfs_args" >&5 +$as_echo "$ac_cv_type_pcfs_args" >&6; } + +if test "$ac_cv_type_pcfs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define pcfs_args_t $ac_cv_type_pcfs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of rfs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of rfs mount(2) arguments... " >&6; } +if ${ac_cv_type_rfs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_rfs_args=notfound +# look for "struct rfs_args" +if test "$ac_cv_type_rfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct rfs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_rfs_args="struct rfs_args" +else + ac_cv_type_rfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rfs_args" >&5 +$as_echo "$ac_cv_type_rfs_args" >&6; } +if test "$ac_cv_type_rfs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define rfs_args_t $ac_cv_type_rfs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of tmpfs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of tmpfs mount(2) arguments... " >&6; } +if ${ac_cv_type_tmpfs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_tmpfs_args=notfound +# look for "struct tmpfs_args" +if test "$ac_cv_type_tmpfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct tmpfs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_tmpfs_args="struct tmpfs_args" +else + ac_cv_type_tmpfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_tmpfs_args" >&5 +$as_echo "$ac_cv_type_tmpfs_args" >&6; } +if test "$ac_cv_type_tmpfs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define tmpfs_args_t $ac_cv_type_tmpfs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of ufs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of ufs mount(2) arguments... " >&6; } +if ${ac_cv_type_ufs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_ufs_args=notfound + +# look for "struct ufs_args" +if test "$ac_cv_type_ufs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct ufs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_ufs_args="struct ufs_args" +else + ac_cv_type_ufs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct efs_args" (irix) +if test "$ac_cv_type_ufs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct efs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_ufs_args="struct efs_args" +else + ac_cv_type_ufs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +# look for "struct ufs_specific" (ultrix) +if test "$ac_cv_type_ufs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct ufs_specific a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_ufs_args="struct ufs_specific" +else + ac_cv_type_ufs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_ufs_args" >&5 +$as_echo "$ac_cv_type_ufs_args" >&6; } +if test "$ac_cv_type_ufs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define ufs_args_t $ac_cv_type_ufs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of xfs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of xfs mount(2) arguments... " >&6; } +if ${ac_cv_type_xfs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_xfs_args=notfound + +# look for "struct xfs_args" +if test "$ac_cv_type_xfs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct xfs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_xfs_args="struct xfs_args" +else + ac_cv_type_xfs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_xfs_args" >&5 +$as_echo "$ac_cv_type_xfs_args" >&6; } +if test "$ac_cv_type_xfs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define xfs_args_t $ac_cv_type_xfs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure type of efs mount(2) arguments" >&5 +$as_echo_n "checking for structure type of efs mount(2) arguments... " >&6; } +if ${ac_cv_type_efs_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set to a default value +ac_cv_type_efs_args=notfound + +# look for "struct efs_args" +if test "$ac_cv_type_efs_args" = notfound +then +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + +int +main () +{ + struct efs_args a; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_efs_args="struct efs_args" +else + ac_cv_type_efs_args=notfound +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_efs_args" >&5 +$as_echo "$ac_cv_type_efs_args" >&6; } +if test "$ac_cv_type_efs_args" != notfound +then + cat >>confdefs.h <<_ACEOF +#define efs_args_t $ac_cv_type_efs_args +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xdrproc_t" >&5 +$as_echo_n "checking for xdrproc_t... " >&6; } +if ${ac_cv_type_xdrproc_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which may have a definition for the type +# look for "xdrproc_t" +# try to compile a program which may have a definition for a structure +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ +/* Prevent multiple inclusion on Ultrix 4 */ +#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) +# include +#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */ + +int +main () +{ + xdrproc_t xdr_int; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_xdrproc_t=yes +else + ac_cv_type_xdrproc_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_xdrproc_t" >&5 +$as_echo "$ac_cv_type_xdrproc_t" >&6; } +if test "$ac_cv_type_xdrproc_t" = yes +then + cat >>confdefs.h <<_ACEOF +#define XDRPROC_T_TYPE xdrproc_t +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** PARTICULAR COMPILER CHARACTERISTICS ***" >&5 +$as_echo "$as_me: *** PARTICULAR COMPILER CHARACTERISTICS ***" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 +$as_echo_n "checking for working volatile... " >&6; } +if ${ac_cv_c_volatile+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +volatile int x; +int * volatile y = (int *) 0; +return !x && !y; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_volatile=yes +else + ac_cv_c_volatile=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 +$as_echo "$ac_cv_c_volatile" >&6; } +if test $ac_cv_c_volatile = no; then + +$as_echo "#define volatile /**/" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** GENERIC COMPILER CHARACTERISTICS ***" >&5 +$as_echo "$as_me: *** GENERIC COMPILER CHARACTERISTICS ***" >&6;} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler can handle void *" >&5 +$as_echo_n "checking if compiler can handle void *... " >&6; } +if ${ac_cv_c_void_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program which uses void * +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +void *vp; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_void_p=yes +else + ac_cv_c_void_p=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_void_p" >&5 +$as_echo "$ac_cv_c_void_p" >&6; } +if test "$ac_cv_c_void_p" = yes +then + $as_echo "#define voidp void *" >>confdefs.h + +else + $as_echo "#define voidp char *" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler can handle variable-length macros" >&5 +$as_echo_n "checking if compiler can handle variable-length macros... " >&6; } +if ${ac_cv_varargs_macros+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try C99 style +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__) + +int +main () +{ + +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_varargs_macros=c99 +else + # else try gcc style +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args) + +int +main () +{ + +char a80; +foo(a, sizeof(a), "%d,%d", 1, 2); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_varargs_macros=gcc +else + ac_cv_varargs_macros=none +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_varargs_macros" >&5 +$as_echo "$ac_cv_varargs_macros" >&6; } +if test "$ac_cv_varargs_macros" = c99 +then + +$as_echo "#define HAVE_C99_VARARGS_MACROS 1" >>confdefs.h + +else + if test "$ac_cv_varargs_macros" = gcc + then + +$as_echo "#define HAVE_GCC_VARARGS_MACROS 1" >>confdefs.h + + fi +fi + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** EXTERNAL DEFINITIONS ***" >&5 +$as_echo "$as_me: *** EXTERNAL DEFINITIONS ***" >&6;} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external definition for sys_errlist exists" >&5 +$as_echo_n "checking if external definition for sys_errlist exists... " >&6; } +if ${ac_cv_extern_sys_errlist+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to locate pattern in header files +#pattern="(extern)?.*char.*sys_errlist.*\[\]" +pattern="(extern)?.*char.*sys_errlist.*" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_ERRNO_H +# include +#endif /* HAVE_ERRNO_H */ + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${pattern}" >/dev/null 2>&1; then : + ac_cv_extern_sys_errlist=yes +else + ac_cv_extern_sys_errlist=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extern_sys_errlist" >&5 +$as_echo "$ac_cv_extern_sys_errlist" >&6; } +# check if need to define variable +if test "$ac_cv_extern_sys_errlist" = yes +then + $as_echo "#define HAVE_EXTERN_SYS_ERRLIST 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external definition for optarg exists" >&5 +$as_echo_n "checking if external definition for optarg exists... " >&6; } +if ${ac_cv_extern_optarg+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile program that uses the variable +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#ifdef HAVE_STDLIB_H +# include +#endif /* HAVE_STDLIB_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_ERRNO_H +# include +#endif /* HAVE_ERRNO_H */ + +int +main () +{ + +char *cp = optarg; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_extern_optarg=yes +else + ac_cv_extern_optarg=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extern_optarg" >&5 +$as_echo "$ac_cv_extern_optarg" >&6; } +if test "$ac_cv_extern_optarg" = yes +then + $as_echo "#define HAVE_EXTERN_OPTARG 1" >>confdefs.h + +fi + + +for ac_tmp_arg in clnt_spcreateerror \ + clnt_sperrno \ + free \ + get_myaddress \ + getccent \ + getdomainname \ + getdtablesize \ + gethostname \ + getlogin \ + getpagesize \ + getwd \ + hosts_ctl \ + innetgr \ + mkstemp \ + mntctl \ + sbrk \ + seteuid \ + setitimer \ + sleep \ + strcasecmp \ + strdup \ + strlcat \ + strlcpy \ + strstr \ + ualarm \ + usleep \ + wait3 \ + vsnprintf \ + xdr_callmsg \ + xdr_opaque_auth \ + +do + +# store variable name for external definition +ac_upcase_extern_name=`echo $ac_tmp_arg | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_EXTERN_$ac_upcase_extern_name +# check for cached value and set it if needed + +ac_tmp=`echo ac_cv_extern_$ac_tmp_arg` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking external function definition for $ac_tmp_arg" >&5 +$as_echo_n "checking external function definition for $ac_tmp_arg... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# the old pattern assumed that the complete external definition is on one +# line but on some systems it is split over several lines, so only match +# beginning of the extern definition including the opening parenthesis. +#pattern="(extern)?.*[^a-zA-Z0-9_]$ac_tmp_arg[^a-zA-Z0-9_]?.*\(.*\).*;" +pattern="(extern)?.*[^a-zA-Z0-9_]$ac_tmp_arg[^a-zA-Z0-9_]?.*\(" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_WAIT_H +# include +#endif /* HAVE_SYS_WAIT_H */ +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#if defined(_AIX) && defined(HAVE_SYS_VMOUNT_H) +# include +#endif /* defined(_AIX) && defined(HAVE_SYS_VMOUNT_H) */ + +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_STDLIB_H +# include +#endif /* HAVE_STDLIB_H */ +#if HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if HAVE_STRING_H +# include +#endif /* HAVE_STRING_H */ +#ifdef HAVE_STRINGS_H +# include +#endif /* HAVE_STRINGS_H */ +#ifdef HAVE_NETDB_H +# include +#endif /* HAVE_NETDB_H */ +#ifdef HAVE_CLUSTER_H +# include +#endif /* HAVE_CLUSTER_H */ +#ifdef HAVE_RPC_RPC_H +/* + * Turn on PORTMAP, so that additional header files would get included + * and the important definition for UDPMSGSIZE is included too. + */ +# ifndef PORTMAP +# define PORTMAP +# endif /* not PORTMAP */ +# include +# ifndef XDRPROC_T_TYPE +typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...)); +# endif /* not XDRPROC_T_TYPE */ +#endif /* HAVE_RPC_RPC_H */ + +#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) +# include +#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */ + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${pattern}" >/dev/null 2>&1; then : + eval "ac_cv_extern_$ac_tmp_arg=yes" +else + eval "ac_cv_extern_$ac_tmp_arg=no" +fi +rm -f conftest* + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking external function definition for $ac_tmp_arg" >&5 +$as_echo_n "checking external function definition for $ac_tmp_arg... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_extern_'$ac_tmp_arg'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + +done + +if test "$with_ldap" = "yes"; then + +# store variable name for external definition +ac_upcase_extern_name=`echo ldap_enable_cache | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_EXTERN_$ac_upcase_extern_name +# check for cached value and set it if needed + +ac_tmp=`echo ac_cv_extern_ldap_enable_cache` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking external function definition for ldap_enable_cache" >&5 +$as_echo_n "checking external function definition for ldap_enable_cache... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# the old pattern assumed that the complete external definition is on one +# line but on some systems it is split over several lines, so only match +# beginning of the extern definition including the opening parenthesis. +#pattern="(extern)?.*[^a-zA-Z0-9_]ldap_enable_cache[^a-zA-Z0-9_]?.*\(.*\).*;" +pattern="(extern)?.*([^a-zA-Z0-9_])?ldap_enable_cache[^a-zA-Z0-9_]?.*\(" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_WAIT_H +# include +#endif /* HAVE_SYS_WAIT_H */ +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_STDLIB_H +# include +#endif /* HAVE_STDLIB_H */ +#if HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if HAVE_STRING_H +# include +#endif /* HAVE_STRING_H */ +#ifdef HAVE_STRINGS_H +# include +#endif /* HAVE_STRINGS_H */ +#ifdef HAVE_NETDB_H +# include +#endif /* HAVE_NETDB_H */ +#ifdef HAVE_CLUSTER_H +# include +#endif /* HAVE_CLUSTER_H */ +#ifdef HAVE_RPC_RPC_H +/* + * Turn on PORTMAP, so that additional header files would get included + * and the important definition for UDPMSGSIZE is included too. + */ +# ifndef PORTMAP +# define PORTMAP +# endif /* not PORTMAP */ +# include +# ifndef XDRPROC_T_TYPE +typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...)); +# endif /* not XDRPROC_T_TYPE */ +#endif /* HAVE_RPC_RPC_H */ + +#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) +# include +#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */ + +#ifdef HAVE_LDAP_H +# include +#endif /* HAVE_LDAP_H */ +#ifdef HAVE_LBER_H +# include +#endif /* HAVE_LBER_H */ + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${pattern}" >/dev/null 2>&1; then : + eval "ac_cv_extern_ldap_enable_cache=yes" +else + eval "ac_cv_extern_ldap_enable_cache=no" +fi +rm -f conftest* + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking external function definition for ldap_enable_cache" >&5 +$as_echo_n "checking external function definition for ldap_enable_cache... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_extern_'ldap_enable_cache'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** C PREPROCESSOR MACROS ***" >&5 +$as_echo "$as_me: *** C PREPROCESSOR MACROS ***" >&6;} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SYSTEM SERVICES ***" >&5 +$as_echo "$as_me: *** SYSTEM SERVICES ***" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 +$as_echo_n "checking for long file names... " >&6; } +if ${ac_cv_sys_long_file_names+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_long_file_names=yes +# Test for long file names in all the places we know might matter: +# . the current directory, where building will happen +# $prefix/lib where we will be installing things +# $exec_prefix/lib likewise +# $TMPDIR if set, where it might want to write temporary files +# /tmp where it might want to write temporary files +# /var/tmp likewise +# /usr/tmp likewise +for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do + # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib + # in the usual case where exec_prefix is '${prefix}'. + case $ac_dir in #( + . | /* | ?:[\\/]*) ;; #( + *) continue;; + esac + test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. + ac_xdir=$ac_dir/cf$$ + (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue + ac_tf1=$ac_xdir/conftest9012345 + ac_tf2=$ac_xdir/conftest9012346 + touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || + ac_cv_sys_long_file_names=no + rm -f -r "$ac_xdir" 2>/dev/null + test $ac_cv_sys_long_file_names = no && break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 +$as_echo "$ac_cv_sys_long_file_names" >&6; } +if test $ac_cv_sys_long_file_names = yes; then + +$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h + +fi + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for restartable system calls" >&5 +$as_echo_n "checking for restartable system calls... " >&6; } +if ${ac_cv_sys_restartable_syscalls+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Exit 0 (true) if wait returns something other than -1, + i.e. the pid of the child, which means that wait was restarted + after getting the signal. */ + +$ac_includes_default +#include +#ifdef HAVE_SYS_WAIT_H +# include +#endif + +/* Some platforms explicitly require an extern "C" signal handler + when using C++. */ +#ifdef __cplusplus +extern "C" void ucatch (int dummy) { } +#else +void ucatch (dummy) int dummy; { } +#endif + +int +main () +{ + int i = fork (), status; + + if (i == 0) + { + sleep (3); + kill (getppid (), SIGINT); + sleep (3); + return 0; + } + + signal (SIGINT, ucatch); + + status = wait (&i); + if (status == -1) + wait (&i); + + return status == -1; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_sys_restartable_syscalls=yes +else + ac_cv_sys_restartable_syscalls=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_restartable_syscalls" >&5 +$as_echo "$ac_cv_sys_restartable_syscalls" >&6; } +if test $ac_cv_sys_restartable_syscalls = yes; then + +$as_echo "#define HAVE_RESTARTABLE_SYSCALLS 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking network transport type" >&5 +$as_echo_n "checking network transport type... " >&6; } +if ${ac_cv_transport_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct type +case "${host_os_name}" in + solaris1* | sunos[34]* | hpux[6-9]* | hpux10* ) + ac_cv_transport_type=sockets ;; + solaris* | sunos* | hpux* ) + ac_cv_transport_type=tli ;; + * ) + ac_cv_transport_type=sockets ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_transport_type" >&5 +$as_echo "$ac_cv_transport_type" >&6; } +am_utils_link_files=${am_utils_link_files}libamu/transputil.c:conf/transp/transp_${ac_cv_transport_type}.c" " + +# append transport utilities object to LIBOBJS for automatic compilation +case " $LIBOBJS " in + *" transputil.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS transputil.$ac_objext" + ;; +esac + +if test $ac_cv_transport_type = tli +then + $as_echo "#define HAVE_TRANSPORT_TYPE_TLI 1" >>confdefs.h + +fi + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** FIELDS WITHIN STRUCTURES ***" >&5 +$as_echo "$as_me: *** FIELDS WITHIN STRUCTURES ***" >&6;} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd_set.fds_bits" >&5 +$as_echo_n "checking for fd_set.fds_bits... " >&6; } +if ${ac_cv_member_fd_set_fds_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static fd_set ac_aggr; +if (&(ac_aggr.fds_bits)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_fd_set_fds_bits=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static fd_set ac_aggr; +if (sizeof ac_aggr.fds_bits) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_fd_set_fds_bits=yes +else + ac_cv_member_fd_set_fds_bits=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_fd_set_fds_bits" >&5 +$as_echo "$ac_cv_member_fd_set_fds_bits" >&6; } +if test $ac_cv_member_fd_set_fds_bits = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_FD_SET_FDS_BITS 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntent_t.mnt_cnode" >&5 +$as_echo_n "checking for mntent_t.mnt_cnode... " >&6; } +if ${ac_cv_member_mntent_t_mnt_cnode+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static mntent_t ac_aggr; +if (&(ac_aggr.mnt_cnode)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_mntent_t_mnt_cnode=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static mntent_t ac_aggr; +if (sizeof ac_aggr.mnt_cnode) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_mntent_t_mnt_cnode=yes +else + ac_cv_member_mntent_t_mnt_cnode=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_mntent_t_mnt_cnode" >&5 +$as_echo "$ac_cv_member_mntent_t_mnt_cnode" >&6; } +if test $ac_cv_member_mntent_t_mnt_cnode = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_MNTENT_T_MNT_CNODE 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntent_t.mnt_ro" >&5 +$as_echo_n "checking for mntent_t.mnt_ro... " >&6; } +if ${ac_cv_member_mntent_t_mnt_ro+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static mntent_t ac_aggr; +if (&(ac_aggr.mnt_ro)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_mntent_t_mnt_ro=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static mntent_t ac_aggr; +if (sizeof ac_aggr.mnt_ro) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_mntent_t_mnt_ro=yes +else + ac_cv_member_mntent_t_mnt_ro=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_mntent_t_mnt_ro" >&5 +$as_echo "$ac_cv_member_mntent_t_mnt_ro" >&6; } +if test $ac_cv_member_mntent_t_mnt_ro = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_MNTENT_T_MNT_RO 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntent_t.mnt_time" >&5 +$as_echo_n "checking for mntent_t.mnt_time... " >&6; } +if ${ac_cv_member_mntent_t_mnt_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static mntent_t ac_aggr; +if (&(ac_aggr.mnt_time)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_mntent_t_mnt_time=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static mntent_t ac_aggr; +if (sizeof ac_aggr.mnt_time) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_mntent_t_mnt_time=yes +else + ac_cv_member_mntent_t_mnt_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_mntent_t_mnt_time" >&5 +$as_echo "$ac_cv_member_mntent_t_mnt_time" >&6; } +if test $ac_cv_member_mntent_t_mnt_time = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_MNTENT_T_MNT_TIME 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if mntent_t field mnt_time exist as type string" >&5 +$as_echo_n "checking if mntent_t field mnt_time exist as type string... " >&6; } +if ${ac_cv_field_mntent_t_mnt_time_string+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# try to compile a program +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# else /* not HAVE_STRUCT_MNTTAB */ +# error XXX: could not find definition for struct mntent or struct mnttab! +# endif /* not HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + + + +int +main () +{ + +mntent_t mtt; +char *cp = "test"; +int i; +mtt.mnt_time = cp; +i = mtt.mnt_time[0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_field_mntent_t_mnt_time_string=yes +else + ac_cv_field_mntent_t_mnt_time_string=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_field_mntent_t_mnt_time_string" >&5 +$as_echo "$ac_cv_field_mntent_t_mnt_time_string" >&6; } +if test "$ac_cv_field_mntent_t_mnt_time_string" = yes +then + $as_echo "#define HAVE_MNTENT_T_MNT_TIME_STRING 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cdfs_args_t.flags" >&5 +$as_echo_n "checking for cdfs_args_t.flags... " >&6; } +if ${ac_cv_member_cdfs_args_t_flags+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (&(ac_aggr.flags)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_flags=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (sizeof ac_aggr.flags) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_flags=yes +else + ac_cv_member_cdfs_args_t_flags=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_cdfs_args_t_flags" >&5 +$as_echo "$ac_cv_member_cdfs_args_t_flags" >&6; } +if test $ac_cv_member_cdfs_args_t_flags = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_CDFS_ARGS_T_FLAGS 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cdfs_args_t.fspec" >&5 +$as_echo_n "checking for cdfs_args_t.fspec... " >&6; } +if ${ac_cv_member_cdfs_args_t_fspec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (&(ac_aggr.fspec)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_fspec=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (sizeof ac_aggr.fspec) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_fspec=yes +else + ac_cv_member_cdfs_args_t_fspec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_cdfs_args_t_fspec" >&5 +$as_echo "$ac_cv_member_cdfs_args_t_fspec" >&6; } +if test $ac_cv_member_cdfs_args_t_fspec = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_CDFS_ARGS_T_FSPEC 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cdfs_args_t.iso_flags" >&5 +$as_echo_n "checking for cdfs_args_t.iso_flags... " >&6; } +if ${ac_cv_member_cdfs_args_t_iso_flags+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (&(ac_aggr.iso_flags)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_iso_flags=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (sizeof ac_aggr.iso_flags) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_iso_flags=yes +else + ac_cv_member_cdfs_args_t_iso_flags=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_cdfs_args_t_iso_flags" >&5 +$as_echo "$ac_cv_member_cdfs_args_t_iso_flags" >&6; } +if test $ac_cv_member_cdfs_args_t_iso_flags = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_CDFS_ARGS_T_ISO_FLAGS 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cdfs_args_t.iso_pgthresh" >&5 +$as_echo_n "checking for cdfs_args_t.iso_pgthresh... " >&6; } +if ${ac_cv_member_cdfs_args_t_iso_pgthresh+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (&(ac_aggr.iso_pgthresh)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_iso_pgthresh=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (sizeof ac_aggr.iso_pgthresh) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_iso_pgthresh=yes +else + ac_cv_member_cdfs_args_t_iso_pgthresh=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_cdfs_args_t_iso_pgthresh" >&5 +$as_echo "$ac_cv_member_cdfs_args_t_iso_pgthresh" >&6; } +if test $ac_cv_member_cdfs_args_t_iso_pgthresh = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_CDFS_ARGS_T_ISO_PGTHRESH 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cdfs_args_t.norrip" >&5 +$as_echo_n "checking for cdfs_args_t.norrip... " >&6; } +if ${ac_cv_member_cdfs_args_t_norrip+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (&(ac_aggr.norrip)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_norrip=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (sizeof ac_aggr.norrip) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_norrip=yes +else + ac_cv_member_cdfs_args_t_norrip=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_cdfs_args_t_norrip" >&5 +$as_echo "$ac_cv_member_cdfs_args_t_norrip" >&6; } +if test $ac_cv_member_cdfs_args_t_norrip = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_CDFS_ARGS_T_NORRIP 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cdfs_args_t.ssector" >&5 +$as_echo_n "checking for cdfs_args_t.ssector... " >&6; } +if ${ac_cv_member_cdfs_args_t_ssector+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (&(ac_aggr.ssector)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_ssector=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static cdfs_args_t ac_aggr; +if (sizeof ac_aggr.ssector) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_cdfs_args_t_ssector=yes +else + ac_cv_member_cdfs_args_t_ssector=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_cdfs_args_t_ssector" >&5 +$as_echo "$ac_cv_member_cdfs_args_t_ssector" >&6; } +if test $ac_cv_member_cdfs_args_t_ssector = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_CDFS_ARGS_T_SSECTOR 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.version" >&5 +$as_echo_n "checking for udf_args_t.version... " >&6; } +if ${ac_cv_member_udf_args_t_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.version)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_version=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.version) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_version=yes +else + ac_cv_member_udf_args_t_version=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_version" >&5 +$as_echo "$ac_cv_member_udf_args_t_version" >&6; } +if test $ac_cv_member_udf_args_t_version = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_VERSION 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.fspec" >&5 +$as_echo_n "checking for udf_args_t.fspec... " >&6; } +if ${ac_cv_member_udf_args_t_fspec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.fspec)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_fspec=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.fspec) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_fspec=yes +else + ac_cv_member_udf_args_t_fspec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_fspec" >&5 +$as_echo "$ac_cv_member_udf_args_t_fspec" >&6; } +if test $ac_cv_member_udf_args_t_fspec = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_FSPEC 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.sessionnr" >&5 +$as_echo_n "checking for udf_args_t.sessionnr... " >&6; } +if ${ac_cv_member_udf_args_t_sessionnr+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.sessionnr)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_sessionnr=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.sessionnr) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_sessionnr=yes +else + ac_cv_member_udf_args_t_sessionnr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_sessionnr" >&5 +$as_echo "$ac_cv_member_udf_args_t_sessionnr" >&6; } +if test $ac_cv_member_udf_args_t_sessionnr = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_SESSIONNR 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.udfmflags" >&5 +$as_echo_n "checking for udf_args_t.udfmflags... " >&6; } +if ${ac_cv_member_udf_args_t_udfmflags+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.udfmflags)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_udfmflags=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.udfmflags) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_udfmflags=yes +else + ac_cv_member_udf_args_t_udfmflags=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_udfmflags" >&5 +$as_echo "$ac_cv_member_udf_args_t_udfmflags" >&6; } +if test $ac_cv_member_udf_args_t_udfmflags = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_UDFMFLAGS 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.gmtoff" >&5 +$as_echo_n "checking for udf_args_t.gmtoff... " >&6; } +if ${ac_cv_member_udf_args_t_gmtoff+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.gmtoff)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_gmtoff=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.gmtoff) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_gmtoff=yes +else + ac_cv_member_udf_args_t_gmtoff=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_gmtoff" >&5 +$as_echo "$ac_cv_member_udf_args_t_gmtoff" >&6; } +if test $ac_cv_member_udf_args_t_gmtoff = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_GMTOFF 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.anon_uid" >&5 +$as_echo_n "checking for udf_args_t.anon_uid... " >&6; } +if ${ac_cv_member_udf_args_t_anon_uid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.anon_uid)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_anon_uid=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.anon_uid) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_anon_uid=yes +else + ac_cv_member_udf_args_t_anon_uid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_anon_uid" >&5 +$as_echo "$ac_cv_member_udf_args_t_anon_uid" >&6; } +if test $ac_cv_member_udf_args_t_anon_uid = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_ANON_UID 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.anon_gid" >&5 +$as_echo_n "checking for udf_args_t.anon_gid... " >&6; } +if ${ac_cv_member_udf_args_t_anon_gid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.anon_gid)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_anon_gid=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.anon_gid) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_anon_gid=yes +else + ac_cv_member_udf_args_t_anon_gid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_anon_gid" >&5 +$as_echo "$ac_cv_member_udf_args_t_anon_gid" >&6; } +if test $ac_cv_member_udf_args_t_anon_gid = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_ANON_GID 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.nobody_uid" >&5 +$as_echo_n "checking for udf_args_t.nobody_uid... " >&6; } +if ${ac_cv_member_udf_args_t_nobody_uid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.nobody_uid)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_nobody_uid=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.nobody_uid) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_nobody_uid=yes +else + ac_cv_member_udf_args_t_nobody_uid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_nobody_uid" >&5 +$as_echo "$ac_cv_member_udf_args_t_nobody_uid" >&6; } +if test $ac_cv_member_udf_args_t_nobody_uid = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_NOBODY_UID 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.nobody_gid" >&5 +$as_echo_n "checking for udf_args_t.nobody_gid... " >&6; } +if ${ac_cv_member_udf_args_t_nobody_gid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.nobody_gid)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_nobody_gid=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.nobody_gid) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_nobody_gid=yes +else + ac_cv_member_udf_args_t_nobody_gid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_nobody_gid" >&5 +$as_echo "$ac_cv_member_udf_args_t_nobody_gid" >&6; } +if test $ac_cv_member_udf_args_t_nobody_gid = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_NOBODY_GID 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for udf_args_t.sector_size" >&5 +$as_echo_n "checking for udf_args_t.sector_size... " >&6; } +if ${ac_cv_member_udf_args_t_sector_size+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (&(ac_aggr.sector_size)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_sector_size=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static udf_args_t ac_aggr; +if (sizeof ac_aggr.sector_size) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_udf_args_t_sector_size=yes +else + ac_cv_member_udf_args_t_sector_size=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_udf_args_t_sector_size" >&5 +$as_echo "$ac_cv_member_udf_args_t_sector_size" >&6; } +if test $ac_cv_member_udf_args_t_sector_size = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UDF_ARGS_T_SECTOR_SIZE 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcfs_args_t.dirmask" >&5 +$as_echo_n "checking for pcfs_args_t.dirmask... " >&6; } +if ${ac_cv_member_pcfs_args_t_dirmask+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (&(ac_aggr.dirmask)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_dirmask=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (sizeof ac_aggr.dirmask) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_dirmask=yes +else + ac_cv_member_pcfs_args_t_dirmask=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_pcfs_args_t_dirmask" >&5 +$as_echo "$ac_cv_member_pcfs_args_t_dirmask" >&6; } +if test $ac_cv_member_pcfs_args_t_dirmask = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_PCFS_ARGS_T_DIRMASK 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcfs_args_t.dsttime" >&5 +$as_echo_n "checking for pcfs_args_t.dsttime... " >&6; } +if ${ac_cv_member_pcfs_args_t_dsttime+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (&(ac_aggr.dsttime)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_dsttime=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (sizeof ac_aggr.dsttime) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_dsttime=yes +else + ac_cv_member_pcfs_args_t_dsttime=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_pcfs_args_t_dsttime" >&5 +$as_echo "$ac_cv_member_pcfs_args_t_dsttime" >&6; } +if test $ac_cv_member_pcfs_args_t_dsttime = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_PCFS_ARGS_T_DSTTIME 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcfs_args_t.fspec" >&5 +$as_echo_n "checking for pcfs_args_t.fspec... " >&6; } +if ${ac_cv_member_pcfs_args_t_fspec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (&(ac_aggr.fspec)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_fspec=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (sizeof ac_aggr.fspec) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_fspec=yes +else + ac_cv_member_pcfs_args_t_fspec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_pcfs_args_t_fspec" >&5 +$as_echo "$ac_cv_member_pcfs_args_t_fspec" >&6; } +if test $ac_cv_member_pcfs_args_t_fspec = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_PCFS_ARGS_T_FSPEC 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcfs_args_t.gid" >&5 +$as_echo_n "checking for pcfs_args_t.gid... " >&6; } +if ${ac_cv_member_pcfs_args_t_gid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (&(ac_aggr.gid)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_gid=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (sizeof ac_aggr.gid) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_gid=yes +else + ac_cv_member_pcfs_args_t_gid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_pcfs_args_t_gid" >&5 +$as_echo "$ac_cv_member_pcfs_args_t_gid" >&6; } +if test $ac_cv_member_pcfs_args_t_gid = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_PCFS_ARGS_T_GID 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcfs_args_t.mask" >&5 +$as_echo_n "checking for pcfs_args_t.mask... " >&6; } +if ${ac_cv_member_pcfs_args_t_mask+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (&(ac_aggr.mask)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_mask=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (sizeof ac_aggr.mask) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_mask=yes +else + ac_cv_member_pcfs_args_t_mask=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_pcfs_args_t_mask" >&5 +$as_echo "$ac_cv_member_pcfs_args_t_mask" >&6; } +if test $ac_cv_member_pcfs_args_t_mask = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_PCFS_ARGS_T_MASK 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcfs_args_t.secondswest" >&5 +$as_echo_n "checking for pcfs_args_t.secondswest... " >&6; } +if ${ac_cv_member_pcfs_args_t_secondswest+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (&(ac_aggr.secondswest)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_secondswest=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (sizeof ac_aggr.secondswest) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_secondswest=yes +else + ac_cv_member_pcfs_args_t_secondswest=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_pcfs_args_t_secondswest" >&5 +$as_echo "$ac_cv_member_pcfs_args_t_secondswest" >&6; } +if test $ac_cv_member_pcfs_args_t_secondswest = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_PCFS_ARGS_T_SECONDSWEST 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcfs_args_t.uid" >&5 +$as_echo_n "checking for pcfs_args_t.uid... " >&6; } +if ${ac_cv_member_pcfs_args_t_uid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (&(ac_aggr.uid)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_uid=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static pcfs_args_t ac_aggr; +if (sizeof ac_aggr.uid) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_pcfs_args_t_uid=yes +else + ac_cv_member_pcfs_args_t_uid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_pcfs_args_t_uid" >&5 +$as_echo "$ac_cv_member_pcfs_args_t_uid" >&6; } +if test $ac_cv_member_pcfs_args_t_uid = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_PCFS_ARGS_T_UID 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ufs_args_t.flags" >&5 +$as_echo_n "checking for ufs_args_t.flags... " >&6; } +if ${ac_cv_member_ufs_args_t_flags+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static ufs_args_t ac_aggr; +if (&(ac_aggr.flags)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_ufs_args_t_flags=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static ufs_args_t ac_aggr; +if (sizeof ac_aggr.flags) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_ufs_args_t_flags=yes +else + ac_cv_member_ufs_args_t_flags=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_ufs_args_t_flags" >&5 +$as_echo "$ac_cv_member_ufs_args_t_flags" >&6; } +if test $ac_cv_member_ufs_args_t_flags = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UFS_ARGS_T_FLAGS 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ufs_args_t.fspec" >&5 +$as_echo_n "checking for ufs_args_t.fspec... " >&6; } +if ${ac_cv_member_ufs_args_t_fspec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static ufs_args_t ac_aggr; +if (&(ac_aggr.fspec)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_ufs_args_t_fspec=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static ufs_args_t ac_aggr; +if (sizeof ac_aggr.fspec) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_ufs_args_t_fspec=yes +else + ac_cv_member_ufs_args_t_fspec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_ufs_args_t_fspec" >&5 +$as_echo "$ac_cv_member_ufs_args_t_fspec" >&6; } +if test $ac_cv_member_ufs_args_t_fspec = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UFS_ARGS_T_FSPEC 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ufs_args_t.ufs_flags" >&5 +$as_echo_n "checking for ufs_args_t.ufs_flags... " >&6; } +if ${ac_cv_member_ufs_args_t_ufs_flags+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static ufs_args_t ac_aggr; +if (&(ac_aggr.ufs_flags)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_ufs_args_t_ufs_flags=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static ufs_args_t ac_aggr; +if (sizeof ac_aggr.ufs_flags) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_ufs_args_t_ufs_flags=yes +else + ac_cv_member_ufs_args_t_ufs_flags=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_ufs_args_t_ufs_flags" >&5 +$as_echo "$ac_cv_member_ufs_args_t_ufs_flags" >&6; } +if test $ac_cv_member_ufs_args_t_ufs_flags = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UFS_ARGS_T_UFS_FLAGS 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ufs_args_t.ufs_pgthresh" >&5 +$as_echo_n "checking for ufs_args_t.ufs_pgthresh... " >&6; } +if ${ac_cv_member_ufs_args_t_ufs_pgthresh+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static ufs_args_t ac_aggr; +if (&(ac_aggr.ufs_pgthresh)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_ufs_args_t_ufs_pgthresh=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static ufs_args_t ac_aggr; +if (sizeof ac_aggr.ufs_pgthresh) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_ufs_args_t_ufs_pgthresh=yes +else + ac_cv_member_ufs_args_t_ufs_pgthresh=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_ufs_args_t_ufs_pgthresh" >&5 +$as_echo "$ac_cv_member_ufs_args_t_ufs_pgthresh" >&6; } +if test $ac_cv_member_ufs_args_t_ufs_pgthresh = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_UFS_ARGS_T_UFS_PGTHRESH 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for efs_args_t.flags" >&5 +$as_echo_n "checking for efs_args_t.flags... " >&6; } +if ${ac_cv_member_efs_args_t_flags+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static efs_args_t ac_aggr; +if (&(ac_aggr.flags)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_efs_args_t_flags=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static efs_args_t ac_aggr; +if (sizeof ac_aggr.flags) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_efs_args_t_flags=yes +else + ac_cv_member_efs_args_t_flags=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_efs_args_t_flags" >&5 +$as_echo "$ac_cv_member_efs_args_t_flags" >&6; } +if test $ac_cv_member_efs_args_t_flags = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_EFS_ARGS_T_FLAGS 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for efs_args_t.fspec" >&5 +$as_echo_n "checking for efs_args_t.fspec... " >&6; } +if ${ac_cv_member_efs_args_t_fspec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static efs_args_t ac_aggr; +if (&(ac_aggr.fspec)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_efs_args_t_fspec=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static efs_args_t ac_aggr; +if (sizeof ac_aggr.fspec) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_efs_args_t_fspec=yes +else + ac_cv_member_efs_args_t_fspec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_efs_args_t_fspec" >&5 +$as_echo "$ac_cv_member_efs_args_t_fspec" >&6; } +if test $ac_cv_member_efs_args_t_fspec = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_EFS_ARGS_T_FSPEC 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for efs_args_t.version" >&5 +$as_echo_n "checking for efs_args_t.version... " >&6; } +if ${ac_cv_member_efs_args_t_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static efs_args_t ac_aggr; +if (&(ac_aggr.version)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_efs_args_t_version=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static efs_args_t ac_aggr; +if (sizeof ac_aggr.version) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_efs_args_t_version=yes +else + ac_cv_member_efs_args_t_version=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_efs_args_t_version" >&5 +$as_echo "$ac_cv_member_efs_args_t_version" >&6; } +if test $ac_cv_member_efs_args_t_version = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_EFS_ARGS_T_VERSION 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xfs_args_t.flags" >&5 +$as_echo_n "checking for xfs_args_t.flags... " >&6; } +if ${ac_cv_member_xfs_args_t_flags+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static xfs_args_t ac_aggr; +if (&(ac_aggr.flags)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_xfs_args_t_flags=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static xfs_args_t ac_aggr; +if (sizeof ac_aggr.flags) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_xfs_args_t_flags=yes +else + ac_cv_member_xfs_args_t_flags=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_xfs_args_t_flags" >&5 +$as_echo "$ac_cv_member_xfs_args_t_flags" >&6; } +if test $ac_cv_member_xfs_args_t_flags = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_XFS_ARGS_T_FLAGS 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xfs_args_t.fspec" >&5 +$as_echo_n "checking for xfs_args_t.fspec... " >&6; } +if ${ac_cv_member_xfs_args_t_fspec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static xfs_args_t ac_aggr; +if (&(ac_aggr.fspec)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_xfs_args_t_fspec=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static xfs_args_t ac_aggr; +if (sizeof ac_aggr.fspec) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_xfs_args_t_fspec=yes +else + ac_cv_member_xfs_args_t_fspec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_xfs_args_t_fspec" >&5 +$as_echo "$ac_cv_member_xfs_args_t_fspec" >&6; } +if test $ac_cv_member_xfs_args_t_fspec = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_XFS_ARGS_T_FSPEC 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tmpfs_args_t.ta_version" >&5 +$as_echo_n "checking for tmpfs_args_t.ta_version... " >&6; } +if ${ac_cv_member_tmpfs_args_t_ta_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (&(ac_aggr.ta_version)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_version=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (sizeof ac_aggr.ta_version) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_version=yes +else + ac_cv_member_tmpfs_args_t_ta_version=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_tmpfs_args_t_ta_version" >&5 +$as_echo "$ac_cv_member_tmpfs_args_t_ta_version" >&6; } +if test $ac_cv_member_tmpfs_args_t_ta_version = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_TMPFS_ARGS_T_TA_VERSION 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tmpfs_args_t.ta_nodes_max" >&5 +$as_echo_n "checking for tmpfs_args_t.ta_nodes_max... " >&6; } +if ${ac_cv_member_tmpfs_args_t_ta_nodes_max+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (&(ac_aggr.ta_nodes_max)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_nodes_max=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (sizeof ac_aggr.ta_nodes_max) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_nodes_max=yes +else + ac_cv_member_tmpfs_args_t_ta_nodes_max=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_tmpfs_args_t_ta_nodes_max" >&5 +$as_echo "$ac_cv_member_tmpfs_args_t_ta_nodes_max" >&6; } +if test $ac_cv_member_tmpfs_args_t_ta_nodes_max = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_TMPFS_ARGS_T_TA_NODES_MAX 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tmpfs_args_t.ta_size_max" >&5 +$as_echo_n "checking for tmpfs_args_t.ta_size_max... " >&6; } +if ${ac_cv_member_tmpfs_args_t_ta_size_max+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (&(ac_aggr.ta_size_max)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_size_max=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (sizeof ac_aggr.ta_size_max) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_size_max=yes +else + ac_cv_member_tmpfs_args_t_ta_size_max=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_tmpfs_args_t_ta_size_max" >&5 +$as_echo "$ac_cv_member_tmpfs_args_t_ta_size_max" >&6; } +if test $ac_cv_member_tmpfs_args_t_ta_size_max = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_TMPFS_ARGS_T_TA_SIZE_MAX 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tmpfs_args_t.ta_root_uid" >&5 +$as_echo_n "checking for tmpfs_args_t.ta_root_uid... " >&6; } +if ${ac_cv_member_tmpfs_args_t_ta_root_uid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (&(ac_aggr.ta_root_uid)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_root_uid=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (sizeof ac_aggr.ta_root_uid) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_root_uid=yes +else + ac_cv_member_tmpfs_args_t_ta_root_uid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_tmpfs_args_t_ta_root_uid" >&5 +$as_echo "$ac_cv_member_tmpfs_args_t_ta_root_uid" >&6; } +if test $ac_cv_member_tmpfs_args_t_ta_root_uid = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_TMPFS_ARGS_T_TA_ROOT_UID 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tmpfs_args_t.ta_root_gid" >&5 +$as_echo_n "checking for tmpfs_args_t.ta_root_gid... " >&6; } +if ${ac_cv_member_tmpfs_args_t_ta_root_gid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (&(ac_aggr.ta_root_gid)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_root_gid=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (sizeof ac_aggr.ta_root_gid) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_root_gid=yes +else + ac_cv_member_tmpfs_args_t_ta_root_gid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_tmpfs_args_t_ta_root_gid" >&5 +$as_echo "$ac_cv_member_tmpfs_args_t_ta_root_gid" >&6; } +if test $ac_cv_member_tmpfs_args_t_ta_root_gid = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_TMPFS_ARGS_T_TA_ROOT_GID 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tmpfs_args_t.ta_root_mode" >&5 +$as_echo_n "checking for tmpfs_args_t.ta_root_mode... " >&6; } +if ${ac_cv_member_tmpfs_args_t_ta_root_mode+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (&(ac_aggr.ta_root_mode)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_root_mode=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static tmpfs_args_t ac_aggr; +if (sizeof ac_aggr.ta_root_mode) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_tmpfs_args_t_ta_root_mode=yes +else + ac_cv_member_tmpfs_args_t_ta_root_mode=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_tmpfs_args_t_ta_root_mode" >&5 +$as_echo "$ac_cv_member_tmpfs_args_t_ta_root_mode" >&6; } +if test $ac_cv_member_tmpfs_args_t_ta_root_mode = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_TMPFS_ARGS_T_TA_ROOT_MODE 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct fhstatus.fhs_fh" >&5 +$as_echo_n "checking for struct fhstatus.fhs_fh... " >&6; } +if ${ac_cv_member_struct_fhstatus_fhs_fh+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct fhstatus ac_aggr; +if (&(ac_aggr.fhs_fh)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_fhstatus_fhs_fh=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct fhstatus ac_aggr; +if (sizeof ac_aggr.fhs_fh) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_fhstatus_fhs_fh=yes +else + ac_cv_member_struct_fhstatus_fhs_fh=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_struct_fhstatus_fhs_fh" >&5 +$as_echo "$ac_cv_member_struct_fhstatus_fhs_fh" >&6; } +if test $ac_cv_member_struct_fhstatus_fhs_fh = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_FHSTATUS_FHS_FH 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct statfs.f_fstypename" >&5 +$as_echo_n "checking for struct statfs.f_fstypename... " >&6; } +if ${ac_cv_member_struct_statfs_f_fstypename+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct statfs ac_aggr; +if (&(ac_aggr.f_fstypename)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_statfs_f_fstypename=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct statfs ac_aggr; +if (sizeof ac_aggr.f_fstypename) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_statfs_f_fstypename=yes +else + ac_cv_member_struct_statfs_f_fstypename=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_struct_statfs_f_fstypename" >&5 +$as_echo "$ac_cv_member_struct_statfs_f_fstypename" >&6; } +if test $ac_cv_member_struct_statfs_f_fstypename = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.acdirmin" >&5 +$as_echo_n "checking for nfs_args_t.acdirmin... " >&6; } +if ${ac_cv_member_nfs_args_t_acdirmin+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.acdirmin)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_acdirmin=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.acdirmin) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_acdirmin=yes +else + ac_cv_member_nfs_args_t_acdirmin=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_acdirmin" >&5 +$as_echo "$ac_cv_member_nfs_args_t_acdirmin" >&6; } +if test $ac_cv_member_nfs_args_t_acdirmin = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_ACDIRMIN 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.acdirmax" >&5 +$as_echo_n "checking for nfs_args_t.acdirmax... " >&6; } +if ${ac_cv_member_nfs_args_t_acdirmax+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.acdirmax)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_acdirmax=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.acdirmax) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_acdirmax=yes +else + ac_cv_member_nfs_args_t_acdirmax=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_acdirmax" >&5 +$as_echo "$ac_cv_member_nfs_args_t_acdirmax" >&6; } +if test $ac_cv_member_nfs_args_t_acdirmax = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_ACDIRMAX 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.acregmin" >&5 +$as_echo_n "checking for nfs_args_t.acregmin... " >&6; } +if ${ac_cv_member_nfs_args_t_acregmin+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.acregmin)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_acregmin=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.acregmin) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_acregmin=yes +else + ac_cv_member_nfs_args_t_acregmin=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_acregmin" >&5 +$as_echo "$ac_cv_member_nfs_args_t_acregmin" >&6; } +if test $ac_cv_member_nfs_args_t_acregmin = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_ACREGMIN 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.acregmax" >&5 +$as_echo_n "checking for nfs_args_t.acregmax... " >&6; } +if ${ac_cv_member_nfs_args_t_acregmax+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.acregmax)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_acregmax=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.acregmax) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_acregmax=yes +else + ac_cv_member_nfs_args_t_acregmax=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_acregmax" >&5 +$as_echo "$ac_cv_member_nfs_args_t_acregmax" >&6; } +if test $ac_cv_member_nfs_args_t_acregmax = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_ACREGMAX 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.addrlen" >&5 +$as_echo_n "checking for nfs_args_t.addrlen... " >&6; } +if ${ac_cv_member_nfs_args_t_addrlen+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.addrlen)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_addrlen=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.addrlen) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_addrlen=yes +else + ac_cv_member_nfs_args_t_addrlen=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_addrlen" >&5 +$as_echo "$ac_cv_member_nfs_args_t_addrlen" >&6; } +if test $ac_cv_member_nfs_args_t_addrlen = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_ADDRLEN 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.bsize" >&5 +$as_echo_n "checking for nfs_args_t.bsize... " >&6; } +if ${ac_cv_member_nfs_args_t_bsize+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.bsize)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_bsize=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.bsize) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_bsize=yes +else + ac_cv_member_nfs_args_t_bsize=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_bsize" >&5 +$as_echo "$ac_cv_member_nfs_args_t_bsize" >&6; } +if test $ac_cv_member_nfs_args_t_bsize = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_BSIZE 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.fh_len" >&5 +$as_echo_n "checking for nfs_args_t.fh_len... " >&6; } +if ${ac_cv_member_nfs_args_t_fh_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.fh_len)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_fh_len=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.fh_len) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_fh_len=yes +else + ac_cv_member_nfs_args_t_fh_len=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_fh_len" >&5 +$as_echo "$ac_cv_member_nfs_args_t_fh_len" >&6; } +if test $ac_cv_member_nfs_args_t_fh_len = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_FH_LEN 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.fhsize" >&5 +$as_echo_n "checking for nfs_args_t.fhsize... " >&6; } +if ${ac_cv_member_nfs_args_t_fhsize+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.fhsize)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_fhsize=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.fhsize) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_fhsize=yes +else + ac_cv_member_nfs_args_t_fhsize=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_fhsize" >&5 +$as_echo "$ac_cv_member_nfs_args_t_fhsize" >&6; } +if test $ac_cv_member_nfs_args_t_fhsize = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_FHSIZE 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.gfs_flags" >&5 +$as_echo_n "checking for nfs_args_t.gfs_flags... " >&6; } +if ${ac_cv_member_nfs_args_t_gfs_flags+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.gfs_flags)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_gfs_flags=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.gfs_flags) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_gfs_flags=yes +else + ac_cv_member_nfs_args_t_gfs_flags=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_gfs_flags" >&5 +$as_echo "$ac_cv_member_nfs_args_t_gfs_flags" >&6; } +if test $ac_cv_member_nfs_args_t_gfs_flags = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_GFS_FLAGS 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.namlen" >&5 +$as_echo_n "checking for nfs_args_t.namlen... " >&6; } +if ${ac_cv_member_nfs_args_t_namlen+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.namlen)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_namlen=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.namlen) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_namlen=yes +else + ac_cv_member_nfs_args_t_namlen=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_namlen" >&5 +$as_echo "$ac_cv_member_nfs_args_t_namlen" >&6; } +if test $ac_cv_member_nfs_args_t_namlen = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_NAMLEN 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.optstr" >&5 +$as_echo_n "checking for nfs_args_t.optstr... " >&6; } +if ${ac_cv_member_nfs_args_t_optstr+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.optstr)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_optstr=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.optstr) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_optstr=yes +else + ac_cv_member_nfs_args_t_optstr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_optstr" >&5 +$as_echo "$ac_cv_member_nfs_args_t_optstr" >&6; } +if test $ac_cv_member_nfs_args_t_optstr = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_OPTSTR 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.pathconf" >&5 +$as_echo_n "checking for nfs_args_t.pathconf... " >&6; } +if ${ac_cv_member_nfs_args_t_pathconf+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.pathconf)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_pathconf=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.pathconf) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_pathconf=yes +else + ac_cv_member_nfs_args_t_pathconf=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_pathconf" >&5 +$as_echo "$ac_cv_member_nfs_args_t_pathconf" >&6; } +if test $ac_cv_member_nfs_args_t_pathconf = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_PATHCONF 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.proto" >&5 +$as_echo_n "checking for nfs_args_t.proto... " >&6; } +if ${ac_cv_member_nfs_args_t_proto+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.proto)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_proto=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.proto) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_proto=yes +else + ac_cv_member_nfs_args_t_proto=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_proto" >&5 +$as_echo "$ac_cv_member_nfs_args_t_proto" >&6; } +if test $ac_cv_member_nfs_args_t_proto = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_PROTO 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.sotype" >&5 +$as_echo_n "checking for nfs_args_t.sotype... " >&6; } +if ${ac_cv_member_nfs_args_t_sotype+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.sotype)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_sotype=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.sotype) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_sotype=yes +else + ac_cv_member_nfs_args_t_sotype=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_sotype" >&5 +$as_echo "$ac_cv_member_nfs_args_t_sotype" >&6; } +if test $ac_cv_member_nfs_args_t_sotype = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_SOTYPE 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.version" >&5 +$as_echo_n "checking for nfs_args_t.version... " >&6; } +if ${ac_cv_member_nfs_args_t_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.version)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_version=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.version) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_version=yes +else + ac_cv_member_nfs_args_t_version=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_version" >&5 +$as_echo "$ac_cv_member_nfs_args_t_version" >&6; } +if test $ac_cv_member_nfs_args_t_version = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_VERSION 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.pseudoflavor" >&5 +$as_echo_n "checking for nfs_args_t.pseudoflavor... " >&6; } +if ${ac_cv_member_nfs_args_t_pseudoflavor+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.pseudoflavor)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_pseudoflavor=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.pseudoflavor) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_pseudoflavor=yes +else + ac_cv_member_nfs_args_t_pseudoflavor=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_pseudoflavor" >&5 +$as_echo "$ac_cv_member_nfs_args_t_pseudoflavor" >&6; } +if test $ac_cv_member_nfs_args_t_pseudoflavor = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_PSEUDOFLAVOR 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nfs_args_t.context" >&5 +$as_echo_n "checking for nfs_args_t.context... " >&6; } +if ${ac_cv_member_nfs_args_t_context+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (&(ac_aggr.context)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_context=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static nfs_args_t ac_aggr; +if (sizeof ac_aggr.context) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_nfs_args_t_context=yes +else + ac_cv_member_nfs_args_t_context=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_nfs_args_t_context" >&5 +$as_echo "$ac_cv_member_nfs_args_t_context" >&6; } +if test $ac_cv_member_nfs_args_t_context = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_NFS_ARGS_T_CONTEXT 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ifreq.ifr_addr" >&5 +$as_echo_n "checking for struct ifreq.ifr_addr... " >&6; } +if ${ac_cv_member_struct_ifreq_ifr_addr+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct ifreq ac_aggr; +if (&(ac_aggr.ifr_addr)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_ifreq_ifr_addr=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct ifreq ac_aggr; +if (sizeof ac_aggr.ifr_addr) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_ifreq_ifr_addr=yes +else + ac_cv_member_struct_ifreq_ifr_addr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5 +$as_echo "$ac_cv_member_struct_ifreq_ifr_addr" >&6; } +if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_ADDR 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ifaddrs.ifa_next" >&5 +$as_echo_n "checking for struct ifaddrs.ifa_next... " >&6; } +if ${ac_cv_member_struct_ifaddrs_ifa_next+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct ifaddrs ac_aggr; +if (&(ac_aggr.ifa_next)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_ifaddrs_ifa_next=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct ifaddrs ac_aggr; +if (sizeof ac_aggr.ifa_next) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_ifaddrs_ifa_next=yes +else + ac_cv_member_struct_ifaddrs_ifa_next=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_struct_ifaddrs_ifa_next" >&5 +$as_echo "$ac_cv_member_struct_ifaddrs_ifa_next" >&6; } +if test $ac_cv_member_struct_ifaddrs_ifa_next = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFADDRS_IFA_NEXT 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr.sa_len" >&5 +$as_echo_n "checking for struct sockaddr.sa_len... " >&6; } +if ${ac_cv_member_struct_sockaddr_sa_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct sockaddr ac_aggr; +if (&(ac_aggr.sa_len)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_sockaddr_sa_len=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct sockaddr ac_aggr; +if (sizeof ac_aggr.sa_len) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_sockaddr_sa_len=yes +else + ac_cv_member_struct_sockaddr_sa_len=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_struct_sockaddr_sa_len" >&5 +$as_echo "$ac_cv_member_struct_sockaddr_sa_len" >&6; } +if test $ac_cv_member_struct_sockaddr_sa_len = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct umntrequest.devid" >&5 +$as_echo_n "checking for struct umntrequest.devid... " >&6; } +if ${ac_cv_member_struct_umntrequest_devid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct umntrequest ac_aggr; +if (&(ac_aggr.devid)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_umntrequest_devid=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static struct umntrequest ac_aggr; +if (sizeof ac_aggr.devid) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_struct_umntrequest_devid=yes +else + ac_cv_member_struct_umntrequest_devid=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_struct_umntrequest_devid" >&5 +$as_echo "$ac_cv_member_struct_umntrequest_devid" >&6; } +if test $ac_cv_member_struct_umntrequest_devid = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_UMNTREQUEST_DEVID 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for autofs_args_t.addr" >&5 +$as_echo_n "checking for autofs_args_t.addr... " >&6; } +if ${ac_cv_member_autofs_args_t_addr+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static autofs_args_t ac_aggr; +if (&(ac_aggr.addr)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_autofs_args_t_addr=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static autofs_args_t ac_aggr; +if (sizeof ac_aggr.addr) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_autofs_args_t_addr=yes +else + ac_cv_member_autofs_args_t_addr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_autofs_args_t_addr" >&5 +$as_echo "$ac_cv_member_autofs_args_t_addr" >&6; } +if test $ac_cv_member_autofs_args_t_addr = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_AUTOFS_ARGS_T_ADDR 1 +_ACEOF + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mounta.optptr" >&5 +$as_echo_n "checking for mounta.optptr... " >&6; } +if ${ac_cv_member_mounta_optptr+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static mounta ac_aggr; +if (&(ac_aggr.optptr)) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_mounta_optptr=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + + + + + + +int +main () +{ +static mounta ac_aggr; +if (sizeof ac_aggr.optptr) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_member_mounta_optptr=yes +else + ac_cv_member_mounta_optptr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_member_mounta_optptr" >&5 +$as_echo "$ac_cv_member_mounta_optptr" >&6; } +if test $ac_cv_member_mounta_optptr = yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_MOUNTA_OPTPTR 1 +_ACEOF + + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** MAP TYPES ***" >&5 +$as_echo "$as_me: *** MAP TYPES ***" >&6;} + +# find what name to give to the map +if test -n "" +then + ac_map_name= +else + ac_map_name=file +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in fgets +do : + ac_fn_c_check_func "$LINENO" "fgets" "ac_cv_func_fgets" +if test "x$ac_cv_func_fgets" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FGETS 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + + +# find what name to give to the map +if test -n "" +then + ac_map_name= +else + ac_map_name=sun +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in fgets +do : + ac_fn_c_check_func "$LINENO" "fgets" "ac_cv_func_fgets" +if test "x$ac_cv_func_fgets" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FGETS 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + + +# find what name to give to the map +if test -n "" +then + ac_map_name= +else + ac_map_name=exec +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in waitpid +do : + ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid" +if test "x$ac_cv_func_waitpid" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WAITPID 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + +if test "$with_hesiod" = "yes" && test "$ac_cv_header_hesiod_h" = "yes" +then + +# find what name to give to the map +if test -n "" +then + ac_map_name= +else + ac_map_name=hesiod +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in hes_init hesiod_init +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + +fi +if test "$with_ldap" = "yes" && test "$ac_cv_header_ldap_h" = "yes" +then + +# find what name to give to the map +if test -n "" +then + ac_map_name= +else + ac_map_name=ldap +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in ldap_open +do : + ac_fn_c_check_func "$LINENO" "ldap_open" "ac_cv_func_ldap_open" +if test "x$ac_cv_func_ldap_open" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LDAP_OPEN 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + +fi +if test "$with_ndbm" = "yes" -a "$ac_cv_lib_new_dbm" != "" +then + +# find what name to give to the map +if test -n "ndbm" +then + ac_map_name=ndbm +else + ac_map_name=$ac_cv_lib_new_dbm +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in dbm_open +do : + ac_fn_c_check_func "$LINENO" "dbm_open" "ac_cv_func_dbm_open" +if test "x$ac_cv_func_dbm_open" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DBM_OPEN 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + +fi + +# find what name to give to the map +if test -n "" +then + ac_map_name= +else + ac_map_name=nis +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in yp_get_default_domain yp_all +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + + +# find what name to give to the map +if test -n "nisplus" +then + ac_map_name=nisplus +else + ac_map_name=nisplus +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in nis_domain_of +do : + ac_fn_c_check_func "$LINENO" "nis_domain_of" "ac_cv_func_nis_domain_of" +if test "x$ac_cv_func_nis_domain_of" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NIS_DOMAIN_OF 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + + +# find what name to give to the map +if test -n "" +then + ac_map_name= +else + ac_map_name=passwd +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in getpwnam +do : + ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam" +if test "x$ac_cv_func_getpwnam" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPWNAM 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + + +# find what name to give to the map +if test -n "" +then + ac_map_name= +else + ac_map_name=union +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_map_$ac_map_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +for ac_func in opendir +do : + ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir" +if test "x$ac_cv_func_opendir" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENDIR 1 +_ACEOF + + eval "ac_cv_map_$ac_map_name=yes" + break + +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_map_name maps" >&5 +$as_echo_n "checking for $ac_map_name maps... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** FILESYSTEM TYPES ***" >&5 +$as_echo "$as_me: *** FILESYSTEM TYPES ***" >&6;} + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: autofs)" +else + ac_fs_name=autofs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in autofs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "cdfs" +then + ac_fs_name=cdfs + ac_fs_as_name=" (from: cdfs hsfs cd9660 iso9660 isofs cdrom)" +else + ac_fs_name=cdfs hsfs cd9660 iso9660 isofs cdrom + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in cdfs hsfs cd9660 iso9660 isofs cdrom +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: udf)" +else + ac_fs_name=udf + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in udf +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: cache)" +else + ac_fs_name=cache + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in cache +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "lofs" +then + ac_fs_name=lofs + ac_fs_as_name=" (from: lofs lo)" +else + ac_fs_name=lofs lo + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in lofs lo +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: mfs)" +else + ac_fs_name=mfs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in mfs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: nfs)" +else + ac_fs_name=nfs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in nfs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "pcfs" +then + ac_fs_name=pcfs + ac_fs_as_name=" (from: vfat pcfs pc msdos msdosfs fat)" +else + ac_fs_name=vfat pcfs pc msdos msdosfs fat + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in vfat pcfs pc msdos msdosfs fat +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: tfs)" +else + ac_fs_name=tfs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in tfs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: tmpfs)" +else + ac_fs_name=tmpfs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in tmpfs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "ufs" +then + ac_fs_name=ufs + ac_fs_as_name=" (from: ext4 ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix)" +else + ac_fs_name=ext4 ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in ext4 ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + +case "${host_os_name}" in + openbsd* ) ;; + * ) +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: xfs)" +else + ac_fs_name=xfs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in xfs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + ;; +esac + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= + ac_fs_as_name=" (from: efs)" +else + ac_fs_name=efs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in efs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "nullfs" +then + ac_fs_name=nullfs + ac_fs_as_name=" (from: null nullfs)" +else + ac_fs_name=null nullfs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in null nullfs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "unionfs" +then + ac_fs_name=unionfs + ac_fs_as_name=" (from: union unionfs)" +else + ac_fs_name=union unionfs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in union unionfs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "umapfs" +then + ac_fs_name=umapfs + ac_fs_as_name=" (from: umap umapfs)" +else + ac_fs_name=umap umapfs + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in umap umapfs +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_fs_$ac_fs_name=yes" +else + eval "ac_cv_fs_$ac_fs_name=no" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_fs_$ac_fs_name=yes" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name$ac_fs_as_name mntent definition" >&5 +$as_echo_n "checking for $ac_fs_name$ac_fs_as_name mntent definition... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=cdfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo cdfs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_header_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_fs_header_$ac_fs_name=no" +# and look to see if it was found +for ac_header in hsfs/hsfs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "hsfs/hsfs.h" "ac_cv_header_hsfs_hsfs_h" "$ac_includes_default" +if test "x$ac_cv_header_hsfs_hsfs_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_HSFS_HSFS_H 1 +_ACEOF + eval "ac_cv_fs_header_$ac_fs_name=yes" + break + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_fs_headers_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=udf +fi +# store variable name of fs +ac_upcase_fs_name=`echo udf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_header_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_fs_header_$ac_fs_name=no" +# and look to see if it was found +for ac_header in fs/udf/udf_mount.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "fs/udf/udf_mount.h" "ac_cv_header_fs_udf_udf_mount_h" "$ac_includes_default" +if test "x$ac_cv_header_fs_udf_udf_mount_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FS_UDF_UDF_MOUNT_H 1 +_ACEOF + eval "ac_cv_fs_header_$ac_fs_name=yes" + break + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_fs_headers_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=tmpfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo tmpfs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_header_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_fs_header_$ac_fs_name=no" +# and look to see if it was found +for ac_header in tmpfs/tmp.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "tmpfs/tmp.h" "ac_cv_header_tmpfs_tmp_h" "$ac_includes_default" +if test "x$ac_cv_header_tmpfs_tmp_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_TMPFS_TMP_H 1 +_ACEOF + eval "ac_cv_fs_header_$ac_fs_name=yes" + break + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_fs_headers_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=tmpfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo tmpfs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_header_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_fs_header_$ac_fs_name=no" +# and look to see if it was found +for ac_header in fs/tmpfs/tmpfs_args.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "fs/tmpfs/tmpfs_args.h" "ac_cv_header_fs_tmpfs_tmpfs_args_h" "$ac_includes_default" +if test "x$ac_cv_header_fs_tmpfs_tmpfs_args_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FS_TMPFS_TMPFS_ARGS_H 1 +_ACEOF + eval "ac_cv_fs_header_$ac_fs_name=yes" + break + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_fs_headers_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=efs +fi +# store variable name of fs +ac_upcase_fs_name=`echo efs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_header_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_fs_header_$ac_fs_name=no" +# and look to see if it was found +for ac_header in fs/efs/efs_mount.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "fs/efs/efs_mount.h" "ac_cv_header_fs_efs_efs_mount_h" "$ac_includes_default" +if test "x$ac_cv_header_fs_efs_efs_mount_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FS_EFS_EFS_MOUNT_H 1 +_ACEOF + eval "ac_cv_fs_header_$ac_fs_name=yes" + break + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_fs_headers_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=autofs +fi +# store variable name of fs +ac_upcase_fs_name=`echo autofs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_header_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_fs_header_$ac_fs_name=no" +# and look to see if it was found +for ac_header in sys/fs/autofs.h linux/auto_fs.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + eval "ac_cv_fs_header_$ac_fs_name=yes" + break + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_fs_headers_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=cachefs +fi +# store variable name of fs +ac_upcase_fs_name=`echo cachefs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_fs_header_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# define to "no" by default +eval "ac_cv_fs_header_$ac_fs_name=no" +# and look to see if it was found +for ac_header in sys/fs/cachefs_fs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/fs/cachefs_fs.h" "ac_cv_header_sys_fs_cachefs_fs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_fs_cachefs_fs_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_FS_CACHEFS_FS_H 1 +_ACEOF + eval "ac_cv_fs_header_$ac_fs_name=yes" + break + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_fs_name filesystem in " >&5 +$as_echo_n "checking for $ac_fs_name filesystem in ... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_fs_headers_safe 1 +_ACEOF + +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** AUTOMOUNTER FILESYSTEM TYPES ***" >&5 +$as_echo "$as_me: *** AUTOMOUNTER FILESYSTEM TYPES ***" >&6;} + +# store variable name of fs +ac_upcase_am_fs_name=`echo auto | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_auto` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for automounter filesystem (auto)" >&5 +$as_echo_n "checking for automounter filesystem (auto)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_auto=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_auto=no" + if test "`eval echo '$''{ac_cv_fs_''}'`" = yes + then + eval "ac_cv_am_fs_auto=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_''}'`" = yes + then + eval "ac_cv_am_fs_auto=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for automounter filesystem (auto)" >&5 +$as_echo_n "checking for automounter filesystem (auto)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'auto'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo direct | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_direct` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for direct automount filesystem (direct)" >&5 +$as_echo_n "checking for direct automount filesystem (direct)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_direct=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_direct=no" + if test "`eval echo '$''{ac_cv_fs_''}'`" = yes + then + eval "ac_cv_am_fs_direct=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_''}'`" = yes + then + eval "ac_cv_am_fs_direct=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for direct automount filesystem (direct)" >&5 +$as_echo_n "checking for direct automount filesystem (direct)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'direct'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo toplvl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_toplvl` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level filesystem (toplvl)" >&5 +$as_echo_n "checking for top-level filesystem (toplvl)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_toplvl=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_toplvl=no" + if test "`eval echo '$''{ac_cv_fs_''}'`" = yes + then + eval "ac_cv_am_fs_toplvl=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_''}'`" = yes + then + eval "ac_cv_am_fs_toplvl=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level filesystem (toplvl)" >&5 +$as_echo_n "checking for top-level filesystem (toplvl)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'toplvl'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo error | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_error` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error filesystem (error)" >&5 +$as_echo_n "checking for error filesystem (error)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_error=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_error=no" + if test "`eval echo '$''{ac_cv_fs_''}'`" = yes + then + eval "ac_cv_am_fs_error=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_''}'`" = yes + then + eval "ac_cv_am_fs_error=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error filesystem (error)" >&5 +$as_echo_n "checking for error filesystem (error)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'error'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo program | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_program` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for program filesystem (program)" >&5 +$as_echo_n "checking for program filesystem (program)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_program=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_program=no" + if test "`eval echo '$''{ac_cv_fs_''}'`" = yes + then + eval "ac_cv_am_fs_program=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_''}'`" = yes + then + eval "ac_cv_am_fs_program=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for program filesystem (program)" >&5 +$as_echo_n "checking for program filesystem (program)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'program'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo link | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_link` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink filesystem (link)" >&5 +$as_echo_n "checking for symlink filesystem (link)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_link=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_link=no" + if test "`eval echo '$''{ac_cv_fs_''}'`" = yes + then + eval "ac_cv_am_fs_link=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_''}'`" = yes + then + eval "ac_cv_am_fs_link=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink filesystem (link)" >&5 +$as_echo_n "checking for symlink filesystem (link)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'link'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo linkx | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_linkx` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink with existence check filesystem (linkx)" >&5 +$as_echo_n "checking for symlink with existence check filesystem (linkx)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_linkx=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_linkx=no" + if test "`eval echo '$''{ac_cv_fs_''}'`" = yes + then + eval "ac_cv_am_fs_linkx=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_''}'`" = yes + then + eval "ac_cv_am_fs_linkx=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink with existence check filesystem (linkx)" >&5 +$as_echo_n "checking for symlink with existence check filesystem (linkx)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'linkx'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo host | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_host` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for host (nfs) filesystem (host)" >&5 +$as_echo_n "checking for host (nfs) filesystem (host)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_host=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "nfs" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_host=no" + if test "`eval echo '$''{ac_cv_fs_'nfs'}'`" = yes + then + eval "ac_cv_am_fs_host=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_'nfs'}'`" = yes + then + eval "ac_cv_am_fs_host=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for host (nfs) filesystem (host)" >&5 +$as_echo_n "checking for host (nfs) filesystem (host)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'host'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo nfsx | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_nfsx` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multi-nfs mount filesystem (nfsx)" >&5 +$as_echo_n "checking for multi-nfs mount filesystem (nfsx)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_nfsx=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "nfs" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_nfsx=no" + if test "`eval echo '$''{ac_cv_fs_'nfs'}'`" = yes + then + eval "ac_cv_am_fs_nfsx=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_'nfs'}'`" = yes + then + eval "ac_cv_am_fs_nfsx=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multi-nfs mount filesystem (nfsx)" >&5 +$as_echo_n "checking for multi-nfs mount filesystem (nfsx)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'nfsx'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo nfsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_nfsl` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NFS with local existence check filesystem (nfsl)" >&5 +$as_echo_n "checking for NFS with local existence check filesystem (nfsl)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_nfsl=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_nfsl=no" + if test "`eval echo '$''{ac_cv_fs_''}'`" = yes + then + eval "ac_cv_am_fs_nfsl=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_''}'`" = yes + then + eval "ac_cv_am_fs_nfsl=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NFS with local existence check filesystem (nfsl)" >&5 +$as_echo_n "checking for NFS with local existence check filesystem (nfsl)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'nfsl'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +# store variable name of fs +ac_upcase_am_fs_name=`echo union | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_am_fs_union` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for union filesystem (union)" >&5 +$as_echo_n "checking for union filesystem (union)... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# true by default +eval "ac_cv_am_fs_union=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_union=no" + if test "`eval echo '$''{ac_cv_fs_''}'`" = yes + then + eval "ac_cv_am_fs_union=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_''}'`" = yes + then + eval "ac_cv_am_fs_union=yes" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for union filesystem (union)" >&5 +$as_echo_n "checking for union filesystem (union)... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'union'}'`" = yes +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe 1 +_ACEOF + +fi + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** MOUNTING TYPES ***" >&5 +$as_echo "$as_me: *** MOUNTING TYPES ***" >&6;} + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=nfs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in nfs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=nfs3 +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in nfs3 +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=nfs4 +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in nfs4 +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=lustre +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in lustre +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "ufs" +then + ac_fs_name=ufs +else + ac_fs_name=ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=xfs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in xfs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=efs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in efs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "cdfs" +then + ac_fs_name=cdfs +else + ac_fs_name=cdfs hsfs cd9660 iso9660 isofs cdrom +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in cdfs hsfs cd9660 iso9660 isofs cdrom +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=udf +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in udf +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "pcfs" +then + ac_fs_name=pcfs +else + ac_fs_name=vfat pcfs pc msdos msdosfs fat +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in vfat pcfs pc msdos msdosfs fat +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=mfs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in mfs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "tmpfs" +then + ac_fs_name=tmpfs +else + ac_fs_name=tmpfs tmp +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in tmpfs tmp +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "lofs" +then + ac_fs_name=lofs +else + ac_fs_name=lofs lo +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in lofs lo +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=lfs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in lfs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=afs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in afs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=autofs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in autofs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=tfs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in tfs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=cachefs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in cachefs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=ignore +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in ignore +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "nullfs" +then + ac_fs_name=nullfs +else + ac_fs_name=null nullfs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in null nullfs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "unionfs" +then + ac_fs_name=unionfs +else + ac_fs_name=union unionfs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in union unionfs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "umapfs" +then + ac_fs_name=umapfs +else + ac_fs_name=umap umapfs +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mount_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in umap umapfs +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol" +else + eval "ac_cv_mount_type_$ac_fs_name=notfound" +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount(2) type/name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mount(2) type/name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** MOUNTING TABLE NAMES ***" >&5 +$as_echo "$as_me: *** MOUNTING TABLE NAMES ***" >&6;} + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=nfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in nfs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=nfs3 +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in nfs3 +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=nfs4 +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in nfs4 +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=lustre +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in lustre +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "ufs" +then + ac_fs_name=ufs +else + ac_fs_name=ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=xfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in xfs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=efs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in efs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "cdfs" +then + ac_fs_name=cdfs +else + ac_fs_name=cdfs hsfs cd9660 iso9660 isofs cdrom +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in cdfs hsfs cd9660 iso9660 isofs cdrom +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=udf +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in udf +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "pcfs" +then + ac_fs_name=pcfs +else + ac_fs_name=vfat pcfs pc msdos msdosfs fat +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in vfat pcfs pc msdos msdosfs fat +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=mfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in mfs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "tmpfs" +then + ac_fs_name=tmpfs +else + ac_fs_name=tmpfs tmp +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in tmpfs tmp +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "lofs" +then + ac_fs_name=lofs +else + ac_fs_name=lofs lo +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in lofs lo +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=lfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in lfs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=afs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in afs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=autofs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in autofs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=tfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in tfs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "" +then + ac_fs_name= +else + ac_fs_name=cachefs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in cachefs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "nullfs" +then + ac_fs_name=nullfs +else + ac_fs_name=null nullfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in null nullfs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "unionfs" +then + ac_fs_name=unionfs +else + ac_fs_name=union unionfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in union unionfs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +# find what name to give to the fs +if test -n "umapfs" +then + ac_fs_name=umapfs +else + ac_fs_name=umap umapfs +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_type_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in umap umapfs +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + + + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + +fi +rm -f conftest* + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + + + +main(argc) +int argc; +{ + + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mnttab name for $ac_fs_name filesystem" >&5 +$as_echo_n "checking for mnttab name for $ac_fs_name filesystem... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** MOUNT TABLE OPTION NAME STRINGS ***" >&5 +$as_echo "$as_me: *** MOUNT TABLE OPTION NAME STRINGS ***" >&6;} + +for ac_tmp_arg in \ + acdirmax \ + acdirmin \ + acregmax \ + acregmin \ + actimeo \ + compress \ + dev \ + fsid \ + grpid \ + ignore \ + intr \ + longname \ + maxgroups \ + multi \ + noac \ + noacl \ + noauto \ + noconn \ + nocto \ + nosub \ + nosuid \ + nowin95 \ + pgthresh \ + port \ + posix \ + private \ + proplist \ + proto \ + public \ + retrans \ + retry \ + ro \ + rsize \ + rw \ + shortname \ + soft \ + spongy \ + suid \ + symttl \ + timeo \ + vers \ + wsize \ + +do + +# what name to give to the fs +ac_fs_name=$ac_tmp_arg +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_OPT_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnttab_opt_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount table option $ac_fs_name" >&5 +$as_echo_n "checking for mount table option $ac_fs_name... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnttab_opt_$ac_fs_name=notfound" +# and look to see if it was found + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MNTOPT_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "\".*\"" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MNTOPT_$ac_upcase_fs_name +if (argc > 1) + printf("%s", MNTOPT_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MNTOPT_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +# set cache variable to value +if test "${value}" != notfound +then + eval "ac_cv_mnttab_opt_$ac_fs_name=\\\"$value\\\"" +else + eval "ac_cv_mnttab_opt_$ac_fs_name=$value" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount table option $ac_fs_name" >&5 +$as_echo_n "checking for mount table option $ac_fs_name... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnttab_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + +done + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** GENERIC MOUNT(2) OPTIONS ***" >&5 +$as_echo "$as_me: *** GENERIC MOUNT(2) OPTIONS ***" >&6;} + +for ac_tmp_arg in \ + active \ + async \ + automntfs \ + bind \ + cache \ + data \ + detach \ + force \ + fss \ + grpid \ + ignore \ + i_version \ + jfs \ + kernmount \ + log \ + mandlock \ + move \ + multi \ + newtype \ + nfs \ + noatime \ + nocache \ + nocoredump \ + nodev \ + nodevmtime \ + nodiratime \ + noexec \ + nomnttab \ + nosub \ + nosuid \ + nouser \ + optionstr \ + overlay \ + posixacl \ + private \ + quota \ + rdonly \ + rec \ + remount \ + relatime \ + ronly \ + shared \ + silent \ + slave \ + softdep \ + strictatime \ + sync \ + synchronous \ + symperm \ + unbindable \ + union \ + verbose \ + +do + +# what name to give to the fs +ac_fs_name=$ac_tmp_arg +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_GEN_OPT_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnt2_gen_opt_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for generic mount(2) option $ac_fs_name... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnt2_gen_opt_$ac_fs_name=notfound" +value=notfound + +# first, try MS_* (most systems). Must be the first test! +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MS_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MS_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", MS_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MS_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# if failed, try MNT_* (bsd44 systems) +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MNT_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MNT_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", MNT_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MNT_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# if failed, try MS_* as an integer (linux systems) +if test "$value" = notfound +then + +# we are looking for a regexp of an integer (must not start with 0 --- those +# are octals). +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MS_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[1-9][0-9]*" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MS_$ac_upcase_fs_name +if (argc > 1) + printf("%d", MS_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MS_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# If failed try M_* (must be last test since svr4 systems define M_DATA etc. +# in +# This test was off for now, because of the conflicts with other systems. +# but I turned it back on by faking the inclusion of already. +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +M_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef M_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", M_$ac_upcase_fs_name); +exit(0); +#else +# error no such option M_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# set cache variable to value +eval "ac_cv_mnt2_gen_opt_$ac_fs_name=$value" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for generic mount(2) option $ac_fs_name... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_gen_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + +done + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** NFS-SPECIFIC MOUNT(2) OPTIONS ***" >&5 +$as_echo "$as_me: *** NFS-SPECIFIC MOUNT(2) OPTIONS ***" >&6;} + +for ac_tmp_arg in \ + acdirmax \ + acdirmin \ + acregmax \ + acregmin \ + auto \ + broken_suid \ + deadthresh \ + dirsync \ + dumbtimr \ + fsname \ + grpid \ + hostname \ + ignore \ + int \ + intr \ + kerb \ + knconf \ + leaseterm \ + maxgrps \ + nfsv3 \ + noac \ + noacl \ + noconn \ + nocto \ + noint \ + nonlm \ + nordirplus \ + nqnfs \ + nqlooklease \ + pgthresh \ + posix \ + private \ + proplist \ + rdirplus \ + readahead \ + readdirsize \ + resvport \ + retrans \ + ronly \ + rsize \ + soft \ + spongy \ + strictlock \ + symttl \ + tcp \ + timeo \ + unshared \ + ver3 \ + wsize \ + xlatecookie \ + +do + +# what name to give to the fs +ac_fs_name=$ac_tmp_arg +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_NFS_OPT_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnt2_nfs_opt_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NFS-specific mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for NFS-specific mount(2) option $ac_fs_name... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=notfound" +value=notfound + +# first try NFSMNT_* (most systems) +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +NFSMNT_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef NFSMNT_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", NFSMNT_$ac_upcase_fs_name); +exit(0); +#else +# error no such option NFSMNT_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# next try NFS_MOUNT_* (linux) +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +NFS_MOUNT_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef NFS_MOUNT_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", NFS_MOUNT_$ac_upcase_fs_name); +exit(0); +#else +# error no such option NFS_MOUNT_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# set cache variable to value +eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=$value" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NFS-specific mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for NFS-specific mount(2) option $ac_fs_name... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_nfs_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** CDFS-SPECIFIC MOUNT(2) OPTIONS ***" >&5 +$as_echo "$as_me: *** CDFS-SPECIFIC MOUNT(2) OPTIONS ***" >&6;} + +for ac_tmp_arg in \ + defperm \ + extatt \ + gens \ + nocasetrans \ + nodefperm \ + nojoliet \ + norrip \ + noversion \ + rrcaseins \ + rrip \ + +do + +# what name to give to the fs +ac_fs_name=$ac_tmp_arg +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_CDFS_OPT_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnt2_cdfs_opt_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CDFS-specific mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for CDFS-specific mount(2) option $ac_fs_name... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=notfound" +value=notfound + +# first, try MS_* (most systems). Must be the first test! +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MS_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MS_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", MS_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MS_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# if failed, try MNT_* (bsd44 systems) +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MNT_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MNT_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", MNT_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MNT_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# if failed, try MS_* as an integer (linux systems) +if test "$value" = notfound +then + +# we are looking for a regexp of an integer (must not start with 0 --- those +# are octals). +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MS_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[1-9][0-9]*" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MS_$ac_upcase_fs_name +if (argc > 1) + printf("%d", MS_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MS_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# If failed try M_* (must be last test since svr4 systems define M_DATA etc. +# in +# This test was off for now, because of the conflicts with other systems. +# but I turned it back on by faking the inclusion of already. +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +M_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef M_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", M_$ac_upcase_fs_name); +exit(0); +#else +# error no such option M_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# if failed, try ISOFSMNT_* as a hex (bsdi4 systems) +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +ISOFSMNT_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef ISOFSMNT_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", ISOFSMNT_$ac_upcase_fs_name); +exit(0); +#else +# error no such option ISOFSMNT_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# set cache variable to value +eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=$value" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CDFS-specific mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for CDFS-specific mount(2) option $ac_fs_name... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_cdfs_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** UDF-SPECIFIC MOUNT(2) OPTIONS ***" >&5 +$as_echo "$as_me: *** UDF-SPECIFIC MOUNT(2) OPTIONS ***" >&6;} + +for ac_tmp_arg in \ + closesession \ + +do + +# what name to give to the fs +ac_fs_name=$ac_tmp_arg +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_UDF_OPT_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnt2_udf_opt_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UDF-specific mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for UDF-specific mount(2) option $ac_fs_name... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnt2_udf_opt_$ac_fs_name=notfound" +value=notfound + +# XXX - tests for other systems need to be added here! + +# if failed, try UDFMNT_* as a hex (netbsd systems) +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +UDFMNT_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef UDFMNT_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", UDFMNT_$ac_upcase_fs_name); +exit(0); +#else +# error no such option UDFMNT_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# set cache variable to value +eval "ac_cv_mnt2_udf_opt_$ac_fs_name=$value" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UDF-specific mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for UDF-specific mount(2) option $ac_fs_name... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_udf_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** PCFS-SPECIFIC MOUNT(2) OPTIONS ***" >&5 +$as_echo "$as_me: *** PCFS-SPECIFIC MOUNT(2) OPTIONS ***" >&6;} + +for ac_tmp_arg in \ + longname \ + nowin95 \ + shortname \ + +do + +# what name to give to the fs +ac_fs_name=$ac_tmp_arg +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_PCFS_OPT_$ac_upcase_fs_name +# check for cache and set it if needed + +ac_tmp=`echo ac_cv_mnt2_pcfs_opt_$ac_fs_name` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCFS-specific mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for PCFS-specific mount(2) option $ac_fs_name... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# undefine by default +eval "ac_cv_mnt2_pcfs_opt_$ac_fs_name=notfound" +value=notfound + +# first, try MS_* (most systems). Must be the first test! +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MS_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MS_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", MS_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MS_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# if failed, try MNT_* (bsd44 systems) +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MNT_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MNT_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", MNT_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MNT_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# if failed, try MS_* as an integer (linux systems) +if test "$value" = notfound +then + +# we are looking for a regexp of an integer (must not start with 0 --- those +# are octals). +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MS_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[1-9][0-9]*" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MS_$ac_upcase_fs_name +if (argc > 1) + printf("%d", MS_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MS_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# If failed try M_* (must be last test since svr4 systems define M_DATA etc. +# in +# This test was off for now, because of the conflicts with other systems. +# but I turned it back on by faking the inclusion of already. +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +M_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef M_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", M_$ac_upcase_fs_name); +exit(0); +#else +# error no such option M_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# if failed, try MSDOSFSMNT_* as a hex (bsd44 systems) +if test "$value" = notfound +then + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +MSDOSFSMNT_$ac_upcase_fs_name +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "0x" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ +#ifdef MSDOSFSMNT_$ac_upcase_fs_name +if (argc > 1) + printf("0x%x", MSDOSFSMNT_$ac_upcase_fs_name); +exit(0); +#else +# error no such option MSDOSFSMNT_$ac_upcase_fs_name +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +else + : + +fi + +fi + +# set cache variable to value +eval "ac_cv_mnt2_pcfs_opt_$ac_fs_name=$value" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCFS-specific mount(2) option $ac_fs_name" >&5 +$as_echo_n "checking for PCFS-specific mount(2) option $ac_fs_name... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_pcfs_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + cat >>confdefs.h <<_ACEOF +#define $ac_safe $ac_tmp +_ACEOF + +fi + +done + + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SYSTEM-SPECIFIC TESTS ***" >&5 +$as_echo "$as_me: *** SYSTEM-SPECIFIC TESTS ***" >&6;} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking mount table style" >&5 +$as_echo_n "checking mount table style... " >&6; } +if ${ac_cv_style_mnttab+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct style for mount table manipulation functions +case "${host_os_name}" in + aix* ) + ac_cv_style_mnttab=aix ;; + bsd* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_style_mnttab=bsd ;; + isc3* ) + ac_cv_style_mnttab=isc3 ;; + mach3* ) + ac_cv_style_mnttab=mach3 ;; + osf* ) + ac_cv_style_mnttab=osf ;; + svr4* | sysv4* | solaris2* | sunos5* | aoi* ) + ac_cv_style_mnttab=svr4 ;; + ultrix* ) + ac_cv_style_mnttab=ultrix ;; + linux*) + ac_cv_style_mnttab=linux ;; + * ) + ac_cv_style_mnttab=file ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_style_mnttab" >&5 +$as_echo "$ac_cv_style_mnttab" >&6; } +am_utils_link_files=${am_utils_link_files}libamu/mtabutil.c:conf/mtab/mtab_${ac_cv_style_mnttab}.c" " + +# append mtab utilities object to LIBOBJS for automatic compilation +case " $LIBOBJS " in + *" mtabutil.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mtabutil.$ac_objext" + ;; +esac + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mount type to hide from df" >&5 +$as_echo_n "checking for mount type to hide from df... " >&6; } +if ${ac_cv_hide_mount_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + +case "${host_os}" in + irix* | hpux* ) + ac_cv_hide_mount_type="ignore" + ;; + sunos4* ) + ac_cv_hide_mount_type="auto" + ;; + * ) + ac_cv_hide_mount_type="nfs" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_hide_mount_type" >&5 +$as_echo "$ac_cv_hide_mount_type" >&6; } +cat >>confdefs.h <<_ACEOF +#define HIDE_MOUNT_TYPE "$ac_cv_hide_mount_type" +_ACEOF + + + + +ac_tmp=`echo ac_cv_mnttab_location` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where mount table is kept" >&5 +$as_echo_n "checking where mount table is kept... " >&6; } + echo $ECHO_N "(cached) $ECHO_C" 1>&6 +else + +# assume location is on file +ac_cv_mnttab_location=file +for ac_func in mntctl getmntinfo getmountent +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + ac_cv_mnttab_location=kernel +fi +done + +# Solaris 8 Beta Refresh and up use the mntfs pseudo filesystem to store the +# mount table in kernel (cf. mnttab(4): the MS_NOMNTTAB option in +# inhibits that a mount shows up there and thus can be used to +# check for the in-kernel mount table +if test "$ac_cv_mnt2_gen_opt_nomnttab" != notfound +then + ac_cv_mnttab_location=kernel +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where mount table is kept" >&5 +$as_echo_n "checking where mount table is kept... " >&6; } +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tmp_val" >&5 +$as_echo "$ac_tmp_val" >&6; } + +if test "$ac_cv_mnttab_location" = file +then + $as_echo "#define MOUNT_TABLE_ON_FILE 1" >>confdefs.h + +fi + +if test "$ac_cv_have_struct_mnttab" != yes && test "$ac_cv_have_struct_mntent" != yes && test "$ac_cv_mnttab_location" = file +then +as_fn_error $? "No definition found for struct mnttab or struct mntent +and this system stores its mount tables on files (not in kernel). +This can be due to a misconfigured system, one for which am-utils +was not ported to yet, or a bug in the am-utils sources. Check +config.log for details and report them to am-utils@am-utils.org please." "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for name of mount table file name" >&5 +$as_echo_n "checking for name of mount table file name... " >&6; } +if ${ac_cv_mnttab_file_name+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# expand cpp value for MNTTAB + +# we are looking for a regexp of a string +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* see M4 comment at the top of the definition of this macro */ +#ifdef MOUNTED +# define _MNTTAB_FILE_NAME MOUNTED +# else /* not MOUNTED */ +# ifdef MNTTAB +# define _MNTTAB_FILE_NAME MNTTAB +# endif /* MNTTAB */ +#endif /* not MOUNTED */ + + + +_MNTTAB_FILE_NAME +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "\".*\"" >/dev/null 2>&1; then : + value="notfound" +if test "$cross_compiling" = yes; then : + value="notfound" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + +/* see M4 comment at the top of the definition of this macro */ +#ifdef MOUNTED +# define _MNTTAB_FILE_NAME MOUNTED +# else /* not MOUNTED */ +# ifdef MNTTAB +# define _MNTTAB_FILE_NAME MNTTAB +# endif /* MNTTAB */ +#endif /* not MOUNTED */ + + + +main(argc) +int argc; +{ +#ifdef _MNTTAB_FILE_NAME +if (argc > 1) + printf("%s", _MNTTAB_FILE_NAME); +exit(0); +#else +# error no such option _MNTTAB_FILE_NAME +#endif +exit(1); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + value=`./conftest dummy 2>>config.log` +else + value="notfound" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +else + value="notfound" + +fi +rm -f conftest* + +if test "$value" = notfound +then + : + +ac_cv_mnttab_file_name=notfound +# check explicitly for /etc/mnttab +if test "$ac_cv_mnttab_file_name" = notfound +then + if test -f /etc/mnttab + then + ac_cv_mnttab_file_name="/etc/mnttab" + fi +fi +# check explicitly for /etc/mtab +if test "$ac_cv_mnttab_file_name" = notfound +then + if test -f /etc/mtab + then + ac_cv_mnttab_file_name="/etc/mtab" + fi +fi + +else + : + ac_cv_mnttab_file_name=$value + +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mnttab_file_name" >&5 +$as_echo "$ac_cv_mnttab_file_name" >&6; } +# test value and create macro as needed +if test "$ac_cv_mnttab_file_name" != notfound +then + cat >>confdefs.h <<_ACEOF +#define MNTTAB_FILE_NAME "$ac_cv_mnttab_file_name" +_ACEOF + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking mount trap system-call style" >&5 +$as_echo_n "checking mount trap system-call style... " >&6; } +if ${ac_cv_mount_trap+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct style to mount(2) a filesystem +case "${host_os_name}" in + solaris1* | sunos[34]* ) + ac_cv_mount_trap=default ;; + hpux[6-9]* | hpux10* ) + ac_cv_mount_trap=hpux ;; + svr4* | sysv4* | solaris* | sunos* | aoi* | hpux* ) + ac_cv_mount_trap=svr4 ;; + news4* | riscix* ) + ac_cv_mount_trap=news4 ;; + linux* ) + ac_cv_mount_trap=linux ;; + irix* ) + ac_cv_mount_trap=irix ;; + aux* ) + ac_cv_mount_trap=aux ;; + hcx* ) + ac_cv_mount_trap=hcx ;; + rtu6* ) + ac_cv_mount_trap=rtu6 ;; + dgux* ) + ac_cv_mount_trap=dgux ;; + aix* ) + ac_cv_mount_trap=aix3 ;; + mach2* | mach3* ) + ac_cv_mount_trap=mach3 ;; + ultrix* ) + ac_cv_mount_trap=ultrix ;; + isc3* ) + ac_cv_mount_trap=isc3 ;; + stellix* ) + ac_cv_mount_trap=stellix ;; + netbsd* ) + ac_cv_mount_trap=netbsd ;; + * ) + ac_cv_mount_trap=default ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mount_trap" >&5 +$as_echo "$ac_cv_mount_trap" >&6; } +am_utils_mount_trap=$srcdir"/conf/trap/trap_"$ac_cv_mount_trap".h" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking style of mounting filesystems" >&5 +$as_echo_n "checking style of mounting filesystems... " >&6; } +if ${ac_cv_style_mount+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct style for mounting filesystems +case "${host_os_name}" in + solaris1* | sunos[34]* | bsdi[12]* ) + ac_cv_style_mount=default ;; + hpux[6-9]* | hpux10* ) + ac_cv_style_mount=hpux ;; + svr4* | sysv4* | solaris* | sunos* | aoi* | hpux* ) + ac_cv_style_mount=svr4 ;; + bsdi* ) + ac_cv_style_mount=bsdi3 ;; + aix3* | aix4* ) + ac_cv_style_mount=aix3 ;; + aix* ) + ac_cv_style_mount=aix ;; + irix5* ) + ac_cv_style_mount=irix5 ;; + irix* ) + ac_cv_style_mount=irix6 ;; + isc3* ) + ac_cv_style_mount=isc3 ;; + linux* ) + ac_cv_style_mount=linux ;; + mach3* ) + ac_cv_style_mount=mach3 ;; + stellix* ) + ac_cv_style_mount=stellix ;; + * ) # no style needed. Use default filesystem calls ala BSD + ac_cv_style_mount=default ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_style_mount" >&5 +$as_echo "$ac_cv_style_mount" >&6; } +am_utils_mount_style_file="mountutil.c" +am_utils_link_files=${am_utils_link_files}libamu/${am_utils_mount_style_file}:conf/mount/mount_${ac_cv_style_mount}.c" " + +# append mount utilities object to LIBOBJS for automatic compilation +case " $LIBOBJS " in + *" mountutil.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mountutil.$ac_objext" + ;; +esac + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking style of unmounting filesystems" >&5 +$as_echo_n "checking style of unmounting filesystems... " >&6; } +if ${ac_cv_style_umount+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct style for unmounting filesystems +case "${host_os_name}" in + linux* ) + ac_cv_style_umount=linux ;; + bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_style_umount=bsd44 ;; + osf* ) + ac_cv_style_umount=osf ;; + aix* ) + ac_cv_style_umount=aix ;; + * ) + ac_cv_style_umount=default ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_style_umount" >&5 +$as_echo "$ac_cv_style_umount" >&6; } +am_utils_umount_style_file="umount_fs.c" +am_utils_link_files=${am_utils_link_files}libamu/${am_utils_umount_style_file}:conf/umount/umount_${ac_cv_style_umount}.c" " + +# append un-mount utilities object to LIBOBJS for automatic compilation +case " $LIBOBJS " in + *" umount_fs.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS umount_fs.$ac_objext" + ;; +esac + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking autofs style" >&5 +$as_echo_n "checking autofs style... " >&6; } +if ${ac_cv_autofs_style+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct style to mount(2) a filesystem +case "${host_os}" in + solaris1* | solaris2.[0-4] ) + ac_cv_autofs_style=default ;; + solaris2.5* ) + ac_cv_autofs_style=solaris_v1 ;; + # Solaris 8+ uses the AutoFS V3/V4 protocols, but they are very similar + # to V2, so use one style for all. + solaris* ) + ac_cv_autofs_style=solaris_v2_v3 ;; + irix6* ) + ac_cv_autofs_style=solaris_v1 ;; + linux* ) + ac_cv_autofs_style=linux ;; + * ) + ac_cv_autofs_style=default ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_autofs_style" >&5 +$as_echo "$ac_cv_autofs_style" >&6; } +# always make a link and include the file name, otherwise on systems where +# autofs support has not been ported yet check_fs_{headers, mntent}.m4 add +# ops_autofs.o to AMD_FS_OBJS, but there's no way to build it. +am_utils_link_files=${am_utils_link_files}amd/ops_autofs.c:conf/autofs/autofs_${ac_cv_autofs_style}.c" "amu_autofs_prot.h:conf/autofs/autofs_${ac_cv_autofs_style}.h" " + +# set headers in a macro for Makefile.am files to use (for dependencies) +AMU_AUTOFS_PROT_HEADER='${top_builddir}/'amu_autofs_prot.h + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the system call to unmount a filesystem" >&5 +$as_echo_n "checking the system call to unmount a filesystem... " >&6; } +if ${ac_cv_unmount_call+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# check for various unmount a filesystem calls +if test "$ac_cv_func_uvmount" = yes ; then + ac_cv_unmount_call=uvmount +elif test "$ac_cv_func_unmount" = yes ; then + ac_cv_unmount_call=unmount +elif test "$ac_cv_func_umount" = yes ; then + ac_cv_unmount_call=umount +else + ac_cv_unmount_call=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_unmount_call" >&5 +$as_echo "$ac_cv_unmount_call" >&6; } +if test "$ac_cv_unmount_call" != no +then + am_utils_unmount_call=$ac_cv_unmount_call + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking unmount system-call arguments" >&5 +$as_echo_n "checking unmount system-call arguments... " >&6; } +if ${ac_cv_unmount_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct style to mount(2) a filesystem +case "${host_os_name}" in + aix* ) + ac_cv_unmount_args="mnt->mnt_passno, 0" ;; + ultrix* ) + ac_cv_unmount_args="mnt->mnt_passno" ;; + * ) + ac_cv_unmount_args="mnt->mnt_dir" ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_unmount_args" >&5 +$as_echo "$ac_cv_unmount_args" >&6; } +am_utils_unmount_args=$ac_cv_unmount_args + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking nfs address dereferencing style" >&5 +$as_echo_n "checking nfs address dereferencing style... " >&6; } +if ${ac_cv_nfs_sa_dref_style+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct nfs address dereferencing style +case "${host_os}" in + hpux[6-9]* | hpux10* | sunos[34]* | solaris1* ) + ac_cv_nfs_sa_dref_style=default ;; + svr4* | sysv4* | solaris* | sunos* | hpux* ) + ac_cv_nfs_sa_dref_style=svr4 ;; + 386bsd* | bsdi1* ) + ac_cv_nfs_sa_dref_style=386bsd ;; + bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_nfs_sa_dref_style=bsd44 ;; + linux* ) + ac_cv_nfs_sa_dref_style=linux ;; + aix* ) + ac_cv_nfs_sa_dref_style=aix3 ;; + aoi* ) + ac_cv_nfs_sa_dref_style=aoi ;; + isc3 ) + ac_cv_nfs_sa_dref_style=isc3 ;; + * ) + ac_cv_nfs_sa_dref_style=default ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nfs_sa_dref_style" >&5 +$as_echo "$ac_cv_nfs_sa_dref_style" >&6; } +am_utils_nfs_sa_dref=$srcdir"/conf/sa_dref/sa_dref_"$ac_cv_nfs_sa_dref_style".h" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking nfs hostname dereferencing style" >&5 +$as_echo_n "checking nfs hostname dereferencing style... " >&6; } +if ${ac_cv_nfs_hn_dref_style+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct nfs address dereferencing style +case "${host_os_name}" in + linux* ) + ac_cv_nfs_hn_dref_style=linux ;; + isc3 ) + ac_cv_nfs_hn_dref_style=isc3 ;; + * ) + ac_cv_nfs_hn_dref_style=default ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nfs_hn_dref_style" >&5 +$as_echo "$ac_cv_nfs_hn_dref_style" >&6; } +am_utils_nfs_hn_dref=$srcdir"/conf/hn_dref/hn_dref_"$ac_cv_nfs_hn_dref_style".h" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking nfs file-handle address dereferencing style" >&5 +$as_echo_n "checking nfs file-handle address dereferencing style... " >&6; } +if ${ac_cv_nfs_fh_dref_style+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct nfs address dereferencing style +case "${host_os}" in + hpux[6-9]* | hpux10* ) + ac_cv_nfs_fh_dref_style=hpux ;; + sunos3* ) + ac_cv_nfs_fh_dref_style=sunos3 ;; + sunos4* | solaris1* ) + ac_cv_nfs_fh_dref_style=sunos4 ;; + svr4* | sysv4* | solaris* | sunos* | hpux* ) + ac_cv_nfs_fh_dref_style=svr4 ;; + bsd44* | bsdi2* | freebsd2.[01]* ) + ac_cv_nfs_fh_dref_style=bsd44 ;; + # all new BSDs changed the type of the + # filehandle in nfs_args from nfsv2fh_t to u_char. + freebsd* | freebsdelf* | bsdi* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_nfs_fh_dref_style=freebsd22 ;; + aix[1-3]* | aix4.[01]* ) + ac_cv_nfs_fh_dref_style=aix3 ;; + aix* ) + ac_cv_nfs_fh_dref_style=aix42 ;; + irix* ) + ac_cv_nfs_fh_dref_style=irix ;; + linux* ) + ac_cv_nfs_fh_dref_style=linux ;; + isc3 ) + ac_cv_nfs_fh_dref_style=isc3 ;; + osf[1-3]* ) + ac_cv_nfs_fh_dref_style=osf2 ;; + osf* ) + ac_cv_nfs_fh_dref_style=osf4 ;; + nextstep* ) + ac_cv_nfs_fh_dref_style=nextstep ;; + * ) + ac_cv_nfs_fh_dref_style=default ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nfs_fh_dref_style" >&5 +$as_echo "$ac_cv_nfs_fh_dref_style" >&6; } +am_utils_nfs_fh_dref=$srcdir"/conf/fh_dref/fh_dref_"$ac_cv_nfs_fh_dref_style".h" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if to turn on/off noconn option" >&5 +$as_echo_n "checking if to turn on/off noconn option... " >&6; } +if ${ac_cv_nfs_socket_connection+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# set default to no-change +ac_cv_nfs_socket_connection=none +# select the correct style +case "${host_os}" in + openbsd2.[01]* ) + ac_cv_nfs_socket_connection=noconn ;; + openbsd* | freebsd* | freebsdelf* ) + ac_cv_nfs_socket_connection=conn ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nfs_socket_connection" >&5 +$as_echo "$ac_cv_nfs_socket_connection" >&6; } +# set correct value +case "$ac_cv_nfs_socket_connection" in + noconn ) + $as_echo "#define USE_UNCONNECTED_NFS_SOCKETS 1" >>confdefs.h + + ;; + conn ) + $as_echo "#define USE_CONNECTED_NFS_SOCKETS 1" >>confdefs.h + + ;; +esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking style of fixmount check_mount()" >&5 +$as_echo_n "checking style of fixmount check_mount()... " >&6; } +if ${ac_cv_style_checkmount+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct style for unmounting filesystems +case "${host_os_name}" in + svr4* | sysv4* | solaris2* | sunos5* ) + ac_cv_style_checkmount=svr4 ;; + bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_style_checkmount=bsd44 ;; + aix* ) + ac_cv_style_checkmount=aix ;; + osf* ) + ac_cv_style_checkmount=osf ;; + ultrix* ) + ac_cv_style_checkmount=ultrix ;; + * ) + ac_cv_style_checkmount=default ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_style_checkmount" >&5 +$as_echo "$ac_cv_style_checkmount" >&6; } +am_utils_checkmount_style_file="check_mount.c" +am_utils_link_files=${am_utils_link_files}fixmount/${am_utils_checkmount_style_file}:conf/checkmount/checkmount_${ac_cv_style_checkmount}.c" " + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if system needs to restart signal handlers" >&5 +$as_echo_n "checking if system needs to restart signal handlers... " >&6; } +if ${ac_cv_restartable_signal_handler+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# select the correct systems to restart signal handlers +case "${host_os_name}" in + svr3* | svr4* | sysv4* | solaris2* | sunos5* | aoi* | irix* ) + ac_cv_restartable_signal_handler=yes ;; + * ) + ac_cv_restartable_signal_handler=no ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_restartable_signal_handler" >&5 +$as_echo "$ac_cv_restartable_signal_handler" >&6; } +# define REINSTALL_SIGNAL_HANDLER if need to +if test "$ac_cv_restartable_signal_handler" = yes +then + $as_echo "#define REINSTALL_SIGNAL_HANDLER 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU getopt" >&5 +$as_echo_n "checking for GNU getopt... " >&6; } +if ${ac_cv_sys_gnu_getopt+:} false; then : + $as_echo_n "(cached) " >&6 +else + +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int main() +{ + int argc = 3; + char *argv[] = { "actest", "arg", "-x", NULL }; + int c; + FILE* rf; + int isGNU = 0; + + rf = fopen("conftestresult", "w"); + if (rf == NULL) exit(1); + + while ( (c = getopt(argc, argv, "x")) != -1 ) { + switch ( c ) { + case 'x': + isGNU=1; + break; + default: + exit(1); + } + } + fprintf(rf, isGNU ? "yes" : "no"); + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +ac_cv_sys_gnu_getopt="`cat conftestresult`" + +else + +ac_cv_sys_gnu_getopt="fail" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_gnu_getopt" >&5 +$as_echo "$ac_cv_sys_gnu_getopt" >&6; } +if test "$ac_cv_sys_gnu_getopt" = "yes" +then + $as_echo "#define HAVE_GNU_GETOPT 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hosts_ctl in -lwrap" >&5 +$as_echo_n "checking for hosts_ctl in -lwrap... " >&6; } +if ${ac_cv_lib_wrap_hosts_ctl+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lwrap $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char hosts_ctl (); +int +main () +{ +return hosts_ctl (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_wrap_hosts_ctl=yes +else + ac_cv_lib_wrap_hosts_ctl=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wrap_hosts_ctl" >&5 +$as_echo "$ac_cv_lib_wrap_hosts_ctl" >&6; } +if test "x$ac_cv_lib_wrap_hosts_ctl" = xyes; then : + +$as_echo "#define HAVE_LIBWRAP 1" >>confdefs.h + +WRAPLIB="-lwrap" + +fi + + +if test "$ac_cv_lib_wrap_hosts_ctl" = "yes" +then + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libwrap wants caller to define allow_severity and deny_severity" >&5 +$as_echo_n "checking if libwrap wants caller to define allow_severity and deny_severity... " >&6; } +if ${ac_cv_need_libwrap_severity_vars+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# save, then reset $LIBS back to original value +SAVEDLIBS="$LIBS" +LIBS="$LIBS -lwrap" +# run program one without defining our own severity variables +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main() +{ + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_tmp_val1="yes" +else + ac_tmp_val1="no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +# run program two with defining our own severity variables +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int deny_severity, allow_severity, rfc931_timeout; +int main() +{ + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_tmp_val2="yes" +else + ac_tmp_val2="no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +# restore original value of $LIBS +LIBS="$SAVEDLIBS" +# now decide what to do +if test "$ac_tmp_val1" = "no" && test "$ac_tmp_val2" = "yes" +then + ac_cv_need_libwrap_severity_vars="yes" +else + ac_cv_need_libwrap_severity_vars="no" +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_need_libwrap_severity_vars" >&5 +$as_echo "$ac_cv_need_libwrap_severity_vars" >&6; } +if test "$ac_cv_need_libwrap_severity_vars" = "yes" +then + $as_echo "#define NEED_LIBWRAP_SEVERITY_VARIABLES 1" >>confdefs.h + +fi + +fi + +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** SAVING CONFIGURE STATE ***" >&5 +$as_echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6;} + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** OUTPUT FILES ***" >&5 +$as_echo "$as_me: *** OUTPUT FILES ***" >&6;} +ac_config_links="$ac_config_links ${am_utils_link_files}" + +LIBOBJS=`echo "$LIBOBJS" | + sed 's,\.[^.]* ,$U&,g;s,\.[^.]*$,$U&,'` +LTLIBOBJS=`echo "$LIBOBJS" | + sed 's,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,'` + +AMU_LIB_OBJS="${LTLIBOBJS}" + + +ac_config_files="$ac_config_files aux_conf.h Makefile amd/Makefile amq/Makefile fixmount/Makefile fsinfo/Makefile hlfsd/Makefile libamu/Makefile mk-amd-map/Makefile wire-test/Makefile scripts/Makefile doc/Makefile scripts/am-eject scripts/amd2ldif scripts/amd2sun scripts/automount2amd scripts/ctl-amd scripts/ctl-hlfsd scripts/fix-amd-map scripts/fixrmtab scripts/lostaltmail scripts/redhat-ctl-amd scripts/test-attrcache scripts/wait4amd scripts/wait4amd2die" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by am-utils $as_me 6.2, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_links="$ac_config_links" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration links: +$config_links + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +am-utils config.status 6.2 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "${am_utils_link_files}") CONFIG_LINKS="$CONFIG_LINKS ${am_utils_link_files}" ;; + "aux_conf.h") CONFIG_FILES="$CONFIG_FILES aux_conf.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "amd/Makefile") CONFIG_FILES="$CONFIG_FILES amd/Makefile" ;; + "amq/Makefile") CONFIG_FILES="$CONFIG_FILES amq/Makefile" ;; + "fixmount/Makefile") CONFIG_FILES="$CONFIG_FILES fixmount/Makefile" ;; + "fsinfo/Makefile") CONFIG_FILES="$CONFIG_FILES fsinfo/Makefile" ;; + "hlfsd/Makefile") CONFIG_FILES="$CONFIG_FILES hlfsd/Makefile" ;; + "libamu/Makefile") CONFIG_FILES="$CONFIG_FILES libamu/Makefile" ;; + "mk-amd-map/Makefile") CONFIG_FILES="$CONFIG_FILES mk-amd-map/Makefile" ;; + "wire-test/Makefile") CONFIG_FILES="$CONFIG_FILES wire-test/Makefile" ;; + "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "scripts/am-eject") CONFIG_FILES="$CONFIG_FILES scripts/am-eject" ;; + "scripts/amd2ldif") CONFIG_FILES="$CONFIG_FILES scripts/amd2ldif" ;; + "scripts/amd2sun") CONFIG_FILES="$CONFIG_FILES scripts/amd2sun" ;; + "scripts/automount2amd") CONFIG_FILES="$CONFIG_FILES scripts/automount2amd" ;; + "scripts/ctl-amd") CONFIG_FILES="$CONFIG_FILES scripts/ctl-amd" ;; + "scripts/ctl-hlfsd") CONFIG_FILES="$CONFIG_FILES scripts/ctl-hlfsd" ;; + "scripts/fix-amd-map") CONFIG_FILES="$CONFIG_FILES scripts/fix-amd-map" ;; + "scripts/fixrmtab") CONFIG_FILES="$CONFIG_FILES scripts/fixrmtab" ;; + "scripts/lostaltmail") CONFIG_FILES="$CONFIG_FILES scripts/lostaltmail" ;; + "scripts/redhat-ctl-amd") CONFIG_FILES="$CONFIG_FILES scripts/redhat-ctl-amd" ;; + "scripts/test-attrcache") CONFIG_FILES="$CONFIG_FILES scripts/test-attrcache" ;; + "scripts/wait4amd") CONFIG_FILES="$CONFIG_FILES scripts/wait4amd" ;; + "scripts/wait4amd2die") CONFIG_FILES="$CONFIG_FILES scripts/wait4amd2die" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + +if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then + ac_cs_awk_getline=: + ac_cs_awk_pipe_init= + ac_cs_awk_read_file=' + while ((getline aline < (F[key])) > 0) + print(aline) + close(F[key])' + ac_cs_awk_pipe_fini= +else + ac_cs_awk_getline=false + ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" + ac_cs_awk_read_file=' + print "|#_!!_#|" + print "cat " F[key] " &&" + '$ac_cs_awk_pipe_init + # The final `:' finishes the AND list. + ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' +fi +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + +# Create commands to substitute file output variables. +{ + echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && + echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && + echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && + echo "_ACAWK" && + echo "_ACEOF" +} >conf$$files.sh && +. ./conf$$files.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +rm -f conf$$files.sh + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + \$ac_cs_awk_pipe_init +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + if (nfields == 3 && !substed) { + key = field[2] + if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { + \$ac_cs_awk_read_file + next + } + } + print line +} +\$ac_cs_awk_pipe_fini +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | +if $ac_cs_awk_getline; then + $AWK -f "$ac_tmp/subs.awk" +else + $AWK -f "$ac_tmp/subs.awk" | $SHELL +fi \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + :L) + # + # CONFIG_LINK + # + + if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then + : + else + # Prefer the file from the source tree if names are identical. + if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then + ac_source=$srcdir/$ac_source + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 +$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} + + if test ! -r "$ac_source"; then + as_fn_error $? "$ac_source: file not found" "$LINENO" 5 + fi + rm -f "$ac_file" + + # Try a relative symlink, then a hard link, then a copy. + case $ac_source in + [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; + *) ac_rel_source=$ac_top_build_prefix$ac_source ;; + esac + ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || + ln "$ac_source" "$ac_file" 2>/dev/null || + cp -p "$ac_source" "$ac_file" || + as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 + fi + ;; + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + +# chmod some scripts that are built but not installed +test -f scripts/test-attrcache && chmod +x scripts/test-attrcache + +{ $as_echo "$as_me:${as_lineno-$LINENO}: *** END OF CONFIGURATION ***" >&5 +$as_echo "$as_me: *** END OF CONFIGURATION ***" >&6;} diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000000..3d1bb00c3b9 --- /dev/null +++ b/configure.ac @@ -0,0 +1,1511 @@ +dnl configure.in file for am-utils-6.x +dnl Contains general GNU-autoconf macros. +dnl Author: Erez Zadok +dnl +dnl ###################################################################### +dnl UNCOMMENT THE NEXT FEW LINES FOR DEBUGGING CONFIGURE +dnl define([AC_CACHE_LOAD], )dnl +dnl define([AC_CACHE_SAVE], )dnl +dnl ====================================================================== + +dnl ###################################################################### +dnl INITIALIZATION +dnl AC_INIT +dnl new init style: PACKAGE, VERSION, BUG-REPORTING-ADDRESS +AC_INIT([am-utils], + sinclude([vers.m4]), + [https://bugzilla.am-utils.org/ or am-utils@am-utils.org]) +AC_MSG_NOTICE(*** INITIALIZATION ***) +AC_CONFIG_SRCDIR([amd/amd.c]) +AC_CONFIG_MACRO_DIR([m4/macros]) +AM_CONFIG_HEADER(config.h) +AH_TOP([ +/* + * Start of am-utils-6.x config.h file. + * Erez Zadok + * + * DO NOT EDIT BY HAND. + * Note: generated by autoheader from configure.in. + */ + +#ifndef _CONFIG_H +#define _CONFIG_H +]) +dnl add actual "#undef" commands into m4/macros/header_templates.m4 +AH_BOTTOM([ +/****************************************************************************/ +/*** INCLUDE localconfig.h if it exists, to allow users to make some ***/ +/*** compile time configuration changes. ***/ +/****************************************************************************/ +/* does a local configuration file exist? */ +#undef HAVE_LOCALCONFIG_H +#ifdef HAVE_LOCALCONFIG_H +# include +#endif /* HAVE_LOCALCONFIG_H */ + +#endif /* not _CONFIG_H */ + +/* + * Local Variables: + * mode: c + * End: + */ + +/* End of am-utils-6.x config.h file */ +]) +dnl +dnl AC_CONFIG_AUX_DIR(m4) +AC_PREREQ(2.52) +AC_REVISION($Revision: 1.134 $) +AC_COPYRIGHT([Copyright (c) 1997-2011 Erez Zadok]) +dnl find out system type +AC_MSG_NOTICE(*** SYSTEM TYPES ***) +dnl run by libtool, but must be kept here because HOST_MACROS depends on it +AC_CANONICAL_HOST +AMU_HOST_MACROS +dnl ====================================================================== + +dnl ###################################################################### +dnl PACKAGE NAME AND VERSION +AC_MSG_NOTICE(*** PACKAGE NAME AND VERSION ***) +AMU_PACKAGE_NAME($PACKAGE_NAME) +AMU_PACKAGE_VERSION($PACKAGE_VERSION) +AMU_PACKAGE_BUGREPORT($PACKAGE_BUGREPORT) +AM_INIT_AUTOMAKE +dnl SET (shared) library version. Update it only before major release! +dnl Clarification: +dnl The major number should change when an incompatible change is made to +dnl the API; the minor number should change when an API is added; the patch +dnl level should change when an internal implementation change is made that +dnl does not affect the API. +dnl +dnl In other words: if the major changes, the library is incompatible with +dnl older ones; if the minor changes, the library is backwards compatible +dnl with libraries using the same major; if the patchlevel changes, the +dnl library is backward and forward compatible with libraries using the same +dnl major and minor. +dnl +dnl For sanity, the lower numbers should be set to 0 when a higher number +dnl is changed. +dnl last version info was 3:2:1 (am-utils-6.0.2) +dnl last version info was 4:0:2 (am-utils-6.0.3) +dnl last version info was 4:1:2 (am-utils-6.0.4) +dnl last version info was 3:0:0 (am-utils-6.1, should have been updated) +dnl +dnl We increase the major number for am-utils-6.1, because it has new API's +dnl and removes some old API's. +LIBTOOL_LDFLAGS="-version-info 4:0:0" +AC_SUBST(LIBTOOL_LDFLAGS) +dnl ====================================================================== + +dnl ###################################################################### +dnl ALTERNATIVE PROGRAMS +dnl Part 1: these are required before "unix variants" +dnl ====================================================================== +dnl Particular Program Checks +AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 1) ***) +dnl AC-PROG-LIBTOOL will run this, but we need this to squelch warnings +dnl from autoconf about AMU_TRY_COMPILE running before AC_AIX/AC_ISC_POSIX +AC_PROG_CC +AC_PROG_CPP +AC_PROG_CC_C_O +AC_PROG_GCC_TRADITIONAL +AC_PROG_MAKE_SET +AC_ISC_POSIX +AC_AIX +dnl XXX: available in autoconf-2.14 +dnl AC_PROG_CC_STDC +dnl ====================================================================== + +dnl ###################################################################### +dnl OPTION PROCESSING +AC_MSG_NOTICE(*** OPTION PROCESSING ***) +dnl Do we want LDAP support ? +AMU_WITH_ADDON(ldap, LDAP) +dnl Do we want HESIOD support ? +AMU_WITH_ADDON(hesiod, HESIOD) +dnl Do we want NDBM support ? +AMU_WITH_ADDON(ndbm, NDBM) +dnl Debugging options (yes, mem, or no) +AMU_OPT_DEBUG +dnl additional preprocessor options for configuration/compilation +AMU_OPT_CPPFLAGS +dnl additional linker -l options for configuration/compilation +AMU_OPT_LIBS +dnl additional linker -L options for configuration/compilation +AMU_OPT_LDFLAGS +dnl Which options to add to CFLAGS for compilation only? +AMU_OPT_AMU_CFLAGS +dnl check if a local configuration file exists +AMU_LOCALCONFIG +dnl turn off maintainer-mode Makefile rules, unless using --enable-maintainer-mode +AM_MAINTAINER_MODE +dnl ====================================================================== + +dnl ###################################################################### +AC_MSG_NOTICE(*** LIBTOOL ***) +dnl my version of prog_libtool will not build shared by default +dnl AM_PROG_LIBTOOL2 +dnl build static libraries by default +AC_DISABLE_SHARED +dnl XXX: for autoconf-2.14: use AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL +case ${host_os} in + # Temporarily undo renaming of "linux-gnu" to "linux", because + # libtool only looks for "linux-gnu". Sigh. + linux ) host_os=linux-gnu ;; +esac +dnl this line must appear only once and on its own line +dnl (hence the double case statements above and below) +AC_PROG_LIBTOOL +case ${host_os} in + # end temporary renaming of "linux-gnu" to "linux" + linux-gnu ) host_os=linux ;; +esac +dnl ====================================================================== + +dnl ###################################################################### +dnl ADDITIONAL OPTION PROCESSING (must be done after CC is defined) +AC_MSG_NOTICE(*** EXTRA OPTION PROCESSING ***) +AMU_OS_CPPFLAGS +AMU_OS_CFLAGS +AMU_OS_LDFLAGS +dnl ====================================================================== + +dnl ###################################################################### +dnl Some of these macros must be called before any call to the C compiler +AC_MSG_NOTICE(*** UNIX VARIANTS ***) +dnl UNIX VARIANTS +dnl AC_AIX +dnl AC_ISC_POSIX +AMU_LINUX_HEADERS +dnl ====================================================================== + +dnl ###################################################################### +dnl ALTERNATIVE PROGRAMS +dnl Part 2: these are required after "unix variants" +dnl ====================================================================== +dnl Particular Program Checks (part 2) +AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 2) ***) +AC_PROG_INSTALL +dnl the next two are run or supported natively by libtool +dnl AC_PROG_LN_S +dnl AC_PROG_RANLIB +dnl AC_PROG_YACC +AMU_PROG_YACC +AMU_PROG_LEX +dnl I have to keep a unused dummy AM_PROG_LEX here, because old Automake +dnl (1.6.3) looks for it if you refer to LEX in your Makefile.am files. +dnl Silly thing, fixed in newer versions of Automake (1.9.2). +if test 0 != 0 ; then +AM_PROG_LEX +fi + +dnl ====================================================================== +dnl Generic Program Checks +AC_MSG_NOTICE(*** GENERIC PROGRAMS ***) +AC_PATH_PROGS(AR, ar, :) +AC_PATH_PROGS(PERL, perl5 perl4 perl, /usr/bin/perl) +AC_PATH_PROGS(UNMOUNT_PROGRAM, umount unmount, /bin/umount) +dnl ====================================================================== + +dnl ###################################################################### +dnl LIBRARY FILES +dnl ====================================================================== +dnl Note that the configuration order of libraries is in reverse of linkage +dnl for example, linking of the first two is -lc -lnsl. +AC_MSG_NOTICE(*** LIBRARY FILES ***) + +dnl libnsl/libsocket are needed only on solaris and some svr4 systems. +dnl Using a typical macro has proven unsuccesful, because on some other +dnl systems such as irix, including libnsl and or libsocket actually breaks +dnl lots of code. So I am forced to use a special purpose macro that sets +dnl the libraries based on the OS. Sigh. -Erez. +AMU_CHECK_OS_LIBS + +dnl librpc and librpcsvc are needed on Solaris +AC_CHECK_LIB(rpc, clnt_sperrno) +AC_CHECK_LIB(rpcsvc, xdr_fhandle) +dnl libresolv is needed on Solaris/HPUX-11 for hstrerror() +AC_CHECK_FUNC(hstrerror,,AC_CHECK_LIB(resolv, hstrerror)) +dnl Linux RedHat 5.1 puts yp functions only in libnsl (libnsl broken on aix) +AC_CHECK_FUNC(yp_all,,AC_CHECK_LIB(nsl, yp_all)) + +dnl hesiod library may not link unless libresolv is included +if test "$with_hesiod" = "yes"; then +AMU_CHECK_LIB2(hesiod, hes_init,,, -lresolv) +fi +if test "$with_ldap" = "yes"; then +AMU_CHECK_LIB2(ldap, ldap_open,,, -llber) +AC_CHECK_FUNCS(ldap_enable_cache) +fi + +dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt +dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt, +dnl so only use one of them +case "$ac_cv_opt_debug" in +yes | mem ) + AC_CHECK_LIB(rt, clock_gettime,, AC_CHECK_LIB(posix4, clock_gettime)) + ;; +esac + +dnl ###################################################################### +dnl LIBRARY FUNCTIONS +dnl ====================================================================== +dnl Particular Function Checks +AC_MSG_NOTICE(*** PARTICULAR LIBRARY FUNCTIONS ***) +dnl AC_FUNC_ALLOCA +dnl This GETMNTENT test will add -lgen to LIBS if needed. We may need it +dnl if we have to build am-utils on Irix 4, PTX, or Unixware. +dnl AC_FUNC_GETMNTENT +AMU_FUNC_BAD_MEMCMP +AMU_FUNC_BAD_YP_ALL +AC_FUNC_FORK([]) +AC_FUNC_WAIT3 +AC_FUNC_GETPGRP +AC_FUNC_SETPGRP +dnl if you get AIX link error related to rpl_malloc, turn off next test +dnl AC_FUNC_MALLOC +dnl ====================================================================== +dnl Generic Function Checks +AC_MSG_NOTICE(*** GENERIC LIBRARY FUNCTIONS ***) +AC_CHECK_FUNCS( \ + __rpc_get_local_uid \ + __seterr_reply \ + _seterr_reply \ + bcmp \ + bcopy \ + bzero \ + clnt_create \ + clnt_create_vers \ + clnt_create_vers_timed \ + clnt_spcreateerror \ + clock_gettime \ + cnodeid \ + dg_mount \ + flock \ + fsmount \ + get_myaddress \ + getccent \ + getcwd \ + getdomainname \ + getdtablesize \ + gethostname \ + getifaddrs \ + getmntinfo \ + getmountent \ + getpagesize \ + gettimeofday \ + hasmntopt \ + hstrerror \ + madvise \ + memcmp \ + memcpy \ + memmove \ + memset \ + mkdir \ + mkstemp \ + mntctl \ + mlockall \ + mount \ + mountsyscall \ + plock \ + regcomp \ + regexec \ + rmdir \ + select \ + seteuid \ + setitimer \ + setresuid \ + setsid \ + sigaction \ + signal \ + sigsuspend \ + socket \ + statfs \ + statvfs \ + strcasecmp \ + strchr \ + strcspn \ + strdup \ + strerror \ + strlcat \ + strlcpy \ + strspn \ + strstr \ + svc_getreq \ + svc_getreqset \ + sysfs \ + syslog \ + uname \ + umount \ + umount2 \ + unmount \ + uvmount \ + vfork \ + vfsmount \ + vmount \ + vsnprintf \ + wait3 \ + waitpid \ + ) +dnl optional functions +if test "$with_hesiod" = "yes"; then +AC_CHECK_FUNCS( \ + hes_init \ + hesiod_init \ + hesiod_reload \ + hesiod_to_bind \ + ) +fi +AC_REPLACE_FUNCS( \ + clnt_sperrno \ + hasmntopt \ + strcasecmp \ + strdup \ + strerror \ + strlcat \ + strlcpy \ + strstr \ + ualarm \ + ) +dnl all xdr_* functions are implemented in libamu/xdr_func.c +AC_CHECK_FUNCS( \ + xdr_attrstat \ + xdr_createargs \ + xdr_dirlist \ + xdr_diropargs \ + xdr_diropokres \ + xdr_diropres \ + xdr_dirpath \ + xdr_entry \ + xdr_exportnode \ + xdr_exports \ + xdr_fattr \ + xdr_fhandle \ + xdr_fhstatus \ + xdr_filename \ + xdr_ftype \ + xdr_groupnode \ + xdr_groups \ + xdr_linkargs \ + xdr_mountbody \ + xdr_mountlist \ + xdr_name \ + xdr_nfs_fh \ + xdr_nfscookie \ + xdr_nfspath \ + xdr_nfsstat \ + xdr_nfstime \ + xdr_pointer \ + xdr_u_int64_t \ + xdr_readargs \ + xdr_readdirargs \ + xdr_readdirres \ + xdr_readlinkres \ + xdr_readokres \ + xdr_readres \ + xdr_renameargs \ + xdr_sattr \ + xdr_sattrargs \ + xdr_statfsokres \ + xdr_statfsres \ + xdr_symlinkargs \ + xdr_writeargs \ + ) +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl HEADER FILES +dnl ====================================================================== +dnl Particular Header Checks +AC_MSG_NOTICE(*** PARTICULAR HEADER FILES ***) +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +dnl ====================================================================== +dnl Generic Header Checks +AC_MSG_NOTICE(*** GENERIC HEADER FILES ***) +AC_CHECK_HEADERS( \ + arpa/nameser.h \ + arpa/inet.h \ + bsd/rpc/rpc.h \ + cdfs/cdfsmount.h \ + cdfs/cdfs_mount.h \ + fs/udf/udf_mount.h \ + db1/ndbm.h \ + fs/efs/efs_mount.h \ + fs/msdosfs/msdosfsmount.h \ + fs/tmpfs/tmpfs_args.h \ + gdbm/ndbm.h \ + hsfs/hsfs.h \ + linux/fs.h \ + linux/kdev_t.h \ + linux/list.h \ + linux/nfs.h \ + linux/nfs2.h \ + linux/nfs4.h \ + linux/posix_types.h \ + linux/socket.h \ + machine/endian.h \ + net/errno.h \ + net/if_var.h \ + netinet/in.h \ + nfs/export.h \ + nfs/mount.h \ + nfs/nfs_gfs.h \ + nfs/nfs_mount.h \ + nfs/nfsmount.h \ + nfs/nfsproto.h \ + nfs/nfsv2.h \ + nfs/pathconf.h \ + nfs/rpcv2.h \ + nfsclient/nfsargs.h \ + rpc/rpc.h \ + rpc/types.h \ + rpcsvc/autofs_prot.h \ + rpcsvc/mount.h \ + rpcsvc/mountv3.h \ + rpcsvc/nfs_prot.h \ + rpcsvc/nis.h \ + rpcsvc/ypclnt.h \ + sys/config.h \ + sys/dg_mount.h \ + sys/dir.h \ + sys/errno.h \ + sys/file.h \ + sys/fs/autofs.h \ + sys/fs/autofs_prot.h \ + sys/fs/cachefs_fs.h \ + sys/fs/efs_clnt.h \ + sys/fs/nfs.h \ + sys/fs/nfs/mount.h \ + sys/fs/nfs/nfs_clnt.h \ + sys/fs/nfs_clnt.h \ + sys/fs/pc_fs.h \ + sys/fs/tmp.h \ + sys/fs/ufs_mount.h \ + sys/fs/xfs_clnt.h \ + sys/fs_types.h \ + sys/fsid.h \ + sys/fstyp.h \ + sys/ioctl.h \ + sys/immu.h \ + sys/lock.h \ + sys/machine.h \ + sys/mman.h \ + sys/mntctl.h \ + sys/mntent.h \ + sys/mnttab.h \ + sys/mount.h \ + sys/ndir.h \ + sys/netconfig.h \ + sys/param.h \ + sys/pathconf.h \ + sys/resource.h \ + sys/sema.h \ + sys/signal.h \ + sys/socket.h \ + sys/sockio.h \ + sys/stat.h \ + sys/statfs.h \ + sys/statvfs.h \ + sys/syscall.h \ + sys/syslimits.h \ + sys/syslog.h \ + sys/time.h \ + sys/tiuser.h \ + sys/types.h \ + sys/ucred.h \ + sys/uio.h \ + sys/utsname.h \ + sys/vfs.h \ + sys/vmount.h \ + sys/vnode.h \ +dnl sys/wait.h \ + ufs/ufs/extattr.h \ + ufs/ufs/ufsmount.h \ + ufs/ufs_mount.h \ + \ + assert.h \ +dnl cfs.h \ + cluster.h \ + ctype.h \ +dnl dirent.h \ + errno.h \ + fcntl.h \ + ifaddrs.h \ + irs.h \ + grp.h \ + libgen.h \ + limits.h \ + malloc.h \ + memory.h \ + mntent.h \ + mnttab.h \ + mount.h \ + ndbm.h \ + ndir.h \ + netconfig.h \ + netdb.h \ + netdir.h \ + nsswitch.h \ + pwd.h \ + regex.h \ + setjmp.h \ + signal.h \ + socketbits.h \ + statbuf.h \ + stdarg.h \ + stdlib.h \ + stdio.h \ + string.h \ + strings.h \ + syslog.h \ + tcpd.h \ + time.h \ + tiuser.h \ + varargs.h \ + unistd.h \ + ) +dnl headers that likely have dependencies +AC_CHECK_HEADERS([ \ + net/if.h \ + net/route.h \ + nfs/nfs_clnt.h \ +], [], [], +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_SOCKET_H +# include +#endif /* HAVE_SYS_SOCKET_H */ +]) + +dnl optional headers +if test "$with_ldap" = "yes"; then +AC_CHECK_HEADERS( \ + lber.h \ + ldap.h \ + ) +fi +if test "$with_hesiod" = "yes"; then +AC_CHECK_HEADERS( \ + hesiod.h \ + ) +fi +dnl headers which depend on others, else you get an configure error +AC_CHECK_HEADERS([ \ + isofs/cd9660/cd9660_mount.h \ + msdosfs/msdosfsmount.h \ + netinet/if_ether.h \ + nfs/nfs.h \ + rpc/auth.h \ + rpc/auth_des.h \ + rpc/pmap_clnt.h \ + rpc/pmap_prot.h \ + rpcsvc/yp_prot.h \ + sys/mbuf.h \ + sys/proc.h \ + resolv.h \ +], [], [], +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_SOCKET_H +# include +#endif /* HAVE_SYS_SOCKET_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ +#ifdef HAVE_SYS_QUEUE_H +# include +#endif /* HAVE_SYS_QUEUE_H */ +#ifdef HAVE_NET_IF_H +# include +#endif /* HAVE_NET_IF_H */ +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_MOUNT_H +# include +#endif /* HAVE_SYS_MOUNT_H */ +#ifdef HAVE_NFS_NFSMOUNT_H +# include +#endif /* HAVE_NFS_NFSMOUNT_H */ +#ifdef HAVE_RPC_TYPES_H +# include +#endif /* HAVE_RPC_TYPES_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ +#ifdef HAVE_NFS_RPCV2_H +# include +#endif /* HAVE_NFS_RPCV2_H */ +]) +AC_CHECK_HEADERS([ \ + linux/auto_fs.h \ + linux/auto_fs4.h \ + linux/loop.h \ +], [], [], +[ +#ifdef HAVE_SYS_SOCKET_H +# include +#endif /* HAVE_SYS_SOCKET_H */ +#ifdef HAVE_LIMITS_H +# include +#endif /* HAVE_LIMITS_H */ +#ifdef HAVE_LINUX_POSIX_TYPES_H +# include +#endif /* HAVE_LINUX_POSIX_TYPES_H */ +/* next dev_t lines needed due to changes in kernel code */ +#undef dev_t +#define dev_t unsigned short /* compatible with Red Hat and SuSE */ +]) +dnl even more special checks for Linux nfs headers +AC_CHECK_HEADERS([ \ + linux/nfs_mount.h \ +], [], [], +[ +/* + * Needed to find nfs2_fh and nfs_fh on older systems (yellowdog2.3, gentoo, + * etc.) + * Needs to be defined before so u32 is available for + * . + */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +/* + * It used to be the case that linux/socket.h would define sa_family_t, + * but as of FC15, this is not the case anymore (although the comments + * in some headers say that is true! So we include too. + */ +#ifdef HAVE_LINUX_SOCKET_H +# include +#endif /* HAVE_LINUX_SOCKET_H */ +#ifdef HAVE_SYS_SOCKET_H +#include +#endif /* HAVE_SYS_SOCKET_H */ +#ifdef HAVE_LIMITS_H +# include +#endif /* HAVE_LIMITS_H */ +#ifdef HAVE_LINUX_POSIX_TYPES_H +# include +#endif /* HAVE_LINUX_POSIX_TYPES_H */ +#ifdef HAVE_LINUX_NFS2_H +# if !defined(FHSIZE) && defined(NFS2_FHSIZE) +# define FHSIZE NFS2_FHSIZE +# endif +#ifdef HAVE_LINUX_NFS_H +# include +# if !defined(FHSIZE) && defined(NFS_FHSIZE) +# define FHSIZE NFS_FHSIZE +# endif +#endif +struct nfs2_fh { + char data[[FHSIZE]]; +}; +# define _LINUX_NFS2_H +#endif /* HAVE_LINUX_NFS2_H */ +/* next dev_t lines needed due to changes in kernel code */ +#undef dev_t +#define dev_t unsigned short /* compatible with Red Hat and SuSE */ +]) + +dnl ====================================================================== +dnl db/ndbm/gdbm: This is serious autoconf-fu... +dnl ====================================================================== +if test "$with_ndbm" = "yes" +then +if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then + AC_CHECK_LIB(ndbm, dbm_open, +dnl some systems replaced old ndbm.h include with GNU ndbm.h, which requires +dnl libgdbm for dbm_pagfno, so check for this. + AC_CHECK_LIB(ndbm, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm", + AC_CHECK_LIB(gdbm, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm -lgdbm"))) +fi +dnl check if dbm_open is part of libc +if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then + AC_CHECK_LIB(c, dbm_open, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="c") +fi +if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_db1_ndbm_h" = "yes"; then + AC_CHECK_LIB(db1, dbm_open, ac_cv_header_new_dbm="db1/ndbm.h"; ac_cv_lib_new_dbm="db1") +fi +dnl nasty workaround: and map to the same ac_cv_ variable name +if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_gdbm_ndbm_h" = "yes"; then + AC_CHECK_LIB(gdbm, dbm_open, ac_cv_header_new_dbm="gdbm/ndbm.h"; ac_cv_lib_new_dbm="gdbm") +else + # reset any previous knowledge and retest for different header name + # check also gdbm_compat library (Debian 3.1) + unset ac_cv_header_gdbm_ndbm_h + AC_CHECK_HEADERS(gdbm-ndbm.h) + if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_gdbm_ndbm_h" = "yes"; then + AC_CHECK_LIB(gdbm, dbm_open, ac_cv_header_new_dbm="gdbm-ndbm.h"; ac_cv_lib_new_dbm="gdbm", + AC_CHECK_LIB(gdbm_compat, dbm_open, ac_cv_header_new_dbm="gdbm-ndbm.h"; ac_cv_lib_new_dbm="gdbm -lgdbm_compat") + ) + fi +fi +if test "$ac_cv_header_new_dbm" != "" -a "$ac_cv_lib_new_dbm" != ""; then + AC_DEFINE_UNQUOTED(NEW_DBM_H, "$ac_cv_header_new_dbm") +dnl don't bother adding "-lc" when it's the default anyway + if test "$ac_cv_lib_new_dbm" != "c" ; then + LIBS="-l$ac_cv_lib_new_dbm $LIBS" + fi +fi +fi +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl STRUCTURES +AC_MSG_NOTICE(*** PARTICULAR STRUCTURES ***) +AC_HEADER_STAT +AC_HEADER_TIME +AC_STRUCT_TM +dnl ====================================================================== +AC_MSG_NOTICE(*** GENERIC STRUCTURES ***) +dnl before any use of macros that need nfs/mount headers, must define O/S +dnl specific header to include. +AMU_CHECK_NFS_PROT_HEADERS +AMU_STRUCT_MNTENT +AMU_STRUCT_MNTTAB +dnl ----------------------------------------------------------------------- +dnl check for bad hasmntopt() function after struct mntent/mnttab +dnl but only if hasmntopt() is actually defined. +if test $ac_cv_func_hasmntopt = yes +then + AMU_FUNC_BAD_HASMNTOPT +fi +dnl ----------------------------------------------------------------------- +AMU_STRUCT_NFS_ARGS +AMU_STRUCT_NFS_GFS_MOUNT +dnl ----------------------------------------------------------------------- +dnl cannot proceed if struct nfs_args/gfs_mount is not found! +if test "$ac_cv_have_struct_nfs_args" = notfound && test "$ac_cv_have_struct_nfs_gfs_mount" = no +then +AC_MSG_ERROR( +[Cannot find any definition for struct nfs_args! +This can be due to several reasons: a misconfigured system, a system that is +missing some vital NFS-related headers or libraries, one for which am-utils +was not ported to yet, or even a bug in the am-utils sources. Check the +BUGS file in this distribution and see if there is any mention relevant to +your system. If that does not help, check the config.log and config.cache +files in this build for details and report them to +https://bugzilla.am-utils.org/ or am-utils@am-utils.org please. +]) +fi +dnl ----------------------------------------------------------------------- +dnl NFS related tests need to happen earlier: many things depend on them +AMU_STRUCT_FIELD_NFS_FH +AMU_STRUCT_NFS_FH +AMU_STRUCT_NFS_FH3 +AMU_CHECK_FS_MNTENT(nfs3) +AMU_CHECK_FS_MNTENT(nfs4) +dnl ====================================================================== + +dnl ----------------------------------------------------------------------- +dnl Lustre related tests +AMU_CHECK_FS_MNTENT(lustre) + + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl TYPEDEFS +dnl ====================================================================== +dnl Particular Typedef Checks +AC_MSG_NOTICE(*** PARTICULAR TYPEDEFS ***) +AC_TYPE_GETGROUPS +AC_TYPE_MODE_T +AC_TYPE_PID_T +AC_TYPE_SIGNAL +AC_TYPE_SIZE_T +AC_TYPE_UID_T +dnl ====================================================================== +dnl Generic Typedef Checks +AC_MSG_NOTICE(*** GENERIC TYPEDEFS ***) +AMU_TYPE_TIME_T +AMU_TYPE_RPCVERS_T +case "${host_os}" in + irix6* ) +AMU_TYPE_PTE_T + ;; +esac +AMU_CHECK_FHANDLE +AMU_CHECK_MTYPE_TYPE +AMU_CHECK_MTYPE_PRINTF_TYPE +AMU_TYPE_YP_ORDER_OUTORDER +AMU_TYPE_RECVFROM_FROMLEN +AMU_TYPE_AUTH_CREATE_GIDLIST +AMU_TYPE_SVC_IN_ARG +AMU_TYPE_AUTOFS_ARGS +AMU_TYPE_CACHEFS_ARGS +AMU_TYPE_CDFS_ARGS +AMU_TYPE_UDF_ARGS +AMU_TYPE_LOFS_ARGS +AMU_TYPE_MFS_ARGS +AMU_TYPE_PCFS_ARGS +AMU_TYPE_RFS_ARGS +AMU_TYPE_TMPFS_ARGS +AMU_TYPE_UFS_ARGS +AMU_TYPE_XFS_ARGS +AMU_TYPE_EFS_ARGS +AMU_TYPE_XDRPROC_T +dnl ====================================================================== + +dnl ###################################################################### +dnl Particular Compiler Characteristics +AC_MSG_NOTICE(*** PARTICULAR COMPILER CHARACTERISTICS ***) +AC_C_BIGENDIAN +AC_C_CONST +AC_C_INLINE +AC_C_VOLATILE +dnl AC_CHECK_SIZEOF(void *, 0) +dnl ====================================================================== +dnl Generic Compiler Characteristics +AC_MSG_NOTICE(*** GENERIC COMPILER CHARACTERISTICS ***) +AMU_C_VOID_P +AMU_VARARGS_MACROS +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +AC_MSG_NOTICE(*** EXTERNAL DEFINITIONS ***) +AMU_EXTERN_SYS_ERRLIST +AMU_EXTERN_OPTARG +AMU_CHECK_EXTERNS( + clnt_spcreateerror \ + clnt_sperrno \ + free \ + get_myaddress \ + getccent \ + getdomainname \ + getdtablesize \ + gethostname \ + getlogin \ + getpagesize \ + getwd \ + hosts_ctl \ + innetgr \ + mkstemp \ + mntctl \ + sbrk \ + seteuid \ + setitimer \ + sleep \ + strcasecmp \ + strdup \ + strlcat \ + strlcpy \ + strstr \ + ualarm \ + usleep \ + wait3 \ + vsnprintf \ + xdr_callmsg \ + xdr_opaque_auth \ + ) +dnl Different macro to check for LDAP externs, so as to avoid +dnl breaking the basic extern-checking macro. +if test "$with_ldap" = "yes"; then +AMU_CHECK_EXTERN_LDAP(ldap_enable_cache) +fi +dnl ====================================================================== + +dnl ###################################################################### +dnl C PREPROCESSOR MACROS +AC_MSG_NOTICE(*** C PREPROCESSOR MACROS ***) +dnl ====================================================================== + +dnl ###################################################################### +dnl SYSTEM SERVICES +AC_MSG_NOTICE(*** SYSTEM SERVICES ***) +AC_SYS_LONG_FILE_NAMES +AC_SYS_LARGEFILE +AC_SYS_RESTARTABLE_SYSCALLS +AMU_CHECK_NETWORK_TRANSPORT_TYPE +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +AC_MSG_NOTICE(*** FIELDS WITHIN STRUCTURES ***) +AMU_CHECK_FIELD(fd_set.fds_bits) +AMU_CHECK_FIELD(mntent_t.mnt_cnode) +AMU_CHECK_FIELD(mntent_t.mnt_ro) +AMU_CHECK_FIELD(mntent_t.mnt_time) +AMU_FIELD_MNTENT_T_MNT_TIME_STRING +AMU_CHECK_FIELD(cdfs_args_t.flags) +AMU_CHECK_FIELD(cdfs_args_t.fspec) +AMU_CHECK_FIELD(cdfs_args_t.iso_flags) +AMU_CHECK_FIELD(cdfs_args_t.iso_pgthresh) +AMU_CHECK_FIELD(cdfs_args_t.norrip) +AMU_CHECK_FIELD(cdfs_args_t.ssector) +AMU_CHECK_FIELD(udf_args_t.version) +AMU_CHECK_FIELD(udf_args_t.fspec) +AMU_CHECK_FIELD(udf_args_t.sessionnr) +AMU_CHECK_FIELD(udf_args_t.udfmflags) +AMU_CHECK_FIELD(udf_args_t.gmtoff) +AMU_CHECK_FIELD(udf_args_t.anon_uid) +AMU_CHECK_FIELD(udf_args_t.anon_gid) +AMU_CHECK_FIELD(udf_args_t.nobody_uid) +AMU_CHECK_FIELD(udf_args_t.nobody_gid) +AMU_CHECK_FIELD(udf_args_t.sector_size) +AMU_CHECK_FIELD(pcfs_args_t.dirmask) +AMU_CHECK_FIELD(pcfs_args_t.dsttime) +AMU_CHECK_FIELD(pcfs_args_t.fspec) +AMU_CHECK_FIELD(pcfs_args_t.gid) +AMU_CHECK_FIELD(pcfs_args_t.mask) +AMU_CHECK_FIELD(pcfs_args_t.secondswest) +AMU_CHECK_FIELD(pcfs_args_t.uid) +AMU_CHECK_FIELD(ufs_args_t.flags) +AMU_CHECK_FIELD(ufs_args_t.fspec) +AMU_CHECK_FIELD(ufs_args_t.ufs_flags) +AMU_CHECK_FIELD(ufs_args_t.ufs_pgthresh) +AMU_CHECK_FIELD(efs_args_t.flags) +AMU_CHECK_FIELD(efs_args_t.fspec) +AMU_CHECK_FIELD(efs_args_t.version) +AMU_CHECK_FIELD(xfs_args_t.flags) +AMU_CHECK_FIELD(xfs_args_t.fspec) +AMU_CHECK_FIELD(tmpfs_args_t.ta_version) +AMU_CHECK_FIELD(tmpfs_args_t.ta_nodes_max) +AMU_CHECK_FIELD(tmpfs_args_t.ta_size_max) +AMU_CHECK_FIELD(tmpfs_args_t.ta_root_uid) +AMU_CHECK_FIELD(tmpfs_args_t.ta_root_gid) +AMU_CHECK_FIELD(tmpfs_args_t.ta_root_mode) +AMU_CHECK_FIELD(struct fhstatus.fhs_fh) +AMU_CHECK_FIELD(struct statfs.f_fstypename) +AMU_CHECK_FIELD(nfs_args_t.acdirmin) +AMU_CHECK_FIELD(nfs_args_t.acdirmax) +AMU_CHECK_FIELD(nfs_args_t.acregmin) +AMU_CHECK_FIELD(nfs_args_t.acregmax) +AMU_CHECK_FIELD(nfs_args_t.addrlen) +AMU_CHECK_FIELD(nfs_args_t.bsize) +AMU_CHECK_FIELD(nfs_args_t.fh_len) +AMU_CHECK_FIELD(nfs_args_t.fhsize) +AMU_CHECK_FIELD(nfs_args_t.gfs_flags) +AMU_CHECK_FIELD(nfs_args_t.namlen) +AMU_CHECK_FIELD(nfs_args_t.optstr) +AMU_CHECK_FIELD(nfs_args_t.pathconf) +AMU_CHECK_FIELD(nfs_args_t.proto) +AMU_CHECK_FIELD(nfs_args_t.sotype) +AMU_CHECK_FIELD(nfs_args_t.version) +AMU_CHECK_FIELD(nfs_args_t.pseudoflavor) +AMU_CHECK_FIELD(nfs_args_t.context) +AMU_CHECK_FIELD(struct ifreq.ifr_addr) +AMU_CHECK_FIELD(struct ifaddrs.ifa_next) +AMU_CHECK_FIELD(struct sockaddr.sa_len) +AMU_CHECK_FIELD(struct umntrequest.devid) +dnl This one is for Irix +AMU_CHECK_FIELD(autofs_args_t.addr) +dnl For Solaris 2.8+ +AMU_CHECK_FIELD(mounta.optptr) + +dnl ====================================================================== + +dnl ###################################################################### +dnl MAP TYPES +AC_MSG_NOTICE(*** MAP TYPES ***) +dnl DBM is obsolete, use NDBM +dnl AMU_CHECK_MAP_FUNCS(dbminit dbmopen, dbm) +AMU_CHECK_MAP_FUNCS(fgets, file) +AMU_CHECK_MAP_FUNCS(fgets, sun) +AMU_CHECK_MAP_FUNCS(waitpid, exec) +dnl Define HESIOD map if user wanted it, and both headers and libraries exist +if test "$with_hesiod" = "yes" && test "$ac_cv_header_hesiod_h" = "yes" +then +AMU_CHECK_MAP_FUNCS(hes_init hesiod_init, hesiod) +fi +dnl Define LDAP map if user wanted it, and both headers and libraries exist +if test "$with_ldap" = "yes" && test "$ac_cv_header_ldap_h" = "yes" +then +AMU_CHECK_MAP_FUNCS(ldap_open, ldap) +fi +if test "$with_ndbm" = "yes" -a "$ac_cv_lib_new_dbm" != "" +then +AMU_CHECK_MAP_FUNCS(dbm_open, $ac_cv_lib_new_dbm, ndbm) +fi +AMU_CHECK_MAP_FUNCS(yp_get_default_domain yp_all, nis) +AMU_CHECK_MAP_FUNCS(nis_domain_of, nisplus, nisplus) +AMU_CHECK_MAP_FUNCS(getpwnam, passwd) +AMU_CHECK_MAP_FUNCS(opendir, union) +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl FILESYSTEM TYPES +AC_MSG_NOTICE(*** FILESYSTEM TYPES ***) +dnl check for filesystem existence if MNTTYPE_ exists, then if +dnl MOUNT_, then MNT_, then in /proc/filesystems, and getvfsbyname() +AMU_CHECK_FS_MNTENT(autofs) +AMU_CHECK_FS_MNTENT(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs) +AMU_CHECK_FS_MNTENT(udf) +AMU_CHECK_FS_MNTENT(cache) +AMU_CHECK_FS_MNTENT(lofs lo, lofs) +AMU_CHECK_FS_MNTENT(mfs) +AMU_CHECK_FS_MNTENT(nfs) +AMU_CHECK_FS_MNTENT(vfat pcfs pc msdos msdosfs fat, pcfs) +AMU_CHECK_FS_MNTENT(tfs) +AMU_CHECK_FS_MNTENT(tmpfs) +AMU_CHECK_FS_MNTENT(ext4 ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix, ufs) +dnl openbsd 2.4 introduce a new file system called xfs, which is not +dnl the same as irix-s xfs. Sigh, why did openbsd have to use such a name! +case "${host_os_name}" in + openbsd* ) ;; + * ) AMU_CHECK_FS_MNTENT(xfs) ;; +esac +AMU_CHECK_FS_MNTENT(efs) +dnl new ones in bsd44 +AMU_CHECK_FS_MNTENT(null nullfs, nullfs) +AMU_CHECK_FS_MNTENT(union unionfs, unionfs) +AMU_CHECK_FS_MNTENT(umap umapfs, umapfs) + +dnl check for filesystem existence if their headers exist +dnl AMU_CHECK_FS_HEADERS(cfs.h, cfs) +AMU_CHECK_FS_HEADERS(hsfs/hsfs.h, cdfs) +AMU_CHECK_FS_HEADERS(fs/udf/udf_mount.h, udf) +AMU_CHECK_FS_HEADERS(tmpfs/tmp.h, tmpfs) +AMU_CHECK_FS_HEADERS(fs/tmpfs/tmpfs_args.h, tmpfs) +AMU_CHECK_FS_HEADERS(fs/efs/efs_mount.h, efs) +AMU_CHECK_FS_HEADERS(sys/fs/autofs.h linux/auto_fs.h, autofs) +AMU_CHECK_FS_HEADERS(sys/fs/cachefs_fs.h, cachefs) +dnl AMU_CHECK_FS_HEADERS(jfs/jfsmount.h, ufs) +dnl ====================================================================== +dnl AUTOMOUNTER FILESYSTEM TYPES +AC_MSG_NOTICE(*** AUTOMOUNTER FILESYSTEM TYPES ***) +AMU_CHECK_AMU_FS(auto, automounter) +AMU_CHECK_AMU_FS(direct, direct automount) +AMU_CHECK_AMU_FS(toplvl, top-level) +AMU_CHECK_AMU_FS(error, error) +dnl AMU_CHECK_AMU_FS(inherit, inheritance) +AMU_CHECK_AMU_FS(program, program) +AMU_CHECK_AMU_FS(link, symlink) +AMU_CHECK_AMU_FS(linkx, symlink with existence check) +AMU_CHECK_AMU_FS(host, host (nfs), nfs) +AMU_CHECK_AMU_FS(nfsx, multi-nfs mount, nfs) +AMU_CHECK_AMU_FS(nfsl, NFS with local existence check) +AMU_CHECK_AMU_FS(union, union) +dnl AMU_CHECK_AMU_FS(autofs, Sun AutoFS, autofs) +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl MOUNTING TYPES AND NAMES FOR MOUNTING TABLE +dnl check for mount(2) type/name for filesystem (MNTTYPE_*, MOUNT_*) +AC_MSG_NOTICE(*** MOUNTING TYPES ***) +AMU_CHECK_MOUNT_TYPE(nfs) +AMU_CHECK_MOUNT_TYPE(nfs3) +AMU_CHECK_MOUNT_TYPE(nfs4) +AMU_CHECK_MOUNT_TYPE(lustre) +AMU_CHECK_MOUNT_TYPE(ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs) +AMU_CHECK_MOUNT_TYPE(xfs) +AMU_CHECK_MOUNT_TYPE(efs) +AMU_CHECK_MOUNT_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs) +AMU_CHECK_MOUNT_TYPE(udf) +AMU_CHECK_MOUNT_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs) +AMU_CHECK_MOUNT_TYPE(mfs) +AMU_CHECK_MOUNT_TYPE(tmpfs tmp, tmpfs) +AMU_CHECK_MOUNT_TYPE(lofs lo, lofs) +AMU_CHECK_MOUNT_TYPE(lfs) +AMU_CHECK_MOUNT_TYPE(afs) +AMU_CHECK_MOUNT_TYPE(autofs) +AMU_CHECK_MOUNT_TYPE(tfs) +AMU_CHECK_MOUNT_TYPE(cachefs) +AMU_CHECK_MOUNT_TYPE(ignore) +dnl new ones in bsd44 +AMU_CHECK_MOUNT_TYPE(null nullfs, nullfs) +AMU_CHECK_MOUNT_TYPE(union unionfs, unionfs) +AMU_CHECK_MOUNT_TYPE(umap umapfs, umapfs) +dnl ###################################################################### +dnl check for mnttab name for filesystem +AC_MSG_NOTICE(*** MOUNTING TABLE NAMES ***) +AMU_CHECK_MNTTAB_TYPE(nfs) +AMU_CHECK_MNTTAB_TYPE(nfs3) +AMU_CHECK_MNTTAB_TYPE(nfs4) +AMU_CHECK_MNTTAB_TYPE(lustre) +AMU_CHECK_MNTTAB_TYPE(ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs) +AMU_CHECK_MNTTAB_TYPE(xfs) +AMU_CHECK_MNTTAB_TYPE(efs) +AMU_CHECK_MNTTAB_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs) +AMU_CHECK_MNTTAB_TYPE(udf) +AMU_CHECK_MNTTAB_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs) +AMU_CHECK_MNTTAB_TYPE(mfs) +AMU_CHECK_MNTTAB_TYPE(tmpfs tmp, tmpfs) +AMU_CHECK_MNTTAB_TYPE(lofs lo, lofs) +AMU_CHECK_MNTTAB_TYPE(lfs) +AMU_CHECK_MNTTAB_TYPE(afs) +AMU_CHECK_MNTTAB_TYPE(autofs) +AMU_CHECK_MNTTAB_TYPE(tfs) +AMU_CHECK_MNTTAB_TYPE(cachefs) +dnl new ones in bsd44 +AMU_CHECK_MNTTAB_TYPE(null nullfs, nullfs) +AMU_CHECK_MNTTAB_TYPE(union unionfs, unionfs) +AMU_CHECK_MNTTAB_TYPE(umap umapfs, umapfs) +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl Mount Table option name strings like MNTOPT_* +dnl if found, defines MNTTAB_OPT_* +AC_MSG_NOTICE(*** MOUNT TABLE OPTION NAME STRINGS ***) +AMU_CHECK_MNTTAB_OPTS( \ + acdirmax \ + acdirmin \ + acregmax \ + acregmin \ + actimeo \ + compress \ + dev \ + fsid \ + grpid \ + ignore \ + intr \ + longname \ + maxgroups \ + multi \ + noac \ + noacl \ + noauto \ + noconn \ + nocto \ + nosub \ + nosuid \ + nowin95 \ + pgthresh \ + port \ + posix \ + private \ + proplist \ + proto \ + public \ + retrans \ + retry \ + ro \ + rsize \ + rw \ + shortname \ + soft \ + spongy \ + suid \ + symttl \ + timeo \ + vers \ + wsize \ + ) +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl Generic mount(2) system call flags (hex/int numbers) like M_*/MS_*/MNT_* +dnl if found, defines MNT2_GEN_OPT_* +AC_MSG_NOTICE(*** GENERIC MOUNT(2) OPTIONS ***) +AMU_CHECK_MNT2_GEN_OPTS( \ + active \ + async \ + automntfs \ + bind \ + cache \ + data \ + detach \ + force \ + fss \ + grpid \ + ignore \ + i_version \ + jfs \ + kernmount \ + log \ + mandlock \ + move \ + multi \ + newtype \ + nfs \ + noatime \ + nocache \ + nocoredump \ + nodev \ + nodevmtime \ + nodiratime \ + noexec \ + nomnttab \ + nosub \ + nosuid \ + nouser \ + optionstr \ + overlay \ + posixacl \ + private \ + quota \ + rdonly \ + rec \ + remount \ + relatime \ + ronly \ + shared \ + silent \ + slave \ + softdep \ + strictatime \ + sync \ + synchronous \ + symperm \ + unbindable \ + union \ + verbose \ + ) +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl NFS-specific mount(2) options (hex numbers) like NFSMNT_*/NFS_MOUNT_* +AC_MSG_NOTICE(*** NFS-SPECIFIC MOUNT(2) OPTIONS ***) +dnl if found, defines MNT2_NFS_OPT_* +AMU_CHECK_MNT2_NFS_OPTS( \ + acdirmax \ + acdirmin \ + acregmax \ + acregmin \ + auto \ + broken_suid \ + deadthresh \ + dirsync \ + dumbtimr \ + fsname \ + grpid \ + hostname \ + ignore \ + int \ + intr \ + kerb \ + knconf \ + leaseterm \ + maxgrps \ + nfsv3 \ + noac \ + noacl \ + noconn \ + nocto \ + noint \ + nonlm \ + nordirplus \ + nqnfs \ + nqlooklease \ + pgthresh \ + posix \ + private \ + proplist \ + rdirplus \ + readahead \ + readdirsize \ + resvport \ + retrans \ + ronly \ + rsize \ + soft \ + spongy \ + strictlock \ + symttl \ + tcp \ + timeo \ + unshared \ + ver3 \ + wsize \ + xlatecookie \ + ) +dnl ====================================================================== + +dnl ###################################################################### +dnl CDFS-specific mount(2) options (hex numbers) like M_* +AC_MSG_NOTICE(*** CDFS-SPECIFIC MOUNT(2) OPTIONS ***) +dnl if found, defines MNT2_CDFS_OPT_* +AMU_CHECK_MNT2_CDFS_OPTS(\ + defperm \ + extatt \ + gens \ + nocasetrans \ + nodefperm \ + nojoliet \ + norrip \ + noversion \ + rrcaseins \ + rrip \ + ) +dnl ====================================================================== + +dnl ###################################################################### +dnl UDF-specific mount(2) options (hex numbers) like M_* +AC_MSG_NOTICE(*** UDF-SPECIFIC MOUNT(2) OPTIONS ***) +dnl if found, defines MNT2_UDF_OPT_* +AMU_CHECK_MNT2_UDF_OPTS(\ + closesession \ + ) +dnl ====================================================================== + +dnl ###################################################################### +dnl PCFS-specific mount(2) options (hex numbers) like M_* +AC_MSG_NOTICE(*** PCFS-SPECIFIC MOUNT(2) OPTIONS ***) +dnl if found, defines MNT2_PCFS_OPT_* +AMU_CHECK_MNT2_PCFS_OPTS(\ + longname \ + nowin95 \ + shortname \ + ) +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl SYSTEM-SPECIFIC TESTS +AC_MSG_NOTICE(*** SYSTEM-SPECIFIC TESTS ***) +dnl ====================================================================== +dnl Mount table style +AMU_CHECK_MNTTAB_STYLE +AMU_CHECK_HIDE_MOUNT_TYPE +AMU_CHECK_MNTTAB_LOCATION +dnl ----------------------------------------------------------------------- +dnl check if has mnttab/mntent or in-kernel mount tables +dnl this test must follow AMU_CHECK_MNTTAB_LOCATION and +dnl AMU_CHECK_MNT2_GEN_OPTS(nomnttab) +if test "$ac_cv_have_struct_mnttab" != yes && test "$ac_cv_have_struct_mntent" != yes && test "$ac_cv_mnttab_location" = file +then +AC_MSG_ERROR( +[No definition found for struct mnttab or struct mntent +and this system stores its mount tables on files (not in kernel). +This can be due to a misconfigured system, one for which am-utils +was not ported to yet, or a bug in the am-utils sources. Check +config.log for details and report them to am-utils@am-utils.org please.]) +fi +dnl ----------------------------------------------------------------------- +AMU_CHECK_MNTTAB_FILE_NAME +AMU_CHECK_MOUNT_TRAP +AMU_CHECK_MOUNT_STYLE +AMU_CHECK_UMOUNT_STYLE +AMU_CHECK_AUTOFS_STYLE +AMU_CHECK_UNMOUNT_CALL +AMU_CHECK_UNMOUNT_ARGS +AMU_CHECK_NFS_SA_DREF +AMU_CHECK_NFS_HN_DREF +AMU_CHECK_NFS_FH_DREF +AMU_CHECK_NFS_SOCKET_CONNECTION +AMU_CHECK_CHECKMOUNT_STYLE +AMU_CHECK_RESTARTABLE_SIGNAL_HANDLER +AMU_CHECK_GNU_GETOPT +dnl ====================================================================== + +dnl ###################################################################### +dnl Check for tcpwrappers +dnl This check is moved this far down because on modern tcpwrapper systems +dnl such as openbsd, the caller must provide two symbols: deny_severity and +dnl allow_severity, which determine the logging level of rejected and +dnl requested requests, respectively. If this check happens too early, then +dnl $LIBS includes -lwrap, which causes many subsequent tests to fail with +dnl missing symbols. +AC_CHECK_LIB(wrap, hosts_ctl, +[ +AC_DEFINE(HAVE_LIBWRAP) +WRAPLIB="-lwrap" +]) +dnl replace value of WRAPLIB in specific Makefiles +AC_SUBST(WRAPLIB) +dnl next, check if libwrap defines allow/deny_severity or expects the caller to define it +if test "$ac_cv_lib_wrap_hosts_ctl" = "yes" +then +AMU_CHECK_LIBWRAP_SEVERITY +fi +dnl ====================================================================== + +dnl ********* +AMU_SAVE_STATE +dnl ********* + +dnl ###################################################################### +dnl output files +AC_MSG_NOTICE(*** OUTPUT FILES ***) +dnl The am_utils_link_files variable is set in macros in aclocal.m4 +AC_CONFIG_LINKS(${am_utils_link_files}) +dnl ========================================================================== +dnl This is necessary so that .o files in LIBOBJS are also built via +dnl the ANSI2KNR-filtering rules. +LIB@&t@OBJS=`echo "$LIB@&t@OBJS" | + sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'` +LTLIBOBJS=`echo "$LIB@&t@OBJS" | + sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'` +AC_SUBST(LTLIBOBJS) +dnl XXX: next two lines are temp hack until automake newer than 1.4 comes out +AMU_LIB_OBJS="${LTLIBOBJS}" +AC_SUBST(AMU_LIB_OBJS) +dnl for Makefile rule to regenerate libtool +AC_SUBST(LIBTOOL_DEPS) +dnl ========================================================================== +AC_CONFIG_FILES( \ + aux_conf.h \ + \ + Makefile \ + amd/Makefile \ + amq/Makefile \ + \ + fixmount/Makefile \ + fsinfo/Makefile \ + hlfsd/Makefile \ + libamu/Makefile \ + mk-amd-map/Makefile \ + wire-test/Makefile \ + \ + scripts/Makefile \ + doc/Makefile \ + \ + scripts/am-eject \ + scripts/amd2ldif \ + scripts/amd2sun \ + scripts/automount2amd \ + scripts/ctl-amd \ + scripts/ctl-hlfsd \ + scripts/fix-amd-map \ + scripts/fixrmtab \ + scripts/lostaltmail \ + scripts/redhat-ctl-amd \ + scripts/test-attrcache \ + scripts/wait4amd \ + scripts/wait4amd2die \ + ) +AC_OUTPUT +# chmod some scripts that are built but not installed +test -f scripts/test-attrcache && chmod +x scripts/test-attrcache +dnl ====================================================================== + +dnl ###################################################################### +AC_MSG_NOTICE(*** END OF CONFIGURATION ***) +dnl end of configure.in for am-utils-6.x diff --git a/cvs-server.txt b/cvs-server.txt deleted file mode 100644 index 0943963082c..00000000000 --- a/cvs-server.txt +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -Here are generic CVS server instructions: - -(1) Login to the cvs server. Not needed more than once b/c the cvs login - will record your cvs password in $HOME/.cvspass. Change "ezk" for your - CVS user id. - -$ cvs -d :pserver:ezk@shekel.mcl.cs.columbia.edu:/proj/bank/cvsroot login -CVS password: - -Type in your password, crypt(3)'ed in /proj/bank/cvsroot/CVSROOT/passwd. - -(2) Then, check out a fresh copy of 6.1 (experimental) - -$ cvs -d :pserver:ezk@shekel.mcl.cs.columbia.edu:/proj/bank/cvsroot checkout am-utils - -Or, to checkout the stable branch: - -$ cvs -d :pserver:ezk@shekel.mcl.cs.columbia.edu:/proj/bank/cvsroot checkout -r amd-6-0-stable am-utils - -(3) Then you can do normal edit, commit, update, etc. w/o having to worry - about your $CVSROOT or the -d option. - -############################################################################## -To merge changes from the stable branch into the main (experimental) branch: - -$ cvs update -j amd-6-0-stable -kk - -- don't worry about all the files that change; it's probably because of cvs - keywords in the sources -- after the merge, do a 'cvs update -d' and resolve any conflicts - -############################################################################## - -There are two new mailing lists: - -amd-maintainers@shekel.mcl.cs.columbia.edu: for Amd maintainers to - communicate internally w/o exposure to the greater user community. - -amd-cvslog@shekel.mcl.cs.columbia.edu: to get cvs log messages. I've used a - better (I hope) script for loginfo. It provides different output - and can be tweaked as well. -############################################################################## diff --git a/depcomp b/depcomp new file mode 100755 index 00000000000..4ebd5b3a2f2 --- /dev/null +++ b/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2013-05-30.07; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 00000000000..6e1e6b66a00 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,115 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Makefile for doc/ directory +# Author: Erez Zadok + +@SET_MAKE@ + +info_TEXINFOS = am-utils.texi + +EXTRA_DIST = hlfsd.ps + +# force generation of 'letter' format PS and embed Type-3 fonts +# (our European allies may object...) +DVIPS = dvips -t letter -Pcmz + +# Force version.texi to be rebuilt regardless of maintainer mode +$(srcdir)/version.texi: am-utils.texi $(top_srcdir)/configure.ac + @(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/am-utils.texi`; \ + echo "@set UPDATED $$1 $$2 $$3"; \ + echo "@set UPDATED-MONTH $$2 $$3"; \ + echo "@set EDITION $(VERSION)"; \ + echo "@set VERSION $(VERSION)") > vti.tmp + @cmp -s vti.tmp $(srcdir)/version.texi \ + || (echo "Updating $(srcdir)/version.texi"; \ + cp vti.tmp $(srcdir)/version.texi) + -@rm -f vti.tmp + +# include dvi/ps in distribution +dist-hook: $(distdir)/am-utils.dvi $(distdir)/am-utils.ps + +$(distdir)/am-utils.dvi: am-utils.dvi + install -c -m 644 $< $@ + +$(distdir)/am-utils.ps: am-utils.ps + install -c -m 644 $< $@ + +# a special target for making Postscript files +ps: am-utils.dvi am-utils.ps + +am-utils-clean: clean maintainer-clean-aminfo maintainer-clean-vti + +# personal rule for Erez Zadok to generate and install html docs +alldocs: ps install-NEWS install-INSTALL install-ChangeLog install-AUTHORS install-tasks install-autofs install-y2k install-ldap install-osx install-BUGS install-FAQ install-html install-ps install-MIRRORS install-attrcache install-sun2amd + +AMU_HTML_TOP=$(HOME)/proj/www/docs/am-utils +install-html: $(AMU_HTML_TOP)/am-utils-all.html +$(AMU_HTML_TOP)/am-utils-all.html: am-utils.texi + texi2html -Verbose -expand info -number -out_file am-utils-all.html $< + texi2html -frames -Verbose -expand info -number -split chapter $< + mv am-utils-all.html am-utils/*.html $(AMU_HTML_TOP) + chmod -R a+r $(AMU_HTML_TOP) + +install-ps: $(AMU_HTML_TOP)/am-utils.ps +$(AMU_HTML_TOP)/am-utils.ps: am-utils.ps + install -c -m 644 $< $@ + +install-NEWS: $(AMU_HTML_TOP)/NEWS.txt +$(AMU_HTML_TOP)/NEWS.txt: $(top_srcdir)/NEWS + install -c -m 644 $< $@ + +install-INSTALL: $(AMU_HTML_TOP)/INSTALL.txt +$(AMU_HTML_TOP)/INSTALL.txt: $(top_srcdir)/INSTALL + install -c -m 644 $< $@ + +install-ChangeLog: $(AMU_HTML_TOP)/ChangeLog.txt +$(AMU_HTML_TOP)/ChangeLog.txt: $(top_srcdir)/ChangeLog + sed 's/@.*>$$/@...>/g' < $< > $@ + chmod 644 $@ + +install-AUTHORS: $(AMU_HTML_TOP)/AUTHORS.txt +$(AMU_HTML_TOP)/AUTHORS.txt: $(top_srcdir)/AUTHORS + install -c -m 644 $< $@ + +install-tasks: $(AMU_HTML_TOP)/tasks.txt +$(AMU_HTML_TOP)/tasks.txt: $(top_srcdir)/tasks + install -c -m 644 $< $@ + +install-autofs: $(AMU_HTML_TOP)/autofs.txt +$(AMU_HTML_TOP)/autofs.txt: $(top_srcdir)/README.autofs + install -c -m 644 $< $@ + +install-y2k: $(AMU_HTML_TOP)/y2k.txt +$(AMU_HTML_TOP)/y2k.txt: $(top_srcdir)/README.y2k + install -c -m 644 $< $@ + +install-attrcache: $(AMU_HTML_TOP)/attrcache.txt +$(AMU_HTML_TOP)/attrcache.txt: $(top_srcdir)/README.attrcache + install -c -m 644 $< $@ + +install-sun2amd: $(AMU_HTML_TOP)/sun2amd.txt +$(AMU_HTML_TOP)/sun2amd.txt: $(top_srcdir)/README.sun2amd + install -c -m 644 $< $@ + +install-ldap: $(AMU_HTML_TOP)/ldap.txt +$(AMU_HTML_TOP)/ldap.txt: $(top_srcdir)/README.ldap + install -c -m 644 $< $@ + +install-osx: $(AMU_HTML_TOP)/osx.txt +$(AMU_HTML_TOP)/osx.txt: $(top_srcdir)/README.osx + install -c -m 644 $< $@ + +install-BUGS: $(AMU_HTML_TOP)/BUGS.txt +$(AMU_HTML_TOP)/BUGS.txt: $(top_srcdir)/BUGS + install -c -m 644 $< $@ + +install-FAQ: $(AMU_HTML_TOP)/FAQ.txt +$(AMU_HTML_TOP)/FAQ.txt: $(top_srcdir)/FAQ + install -c -m 644 $< $@ + +install-MIRRORS: $(AMU_HTML_TOP)/MIRRORS.txt $(AMU_HTML_TOP)/MIRRORS.html +$(AMU_HTML_TOP)/MIRRORS.txt: $(top_srcdir)/MIRRORS.txt + install -c -m 644 $< $@ +$(AMU_HTML_TOP)/MIRRORS.html: $(top_srcdir)/MIRRORS.html + install -c -m 644 $< $@ diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 00000000000..e875fffba27 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,875 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Makefile for doc/ directory +# Author: Erez Zadok +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs mdate-sh $(srcdir)/version.texi \ + $(srcdir)/stamp-vti texinfo.tex +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +AM_V_DVIPS = $(am__v_DVIPS_@AM_V@) +am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@) +am__v_DVIPS_0 = @echo " DVIPS " $@; +am__v_DVIPS_1 = +AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@) +am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@) +am__v_MAKEINFO_0 = @echo " MAKEINFO" $@; +am__v_MAKEINFO_1 = +AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@) +am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@) +am__v_INFOHTML_0 = @echo " INFOHTML" $@; +am__v_INFOHTML_1 = +AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@) +am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@) +am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@; +am__v_TEXI2DVI_1 = +AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@) +am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@) +am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@; +am__v_TEXI2PDF_1 = +AM_V_texinfo = $(am__v_texinfo_@AM_V@) +am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@) +am__v_texinfo_0 = -q +am__v_texinfo_1 = +AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) +am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) +am__v_texidevnull_0 = > /dev/null +am__v_texidevnull_1 = +INFO_DEPS = $(srcdir)/am-utils.info +am__TEXINFO_TEX_DIR = $(srcdir) +DVIS = am-utils.dvi +PDFS = am-utils.pdf +PSS = am-utils.ps +HTMLS = am-utils.html +TEXINFOS = am-utils.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__installdirs = "$(DESTDIR)$(infodir)" +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +info_TEXINFOS = am-utils.texi +EXTRA_DIST = hlfsd.ps + +# force generation of 'letter' format PS and embed Type-3 fonts +# (our European allies may object...) +DVIPS = dvips -t letter -Pcmz +AMU_HTML_TOP = $(HOME)/proj/www/docs/am-utils +all: all-am + +.SUFFIXES: +.SUFFIXES: .dvi .html .info .pdf .ps .texi +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +.texi.info: + $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && $(am__cd) $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + $(am__cd) $(srcdir); \ + else \ + rc=$$?; \ + $(am__cd) $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc + +.texi.dvi: + $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ + $< + +.texi.pdf: + $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ + $< + +.texi.html: + $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) + $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@ && mv $(@:.html=.htp) $@; \ + else \ + rm -rf $(@:.html=.htp); exit 1; \ + fi +$(srcdir)/am-utils.info: am-utils.texi $(srcdir)/version.texi +am-utils.dvi: am-utils.texi $(srcdir)/version.texi +am-utils.pdf: am-utils.texi $(srcdir)/version.texi +am-utils.html: am-utils.texi $(srcdir)/version.texi +$(srcdir)/stamp-vti: am-utils.texi $(top_srcdir)/configure + @(dir=.; test -f ./am-utils.texi || dir=$(srcdir); \ + set `$(SHELL) $(srcdir)/mdate-sh $$dir/am-utils.texi`; \ + echo "@set UPDATED $$1 $$2 $$3"; \ + echo "@set UPDATED-MONTH $$2 $$3"; \ + echo "@set EDITION $(VERSION)"; \ + echo "@set VERSION $(VERSION)") > vti.tmp + @cmp -s vti.tmp $(srcdir)/version.texi \ + || (echo "Updating $(srcdir)/version.texi"; \ + cp vti.tmp $(srcdir)/version.texi) + -@rm -f vti.tmp + @cp $(srcdir)/version.texi $@ + +mostlyclean-vti: + -rm -f vti.tmp + +maintainer-clean-vti: +@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi +.dvi.ps: + $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) $(AM_V_texinfo) -o $@ $< + +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + +uninstall-info-am: + @$(PRE_UNINSTALL) + @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ + done; \ + else :; fi + @$(NORMAL_UNINSTALL) + @list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ + else :; fi); \ + done + +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + +dist-info: $(INFO_DEPS) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ + for base in $$list; do \ + case $$base in \ + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$base; then d=.; else d=$(srcdir); fi; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f "$(distdir)/$$relfile" || \ + cp -p $$file "$(distdir)/$$relfile"; \ + else :; fi; \ + done; \ + done + +mostlyclean-aminfo: + -rm -rf am-utils.t2d am-utils.t2p + +clean-aminfo: + -test -z "am-utils.dvi am-utils.pdf am-utils.ps am-utils.html" \ + || rm -rf am-utils.dvi am-utils.pdf am-utils.ps am-utils.html + +maintainer-clean-aminfo: + @list='$(INFO_DEPS)'; for i in $$list; do \ + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-info dist-hook +check-am: all-am +check: check-am +all-am: Makefile $(INFO_DEPS) +installdirs: + for dir in "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: $(DVIS) + +html: html-am + +html-am: $(HTMLS) + +info: info-am + +info-am: $(INFO_DEPS) + +install-data-am: install-info-am + +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ + done +install-exec-am: + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__strip_dir) \ + d2=$$d$$p; \ + if test -d "$$d2"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ + else \ + list2="$$list2 $$d2"; \ + fi; \ + done; \ + test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done; } +install-info: install-info-am + +install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \ + fi; \ + for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + if test -f $$ifile; then \ + echo "$$ifile"; \ + else : ; fi; \ + done; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done + @$(POST_INSTALL) + @if $(am__can_run_installinfo); then \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ + done; \ + else : ; fi +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-vti + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ + mostlyclean-libtool mostlyclean-vti + +pdf: pdf-am + +pdf-am: $(PDFS) + +ps-am: $(PSS) + +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-pdf-am uninstall-ps-am + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-aminfo clean-generic \ + clean-libtool cscopelist-am ctags-am dist-hook dist-info \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic \ + maintainer-clean-vti mostlyclean mostlyclean-aminfo \ + mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am \ + uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-pdf-am uninstall-ps-am + + +@SET_MAKE@ + +# Force version.texi to be rebuilt regardless of maintainer mode +$(srcdir)/version.texi: am-utils.texi $(top_srcdir)/configure.ac + @(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/am-utils.texi`; \ + echo "@set UPDATED $$1 $$2 $$3"; \ + echo "@set UPDATED-MONTH $$2 $$3"; \ + echo "@set EDITION $(VERSION)"; \ + echo "@set VERSION $(VERSION)") > vti.tmp + @cmp -s vti.tmp $(srcdir)/version.texi \ + || (echo "Updating $(srcdir)/version.texi"; \ + cp vti.tmp $(srcdir)/version.texi) + -@rm -f vti.tmp + +# include dvi/ps in distribution +dist-hook: $(distdir)/am-utils.dvi $(distdir)/am-utils.ps + +$(distdir)/am-utils.dvi: am-utils.dvi + install -c -m 644 $< $@ + +$(distdir)/am-utils.ps: am-utils.ps + install -c -m 644 $< $@ + +# a special target for making Postscript files +ps: am-utils.dvi am-utils.ps + +am-utils-clean: clean maintainer-clean-aminfo maintainer-clean-vti + +# personal rule for Erez Zadok to generate and install html docs +alldocs: ps install-NEWS install-INSTALL install-ChangeLog install-AUTHORS install-tasks install-autofs install-y2k install-ldap install-osx install-BUGS install-FAQ install-html install-ps install-MIRRORS install-attrcache install-sun2amd +install-html: $(AMU_HTML_TOP)/am-utils-all.html +$(AMU_HTML_TOP)/am-utils-all.html: am-utils.texi + texi2html -Verbose -expand info -number -out_file am-utils-all.html $< + texi2html -frames -Verbose -expand info -number -split chapter $< + mv am-utils-all.html am-utils/*.html $(AMU_HTML_TOP) + chmod -R a+r $(AMU_HTML_TOP) + +install-ps: $(AMU_HTML_TOP)/am-utils.ps +$(AMU_HTML_TOP)/am-utils.ps: am-utils.ps + install -c -m 644 $< $@ + +install-NEWS: $(AMU_HTML_TOP)/NEWS.txt +$(AMU_HTML_TOP)/NEWS.txt: $(top_srcdir)/NEWS + install -c -m 644 $< $@ + +install-INSTALL: $(AMU_HTML_TOP)/INSTALL.txt +$(AMU_HTML_TOP)/INSTALL.txt: $(top_srcdir)/INSTALL + install -c -m 644 $< $@ + +install-ChangeLog: $(AMU_HTML_TOP)/ChangeLog.txt +$(AMU_HTML_TOP)/ChangeLog.txt: $(top_srcdir)/ChangeLog + sed 's/@.*>$$/@...>/g' < $< > $@ + chmod 644 $@ + +install-AUTHORS: $(AMU_HTML_TOP)/AUTHORS.txt +$(AMU_HTML_TOP)/AUTHORS.txt: $(top_srcdir)/AUTHORS + install -c -m 644 $< $@ + +install-tasks: $(AMU_HTML_TOP)/tasks.txt +$(AMU_HTML_TOP)/tasks.txt: $(top_srcdir)/tasks + install -c -m 644 $< $@ + +install-autofs: $(AMU_HTML_TOP)/autofs.txt +$(AMU_HTML_TOP)/autofs.txt: $(top_srcdir)/README.autofs + install -c -m 644 $< $@ + +install-y2k: $(AMU_HTML_TOP)/y2k.txt +$(AMU_HTML_TOP)/y2k.txt: $(top_srcdir)/README.y2k + install -c -m 644 $< $@ + +install-attrcache: $(AMU_HTML_TOP)/attrcache.txt +$(AMU_HTML_TOP)/attrcache.txt: $(top_srcdir)/README.attrcache + install -c -m 644 $< $@ + +install-sun2amd: $(AMU_HTML_TOP)/sun2amd.txt +$(AMU_HTML_TOP)/sun2amd.txt: $(top_srcdir)/README.sun2amd + install -c -m 644 $< $@ + +install-ldap: $(AMU_HTML_TOP)/ldap.txt +$(AMU_HTML_TOP)/ldap.txt: $(top_srcdir)/README.ldap + install -c -m 644 $< $@ + +install-osx: $(AMU_HTML_TOP)/osx.txt +$(AMU_HTML_TOP)/osx.txt: $(top_srcdir)/README.osx + install -c -m 644 $< $@ + +install-BUGS: $(AMU_HTML_TOP)/BUGS.txt +$(AMU_HTML_TOP)/BUGS.txt: $(top_srcdir)/BUGS + install -c -m 644 $< $@ + +install-FAQ: $(AMU_HTML_TOP)/FAQ.txt +$(AMU_HTML_TOP)/FAQ.txt: $(top_srcdir)/FAQ + install -c -m 644 $< $@ + +install-MIRRORS: $(AMU_HTML_TOP)/MIRRORS.txt $(AMU_HTML_TOP)/MIRRORS.html +$(AMU_HTML_TOP)/MIRRORS.txt: $(top_srcdir)/MIRRORS.txt + install -c -m 644 $< $@ +$(AMU_HTML_TOP)/MIRRORS.html: $(top_srcdir)/MIRRORS.html + install -c -m 644 $< $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/am-utils.dvi b/doc/am-utils.dvi new file mode 100644 index 0000000000000000000000000000000000000000..9fe4ff7e4dde01330f028456f35944deca1dd05c GIT binary patch literal 622072 zcmcG%37lM2nfKr6x*b6FMMOb`fF^--cRDKsgLIOHG$x%)y2BztsP3*#7wN8Qs;ZMT ziwi0WO3dX>%95HfxG{n#BBHX$xXg?TI3nXRE+7>M&IpK#3Zmfu`+Ls0x2l`)zIoqy z|9swgP1im5EYEq?-}9VvpKYG@?(4pG%&ATMm-?@xkL}Bxdu)EZG&Wv3cHZ2M1#KO3 z+vd+*(lK}8$seG_G&TF*{r5NiyLRXAo0_)W(ERTC^RK<(#bdty-D|H64?FbCXU_V@ zk9%%tI^v#-n+~9x=>wzvTRY}GaaQMO>v$CLAI356lZVSroMI_*#4TUn*t_v+eg2$bN}mazV^CluRL?{GmGBxyNf28 zUh&NQrdKdT%fM)%V{Yw?@NY+E@`ZBh#-YvIzi?cpP|W6Y(W16_bE0`CM{5R3`Tp&z zA7&ISdfN@tKJuR8wa;v@$sRN`G-Lg} znrI(Hm2DsUAN1EfI%XS}O^-y&^CKgfjhQGv6!i{dGr57xoTyJ5pBZ4R;aq+szi}dZ zW3)Omm>tOGGXJB2`-U^oI!4Q})up1wEb+_wTy}Fs+*PVf=(pwRk?c^ukjtjqw(WfF z(2%XPb7VxMSjYCbm)B*AnF8+((&&g^A7_o$vV)nzXtpR$t)|{`Kq()l-g4kTek_`( zl!miK{WX|p@dM+dnOszw6Q(X$moHS(xd9Ei<;@iLfV#@8H~mX`O4<(Apg=U5!0y{pH)gx zE?>$HWQ@m)rF1F7toW7A-46MssPibB8yFd`VVWv81 zE2Uz!`45k4d!d%!>59`*Ve=oplJ<&9dx-`qX;1PaQE@z5%CIR%4Q&}leh=BI)|xSvjh22de6ecl`WNgnP1?{(c+RY zczU;}J~rMzk}VEr26=R`9*G21n(1M8ZYUq=M`rWffAtM#D#Zlk?gIkRWI zUMWF5=Hdq(OApZ3CZpEIOgYv3*sOHqR6{-&rkWo`E@HlbvXw@NuCCGa zKyh~4wLAYh{oZF%KaFl!*R&7jLH`$E-4=hYV_Uf2@ekCN!4Z<_QHiC=YZ{ss$NP~+ zB#~VniFGZjEvFuNRWUu9iI{h(ntJ3&*(Pl_DlJn$d8NiUoMZ$$h1e5xWn_f?(fr zQMOd9tEObjdD^z^rdYn$VOqVA@Sq%A`GERFZB~OTe;{sjOr#(CahIGC8ZFKVgFAn1 zoCDkIe{n%8qf(@U*#idBnu0Z{8>ZN%lwee;D+CsKi!D>SWJ@2yA;?#@WRX-PVi509 zOA(WgW=c!8-3YTCHLbM+W}NxYpP4*$bjFTL^F!6tjtM{K0h>;yGAbonETLFS5EN64 zmX!0DhnkzCOvrm?q@DLwaaIwLsr*6~Q{AG>N;104sa0aa;C^meiQfb`n8`DiO&_Wb zjHI)pnL=AU?RhUV?e9GaogHyaFGlqVi%5`k95Hs&uJ}n;Q{Q`XkCXn%ziZMJKVv`H zIxWk=n;x7rU-n?ie8b>P+IWrEXi{xYrN`UZac9a#Q980kML!I)mBEp-A-cqhrLKmJ z_53Ezchu;~$S4%b!M;cGztv#hSLUSS%)`l4u*2z8 zbKek!y0@j*J=;e`W9zJeW>JQT8Uc`l|3y(WGkmi6%1vaamzEvGJcWAB|6?(qxyr^$wSG2C{%&wlk-l(%@MYMcPPv5%kW$XLa ztm}<7boOc_9Q^Ly8RgW4$I_yjy70Kpp7WxvbJwox>g|oztc$u=uU*yMwW8vOTG!dr z*WJ~N=WyY??w;kV*01R9Ide`#pOv09eIebf>RxTku8#YdO7QIK`qm)S&yH(4zPo60 zchQgUF%?k?p57==h@WH=^^{lCMoef!{-j$uJ zR(U$bvo?B_n;*Yp&AMvy<6oRav}Ik?W<~*t7vr9Q19BV<=y-nGIv4U&UKaZ=0NJO`Kn_Wthej$)-yF4RGY7Q?Fu%v zb9HBQW>;@zR-NFq9fIbb98kX8{ILlrFN#NyyW0G*yVr`CYnHEH*R@(pU2{g%yM9@3 zUw7a7zOLxZHEUMb{`PjQ6BC`?y}YaU)XJ(g360s3=37>*@9mslvnT)(!jdri-5`srG^COQX_v&dUkEbolyc7>lj zY*!AB{{5PsYH;-LL{8WQVldQs%()_R8ymnv#~gCb$}S$ml|2>Pmrn6ZpFQe@wU_s4 zdt#c$@1@>QX2PjAY=-aEZ(lX_hVeQvqn@raS9P=N%e&Zx${GzIlAP1s+ci7tT-VLA z&ctWbUi&$pQ~d zj8-%l{_CdoT=Cn5dv;^|8`Cenz446(uZCa@eR|{2B=1J9<1leTWI+YaIJS|{*ZkCM zZrdl#0crd5KRmPem%o0~)=9BdsblW0;gUIgTefUzOM9%zygqFlVM*;gZCZX@!^(%; zm~jro2>oN~vA)jn$Kpf{_z`C1C6koXtX`SRuDX{wX;8VE@ej#A+Dhp{+r~@d33U!S zmmqCWL3(6tI6cSNpc4O(%`Id`GHK$`#>qM7W@?;<8~lGVqqcYs>oS|OLLWqxg>Cbq zE$}7)!dSXsVLf&;TF^FMSlzk|v1H>!;y&tKJolxAZS(t!gSkv;PBl2NI~|F*#8Ip) zOg(qUWU|tBPGt+;M14Fp(vXbDKR-r4iWUo->}A7T*qnLWZi?}##_9MK)n`*XXHnbS z$PEytYUhro2Zc%uX3Y5Vzc_Y;&;1zwI`$Q%OKPi0EYFVukrMKHpeb6B5m{Ps&SW}) zKG1W7RrkCmKNP0!IT~ncd=#%NZ9YikJrF&a<#==Zq5sytI% z6r(nL5nkjy`z13t9<^6$v(Xw~e_tA3@}8qLsv9PfqqcS!;@tB}rdZ4t{baOlMyD6A z^@HtLIj?>D%K7crFTTbGs|*!KcC4J=wtex{HfV7?H&N{0zH(k0m=r@^zxe9GJWtvy zmkRT2b=|k(;*8}LLAP&Td`)e3TiEjW-^EC7m}0a{F(!!jX$&6?-ksXa&L$Xa$834R z1gN>nI8In8@Aw?AiFkP=Z?6)X!t#n>D)PD&fIA7Dx)FZOZadfp)?NyOAHCVHyxjEM ze(h0vx#`~TvGTC#xmUDB1H~%8wh<|7)s?o0HS0-xRGVE5eso%Xs7wdFrMxGR)&Q40U;PG@M1W@o9%NK*;WfmaI=qP+N zo+DzLkcNuI3eZI_p1%^slrKyqSWCwox%|;+o)BkH@ySRrHVf1DPP-qr&s4J@oMA8i zd)4knvv6jn#C~qnB;v0>Tx z#;|4R^mWK?aXyG=aoe_=%qxcAwPhIy0)WrN)#*fa*0NZeBd}lzde{&tBRPqd zZ(p|l%-*)r)>3V@Y$jj|F8rb1h3_6Jr)GU>LgG4JP0hOT09Zav5ReCJGt8?p?4)66 z94IGp4J)!&tSt^VG7jqPydTKU%tNL)KqRB6fhVk|;uu2$CABE79Pb~^mddGzf0~Y1 zsCuJ0l=3SsF4@s`YWw!KH??1Xd`N>!$z7n3Dno#X#fc(FuQU}4H|3;$HlwhX#SLQ( zM;|-rWBc*jjck7KxW97KyAEo*e&Ecwo3?QJmv(fHpks3|jD>9@CIfhNo8AVvK3)!% z|5=MK5`%eS6g2-ZSpHmn30|Hy#9K5YQZO6MV$=N$oC4nQ%41Os+YfPjdi^1%$1lW7 z3sVmiYJf^am#MFHY*>wOiIY~*TXDwhYU*qAE*S>_=O@Xpmp&p-LkMDHT_?KRJtEaj zDYV}K8^^)i6wrqIoOF91>YLzoQ*+#l!?oDLDBth&U!~uaQDHon^Fta=CoOr=uJq`j zxT|$@ZKn0tUGhscQ!qY4JpJ}xZ7gKc*tlxy?T-&lo!G^J!;XlR_j!2GYZbZ%qub2WJW zKej{|EdCt^&p$YpE)7Hwq(aJrKZnVhj7*SEW0nH_2HV1Ye|~%y$V*|O-n>GFAzyH8 zEFW=B*s|uS;e50u%BZEERB;r8gbK)9wgr|hr`C7k_*GNuPX`5vfc1x6I%PNyOd!C! z;th)2z!>_mR>caE9P5YncKEyQX8N&&G0KS6RYB+azLiAWP8&ds*S>RFtkOJlNv#=w zZS(d+t}!HUzWRLvv5FaIN3pkTJLvx=fQmk@|>pjOQH4Tbn5@3P%9?-@bqawcfh@*G=2P zrMZJ^>0Az2c0idSSgV8sbK?*`wE2K$;7v`Hl(aDAWr$2Hhxqun&!601BRBcJU_7=C zDG=K*2#mu9OqvCb;lQ}1)#3@{GFze{qyctz#7oAU@@iIz5I=hpSB+|;IfW^*W{XAK z7!rB&;cXBi!z}V)aK}}G;$vNm7W;FL+-tm(JKpD1P}ubFLAWLlAKYGTy7>pDBrEYu z^vvtnu;rq2ydt90SP`ikSd#1+5!^FU!mrEW}hD%66h$gceQPPY_gD=PUcwuu}htt;coZWYJU*eId{Q3C2B zE;dd+=dunO->)AG5)KmS8b^SmOr?!g@=Sy$*^+=|_FPo#ZJ?dry>kHgo`{CiQZEtgd*>#8h)N)-;u2xp7QmX@saQ|a%5ZQ*xn<^;wY7)^ zFUt{SHhn}1gX_a1?+BgK3*xcT=c4FHJ>EevyvkcvXi*c%}ECJ!M zBtvl4lZRXJM0yhhWfy`ck6 zilP|78{<}bM=vrpIisozf#~C8KcbEzdHLWg+vd%kyCCL=Lp8x~76HR*52o(S=* zQ3Q-Cm+7Y+p=rgMn&|IpIcK>$)l_XeE^$NASORHG{31?-KlXWx&0LkQ^)O z^Z}(=Frxcd@p*kSIh$~fVlKA+TyjTo>Nm>afUtegAPmkOU4C{i|8sgVmmY&1Ar%3G z;XdW2@cZpyQ}{sp^(K zOrQ|7-Rv|t3&*0PFRMY@XM|g2wAsEGLkh~G$SgB+oL(P`sr%8;F!*+Pj1j@4)(k@P z=UlvtsLkMx8@!y@dhd8El{5)gVR?4SM9ir)aMi%(A{>vr_)Twm_ynl&@bUbAH`fyX zAK{9LVsM-`*6nx{@3nKV+h+Jmk$v|f6s5^guWO7(Prk0{v2PYT<03N#nObC~4aHtI z)|gGHCqc-NP&4S#WLFmQBZLBB>dK7?Rq|IXDgKau6Ms8^8+NzNu8IZoH)~%E23IrYXYd8`jL~W=}`bGTMWK*fG50 zH|+8dU1Rs6X=fiQ;9`_2xvA@ivu!)p{@uor@yzz&;kIaebkJcQwYJ&ncSSxoGd6=v zUawD?E`=EnJ=CC^Bvyqv4s}Qq0|48+R6|Nz5$BpexzG_ZF3JlQ9qx<9-n6XMXN^1$G087r6LAA>&r4VxbS6W-n9 zf5f}H?PllQ4HWfjTg5?7s0f3eXjgfA=F&~I*=1heQo#IF>5$-DQW^n0C1@7CS-&+BNNw|M?3tta#FgmY*0PH07$t@`Uc7`p>268zI=v0~L!>PP*N ztrb*LmKsgwkqf*iJh!+i2`?yJs%*?x`lF1+uRPnrPkvO(xd+GOl7gdXI9)`EzWEP~ zk`R;}5}{x*U#2B~i`D5wT5)j98Wg&P%08sGcfloa)l^-H&%?X%#^`-)&_>*}OpLCS z6xyn$Zm=4>_Vds)8sA!xRuH3~`fe%(S)nVs86m7yx2oc?IzC~HTf^YBx20p^rcu$h zeq5SJPyl6nvSAq|jN|QAAdYt`UZ*E)L9Uf?<#TL}JYW;Uf~twxi~rtuOQSyRw(u=R zoE)4t*75hJ>>1AMri6F=8>K=%Y`SJC#RqDSz$CSIow;hT<^9hr8T;Javl$1o zDYhHLa8g+Z&9)57YggQ$fZ~7xDz*?;(G9xf%Xm&>$+3*h`pJZ-7c4Io zE>edo26gCdQYYimMuTDS@e1oxjwTe#10#oY!USA}nf`DTiSvj+cIDtJ6>NIE44lvp*HI>ztHOqvP92=U z^~_4aP8d$Wiyz)yBtWNV8si20azwE={*%~66*ua95SFwc32!&u&N;EPSViazJr8LL#3=&C;csV%!HWNJg!Urr8Q# zqalB%Lj6l3fayYiwp6fsNZW;Q`l}v|>EANA2V+d1i2a)0kq(N1>32876n!s-1*{aBC33(h#V`jwx>Q&u?9bfbUv7giGc>eM&SdT^N7hfS%7nXS;$Nt zMFzrUpe)9f469&TfQCT^EIgNpO@n+=>+H6oKH8|MV7e0@)U}Ec+B%<_shvu$mdy{> z*elr2RDC&Ezc7cRzkUJCLvaup9%4v`V6dkUXOK-{ES69)(@Gw53@jBbrFYq6=`8BS z3;FS4bf5t_1suoq3lbTX#fgoB4p8jHe<%HQYR+i?y?Bcz^IqL(ReUn*x@qrzOSPk8 z&$h(3X*3@QOgZ(33KCU(yTM#wE)Hk;p+1b0e&d z2~P!_ui*Ay3<%-JkXWi946b+<$Yz$@Q+Jdj#;eOspWjC6quTU7k2yBvfTOms>3t6% z^TeLcB_;Vx*D#r%z*H8-1^TTO4qFtwBYh-YUw_uEQzPK*XMN6PdWeDP8!yyHx1E=1 zL+Qjqo8q|2sL?#06v&%PYbng~GZ3{p=FXehP=?w!41;eRrfmK(#I+jCcocy_JS51{ z<6|BimLik9q&d3-EE+6JNfWVak{{_Bq*OZH5~?)BbHF1=j|q^o&Gl0-J=XlY?<7ok zc(LY-3z~oTZQKW*ij>dyQoip|es8RGz{3@pQl>7WXs`CPbi0P>M%A2VFZs|*z9@w1A` zI}@*q02PBF9gam3F^h+<(b^sht_jAbWbn1S97H!8m_I;tzVs*&^)7U`rvb zGEX>7kc_F4#USyH{pk*aRkIQlI9S!2CgKLap0jbL5q2za zhaX4;z-tdY9?M+ImmaEV{tYr$KQV>gC|KpTN~$L!725=V|0nt@Qf%WwZAm@+WOW@l zIdanE&d6gxb6CNWGbIIi!O{lc`Ef;>XVw^CCpyFiY3%u7|gsC5yr`tUQlMh zHeFN+o2qvM^O$&g?w!(F!YeS7S&eh1266Wjm(DH+P2V@_H2u42UvD1ka!^UgG-IMR zYhl|~75zN*s?|=CZP-}sD|KmW`hF~JAXQ8k5rcliEG0_&(d|6PUmw^7_YGyqg#!Tm z_3@gE;n<(U-iucqoo#TeWnL=tITLl*Rp|-|@K$AW!qi`P^YSFGwleD?q4?@EZ2H+g zGiQTQxtaP=O)&pfj+F%iy|QNeq)gcu@S5b@`{`0iuiPb1;%_^&$(fN6rMt8d&YP0r zIbdrBaG~YDM>;X1iFE+mEJsAPITS8wuQS+ifX(h4<~H7stFvSLHs?rJ(*bj ze;k^nkn_7U5J5W!qjgb0fFPQC>yKb$sdNZa-#xCuCX1oF5A6e6c**pX>DPKksQsv) zE#t6gF>#Q}!ShEbH}U-8OcO#5wu*nrmiD}eV?lz@d_|sB;8m6M!OFYZ34PngwhTtK zoKE$?9V1Y;GJ)!Q{&3FSj2Ae@!#jSFRC-`;O6BHjJ}opedq8He+I-DTY{M|7>K)xS z_elVnkPdMsg(O9kr}Ht5VO3O`$>iwkCgFe0*IXnW;8xCGpB7$1M$C`g??mc_PRD^L z)pF{E)2SP)KmaT`=9)^BNN~KVA<&YRT{&6v$=j@*m1M{X$mG(BKupu8Ug!kJu2(_& zVYQQ%)Vx^f0<5{S0Nwm!S$c3B@M~Zk@16(ar3mc5Uq7amVWCRXCsK6&elPx;w{B`| zci>*UMUyxGu`#w=?oNoR1gOK(2WuSXZO&%4TsN)rH~V+Y-*dp%5$^Yuzgq(mGyV+~ zNM^PW`n~>biw)L})l5bY{hZ7=X4LD(?juVFTfF@6HLa~#> zsP;MQ;beIqK7{3Q>f0DpuSf%WR!|l2?)w{YLh+DQ02xjgJ#+Gd`+xL}39icd$NrAF zkBXrkE7xY7JUg~=aOXc9)LlZRT{tYrP0yx44Lrv@4aVZfI?KUZuQJ#~2xul325)_D z0z16*Dm2ZWUOWklDIN2I=?s3g18K8;|huk;$TDP0F0eDUVPJ` zomZQipOEYwAE~)8t{hzOn?d}ujo^XR;DV=7m{K@){Qh{my>8*oV=_|#N zBfxRyj#p_<=%urEd1}#}PY1vjp8|*@q*(I^*@at%tHFiyygkR@khTef3+Im&ggXo9 zgHxE+zMY*Bbw(G?FH*JP3Q*8WCByJIvur^Zf1?e>S!yV)t`I6`kpQ|WW$Ly1C=@>U0Gm0!2_>VK99^BC6fO zz(prbt+b(zmjcs4cRUXV)Q*fpN_H=UH6GTxqnX%8R$$11gRHCXAtOe3kjh*zrg*t% zE)zw7Z)@1`JQ+o|FZ`}LVAJ%f2*#p(yFK37;C=hnQ2m*KXcLZM<^nTcj2{i_FQj=UDn__<6k?}2~#N5 zL{y~t?*S`C`)tWYm&M+k-@%%x02XP;zQxc6;^T!Ve)dTRQzpJF$;cqTbjopcw)M3; zu8gyz9c>-qzOVks8R3i6ujB?Xg1PM(~bf)-O#q&C%i3iEu2Wk?B8BnO4y7!~< zIjX69cN(kh@r5kMK*w}D$3#&Cg1e~zr6evsbp&^!EZ=xlpW;rJ^DxB{(yIlQ+6zx< zIqzq*nDUMsmh8pb1jSn0tP7cqc#ynj5EXlh%PBFHJY?L(97LAtE15TgYptsb*R;Iuhf+E>ZQuJ&AeoPddHjKWiNzT`xmkKsDmoQj5qimjQ7-PsYZ zio}AQzk(7~tU4!W8oI$@+wnq|$LZ%gGi7K&6{Z^s-{eYsLg|Au&dk&=55O$gj&WVZ?Ai^{a zQ6%u14$4oKlzAp8_2gukiUKSQfiA+MgFo<4{VYSGbbfJpO`Z^z|E>q2L^XBS53I1e zpxQynZ!x2tG!ml^(9@P|PW|&!rkZH~Aaf?ZAzu%Of?N|@h4iA>*WPlJVe25Arwy+n z4#VZtvo|KRYj6~#9Ms9P|6~F5ZYo4={_=Q#@Q*9S%i1($V50aT;EAp*&`Vxoq45-n z9ms1AW?!{2Ze>R07^%~OdA%^R7})_qXIv>{Vm>_TyEc4r&h0y!&)?Fu4S;vQbElkB z+ZmgrZk+1he#C;{YU;PJqZd}2H}ryx4i_WStd<1P{A8;H8c4k%-kz4jme)p^QOWsh zYFZ+El_45>hAcaUStqa`(KuNQG--MMz7Ux-yD!A# z^IdgIHed2t7se3r>@h%fTU?KCkd)uG*W4?W3BjPsVCDcFQj5tAaFGSrhNBAj8^%#i zQ$oQoc+Eef-#MCqc4r%x?C#{J8#YIiy45B!cfXu5ub<1o-P{YM2Vrpcfe8m83g&*1 zO+_DYo(Xs3AjYCV2Lw*cL4_O%}?kqonz2(-P? z``S-@4^AWK^rWz$Z%GSt>y51h#P@4Ish1e2Z`2hrQeqR$LZN41nPESy_}AbWcG}Pl z`OU02R_r=7W2VjxOv!>BT<~6IeRuFI7argWEvmu7105sR{Ypq*86=J5yi7LX>Ic>( zPN&&Yw}eFDg>)h^aB5NR0e5F`F`b{Y)Wfnfp>s90Y^9lZSsq)e6KgxWi0)v=QM_tw zI47$oY)i@G2?y;REO0va7;!bAld)RIg6o=o z+5OW58ACw-Pb)K3-{!S5YNi@ob#+pAk6OMrbcI@!kU6A8Zb3ym=PDsUk?#$)J$T@6 z@A3tSac!B(t=l)}M|8DQZDwWE7yddmI0*`nW-)qLobkUlIi}2IO6&C{TnmD&a+JpR zsmS+1jp!e~`~}T)$X_5@Ln%eezehEqEPB!zEw=lX{{li2>`6s7R&zNa5XTICAR8rgw1eA|V5E7+W97a{51DsM6Bqw=FJdOsZR~}}+?!8OvR2X5gUkwYyn?x4sa-bzN z$a2N&Q5JC1A%FScBnk#U{HENH6v+Ne5y3c{$#Ds(X2H$#D zABijR=qS$GKrc)VKx+d#rZD~DA{1e#slR+m!hj{jbx}`d5`_pjUM1XZdFcAiF!h)1 zyI}#9@XF4A>LzMk9GL7(q#wk>TT?yi)l*bAU7dKa%O}Ma@WexsX`{l2{}Vep`>EYU z?%DAp{P2j{U}nT>#U_s+OqZg0X;c$q9W^}hkk~M}&f*{;DM^HMsM0X??aOP-gTU)= zz2xWrwr*&=Kt~0mSM2qnLiw%A(|A!3(S~C3$*kpWX@b}WPz}nk{sxAJqKdEQql-k- z&@`E!&l~nBx3tfHQ52+e0Ez5U%zx}k>`9h{maj9VnGS7^q9Kp%R!{aG27m$)Gr4sK zYL1*NZP4t*eU;nfx4~)zG$%7Iti`PfI*#d(gpZyn33PA@iU+2Ea1*hO5rJ5iB3yT! zLxZL}2T!n^`q7^$)B4eKepMg<<^k$PLk?Y~Y7fPJckt{dYQTJiFb*W}(*`_`Pwbfq z);U$H0yEfzp(kbLKJ%_bfRkM@|9M2`N+y!JFC9DG=c#rJ|Fvm`jo@90fw{@nDTEj; zpuoto2A*aHtho$bIrV|t*oSKB178pkk|9kG8@?xKNh*(4YAhwWHEZeH`W9LD^0RU9 z3DoJSVs3|lII-g9%t-UyKk%tn>KmHxelQsh?d_K5?tfGdIXf&4XSl$j?)^6!(ny9> z1Dg|sbFM|Wjq+axe_haYn~c`JWgsbE>hfR(MrQ z8%t*ko=d~vn~ReX;)*Dgju=u?8Bsxu{4>#C^Nc89ag?WOj%8|OEzpdZ=Hcwh2#DMi z<-1VIca3fsKyAw8rAHJFtS#Uzs|>Rd-HJJK`gw=f^1>MP3O2cA@vy;&{39#2=PFfK zOj+d#88`i|nS#uE9-#_@XV%z=TUJA%7%ByK}r!_ z+T0~|iW;6ahz`5ZSH=4)A(4JdiqxU5F#a0ZmOGsdQc`=`aS2>L@S}p!ekf|WpMqi z8e7D&DBVeLCBD1@djIr~-9xH8Olng=*C6Sxf91V$>c?M*HC>qc@oh=iAR%ztN-C}; z_jSzlk3UtM07(~EPK0E()CrPkX1dOWpz6oPdP(?6Z;TdO3zxdJj^A8ag9b0B{_T05 zlOIq;jogT2glg*F{>#8$;HUM4;Uw5u3$XzrKl#{hYhV)2{d4uNW* zSP|fMCQNLeq4TYE1IOX>us4TyB<54Q0_7qdx5KQ)#9=~nKc4K+f?udkSLHtVT8DQ4 zLpHd*mEG~MtzeZ%<9r&EvM#z5OM@e&i4JdJqBPnZOW|bBWMjXxI2rev<7%{~%z1b- zB^wpFTKYFtF*r2%lyMP$l^>NRR(f4tnc*QqQR11!Y%8u!C_~~HbQ!MJCSs}OGMMs9 zuAxZM_d;P~xHg&H><`!M&PNq{@ADgoSWfNpRHI{RJEy))vF!7&Vo7ZuCy(FsbvwT4 z1XR^A-sLwn?i~%4`HOmj0{J}#4akWGD^9Nqn5tnneR;P`obxn)vx2J#29;P+f~|mZ zn*QaHUisk0Mb%(MXI6OzEjEz}spU zDM!0UH!*4$>BCVETBfSC<$^wrY zpyS4%0N8+GNEUA17IT#nf}1~-SOqCWN-U=GrP_!^umsxRaG##D`w+tVPfh^~;8WAI zRpfbI5)Sh8O%_*8T;>fc7?|w0YD(_>6g@@oEOz4QPdi27+((>5c%o9*No==+Ff=as zg*20UJ?R!Dsy=*@&)q7{<-vRN-`cK5NaBBAsjzTLrGgL$t@XhR8W9{sFTQV~ntJeU zCU7Q3b?HK}6v-ZT*yXVv{9POf`TFS_lV?33 z5KYr2$Is(CYdVGpS^@j^{t*BJT}A4%_fHL!u*FfagW~!|Ka5By)cDjcS4CSAaA(nD zy??5oEdoH?LfM5~o^CC$^Paa7D|q$1MBCi_b4Bw4H>;_uI}F!s7>MD2c-&NgCro{4 zKhdtC9ej=|@n?yMHOOmo2QqtvdrQ|aB2WD+2B^nl*4hC@O^TIu8XcD+c0C<9665{~ zoMcLLM}Y-Q@+n-*@{*G>(~r8RhLe=RH$|O2d#H-2o;^$g;4~mik#G`ct&G={oTXeG z9^!%=LkfA(rJPX^PJK>$xS4kFE`m-v2*;eXt#2fQzKS09b?wQ>s_3 zI#^t8wVK|Sj+7WnoULK)+6=vv_**Zb$tupC$5(Qtjw!Qy<>u#S zz%qtryIo9Huj&`#V~-=-^jS59R^z*BMc05RPNkBm@~0LQW44bKtbSz}|m+PyA3F5UsbMb6B) zuO5_BGoKM*+&sh7%-@?MYEY}rMDW#-Fx9zKyx`Tk?i*1%^T?2&Mw$y$ zPVcpK%!rNhu^l9eX=s4Ub=M>c_tvE~)FZ)|KF)yct?aIwYz&jtyaZQ#CRX9f^j_=q zUQ!NR#O@S_$SO(c^cUs+IsF!Ug3R>jk5ubk&tiE!ovL2r%>jkr>+LA6cY+$79(Nf@ zHTB~!3Qz+F&Pp2)&fH;lfU)a3AXSuRL{{ROYoW=BVpU_Uo;X~Q)3=hPKX+jb%367H zF@~69+#=2cN$WH4a5Z(s3%*1PAu6zzUpp*XbBj_wfw8c`_vA`ya(t5_W$7AI&0C?nY$f5Hi0<3UIU- zBa-=6=e7L45V&XfC?C_Yht^2HPnW|dQ)A7-xA z)aN%Es>I1&VD@^Ur=CM*q*P*zAEUd0d^%Py?P}c;3H_$9aL_(bQgMkDyQi?yODK!Q z;kMn5d7j$mw{oWFufJSl$khcHx5M6UHzO~YH(OSl<#U4Kk;km?IOK8$oq?F%^CCwh zeO)rSEzW_6xl0#jb6D-o=@D*h(H$Adc#GN=ww)Xg=vzal(zRjJznpe;Q`6Sln^G&E z+s4^*nH%-tc(j^&W!aOaMgGtmbi<= z5exz46X#wB*|-Q(?oGjpa$`${=WUgo(jS_66jN$`+x#}Z&=Z{x8H@4tsPnmB!b9Z^ zMZe|LEl0 zN9V8OV2UT5dMURodaAQtgU)V3mX_*4wrPv!gXMkbk{*3Gz@(J*ssi5~nF?DLJsH<3 z+0%N#qyhqPa6gWdAZ-vAd9|GKbKE$R#le4{2-daAV9)Wba}rc(`YV2D4xLN|RF`in zp?P#XR`>I2vtTASav1#gNd{5T(#BNVNyCb-S<%n0&kltx7n62n$ro>@rj5$;g739b zQkPX8yIye=fp8@4s4+MwUGZL`UbUqvzQ7mEL{;xcXU+FcZAymBRe9Z@GFfR4C-v`JJlSWEOYc0E>vvgH0NfF&?F$Z zwx0WQf=}Ni^zqYotN6Aa&qob62pDXYsAVpE!x`fU0G7zz3kgFW&m-}~*xaXA0?9f`F(6!@NND}YmCDFdad z53jVUvp6UiM+&J2&j=X$5a! z35danTS#G05r7@eZ}jDUGJU)$NGdpdwQy}Ws3)c$SH?9My#%U+!RVMNk708a^~sJr zu8e)qP0v{6zzCnC!`0(2)@Av99sR8Gx1+V(RY6i#f!9bT95Edc-e=xlyJHm9O4Q1! z4TlpFrZya*)-JDV>dBT~q^4Pw06fsW6}CL>5}}Yck*SM+n>aI9+*^zBE%-j9XIwcl z1D>lR(8xanzBg)kLl?P?IZUjNp+av8xFyC2_)II2$iXbWdYp=hEHa58oNI(`X=B`+g_MOHDtr6ocHxxMA>z z@5-@LVnQy1<&gfs;RuIpYbq>Ft>RHBN3D*ekUUxx|1wf4|>3@ z1DYQ+h&V&Y4@&W2zzR9mjL3-&--iH%g*|)FHn#M{|Bh>;Sv4|J(v$|G7m^ zIBgY(og*E~VFH6H9Yu2tzarrjR^gEby$U-!vGx>T9e@}>`sWtwWR!1bR?9CNZy?}K z%eWFl*{B?s(EL;^>*u23?E?sSB!-tEmzeS=PhK%j%3Yo~1l5k{J#MrR(h+~?5>D0a zAAYdd%(dKdVod{I^A3ig_~4xy$sYlTeV#;KIE_j@kVV#-lmUd54dnk_G9S_#py^Oa z2RlZaW?-kUnJqr`L)Uc{+>H=@c$Tk56Mx3{OF2|YJPbDR;h9pH1hft&@QD@!Uantg z$*C<_<>)^=llBmr9Fr3T$1sFXF^MG-?yl~5%j-weu6UiuR}HRstxD2Zi_g;O+?AX` z6&)%dD44@XaQTJ%6Dcqi>8hEHYLgD9sOf!)LmnDFwoIilGugV-jP-{5*QZQTJh(GnJ zkh&aPtbDF;e!13QtyoU91G>n$_{ox6J~*R>0#X?$%+D1h$q~(ZSpxK}UMA}_Uc|0j zXRb%T>v6y3)NQX7LVero;@)Dn6Is6fJ}w>Sk+f9ZQ?9_Dx4{=^JQpR@QKFsFuF>L<&a8i0xal8D|@AFXW^a;`Gf`~HB=aHs7@GCAN9GtbEpdmCSR z2f-JIK<$e3?0Wz zfct!YWpcl8l!ZSGN*YMRvmY8>Mg6#GG3Fi2?Zn$6;7o2JirpC4q8z;L>Ntpa-NlKj zL4}=h#u_n1qE^2*!}i)Mwnq8tFI$ko9T4xi9IK%Upi(J0!E* zeDmL1Et;7On(W|K!tsJT=csD!EcXWKI>=;M8c;3@y^Uo1sR-qgKbLV6d&r34BjN{m z@=7C?gMYj-ChoN3Zmx0K!0v1*8sBnP6xURs3BNhd3}M_W-B~6bwPNQYVka4>U#kiJ zaXIL>k2tjVf^+V3uPpVKFW0!}K_Ox#jlj@eTL9O4CF-VyA@tNT=BLPdk%} zreN9`>~&-zf+721%WvM%7#at!deN!kX=jr5RgP;wX{$0X#uI6o@jL967*Wa;L$Zlm zIG7QmSXCfRxdz43IE3u@>8 z>58M+R7BBqn*e-MVmPnDpctXxyyQ6OJ9KYCzNV(aCmVx4kHKjY^X#gD-aQ^9zi!$q zKK5|O;wia&cg1h-Jl#5=_jF|``h;3sK1Q@QK7@{zk8dw^RExiFeC2u_^e(6VVW}0y zg1Fd?S*of2htt@^wBZf)!v7MQ#V(eN)id7dKb$57@2s4R3Igig6uiBkT{>yNrpJ#$ z{OaWZK3prOKC;xE2;2nr^O4iUxbAd#tD+M0l7{HdZuEZ&Y>~}TA|C@${Us3>*I;O) z?EU%kXpFk#r9}%Uy5XPo+c^`IQ%|IhFl@;ilBvOz+LAom5Wyn=Kpfi^jlv2 zY|V5NH+6-<{6|Eg99}DqjazuH`Dd6+J(b~X7+1G~TGz=HMuL>@d$TWb#xAOghATe8 z)P1M>QGC>Cyk;e`^|7k7N`_NXxqiPHNrNwR`4yUCZ_C&52ehYT&PZJ{Le*Vl3_ zjEJdj-mrLGdu#|}%q$)_Ic)D_=$#)i8FH7N+h?o~-@6yz{m{z@-+U9k)o5PmR*F`q z$BNfY>zEktc$sU0=S$|)+-?h&yy+E0?bTQ9JL$TQ;9u^MlvPuoI6Mce_=&^JtdZP_ zzuX0yY^OpRAWR79oLT4aBT2vbdKZZuJ}xyvJ(i!O%JX2vBX`uy%f(XFMN0_g!GAAr z(SdE%)WJJql?8OG8XmU58Ed-#Or_U?1zpQ5B`1+Uv|8_t)ojplT20ph%KM3{HZ2g6 zn0YPRaE~>c-tdiRn9!XsNpiDw*HUj(aK9Z_b_o#GgNE7)B%vZXP|@_s&m?Y+$IL5GvgIFlG!Q(ozV1kPIrZ4B?rI1b zraEb&S&|ZebGRu1tg4Q&SNMwLW1lbL#_K*%z0S2e`Wl}=Pv$$IFR1|;ajh?xh_OL_ zKnHmik8PMrL*19Qvp^oMcpM~%dCdB&uc$F=RdHFX`O*2@4iv}kek6tO5_9FSl+);J z%;&@CW=PDzV%MyeDrzXC3SRwRwZ@Smjl?*;cI5-tIL9fnd5dtOcE0ARr{j$Ke0QA# zqNqTpkDv!Yw>W=tnuCKjN6ym%73NBaDC6ltR0!$pWZIGPc$2HzoC5RTJ8KjhCI7s5 zs3fzs%&4FyMEB;^5Us>o59bRYP@}07d&j$|91C__3E;^YF&#mhz!2^8nYq0n(mJip zGfhD9*?7Aa$dUVsS}c<-Up~ns-)F7j==TRJbA$b(ej|jksw}o>$5MOvm@n%s&arLX zy^>?wa?`k|0t*^i*0oeeu!qfEjPnE#dVrk`XSYAAdir zUl>*Ck6h#f4;NM&&oX!0QmkH>dL$ixe-5PU1NZrIy5!^{=&HYhI^JV*s(<6H{$SYB z{EDQg4W;8pPLP{&>PRIHMNtm{S5rrBCyS38%9r7l9YrCzi~>^d*(a6wvew`!c7huf zJOAu>JA;##aDf=Ox@}JVRT@6H?k1FA6y!zL? zn3N;v^AqyH{oRKRu!L6uW4a$5Iz991KGrnVSMVc?dCIAyW@B)wsiRIb+s?eKLc5_V z?3Djt>*`qUbI=;Xf0QY z#8n4e_w+LxebL<6b1MF8IjTbQq-QgA0>M{U!E$kE>QAV}yxbt0x`I9&G)Uc@{V$prVr8 zR6k+WwLfrU>?95;&a4IxeCncI3_P4!vXs~T)b!~c0p6zGg^=j(SvkK{in{wDcm+{H zDe^%WO%R^Nx4RrE3?3c!ShgzkLPl(iV2g4#%n=|F@yoYEvKSSUV^Tkaf@=EZ z6^b78y-*_?-7C$y(M9MgJ5*j)Jf)^_nFzH2r@+7o(&m?5uMWAuw7lct1qr^u(#xqQ zbVUn33k%aYMxo>a{wZ~ib+E$};$Q#hPNh4CT?8{M)Zbs}0AW0TMInAh4FQ@iX*hxE zl5%j@e~3YR4T^nnhd9%H_7mmm5hXU?du~&vSXVWSG{Ke6aUPek#2P9t*tYY?*cEst z^Nk<(+|YF3@jq$O)q&HwM{aA!yeBd^2)GFQ49*hK!r-aZ5JF!2q55zi7+}qmOR(zQ zv81%*T5Clv3yo#P?h7%M>{PiDeE6vPFyg8!$+!tM6bBm(xl;%AbEjtfx*fp+9Hli&Cmx;S+q-D7+MQuhm#h?x1vTqS|uY!E6R)Uj)GL zCf+y|7R51rrH8U`-0OC3mPCtXqwh;c8S@ z1y|dSi?Z%my9pIKP&ujA)nMH!hv%|Am3ea)EcVwVdAEc#MU+v9M7>hQ(t)0}*^((_ zKjda0OXzwro zReNTtfzcp-{GlShT;MMzLvzc|2z{d>-h4k!X6)LOnFx=$cOA8Oo#jJMdy)TLc51Xi zuMTfMoxhfQi(RX0M&@|q5SPFfw7aCL!eC;bT0Jl`1t!*q{!@ zSh{|64q@kv{;Y44FB%y)ft@N7#d_IZ%iIgO!~iqbP$%L}-~`XUK){Jmn+24Zyj0z1*F3>LzejG`D_D1(yPspaGyu?YC zwE1#q^!i0>4Z5nn8to*XGvLNwDy$Oa8>{mkJpXd=5f0V^0Zb*R9+;BxRzX%m>cnh` z%m5%Dj=@lPjmt)9MCy z3Ba_FKdyX?%^1)~Iv>JTy zIjz^7r1HVLoNK%BoqA79p-cSA?2n2$%n1O7))B)nggcam7OkN4zg1%*`sve5UzdAY z{N@OP?I(KuIaizrg3||G#%!-#nTnyxHtp0Sd`Z*A?*wMozR4VIKT^Zizr^!?Df{FO zaqff|hdGq0LGDnoKf5Ct(AU?3+#$w$vSEw?tp$g0bvcX^Zz;=N@C$J&VhNiz@RKM* z0e$nw+h|*?Hh;X`A541;lM|+HIjUx&S}Dq*fK}pabnxDokGwZLaq55L8-$2NgZCW^ zWz{8J2zbU&yJ!M0J%PWpYHI zfh&!|;fW&=k=b3Sm|&`u%$Jk^4DCrsoHKmhJ6)u0jm}#qRFaPfj7(I6^WJgZT0#%S&xa%9@+q&CpN*eCvF)G@)t>s@n({M{KLtFh6Eaw9!+aLQZVJxBif|q0ZP!4?L z95gOYa1b{m@{2A9#zE4=g`){6<2}2{F_BX5?`R#VhyJKtuBILi;$1GM9!~vVDZTaFxl`)Hxlss~)lx}oJd@Rh;V#DD0+OE~!=qwSf%6sny(_xc z&2HEE553W*QmG|j%Rk?I!mO^o<&&Oi&$^yl(Rw->x=f4KOf;j|etg@BC!EmUJ|ohf z?Qi4XgEOL+z8qcd+|$1!OTJ~32AFwSxc@u)%xCTYQW@4(pR=;j(x~IqC>y zaneb%-J274oR;M)>aL9*&gPzDd%gZdXTwT`Stp#3ox?ZKRWzc1BPboSqoqru85=gt zaJ^mEwEgzS!3uMwp; zW5-XJwYu{yT`QKYo~_?o+1>Nju2?pSH~dOzT*{9R46EJCaaX-*W?(pPa~K~(j-|Lg z7tW}+aa(?VbR47htXaFhcjfHpf>Wgna&GfC{OL)JWKYyt+=uUi$H_2b;~a9><0y^$ z8S=^!^;Dn4P!><@~7TGBEBH93pdbl5$hiWv)zK#-rtmMi*;=Hy+On|MIFk`WoSuQVF>e{z85R8v2+3_Z#x_CpQt zzwgl44{h*0@8i>$-mrRgANMRpRwu5&wAuU*w;w79&H77IlSmr}{TjsW9ju%*<)wlyr=r7f-Wq8`FXbISZ+X)fBu zVVG=wu#IICA?xxT7uAn)<$iMbBonzjP9=uQEs;}BEjlsDFn8HQdxL0VyS`X{HhaZ(f4dkT7nDg z?Ud%op_+k{V2naZhWF7;3f=5qSI6q{>3?s^ek+6e3^7}4R zsPEE?I)0ZmxiCoIXNk2UHE1%_e&{;=u%pJHKgVp!#uMoA1?rkza`pOec9v}h1ED~QFA$LDx#IYzO(C`z*YJCg7?5{!k= zWo=##_nzbcMfCvCeYmJk+^7nZ2DqC!0mR0sbc^7oWIwe54$Dm(6E_2{GkR)4hr*UDb$?*RiP$$SSxPT6v_ZH!xr?{#Wru?kBk5fG z;HG(Tr}o3CNvHHQV`p>j>Gw3fV!w|xwKO%oL^CgvHd?!*%r}>cmbBWFLNZc)`F_jo zvVEks6pQjD_3ud+vnc`=pxt=R?qo3*wo?%*Pqyz?(NvU+(?Uuh9(J(82DMd3dTN>F zqzs7%oj;3B zLXs0$vruH!h4x^dctYAGw0ZQV(KfrhH>SB{sN!s-v(EtN4UV} zBCW;EzU{HLwzgeu$>P+Bb2u*Zyz3@moV1y!n%CwEqTHi4l?T@yBfx3Ph9ljWiHskn4|7x)` z8utaOyz-^KRiC8%$r=~G>kA)GDm&i*k;%Df0JWkxEA6V?4C8_y%%?H=ux_lN#wze| zI9_}w$ygm+YTb5|LH0WE$XMFfg>CaXqVsKPdooQ6%{L$%?=F>Fy5CHirltEdB{#&0 z`urO?XDcYy?}_hcQ&@uacLnbDj=lkfRnte`?4>F%2)pNsqd2Vt+~E_b;$J2it2|IK zl=J;_jZlC5NyE=}j?gfET@LlfAKTd{yq5jGDABbY|Km@jb}37=3yk1cQ;u}$-=#!P zK4CWJ2h~eK7gyMi$wz0M!z2i&-}&#W2(SwNw!=JM1jp;>+TY(rqXTjfMKwbDVs(K! zodQ^1fsXd4n3ma3zf);^tda3R*8zeWZGYlX8OW8}Xjhm6*gmCCrfmFFD!h-@uOH^3 zmFrMz(;sf3z#GD(^+N-tY#)EA4nH}Pz59Ev?#IaQ77Q$)r+^zpNKu9!YUQ}di2!6F*} z!aQ5ZBYLgS?q^U8k9_gd92CT>Dr}hpCQ>+68w13s! zIW#vv+UU^i4YoLc%83|5lpFYV5+^ul5eadev1ev*TjyFdGJ}@mRhE0$zz36ck$w0m zRzUX09<ZE)^!{>6C0lRk4H2%0I8_c`#V zavBf(&thp%w7 zZ5hubHRpW(GI(Ut6f7emE3LW69mI)Z1^{*sJ+zEEMEcV1;@!Esc=1t+?g*xBv?Kl! zVBtfbbTQEJ$Jy72iw4cX>Bma|CbLWogLr0E0!NKzoX{~t4jlXsem*17eKVvQtdfH6 z1Y+y&`eP|eXQr{Gr<#YaBvB#8JWf3|?lHaRp3;+hFi@p5nqVgN_xtz!et-RaISQv* z2jj&;`$(RnEH9bHiCXJy*?{8#ouOiBV0aD(DTWP$)(&~PxPi6iVtPOdQ-wKpPU^;? z7??8LaBg(I2s{NcEOW~kay8{wGsSGMwtO;{=wPfx^Kmhc{%X-{h7I%E?4x^>6n*gi zEme**NCK>ARWeYVpXYCm-;8Z*_@oMASWbOsP917=*=(gY!qj(EeFA?Q`)t8e!X1u_ z;1z(@J!6;q)EjCZBZwSJHC#w;jEleF7orT^Xi`pfeApN1!@ytqO?NI%(>pB$e`oCS zP80~0x^lFw?npQjUvA~16#teT3>(N62F6EmTZjnc!XpO_)zJO=bg#Y&#I1&dilN-u z2tF(HYbUZ4;H!WbCB)?*#0!=;k6kxAP%^J_{@Du6`9Qff?TVY~e!AaWV=mmhg|h`J zi6vMhsMi5o;SjXWu19nW?7FW)8>$QMiOC}ot`mqN!+Qh+aT%Q6q}wYVOd?N3a3~V= z8RXqf18%&#WU;Rn)J@7* zR8u$2@{<51M7O#{JAJEV6Td~f@x2FC2pR^jx|CE?$(313qq?K?N=yWgC*ML0zWZR! z6Ig4aRzVXYb>+67UdzGkloA2r-D)tqIsT}EyLUFe&$0Vv%1{I$MrQMDUPXH&iZU}041J;U3D8DK65+lj-OFT!Qp1dyzWF$ z>Kezu^wUqie#&cF48Jz?bzE2< zo(O~PyS)BGZ(8PqTL3+mm3i3Ud=$1N+qh{!#dL6l-BT@s;W0>DwsHuHawN}~!>Sw> z-((s--ELk+Id$6O9*n8`a1O(Uo5k*7>a^VkX@YLJM3B_2Qve)wLtFdP>R?&DA8C+1 z(jtv_|9dvm;beIwdDNiEx33)+cp}z;9o!88I4YJ(^Uiw2v6p&zO4Ju0F^Es>Em*7) zq+=d=XWhctXDe69nz_rqL(H6gkJ*6psg^A`<@mZ!CJ?_GoN_`UhQ@f7EfBq337bQ_ z8_zt75&$p4|Lw{e8gfoa83YF>#kssbSyEuz`cYZwBUBTmC%Ov;&N-`3h`F)8w|E<$>f&tek4aLnjZXE@=8&kY4Wrn2qm-f?T5_m?NM!V z>g#Ldi&Rrz?-|csGR{x(5OoirUXx%b-ocF7;VIlwy&)L2@#rs=94=;IZlKX^m2>=A z57&hT$9$-mQ#YkHbT&tBm?A+=&4P}Bm|9lF<+rFR)xB$WT!OnobFF~PqcW+LL;&Ii zCn+W_uD<+xd~}5rxKlf=j=D^&oVxr!YjP53@{{;95=VA$T~xW6+!_uxd-+eSbQ(Hf zC8Y?8$Tc^F>xtB4d_zbWJdm=J<9>ziYcDSy_?Y)#VV?4~M*c7O9##`PJ?l zd*#$I@6Awx0Zy))CWs1?Zy?axZmGq$x%F3lIL>qU8j?<2YDSprild#Miat$v)PVmA zsrj#oHsw_)?XNu(=&$(p>kLsxY{)n4@?4%m*>VjR42_|$oX}Sc-Jo= zTCgh(7|eZ&eBC`CAK%hRqjJ#nj`{A3Md;Sq%#((R@tiR`PRn`!DGZw438{7H7_+9; z?wOo5T?r(0O%uL$`@{9BrJYhd=A)>9xwNv9Ps3v+DK-I z5U=!A4}VlsrF+~ER`>t*TkwV)I~ME%RFei6t>`N+fF_R6#o`cmN4oD5iktjN$I?A< zU~LEf{Z2I=`!}bAikrwz{=1+Y+VM@)OZF(rI6GguLmTffrxFWd52;p3tglM*zjVh% zyBvlw4u-*93e@)?AXX=#W#Y+0%PugW)icgGRK}FO@Pw6d7ccq3X(A zx<-I*ZW8Lrshw)`d+%YtEnjA5A}G)|n?th0yH}3w)4pn7cZ<}CGN*o5i8%W+zsq7; zKJ!~?KV-qM0r;6Si@F31yS3#?COM1~C)Qpc2B;W>8_M6LD zV%>Z8yXlT8lv^%%$UN`JS+=m{f?t?s2M?6aw_jDXHG_(Vu;soxQD8BS#;=ZfX23l& z9Qz0#bNs^#4eq4w%DS@C^;Qk8JY9z^EXK5Okpq7&ySEdJ}Se+L9T8Y^t4V*Wq&-ULjpvdaGtT~%RsK~xr% z0a-el?xZ^jd(e=uL?H=TTmU7VUeYz`jjHY>4T9_FxJAm6qNH??WmI&;VG&u}a6}o9 zQ4vK)5V}JYMMT8~93lVD_nh~=_f{vt_;a4;|2+TyZ=NwEx9)wH^PczY3r_1@-}LhZ z0vhQl=YLgHTX9q34r#J@^udZ>Rr2S5MR01SQs!pQWVJG=kU4lx1H9dOBEqDsV@GE- zWHR0lCk#@GRfhq6qT97<`C<~M#OXqy2cy?=<>zIHDrnwjw$;I*(c`%3a?=iHs3Yvo zEa$%R?KUxmMo!M+b1N8(RS6i!TL>=~c|jJr^tI|8b?IroeuX7iYq?PSBrF=R-n=Ou zbwW%PN+IT%=ICAeT4jYK))@UhjIeUwNyZam;G`s0Iebe5We{A9;HeaIZ=9iIp?LP? z`dW2334$huod`mbr)6$2;Z-^2GTVZZud6)sjVptBQMj2{7_-RfeP3$18$OHBU@qZG z?uLIeAB?(JrUEM4v?@aZv-DQNfPT1&s?MrI=(o}>nhoB-=H~WK%1&UgW%*DyV)d^X!W_`8XrpHF21wSLo0p+oD_HXn_gLJg?`(7Nxk(iPFOvZITJFOAj488oimv1?++Sb> zv7x5=TB?LO6llN_q?KWYw%1Stg2w>~Lo|Do_6kUzEa1CCNns%Gc$rk=#Xx@1og9X~ zy`Yi5=szd?Xd#8O`i6&Rt?4R-v((uW!OCl32FIUKA$;G)O!&?|fqH#>x90G`O8%}j zj+kNB*^6Auz4VP{an8N;4YDbFoSH$wFv;rU)4|J3^MZmZ4w#uTg@gSTfdGSR0z#Nm z4IDkVGxDkA;wThUU(ed{2Bl>b%&Ji)sv)0g!Ky@YK2v^5{&RkD}`0!7L zqCutbwTCzpc5b0YVdqKt+|`ri4P8U+J;UAY#qRd5?)I^D6GtG4eb2CxuiCSpZ3iP9 zV9noy8s(QYqej>qDMuoUw&dQTm)X8H7BLQG4kiPehdRmD_}|M4I7EPNk!29bm+ron8V@m(`N!w zUob(GGU-&gpFIWn!TYrPM5|1tGB_BD6@D?76O!n5_K#XLraxxZLuBqpE zsQD%jtT}d&R&HDYv6aBjLG@$rke@%vma^q@)J>`a;6N7zUMc}SK?s#M@Pn28c4_Nqw^pil6uQ>6!m?Ld=0c;e zY$jl1Bn3>$vQ)U`W5JY^Tw~71sG1Qzg$>8P9kN{7FXjlfdd|R8pr$`%=4v1NqUaUP z-F|2!ZFB+rezC8SyZz<5B*AiPwi_Q3`eZ(@5Z`nAp)4F?i%?kV?!TbjWH8G>34mtG zw7P+571;s@HVQK0`mT+Lmzp8fETftM$}zm8()vWGw`~yf&wR#cD>`83Y(;ncGHWa9 z{QEl&*>QIIak7cp^fSJb+|9=HGyV%?We?5?>oRV~V=z#;-@kaC#c!ZB2p62tFcy|= zQ#_0m1#?l;IX-9ekt;Rj)9;Go7@d}lL1uko4Jy;0ey98Jqrubk>H&K`wx%seB_aih z&`5UT^hW6%fxxzQ!?5aWj9iIjmSc|T1-X&Faqo_%z^t~wRY zuX_?EYZ^j#T9?fTl++EYMf@5C0yC9l$X1!_63k+KAQ=S~@l~=eXgr{bjg3HxYm%KImXg2u2y_ zOi}$;(BE+mykg8uUi#iE3KUl{^r#z8KbL#`RYL z6z0D89sy^szDz4az!faAuZIcQVJ%<2IkabQ4f7Y3BC*dpv!EicUvgEidhYGP;k`K~Tu%^~ChC=Qxp<^8?U#mi( zKkEp#xUfF?P2{SkHOAKoO9g$gT)3x#a}j+_GiM4fA5e08Qnr>p9Jg@_0P*qP5^(x# z#cMN1k*)oCOuPizJ|MDe6NE|ydL4NOq#D%44U; z8&=KQIh#zI0)A=F^d>|5@RLX9OeJ61BiN)Zh|Gd0;o#n8BT3Q1*Ie2I91xQxve-gs zVQsIzi_I}$B(z>fO1+>cNZiPM`?aIhaqDQT^Q&X-S8b=X_ApPT6dwNeY2nPEWJLHY ze#WW}R|-o%@J11(;V~P^+Gv}tn7f!nW+rG=Yq{;cX3uas$(^fCwk=57C0jAOAlN`~ zDx?&qC)`Pm^Ca;a^h;WJaKl<2U#c5c?KoHT6ajxj{|gV3l-jd5K1_C);Aqe{vZBsa*z_>)5_^ zyPeVwuDPH*hC4Rxo!~O|b!_aiu&)6Z$5l9QCwE-fmq^#hSLg&p;w8n*qCSNB-TE2Z zmuQv;SFE1&RwU;48#y)6R-}>igOn2`8!)j%kTx_hW`vcS>wk50sLr(B2@@hjcvUKDRJw%>Bee0+1-t;j|XshnNUhQL=Rj%Z`zd5$GHi^V~yNFPxaGUPbEDW0~?8YVGHA9qdQ-;p#-Rj zH$e3i52c1pB#2(u-lzl;P~a?RvfhJsG^wz+?adKo;Q&%4GW&2KF>)B6UV8G_& z3JDw+P$1&K?>DQd?N&*^5NyYMgV-WelZllQpw51G5V!~EVEs?}Fd}^_qy+!;W&$SS z3+f&ZP;Z})Ag=E^$%rAo&HTF-#p!I#SR`)! zQq)(%fNpQqYw2M4mNbmpUY)L{1dT>1yKWc{NEW6|Y%BTay$mNu?$3XY^9st1+@GH^ zR4R{-Z=B+6(Kd#Zk$|lgHQ-N#Z)VaetRIYoY!@gt!-cb>smzB1Ce-!kD@EXjmBuiIRa?7UAHMB7+NdVP6Na6Qi#^tHy?wpyRZ0`FnmE2Io zojkO5tVr$YW_UMvIdJYO{*F7_Ac@LNT(^D@)C}!)<=NCA|5hp4vN}mQ|EtzOQ(xyBfQ~SL{ zdaa3b2OpM9)W{utsGD@BE>;4R8P5D?+X~k`e{HELyD4|vT{{qFQn?cQi_0{b-AgWN zTekz@hTAu%$r9P#Fucra@(TQiiSfJw(bNLvP!8@hZN6@ zCJSvW9B%Tl?u$y+ZAXp8juG|~G}&72(ms`D07yT6U?qbOTS%DO5G%P$LpF+Yj3}!% zDX|SkK#$eCnI1aUZ$RwA^w=<`tFo?eiS7m2r}``^r>kDlH@Bs39TsypTwad?_N>x- za&PhRyy*TclyQ7M;Q2OHZ>O%zKvb|<3xGL|0eD?_3&hP@%j@?8^wjc-%2k3@fWWG# z^P&fu;7-U^Gz@q$fU?;)4R32kxcJGbkdLyA@%Zh7osp)P57Lu0s}BG+;8(L?PYgN# zr!cpmGDS{*u(Hc;zkctuX&1k9T7G!RrpolUzhY-mJ^$*uMrh<;eTi)_SiZ6cBlGoW zuWFgEJv1ruUoYZ84XUM`)AWBk*C=R08WdF0bOr$?sf-;vFi8d^9S+PM^UnY7$(S+1?!r(HEMljK zPX53SZH!XovxA=MUUdeDe);X33fk-O^P2%L8r}qW6xoRM0UnfQ&pkW^>V-?r7Ssb4 zh(}a%4IM=$f8`M+Pju*scy^xt0r zEkwfSuD@jaM$<~}dJB-A8nRRxW!fzA1w@%AEYDfkl(jHYy;-8txUHrpAdfAJgx62fUYu21~Vh2Pz?~v(cbzwxB z>p$yP;QG&)+$2j;Dg!GJtnis_G}8PZ|A*|^Nh?z)0Tod#DNlf!I_f?`OzhN&kbGB9@`1cu`P=tg$zzpP zkrjqmsl7HLgvUy5jNm!_h4YFbr(Yw7xm9Ov%L^H{lH0N`p+vzc;_9$HlNhTg2V{_s z{z4N)4~9O_T$)rF#LY)zuX{ZdUy=n8afFj=2Da_>hL9tZx_4F(lXRLIz&ZNS~#u2(!FzH z2a477hkg(dyfOWudjXu(5=}0}ME3)Dz!i!^=P<*D;SzCt$-RXuxvy?!W!KMBE+Z-b z5+Do+PO1Rwx?28(T@q`SVRaZ;^(ML>aXa^H==)Wl$JcF2 zRLl%-7xt<@*J}ru$^7T0^3RYr>5)zp5x(X!3q#jUqb~4 z@pj3jSvxiq<){C@Nc;aQvejwEh_T|%S^`_1SP>akrR9m`3TF$YEKC#`s*{CHTDE?( z_|c*&dBQqN)y0cyEl(WQx@z&F8H6|R_Z5&=y=T7$XS*^4^ejpINOD3I0!wr9Ac`6g_}{h*z+a4-UU&(#~rD{7uCIoX>b{nd&Sk!B=n=*HB9#k zGED+t6{aMq6LBN;%u)e%10iPCYw*^&Zrkr0VAydL?rQUN%aQIr^nUMtqHY<$cmDj& zIkP*C6EBPP_cH0cVT7rl9C=hnXZVDqkgg$p;rYLPJ+rr&V0L!Ep4r{m7kph7wnCG{ zTj}eknqhFyTCTT00IQNCn2JO%MPuN9rIhcm9wm0AuyZ{VNH`2~+yzl}wc;UGN{*CL zbc!Qh8!W%bGB87GWhFKbg`-w5)& ztj5b!O>ffL(lF)bxk|ad{aa57SBYWtx&Wt7GgnEKUU}%VAxyTWRXlMj83gZ>V~~{`-SPBhfeqyEq8D z_&!JyVh9$Z-+DNAv$9gvw%Ss~6Fjz_nedEdi z!%eus&8??8V&5Imfy#NQ8XwZ#Sg6Xu8`LWKZ%j=1aMjlJ#jfh+0q)nRtm-p>%YQ#6 zsX0*&nzBADtU`bU0B1eElv%vYSuv`A*)T*9)QFz}e7hSn+mikK*Y~wxAS8v`uuby_ zgg%MfJjpIE{TV8B638gP{(1^vO|eJjUR!F`^tKCF(2NwQn*tIF^Ams;)^D8{?jw%* ziw3%g#-_-EQjD)_XA+v-2h*EWY2+O@dAty$Y+PYmHi297qU@zWyK6qGD3CI>x~?(V z4p-wJ*9Yf^p8L>jR{oCYc_(EU?dv!HS{zN1d<7^JV|{Xg{FQ$k^FeIzFriji%YE>I z)^fjEWaytW*hnS!!M9**=~WM3!)rn?L(W;)AE@);jm`Vt=9C7Rn{ufvCB$yVpn!WOFYD;+TEM+7nSkZKCoNb^X`G&yJ86SKw`FmV!&+S zQVjpgYawLn-XZg^ZVQn*#gH9^rmBli{3=%zjW<=NX|T7ujKEHPBO>TFl@%0D?4}Z0 zV)1q>d4mA+zyk{ma~KxOg^n7EZiYCenKFBIFedpBHH0UT#wSoJOG=0#2Z%HT9X#)a zSG!b<&K}n;do*q;-4ON0fl?Qq^CNi2C5aAQr43?uFC;SK(L~2!XNADN#)C3ZoTULh` z$-~zbC-$xjV@jApTkX7vzKHeBsS%8e8e1gv@bn{MfFm(fN@g;8 z#W&oYyWR>=Cy5Rj@KP2;;9FCp^)uUPB}g@@B=vGR2fHw^ z65UrGA0!B7T_tz#hb$6G8n`qIUQtVCg9I6L67VdCSmE=r(wLMZm&rZdfLi!vkY1F+ z7pt(eb$Xv6ErBTM02LAF6}qc_68jl6uM|mCiWC&+w4s z=2N>ZjG6__-#)B=-88Q2BHEdgj6;U3$)ORTYC?UD@`be?vOTHFY`nfk1s6Yy1d^6p zS^58-3{ZSSS0i71y>Qb-?aHo)Uz=gyZuG&-xvdOv=?e%$ivgM-Rt&r8F(Kga>w;BX zLr2V&5RhL#*eVOtcw6X}hk-Om10dnEivs!2Ksyjf5>aRy)^4Iem~JU|(gaDv+|g}C z&L9W41MOuyrJwCmcz0Gmn=|`=&w+Ny;j1SdaeCBo?~)^;A|sAV?VM(q39N2o7U-kh zJ0YO{6SBgkb4*r9RV{#0%l+j?aV|~ummeonW&3qRgFSuzd|iZ|dZESoRBQY`V`h!- zJZ6SseK{aWdEpqeQsoBdl+6>?w|0uaY`zM41GaI}Gw*gS*Uh4I_9mgg7TO9CK^ld& z=@B;K;%gQBN7*N(Q;!Q+GAESiYuh$m%fmu$`mHN!C4KEdVnZQ$81Dxk4R)2+S7q?ed) zKn1AnclW9#p9kP(iXsL2oK;j>1CNn9mh2C{CSxM?XlIzgW2bJ^)zAGIA)^RQL>~{+ zQMA(Xxnr9hKsCDSMTwby?c8P7%3NkkpB13i&`aaUD_t977NP3CbaWowKJS?Jjw9P= z&+42<=2ZCKY^3SSTE6scy7oQMX2r{C(eTemr|)pZ(u#jl#)NDe2bc zH!S1xmIqdqjWbGmLTDC+AB@s@QZMM2@3$zuTJ8=ji*1qg z+DXof1T&%$QrsO6Axa{RAx61O8ICr^1f8rQgQi7LPccXL>A64avy+jE?!`zV_7ilD zi5IND5srj`~pkpg$z~Q2vBB#M4FoZ&HTbC70_N%CS&qCASsiH1S_$Zyp;%c}Xq~VigYBHvZjSCJ?+Gxj#t13?lo_9i1d&w9jh?vk>vddP267MSyH5F{(Hj>2*k3ZmoeR26Ks( zp-9y=16DY2c`(CK%S&zIT(B)0>U0m_P6a`w1>m7h4ogqtqbzSIjd(@!zp^=JF|=#++drwb*Bw9&majyNsdpKM;9iBRBv3!E{$nY&7|f z-%JFqqBE+eso|z*i0Hx`mcI)JfT~2Px{ML>Bu&%`cap`Cm_pCe>KcXq&qrokEA(IU zx=b|~yx)Z%FK~W)6z=9jZ=&0U=xnc2ZuH};MbZ;HXoc^ET3}w;B?WXCo)HrgdByaz zZ^fupkLhO%mn=B_Bw=Ffq9rS;3(0*LGROZC?M6J3F2`Mzot1$@G;PYJNfXn)Wt(e0 zelv`n?qvs;dZmKIz!?5r%hUUsbi{n`05Z334eTZzANUzVjuZ|pa@PaMO_JTh(tU8% z!$d_|yfh?w5vYpU1Y=WVndG+DazFWJt=xlD8o8gmH)~P0O|7OBG!%f*VzC+Rw?07V zcu5i&#OQ*B3*d8gDkm4M0*U9PZ;AauD*25c3ZX1v>QJYol6%$5tRDw|d8yY+#H@y~ z<<=3bzjZXsSG_dJiqgv(kvio(MvkcQz*Ojv6iM~In0q*g^hLPft6plsRyIYb#~8;a zfhepc<64+ff?if#3#=t24$X&b!nsGyw8JJ$&hoq6#*}7mq5pfOy|^S}OF>{5^B~>5 z$A-N@X*iGgi7AkP5dt1^u`S8lRAkr|rfnoNS(_nwrj=%S9w#q6wZnsNSh}u{&xn@F zFP#_*k5EFD&&+-uf@tG8Z3j_9>TXXDgVA#FvD23t5+&HWk_%RAdGNllm#!XajPZvV z=(+|PEf4-Eu7dev%4mG#B_%-RtmF_hYh?h1f}9Cga?4%`Gw$2g4VN1ExBa6~H@>E< zZ2j8|RaVMQO?Y`J=_xK9-yJUcHrvPBB>cJU2>7h6TwQ9Ld{Y#Dbo90S5$DY5AS-A3 z>i=9K(qBY(tdt57!%rVNiIreSJ+t`-wg2X3|_&Ig|AGVwgKEjwR5l|eCXP6RGa z%x{hS-Zya7xNDXC-q&Z+$UXnw3M49oXYcFXZZ{gLX0y;2eDg#}2Uu5_mP3gv(lb%P z*lENT#*gy+g*yTNR}@ZmI&=l{o*_be7pXu%g+_45G0@RFGX=Q|pVY-8ZQ)bdA*^Bm zSrDH}d`H2#!}?;Crz0Yn+C~9G&ZwUiUJJ{N=Oom(`#I-G^-Y8da3K8{^DG52i(Lt_ zIQPjUL?Uv=LyMlugLY06e!<~cO*lhNc9a@8r(=qzQu>7N1)_Fif80PLcViLP5pDvb z^=PUD5Zd8YvtZRHN*$x_7iVoWo2Fl(6tXw~;;)-6G*-%B^)^MUCh`dlI%DX=ja7jhRkmV_d z$umUB;l5EW1S5pgTRn-n9Tne{FA5y0VzyR*T&hH9{%d7o{ZVOy9?|Z*ou0x+|9i8$ zB2#6q=w6elq$Z043R%Pes#OGO(Hn;j4VQ@on5q7uGfQPk3(fDC-8pyWhV-v0i`+GH zWVl@1sIO%@XLZ6p5guKLga)XhEO+1IXFW=jxLw-sGI82?I^4=*=i?${YMZ|_9A@vF zJ@@FDKIIT0ouj54Xig?GH?bxqJ$ejfJc8Wh>*kouxX;W!YzH%UZqBRsD_oEj9_M<6 z+MeElE~U_Cc|z9w0F!>-r|l(}sL`}a?xJ}LUwz-zWmBEY$b%QnHMIbFf}P-z@#abv z!st39q_GE{mFc!3!@be@R2Yg*B2h5VBQ{xHFt)LXdWTRZ1eo^Cp$LXBe`Cz_-ccvI$tza32pE;VzQA4v4&_t20{Ic zrQ+9*sr!gdUzK7QZdmeKBY*rfy@hy;Vp_=`w-svyd5m0WCFRz;^hm3N#49XQ|Lp7C zz{oOk0F*oln-EkSp5*U9lsp0vRo)TA-x#^IF;RC zW>?443W|Rtci*Q>@xHHN_x!$3Q=T6a*QJS2DiJ%AjjwaU157brt5~LERnI296RjBL zr_ze6i9Z4f`rOOIl;Pw|uC2AyuS{lYwA8P%SbC$z_=;p&V2_Mlst*$H!I^kqhw(m; zRe?U;rJ^C35hGp|<_MwUZ=&Tq4zq?c(kn*WYq>YSDp>&54VQ)i_3hs!&=`#Xe3ejY zW<>OK@fw48htOm>y97ju*Mcq~YCB zTJAgECJ33Qc2&5t(>_}yFzvqMF}JD(2S|&1(k00TkKN?w;-R!k`GzBt4NG8I!mwmz zuJ4p%ytmytEqw$hS{SZ*D^Lh~5YJiaVaP?-ltv0ZZ#-kArkc0dJ>reryi=t<`i8>2 zN>pa)aNPv+lAdb6mB^6{-|wwHZwf`J>HU}kLIJ`fOMH7UX`GSa^YQjd# zHP2%tQ8=-GeyR&&40_gZCQ>fU5~|-u`n}>Ay2n(2!BEq}_k9`EPLqE!%1ibT^g_L( zhtD^=8o8I;UIqp*tEs^XpMTn%PF%-?GRLDQ6iXx6+PEcJJ6i?5!Bt;j)Pyn_dg+NV zIwBhC+~#;=NPqeG`My#@DRff=Gbu*kQ>ZMe_70aV5`xE&Pg9sw?4Wx?&qV7SdiIp8 zp*%JYCk_H**;+<$9(yIyA}iHtPQ8Dr6fgw{A+}+qK6~3!$dqVfjojOw49p;-2#8`U z;!fq+35@WHll&Jdt~BKD^(=<>2c4Gf{PP%ssg4S9HI9;kq~(TP1k*?b8Z9?W)4T3< zXicJnW{99j?a{K5VT6JDIuRhGAMuSgO{w8Z%foMpWXr8Pp86PO*ITvRJ>Mf#DtFI! zHI9f1hEi@Xcba~~znG5xX;CMZixi6N$D^rt=`e$4p@Fg*a^386RGErZ8mDN-e?Fj7 z)!TOa(UTcyR+G9l+8J}J;JwwW{qz1F#}_UfdV-gLiW*EM|L6TF1J#_h9ro!b*xs1_ z&RbTD4IP0@GN;fKF~oo_D;~w`nqWRXCMEfigD#eW#J6?AdQNysFyc48Jih@$O+ZoF%#H6!KTv7TXd+LLj@ZDTGSl!)~dVk>PfaZb@qDNF;c zMQHcAqB{Q%JEzVcGCQlz&*}VMacq;}iE>fPpLtWFiR!edunDYWuBL+s1QbF0J$K;( ztD=~nd6Rp=LN0S9f94mXRvXVgQTt@#Bg`9h{m=I-fLWzVP(01t;~zzpXyhKhR90MS zHB&h^YimRXy?Mi8m79r!+DRGSfCY?hB0xPzc2KSjGb8m&40Q4nJo*>I0XqkBL4~RT zJ*Td|l6&;&DD3-m5WOQEgvNjQ%~k{zi{ObX7V-LRT%UD{7m6X!bWW0J5!5wP zMYPjN>4#DyL&cTy$nenG@oF%B%UrhamG_xfWwMLTd6*G5&VR(leC_11^a!^wO}pJ) z8>1;b;qCH+BhI6K;$H(U&@pO2SljvG>Xso=EwA3U^^e)ni$gmYJvG$-4Wqj|h=rs3 z?##mBIe&f0O@r>ldjGaT4M5w6LA-d}LL)j^*h+)i7P@h%hzbG!9EmC~UjC@;;1YR?cWm(i9~~QxAbiF=d}052c4qPGE3K73 z*eOY7)`*D-!reCTDDT3DCN7bhBVnaZ@X~Q~(aY;Hc$l2YT}LikD3iinGb6^x0(I{{ zMlR9k4QjY$|3i> zHZmG62WPe|z9Qz8?Y%Hve&2O2`I!{f$nT2_pqia2)P0fsam24q=_LWrotcX9uzWR{ z701|Jg>T7(mnIxB2$qaVQsP~}p{}TDv#@08YX?V%`}(*+h8FSqv^+Bhl2&PXX4m8h zxjhHnM-_rb%QIGXNx-htnGEy%o+?gYCWlok7xK|=5D+13V&u#n^h47>{7~^>nj0i8 zH1<_wor~9}4EB($^h1Wp9C6`}EWt7i25>!ygs01@e?ZQL()(v2(q6R;wgGFat68 zoX?4%g!sK+Z3x54QeaUSRp@*rf6j%OSTl6dU3b4ujI#?&Xs8vw zk4vz9uSlC=I>K zXF$S0VT==m`7}o@_e>W9H*(Lc-u}QSRa?HjG<3VG<0&u$6$sU41+43mxa7Lf`AFNc z9;QZnfgg7W2io2ND{z(VWv^kDB`FB7ATb6zZpIENe_1qD=>o~J8!nJ6SMdUcO+@M~ zlSE<0h0NHRn$w3+h7460@( zbZxZDT@F)3HmeI~0vrSl5iUcdgmV6gD4>`nN$|qtM2C=UA67|@$oe^1x}r<`I_b>L zKdW<^Kh>2?KOXMtHX@KnRNUSmQ6&beq?hVkgT4{&~7``y`&gvtEVU46rW%AgQ_2E$fR1ntX#PSebfDvhdgCfNqS5d-T z7zo2U(5w?;H8kuBmKfF|)6>m(5Ji!{OV3K+qP|roea6FHG(2>KsqdsZd)F+kFx-4K)F09Rj1T)NX*e(ZKxlk#KVa243D_;%H~ zv2TdDz>Ht}6#OU1-t|NUTT#i6eJBfqFiDgyGs{QM(vPs%p<(`BZib334`A64*cy7- z&M0UJm_;{tFd&@K!0Mz`r`d#SFlmG8b}&sPz9Oqe=uwt~vFhe~niyUQ@A=1J3~i&$ zs!w`RUt_;wrs9xHV*Weu%A^7rF4A>#pLLGUCLE+VfjOO9?JG6PaDRCUWpKYdjn6n5 zv{*bF^tY=npn#$&N?p|z!#KUTzeh*O%KKgn0;s-7Lq&5e+m6LW`S*~WlYfu@R#yI< zGxzVe<4U^2a9%2oI7Jlgm2#Rd{%Uwnvd13v4FpACx!FR%$#wPR#U6r37pwjiIDmCm z&JKOHEH#TpPcNaO0t}Gzth-+rUan!GzpGD)UPdY zUE{X@r5^mF5Fd@1NEm{FKsq`+B5_2z)<)Pss@;$$qsR4Tt}wE8v>(G?zl>V(kW=$D z!I&DrUl}GMgKbK3TUQ(yHc=W|O0vokj2%)iMU7UZV@SLST+Bbmz#Z_*;@1r8o5Y!+ z>awLP7QX=~!*#oX>u5hrtDx&ObJ2JptN{7a~}yTgC`@yCO`;WD8xd@e5yQlm1!wqq}Z}VKjHt8+mRM>TTa(& z^lDj9U3gk~h91BjvsV{2V$WastTlf1sIVeI)RG$w9Hp@%=hjy(S^S0+ULrH|A1P<| z>QaJx_tFhjw_pU^|B(p|rUPg-YaV&flZT9Uj~s$0qr_jwdPWYJz@8nB!(tTeI8ytR zJ*!$Dl-};D0BM*Eo|#Q9oJKN4iSB_|%bdTLhAZu7TsCofcqu_wN!wOn7+TO}ADG7| zE(3I2FI+Mp+lijAzd~DNGzZHORs%X!awi2l)-lUhJ|+_4nY!sqoyQxq$?ztp6-sY(FOtusZBnb<}8Fche)pNuzP{n5=+ z?>b+l%H$@3Tcz-CUzE@t=IZX^(8=jMtQU-d{tlKKg~NKxU{6RR$cmpV*x{;1wRCB; zjly9q5&4--9UKS?3Gq{L@C=Xy?Q{)T&KH}ZQ`C2m_#l}aZ3H{V!1B8WNW8C)2fdD2 z(sOkoIYT9++~x27eyjy4HBMEFEBU+c)oSy1zb7^8!mh9ns|6SM2*bSl-Y%)8CFm*L zi3cC8LEP3!x6C~my9lu)ED^o@_0RW6K$%#>e?IvHS zS&tM!Wp%EeWVK;3AsB1`z&$cPJWdT5=^KC)=bw4tp{DYLmd3dSiUbJP#_Y;=ZKhB? zH#pM_$tadJ%uJMdf~h&HeRtVnj_`Nnw$h z^$4*e_fLUoQQE;wDICik_-DJs2i_-QQOOrn zUsat-FJc!)-f^N!av0XYF+Fy}2xnMl;8}7XIOBuM4UerQ^oG!ds`_1qN=kYFpr}C+ zRTF9|qzm3)L~cRQTlBIPN{|C6X$GV1N?2|Je)-Ocz^62cz&m3Cp0_;{aPSTem2{0g zyc%&dF$S}8%jd#Y68(tL(O8#w#f?oIj9KG{1OlU9P8tC$9_$zV@me=Inh!+gLtPh} zuA!r{Yqou}qvVW5G$*w$-STM6xSn_s%A_Ee7335*?F;DCSP9L)1KlzHm(U=5JLtvf z2VM%FqCOlf#%c&wa>*G$7M0GCW-;tz?o;e34(5yBj*P=Z?Sf!kItTsCX* zGRiSsm&#aFfchF&OV2rOWKR!OQv54)LpP82ug?Zvn1w}Ajc^h(9|eSoS=uf``&|tkXbxAtDkgU1WMxJvpgf7v`kS6+Q_1lK#~ift79h< zP0;!M-tT7b{f31fa%1K98`7b2O6LEb_d?EIo92fPDD(tVv#Ox&_W_<6Qws5WS=*|~ z+407tUXDa52cMu-`*_?d7CVuV4}1DbU^!;0l{E}52*2(6t` zUFRUE2K@6BnDne0E&qL|FskLhFENVCU+&tLOMG-|;1c>dVH7p~;f#Wvf$AWrrvX}? zh*<&>KH(JXZ{!n~?fZsv(|GanitXoimXI{d%j10z5UZJxIATU~7rYN|EOEpv6G=D1 zTwf`iP~w~iodzuxin8w;Mx3H>#|uBx*aDreXOc(KXCA6e4T$$qKpV=r(`~;E`DTy0slAzNDUm&6Mjn#5I$46CaaG zbpGxoL_r!j$1*{@$&AzP_o_h#Ok}(4)LKWLiUC<~z z=bNpk5(Cq=zyYN4`{dMF9@31e%7!TANO9Bx1|L~2nleaBKrRV?30Wt#{QUbu_5sVf zs$)fO+P2YfCYob7`MXsU0r3bnbeJa%L%zxTLMYbWrujALw8OYU4CbiKjz54-yefSvQYJ2 zA+$ucx4nObi2=j|(ApBY5PUo7i_1^0F0AC*20CZYn+r~T;Uf|{c<=%9Hk&bw>MvBg zrf++G={)B{;91N?hANBMwxxP6eM+#(-@2GP(#YNVnqV*t7F{Yi$eK&gfnEu}MLN|} z@9CoPtrqsRcj%^A9R`c)U<$c%!^tV5;&V?kK_&mWXT(SFoV5{uUfnQc8c_aow}koX zB#9rR5C>l5{W>;$450iYiHz_95Miu`M~sQ^O5uw?x5PamNSM`S854#^EhkK|lWqbZ zg@BZck|Dk9Em#9xF|!BvVy_aZ!dz6;_ZMG7j-&i!(uBq{YL((CqRmgjnrwb#>5}Rt z2;18dRD#AB44Kww5=#5xYe@LlsLlw*1jCv$5@~MpLGd7WIruXZN1$IwCFr*Xm9(>} zx`~mw?S1wEd z!9s|+s!Sq7{;E;n50zHT+>i3CotoANhq?uk0}^6`1he^%vZt?AvLYvBg;n*U=$^Z~ z2uCHYjcMaHY;WSd7R$(sYs6lwqKw)JZwkPviIv0NXXLlWR#zfF=P%wbh@O@F#rrp( zCpsy|h&C?vfe^x2)P%Wse~lTBQ*b{*CqY?}QuPSM#~pE8rLfnzdS>N_p&`jB)$$WB z5J_KC=i*K5D-h{`Tx`H&%W@enEQnmU4{nJXOa!|=Gpqs7tV!7`5fZ692sDhjc<#Lk z-&h$PU&NdgTeJa&m<4{KVMOIa){0acYq>Dbwi_)M=8~OL;>z%|*sPFoP^uGxJ(>_! zRpWPktZtlpv>#f7Sw~7Pw&J`kGj1T;oV3<*`A>Z%vQ{{|e$Vs>jYMUNXV-H1gJQjj ztkq^(TzcwZictm&svK!OH@Eh-uWjeDe0d2dGNZj}!#j~8CFd57f)k3)H<8-VK!8g~ z6o@!6p3=cy!f^FE_e-fnWhr@KzUAzeEP$DfmM8CBwc^A|%iYKH;1open^{+-5peGP z<>6Y(-6H^(oVTu_M$6s94ls{H;)(!A=`AE@KKTP7Kbfr|gF>X$lXpQfsisWV&rSYj zn8fq|UgxkWy{T4KTxAJjOvYvXmg#{YL2-zPy|rA<>Bl~eN&uy`v+adynnoIS^KhcA zH)*CR@kCp+bRnp6_{8m9-}%H8U5%Kn~Z{X9M)ZDnl8#h+DGkJ+OQFH7yN_15_Y?V2@Vg3MZYo zYQ-C=9>kzSX-45Q*ZTs@8{%!$;|+tsXu&dcggMaISq$#2=U1%R!1FI+u=>LWcjLQb z@ZAH?n@EIoSN^#grqJMj*qFtgD1t!5%nt?v9CS9h$n;^0ESvFb`TVD+oL?iK{}i{w z*KDpa_+XqR3qW29kTvrDlA~e8U2K8&(wL$d7#`nM?g#tgA+FSfbG{iab|XLMTghg$ z%#P045o_wLZqz`One$C5!&QlQEzgi(#781-+!G50uw$HT+n}c87CM+fa|oRYlcFU9 zCIoP!aK3wZcwI3vnF;rLd$gU|Z&UMQw{u`6#X!{)GmALVoX$22QI;Tfv^eCFj4Tx$2G8vlf+kmV8~JmGZ0Kde%%v>+R8@b5HqrK%aHDFgs{_K54E$A5Cu#u5KH5#DB%`64*PY)TPgZU zgp4<}K!mfdNB)UJ$E9Jnhz$}Az-lZ@yjvOP;h1~75gnPy&qw0D!PD!agdAyIc}~YW z-#{gdBv(`W16B>?+WSr98Ub26OxaGtl?x^#f75Oou|w`TJ#6Qc)vniPmDQc`oE|mB zb86T1(O#8JnA>iJy@}K#acW(*!ckh_)!=*GCwPa;ozSmF?z+pxor0(wSr0TlF@GbW zHbvSapoiKUbsV9ph7&BlVwup0mJjF(rU~NQ#ae#+t9FKs{PfxFNqq}!Znkmfumt?p~VdlrZWRes?iSj~hyTz5=N8Tm#YB*WFxxM0_ z^xc~69hhB64obC5fTQRq? z`%Py&vGU}-7uKdd|CDQ{?ZJ|E>mFRQakSVm`_YvPDqAo3Dn^vu&YJn?iZFO>`gzx9 z$KSN+vX=){e&TdXej*m}iT_f;k|*wtiwnv-!H?hz_BtX^Ar_1$!!}zyq-qt#bXWKm$pFC?ap0UwtIG<(j0; zlG!HDYI{Wga1o-+ix*Ve+uPqHL{sIz=sj-v#H|s<(ow>4ZKO)eCvFJ^i%`5WT0B(Q z$fXuV$#0?~C%7*N%|CcvJb>KSdnZU(MNu!7Y4shPrzk)9v(Jv8lF(hrpM6%KEmbJX z^sQe3I`u7?^;h!W`6*@MQ6_oSPmrUee(Tw1l~tOCx+yXPh25eBalqbKq5PII1$zBn zukaj)TFbrDpr(zMdv`hOG#7y^^&!B7bD$t}%QG+3Rjqf**mudT!ic5?)m}*=-PptxwaT=kwr#i6d(H z-L9a&QGT~8My>*LMfiK4+WdXI^MN2|ZGPyZnos=X3dOv)t zgsHgpkR#5eU}i8281W+`aDC*1zKBTF*nH0z2)9R(Q@;3cl5v$-lWMs)9#W(y{TmM! zfFeI=10Jzbp6?n>0fl>jVs4BIzX`}-1$#T{XPwUG0<56am0bVDMyWgJncR|I*ezip z7TlvP1V12`mh3lg-lJ>mRcyR&jME(DWW~Xjs+?iV9hCxnWT=6ChYm0lq_XhpFHcUzA1enO#SeJi)9&a zA*c3YsLFc(wYdZu8U?+M;x4_cti_&Z&MD zXv9iJrw>l zujwGH=Y6l{)*$%u8w0=LVF#98*nqJK!+fZ94Fam>3FN1YB$Zms1y>OpiRhFyl(o&|9zwy@!mFT!60zALsMCnczQ-Q%paUdF2S41_1Ts(_pE&xVSm5I1c)(MVN zZEB3kfpZ8GQ+GDkDp6g{t?k*LQSzAJ^FAhb@zlS00_XH@VjMdXCNkr=0dvQwZ0Xf&Pfd-bDlMs~UQee?T!+uYQ^4)#62YoG~ICWm1j zy|{-xR&p12r`B5Vs(u$38qLG}^Gt3Tl>M>I~@SRkjSsaE;*soY5}7GHzx)f@p%(s5VgEZah717g%5S?@Yc1+=+H5 zsaqie@md>m&!2mhrnCM>>B92oUdfj@I+FwxGoJ+3l3||^pQ}o7DTV5iiC|uZZ!>V# zcpY~r5$w#@B?AMOZ@dE!9E)h=&RjLsTy3_}Db`-d79tWBJEdm0ZK;c%Cnbg;B*F44 ziu7I}#;d|iiC;J@U=4r`31KP-)JB>0c;^)(OnnWz>I$S(T%mxodNO(vcvts^xD$UX zf^wxBi{jnd5^*5KH-&Fe4CW>%kWO#T?8I(dZQaX+OWLX8Sdq;*nr>QmQU|^@s{_yd z`y11_B?p2uC)}bQzePR6gNUU~wl4e*`UoWz@U&L=!TsPR%zE9F5;|K?N`d&w|q;yz$Sy@KdHYsw38a9ETZ+ z3;iF*h7$#CWb2E912VbA!)Qes(e6tSCKUmpHL_isK8onjeS?9}awr%>WCqlcaz&+W zQ|E~v-I&K;5_+2$aV2%LiDaXE2Z9X|?XY2}-Je?Z%;#SCY1>OwfpeF3GbDCj|G27Z_-GNUCwqpw+l$@pUES?t6up9qUAi$|)%?we<9)zb<{p`75moK( zq#sT>Y3>OPmOkHxjF%Zwiu$I@4yZknaX~t#$*?xuhT^2E7rBfS=qj9S=FACWs z?c#6HUOAiu5uY*T*FGHs!lzAPbdnTqiTcW#71e}KLupx=4J+y!w#A8c)zw;HwQb$% zh!DR>5n^6I2n0tV#K7>{VCreY0q4B}h}H{h9n|^pvZPRL#jWYG?3>`QqSq6r(W8>0 z2bAcJV|zxYG|ja1r*`|n%6_}Fb+m7)9P!o9LLu_Ed@1u$BY(@6B_6VZwB{$c#<03O z`K{lJcc*awTKAE1-HktO4zH=W^I&g?o+y@)(|0>y0;I9POJN@KI`(R-X}SiXGByt$ z+HM7#VnPmXS%D)mmGC2%d)!Zj#jc(_ZRsiJELw2V=}VW0XoNj>`W|J@s1=TR*aXx@ z;h3;a+(G~H9|)o$dVd2(FTvPlf1*BYPnp>~8j)|JQb8FesB(}m>}`M)_UBks%Rl)U z{mxXUA4i)7dZ0;j56l`7&x&|cd`YE3cDwg8Qzbz@JGR(Y$v^qo%n6k%g@Kvjh#*)} zXTqeUBN+gRY~d;%g*7Vo(R+a1P<1n!LL>Ll@A-kTOb!Si-&#!gYK@saIrkO{;tti* zmM&ay8e?%P=I`e4>~s+BEI<=Xtj|QlX!*ezeAH<9!SVnzCDyU`8b4%t4aWs>K>CZ- zXfc;;eR)Kx+#mnP)|iBX$$=UCR!pUdXBWVA=K>Ra}C>_4Hc3PR-$FBOKK8tdU73Xz+2o5jFkK@_+#ynwYUk0J14!It6q~iddxqIn@^rY!g{xU7Lov=VRl2` z-V%XXSpWOOng85HdFU_FS|MCH8WMEXP>Ob#93lj^;s%ZPCWEh{L&m@l9^8 zNZOak#A6f~CcAiRTtixu?%G*&-l69H&Y}Dht)c3L#-V+{sGr={M?>!qQEbuM{S4J}ry?W)zGqv67nm z3Xj|K-MR$~*U0br9tZ_^(PU(kMdZ-`O2izwpNXjEeXS^1>9A4keZoo~Mgn^%x&slQ ztDkVRC$M6svfe)Zy?E}1t)$M-OckG$G!GZF=rpkb0!2=5NcmN5tP53VmoRjag_BE_*D1h<5#?P!bfloLOR3AZ;W1w}jI2uIu=D&bBvy z+b&61J05*hBEkw(4zrd&`W=wbvk5%rxDRRMkAAzr7{1kx<-qY`$xO@c_(`#ROwdDU z4nAW-PBA!6|Hy0s&es@bQjj=0)#C3a%y87JOjPoVzZ29yx9x2v#oh8JMf=6MgcELlr+9Flw~?<@`v(p|`2Ho*|#AqHpVUdPVx9T%2A#OPrKA z8>&nE<@`YRI5{^H8=H!_#wKg|gZd$q64T5E)yN-IR6PpNNpu3nT zl)IUvWhBEDs?1-@pLk`Qq|kHPgfwLn2;;IE`4g`YQk#^_`HMcFlyR%@DJj3ObxI;g zA6yC3ut{UCU4)H!W zCPA@QM=%#0p_6gR0TWE~RroMh;CWxaD5K7taiCL?M(&K4gs2ePr92GgK`N&zgqS9Q zVWY>)a21xDB-96=Myzevwl>_0-@umo&sO#YJl_Dpr2qryQ9yUv5R6Qb0% z{vzqZn?(C$nO*AXycErqY4!sPbu?lRh;%(zjViehoT%*4ZPI;B)02^kA2}FKD++MA z$^`7-eLiO=)(|TEhCCDL7;+`v;J2!tzEIgVC%R7U%!(n!2t>xC{;>6j^W@cSI z*-3-#4vBQR^0g9DEgphkXH`K_i7AKzXR~^8UgkZ~9geT+oRw3Nyv4ou2876W09~PZ z5JTO#h>93KEj^B-#r&pVx2B^!IvnLla&8N~Doy^p#FXM5kVgKz4N42}bSV0NvBY3o z0i{#gjc&#fObr~X zOYos)1Nlhx1SeXMSP`vuO7*&$9`6f5M2g~E`PsmB&8i^xZhj@gLe)%ga$6)EW&NrN zPAQOV-3b>|FpRQ!Dd^K5`8N#RQ{E30HsT+Ms(lFm@Z7~AuzmHx{ti6{`u zA`qF*vnVB^%LImILwJpQlFS0^|6@K#Z^#SZ&C|e z?mv@X1C&H3E`8TZB4Ciu12xn|i*_X9K@?Aqgr=3y5XG0lzoRcHoEQ2*F8?3OI+DXc zz4g>Z%X~}W{Fy|@pJ-Yhr!Vzkc01J(W6_DY`vK9vT58YaL%3YSRF7#$tP54Z}L zw;~EmKl-)_@&~Z3)Cw=&Z+NItc=3w`O^XqcwXv=Ps_vI5@I6N}W`Sg#< zRNdM=quO!IF-NuW$1&BDO1$;8j?9(4-TgyYw`hfPIHmD>irrY6g&jK_jxAP~Gt3Yw zTj24lhKg2Ia+Ii|zUo3GB(^+M>@uel19c6y;g^EYv0rkEVEm~=SjN^2V zjLk2D#@zf){OWPB0nd%0IR9ksE#J@TIj?SaoiQed#lVEOUw9YtM z$K0JBXzum~niB^?T-@oA#PF|v?mhb(Td~;d{IYyjZASSX7(-yLt& z3+D}ZSuhZ?#u&QqaKLh8#FfIipPwKgNYP`i5pYEVZ(-b8;mpUP&o7bw3wJyR?uG;| z!x2ibSf^P7otRV#XZ|Yu4zv27k{jGZ*)2&z%w#!PRW5iE#cgF{U?1i)M_educ(2vZ z=L0PJkKPmbbEUB1eO&&Gt4==z@nbtbT27Ft#Rd9No?babgIg-jnH3*k!cl;zOyB4A z(8^kV?_-rc*2wRDjCt+7im0HT7UsgL;WC@WuA53ZlMWugc19=Y%&eyx&rC6%0A+hB z0)*f1?WB1k5>bxeKUIk)P0Y~oSW`f8WCb|ge}`lQ9X#5kg~!-V1LdQiWi9v1HSBbl zKAVV0zwENVL-hEk4lGR0Q>T9RMZ&2~kjg?L)awa$glZ?fDuW>mI=&3WMjVnLQRpM= zspF{jV0U9XxP{hyMMvH!tobsgAfl1PV^EvwY5sr=_-`d8=ikpx8@clzFdG2nVbW3SmbspBomN{d4>p8fD&t;F z=@6Xg<_gK6p|v6?D-70(h9bYm4E@7Up4c|15y&f2S}PoRE+TECaHLhG1wOt=;eZ7J zG)b1+kPki$l&G$0-<(U&@R|znxI?#&=cvL+oOFFXT+dHhPdGVIJ9=R!k{6FysmLLx z*~oRifZf+}`#$5(o#;;O(6R(G}_6GVL2Dym#8Pjn_}ho%-Y^I%$qFAmWuzGYAN85s4vnlKOk6zy|jk29a?n~u}R8j6s zL#|vgPO=$^L>u);AxKpcal}JQ`!bItnP#I%XI60`l;+aiQIcZ73r}lCSi<2CXNZerh+{DPbP%Bd?olCLw3 zHAq9GCz3g^;3n0;TX3`NoYBCHj{W(272yr5`NFYM$3r#-A!=>}?eRP9=#V&f6qT$~ z75XH0PEmi?vvKZUwa>^_yET)2bXOR#Vy$-c`jhCQ)!WD(in3+A0HDUet3)Z?QY#~n=T^Sg!6<$vAiu8RZ4ihvAFGoyp+dqaG zQ?NZ=oap`CSN<+Ij3liMEDU;;7Tz?mCx$C?f z177@y#>5ItyKyDR3+qzS6CGO#*h3`*>1EgDQ8<^d;#z)}|0FIazssEjbjeAp;B!%b zkL=SAEG@Pxh1vgRR}C*q@U;r{F>PU1Nd|lsJroc%3aM-B2QTD^I${| zbGq@7T4D0w=m>Z-syeUSIaTN5FU_htL9P%Q{w@BAZF;I%h!Liy>)tJn)hGK=q+^H? zCNYC+gxU?5=BxPiO3QWs#9pIW$xjybP7g44ghXq_cewD7F>Fyb0n_C?DxWwFFa|)D z$Glby2mttf|A1{0g?daCNAL~l7pxy%nnau<24E=l4%qAWxZD^jZm-471n|dqYPrvU zjZuiM0NpTMd)7D73agHnV~9w8!2#RGQ;!PY;>WQOpwN@(HEu1yLTr~nk7(IM#)^2g zcab0fihe|Z5pG%b9ty^O=Xk}8)RHHpk=0+WdL?05+5(0cNRVy>sQ-8`O98P$eP$u1 z*_-2yf>0TyWXc#_f@OOc3n`W$bDfw;I;QCb(iOIrs1zuPSHJM`pHJm69_q4i`Qnv` zGFR<;&+Df04}amL<;xRMCuI%(+v^uBU$S@!IWA$rM$IFg-@z+72cz=-`{E@hFHOHU zW3*9i|23r0#Ni|5-|mko#cvupiW=xISG+JV-A4Y37bUiTWg+jiQ51^fBwbIiwn!&} zfrfN-z}3)-QR*709vM4%%zrkzlhWJZq%Gtw9^MlQ`iJ7S(NKK5eeGz zw?`aL5Y!eFjPenid3k2U=m4AOTNUlF#Ta@ZEInTbD~?0--FNSbrrE;pM$H`y3o)Ni zBmdny&8v}koeBFef@y;9q&-H)_CRgOzvY|3N)?BRdCT7oYoUA--WD_$L*9Uufq!HJ zzGcjO+0YFcQ8os%j#n&pamnHpZ60Bpb+EdCj05F+|Eh%1?_CwEQBvn=@d_mBH~2RI z{+y2*ZEq&x$ri=D>QL0c*8+x?&=>2JZt20KhWXV^0^Jt8t_>S^(a-^eVF!ZG7c%gPv7HMXJ}C4E z`$@QNVgb&2JMv!}Gm7=K^-F=x*Ax~Eo+sY~%V*Hq0olwwp-C7&bgGI47cy%)M{H$EzUXmNcW>P z<4knI<4Lf*6YP*^$(EtKU4Y~s-$ww+J^uWRv8E1F)Mo-m5~{{)*y0ekL2}5v!!4wI zb3avzz^KC!8;gEqzicnS6VIK`o4Ja;;McA1R}2*FM)oU^ zQWA92hNI&j;wL_*c#jAq0nQ{@bp6cgYq_77tTi*^;M@NBxhWx1JTspCsM<0b#wMsN zrti!(6Rs)D!8~OIwXi%ud-=4*j)GxtPK0W?JO2zWvd>2D&ZqFfu*hDOJ-qjz%#x}W z@1uQL-P54vj-mINoyf15z+QN*kqV3C&jjfMD@31oD-%wQ+UA5+hUJK&3#+RGfCL{8 z&GulGnL8&8erC6o_dnq-=L)zU-ndbLi;(BuK*VktBWN2MhPfqU#b-8k9+>#7K_{hzE z!b$|b?W&c`A%At?Jrc<6mQ6KWsW^HhzWH)bWD_&bT8M%A?su{S6OTptx)DjN7g?M>|!g62d%cva;;i+W@61ms>Kzki~*{?bo4U zY%A*!5s4lRfK?!=?G@n+wZc0oJiOpiFG{Q6ybvj-xCl$>!{Y}}P^H8##xsNic28k(b1;sUfJ-wc1zh?cb>pQ+iDAve|5{(-)-!Yv2J6Buag z_E~VrB^VaR^&_%H#IPTY-j82eOa`x)1z6fSq9Y8Vhqc-@gkWTo5uBNr*gPXzd=h0v zf2rlylqIkcXkW>%8I8qV_Ug`1fL8n##o@XNnO4@z8Onb*DBONVW!HTQi_w0e8x|NT zJ$DWNve#XSOxrNp?a(f`Y5KxmgBbTzm!Gt~>f@#-WjzF$CHYNF*fqD?@W3#wk^7eu zoQlzQ_f?>%OFLE;1M2&e!3E~%=cia< z)skg`L)$?Q{>s0<6u2f|0n=X6lg}Y@m zn;7o*~j7kSWifUeFFfmFaj1#6C&2?PrMG_jhj*kY|anI4Bd&f*O0}aNN zVGaes7iVutSneG}7ja^fvDp}8<7taPem2F);<@9AKh-B zBjT3@m=&a-k|>AHbl82`RrW=r8yV$1vF=EIwDXR;M&iBx?QY7ovif*RuYZRZGlU>| zf>kWCfiDYvOTqA%_4ualU$EC3??|m48X#Cbi2g!giMh-H&BDyms*T16^lLgVgKjh? zx9yz%aKj6;`osUBF?rsmOwVlPK=l}bZiAWuSR2IwI`d%zBw=#XhG;xGRzWrOFkxwPxeg~`I5WqJX zQ0wIID;nC)A&cL^V8Pk?mQ_{(MMkJBsWwS>p|uXBEmDQH zk|HQeNt3h<%~EocwgIbET-g4|<>K|q6)Vc%xS%6CEGnZigDVIkD(ax7P)7v;1>AxE z_xC*Sd(O!M)^R>F^BJ0Z&U@bXd7pjF>X|a2*9-5Df_nkpZ+<@@76Nr(J94`L<50?_ zMQi3u>rBBsz$9s%1%~2>mrNTC&lL|8H`tVqjG$e>sLKB`i%3*?(Pn-qYw_XnZ8fS; zJRU({N^Lg0L9WdLjgwy|&lvmL-rN@54@zCgkw0c$taKJO*uJ(%1M5Z7o)mfPJZ$Q z@|wI^5d7#@duJ5*bk_*g0#J#eq#pEQQ?M`gcdheBvVWNBippK zTb4EpjVdB4rIGg(uw$S7J!1L%H|lCX@+jI*5}DPc<6p8#8*s0$U$cHtXO%sRqkq?nL|A;1;n_}s z5U(_qT`v|iqMaKvHO->47F=lSUM6T442h9tQ1AC5(KJA-%a>L$sX~(IK%g!vmK5g!_t(S;UAr|T`@)X z8`hJ)f2Wxac-ev5aH?u!Y$QbnS+JR;1Q1p29escoA1HMHDyLVRqcqn5GoYt@(idON zO6BCmb+`MBF)1~r%ZK4|#h;daB;LsXS+--Hr*qOMlApws^9*h{KppO`NB|^k_0FT%YPS_3$%YI^5=ZDH z2Lh!bKf86`>TNf{YF#DKDok~Pj=Vp@#%}Xn7C#SFzw~`?jN*>^Kvi2UBU$mXJ3U#E zcw5d3@pwPHigfjd&&20lu-e(91jG)0vc{;K$$Q-L2VHH3bd`KGi)sYN*zld-JN1-cn3Wj6g>Q+Nn!U+{;fC*g8T5g1 z5p~mr;1?4TG~959kU$r|0ZiuUOO*f0E!q^!&_PH;3AtKYPRI}nJ(32Cj6@&xtn((q zUi#OT5p!4Zoo>@~80qEOP!{|$=4Y6zv`AH8?l0~wkM;n!q+~e0QB8LFZKzyMc6mIz zCU$!LO$6jvwzyz15N<9aDOka5M$}E&4S>aDQ#E4^=L`^049LR97*J}<#FH2MJIM*%1L{$mY<;ufCMhG0n(Tyf zy8i?8)ii3$S#QYh52Rxvfn4VFEXxOk_1i={^{_o_b!-xDQGD1nDqO?e+#z8Z^U%RX zT~g~|GZuXI{;sgB-dKP*Y&Dr>Bb!wrvjtLtBTa zr)~eeC)kIt3w<9uTM&>AV@i>ZZJvo}!SqlkoTDc$ieDTr&cg+{U1E%<&;t(&Ew5KB zp`Mh_l>);xkhLat!cy?aeShCI>*Od1bBdscAN*{ok8zxqRSTz|dy$<}tE@#|Ew7JL z_d>syqW20ydfzoVjwKz0l0)FHh_%tg0Llx|~pKhZ1w ztqV&C^}%K(S*E=e<|ubCILbWL7AAmAqWj}MdWr5pUj`CYB#M727JqJOLwS$4trQOZa7%_dKq{J9mEf`HGtPlOn4*fx!cKY_tl`SdK{O zVd4vXR@}FBxhH6w5(B*S7t-~lQe-+JAQqwPCnkqe8x z`WoN#mKz>-2;YYRWXgx(0`4zM!EFgOl+$<8_U$U#zO#?{$0wo2q~a@|J!iWgr`%B4 zMfL!pV84~C%yQQquJV$Kmfw0+WZlUpW=n%1OTomob!2j>WK*QFMpi-kvyyrlp*Clyk+t{M zs}@S?Sxqv!k*5M<;=R3{8n|5%7F?pK9Eeo36^@6y3sFE)q)o5P7UK{he%igZk2nb0 z-lViSmRQBETG`_P6C}BISubF*2~!apAAWS9K6+9dH=6OVToa`z=F(oRr#6SV z?}3Fq>gY|xJzha${};2y#9E0jjZPW$o=@S+e6HF!>Co|?qX_Qo-O1aqVNb4kgDuh) zq~GNCCC(!W%lO5(gGon!eWbYAVDZ?nu<%*afoX{kpQS4z7V^_1hJfd%fjiZP?{>nf zLf$6pmm9v@;Y{8j(hgZW85DM*0{|lvW%L^S%hPc)$rCRe(Vq1)k^z|!-WqKqfBE}5 z1naLuJ;90_vTvf6__fAkE;5>nPDAHg zC?AxIk(v+6{xo|#OR>#x-rO14*(EuJUmZgfdjc_%Dt+^2tnBmje7hwx2&?H;j~HSF zOhu89qcIqd*nYByHCmTn6fYVsrZUr~Rp*&I0jbf>10afBL)z&1s z%*>N!>JsUA)T?6vP4yUwr~IxEWsQmh&KZPTuq;T3~B2>jvQT2pMKm0TC9JznKPq&EbXgf z$chO3L&M9gA=cB6i`i&30X{b;k%$lHDQzl(uEEF{^{S{xX^FX*QDJfPHD4ccYRzQFZRR!PJn^A9x8^C&V zYY+{>h}$KYDY5VrSxW~W(%HQS@N=H(D4n@14CzU?(OMd|eeg@e!!Q&>T-_WDDJy5o zJ@i>EL)a_NWHYD)SwKWT1}ucof+AkEmYpe_L!&_(9_S}!jGjlG(@KnIEM7WiR8p*t zuAd?+aSk{Wic$tlv($cXIkWB1*1dAakyU7p(MSu*=xfPL*$~}FnpU!1N%fcKP)U&x8s@^>Bbvp2L zggjmfU$(q>&yNfEZHdb^tHfdJE|G^$D?dB+Ag{kE@ABlIhGdHKHR5btkiH)_svZeZI|;Ex%akxl<^iur*+wJ$9s0sdOJwe-9^OM;GL$wQyz zXj(*v$tLL9hAdKuAIC7&*knGJk@Y?c4wKQX;R!Aj%r{DoS&0J%5pEs{JXK<$H0pK_ zN05%@Dt*~IOjSJ*#x|`!>DP|}i1MUG*FJ=ct@`YSTXBAsCm(pcCNBjy?KD#6TOIkt ziYEOUMJxQfHKHP2t0yh`FxRG~@}C_+c`NKUmRO0(N6Wm(K^K;Hn{;plLv^>w=Zj`X zLtE`(14rPSV->ix zKE&U^1)d>y-joq+t%z%~=^!vT*g}1sNb_^Kd4qu>AMd`ec}8+=!6+XuP-gPMM%=pA zroMA}=lqGBx{75t9(f}ItnsK92{=)z3IocGM;#zIH!Ftc{&>F#JQ45SC9_Z$hDLA| z(kN>5!{IHoO&|Csfajc2_8Q7kF*miEOu26ZUVX&~Z){LXK|PuB{lEY){LOITDyG~Q zvu4Tn6Bp$Nk2u4(7aVDs8F~tiz4Vl&r%!`e@Iaw#<=P|$Up2Y#+$D0jUU*K^lFe`~ zBXH^8l{WL-5nfk&pbNWCx2M|uDcK=fNQ=X6U$!fNe0 ze`fv^bXs_-)H$mIW$k4b8jiV3KV1S6v~u27K_*R=Y98QUPtz0J6!XB7RW)=fnGVHN zu8@E&sELQ%*4-lc^M?z#@nH*nFws7|W*j#_#N9^R9)@B)x$=oZo&t$q=?~j!kYG*> zEQ${11&TEIE)7$XD}M)b!;XBqbwNGM!I6Xs~~jELs$B z*F+Ku^RSFcW+uYxEW~U8*xrh1uK-uvfIMxYV0N7Col3t^5z8RTaIX&LHVFq4o%q;i zt_eYAf12+miGQY*SIh`$?F%1n)hfXz9$9D}<7)EbU8p!ue)O!aNOxu#<#DU_hML0@ z)y|~7P;{6{#j@-HkO~mim$ib%M~?cI%KBqWM(COD{eDjoucv!g!61E801(5=XA$c$ z@tbxLl~{rRo?kgPId!`Wu)qOCa%EP`cFi#>l<@?T+wQ<&Gj4Uw+&Qc3A)kBi%HPPG ze|&UbW_!J#Nl1~`y8K>-%iINZ~0N5r>(kXj$JDD&^kNdN3DhQL>AoEkE>GQtzQ%-}zk))=hu9myw7$=dg$C=}-5xGBIuJ!MMOk(~Og+5>U8}zk0b{ zNXs=T$G3D*Qr+#yvs!G%+Deh*@cClOoML@F9ljuk=oE`d2%7BM^V#^_(F>}ie5I$$ zgKF74ko434jEF_>p-6)Z89;;v+JYoV|C;%R2Kon+&AMVACQAibD<({mp-pQ!b7^0k zPfxDP!dSdGMWHwF#11ms4+17P+&Vk5)a1uM8*$g_fWl|1iK0rHIu|ZC{PJJ;cD>=& zIhaZuzys>KNjMPd5)Iad%dBQ6#Sf9$@D&onc-iAQpobnR^wIDGR+Hnt6G9{vL|2E^ zE;pZ`<;ATFH;g**rCpRuU|`UDpdU2NS1mSKTUkE-BmHp(>58CA@Vk`YZr-yLlAP)fzfPe$35BRuX!%Iw( za-kbe2r(8KqFGX4}i4@d7*@oomXIuRbrw zDgH1@r8kI*<)E#q8B)3Nf~P#|t)gb@%5ujuuvqhhg6mc|)pY9O6JpVIhF`{HaQ0Bu z)YY=Kh1w}!;7S}bS%RUP}n!Vy& zpryR~@^i5QMf;YW5g1uC(r6+5t4#2rg&@zO)%n-m2G_9|iHsrXKstu6WBqrn)t3ZI z^6Ov1UBZje{4-6f3Et9;Z!UZ^SSdjXR~SQjxCT^jlggASoBQsWAIBtpvhNcHpqDCJM4efDf968y>WgcWQATk59s**&q5- zTtVq41~1bMy8HYIm5KcCDb_XqSv#lk|MvXkCc&az@GE0)lchX^)hu3w&$`$4GWhW5L@Zg{3{#ZSV?1 zCtJg&)>9Tvq&xLK2hVxgMLYPZ+*sK?XF2>~l$0wszU)2XIPd~@zsJT-eU;fQvyX3E zJgssPuo|L;MB|owp@ULadS5}suyyB!KCofsHa>?S#o0hCRd<^(~RMRrG zF&fYA`}p(3z)#+O_72&Z_5cm7M)E80mqy)!nc8n(74zxC9hd_#-U6U6CvRWHT^Sh2 z`sn4c0sRephXMmIMl)BPJG+8u6_Y{u9Xt);9|Vk5Rh`h&PfEpQchU}eoG{c-5f_H} zjKP(#isafWcF4cP&*k(*`{$6+3!~stPp&OTo&=KC_R`1X%8qIHwDWOg-V&KGHzh7l zZfjn=ye+3x^fLTD`}DloRCC+G-xVu@?>+W^q19*n)3oaVf#=eAFjJM&CXh_1^5};?Yc(AQ4qzP}JnEo4RtX#3pQC(bhmGjr)#%y$U*K!; zV3y3)W_?n17-y*uuX^RfXSQwPgcOb!QoB?WXcKG3oiIJ@?K|w3a(Y#gs)U!`@*+Hp}6wvJ#qOx^%qT9)pL1=QRj{vLd5TgMUfE`En8}Ok{P`bx z6d**JJp^ELDYN(is!h!}rnAMGwV|qvj1_o`9#^cw{FunaQXn7a%3>q-3+yM?h|G~D ziEApnWie*F#;$l&g99bUv<>wwZ{vP9TP$Ht%VsHuqRW4rO?xC9fv&qS9Ktn2=s^l1t46doV{}@<J=SsR{}(jBjT&yMhOIlcCx9Q@&rqv2o3K)^)muWh0a$+Z`? zOOw|Jq`|wt4E0lyqAal4o>P>B3euSj-cFJ>uvy*osi&Q*LGf4@NUHTg_X)4n>(Q;=kAM$fSF!V2pIX`%`;Sa>;;2j3YJ}_xcJidMOSgUat{yxh2V@M2tn3llBHBw9B)$87-g5dvPsbSKD=A?4Me0c;-%hDd0l*UN!mEx6khyAZ+-n zJ7dFpb;)oupxpScdxd%lZ`@=V&Jjjj!Jn^-SJ1e}#u4TLcH{HY`8}&o{pdhfN{FM& z8)Zl3ybpG|wNp>w0OX`NhD$I1kxsf+XoZ3gNkD_=Pkh<+>+y;?xpi643rCw`cS_QUC-9$!V zFr2U+Ydjk!S}JT!W;zAI9po8A8^HlrPxpTb_g+o+KSU19@}!slN$?4`DL-GvRLoTa zb5fF%w_1@H%=H3sE)SmwQxyhpd2M!|*(`vDd;7;^9)rD7{KqE99dUthd`oa0hYig) zQk=J7N-GUaTjSmW7~?<1+sN@5V5C~bC~C_5K+)NYog1B~D`JthW_VJJ(rqZ^m&=Ql1TWIKcE{8Z;}kwByB8zHJovnFF%w{m?bZU2^u zmwMX%Z4@&AVuEf!Du`J=848M(hQAnoK!JnIAM$K0 zRFlt73D+i6tBBeN+%`_$mwkmZ3hVI9bSUDflUw?~A2mLaea#-w2{$%HZ@D`HXxXBs z^*!`?`5E1^h`;F}MQoGU5NX_n=3ab2lp2V%(#sJ^@eEA?v#TE#+Y@kZ1FdPivLP);6PGh#PS z7gnzcXs>L4`Qg+Y;Rfy+FoudV%}Aa`8BA}sfa|usZ`#8&%;jrHrXzs(y}t}9c-^qA zJ$%MIz}iB+VcR)_p_Pt)XXo0mX*g}|g7xZHCk6>OeDAN8$%5ZbOGEiYc4()A};mX{+fKbV^ z$bduTEjbV;(lnAdo7)wZ3wRZr;m_3kZliUCm-rGbla5EB?KLY`xiZ|Aj1mAKI>MOV5z00wEZZl{eL*LD*SSpK zYPe?4_^XP;Y0BK!ES5!t2o37qekRQiUpdG!w;b`yMyF&!F+ikx0(<33>H%l$K~UWfT?=xQaU_+`AxblUOss9b06|>v=|_?af;yg~;x61x2vA zVy~nL>u7XK9#geY>vOk963IEwRqtpUo8(L$JQ$Fq|kk- zm7*S4&&OXn|F(ieu*{?&5w3o2iLkV`G?NMw){iGmx9-puC?Nm!!MR`5{xr%fT27k2 zP;iWb3A!|z8F6JYI^vz%4cWsW2vc3?;it%p$;W`k@@^RB2&IDePapI)qeNaq^Ays= zmTZQKrIJhWKw<5oq^O2clj#l*(g3u5P}vqCan0m*;o1!)-~AHb9`)b#Y#J zDRhyvlk53DsTvxx3D&B6f#R=c=gzvV$GNkPQ;Qu?T4Xe5)u6IQcveV8TNeWtCc2_ zbmbC1HAiJQEUW@-la6XSU&9Z|A`}p>R$WT}h96wvaG-9Wr_R4*Pk9N7@qZ{OKtg;y zhlJ{!Gf2>7IN4MuAbppx-w<`%0xNcj2{ob{e!7WwvZQSBp1TTdN3# z^sw)b1P#jB#Pu%=Msq&qAUW(BcV;~MN(n}?EwHK9css?>Y$j|(98?U`^Doweqt^K} zs|GwD*-<|5nSX7z?tOi&_>0ze^|TJP+7B@|_RQZuA|yF{f&VU9>A ztS8s~h;zbEOe2EBsOXDITw^qR0}uj%6kj=^PLI4e7nb_Va|+9l;#N*-w^&0=Zx3fc ziAFfy3o}#|omP}4LNT}C^aX8~o5twg@h_RBhM8Qid(>q^b59rUi5{=8<>3nL)oX$EL z^>}D?b7m;YT<6hvzQRuP^0}xPD3D%Fy3ds157lpi(%|Fur2DKGPDd-im|-ft`rLz| z?)~Fes~{e_QsN+52>jej3S5T~j9omCtRUCK{xjiVG%;4m+O`kVfwFw$39Udn z#}5>oVs;;xuGEX(Pg_U9$jj6uku^FL(iMh)rlL5L6iu|$b*AMi^2cg4hJ$K(GB$7R zAJF_9z@{Q1!d_}*U|FSJv-|OVw(eqI8sm+h_0rYYLP`|lNC*B=Qx(OZZM2Ix4-@CR z+p}J;hB&L~A?5A(WFdp$!z!GVJ7;Yzif)eNDYRgNG(V4iMA%q#jYm{Vb;FAVMi$Ts zX~TKL!LicM%w#nJ7dTi)dRxO!pVH%I`hY}&vouaJSbH^Ji4LqRprnwXSBRAb5C^)_ z9s-bq&r#;e))yFXq}~3LyeQd*qBFFB1?+~vnQ4))zIB4DU|CChX3HoPXgpH4*izVs zFs7cqUN-FoWciX8@aTwZ3|%dk$g|FDL`03ziCG}NK|Q!F2OA=%Bo_uidjz5wBsdkNOBE* zBzxX8!Qi5}NZg_0b6nE^edXTE39bEWav`U4|YJc0)?$>WNk+cU-0RM)%2qa zShAje^fmMh*3;uRh>Qqbz3hH0oTzLgZpa3_n(wa63Vcsf7U=36QG}_6G`sM!P2G9) zS*KT?>%ya)Ub)^dGeivu#9~xlxt_R~GcxA^_!+NUA069Fe7b9WXaj>@<3wZJOz5j8 zC5KE3#IxEQZui)`?=8~Z8f(-`h^u`=_+SXqvsvz>n(q5LAa6V*Lpm5)Io)?@*7ROi zBJ{O-T^Bw+_*;#e_g(51yo_XZowQJh$u_>whHWTCP6Uvd8O7PO;U#ta7Aslzt@p<1 z+rbM=rc8H#XN$Xpo7w8Ru6YZ9NT4w@+p5XjChOQ+Pv%ageUd#a+>g<;s8xuE!F#~8ND9BwCyHr?2fD`d)V^dO4uwIR@0}q$Xr~W=fL#)TE zwdLzkEXDlwD2L7(7AkFi9n$Y02XLEi}2L#*!J z4I&X9hxFXm^?Vb=SwFsa#PIG1oGFdP5CTt7KtM6ZYPz9?9tG)!R{bGE{^-ECp}lImkh#MCvl{K^SKm8^>VHw8sbg5OIkE?uOaNT$VEKS!IC2K zyR4{Run`-W;5RO;%%lsB;f6on6M@C02k}o89rH~Qvr_>!Z;aE{$_;<~E}H_)@K0ud zddc~kr|R|9gz~kv4rskEiOXb zjn8Hb2EyBU?lMhZB|vcJcTB4dQIp71(X7PK^d(CJ;OY%lm>29+QF@z`z=<+kGO&vzk@K!Cp=;Wh7Yi&_d6IcWq~I)^NX$hX794Mh^=C@0t%nsK~p=giro zjwzb6i!km{kOi#2*#dFS*g2(EnuiWSY3seOA8GGlA;A8rn=`PBrIeFT-2#>cHXux7 zDki$E>pTJC+y|KV_;;6@|4>VA83DIG{d$(t0wh^??YWt5cv&$WlwXKLRnysL@hH%r zeYTOWx+xlc_rVeag?sD&ObG-trQmC`=0_Rm!(iQE=nCZ_?!U_b<19YL4(rJ-j22)< z&t0ba@U~e!>Ghga5Un0><48cv7Pf7N$Z*Bn6ujjPs++`3*H+V6;wEddHV`sxmB>pd6S!HbO=J-WD_lv2 zV)SUhtii@JFAOKN8GRZO*0pBd0#$oS6WO-^8!mOr5yYjWhpS#DJ1Xl1k^XoOgqArT zs_6&cS+Z!3hW&i-Le|7ez?_j@xSFu)CR3;NlbW-@Q`j?nqM|ef{S{3mGttA2d5t~m z#cpNI4Ob^!b7T_%+)5isfhcz6N!J`Tw}rW=l{0u01oLl#b&AsfxhnsRhnJutr);-JZ;fmS zVRg=SL2cdwmhgS4k%5iY0fXa@rim1u5IF_{@s8eMT(P(qw8VFGE$7^n`2u!d_N7cI zs_(w+iwtrb?rHC9>Fn=l>F#K0?`Rn!IDo(cEd@++nt28GM{*+7RK!R2Yq7Rp@J7p8UJB+K@cx!8gngZ?iSUeQtPl>6Pty&r4i<5Z zW+UmNj~mdC1Clo3MR^&7fgbS-TY%aH`B5=@VC}M!`&JJf(Sp3tcCd2u(<|J+tIwN% z_lOI4W6OLeA@3sJs^xhngN3~5{@UpFi2?Fs9-s4kk8>N8!8N}#kG}bk=f&M9Bv$&i zF!<}Pz`Zy&r^iWcBJX13e$6}l*K*_XX}N#V|2E3QNH*{^kg~nUGSi9?clfSx!FV^u z`?45m^sa^JNEn;%k~?LCf|{6?x-58~LYXKokG<2sOs6*KahcmJYbB<9>=)c6FSnRv z`+%&`cgjUU_|`&Qi~tQCwzO=lGSNa11o~|~`O~xc-pY;le;oWK#olJ8;FE--%OO?e zFYRRJDyl{gBRii$75Y6A0F3$mkJEK1a;TbIy#dG0$nJx$3fuBDtFxw6j2X?D?VaOk zeTTT$aic3GmamvzLcnUV-*S5Bo)N^R-DKGBytk-(<(x^pEIo7&4g#^pYb}PnYToy9 zboe(YYjR9->MmJ@Z@9!Mg8BAUqCqV!EtOUkhARhJ+iLN}$pjr$S9x*D{=hBP66->MATaxF@(iZKRrR zdRlv_r<93^k7FunCcs5Po(fu-l766PDh*qbXD00XS<7zbRY5?yEoWn=i z2Y7g30&nI??;ze)PEUHf-yrQO`xF(!nDG`_7GR^gv%bpm3pKyPf?q{b*Nl`rWi;;Qy`C zdGUD;^55SH{Lb~LD7VZymAi$?i?QXai(>X5UjaJK(-|(lEsIrQ>1P=jNXw}~#wRr&A5O29d(c^%cUN3yi z&e^$hCKv78IdlK91hz3t^)>R&up0ifGn(nAz4;AcI#?Zv)HF9g&*n<(xjv5bU} z?ow}H`ei-I&=y_2!9MZ;{SblVkj`VS26D;Vh(B^NeSF_j{@sLVU^&(F{L;Z=aLt zB_Cg>?(y`z3x_nJEl(PGSd)HN5`9$D(|&{Apt+r(j3FF`&uN-zkWK0m|AzCCaW2aB zU*Wzvn~vkuWzWTzNpYsYsW*ICkt2cEeRX&&6&K>9(z+^ZhAgT*fD4*%o7Br`*skx47q31}|sOw+ebOh-5JAXWCf@lI4^evJF~Pxjbq6XM~?| zrSRR5qdAPf>EGoBoPATq>&(MQBXRI7!w~sbNyJsi5fV9lDe*0lJv%mhw|Z^XU^DV( z_%6%*A=`^A_VDQqU;!PbpcRKmz*sg}O;5CD>h<)*mTWub({Z%VJ46}m#c&ua%!m)u z?97abS6XiDzJJ8TI#D6p^ag6;q8EUhtEQK)z?V}`FMoqM&1eriw4s@te0kQ*kA<-k zJ?kOknq3gU?@^d5+X}RUHuAm?ws|w4NNnjhUN5(pB`*WJaP&gKi#eQe&snGd-N~H! zc9oR!GS)tNlP!;5XdR?Wk231y*7Lv-n0x4F78i_W>m9R1RYnsCU8@S3Q0N|f=nng_ zoQ#~1%U$~ua<`rw{L%s$>gr5?k#c0>&Zly84WJTBB1lE0`U#1_gsL8>ugn65rXoC) zyKF9sLe5NYoar*B+&F2L<%{G*kB!0SSg{Z}I{QfArZficgi^6>R;0Xim?DJpf7hpv zKZ&_h>xYdljq=(+VMCxP_Hqb0Q_p6*9bMTF;tOtf%Be z{gpHxaUyz2SATB@E?O)BSnjs(rvs%_LHX79qAnJQroy1G zj;?jyj!Aw3^qAH625ujuR5;`anr1caew5ZaTu8jZdfNS1)TzXfnueB3H-oxBGXt{g zo?LE0ZMGs|Q;=apaQ8B+=tlJ#PX?J5K0FHc0&|#HLdGQxQxx`i-~o_579*~K zh16ZE7m7Zr$>5XvU_BXp$^x%?-rWaT?i|$sDk_IQOCTc`2kFP;1spma49f4Ulw~_f zY)5SBA^*K|m{8QkkzJUAdHq$S?I*ij0(}gV(g5F-noX?g68FI(KQf404-*+`xMi5w zSePK3PMM{UmuL)~rJWHhSwbS|4!uMnHJw(jz7T~e8Gxdt4*K zh>js9nYB?^k|-o%2a5BP-_)n_T|o%n-69n)T1N52)nxxK%L>Wct<{tL|07pJ%jukM zMaEru)z0B^02h8B52~5*;VLjjakvm~$8obB)h;uE6zFPM=vK` z>jQ!1jn<-)NGIB$dw4_CWZ>M8D$Xl-)=QQkt|bO#y%?CRT06H)O?IR^jzGrso+k^n z86}Lg;FpKY2J>JmLCTnd9HJf=ooKJ9A6Fk}7+}6NDl&~Mar?a7*uE_hE~ek21aj8l zCgHOpD1{i27SW*gA`H`apqWyC-!zmi&l%&fXn<)W(J?Eg>W;DyQlGbT_j$@CcAuAj zxZ%QCvo5=om*(%>i!0y!9EdR2BC!j5J1dL&`}SOmU(Jf$WMy5s%U@si;W=Zc5n7b) z;kLQu-EMgUuT>|V|G9B*UVizuBR+b+J?Z78=O3?Y>ukaGLkIDCa{fY~As}$mD&WmO ztiPi@N8h4KdoDZ>?NXI6!8=oHkMp@0XFI4lTX!F2m&v<1zObsoE%@_IlcfECrSpvX z8evtwB}NSi>#N#M#$U)yGd>PeseryX6|8w0Lh!I-+M-53x5ayW0B7djHz(7z3iQ323Xd zG~*9Ej5rEN%U`NV$F1S{deU(V%1DVyDrD1Yx)%W%iZBLM({;vK;y4|*isJ;B@hsV^ zSeQTzYrW%E`+&MhhXp;~&^CagFQ91v?C7uiv=6QrlJJBxrTjebK!~NIyu@%zeo~qI z`j#Mw?qmry3o0Aidxl8k#t*fBa&8ugZWwyE<50O_=sob)t}xW?Evx_w=~mB`8@I;H zRoJIJ13U@NN+q@2L^g-3h(G|&NUh_|$7CF#o$9ZJdPvoBJNP}(hcqW)rC*XAjgb%b zkpdVEwJZf<7-+U{w%}bTWAhfa(F_T25sT6KC57n1;^wC?tPpg%2l6sF{>Y6gIhm^g zk*F1yRS?&didk(u?GE0mH=g!2E4;LNIurx40};LmuIw|4TuFhA zFPD4V4Q^5nPti_PQdqy5Jo5#uUr(O7)jwft8Kdh)3n8>N2QS3|cjNmf z(*k2%$X8Ig#I(l5w5%MS@oj9S8)qG!ZQp z3NrMw`|5*2*Lw2RhayAK99ZWmoB*o?)<@GHp~^YiUru6$AiS1#Lvq+8-}q0y2L8#1 zf&vECOFxC->PF4;Y=DVQ$CCO}#4W4@W76N=nVm`lhJXnR$X``Ye|r}=<+Y!Vl){4y zAddC`k-mdGr?FFnhqU)5GLak<;o@XL$%8!mC%AjULm`XYZXyI?Dz>}QRAMQ(#s0e; z`A)|q{E#%QNl)L*L5zoy5TlY8`4v?5th^#%aL)GOF3NjbRd6CGdjw`tC>bbHmFuy* z#Mbk(J71K$1g!7nydmlgVdJ5}X-@c`=%}CC%QQ%}kr+B97en5Y7_cIRUfa{Zn%HMx zDdQy3>Q}Ax2LfT0lhwy4b3uiFV_VAE@y_t)krZt8>n~ryvynF$zJc@T*{hF+4;(Lijv18+V3MF4tWj2 zR5r1rulxt-gvXE%j4Bus4u;E+7YiyHeQw++vT8*!GN?h|QF=(k)uq^6^qxSCxc6l~ z`5dv~0>U!nTw|576~(jkVK55aPaQBS*7=T?`Hrx9+;_^2?UR;9(cKLTo%fXV?0HYZ zDuB%jDt$q;iJ*}gZZYBk24O{lUA(GJClx<&&eG&N(xGdznrLA-T9+|T)+t`KAw)VE z$OkMcU5@;nHOrN{6(Dkk0XRF(<7ly#0utpm|FE~Qt`>W+W`2-WoXPZyA(o*w@h6d2F(2RTjH*y$kJ?ynfsptK_2 zC~_HKC9iu=C@<3v8IhfP$@D>RCib8SxI02&TAzZ?xnY`l`^VCxIjjl^dd&gnIwIVG>JhJ7VtiRa z)j$j-GieMrtLf(bS+2dDZa!e51#sG0|EGZg(yjC`K&kU=s2|Ch7&m7`6tF9xy6-Q3 z)^P!Xz5f=a&sYBdql1-@U}O3g25|-gU1iK55($|&8MSCUA_Q{vUY-VEH`pQ9NBCl> znuZ)Aau%>h#s`XGh7r-Ue)UdTRF$GdHTNGMHRy&_ml8~8lqYvKJ-klV$C}bA$as~_ z%SeB7^21##uBeVgB!VRO{ahf)CO5?;nija6n^teU>&b9Y3xbRy`E>W)>Zid^s*S7u z#m4vcmm61IAAX*eSwAm0{1YS8LiiTA9#~o@7S5{cjk}1mXiLq}bDG;-O`Z{?0YIS6 zdO{OxzbwBD4JFOQ+U{vn=nU&?Hc68oxWmEMVy|zal9y6mWXamEkQYGQfMz=G%$JTU zgPv5RkfRnITG2r_5PebdR)1)JS%lSe{#~jt0cmNdCy>nf)j3F|SKn2eMML(G&_5$Dqk1N`&iSAk}j1u`lzs zj>73|&n5zN*`#j@E2YsypJWlqMOgt35f!-cRX1Z0<$YX=NH}@7yM=^`td7P&gSBj3 zgL64ub(47u(PNv;5s%{!9yS%KGpI%z6ptDG0Jpe*te&iSYt~OpmkOxY0(f*_bQyU{ z{A!@#)!l2yVLy4;>21Ff60Ec7$$B9YLI6|29t+17s>vJixxQse$4ibrSoBy=j(%|l zI+>%oN~MIbdCS8R0!rZxyd>sa34zT#7Wp6d-WbcZ7#;AUTTn!J1-no9DIeZPBTQUg?N5UWH zfHxB35C{>Si7ssr6|rc=xcHk@`f|hl5rE28c=4pkK{YpqKGPX`mUzDk(j>|>o}UMu zU;<`dP2T_KoSDnefTYtOG8ML-T(v6lZy{QqnCCZHPOdsTg!iC2N>7{}=iLWjyr@BX z%qXzNHY;925MY8FO&|F02Ne)t<0DP8z)cPhF6{cw*BFjlT}VBB;3r`yrYF|O=>~bk zmN6AtT`~C7M$(HtqP>F57Tq6)zvZC^w&~2;T_p9iGD`us%FM8HaWr17@)wWK#sf<={?-%d*=Fcb_B-ge{l{aMZ4`OhsShup4`Gi#41cw7KUk zqF|OooT@OUxB)J$n%p#(-n2K(k(DFgjO<@gg|F7`AsV6lgYYWvT?Y90sMxwRO?LN% zSD@Z$f&*(QW~?e!&!b_bVLXpL$a&oOl>VSRW}pv$Jwd$zlGhy^nNqs)GoikBRvNxv zPi8f;1>uA~TYIRB1nc2)`pQOH7gadBs%DZ|shtwVk8|I=R@f>xhV6%>z#au~+G}TO z6+tZC0$GT?8qvD%vB#RoF^<=`_Zy7kHST>%d>)?yPa5_@S0y#}&br@VWzikE%3Cf_ zo$+K*I&^{1Zg`b+A^~GT_`E+U5+BD(W;rY2JgXv-J})ByG@c6*wZd}47tarG)*H4G z_%AnX{jx%Cm0@v|3;tpta-mw~Cxj{#6n!U9jw2Hilf)jAY@u#8rXQix?ojg+tHZz$*=>dB-3H7M~0A&zd5@{vxf`>dP z$w>)qQ8R#L-O5w%BC(No7r!gJkCF-nb*?nY6UvP3LtE%DI}6I}P~{JQ;0c0z2( z{gB;ua?JO_k*mp}gsx&`hwl2{<_My(TA2T0|K;S+{@9k@%}H+?z?tH!Xc&4jfH?37 zom-B;q9B|mSC;V&5ak^22QzO07bq{;SQ$AdKdF(!^GV0?NS!wRFd}vGyRTZ=Bq>6C zO2}hrDwaCUsT*(q&C)fsta294-T1@EWf~7yZ(Ih>5r=@6li$gcV9OL7N{F>;@~%nz zQppF`)RT8j2IHt60l4?xCgAEJ01LIi$OW5>JBVrP*RXA&9zu~$7pOYxC<6)^T%xlw z>lXT2m(%P2%{t=NV#|2aUZo(Rj~@T>9@6CH5>-40`dX(h6{Oyi!cihqim)=4e6#l( z&OMFUc|`=vmbR7Cg?~}r32HT(CDx3#5j~so{{=G8t>=zRli}MA_|gKiWszM(#puHR z(l0%Q;xBUcNqd)XJ3xxORr`5Q2OipY!L?Zf2CZryYz0i2mF*qC83Gidr3-e>L~q|w zG|>yu@4prFoI7J|@Z0v<)7efN6&>d!I?zkzRIph2PoG1uI3}W17Fw=YWyL`Mpj7yd z{+`RP+wbvz4oB|mTuta&%QP+P+B8*%fe|2) z2VF8wzzT|v590=-m|nW|)0L#?Z9OS}zheaAZZEW*Ryj~w-Cc+)iX5n>)f1gviop44sWb-| zlF1S&vRd-q<77pOnM6=ltP!UBwa~~cFk|g=ZnzMQ(G&fwxo{SuDtPtGbcvfxt;dQK zMJ2f5>vNka+o3dcKCSMosD>RBK$kGkL1!22yK+j&Ln^(oKtU2%2(_eO3RKxdGY*tP_5*-Z!2; zwFG0UCTqVgk51&V`W#B;;K?q?#Vw^=;D%xqd{AG@EBh2B zukjh!q0GcEu=2w?0WW|bcvRCJQ@KQOK{EZx*J%pbXPz$1VO*c&CB?9<)njajq@W;z z3>oh6pkOH?oWWNt7e1~`o+D2+;Tpb)ItJ(~j|@Y8l>5v51ht{%GF(Rf&Rhix`jme} z9%!qO({sA+)i@mGclJEy%rPx=`r+q8Ax!vW9l9 z%4yeMfosh;Mc199y2V9rI}=jSarI=Wr+b5EHZaLU@}_@aJ;V^%YUaJRlJR|S^`ex_ ze9an=F8Sl)O^7EtpK3i;n$PKJ7SP={I52IXL^qWMGp5g+J#AC=pJQL8-|BO|dd!St zXNFhxpRvScv63q^WCI08#qI;WmTZ*W{FufGRT?Ms_l@~u)Yr-W7$YW*4MZ{2w~G5( zMVA)xD<)z_+s69H#}Pzr**JnofB1}fR=z%pAgak#-^lptO#`MYR=^E-rI-EtPU+nX0=a|fWD0B~k$@f;G|J8xJwk1~s9 zS?!T{EK~(}1^kWmXFC@we@Gru{ox_zK|j0UR-I_ec?++&<;-3xm5`7daT3v_(dX8i zzVxucAb9R1G*{tw7{EQKg!%EFyCO7lg@jBh3f;OpknxlEib$pwAdPo?ugwC)^7A}# zi^&B=8jyNV+}Z@&Lr3zgu<0!`bW!>(tipR%m^|7JTi!Nx8p%Ennp4efxk{6n1?o4` zEVX~CRVz21R?o zYj(~CIPapO4KVi~ALc5vh0BmzSPtp4UuUz;>gn09xAJ&{^(iYBmD95iA^8md7mrw; zwo-BAnwQ6{X)2xw;~2051XV#D%(Q<+`q;; z49Hjlv|h@NJK^K|!CBP*;GxsX&rUsP;VH|OE_-cxmnXN5%&Rs$@XL7B$+HYQ?y|5j zXePV@(A+}3;elUSDtWlM8aJnHOLjFpaMQR;6q%VbvV%~1(Vw=wt)-eAdp@eG@*9r5 z0R2c-rMr@Z6Oy%iphPWKI|8T%^;GR=z>MJv74fwtZPqbo;Ymx%$+2f!u@3vB$|wYF z%pn|=YTlB_52(t5)#QlgO{yRFIt~f(8;7K0){`SzpcM{4K3Dg!Rxl*ea->aiEee++xQXVHMOr$tI+hd!>MpvVx@YRm)0Xo5hXk_L~ zGu>uG?CQyfP}oCGVKw>CIiax_MQ<4AQoev$ZMr{Ci#%`~olKgR?wlgNF%(-!k7J@J zs;gvL{~j@I=2RJ{gF{NT3`KYKbhnR)3aZId-^vV_qdc(Kx#gdEjpg{cj z<>Y|RgfJtQ_y?=r%J!{~h$UKvG}ppuO$$Zw6=qu|Jzj!=&gKvyj8W)J;NEplQ^-KC zCwG0!Z>lqr%$D_;s>ItmlH3qDxgI!boL?B#9cg{EGE!G_L-`hposaHOgQ z7;9c&p0F+r{WL)P zE1b@KfDmQPE>xl#;koK3EBW1cAsKijhLHt}5b`5j7QQ8v{{bEqli$H4(pE-Bmr7k zuTncsyN`qJkJ2+JO3vwJ=7{fxTXPXsO`1A7X^u<`vYs@pM!qBC+^s5I$8T_|W4+gl zbh-P8lsRVO%F9r~U!Yk$O{;?s$7Ms;089WzG(a|FR%f{Z$Au^vWac zgckN9BZQ(~`X&QS5W_y*Lz~8Kx=HiWk#ZCF;YgguwJGu7meCHZnZdk!e06q#mUZoDsr(x_BT{zy$En}LI=Lme+dHLusfAR#f z0LbucJoMd8d)4&bt?V3s;M=0)iIQJv64FKZ5v&yD`Hvc}?#K`VG&n_8ze4QF!nN8h z-*RzI_kEhwsfSX>Z;1s(3~qea)gwWZA}>ZgF#`VCxNG7GTt}si&kl6OzN*}wbls!5 zl8)bIR1@rp@J;!D8gA^5UrFwJv1{?|JwZ62@!Yt0{(kjgp)J7Oojq z(}NBzX!Yz6G(_aukTE2OsE$OgwLtZte}aqqHF$oqS+H``;$mRVkLn(U6+uS~pRt$C z^$2%nF$@H=m!)9K7j28sub4rp<6P;vC>r1Tw5}N>3lwa zF$PnepWXhQYBGyP*Ss9k%*0dJ0ZrzCIyd3p(~5Gfb6%?i=_#xlcEZBdbk;(;jtwB* zC%v=3Nn#5)ST32oAIDVA2n&K&gJaxMYVrxX=3l6@*b00uUJi5?pnT(I^--(Moz*f` z>j#%%%!M(|2}%ZVqd5!Q(n}1vSlg!-=URyMpj-T}yJQX=orHgnc1@@;-h#@E@LM>* zAP!?~l?aXfJZtXs>2lKXebSFDPjWBNnQX`xijYhb>Fe5aP}ZEMF6hshXh5;Z@F6P1 zU?u7V#b`sI?)(=T6J)fdEH1f)G!VlILHMMJM_^v-U5RCu9{X^Sg1AtlAnWmCpl~;B zIX(6fb85IX;))dRRb?|C`^ZLhr5W(PtrTeRV9?R{T&AO$&FpG|sqN;BL@(!QOE0zz zAy*`o82^%sf1C$C=Cp*o3xhUEM}Nx&1Sc4ic9AUoU~~ZCPjC19t(#}b@l{V|o~y>+ zGgZw(@ppS{-3$d6-CsA)(rpP#+)+lS7DsS$d9p+(T|J7EsrzCCk^5$GAnzIg*U5*} zkg;Q$Q#URrvb=hXspu-AMJ>}aI9~pF=NvCvE-N}-{+{6LtTDmYf;TQ?L%=!Kb*-Yk zfyw)cuHw3a&lmCySCM<;k`;%=%a}DCe_TDi^{wlX;hKZ|*4EM3j~z zEwwgoAU+hg;jta_(_Q}Y=&X^f)g=UtOYEw%8NCb5Ca}ghl2HvxxP@Shi?@IZ92AX9 z0ih!*MPv-Q5~PvgZkP}k9SKGzNF*$$XY3md#dPlDeIzW;eJrdbR`}k{1z&7!d-I}+ zeX*0?JKScZtz;dSgw~f^)=(&IIB`Yusi*7oVRgwPMCkbAgotlv*Xp6Qt9r?PU8T%{ ziS9K!R(`39u$k|$_PThb+oz1E0at4;?)BCDgJVse(hYka#2vTx*K9*`J@~DhuKg9! zLSPMBfwI^gedOUFk!Tt(uBhU_MAQuq7tWCeA{gmqj} zq+mjx**xIj!tB$yZH^xoEuL+G-o@MUiEk{2wg)zKYoySx|2^AYJ^A(L!?_i_sf9{Q zz46WEhAEcGYPB*N856?b=&pbH2EsRdiak{uzIBAj@Os0yjts5vG#&w1OJfC_g_>kw zDvKCwBeF>9xTrvruY&^~EWK*rO$O>AgnXZQVfD7KU!mXJ8GzmCdCS>RC`|Z}^nsp! z13U!>+v3SQ6)vVUNWGEUu=zwFGwJMiuZX=Ma&L_ot+ZZ!7cyfhVT5+lyf}Q<*Jj5m zF9)dCmRn7n#9e}a%@$A_~DOVMFY6!BAQ<j2kS*(f5gE~pnI>EA z*y6I~tP@>{f?4Kd3i#D5q@~ z>%L1UB^BbzxXHmC*#zNJy>h?Op6B{CUPQx;W!gxPQV*@rKU{ajATI96Az)jTXO%D@ zU{!-IWt)!CD`rghkZ;%Kt`3W;htlKcz2^yOpl5cx<{1iirgvPkQel|0J{DH2CujX@ zj@}?30yqlY^lfi&KY?|Y!yzn!hXZL>Lr6Z-dz{|@mukbGUy8p4*BX|;EDfHOEyDkn zyy>XqI=!5oL0k2ReJsADSZk>RI1Or>*Y(>)<>sizNW%B*1J!iz$!Os9bni(Z4^Dt! z?T(sts*HIl12oW}ppBR{%+~_+9;Z=V7ZEZMYDlM!J1k_waQ)%Cf*B6B{m!Q12h&Ay z;N~-JGwv*OU8A1vw@N6ZryZdBR}M6xQEXx&pb&*Z}ZwIt|y=wZ%0rDPV>vCG=<>+S)J=CYNaC6oca8w3?H6z!py{1k=v=~D*J?s_g zGk4f4jT2Zd&|!N72MxabZV-ACIZ?vpA{56WfQX1IBaZlR~S%;bGabU`K{`tryOP5az-_B#jBtpK6A~f=+ zf41cKQ`_FuQdwvlaSkAq_1z?wos%)2k6k3sSDjaw8p#}(LD>iW@?ysX6D{gul*NPt z8E)u9O|Z2!G!mQ^?B(Nj&R%|RW6@ro`;QO*l@kC4P)$p3Afl6&4&_t|Imm;N^`?U} z=EvemuP}!UCNKU_Y%p&}#Vb&vu@$N3mzhU=d7DR}YL=Cj}LpVw2NTFtOc zN>@mmGFKq&W@+w5x;xV0)8~zLODD6@r`zMFL#QV`^ex7k@mpRX1}xuFE%>`}Oui-H zlGUo%zX^w$NLJ6=L*F7XUTc#3OT{Vp+sRfVbyJL&Ynim@(B*2k$Aj%PYq<~lxhEm` zeF83u8mnpj1OnY@eMz_gR^$fn-x6`X@k@^j*JTv+@u_AlV_z*3aeEjg_qQHaQpzUSEpU?} zvPR?oNNthM3D7ld#;h}Aam2i>7k7ZC@wsa9v9oh&66~Qc76PJzWI)lMe{Gr7=6>vK zBip!@^qaf-Rt!8kaXI-|ketR5gD+!LVmgmy$Q|{QYH~&0SSgKat3vI1a>WN(6fM~c z`(wk?VwqcsTF+>a&1soAt9C|VdN*h9>M6_%Ix7Yh``?e$PKt?;ZaujUqFw>UvBv2Q`|!)sy*~cyCXU_hwkSl*aPGr zT6nc`1eNr2g^Yu0a_N!0UQCWL%@pHQsQb{uni2{>b+<)NN-7c=8bpq4qWI;~BRZ6T zEs$M$WDGXhv}b8$2qR@kd$nr#c!*T7a6NhGHQn?mOCDOFLsA|T=$!5eRsKj$*l?|> zyQQmzjXv=?DHUYQbK(JI0jyJ7h5Q?W1g!@;I&0?Jf+$$JvgowMEYH-=?Bt#u=^z#j zdmw2Xl(8dF$H_5+5|cxIAWfm39P&daI{_YTS*RcU4NV|l%#uf~|(B z^d3f5IpKhaXdfk0ZaUxyc6*NU1F^$TJRZ8RJdB67URE^jXM{XX1*}%}PpB#uD@sI< z_O(2n_3^g^Rk5Cod`h_(BcCj!v*zv!m~`WNZ&(RS(YN9p9OE%L&%^uT43YCc{+4z{ z7z5PB`0L5X{>v`=V|Q%il*Ili5CD}&{YGE2Z?4fX5=!ksf)7zAhdap@@h2;m*UYj_on5_`JW zU>mJ6qk1C4!VS>qUoRFPRnwaaT~|V({^a$~(l$5UdS3K!Wcc3rkwXmM5n=-*_S)ol zB-weEL%Q`?v^4+^2xPLGLgGmkw$XTPw%gLpi;#m%VXOHvdQu0Ov}kVzaPzp(D5ugq?u#TVPp_*ENmI3qesQO1_J*BLC?C>IgE7&3K>MS z57d)wRLV8A;a}^BNpQVkC<_e-LE8U05fsIEO@6#wi&m2#FOxdEdWiN6=-qjyT>6(k zjnHTZ+_%gEy(xZ(7aCKOCu=t6J-FfchB6%d3rmM<#N^HI7UHUKWVj48cEkgg;LTo9 z=@1A<{8Wj`!fBgJ-$6$Lt}#>_B!BtkDD+lRW2H&h5UYo($!qQ?4fW0LP}OwbY;p*b z*L+R?H8ic#HQ3P-L16k_de8!)eLX$s)nti?_eSXm8-TWE4PRI|a{(!=zk%+RO*x6OydLRTk2u2e~+7QfBvFuJ#RgrtrCHwL~ zRn>+^e`F`?GS}RPKOGAu>J5+HuN`MpWwGm%7PF^?D|EpvHRE~S;~^Wh6&{F8GXq$M zm`LXFlUeH}*a#X7Lu?Q@rkEpXiIgUI{a*}*FWfof{zG$$#{J(D44?Dd!SER&wr7y` zka%zVW`ax;@v(6MaRYiGXmS2+k(teyHDmg#W{Qh_`%@9*<)r^UKweM!zsEPavDbSE z6yYEm&KP)F-og|(A3M~4AJ_(ph3wwTx5aq)NsA#LE(wUs=2gfWQ|{m?FCWDOLnx+j zun-2B=ww;Eft81?gkeE;EZuB8mbszDm(`Y0!`;E4V#*kg!Xm?m!~(5$hPZ&tP>ao@ z?dYW#lpkFy6`~`yXNj#1xJ4$^Gqe4Iu3^7Hq7-)PB<+YlX3qhQm2fD3TW7^Gd~*d< zk(-03Oeq4CNv+mU&NhdlOf3_wQlwS>y#OsIfB2UOP@zcUhyObQ6sD?@EB;^CNsBAG z?JI{GFM7(K-2rceDkg#T5Y@NwV{bezKrNHGE|+v1W*_d;l>gQ=5Frdc#-t z4Ei;_CD^U-k+1rTnf^__v-P%C&|5kFdPFFqRioOpS|lR9MRSg*tHuoBv6}jma!KCa z1dlP+rTZdGSs!kW>ZOI4OpO@}^I%;W%=OV#!9hI{;ERQF<4B;KobpJ7ee#;UphD`g zftMjWUWOSnU)3_5|Cu57^u+@r?m01YQYF^lB2N}P5q4mrA<9C!wPEoFOACamCc8c5 zcFk^2;#omKHX~l3E7?W;f9~D{POhrV`;UFA5+I-;AfVt9<|PTH(^&`!!2p4vR6=4trS7rni1*Mxs5N2>=apnE~ zp68rPZYP~FI#Ur#LsAPMtXzz8qO2lYj zm+GE>z*29t-ZdCVovrd{hb2gB_|3lQp0s$C1cU-{+mvmbXp#F_txCKLW8I;m)C7Fw zQuDvIn~A)vqQy04%mmb%FrCK2TQK%Q8JXo|><98%PZ$at%XBJJdGt6!c{`;|(qxH|yRn`k2rH~7E7I)c!i9Scc9=a5fspXj z!?E7;k%i{83+<;#sj!R9N-YmVh6g4T1|Hj>KBM^5%V0!ohcu-;cHlE{ zCF6Fu!8Jtr#OT@~{IbA|n&R`Fu*GmOSmz8#gPE|r$9#tN!AWx<$?@O)I8LDA^Zyv? zOzOqwuMJ=29jg8fmwL6){=E+!fc0FW9PYr`oJ!(zF$uY>fKnu!6+_1@I(qqn`9~hV z=maz8cRuM|27;3rqgtrFU`BGiPaE+^q)0!@*T`I-a1?PI&3ja8&9zKi4O%I!up3f9q!h|&R086B_o9svaWqu zGOt7MxJ5_IKTd;&qmWT)3UqngyhBY4;l}b)BA}~XMyw2^V@`*TTjlZV_=1#m;Sg5{ zoNL(L`;T#jg%6+RI2I^Z{9@Q4mbsEowv9SdUg+U-KQ2qNlK2nlVy-|rSgOh0m*&=< z>Jc8DC?|Jcl2-5V0YOWws_!qw=F^Jrz9hS;hK}#895T0LYH7^IAuH<$_8R!RC6k5i zTR#eEC3;ACi5U$-CUx;xF|-Eb7v~gztz8dq(jT}?>?c`r!x&<4L~wA+9jQiD8()DZ z{`u6%6VHf3W&#Ac-Om5uJn<`}kJJlanJm;AYTh_{PN&{Zd14Gph}<*RPgo(h(q4#6 z%<pP?IHh4-Z@^{<6ii!7#5FUp1M2RhG`@^T7DO z{F{&(XB)!qxAiMUO;PHM*P)HsHx?ZWu=7m3NQ*PU~6uOD<8gXrsvJC z&zqhH{(WvIrvH$dxTz%-f0#=ku$)bscO7@4spC2o*LDUc26g_}p}F1{2lpz3A_O8k z*FyPIEW|Yh!t0%4X+KsmIz>6ILlfvcKW?!NI+&id`bZgQ8)kRjuwuwYV}ZP+`cIp} z=+*19?J+4;V569pBVKR`i^Rsc$+d@E5nFc;oI?Sv2UR&UE+I{5`b`>$f@l8Hy zt6GWyNB%IYSRy_XbIOQN!!GuLf@XOn-eyY=z&7P^5wQl6ev45+q!mK~q|e&0fBjtX z)u&6?&?;`F1!jQHR-mVlKQGWUEdRoddpz*w2E!}Yz>n%2$^+A?lUFhWMzP$>$q65e z98Kja()Yi5IMiNF=2T_hllezZ6#t-Qbu#CFr*=E~bL2|p!fA)O)UkDwNM;8OuyoT# z#jbbmXsfKrxiwYiTA4?@68=ER+dEp7xH8}gcp+&r3Welrf-dKGo zq`_V1nTEq8OK`=}0Bt#B+OuJKYxjU33Nmw4clU@OSl;7ZPL5BVL}|WM;kIW_u-*fT zYtH^ex{XucF{mq3$wno_2V;g&uC<;=$?S8u2`06y#GUnq8Lg=)6rrNv{w4Ee4c7~o z9GcK;Y49=^m^%ZXX+DYAA8$)2Cq|BC!e#<@D zqBb6q#FGtfk#&r5H~6!n=`bl`rJBsUUdQHMf_WcF*Nb-9MbUrZUw=O=muSf+6_Ts- zT?n3(=y>NnF)STQt~0xPH<@?cf>z20$i_;RTzPzJn+o>ledLtr) zvP*Z!5k^bG0kBKA?a6XSWy??|WA3<09)6x+0F=}dA+Dp;)z@!PNJU>-4pIh{wBB^v z91c+JT^tXtSovcppIKio^e)mJ^hhg9H=wRv->$)VF>d~qa$aP;9jpx>59#uojr1o* zit%byD|jYtdPzX2l&vPu{R=8TK75+?I#IFKLeqB6s!4}+gAUamMU7I`we;^K>!rOz zWpVr(oV+(-wPb*(U^_ks9Sf%igK+Wfks~Gpvk5C>l^e z?-;gr>O$`Zb z+#!^rnu|C%4kh(k8J(b6WmONJgW)1PINn9z=3(6`Nso*`CZD=1$n0uz<>?9xUU?cz z)1piqg28qD)V7{Q!m9h**GsNH^w8l09Dpf{;MJ$@iickKdU4QP@3kR)GZ^SCvZ^7z zCqP;F)?b7^)#UV0HsmZ61MhSt?59`Qz&%|6oqlu9eJoPOxpMlQ5azNYa2=k03u@^} z3ql}iAqqXRO1^9B^JqQmdFjs77tz&SZ+dwzCaN~Q{KjAy#eFlhY&|$J|!t9&wi34*#I{*TU;kL%LOOygVG+@q z<`vrn&)#xyZbpa)iIm8l>!lolrlrdjP~1YrW?uCI<3^OM7TdFu3c0_xAO8b0?Th1g z#I!GtAFpG4ythhsJLZGVHDP(|ZZ8bN3*^zS@+R+4(usyFnCey3iK)G4qVa<)!XF|U z)xxC5iybkhMLi?pVq&qK}^fFnhFSug+$h4f?TRDIZ zh@o)IV2=5wyOs1pw(H@aHz#DInqvD&gYL=-H)08o3Wt9H!WGsQ4!_Vd0g)|Zzj#x= z>VSH%Y1D)DrS)K8LggAtlRjX&qGumkl~;RahUnSoN4Xp(v{g1a+F2G(yf_*+({+|( zH(udxnwAq(70`0Loh1{}cHrJCFBvmtFr!%leE8?`nxL_@LSncM5+ z(fmL-37CsXlw#}?yv#HzNZt)n_k`Yemw8G!Y=N_Q-)sR9)}pRsAu2m9THY}%uAcp#4|nh;awBpGK!~DvCL$P$usc9HDrA16b_s{$|;1n-WE;)`SAb7 zDg6ALcnU)0;?JJQpThY&{(Vp3=jXiIQwWj1EuBKo`nBh*ebon%JQTa&&ogo;o_vOp zL-KTGYYFXF_&yxI70^AW_*w)}0Tf45m2k zghl9^sP0kSl$M1^f}vp>mXkXlg`$-0V|rQIewcK21b9?s*kd)B{Dd_5$@gTc(Ba=L zp+rqKC{XLDoDDK!sebLxB{zjt;;AMRfJ=a_(GuxP7~Yeg^zMMPGOV35K%E=8XYKuK z8Nu2&p*#KanP61d{ZcQQHPQD!AaEESYgCvy-w*}uUfocfvR60o*ANkmI2BwJbSruF zi1fA7B41TFs<`uhjz?da9PvnUukLaWkHKyx8>Q_C$x^|noT#Z}X7%;r1UE5SxO3Ma z4+E?)%$uG*Gn0yiPyZ~s&S{6B;mS=FH)osx+(Ezc1uEkV5!6Je&yQ4lFW` z>xcb=EG4+Irnt8%E%0TaGa0W%(PhRIlO=K%mZMCvYGLkkCJ5)=*V9`s%>4}vWU?C9 zgN*!-CFPPVq&(WDQ!(tl?OY5?9kd%^T>zU}nyCOOx`49{rPht2wW1TRm_*(At5;fh zE)rI9_g#bP71%)=#?5<@64JC;8g$lTre?eR3}${*o$&gHa2;KKWU#V*#UU*n9a~YM zCxZw`{o%WoF<6>W5`lyY)O7Dg&GWbmuK%uROc2BGME4ZL$*>(vs3gSYqm4xl6}?embKv+@hk7xETt0LNoUUYYv_E?I&2Vp1 zc-1c~#xj)EiT@*efnqh?K|_DQ>0%=I8`bBkFm?|Z7u^?E<12v<{Cz{Tnto(U+4qoHNS#P{#Q) z%g!9-l%Q1YQXFW`+p<%FBy|TL1Bbg}qw*9eLXt!z;VP72X3(FM5In5E)XbS%)1QPl zdA&*|Uzu#cXf_RiEcdFYS1Zrz z#T6IkQG5HQ|1{JtZubVvgyMF4Y=M_;8)}c8d`BL&15Q^N+%(Y4@Q++ORsvo7{*fBd zweL$cqQb-P7^xA}lWQ+bl_G`MqefKA-DetfBC)?fQ7XpU@R3v@D%`YZi3rVxJ7pzp z_&0`m)jAQMy@F0O?!@P|s1vR6mp;Ig6M29$8HEYR9a9dmb0S)^khd^qm`LZ|CMPz!S7Z0^R6JY!Y-njOtzY%;!oemIRvG+tF=g(Pomed zGE=#EKI+0)@7v%PtQHS>cj&xdFCGHn+dOd_V^?e!+=0c-XEeA2m2H<5zv(?Zg~4&A zCYPjMvBcEpC!e6F0#*wDg=eMN(zdFwx6d?&}xChWC zZSVjF613?Fl}yPw{)nbDN5>zrM-J6m{cX+bSGedG(d(xXXINA-P#Uke&2ghD$sC;FV zv&gP3qKEMjVMDsp%daik?&t|75DWL6FNts;ompkZb;p!X!6}3Kc1Q0^PFoBZ>yVsE zb9rq97;*F~AkaD4q>B>blFt39F6&kN^n7k}Rjs3%?JLO*-Q2FbhU#?2o%?G6daq_uReUxYc3@@x%`hFWTalWa9yAk6QyABojC*dWM-YSR59w{WmLaB+xZ zC|BLCFjVv#upq-QaKfHg&Ua6?Lls64KNz6BF~`bU+^sA`?d$PqAm$;Rb)lHFsy#MQ zTBh{ximo51Cd+=GyXTo+BR0{FXzwVxwo5m@lxTBo7n*8+*BF9*OkVRe7l4-c-;IB{0ijr*zmHhSbz478e zQEFoJ^2db$F**bllICf-CtS?cOA61+n>0Bg?UhoExU82iywwS8bi1cd8J?zFE}ryL z7$Upp-esTC=nx(oW+h>_zq_YIl`%f|>;B?(lI240BP0b71IP4^u|&e)fK3^`+3O&@ z;)J!HwWPJ{D=~CJhH8{Tw_A!GYa4p$NrU1f-9UQ}^Exsb1ECQD%~y;aH%P<-g7dbg zgl6~3+@JwXlK;tdPCZc&LW(h>ufXlLU*}XH{@_fnGj*lY%BF-$It8L!yP}jVu(`psoY5cQ+xYaR`3r7=}7|yRr$e?Xjbm+ zsAw4$S(&jhJ*&M2g(`Uz3QGXG!X3vV@tPEc8YKDw!B@M!t9^^r8;#7SQKdTbrc9v3 zQVBexUNrs9k4L4bnjCup7my!&zG@xVUP=8|h3qQ)0x#ugsx72n#j&c{<9C(vDoru$ zro9!RfmiX~-vns_vRyu&3jC&fpA$o9D9UJh{@|#mC%^urCmNCJgTFJhrOm1ig~Ydv0L&ExnLmIBYICx`B~hB7wRS4|GxJx*3warv2pVqY`Dp_(PVRv~!&02~fKB@q8 zwm$FKv_x5j6wZ00W=}m}DqS+?uRFWajQ7v7xMTmd*$1jk;4XW)|5hquwXpX9$5Jos zy%ExYSqUO!M+Ma8W>{d?w;T+~8m00gP-~b}A;be_*G|{la*_@6cd5ZTLsal`MHL~9 z7HTu*TR!k07U!n(k=tfE|7=Cxbbd9l{)4t`GanHAnd_<1STh=5%^S?9JtMnfCVzQ* zMi)`hDt`W7Ou0>-NeJ*K&v22wl-s4FGgIC+Jt(v`VnoklWWF^L1MPftlB$i=7qFimT}_M}W2D z>5`ozWleXwX!u+rSSnRq)l8#n#C6{MPD4EibJPc1I6v%oHt z;IabMS8Z8g2KQWQ%gccoOjwZ?kwuT(il8TDpia6;2-kGj^KYhT4GUh^4%V98Hj zkI*Ow(lwHe%o>ra2Es|}TIuVyN)b*v34mJe*z#%{%jfsxvIz5zlDNlP_iI!`f=gOC zqo_B^G*kP|(Fi9MC7{^w+U|1GpAU^hLl5_9(_seOul%uC6IyM$zaN3wbU$uP5MjxY=3c zZcEdIFZb}oYLC1*6oFiv_17FCsB6pEiPr_~AskCA6RQ_~JK$AO)xs@@3-uWoGs(f8 z4tT%lwp_Sn{uzB-iZuc6I16m=m|{w!B9X1*bG5Fp;B{&X6Fv`9=9W}V#?U>ZoQ!D= z`S32!Ec7+f=gMU0~Mk4!fUCq3=*f!z@B4kZr9xN-; zr?@Pv#h^yh^}_3?n3SW{>D%4KRwJ{DD5E0)*P2b6Hsc@^@8*51?L&x00noQK`|i#z z7k6kLQ+;Xzd5@k7`3FsqQ~`AHW~6vs&yZUVOuQaV*8BP%mbmIdMCwsSq10kwNe zJ{Z4{+D<1p@x62Ew3=E=x^cNfX0#65J0H`s>(y0Qy@ z280(}x+yndhphOjWnp>^mP=b?DP`x+q|z8)QYjJCnQavLbQ5ecUV) z$tz6)YOkSR!iI1Xk)}*xgCbz~88||ni}x|q4M(F$iV%!QHOj5Zh|x8x2abvOmwFA0 z$Ntq7tM9(aJsD_KWETh5CubC!{z06_{-r^ydSGGb@b~Q9nW4bMW-5eTLvlf0YTpYN zRA^d;cL__OSC;4~+YFv+-{w|2bEM*M)U6gK&L6SWvAe!mTdfy%dJmdKVJAWc(jm{u z>5%b6XmMDWc$k{0>7C3ZRoR1%z0B7TM@nSY7m@VbUk?V3#9RHO|2KX2FkGQc-<|K~ z%;opz0oe2+=8sw=>N_J6jV@lOFS^LHPeU%bsy1N9Tinvc=fWx6-m$AsSdJWUf;LN0 zS0k%YFz=yz4E*0I0n2~(*8Lh;UT{^TCFz`&%W0=Qk8CNu^+QPh^z9LcP`qJ<=sMW$82Jt;SL^Q!vqg%U0Qn~6$sDz&dwXCFzNSV|%Z$3SX)W{qRH z46A)ggY4<*Mw8}DadeGD`dPtEO?t@&E)!_&BTVFMB-o8?o!IhLcZ*FW}ELrwT%Fg(_p1l3-k&~K;$2qe< zB3F#jmd-yXQNJ@#qQe%=iuE`EOo6^C|9q^ybC6p-C63Yb3jciHBnc)Qh<0^6S@<+3 zfb05o9a!^zcWOBEc$ukiJws<5JhOQN?aq?fMtw#`U>x}GaV(A`o&TYT(=~!PV8DN7PKx zBSiT%yTn2tu|`8Q{A}wH&&OQY-)$ZV4lhj2{iqERYj9#Ux#q)J6jwG(Il1QIk-j(5 z_rs^7xZa{{DaiqsI^N33wf~$s-oTkJG~i6|4Kw9(a?3XKVq|Y2gJf$m6w=<|k1u3M z6Ww8ND9rjnm zo~Q*YRkT_-YD)e&@zH^L;i$I{f&;SmztNJ8xavVieNTAtPIbYRV}WHDr|gZe1nk*E zng=C3`YHYGwU~5j2C#7Tw1P?9)VWL!{#{>l>&&5+U#@M( z>hBtMsa*unhK;=L#d2_5RL7nAkEz#UyQ65=rf{(1zx>7Jai?AzE3Iu`4rr}62jD^6 zXYK0Hj)cU2o+}X=vAn^#n>N4h(vN(sJoS&C(k{6$;G3UIJCbd>@pYG8YB|Vu9PrQl zm?L(@V1z95Bh5eVIQ>MM>%k*PkR_yDZK~hMx!0TOH{jo_m;=>(V2>FNM5;QkHYTAk zMh~c04m~50IQ886IJ)>*ECb9`(M&*MGhEf%ft4CxD(<}0 z_!4!B#hsU^7ObmHk_~t4Sw9FJc2L65?yTiDgIZtE>>l(SMptyqV#cNQ^8V3sJ>L9| zo(&Mln^yTm;#)=eDmZV?*2?R)4{mW6XBWuA{4jSo$_9yMO9Z2i(72Co z-eohPFkkl{_@WSKwkSk)s0_v|xp6p84WWf|C?zLldlYkI>wSTWS055MX|*`_XyWh1 zxktqys-k?U4vFt{`%k_XCgDx4P-(@|j0b6EN+j%ud^|qv+l4SZ<~RSb$it>qC|gZ# zx=lmG*$B?dwzI)P%F%EBwj-0yy!Vn{k=U%7>FIOXKxU(qt9n>X( zX9L7FZYS5br*}l9ReLxoiPnNgYpH`2QCMOwlLzHgeM#7p_0|S?a(yrloN9VD&p%dv z&36Aqeclxx7*psuVN-eR`}Y@Eg-VMrs}9CRZQ3-VL#z-yrisY#3zxJ=!=tNRg)XW% zXytQ%z(p?0-G?m?rywmNB%Vf4=HSsDHKWJUuh(j0h!ST;SgS`oQGOEntejENhRS zGJ@UN#u)VW>+Z=60G?En|9TXBOg(Gj8ig^m+(SU;&cfqC*)8Y#46Ux5{FnT(7LAG) zUeqL%6!?{6vHig=n?YS_fo~XpM9a6rpHDS4p`JYS1;*s8q?%Ndhi(zk=?u_i^yg6X zveemQDvxym1poCVs1z8XF1UE|{cv!ndylf=>dab>iiM>yyTI<7C6k4}LE$9kWIWo^ zY=KFzGjgDbrs&bzW{SRaN8S`YV%ux8XHOqBUJH577I~r{Ocir4L!U=(Y*p?12(m0J zza~$X^}_ONIT^te)t?&zYU$nFCKf9T%LQ%@5WAsah+aE_+>n07_m{SHbr3$RE$EQ= zP4Cp{%y8?7p0)k!K=GAbxNfiSq!Ed-gi0WT_v53*|taT zn)^bFWy-KMtXj`INuOvH{Hj%i3G|NRBZi%(U-0LbP(9=H)-rRu7yjSFkJ`FVn;hfOf=Ln@iR0;7spAR%P+#Vj`NuEN&tVumZ|->0p@+RT;0)fBQLg1Mm;iT{ zdgB{AI}P^@@(YeUYT*e-R_32jVV=tIi%vRWS!MB}g(oZv^BIA(^ryt3Et*iY5!s?p z+Ai9R)YJlxJ!|Xl>kaAM=_e)H=tuG!bp~E&_+VXE=@q`v8x5b37@(laR;TfI8b0gm z>|4LGr>C!FDmzWTmH;*g^#1Xf_(p)(sOwMPaqr?W+r-k7amN}<-*ipW2WHN+vX_P1 z_Tf%%-hwQcjd}6NBTM?bt#u^iqT4J>3`_)#TJ~nZALpY91b>hUNFuL0Ddd-nOY`y3*4U+lN}7a&qde zL5oFFckPKvZtt5oS`Y3)#maE7!J0F{ver|PsibLXj-}oi@m*0@ z#unLS{OeuhbkRHHo1Z(q(%e~bf;Jj1krU9;*0;9VaOhx3Mq|@QzO-NqZ)p@;;K8`s z+E({e$kd-$;q!@;D~D7p9}uQl>Ph)aXP3~HMoWXsq_{mf)~>P&_qCE{^Zb9&S=CoS zgTmy=aR_LWz$i90(G;Z)uAf30H`T48^cL#DYTQ{+b zHlaV$JLGu%*VoNgJNlRZ76eT6z^1-eZqj*KMuJ<^79h4H2UN25&|FIDoi%Spw|hgo z>7Q#4HDRyAo*hbjjucds3FBNzKR3ML(M_+}j> z+dvKhCGLOe<8JiVlP_Jy&15pWV?Sg-r?iL^RUbS^vAr~)CQTXS`|{6%+gV-i%8X)= zjzFc;@?5;wcruW=1D+#NES{Cz&BuR?O$eG=ZD|rht^L#{&DIW%v+h1rC{S$Q^i2IGBLDiMv2s1}$VWz}jWr zwGmh+Kc9{_@M-NYL;~u`$$#Kqu0ygeRi>jOCnrCj+nOQ)70N44e%>-`F{1;Jg-v3Ywg;z7&l0-(s$U=ON3OyTxGt$vx?WUl$Gm!`Us}#8 zQ>gE6B)<7>ryEhXTH6H@d*I`qyA{yLEPfTJ?ug$g@?a>JQ>i8&zk?Qa(1y}Sh{b;V zPGwy2uW-AlUSJ18+enQv>n=Y=r2@+ON-Oo`!rPJfQ5OOC%zCUS)A-|G^S0&Wx;daY zBFQVOY8QhLfFjeylkA*KB_Wz+ZcsDg3(_aF9#P^CGfJH4E)ruLTc*Xq!z~a}P2T;R z6dB%kr4pX&$-AF(;;SZ8c9lNOpzviqPZq?-dKMdsrBj^<9Uh*~o1yI~Y4>bK6$sAaTDoqCTR>S1Mc`L`iT@(&$2Ep_9skaWp!b zd&5JHQQ78SxN3VeBtX{~(M<3c>GOm zqbH@SVlkHX9b9X1IP4kS2{RW}A3WfJn%Lc;_}694F@uj@f^QE4d>hU;V7}&3dx> zKkfKKB&^R7D8n%;a#{Uwmee_j*4sZv)g)lK=avUZYb=4;s>%f2T7a%QHhI*MnFU7R zI>+RKV_GZSkQl9eDPd% z<4dUs1;LM!MNToD#s*9KaqEKShKDIF2^2he?RoUsp1^v*q%5>@@u{nSJGgvrL>LPaRP!kX^v z-k5e4E%y9q5Q~1TuIA=~7Qn}lla&ryIR0gMxV^n}NdIEI{ZsmpiXzxLTNe#ILCp{M zbR8$IrW}0E_>o8Eho}(wOtJrM)?i*TC|=g(Y5yoGJI|#%Ke+8DOoh>2&kUwlYgCiB z{n|np;+N!ks{c^vqYEy-qbm(1=*4(tO7ga+OPnAf4_XqirBIbLMRJ|%*s<<~W?Sa5 z%B=d_LE@Lm_;Z7!jxk7Y^He}~!ALzTRq|U-#=~&=UG4N)qbFx@wXooSL?{V(Rk8rH#B*>}9c`-*=ktVyFFv`z|`?U-qd-!Hcmc zeEXT$$U}jd+)D9l?DC}$!8#eWubND}LjjnH-)!w&)gK((N)(>IyQA3Z>joXzz_-G6 z@g1FZh{TLcrNDUcY$%ZuYgzho=rkcF<)YK

    gda9mfWDp)>DkI;&9fXrZ;3RT@RGYc$#6TaZmgi(wXA%Fj8>3POZ9 zNIH%t$OjQ%vv5nlt3kT*$I5RS|I=T;Zc};UH$Okf%OcM_+s&q)vT5_q2i`gA2dU*# z=|ku`mPnr)ZSV+Sv$jpeQ4VN+SyPBL9Qbdeew^cDQ`8V8C@RCD1Z&=P-Y?9!3o%;R z$-(STErb^N<$G~LmUlViZxi&#gffoD(wc#}lL#lwo;5j$D;%n1)u?9#K>}tRGe#LLK68kj&WvS(?(t16ig_fcvZFDVIH`iWk zvA-4GXleDob3f~|#&OoKK5I=`{%RknuVKoNvE6!AMWV=t0h^%EQi5<#^~Dsy?g%Fm=v#nl?Ut`auU)0r9NqGb%G?lqa13muWS+@ABlJX)V(Z zYMFk34u1NKxie?Xoi*#~F;D;R502UHgYyjzxwB4B%s!n~)$nxF3W z=YKQ9fU^#qJ8MoOU{f5neNOm~VEMCjq=gv-R>%{e?h%KdjRGsXde^y&eBpjzye;X;aw=Z++MMc!47byT70>uaT$qHk zU{*Zicv}_f=$i7_v3HJG7RP}ht3%yk%us$=DuX+>gOqe2Bx>O((=!x1&5qHdFUM}1 zO|#d%d7CD9kcA-I5JZ_ZEQn$_?}VMAPT|DX91QA(6ITcfg%f8zA?^d?D}3v*5kSZ= zd+aZMkOKnA(RkKg0kh%i%|tn1c%=J8*@;NYys5(Uv%l?_9vM)1{Et2p30h8fSF!K} zh*efJT1Mi^tS(U@h0@upf;h$UWq<5>$Q6i52>h82X;q#wo!6dLH*<-QDo9){*hEMr zYE8?K^-Xs^Iz&h%79P3lGb%gfk3&`PX0!{R8I47Au(6S-fF-D zw^8+#fi5;5*tT$prQ-8!daiJcZlD(%s5d=VWC&@pGPqI`ZRcA&2^IH|!xYJ(QUYoX zd-zM$B`#G4=v?6LVU25{4j#lv2J+*YZ?M%cIWtuY(=TGZz*l{%rhia=nyh;P8bvqN zJ(QX$krjW#2j#M`y=$W-yJZPtHMbN?)@2uRKj^cp+kkSN!;DKkIZ6mlGYwLn=jS}Z z6$MFLhe<;v2dH3q&qFTHAFSs!Hy-Tj#)Az~_;CD6SAHef8(ekqWi2mexmJ`&DW|dQ zFd*~LOAE;{?5-TMxcQ`0xGLkHF$xs6u-p;zGO1GqHQQ|0+YISLKPle9;h0)>Oj9jv z@14WZcsU=>yr~zq-w;OCiQ(dmCtQ5{Tm6KcxZ>2-9Omh3R5Sza%L&NwghScdT7+6zjKDczM`J ziu6MB#!1$WI*IMM!$Ny|r679ix8$c{{RI5p`1snMGJT_0k=C1U8(gM~Ec!PN+FQD|p?2e1evfXb8*dLVU3KhInfdo*L*o2v=_G zmO%%`d)FMMVzqW3RXa_+h&e&_m9u(QN;4TofnJZ?c#xrCKxD0f0+)#rj(>cpd0mQ) zZUw?|22z6^UkOF8z`!lBV4q{LyD0+@Q=3ZXv*E4~p@r(80a!@vNuu`^g;IWG5IB@d zn%c}tRONvmfW$+$_XQ|oM5KBWEU_HpbP03uqMUv2s8*Ne5CK5b>Fcrvmz=-F*V$}N z0B*?^O!xQ-cB3|@UFy<3^G7JvGnIt83Ym?epQht&X~LA587oxAjf~AD7mT_O=?l>t zspH64;fUd5pavt;Zb%NLkE-&Qlxu_L2ws9#yOwt`N7Yu$(qM@m`i>K*5F?-^TlBzb zGbYOliPq|L898Zbfy}J_^_j6s-DFpf8>2E|%!VtIOXudNKAnzCK$?n)hL7EP316N= zLO(W3i~dV8(l&qR=C2G$|LdJ!`^Q)QwsqY=ut51s#uwHnf4Sw!9~G?C$}Fu~|M0E) zYD;9Tg-`WoRd#o4i~jVF^_RXjgG&S04>m$&(qdJqmaJJTRU};`5;t03K1IjIFhR%0 zszBM=(y`G8@7UNdH2-AacFbuIO1d82$U#Nas!7Z9P+dJ~`9q4axNjpxl}yJr29{#4 zMp9OU=uU(r=Mk)dQ38A5>a#zj+NH!$V9-KuKJd$fa>S|uac|+WH}a9%Vtqs9eAM81 z4_Am#9Jg)S{C=OxYxA@J=a;+Y)LE~+Z{)e*j+MxBGj(=})u~pK1MU!*a?v@3ln?j} z){uTzD@V~Z;erG1RCr4oWo&8{1(_PdedW(58ef z>myT!H~tY066WZWSA?DokVJpdHfd5)dnBGou!C&5M2ZX=HE>BMooU&`25t zobpC?&;*wfRFjTbZ94bC(6-35gL2ck52SZAIuTQ#4HXz3Df%8v(4Kyp|DF4Qry4;I zooK02?apmd@?EejD;7_gneijF(GxhD`$I4wnwGP5_03*yy(drT)4d5o<90&-gUDoa zifuCfABUPtqbjx`-Cs(RLMd$)06U6|2J~-Qv;@-YQ(BXyx|Afqyu?JFe0wXEfRW6k zp;^R`&)o-^1~>?Rd4FhQcoADu7xC4GAUfOV#gyZl)vfKQqM%5$y0T3gM7RAb-~v?R z4VZbIRui%?AmBA}-wXcao1mijU*U`C(`FqYJ!`sr(Fe?#EqCvXgQitxPn$lQEVIW? zGnvN4;S0jhWlkrqimS=NL40eiw0uhrn`l*f_2jVqM4QpXl9ArE4p1n=7R48yCKVzS zOqxtrnLk!2h5lx9eeK?15RuBNX{09$J5-5dVkfN@3QFz-d?&J!tLvKB)sp#&y_rn|Bl6 zzzwxx=y;)kK+&^?%)fCzDQm%!WnN;FkAA|xqc~8+J81VCkR!0`eyhpGf{m;?3~g{R zi~%G!?xgA&R+&zsnb~&bmFIC}%SJ!R@wH)mXtZJQ!ldi7!A&Yk2pPONE6Gikz*}uWWZT$c$s`dcYcr>w3KNDFQ>rc zZIo4N<{4^QGlm5syOLNtsz zcuyow>l0<^qifcIr=?#-sjXh97WI-C)IBot@_J4R^k|^;^Pl3SGhAb#Mq#yB#&-O+ z>FG1h%IoQ`&g;H~OGZuZjOKDasqrwfvQ9gU^}ifyKB=Cp|HUw`GY}56&3UYTwDCM5 z)t3vOxFmNX)-i28_dRk+S~wB+*ym29InW+74=1M`q?L>Q{g317J;#h`kgTIQZTlNR z150LER$9<>@4JVZ`|C~jE*}XOquXYDK5M(IE0!+AMkfuW(=-`=chFf)T&8AYE&zc_ zM6clGMq>Em*Ncz|1B$UT(>uAiI%HHV4&I>`GOd(%16aS!_>V6Zz5a!v42 znpgcVrpr3j6jvVMWRpvP^f|@Bjr(LwF0W8Ut=g3uZAFZjuA+R0phrBaL%-dejfX3i zJfap#J#6mpue9{Fw6#xbuk5#9rQyn7u=!`#ANhlR_&T_}$| zuxq}WC7Kdg<(;Smn)8Z&*Q-_=tTUA`mj$m3Eq7R2nzK0!hMLa~5DYkDxQ%Y8E#=ii zg&m~Wo;_S6JP?UE9B)T+jGxnpx0%^(BrV_jIVpe5dpkL^te;wD1#$7j&h!UG5{3LF zZ#*f*Jz59u`cD3Iez zeIJ^K-)^8>a_@VEd)RZ;9wRPJRe8JG0hbv>d2S?v=}*L0)>UxR)h6hL3~@9U^oYb& z-irquGc%qv!jk!O{LpI@Ug)pryM@4l^&V6&At$3m02v5br#E964jl7WF9Q7DvLP=m zLoBegDdNsD(*>)^b>EL#x~Wj;@ljXL()~=ieB^T+JL1Zlx_W~cEBtbIX}ZF1Z%{;{ z6@7_%$;?3rJ$@cmVB zyy9~^6H;#L@LO|Se`Kwd!JS&^8Ccw7KjILO1qy&VLUDO&uNvso3*YbT8E-3HG1S?L zs;fe{UhZQs4#7Y8oN1l89M0iXlRxi@oq*O+PyYORk3t43A9eWWj{&2BSVuriS;-c3 zkZVAj;@;n&9LD@j9d;2TS1WS7%uDjE@UP4qHh+3shzAcO8GwvGf;^xceiF%s?bvEr zT1(IPsGOXzZOX|ZuQ%l+SCF}A+de$1;U2P})krU%V+EN-M^$Liff3*iRHgFDePdm}FcVjG zST?VPk15e&At2D3e){Ra!_JuF#hlNa>9d!|UcAFIXY^e0(eJ6yNdvQ<*rem}@J`{8 zhX>_(n)2(s4(}eMSk&JqF4MCXfqHh=Lb(#DqNt&JTZZwf&u}!pO*^@4l$Y8K~HgRh^eiq^NZ^twU9QAPtDYL@FWY(_^m$%rDVe;><6$ zceG(m!adZoe=Ux`e#%zZ+}#xZNgF%!i}6Ro7W8?MFrpKQyXw_`M@SqB-J)CA)&=;h zO;`OxdbIVXtM-*fToSS=N>W?D8ZB?2q(l-dTGDa}k4oNNbT&AqPCZ?1`Y2r?{%EU% zlZGH?i1=e#9h=TmO&;7k<&l!=B+~8E4s&2u3o(|HN57-bO*OS+llp)_eDph#WC0^k zlq}=NKDXb!*_#1Cv8r^llFQKd&_NN{#bg8Wr?nl{u;e0CSXDr!k=lA;$pbG zF8gtJq>RE5DdEQuA{G*({JiA@$gW(r_;Ii%2}wAk_M6g!9Rcatc8v>9ERHe7`Mi-) zBORdO3`;{lK|~uyP7~o2!6aowcfEvQNjl-k0ghT~y2?f)Hnj5`Ie1E1sI3SjH(~&Z z9CjAVJU~V~+Sv|MW+0_-*YW?JiK*9|V%Zh!Q27=4dCP^@oH{JmOhGP%zx2or3XsRN zR=J|ms&_rsUeVj$XKAGLte`PrOpgPBwGn{JS z(XQwlvElR;H{`FFL8S*8WnQCZogZGvE5#x*B4pf8eaPPy>Y-$o`~yyWr0s9CVh{`aFDOHyVkBC(FNbE!gDi2F6w{7^s|0iLhFu)svsU-T_IhroTJ>>>xu$e9tdT!ceZZu4^M!QkqN@NUqG-^8H3m zO#5?6$5*O0SR6UlIvm}Yy(`3g1!;_yS_^d#UcB@1Ik2nO%WOpqYQs>wd*$(pJs`;o$1X)%qN9g=Z#nc#nzdegkThe zNPA<3o-$yofQJqaa<*b3UA^~hOEY`YdKxs^lM4FN9wMjLL~1CUdbcj2sU|o42lw3F z@FO?qEz=ha$1O*JXDxirhM$M4~Jdi#nESRzhbGMKJIN*$mdQ zGwd^@b;uT|7xp~7ui|B5kn^70_+@4oZr%fKQ=^Dgs|AYzB17N|Cn$Fet!a1iw3r^< zb2PJOX@@LjR9M!aD=mSa_-2{$^p)V65|+sk&?Ib#&PA=OFqp-11IEcSBb)Q)-J>wC zCqI2V;5IiHD(B;$dR*LVQu#G^zc93MMs;%E?cs=mn{2Dx09=51x1y zqL&9JqOuiBQ$STE`1qKW$5D|Q#!J`haZ65T-$$$j1O6guZbNYzUp#FgK67Jo?KB)v z40hj#&+aF+NhOc-{`h!@WeS%IZ~Dd11mX4s^=X**5-xSvitn4X%bM-$Swnf26v{AY zx`t}u!gI0C$a|zWwOv_S>EP~_YT>IF#PN&gzGvtiPiO+M!J$KdNSs0_q7lFjh&l4( zdf~zWo0oi=-o2KFXW|`}_vDDsurrh6{$*x1&AegmHg7^RsM7q2&M zx<(XaZK(*7$7DG2DmaUFZSj5e69ptv*nQ?QpQwiru(15tFfXG}wR@_yN2n*`PlInr z-#LOh-5F;LoiR9pj_qx&W|zTJNK=Ouc=r*V5`>@?f{QqzE<4#m>a1~1NtgFFQ|XTL zxT6^f$Z5$k4U@)!s)frx+C}i-@{g1dD0UNr+iR*jE&)sE(k)seGAwD`&I>$mI3W~s zD}w=Jd3L8?=^aQj;v?Zh`A7SkiyRsf=A z6gJ6*3t)+=fZ?kVu9*H0-566t-as~%VHTMv-HYuB|EcifY$BUU0QQ*tjsYV zjxIzhnRCVz7$u^(7f_iZa}`W_%GgQxb-9Y}o|;@4I(XC7v6G;`Z%_38T%YE=G!>z* z!pjX3z*-PAN&qdbjES2Gy__%@oL_EQf0JIRHm(124u;0p z82o7DSLpLYaUFEaHgPD};^t-q>W3 z;W%7Z%L=m1EH`Z@6y$iLZIiH=@2R6L6`NAFvKDa0=FPc@GsVF%Ul!=CC$cC-H}GfZ zuN+3m_gwNCN1ovKQR9Vja_i#YNUTWnx%I@L1wJtnSES$l?bC|31XzR*0a!I@qgN-B z0+;pQ4#}4y*tm~QIcs2NPsqfOc%n~oC;6u=plyY|Y%%>zd^#>Nm{bBKIHk;<+UhWI z))tQXD*V2{{K}GDz)j{o@pz5{iKOIJ(?7XW&F;+BDOm-I@84`EDJJH=G>05pu`|i@ zxs*H0pOs^|%XIpeO*BB&lgsvluA=J;wI{i8Fz$Uv`H_PQJfl30hrYn!KpbH+0!l|> zajuF+mY7mFD{0_1v()fpbZ(RK0-}s*6hkhxdg0toBgX=)7bg_z#4R0$TBBt3>IGDa ztc`U;9SeDo{-q8VOc{6T!wbnYp#D~8ip0AG6~I+Qy=t*dyKXSjRpeL3@G}oeY&f0r zZLQZ>g=+BaQipdurQclV(P*XTFF#K#dcu1qR02D(j|7I27|4Y4CsaoH=-`lSf8w?o zbj!x(4Z5v`yXNGZPv1;pO3DXKoRpLcY1}YfW@W-WEzuRDp+kc8rH!dT9WPOrxq_iqPOuEx&b%55jax(@n9~}c;IGJGu#h*eP^m=B7WB4 zY{gDO0U4mHvDm*nIc_;MTIj~+bxu*2fjiYCt-$5iJ@8L9!;zu;c6#B4cBOT<58y7C z+TPPPwX1DvYunWRHR5|n^7z7g0+i@C+Cv^3ot`VJ*Y|JK&iF~Yjz5yhtY7)|d>a`P z2m7sI=o^Rc*!`zss&KIe^kn03Q<$q3lF41yJD~3x4PT7D-Ke>GkHeo2R$|8-UD942 z*FMQkRM`@XOjU(UbCtn3^_wnOXhwRe-gLn`;a)-DD>Q)MHh&>c7K(QVf1&I!ySRf4 zp9|g@?)Z#C97g`0$Pi>%|@A3eUG8#b_S5!3QN#<)r+$~fle zgq_#vY7uV7nXpR~>*|GQJX;WVRUfx}>T}9GpzvY7!lK|RS^koTmmoZvr@JooTlO+$ z?Ba(3ico_9KxXbs6Ne3jb7sS(R=k3Y3i5UkY9#_U#Y%z%467|;9?W*qbtPSFJ|$F} zYEkJ}TQV20@c=(}GL&5zvVZ0Yzmnr&_RtwdWMWWeR8MnHT|Lcy7{*M{QyuxUH&O;P zp{rX*Gof-`Wde_Nc=q?|4gT}NLDv|}$P`L}a-~t*c$&PcV_GFgjXtL4m?v_ZKI5RN zGpA3TGkxmJ*?~C2R8F7MHg@X&I-E!$U7tMte!{dlbEi$4J7e11Y18Mn9yqskmN6<( zbEd7QYw2iXEft>Zarg^)va?i4qmiwUUGkQ(PWR@O1p!DGQJ7NpZj|n5Hi6X4k5EqD zQgqaz0W-dU*rYI6akN2EbaXvvJ86i9;Gtor?!|Vrn=fp0hflDJqdt_ToP%0vSi_V& zFmS-E>Zl5a)1g(?L~b3(2`FT*((2;TeuOHWCkC>VmF zk%Eo4sR|e5AbK5(KF^Pv86%c@66_}weYBcAF8X2~6D>(HXjfYSX55Zu%Git+$KYwO zCX8ciiHcNIG%#UD2d{Jfq42FU+zIT4`T0N;>!I~Oz)u(a^XQfgh zY!|?u#^pq$mI{DYaMc}@q?t#VYc&b?WKo4YK`TT;SeD z2GwNsy{N&Y4SZXlXCv37$+&RvUWu`1KfVbj;h~ga;MD&nAj-GBcrR1Nres9C)tu{n zOBbSW2Gc6cOwYgKv|npJ&voHn&q&qA*;lzVTLNkroB}(n&fC!-%PD?({Uey#q%hzD zNxvf&7y8KQxy;;3UzpgLGM;EoO?n>5lchFlcq*zKYAiUEV@c?%!EwdQ(TpOO%M`0Q zt=0w=KG6NSG7Q8xCBanHiu+)v>LQ-fGj{?qWt6**WASEQKg1bkQ|`jp_&-4l%}w@_7hW)F#qDZ*}l z(>f!*g>`2lMKpN~(P41oqj%usk2|g=A9@$&S3UXA$=T62T-heyN^Me(<@peHxk5W` zml>sLgQ~*#(bQ!r?u3&S`c#wepQQ1>zbvY$89wj(Luw}`O z8a^W+UU54r%w^6f;YZs3(@+HBl6}*St3iY2lV=C9T9kTmnuIY&EEn5R{vkL(#?@`DLbZcAC+d0(M$SN-zj?#tY9nIykqb>%n^c zZ2GF}R!g@{w_5#dUbot+!(ry8O`gB|v1|UCIvhq_pkE?6Y>lfs%>v|CVXv>dcf*wK z9z}jyr>yD?_dD@|V|CEn&9cx~ptb)rJ^p0mqu*Lg9ghIWQKdZuv0H?e)3*S<(N-36 zuH%yPD@v!|>Wb(bX-D;mF_-?~9oC9Nda@4h6Ju`s?MFS+&7n7e2p`S@e5J4`!v;D= ztmI#c%XPJOi*W5DnstbNG*AmoFIrZw$Lqk&R5(cN6=phLXaKbAzlIKuZNtt93LO=Z z{%?RHfHH$d!`?&V$>l^@xSAb@hw8++{HiBxn?2>Xt*#?22BVhtH8Zwtvorsn*zC-0 z+w83W&SsruEZa7g(R)muWz6|Iv@8c-hlWvD#zMA2_W$=V%kDpGAfv1I{P$-wwL9E> z2@l2qM2qQqGr@-~dfJjR)@3anNX9$^g%uYU(qMp275aBRex_u86y7>Nr_m-ULCPZv z#++q9wWmP|jg}LQ_zi_Cm{MKR*ne~hVzQcicx~!^swW>_V@4A?qN`e-xMEU@W_z+6 zRs1w$47L`Uj^#BsTe@N$=b>}EwwgBS3v;9JN%@otcTWA~_64nLxui}m%^}(t;`1L; z)1N`Cks(Ph#ep7qgoToorZ<(hrA!!NYTUFH99~w()7D4&EK1ysyA^fixx=4zirgqiMk^K3Z+bG~Sc^ zmlvcFZJMN2Vs82`FJLwHekBISP_1>4+MAbj$O$hW6-R8>mV-`d##Zp>r4FN@?~G7b zHV-2ybDv2$*cvI34y$`>q!;2#AyRM7?chUqOmuB4ZA;u!c}#d*>l>UjXR@qaon$-* z(y%x78Wnk=1+=if41GLp_556(Drlrf+=92i6iif_(G zP10V>4ICN*$Zg+zIZ}tVviW4?slNGoveKHO2h+bdu%+50j;39f3RqZq6$y^*uv1vu(IomW}L!-yf=+m(4a zQZ%S0yS!+8OxY~P$;!ztFNxs>IjIb>md|qF!UB#&h+Bpb zjC1d-6e_yW!8}n;1IKBI+Oc+ED{*8ANm2uyAaAf*|zV z5Hdb#+tjgh-ji3ywrau6%2{yNeDC}20ujXe)C!e>cl%L%`eLawiGj3oZ0g_;c6`oR9_0Iuxwz>7_A4sV{v6pzM6~E$(|y z#oX09A5B1;wYl1)#bgR9a}#xnYqN#Ar59|!&b6ejDc?9)eiO7>z6gsmlaIe!(9L=& z9Oa=IcfeV0oP|^i-*^aAQ%-K2=Qn)7H}J^e>$8UXQ2vd-=Xs{X=}mW#R)}{vzco6# zabDCqT`7#tJvtQW8!-=3U!3V`9a1xmX;5de&+*Jr33!io2Vq&1i;+}Kw$E{ToKYJb z&}j|0kiaQN2|wwb%yTLBr6|3a*PPpi99)!*`OHHRZq?$P14LT&;+&a70fy+5+gFZS z#&9WPayQmWfaBRa+~CKD4Xetl!loXnB8j2_pU~S2hIE8-@=xDakmsfohtxYTal#inz7N+hOe+?~6!-dOXuY9M){$4Ihi$xC zoG|Xmn7af`0~AOLI`LVdrQ;+0)n8+vO&_Bt#PHe5@~cf1m#<(BGuGQwMntU|RK8qNR@ zHJqXG$!_Q6bvbL95xnACQRR}`PgR2!7-$ztKs~wrv@C99(=A-*;m9uR%OjM|vZ@2q z4mhIIlzE+{sLL87=!z26c&@c!1aGz}E6OfUY>U?zk&x-^C8TbbAuds*G!KKHTN&0a z6;J-?YhP*@D#Z_?>H7dURWI~i$m=0`W7#btr7SL%i34con3=(hjBWR57iVilHMYiZ znQ|6Zo0Y$a8>EO5ENjsVD6sdNzZ&*HkZtzJghEeHER(=&jESq&8ZrvW#}!YgC$nxh zhj}vV8|zx3Pu1b!a!^@_Dl=w%V_4(4EbmbdHT3Y@Vd#2sT40-s$>WX`F>0!?$#t!= zGpmJ@|IN5A9bpP5-=zo$kt6bikXvhPE|@P&)~z+YBFBU7kux(a)iiO1% zy8*Y`J0MK?Xgu&}l7vWXj&YDAZ4M0~L~0DE5V3gb3k$n5OD0AitI2a;hWi+Ums~JE zN;!G%E5?!Am|KVCSE{K+ zjPO}P=LGk+H2x-cM*M}+f}Q{6XRbgl(`kR>^BD<84;nR)<>VWm({Tj*&^WPsBlTOI zrzMIf%%(-sARt8tBBCr)S}7W-4iR_% zi>;Q(Czfjpk%ucpv{)12?D&cJ7*p@YT?J~BgsoPN|CEOBTaOyp*D#~N3;X`IhEHdN zk>4A&I%ODm9=_(O#aw16;RcK$V;{yy#!jwvd~S7M#pDZC%PKoUd564Wd8N5!@#(2Zo>y z4AT|JGH66Wt?9)nh6(dAP15eby5>N@Zm`5?>aNxj{HLQWA2$;$Thd$JL=o)LOsdX$ z;X1OO@atc&_|UQ;D=s6TpMbUQ@iF)Z4Tw}`xqmaiIL}p_)kly z7;a#=2^NS$p=(_y4c=A@b3WKJzFwF^+Yh>pkp7AqffC5^=GZDag%h7;d4UI6<_r~K z!+Bd&1;T7XTESbw3yi0%ll)@Gu@wGFo7nrVKV_nPjzswacQIFy-tgRb*L`{H3!9%g z<9L8}8REQhJPk-#QOvE`#JQ>K9=K#VL52Gvl=W!m_djlo+FU?sJILbiKCT|p4jn66 z3N3KG2rvfbi|_vlH=0OmmKV;XMyQU+Ymi~TGJ8CiDSlocuFqA@Y~I^apcRXS<(LkP z4PTe}v@CtjVhz$qjpI=dOS1!RLWtFInj-qDmO*Y!*FK$JNWJOWUz>Y{Qw(=B+rl|R zY6z8&^Wp8O+`5*o^H!gk|F$7D)X^yn5w_B-FqZ6_ zc5J&YUC>>hu}Gz-agx3U?F3nGrQd4n_=|S2ci-%=hC}gVkx9L&_q^2Y$@m-QMmQ(? zu0xLq3Ilq9XC#%Idfy`|iDN)t>E~6RL0wPy#bo8CTh1F)!-d!zyEbd;jM$v<^abpY zF7-{fE}tK+U=sgsxPqzNG_=AxF3g%Wnea*F3Dx)Nt8&wSEpHgP!pJi#r+dYvUH_%3 z$NY6p0o)p{noNJqEcI|GeEI9XinNB$0Fq2^N_T|AVESv6){PP=0`Koq323HV(*&Fv z>^|kP02JOclfmOIYpJbW73O^+f=eP}l-e5Mm%8GlT1meA9A#E1uKnf z9;P(~hh_GTbcd%V3!o@gRAwTd5F3rp!&3uTPEGS_n#_6VW0-d_|5o!M=0+S?M{(^M z9Ee+Zjk2O_R^tqKJHyNDZWro1f>@$X{c5tc1Oj1q28D9+_%-Bhg}4{)vOi1(f3QmE zTk`ldJm6m;{aele5B7%ONzmBDht0xGJwam^4np!;NVExP1*&6+of$!}T@L?)OW|^1 z(O1RG%Z1HPu##$F(GxDv-PvC+EPA}PqRpv-K9ej+$#WMNV{t32MrstA&0u$E;Tz+O zFe|m`3Il{SWy45<#oBa1Mnb^d6j2Y0HR_V0HM86zi=JOje!PH{SCb!~h_tCEKVBUA zfw<8ZwJi5Nn1UCl67^{+WK`=~wdj)L&#FmMjW_lP8#*=xWfw}`9!F@Z!XAeQ!_sz! zEjX<-zg*bke;F2VY;htn67h)&#^@eL=-@Q1D)-gjv{UX8ov;>XgN(3k3p3A6o1fSc z1u=)GyY7fnXoLo>SrQIVshy-R(>I3-ZO1MpD@9z{HF5!3HkRw?gD0mYraqHTVNHbz z_|W0N7#)C69kwh)>afKe)mXvYJ@C{~Qo5Z`N1IxBq1r5Slxsz*)bQUGZh%z3IFWo`DQ-sxMTV z{JQg{>C;g;v_5kpwq5AtgNBHQ9@9vPvC{gp>pgNQ=-MhHtqX>oA4@R87SbIAq^}mf zdm`7&7QVYA9CNw2+eZTl=`wY$=biL~U{o%yK4qx+kP7Lhl78j@8I&l7vU_8FJyr}F zpUi+PEhEr-7$te2e`sDcnZ2%Y9FXOF75#O- zwRd2J?2STmb+KSN;h;rNIsW6XmSIQhgJC@tyni!vC-tnJ-1{gaRFiv2F%~!I^=nON~jO>LRA;~~GotD;_!Aj_3wf&~K>=yAv}33G!2>#SZz zl7Y)67`b#)vj3}_HTs{U?X({ZG>*iaJQFPa6eiQ+~x!Jh~*#f_$ z{BABm=KD`_KSnsCURmmM=NSPV+&k=;4yHO*$2WH#Zwn9Q#yCP8P?*RRCUn(gsF4#I zclP@z^sv=?l7eGF36u@7_cLG0EdPT>I`NO7eG?M5iXY%Oxq=sYR#wi`k8)I&wqq(@ za|`*V-n536+@1(RQ#6>es5d-JOSrvtiulUuvRvdwA3C%0lofPThNe!nqzyq}8LYXm z`)^|}q$mx`g?k=jA@#!Uzk#@zg_up~c%l>Z4tHz!6K-u10zkcGxFtx7puj3T3# z;1*5pK-|!*-X^61(kbIW>SiPy;#U$5*^l3iSt6$~LJR6>u*NjiFoD zR-69v)^ISc5Tj=>@{SwpO@Db?&?rnF#ntSSk0uq{PUEwZHrt z|NV&tUbpjJyw<8Al>Di7HsnLI#9NF^N_txEiQL{#1Y}^;X z+d^O5Lp7KN8c)hAAqD!v4TL%Qs#^Hup*RrnY6`N9z|Dv{G5u-B3D!RNJhy9zP)q87 z7(Evm1I91UPJ(e1_#~v$9zkk93B$yt(mMr@f+{YC_;XBwHTj-3^{u-Ap9z zKac`P_CS;ky0-%MV`3n}8`Ktt|NDIOnagX!GT>Y2{g zfU~3qVIzVTngiNnRmPB*Uw&`CT-UBvDS+Rdznq|(Wjqayg;kzwO;IrtQ~928%I4OJ zMyZH94hO1V^Rv2nrGWa(s+Cu)xkL_V2)uP&DGxwx4n%x!MvU%RFk~=is9>5yQ;Vj# zPBQkr6ER_|Ow+Qvqgf3OEmPdp6jO0NQ-cEJaBbI<(-K3HYI0grv|Dt)`L|XrYn;sT zIEMS!gU2{}y&JTIjJ-=W2vbTJSChV%Y|eVp_hRZMF|t7&V~x?|%f}5RAPf*#Z|;t^ zvvT8t^?tvN^@<&5R$iDAE-$2#kE5Cl{)&+Hpn0oAYmx|NprPKVJ-adA!Kd60n}(vT zf~E$n2A@i8>KI4Rkdm{8#5pA?Or8NDb%@XvS|N+7T>hGrg9Dz#+|JB~_P=YVz1O8_=_Og;qu$T9iJLF4CU0GL9wqs7Zg3kxXgY+FCySg&(~V zO}@f3|3ydYCAJZ_qUD+#+L58w(wB7;?xCI0a?Mr|amz$bid(fjZt<~BAoK`xcU76e zShKzgXJEJo0Sos=q z5w@gsGAF_o$m0W-*v)c$lHEQy40%1&>FJjeNdNQ>W4by>r5P@$-Mz7F7iqU zwq-b*>9+CgihZ}he&ATEg`XY-Pc0wrOuCtY8v<3P&nnugR2b4iC_bggVNApG zl+mr{(4X3)5XXB0?6o^``5cO)+jA4Y!S;ZvR#JU_0tB$ZVILX=pAKqrhM=Ym;~zT z8kq+y5_9&yREuI~^W> zxQ}aw)#TzQeRcKZ;wJ>SxCuK8r+to^kyhKLt@0-a6&*^dAjw5&A~HvIaR&q91aa`e z(FhRb(l3CB9R9)I=Jh_m4s3OEr*rsD49Jyvx^T_plAqZjVcA{skhYT&hsnNN-4CQO z?&3Mictr=`I)iEDCW&g{$aH6_(8I+#I1o_AF@Yh@zBSMUoo`P8PzX0NST8&o5czEl z{wAGrPj>m(Ko(}2fkR(ihLUYN3hb_wE}#KVQIS8hk@X6@>&a&ZGTe84!?!E?vPB24 zriRdo#43LKJ3B*o#KXE-3T`P-gdKvB3OS&WD4j!WLOO_0*cNTgC$Uha@#vNuGr_S> zL!VCiKh&c3LDCH|iQq5}C}_PMQf)#Dat`6nm=x^?0#r()B1~t+Kvqie<#%~}v2;)D z1Z&Xq%&M50lSi2a&PoeoFJ%Gs!q|_*mr%Qg>q@yK4y?P}-Ru&NQ_ID_9ShGes5_%= z)DjABM(<5=r?V9Yf%)qIf%YD=d&Et}Rpms{8KdxLH`QSX3{-SaU0mhhq!~1M@<>Z0 zZ3M;k|KMJuobt5V3(FfC(gii@!3LmNjwwJ}=R~G3<7Jnh)7OmGYE&U~w;<994~~bVy3t zT-(;Kn+8$)IV0ma5Meoa*A>Eu5O$4Dfhd|>foI+E45M^ydiu?oX7t)WHj>FO(Au`4 z!gABo``9W4|1?ySGT;Bh+nK=0Rn_?(`rZypSi>S9Fc4XiG2NZc0wfr;2}l|f66gd3 zf~3-0I=xcWP0|SHd=zyQ0!2YhNvUyw2O_wE2&0H13aEhc)KL)BZW4!)MR7rS3cT;{ zf6lr0R;SU-IPcBpeV(N2-h0mZpZ~u4Xg)BSl#=@0jq!6rOEtXrICT^REiTwZF!~Ok zz0+nn*xbwB`;sBt$t~=?pPLvcAI@!W2tL2)8&k%VLXFef*@~;ZkxwluGq3Fi>8DBv zT)qVc&3iY6xC^&CN)z~e5;+Cj1u`y-coHMsd~2NpG>hj78ZmBbk=jjkU)ONqCJ~Dg zkNnn)(eZ1{i=H=L#o)2%ct&F(=Q+TaXPj$eZeP)B@Md&n~A)GHnW*4*}> zx?nq$MlawNv}+ilLYRKL_B7`UEWjQEnV1CeNLxrZ$|SKCqesr*TkV4tJch~;vrvUo zyuob}Zo~L4pVbKPXm?#u>i;8W4B>I%2=!;&c(SxJzo<+16Henlmpj65PMVGPOo3|S zg<+~}NCLt|X`v3>WwmqAD35*<&3O25=uN&2#QoIybqyyuJ|dJa?r`sO&vuC#qvE$YrI2|;)*DGaz}X*k!UK}At_;9>N>4LNg>*ZlLz z;HNJdb?D|HB4-{-3G=`xi0vfr$xPQCLy1P8g?-NUSpc_Qm9+pC{Qa{y3{jQ%kH^bR z#9r6X>Wy35CZUZ@o3gW)g{OPG#W`Jdr_S4(RmsGefM4p`4g5L_HqWi&TaRd!&()R1 zE1A@p^(X=9z-3nrlF*@8BQ)%r?c0YoZ9cH8J1dr(gR99+k?z(VZ}Rssb_P{2XdU>m z2*a!S6O6h?-gsrhaPyH z-;D+|&Q>hrWU&`o(saE|xK)^IGt2n$tEZ`Ju*0AU3o0GYGFxbk(8&D z#`%UK^BV7C@-1zdC0?qnFx0v3r2}aE1=rKKj%wXYZ;-%u8lvJ3T%9HY!o{$h)>+3g z&%da*ViCP*%b9`-t32>rU`L5wQa9k&0!@9!Y?+BqnO&vp;r0IMhgNC|`(V;ZN<|wh zS|@v4tj*UVSFEUz15u&$^tcOmf^A3Bp|of?vHEjj&*qBH?n= z;+P^Ipb$-V>7f2w{bD5v9QaJbLa8u?SdCmk8(?mDeG>#L2KYCb!ufZXd za*KFr8z{=~$PJntLyDlknh97Ud6Qry!ikt93X}@FgMe`j=3N49O-yFf=6yfzT(SAe5`h>^B9-w7coj2l2`5+cC_ceSA)jO}Ua(hY}5Ym;~j6%JiWsYE9{7+Gf( zT=qFxJ{Z%oM!4P^z7DWWt5767HHI7az32q+aYa%(Mm#ZkbD44?RXB$`Ut#jmco>6K=9@0vnRGN!4Q3cS z4G86IWk$*|nV2O*cBIk@PTm+Z8YR(eK&phptU(63U+|V(HNN2Z6yOPi#w~V;1_lQjG?XVm)KgLYE>n8Cs`b0nlXIlepT+u{ zcGrX@47&m&oiRnNl!5#8%r0RQYg{>iWFUPM2C?p%4(861UYD*u)NN`Hk&Ci#Om5xGL}I^XS~Xf$MZQ5U8! z#)p5;N9vU=fq82VJ1|-95s9*zZ3t`mi((s&TEs3nsmo|X5@4w$@OLQ-CMy#P=e9ln zR9_$*i_R}LfzShUzjeK|;A(VhFYg6OYTg4e$pjlYwGUi5$qZk+?N)ss6r7m;7C4wO zM{V5(ZKNI}$H-F32fCA$@{33JSdv^&rqA6zW%{nGv&!^ebEhw8p4ij^^A1`xLhtD$ zZFM>j=6@R`kH)bveH@eYKE``FSa2O6{&@fYk24Xroam`Zr zdIBfaft~szCq+d`+qFr^R6BGOnDYK@w*?7#A zvw6x`LW(lSvMyq9!Nk8Yk>&r5lR!bQzkRSfk&*UPjer#YOgHNr?;9H=`k%R22z_!$ z+LTO~;I^nZ5sXKzGTcL`9pbF@}Tw^DlTGGjbU;;$#uPM3~Fh+VflY@sExS`E>C-B5$Ejw4( zv23-|k4&+0dJ+9EVty>Bh7rzQ<{t@{-yM^x0U_Jc@CIP#|0@H#`1)T9cK(NAeEn~{ zz;!Z@J5!~&>_5bfjeqRn_OJhqW(TXr2^N8#$YVV$neBpR1H$11I!HOb`-?gSjXdrM zuB-GEicV!tQQUdo2U=OBccLvKtR}Ms!cuwDE8s|MwQ6Xh~!Sa+%fW#?VMC^6v~C*B&Ih zkqz{A&{mY;BPGu_!eE{#qOO$Zud?Gy#{TebxVD=a!5CfgAgnLC9+42U zZ#&zDV2_APNSGN&s4qIxHf51}YLLzZSn|BPSf1sDhUlGN?!q3k#I!N)2wvgZPX?SL z6B9^5g1t`Ef}S`hq~u8N^52jW6IW>1U?dOOBbXh!SL4dm02EDB_+g&vuQV#A?;6lV z5$e?`Ugx@XN|{fOlCldqL$`<7d75$i4{A3O$*WSex=}bsAleI5!U}d(qYM5eL2oCd zL?l8%=P1(Iw0HgnT(X^>E7SL>P0}wg7>1YU&TMRDdQL|pQ zRnOzoe`LHVKKb2ODteB2()g-xHfr%I-`@p|OAqU7=&-&}+RaOq>hG)GP2tk{2S)nWV#jOI zS~RQmLe#Rl|7TtZw@kJrX*rs9j+Dc!JT@?PszUv?_qSoMCk}^VH0^8;60sR4Vd-yL z={;JRnmnCWZI{$Dwb^6(xvo4-$c_sIuIQ#h_!@%qW^vKoou%XEC7hX*<%Z;n1;=NS zf0f2z@994q?4k&0X{@RFAcSjyh|e+)7t@ZP01>M3zx_0&;Do{8^QN@G@^*686$sw+ z>RqT^Dy>S8i)ywIktx>S^1Cr-diiw{Sx3~x9Ev(ADZSmKdb&O3P`jJZza>nPBtxTg z+j+3$3dV1NPn3&;h>{4}-pp=1W2`$xFp(->Iw-qA?0$aHx=P z7Jp`6hm6VJf*c#=P6kJ+QGPD`ycp%@n5`uBpv*r&kAV)x$yTV_$RC-kN^`U@vKrpv zeLI5H#W(n_+~R&dNMtEI{!9e1l%!Ro`c4Ln1l#4tb$V5Rirf^JGON~s0|p8>l38Na z=+ayQ1#EldnD@gOwkJjrkvkwEk zGCspH&pAxBJCaUVkp3&0QXf=Zk5k+Ht%uu~6b3=3N#&s z^;Dy0cEJ{ip4oM4;?|@$O6n zSSWMBzd)QNm^6lpskg^;XqWJo+<`x(i6j0ygibvNsXbUZ`q~GLXH=uFeJC(I4yAY& z95+#P<&eoIHPJYCX(Y&pi@as<@?m5S5RT;i%+mS(M^7U7I3F~3W(9kpUDm{tUGca~ zo-3ZH4fAB9bY|PAO_YoHZuO1l>2>~#F{@Fa_Th@hF_>KXqz+kHr$23T&g7)xGn7pg zSyE$_QUGjr`+lmY5O%195Cr06l-QxP3{9*jPSGofpeUpj8EGQ73-2+=>c0f#-g*WF>I^W6p&WrTJIk}F(US@2r8y+57c-^|SP1ml=HC?r0>4ps(N{v^oct?Ao z65?Nlk%7^|+G}_EY2$TMcJ1sKDK%X+W$LA!7xj+ezWdx?Sg9O+?v<84oL)@Z$d^tU z85$Yo)A;vC2vgtG)v~hGUeNpG$U*dLdvYu>Wh$QXh%mTR>ss*LMD?iS3*=#I~>P{A1&Fr(MuqC}r1S_^dX3+R)fc zeFbh$na7A?BHG5P0Tr<#5vXmX?Zkh0cwE)_$EK_Jv={=w*T)N|HeUD6&!zi!->qmi z*p&AlO_P(kQ-*SeS$Y0@rvFf>>DoeT({=Csyn(gSRp`^^*x|MB{G0>pb$l2{0O+Bfm&YSNVs9V%i%*Ak7#ntFD-4G3h>j1^d_@!b0_UB7&9wi-Voz-EneUh}(#gwQM{Lo%QH|C`3 zq0b%dgpFSp;zvt3fbt>IAF&VxQOpJ?R{d^^^#|OWcpM;G3cZZJ)v^HlKrhj_A3nuq z=+QmzKUVUWbRW*8TQR2*nB)`j%kiE|6iC>!6@A~@=XMrIgh`t2bZ$g50kIBvKVMU7 z7;uphnlQsmHWAw~Ddf18F2}JzV=?}S$$lIcjE}ucEVCRR^qwuS)Z%MH|Hc!=`Xvj; zXk5c#2zZPA4PwEui-j{OB-k&SAW;d>F1WLT0vTawx{px zK2l)H1y}28LWqReoHB8Tc9-RDJpAPEi5td8KA-RG8_bCVzo3^4t?+mnQUQ+Dh1TIJ zzomz7?;|)QrcLi`pSR?3t6MT3XrKH&&O)sOEnYnw`Eog$|I5LA59T+iYSH|y>X0mt z8b@$Mot7v;1l zlh4RkjD%4*g7<0cWHrvt4-WLSlP!9hWNbCsW4W|oJ3g|P%t=eIu*>Vu6?dq9WxbLI zhFqeEdM#L7m&{}6UR=rvAUTFzUo9D%v%bv1Qhrg6uepI!o2f0HN0N$sNobW~oJwuf znUVc+q?6v^ZUDh>&Gkx1;x@lOM?KuHxq(#}45PlwD#GaNfj@IQ%BFD_s1x{gyK;C* zDb9%h_lu-O>61OuVXDz(|B5Dc*(c%d>L5LU#H8sU|KEi@Kn8)yzr>AoM+H<6Ff6A$ zzss9+R&f<;4|RE?7KL;=Dy?qzov=MGvE$mNx$22xu*=Pn5=aX{- zkbk0Yxux>cf%2JsOh*$|@hMj=C~b{TgjNHltVNq*c_r}osy!6Gftz!JouleCMtgmdrYC}4I;X> zJDtp#6M{1ZWzD)!u{*8>R>H*``lf;*ay(_WZm6RNi8p07`$bCa% z&HHRffAqHdN&3J9%eNfo-p=_vpQ6{Q^D%FOSj9MZvcs*N_PC@)>+&8DwQ#cMxL3Yn z#{~cd5=-*<;X6Dhkxk{#>uY($>(a}wkrmEjgjpCgvtXW?DkaNuDmR1>HeT*iJ(VA_ z@d}hiPyvzSk=d#W@otFs50$t#bcc;sK%a);_!}M520e{wONK$K;ig?dk>9zzbFda{ zcZmjW16s+uOx=Xe!HZ-EbY=x#P@GLX!uyn#2s_9S4F+Xplm_EBA)enj^(VjDb5rr? zuiZMvCd{gH{MHIEl%OjgY-m1Y*~U`AEU>SYph*XwNk5fxb`e`PJJ!yM5E&>S8B1K6 zc@AbQvw~klirh*){B`mzZ#cArviuE)m>%mpj){{B`VdpU=>g)3YM3ag|K3th zqqzU0>SR<2pp&GZ5MG93h-p$ztlI!c$T8uN0()c4~*20#CrS=q~zs!Ts5X)u{o1m(?zd2$xbWiLn=djrOCRq{6KX-+4 zJ-hh`6JOH3HJ}6=i*`}kcWs|*>hVI>HMQV>U?eL#dX|K_&?jRL^5~OK29TpMb#zL^ zKnV1m`Q%Rl9Ib$0YxFnepBTFMiNO=xEUu+9$)NnxKDWH9Vwub({4LU`@&q%~B5g2r zQc;l-eY)3~>&58P>kUXm6A(90p54f&*DqQ6_BQV`1OIOA8#fzDFUoMewby6Y3xg3> z-A=mbYnCP1-jinxivlTNV^9o`VAc4b>o1OrHY^9U6Ln)_a4qqVod0 zg2ia@17sL1e$c^kmhqj6>(0=p9|M(Hcc2RDbB{7eC~aH(05Qg4a9+VYfPT-btzpl{)*sNHBH(R zxu|w+Ma;q}z(HYODSq+ghH#TV{mGb)t1G7*dH}s$On^;Qqc1mZWvpm1p79xcs+%s`i;9qe0LqKl0WR#<1CT{d={{Z}hP`3V%0xr#()}P2a#d!VVp^!2Wte64G zhAO|Tv7XC{L9^6k-V@1F1Fw)Y1iKB>&5;zaNT4i7cRZ9lQjG3+FiBv+nOf!Fx(Xfn zs(~}cj%IR#c^)W=a$h3cghL5H$@a(o#m6wE&bNcx+ATm$KhOipxU^Hg0j0|t7Uyy$ zLNJf@3t$<(qag<0`h|8|y2@~023zlK6{?Qjw72-Vg=iv`5K^=Xfx86<;@zwkkM zhP3m6PRUSer~RS@i2k;Z2o%-mwh#M*+s)Y*#AbDHxkoUYWV;&{dsBw@KnGUULmQ~3 zR?Zk5;tG_QYxG%2Uy>FaaNaUlK_H(~5QF-E^Rmuz|0=Z{Ofg zzU$60=kCoN%O7(NTI~I7aeasH6{kZy(44=@?+@Oxa_s>%3?uEM&1;a}GCW79tIz~d`4{8d=Ghr_WE9d^^o_}^*!FdIW(GS+A zymaE1>2laU>^vvt(F=UnujtCfw_$^3VS(u(k~WDz2`C8xm7{NL&Xx`rqi=k|RSy^B zDrZR&NLp`IqY>p2|NlQ`%%ZJzq8abCIcpkr?d8yRoPtR@1qV{Wly z`p1(^kL&l$y-;r_|o5B+%2^c>~iX+#W;$VaLf9wpm_J`R{GB zUE5z~3xDldqqppSx7nk6qIlwEA7+nk==Igw{G`_(Hop1j^-l&+XZJoS%DfKL-Lsi< zOu)3)c}-7cUdo_m%?r*BI)D4@py&3;+ChIUL_eRUKUw!aGBQ8;ibf&xf0jC**+yn_ zH9OjzLC-86Za(^!-=t3YIdaOMh~M<`hkLv81Ocr%GPJP_Tq>R9jYb+cq>gzB^>W-; zM{jEx719DBFB?J$Pas8L$DV-(1PIJo4w(^bDV~BqY*`p=ERN!=U8Wv*{>=C_yD(GyFs>M3 zevt`m4v`*{f0&MdMI}q{u~B{2#|+(L73l&%$o0kRP~-s2p~)V}L}rQd20d_{mf*E4 zB;r3_I&6VF%8#bLPmV7fR8!xNZ(|rmYKEmJNwb+r{z2LxNdWeaCk??hL}+V4hnLTW zgMNBZ3uYS&j)q1FVcpK*a@}k5M~13(uN@=AvMb7AJIZbD01S?p!RU2gOSc8h(j*fd zT@b}&vuh0Mtkg%9y5^t=C6t8t|BU6lk>9|0J9FyUl025x^IRZWYE8!OGmd7BOl+Bo z$Z(^1_gPn^l_7{xXvBfJSLsw2RmI-8=Ro(axd%X51ob@!nVYaMI0SjC)dW}r`0x9G zl(-z11O@T^QSNGh(5;$N>ZSCe?)!k?Y1`pH`a}2tZO?9;Rgc+E!4J_j*eoIm)j}kr z?<*%Kpc&=|4F!poUM^YgCK>A$oR?&CXmIT@`wmmyWtGitL~Mn+Hm5PhclWQ$-Pj2Q8y zm*DHU^kRD;!-X!rq=pOmfL(?MrBR0I6s0IM(^|Nx_Ba(t@l)^Kyp^ zm1g?;FF17Zq@B4Ztni2KUF=u^N3ZfIcAOIPet)|h2C7DZ2IUWuYpX=CQl2P}KfJpf zClUbhk0!1*uCyFIzjWz+VMF`_fox|-|Y4x{XxiaYi3#TwZafg=kR`=kn1jvc2RudzHhXaHh@*NFI;lXbN z-Qw=c4;JuP7{3(1cR7j{Lh4KgufzL%ggS5{4HtTDv|vuH2|jJ;_qkEy({hkkqvtk~ zTMTc&kQG4OeOS~y$!~+CEa7g*n+-lf!cjlJf9rt1Pi)K3 zG8{+6Q$m+C?$T#nb##);*kSRhKB7~&I!4TdcZY#Nt^YO}hQuAd2(wPCl}W;MN`xSj`Tr>!D zE$bD0Gsqfx@(j}Si7%`|+7&8{1Cj69LeTCRLWRSuU=hXW6W`?{f&}YW7(Kr1dA`<@ zuf~@>XMDs0+%#pm_yQ*z*(`MNANL)e zNZveuAIZ6DeEz;HZ8%yn@El)^zp`FgJjv%BAH!t?1#xiK@>?G;X3*Y=*S|+;0wziP zI_rA6VO~>cX2&gA%spk7AS$W~3aNycbR%@@?sfcc4qiLuBC&-aog1&%{Ff>Beztj2 zahD@^WDW>8sJT4GjWzThR7ju}oY+!%s_}8>a4ZI|o}G$HAq<|A(!aU3xoAN`OW{IA z%wfcJBIAULKOc8C9LdR0(3StjPiHYqzn&e|)ld@2tVXYW-@5gd@azg7>{C+yCc0QfkXRucpU^i9x6nzl^R>UQn{k0wznr01IeOP7rAgRzSwJDh(!S?8T9pT& zJ%R(~P%t4|lUF2fqms5!b>DU6n(^WM0A8kI)JM7+i3RQISl}02Gu~cUNA*(OOP@dv ztQqgsze?7Ax3j&}OB1qBNRZQ}oEV*}{I--HLas(beD%Nw1nB@g&*D=t>u`0G?842v zopR$p@32Ex*A7>Gc+uvmziX1cSpW2uoBz_V2n6GqE%)DMM%}gdE&xB7xcCiZZ86$% zKjPLTNJ)2<`Z;;xej8-()oI2$eghWUZC&fud^EUe=GLM&%kf8ol- zaPM6pC4bY6yS{gaD~fyWume`1ug2-9*8SiQl68H9*S0*^&XWpx;DH?5d98*bDmEh} zfgjct>wfSOEC9_DePk2?-i^?ctYgNzqDOF6!^)8X7wfU`-ISY1M_G95NFE60#r*8s z!XsS|dvQsC`>pKg#3PC&GIU+bgDLB^wzj_AmW&mjJ_E8h*sQ&+Y&EicyZ`m&hNNS@ns(FAcWDPv%b3um;Cwu3#WFN1Kjl8y6HNFy1NLFZ3AWx;Lnw{UD@apk%vY&=B5K&y36{50VZ`qfE! z|J@1d;w&eC=4>kN^xl{bkH+`B!xcq|0Lc?iI#u1*Pk49$#cJK7=O&Am>mFU5ELxf2 z+y?Nq5q0^3SQJ`#`KmSJSb;s_m*u*biz&Y>p$0e3glj*Z#IyOH0fL#;L|=;h6Jpo+ zBENwgeyE1qGVlY=*1a%pxK&r2z#lkDO?Nh=aCu7MvtB@2m{=xHk(V5(l{rDp0FGcJ z+VV>fW_$^hcB+e|7)q>@(^HObSMDl9Br4>HOHZj;69+&F93Hid5ee90eEVC2LF@b2 zVJWeO6L&lB*ef-_FW7G#PpWbIt1f4uM$C~vg2XrD4%9Ek?XQszY6csG%wJ4~h=+pT zY_p`idX4KsbMl`zGDOiT$N#jf-&#W!<9|BM!V2MFri$22=qDD0bl~A)5@=E{eBJa= z4+Q*pylu1yFd##}3_o)_EZ=}y?RqpMRO!OlL69TklFy4XGwBU|QfFa^@kZtN$xjKL<0o&iEOaZRK=|ZJUC3eYvJT1+eG)d7;|J-5PbQ9W1Ph-|^k)|12RA~k)C>^DLT98U%peKu zJGbob5?dS%_w~phqGvtQ4ZtUI1(ap*Tw12Ujz++*()b^{NX{$|QCYrZTv)VLF~HUUHAUPS$Mw`3Ie73AB0>(`+p!J9O?Box$JA(cNu!QdpyD8h4-J z7sKLZG>}Cn+^|_w!(yhKX?G%h{!FG(ivAYINWYh7C#JmQGR_WCvak9KZu~ zdcA<3B&02}GuaRFClF6HJF8tyo^?ee!C6CZA#|y?Cd_ zxxV-%?VJ-7TsDOD+q{@_NQ4?1g+!x101f8hHpQI(*Xvh8F!+{=d}qTtj37Qi0{V-0 ziawN|mKsHVZ58>cmx1<}nW52^WNDY<(?4!FP>fIi1PVM*@s37QMKx>k^iP1OAyfAB zkApS%ufz(d(O3KiKTB4ln1FW5U;Fv{PQ$MDTT3f|9TB}tX|COs~6m$GK;>LZTB8L&2u41b3C9srx^nj@V+E)p-BMUCNUVCuj)iLQ*v7 z+r%s&V3#m80Kmz?=RRtT1KUa{RNPY7$DGGyu96*6$rUh__1Ke=!OYbqS^z@e^#pIeM1-v6|5|PM5|)`qPPY4 zu*RdiC42jihsKg3#40a<|9sy9k}l*R{Bl0f2lh`2XVDb`o#`5l&nw&vSUmKtLQMDR zkTWGY``avE2RVz!`)zE7Q-2+rn|Zm#hA8VKNiflQ`I5viJ*}HZ?1UI@>dr{n zT>UO1@_N!~`$D-QOUfkze<;2Y<$_F5bH5eEpqyp(uz)twNh=$Qye~pywLqwL@v5zT z$C1mNl2nclo5>eVZLG$J&FC1!K7g^E@KM%sjEyZLM!@pg;*aj^iDbt)B*xeMc&kTfr{v2H=IV7gL54qCPjtmV_*=gMy{hQFnDtx` z!XJmmVh~9uDGC(0<3N)6D1%$ojPjdvc4JpW#etX=uP7}OO>W4#3Vlenm1_Afo zZxV$3?)@3H)x?1_fVHSb7+7J69?LeJWygsp8TPR3rRBtOgSze0+WcZdr`K*Em#{<9 zckF0vvH!ffrWB`Gzv{*GcLEpct@!b+QOOeb%I>0Ueq=`Z%^7Vd*$4$ z5*XIkzvGkRjkSK|eX7NAtvAFnzy58(&$tjp13ZGt!2gsA3}B^mE=N0LuH=RIIJe`E z#IogR#Xe58tVS!Qp{moYW=K9zbEKNeK`p?ruEZ4znEIwAb7u;nh@&WYLNExSsxVoQ z0AT`0Io|yiw}9oq2zx*nRKGqmC&2D~{#UEAMO^ZZK0%ZZo*7WsX}8W1;bxLS=my(z z^oCagc&pJHUiEYT3@u?)&T!B}oRgv|$4E;x9D(%UVLUcTUtH(yiRO*!Y!X$aVD5R4 zdFm4qgZ+-!f_xIlVB7~D-JbPH*p$q()?Hg3BUD4`kj(xPp^{d3v(@!imMB(oQja?G zQd{}ftY2cKv)gAqhg_*fv!2CUB;H~Lk4dF7OdE?ImahEd(UPJr{bKg$Qfe83IaK6T zgLLg+~Z*4%96XikHWia%GQ zIgJ9LF*e?B?JJm$#Qvc>qaN39JPTXBFSg9ch4`++KseiQsC{egW3)@E7itZ4DsyDx z9EKoh4)uJX!F$6958_ueH*6Xl;!%u4ST#+5@h7@Br4&F5`<_#Fc#=5f(3||djV%eI zb;@-=|2V2vweII16S`!)rTh@C7sLZK3dKJ+;jOmVGb5y1WPSj6bZlPTF zhwt%1weAn!cm3j!Ig)2kc;GmQBAq=cske8mT|zf5RB3bA% zMN;>rYs^Nd`_i>gwLl_Zgd`^Ij{M3rA%K@F>_9~lxZZ#H5ek_dZ{zQw@*coaeo2_v zFC%4ols@0Qr7Ug+Pd`rgTQPdKHxmz&EN;I#W}PEWW(FPH$~x8QZZq{5$&vitK++pd zS*ei8OE-A6iLmJPQdtHCYKOh{5lX7L4uj$h^~D+KXFnwWDHN|d5O(bp)o>c_Su8tA zc?USs*fks@+?D=AXd`ryo52cdED;_q_;g#R)rpD0X84>jbN*&N_Hy*ACC2TdU$wG1 zQ;xPRfd+$Q%b6HOKXS6ez@%vE#rV-|=iwg6u2p@S)-BiXa<*wnG#ju~%yu6q*k#IH zZN?08D52*RT!w^~xfAG#PXu}zMMRn`wkz|1vY1Pr7X3mh!?Ea;)ht?!PC2j8nae9r z1cn3yI_F&$Akrz-%BpM+pd+lK)r0a1?Eg0y@JfcK1an?kT8=K*!gIJf$mIZ!+dEyA zA%XV`o|b~6-Luxkop2pP>+I7tO%gz!hgYxgsUhOrm2;vmSZ_1Ggo^d1yoWwvwKo!f>Z-G>U!*bl z8od_GkfYDIItm$CAeZ_IBzamgoAebRW*!a)S!Vz($DKcMUQ!%1XwC*E>!b#nSXrMU zP6Xda(9_~;tqHyOk#!)#BI&g37Ss=Y$cMGvO-Tm(lM!;2DOIie@mhe66@aG-vDa^+ z9%xsdoapx`Mmv04x6Y1`qNWc9Tg9UHx(l|7{#oRsESQ1eDJ>JPf+g-fN+Qe9xf-4F zwu$UnNZ9IN$wtA@7A~A@jIbyu*)j==V>5A_*NV#Z#O0w(zy>7~;D#$$i`K(lP!C4) zh#2*x;S2aeLfAy0Y7@`{V*4vv@pbNJnTFiyh7|cd%tSC^Xc?N3QI=>3@}kqwxj1O1?X%o^wmj{Ex)5%AF~;qV+BBqZ_VeZ)2Dp(z*YYT&MhGGKX3h#xC~2MiWSo0ZlQz}ieM;1nu3E;ZQGL4utWAy^U=$%ldw zUnnW%SLCZ|1|@E9e&cxucwK+>g2uTjqA;Ipk!D7rlhHw+y*xDs=DGrd#e**0cd!o+ z8{yjLmxZU3h~%;mJNOy}k^~99cDc2>u#OFh)3$!>m@&kbENPMt`&8_vqE#LqXUa!I zuD?Sa0_uOr>AVV338i#n^T(7`!K)yjf4Rb-VOG+D!ZYNaea0%(Wdn>kb8_LPTc%z0 zj)}k1br_zLANCkJ)~0_rp(|GI)}`XYcd*y~+=uPO!J+iM!6EmWZ`JYFUq$-YuFBi- ztMA17`|4Q}J^(0Iw#gTmgDu0$D$TQDpg@4^5q?_fY(A7H`yvXS_6@hd(%<@pR;lZL zkLw1lg&L?6zsXcc5jGk__IuG0WrsQpI2#-(K!>%vp>fzFV|e0GIpo5IC@K8N_l+L! z*DwK^6a(0fKozkp+p+e=72p~qNfNQ2 zHYL$$s`0d)oO?U@Fyz5SCQo3W7)4uJ3t@-E$tj&4sl|KN?ZCNg)4{PWKa57`IJ{NR z5<>T;DPnTXGMhj?FfW)h4|1*HF6@_IrputGMzsC<{J3h_GbI`>fbhY~QX*7uX+Z%q|S z)-2NV5wVw_zfBqwAyYo#>wpFFQGz#wHwY>yir_lC`{j~?+~Sn?9wbsqt8t6rv9ih64LBhYU!!GJ1{ZE;jrobs*tV|qBPlXVad85lMl4utgn73U?`I!^f9k#FHTJq`=SnunobYpZ3R#M0}9kHtIq;n zIgDbRM=V*s?Br|_t9v%wvS-BcyPhTd01U8EqeU$k20k!gxRS0^8uO4uG5Ydj+Pk?@ zoCZ&i5eNB>(hO%3TU9WqO^@jk0! z>w}{>^0#q}*4oe-Ir^XBk2bnQU&yRsc04>EPcuZyZ{%4hw@8cB^lqfNhh-)y*WXYj ztX7PFJT22mu^j(+joXk`WQ#PW_%WUE!lLyr@0w{w$)a-1s39W%DQ}RZuJxF74J6Rs zh-v2><9lh-{{e?A&sR~s~23U z79uRsZK;F!t@3Z(^j+}PMXiYp=qlWUPxtqt9S{UmAn}Be$?vO%297njp8d7 zyPGp)lxGwGZ&*!@VGohZ-j8|?@7RqTFM-i`2IDhX%u{LV4u>*c6TNZQn)azi5|W8( z&hWYQM$_q03}an1GthQVS223yRPZ-3=3K8--tK7)V@lPR`;I3wjVi0r9Z#8-(utOW zX>JAzwul8M90`yaB2OphylbJ0?f7IjJQVVYfGF1F(L*mtLnY6nkXVet(G;X0nu0m4 zwwwiV)9Lz2Nbg)w)QWhEqka1M-!DtNp9f&(uP2r!UPv@}p5GwPt z%#&=6gAe|piMZHeXFj+l{oBC(?guoR{?3EEK8oXTmp`6tj4W@NSC%PIjP5)z3eaPYXmg5@U z^wO7e-B|zZ^09YeMY=i?X46V&ffsmmy(VhiIv@HLxQ8#5evoh*xr!dcRTTVL?2N3v z`@Cb2qgA7OzM-JG71;Q!KgnAQo+Z!)9*6z9g~pd|)>wd}|J^)UtlER3#d_a3JKWjN zdX19(ar2!GF5$ALi=6fcE)Usg*jnS`J#*>#!_tOk`3?w^Xq^(ga4orDDAA-7@ax&Q7e9(v10X zQC4W5u2!qJOxs~c&q%w9ji+xO^IAUL)awtsO3h@Q9&c@{m!4z%#gA%6y7iI!1Uh;@WlguJBoB=Onsi4G*4tD>_UgUe`leo2IqMCnwm4-27Aq*joAxf4EF48%L_} zm@X}I-4caPz;B+m0~IO8E4qzWr~|@Kaq16l7$c#e96j|7zE+K%y3a+Fl=#O~YaaP4 zJ(r5nQ+L4jw%T(l>wMpDR(S8E5a;#3f3Rj;U8K&Z zXO!A(zx#hnoU&D#7t6&Wc_U#;)EX3Wj&<&6nitk{bFx@y~&-GM_X*j$bt|NM||iK8rm4fh1r`R8--_6SX> z97Huh&YSYvvedO;fBXyJhTE^!sp*2Iwqo|J7JrOXNiRqHyxFVE(h9<2^M2$suGdk} z^}%iQa)z{hdu57%eyIzqe(t<@hVjo*Z*+Ddev=-=sMj3tdF*_eYQZfxX$SHt_!p4-C z5sx0i5Gp>R&h98-#c00E{3*`;1@5EGCcK<~Nju8MpDj%JT?l4b9K^j8hxU zO_2e#o=iMM^k21^EojCv2cGs{N6Uvtw>)N^Vt-KH6Cl@&FI|4h`6soUylnYt#82qS zsFWeS?RkL&9Gm9<$(S?D^NgW}!Ul{^$xy3*+onVmyHD(L+p0hjYmal-AY0g!8%C<> z02$_u-RcFkY4~y>gxpkAO;c_$Zo_psZ6CUY1>P_d?ivq$%rs(sH6!VZ@lZ99S#phH zDy!g^Xo^cuB|{G8(@TY_Mk<3|9!yEf0&75__wOZW;QODBtx$}Y9A2QFjMN8xtjI$b349fiA|+FEBgs2?2^NiP0NJ>sHueHh<-s!%w(j+yNKG?A8_78hj@a4 z7K$;S!U(}#V~QwO-cv#hO8x7keOVv6;x2Q)d14Ur{`!E}uR~YJ`tQ9Vj1cZo)+Y(8 zpP}NwtSlg9qK7Run7^logMX%9zgk6*c=`YpS3CXoH!Jzuc*8)6Atcfr{fT_u0iD!o zS0kL$tNoq10YDn=dc2`Myfq7RA59eL64Wm}2mU2J2AymVRE&Cqr73M;xWTO(oVjDm z_#^a){r=i}{7=RBwf8!wR=BV!htG5*47%u7yg>RGN=}b;vLkE6{h7wdT@?*jl#Pnu z-}yghZVS`;fB*5;pt*$Y6ziWj5yCImcio3TuGV*b9Zs@lJU=K=y6d6O`<{}Himm)e zSf9tP^7z5HEf0JTQm>Z^?*-7Hd-^lly|a?|u$GxMFvtt*=#y7NvO`9)sYD$*Z$;}# zjiu!y!%XopHYMLRTTxMLLk~3`T?t#idJ1}_^hq20hpSod$Wtm&Z?4h|krsTEnBXrh z*MO{YPhg0tl)uona;7epOd?PR?)lVHCs{C;3mk?2-PEPrD*cA71%0}3C9W5B_I1Mt z$#NLP1kK3(je*05tMKs4a{1^Z>#%m6P7KTK2B_ueBRw9LY~+Vh@iB_b$-z$wTOu@3 z+Zai~lLd9WhiE!Tz(g@O`7jtnF`QaABpuMEa}fs4(Fj*{O%(iS!|p%DtK5HW$XTs9 zKkJY$aplpvESdD!a}LX3Vf~jFqx3!x zIZaA~Q_bqJuJ8S=$wZsawx$jutlF8 zooh#22c{H%zrT4!zH_&Y;-We3*zni|ti_1Er_kxbYnX_vL99pZK`H@~34)Woan$a5 z(n`r$1RUXX?mLau_>TRSJJK+=Ll0{RmdXt4z0+6$S|pk8ZY6en7Boj71;JqNm7|yb z0Gb4ZF4lkVBW)%CGKf`;UV4dVEDM`YF!~SamYmghjrAwiHv9sJM`Mqc$;iM$XSUNP z1U6+Hrp3e~1}Boqd|mQ*u+W4ac0RNOH&lMMg3WlFQ_@>u7iPX@bijtJHhBigHr4vk zdw^fLe)KD%@&+q?AsTX({i_G6sDGg-OR2`Yq|D8f&Dn+X5wT5wxUIGzz}A}lS+2&1 z9&iyRXUU=S6}}x5@ee(0Qmz_xQ@+BTbWeYp@Y4_jY^1Kr5ezRa^XHIsR?4(LuBaR! zur#tMfL{HU{iF(&qgNjFCN>L z;h!GUzzXx%Sdh4Q$h3bQOKz3v&cAZ*q2MJ6Z^p~78I#hb!IV9ww3$oDg*BZfW5$F$ zD2XxQS_dao944NbbI7A9z5AK;ml^V1jXwQZ&kTenKGvHeo)8MEyY)VhKbVT*{S{lx z0)5i={XRT)NU0W^3Xu!nhA$87wB|M~vVbB=nots$`iquCC+9J|qh?%Ta^WS-IvNz>SIAnm6y6=p!COxv#lc)@Q z((qR}8i-$x2S1oORI<@xvok0|_^lWZen@d0i@!Mz7Dl&8JB7K2Y(#SAOezP##}GO< zN39&^8(jDgo2F&Xq;a=moF`{Hgx;`_u)JzRZ*=OSZ@FoOYL?POPeA^Nped658R@Qzq~k(n!qkvCcWSLk(52~kzExpc0g zI5=&k*PJ&CFAo)b&9moPt{V70+sz48S;N+i4S;NQ;J7yF#A2-3RF+i-&}|zb&^fKB?i1%JOA;(Wp*}i&t~i&<95J`;)jwJqn%>(DUO6 z5Y4VHvpB77L=fi@_yL7XIB+dUrbN~ba-5{<&{$dzKf9VESVv(J(6Sh?$@8T#3*9@c zNOIX?SQyw+(;3m!FJYy>^U^V;b6fg581R~TPVyw+*8BxXpM!r-!>eQ?mX*gw=Ja)- zG}P`OiCnTU;!?Jw>4HgZD0?#JBV1+aNr1Oy1-B+6R@7v>TSXNR?4l-BV)I@{ZnT|dfjQ6NL&u!L$iUxmgf@)3VB!c@ z;0ik3>zso;_aD8I9)qQIib=LDbRvz*&QXH{^KIL~rn>y$;W?amJNG|GW?Oc@AY9n5 zl*WlS1PR%0;e%~*B+%3BCS=Xv2(iIr`U~Gnia+t(aEFyG+I(ZzpeCdaj?JIx+ODB|sD_w)upiysz5WHe3 z)L?5mmq>F0SV~*mYj!&3PrsA*DD*a)$)P-vz0$DhQ`*3rv}i^qA+Y@I*_I?s+EDgd zM!HMQ^GeOfE}Xw$;oLc;Rc%ct6KzDCYUJ<&TH<$g*@>FGid2y8vwF49r(3x3H^ZYt zoeLMyDeZX7g2KW@`34*6#P^uhDHkyRf^}ZC1`)@?;zE zZ@C?0p7pe*n|1cmO%s3VK#jpPMFr z@>OL%J4qW-_q4+UR)!rOuqx~@P)@0(ze7f-^es75w6!h5z>Z@5f>+08plelv&NP=q zskx2ERnE2FQNc8s6%QAb?Hrx8@wnX!aK$2n1ih&yXY) zjyqRNv~iZW7|l9gd>{qSgbIqJk&3=9*e$2iz-fH-b|TPz0|`ii@DGsKJgxX;yRXxz zCMd_(y;s*!jjwx8;22`q;`br*-0FMHGBa1Kwx``n4&^o?Rh4Z`xW33IvV6Z{c};*q z@H9WRE2B3})+tu7s4f*7{=*gD&dB{^Bz$}pJnCGkLg^cQwCCO=Fxff+Qj(3q6g z;c}l_uDW|Q`SX(rM~=2ZiOu_e{V#S)A=zFOZ*L2DSU%h2z`Jkafx%ic#x18gJKs;Z z&lzh!L{5D29hVa?nBk$dn25i5%`n(cS25vre~#KOJaa|n3&rS}%McGw^@>2YXus3NtfM~TwF2!`ZA|JDitKLFTkwL`+ptHE8M8<@^9jn z_peMqts84lEAyqlfn4@Aa0}VH%{C@Ot@xjw%b-?bdEZd>XeE_wCJgNEM{v{8Rf6Y* zQfbA6$1ss(ie74Z;}J?2W|V8x>1s3nySN2-AzZ17wdl2=bgrE{Ak%`^L#FR!_{?!a zrrkEG*rov8A#Mj07|*Nh+W?!m$(%)J-*ea%K?PUFVX zj9jl7bke$)({umVZ=T<{ab}1F$)5_DhoSSNBn%ej6JjdHI~IBZiy4U{SaCTJygKn}RUwTHWmVUm^DV&}Qh<_oVR1==mP?XGLB~r-( za~laG7z%Z*B{l;2jSn7@;Sl(mj78-8ui}PsYf}rj7#;A0Lt_5xH91NTc(q4R^F(WD z79har6|}P*wfZjIY~1$X=Euso5HlyIRLjfRc-ou9Tqxd}Zu(qs zFVCeuPOZ!cj+22bsEoR-^65UzI_2ULvC!X>qkxjJFBlmd&Os)peVwNH_A?mn0icEH)BIBK|7&CfjUFHUgKZI- zGiGmk+GMBZL7#X?*JJz-@(FTHxJ;mAeiSY67ndYw13Kh+&ZCJreIhV$n7{^wiA8#9 z2#xaWe9a`8dFJlxR>7@6udB!_K+I&EZb2VU2tM;At(cnC_qO@Zy6r1JBjZWLAym5! zb6#pMcx&NH-g&}l=`+Eiw7?{%gO*3Gnt&UoaZ%o65Ez4Y;%#`8Xr3mE*60g%llU{Y zQ{$MxPt3QPIpd^0RtMv+zLoTY=&L8>(5g0?%gdc2du~-h!auZit0^N>O~gORrBodB zK&t88D-&c2bbRwO-s7!`WU8o){o6zzwYh|K7vr1%lL9mv$aw81y9+P(6CG!#@eV=C z+a95XG%(IYybYe>c%~WtRk#`lbOt)n<1}c#Ez>fGaer^B&^gV@95dDEgx$GU1^A26 z341sicbZ29ljnpzT)|)^Q9jPUTgr!peLbf^r!5V1tnIgGxw(RcR?Zye7D%)v4a3t3 zoz1~?U4$`sd7ZN?dZN`}6e7<{x_g-o@+<58ZRC=@_@N;(2V6o{f1a1|Yf2_xiISs;|?m%JKU1(5yp z?$!YjE1IbKfrj`MkS)h+Z_-0{KzK9Tt;TC_wkGNN&GR4gUU>B823guNP{TbdDovc% zRbQ(wuvdQEUKDFY=iF)9C#*YwD61ds$6qpIE3mWy*d?ybz14G+b^fV;b*jBJePvIcWo3!b6r{V@ZuCX=2O1I-z zRRU?Q&sq-@!eloWPZa7>oZxjW`0QEy0l#gr{>YJ>HZWSPKawDHxAJOi5A~NF=TL0Q zDgR(zY!IIHhReJmM9;d9xZHq36^C+CX4JaUFwVm-iD^4w9Dil1HbF7%i(YATQfY4jUxAc(Q6^?xcB6X(|HX`7h<8|Hk znFP7|tVz&3d*0vecr_!?0&vY1eL;{zVGW5NEDa@^e28~_vlobn;sU*oAP!Oc7XL!A z{>?u!e!pFk-bfJ6|9l?y-?zgxc%wJHa1V4g6`JALbc4Vsj~h#pvcUVSkW_8?J0D358KI zk!=Y-garr!Yn1HrQ#f0RgVAB@*ZbHDM#mmUc!lo!H}gz2dhAm?=G7bZb>ya|8 zCCj;qT%Ha#`E;PXW!oyvy#9k1>9(Vv{o4Pj8vX1y+-T=UDwkpLm=&g*q0DzAX>iX^ z6FVz4)1wT*t{z}c!gym$<(m!|u3;eMm$s0{Sbx)gOh@$1w~DKgyGy@r33snLVIZ)5 zilpAP7$3|G`4_)Q{{;3SEuzBYv{50?AR}$q#swqljjB*Squ}|NysmxBFICp>Fqy!9 z&CuvZH_IXI19;jYWF=$m#lT>xz$ZJySnkDr53D-B-UfehvgRl+Qyyxr|AJD(P^n=Z zq(Apg8ZouyJGZt z%Rbs8h&rC#&`=+q{ZgKEYY8O%Bkbi2o3(^b;~w`T_!ZyxRYR9Gr40-Ec`H7I1Ga52c8YgO^af-Zo zVn9?1(oIePBJs!eY|Hv%B$!=}e|v^cDlf*rZ4=_CVw#lClb2D&;u^dpIeS$eku}Aq zYCBLNuBDf#pSr_SzfM~2Ap~(lA?wHSSD1K$H)NdteI?q>H7(NIYYTSF)D(7<;mFu3v~rAV2J)#J&S z%g&K?s5{7a+Kdn!QhLQPNb|XD%L*-~kYR;$2x(-Uan2n3;y2y7iqRLpWdeqEoL+6Y zXdsaKH}NC$;(P-qkH}Jo#oxX2Jupz>Q}sLl2^9ADX?~$pbo~1O2&#iaTb_Rm%Y?XP zoET=bE3>9>@2MM@&MT@2^b*fHY%F=9CNzW6H1j6iQn1jaJ+UpvJm@+`_e;c^wV(4V zt4rQZT^Duc)rj<|rhbD7c;wLKI!9R8w%5ax zVq{2<%!ts#w=`d!E3DsBHU2O&lQvq(c43y;yO_v0Ol*wlTuV9tX8v*8wz|sR)K$CP zu+`+mN(3rMrirIUger!)wn(A2@dT$dH87EajEL#?__ml3GZAzwv7Bae=Z z<6ppXWP?_tLw*iU=*bFUHN^=iKQh|3dV0)DI`d@6T(T!f3(UJieu0ShiD@!lde&xy z={Wz)^^cU}J+2t@Q&xyP?BCWZW1v7b^&Xqt1&Gf>>=i1N@zAOeYL89q!U{z8D6myi zQ%D>(z9^5bWhQ3Sa{HFhkGwjMGg8k4Mh%S=+(T}A$r%EY%*IP855_qM{@L_B)H3Sg zgTzZRA|E|6gh`6gPxcdk75-}Xyqf6+>Yawsqeoe!GTlSL%^`mDjb}(MxsfRMD6Maq4J*ukt7dAr{so|aI_JR(biCnac;D1Hv+xr?ASla+@HMSRUK=qCEukFb-QY}1vlGpeV zfu$Fl=N#8amR|GR>E2Z8**;UL|A4Hi^k0jf%%2cFu@g^rDq=j7pU64*Cct9bLmd;& zzKm|IU;A|H3MGlcu`Sjyd*iWPv-N+?<_6Wr-rlCi&h+@COEzi|sd&;-vqP|Sy1S6+ za2qB&&OiqaNMAL$sHUTQc2zld}|{RmB#=DgmE#5gCuh;z8J zIbD`u#zmT(;*KZ#pT(sB_Vbdq;-Zyvd&74a{Z3)MvHKIW3hh6i-O}sa;UiTuMckFkJKXf(_P!x8l0MiggjC{O0ehF zey8Z7*Xjd{)pC-IaOgVGGGsrBIg20Z1h%4zrZE+)Ysa`{=QVAC?P63?kVJ#PU+rlY z%1W8}LoQe>KI_wcUtPH<#;$WJNax4iCkTbB zraRONA_Pn)-*Z3d0L6IEeS;d1G`f~IkI9n!WFJxwsSN|pNTONhp8NVZ6L%SOUPTnA zyx~91@Qe4{k52I9^Z1i<#cm!oE6Y)Q<+VvRJ96xrBWrK08eMr!(s@KfXJv?~gdEX+ z<+VW2bwtRIs%yCoske^+*CM|QrAXHe=t}9rmDl=~SmIIs>>l5=KLe$KP?)Iv`db2u zwUQF|$Y=1L$~Rez9{FrdVjzPP;I`&7?HokaQaDc!u@RdGP|+Aj4VLbeek)<;5$6etxvL9Zy!b;y$p8heeOi2(PGTf7hO7zKoMvh+DpKlVFA*e80w09 z&*~qlbuYie<>9Ku61llOxG82Yd~_|$k0@G#N(Qkq7Jjj~@L zV?EcDY^ce;ny8H-^|(-+vFN5Gm0QlKntX1-0DY&OqWJ#eTigVil(rZ z|6hBxsiSv}PUpaGf7%x6?$6r;^y~*}Vct>bZJJXE8T&QcXAkrLzwKduvInm)8!(-k z*|(kA;$>NFv3WL)&i~$~0c>J?cyM%h5RN|gp8xar5P{hv+ertb&4CWGz;K9sQRmvu zj?T`%cRSlllfsYYZ@9Q0$XK?F2&~i1}x-UYgU^5R;_!RXrjU?6P zysE$e^qzveb}$)vAUInR1;)){Z(0)ur-5r>^bq4q-cyizg{h3lNfSVw(KpRxu!IA1 zdj;2;@+h@8Ik;KZLM2Eq?#z0COO$($FCmBXNk|vE6B82CGa+InOp+$@IY_5A85qym zNdmqa&)L}=_CccaJ-SFcPf9BLaVD?)jaJ752Y^NB1k_nThCl>jld5+}f(fC^a z4TJPeHvxh|D$+RW{#al-?h^-V`EuP8Z`5ZKC4)jRyd|b&WYryd7Ti9uFm91k zdfmurW9X*5E%QzGC0ep&jp4Xb-vf`QQg7%oafV(*A9L4FSfl5MyZBH3WN}Y@}I3(qL0(Kz~2gD%r(HYVDKCMr}Gnl}@Pf9!Z z#0G`A!Rk$F`4ZKvy!Q#Org}}uxUGYk-l7GxV9cF~$5>fjA9Zw|Q*pPF4N1XVlc{jJ za{s`<`VF-Y1chUM6F>QfQf5B1Zhfz6BGV6gf!LJmY0{7WjRHx^HS2cg21ZG7?QG(g z03umJ-nCC~{Rn12K6a#w6a_b><8cH|-~|C+0bVY&RIBM5m!oJJWgY{)GU!6TU@zTk zkCcZ!Np=HE`^xd9Zw-V5$yMV^PcQ~eM>k>aqzxZ1r8>J?#i>El#2X!dabDP$qoayt z3Tmta+fiyj&U(yw8}h4LEoNAZzPbhCa&6(P?HA4udhFZAg%-B)uWn)E{_E+zshe2+ z5oa&&0)<9s+yf)L|C|0PIf-p7taI?Qio@o_l*}^SBDk6GSs0ihwi#CP2W;5Q8Ee&O z!&Eas!Lb3F#9~rm-#H^tp$dNpdHU(Op=w(cXZGzluk0OY{Ly_|{A7D0bnBNy)Xs(U zJZQeN$b;rPZ=vHO#<@2%QL&SL#9~04_Xl&toP08G4_v4kedjIQ3d=fD$2<+>Z?qM- zN-Bqx<04em;>s#{zBgPWFoas!^e5-7ge=3W#v)k5g>dM&Fm1hD{c>E*GPA!2mSj#1 z`P+EV0HFAUc#%9MW)!d&k*>(~-SCZTvr%T3J7GQ=w;S3CGss-&1B&n|c#|QhxA){V z?CFIgz_ik;w^N$)!Zb^gF$a{NOyR#Hv=swDC^&Dc-jS?T@f!Q*-3hKaG^!o;!LN~? zpdDdQjuwBw)Us%?+8t2`ZX>;%YnP8JGl(xMf>p5wCyp=^U9ofan2nOt%nVn6U*wB{ zeGuHRiG}@;$vw}s21=5qTaHiP*#=bdL8!pujtNd%fRn!~llb(VXco@g3+OJ_WQ7R9 zg)8I`lgF3Fk1CxAeq$(0Kl+;@#4dk?I++pH1!_h-zP~!x593IP$axe-XIs351?^4e z8nOQ@&1;-fqKMs>uUjp9skt;ih^m#2XafoYJCBE9Rw22Z@Sp5@)>gSt-2c^2IjJlR zpGd>C9+&LmUXF_R7hHU!cdXb}w;_E0s3dv%=r-PfM6UbCC&+Y!wO_;w^z1U>Ps#QX z_Rgi_KPGXXt{r53_7mZ6shshJ^3VQ2Kuug<(q(+&o?KeNf`I)7Cu?cOmL5Fh_YPAD zCv3Q+G^T_Z!YXK%hyeaKOhTk~gLpi;I@jse zdGL;OoypdK{&xOqpqu*rziK(Leq9Kc#(N{}B*&grP?SS$HrZveTCx7Dd?Kk5>7OdQ z^n5K?#5oB1%hDt6=9_*$G&Ee zaU4>PGxTFvHlG$xOy#wT>yu>F`Hgetm(Fc<&&rwXPnibhl)*ZDm=)E>r~Y~VF*6By zeD~uV(e}?}3OA&N*dZhpEV*Nd{BSr%uS;?`^)c-kOc+_Mx=WX! zX$=Wns}%Eyhp9z1Yk?of-GLHSHz4yJwpx(PSq3TN5?7b6@X=d6WLIZiwdU!4WK3k=O@g8uobc#kF=&^nOOvpihiQ ziO;}V+`@-LbhIWmh-fE1V>$toM5Bw}?Po%m_b3>A+7md3W2+qRb)!BVbPvN>Z?{0P zGlC<+0^MSSQW`ECq-(BN!NLE+E${Wuj!4as0HP*Oh*m9VrZQEoF`@FHO$gTZv&+sKPP=%A!T#g-KR%RHY?ALM@TCsO;L%X<$(6E(vj}@Y%zY&u-^F7A7xDvX5K# zKI;MJKb8NZ95**Qgw4Dj#6i{I_S}@)dfc z(`90KTJrt~6?HJ4?>SH(vZ~g<@cfV}WSp;Bgoe7~@fpo3DK)1StFbust|5s+YwM1= zjo;M=GG&$phU}M{cqoyQCGKgi%bM{OEi0GET>-1c4~kZBX4!BZ#9aVoQbJp{K+y` zk=FWN;DeNpa?DDm-(WgEDX6F`WnkQOb8x!c^(p5%MZowX7SoW#{5Xv>4S_IpWd5MN zuSetY3K|ZQuly!!Y3 zX|$xzTz3~)-MNu&s|wRgh=1QI(;^S@ub4ity5Aa$O_!V6?>2t?|FZWjaBfxA`blS| z=S*AP0-{BsC=~5XJCDAtF!VtSeL-75D3nYlGZUIg(ww9-gMeO8{`lyS-2-D_z*Z?J z5VeAeiumNIfI{&KDqvfy7qa+j^mg41VgCN>m%9DT20X)P(=NEf{zvG`f z{_Z1e!j=E3aUX1ioKU$snXDP56>R5ig7AGNSb75Gd`^vD*Nf#jKY(jV>Pf1F2IW*P zjRAS7s`9&ZkT{_MgCI#|4kjDall5W{R<`VKnNTz(oerG zPCovSXUg#T$hW z7riptV0`Gey~0Js3c^*tja z->UbXDP@O`4xUV3g1Feal{Ot!RH#Zr_?K0^cOleP3kTky?~=KvOh;M{AkCMet2ZmNb1#kfoq%dg6tVwyiR0mEb zCBH6v4yG?IX$TV)WnqzsXW^@YGeAWX7B0zYZ^io_aCEfyRlM)Vm@kgSQeix=63nPa zQ$_(1+V?#Gq2QHY=*dM8?pw=8Bucml~q>sjl>M8Xx9h2nn?NEZ_iNLdZVw` zNMCUUrL}8>HJST3QrL3I~^QAP_A1 z^aoerc+k->D6UN%UeuyNHZA=*F^AXy%>djq#NhEEZ2mu9!4m}(2ID1`cEz{Yq{(3V zS=e8ypf*b3S7p9EDd$(4(_y1>aD)xJ`A%-2B|$1S5_F6+`T$F zta+Rs>%^s~8|z`OSmP5YGfje~!aq=lqCzz%4phsInm<#<3~v= zaM`bAhd+5Q`D#=;LiQ;F)GAJaRq&YuG7-)2RdVxlQqcBgjHd=Bi=rm^bn->zf@qJe zI7{1ACvldGY}<9GMxsKoz+vBZ<`vlFI!#{QeH-%P+ zHXALIt!L*QJLi{dwLo98rCNPka>zkK5~iVAKPQTck^0vbd%k$_;JsQo|EhD@pbPpR zi{=+$dz{C6VCdrWeiR)kjyZEg3|^_`J*R_yW3Q;d7kf6H@}XXb&&J#1$-q^J@UU`w z;kfZ!iy=X;bAoGVx2~E}36qgJny9vt8;=rPPX!D6@F&vXpbjB1i`d{bkbz8Fn5rTP zh#M~3<@brL_B(x3KQepJ(RBc>~>zjBElMOeldI+qOs^ge2Mq!Zwe-cKJs4=QK zZX;!=$f<)Tn;{TqSlXC_1e;Znf}fmz3B^1Z{@O9TnA+sIM=XDl`%=A?A9@=YbL3sZ z$grNVCLCR(mP6P39J4!wI!*fPFsjZz^cLA2yetrAeXF@0{ux3opXdc{nuRYut+ugt zhItWxCZB2rDq-Rn8<_9GkAKeR>$=xhvGA>)-pZ%&>#h$GIu%t2^yAB6vnrf81&}+f zu2x#r@xfWucjZ(J)zu9F(mYDeD5Lb!Ewr6|6))Xt8GjXTd<5taFMW~F`=pSNL#xC@ zv~<6;K}8zW@J2dm9C}7LQuqpDukb-6Xo+oW$6%F1j^M?NLXC?Nq4yY+mgvKKv;)%k z2n^09dj~G|*BZ{~2BHh!;|#itMzwLLADAx&AVRprVmC9?G+#05<5UYvWntVG4`rHD zW91(jD&{Ks!)Rm3YgY9`C?6tFA_P8V5i&%A``?()!h>M~L5EV|swoc2#1?w%yko!u zb%W2DV?@Gn>WQ`oHE_ESO~sdo=3rDn+>RczL50bTkm3WfP+>lZvbSQ(4jC>(%Hj6O7E}5vwrrnBULm1O zKphHJok|nv!Cg|exC+P@rv2eDX!459ojmI!cVPR(`cvh2QN&3i5j#zS;?%06&cm~? z+cbin0&A@5sPl8AhF`XLD5@}=zlzHux>1A|?8r35Y3TtJ93#J-B!YZ*so$+YBOO)o zU0SVNEctz0TlemJpCYy+N4QA-ra zAY^IE8P?D0KcM_^ z5I5f1EwPcs@Ie6~PEx_&^O0^rv~XsSct?l@TmdAUWatX`9Ef;sA49~g#Ia))fBFXn zDoIiDBocajDL!d7Ct?Al^bCT~eeE6*)wRH(=ya-z!6d8LUX89^mRU zgU2`g7V8sOs2iTaiUb@g!VFNc&;W6B3dV!(LDXNbgc+KE5B_XOiJ zB~TG;9G;qSjU<&n&jW2w9VfPsG7%Mjc$m%?JQ=JC@mc=s)XMyahd`ewBId2GsJ3d0 zhR0zGkV^@OEFdprC9Qy#4Vr>(5kaoLgJ9S)RHp*|qMuPnF{YPYd!2zGB~`8h2#^Vt z%TaB(wx-nJwP|Et&@D@tjbU7r*QPOulE;q`KH=ji4EoSwJiQTtKOU!|w_2{b5 z?(Jlo(}@vDz`n|Pr(4Pn=Tbe0KN^R9^nKBlmLj2MBYYKC3c?&hs3*#i3uea>6Q1BU)p?2y5|VumbTh#dI{{x#r??0uJ8(UPd?691zns`@_M znsj@bQ|sz87=o5*n3Ab)m{nJoq2ptHr?V^3Y2a%V&#J4ZtCqe*l~?#4AD-4Q#hfx@ z)|4rx5CQ2!ts9&V^}Xsn%1ku$^a!k+4V&NDOfZW?bRZ~;)EZopwE(kT7 z_0#$CXU?1s3?n4}8|??fu;5XmllhZ_MRiPwj>>aM5T4ION%##U-%Vhh1^ z+V*O1#W((qtG}<}8}HJu3nS+n?{Jk3_m5S+aR=07CeLn`RwFM9$L$WU1J9&lD)6Wc z$v$z*m#)V-s2ei)BtqjsLmb4>+YEp9@2LR7H}Q;K*+|Lmln613FTDQ{J|5_RqORvhwvvPZCccRjR{eia2Z5MKB( zu+#`$_>l2%nn(-E2!OK+7?hO_EuxOqryi2&sw_zYyU*&D5Vv(Z%ClH~q z1a+jV(u_l#ipNhxA#7ZYR!0RrjH0!Dl_#G;59B>T z6Af;bSDxHNKT6*sFjIu=$Ti}4?hXe_K*ZQ`kg=@>br{qVy3xuZ_t2rP=&vXmMp}gr z5nsuBmH>Y912Vff_H#zwBh)d<>znL0MdWIo%*|NQfE5>#>!d(9x1(5$W3|ggS!<%( z5BvDgSFw+M6&K&j+nllOy%iUKN2(kOQ;?F0iW@GoBN;b^0J((wQx_8ut+P;td=UAI zfZwdV=n^bR1%;%AN-p}p9$p4VNI;2ESA6Alx7e;NNgAuX2w_O>)GE~y!Z>@?WWyb6 z=mOBtTk*Hwph?-jEKrbC@wcZ)wNibiHQ1L7YVKget5^uX>u*0=jDfg`nzMkQ)o6sF zG!*bMmQ%Ic)&!t{bTuq{+A$Or@JCzxdKiXHJe>@zGQb|xyFrHQDFvZLmb;*$=P)rYnF!V8W0>XT-TF3;!cHa5n zRRT4f1DLUjQ(naRh{CWZ&(g>=n|KU7MSTt;I%MI?Jrde^_90R`LyIl%!@r^~boMEt zFaoN)qqkxlcNJSI@_>>~thGVP(Ze~(FA6G$dhv6dHs3;^TiSX5H0ul)^<^&^TH!Mx4+5`g`i?rn)RV zuGMz0sH-QW!bMT`ZtCZ-pMV^0AR2mH%@z^eAycEbVnZ9<6@3*O$We#cOr|qOZ~$^S z!r-(;5}6uR+lE2Ii^WI@p^r&kAQJeJFp4tt5J=o_uUkUCQmoaEmgD)5UzB#@kLen& zQPx&0Ax1tDH1N4pw$4MI*bImZf!rbiluF?2@bk^rCg(a*=z%s3p(Dg~HofncrWG=- z7eI`QV`v?2J$;E>xhoi4@fzuA;U44WhF1hMeAqb%PLR%OhC=}(&|wqOiGOVe(nq^`p&vW0+^&Kzm>$668YBSRI3boE@P+grKpJ4z(E1cp!~58*K+fQ`5pICrp_&?8{tayA?t#`YLYy&uO*jDr_(>!gpNhGKL%)ekZdWthO^{ ztYXs!J|Sb;RIuw0qZYx>5G$oVXYgy&7cI{M`#@5GU%_*Dj9W;T+)}y%RM27P@Q-Z41!&~=x68zc(L3tZLuty_tB0UH5p&i+3tV@Q%o`2(#6DQCWT9@p z46+V{4qU<1U5|?uU!t3Y+cZjnpbi$#;e*!^iR5<+tba){UlGs}-Z;ZDp+{fHEg)q4 zwqgs&ZF7o^I!#bqVC@@o5hSOOW&qc@^LMFnpK4;0;CL!TW8Y~4%u8Fv&Zr*;1bJ`e z?pxqPRqpN+?p}gs27KeHl{`1#6hAm*G`Sgq#WT7%$Or(?4Nc6&6)kiXPO!MCVL?Do z;z`6J`FjpY?5)_bgba}#OS!d9nu#(!AnC8A`*_NF*Ma1a}a-1_AJ`6Bxc?1&m_~>^p_23D9`r zM(DZoh<6_5g1Dneq~*W}9wNYa1la(LeXR-9(0wm@Ux=6F2V;kDtBoa-BSvxCZf-@f ziVb6gw_y)PvP}FIq^8LH-Y~|2HmQ~lQ@@4GAj0<~l?>wLPw`R53Ds|+{cxga=)&=4#0z1!99tg1~%*rx^0;7M<>VCpOxEe*-;#V#fB~|ABaDu0D$XaRlOvf>mFIk)ocUTizh$HXnDEI$FlCh z-y(KGkPUdK_F(=2mE@>nN?P4{Qe|La3F?DLH#Ng{q8KrBB>f&h4K3Ydm=i-OsF6A5 zE_$^kT9hXBRW7-kIK)dOJe)bU}wzuL-ALh9|Vht{WFMUYn*67v=05ADV zAL6UVxtt=u1Z{yuwuge|TKYCPNEUA<09XO4TIJK;NJ&c0K?%#0G1spsS>fdu6zarq zKjDjEzoIqVsid0@>00S$3J758v*zh>hzOt=)+=ZUr=DCIBlgpz0(vasrZpTW8&|yY z=YTlaTXEAVMI@P3+;lRWWZ1sS!k5guNLJK`uzxE;&jh=VWKy$;OCNOVh&jP8o_+aa2O`l+=6Ik?!OV1ftn zgo7i#Cc_!$kER_EADISE0OzTGa9_%(WC$N0B4$~Jy4uk<$a@0e?(wq*7E-h=3L`@F z!}9aWEk9WNM?LBj*PxpYa#|3N#8P>+wS%5BQZ_w(6=$r+dc+@6U=kpQaN2TcI?u3a z$`q!FES@2wY12`U`UOqmMxpHys@P1#gOf48fh$VHixmInbB94VPa&#XqXx*PCFj7f zYvK4VB4Q>}_oVr#B148Qt!vkDy97Ono9A5QHD@BaWeHE!n5~`&!>5_!q zAj~Crf@l*;#jRhV8;mHTtB`y*S`F&noIg<6T3h4?`YKy%_-|MjWWb~uJDEr*ib#d9 z3FyhVc8&+Y8lDdx%4d^Orf?OEU1W4@W7maT3b`?$6L7_mqJfe|aL%MbrKZqd7`%ee z7AZdx3u(G3(r4E0u#XxaoyznXR~LN%Qe|OW&xiDB~wnj~^%AfDhzU zI(3jp&N%!GS}>vY`5XuSO$Vqt)a@5|s=?%sk#tJCk*HL65^igU>1fFpzkt>RfFe+A zzneI-iY-!IHN-*LxgxH3;!c=f@7BH}ld=ZlOFtw8MD6$r9JqEWx8ifR_)&xL%%zy@ z0rC!otrVA%1*(hL$@IrgQsv!?so1E;C8@(X#fS{BHy%_M5%N~#rF5*Lc+#3WwJa&= zNH~bzW_fM#OOUi6EtHO!TB9h7;b)6n8vZk<$OebiKA`sNtvvtskA8;ME zTFF^TBGeX!!Ud`fs9Cf8++}B;+q7g7k+$Z%`RA@!v~1}l6Dr5Du8A*Ivs3tYRyBJZ z{VJpqUw6yxgX}&YEYMb7B!xK4SmwF1jEW!Y4hKP%bAQXzZJT-Q^ z7)prd{N9Rh;mlC{M`Wkf_efCb-b}zGApGMwrFVKw&_i@FB7MXEARw8Y0Lk zUNy}lXLRPt5dz0xA0xU+75jLPdTXlvC4Q-z)FciF!jqBSit4W-R~P9v!ek!bdCSYn zW2hmPu!`Qqb`T1(SVi@1BKC%NaP06YNiZRKWN;d&Zt&%%j&-c!tj}%7LZB+8Zv<6j z?V{uWW`U$SxEdzQlA|dSz#>;b(*2`l(A{8iDy#znAcx9{v2^NdCh_D~1ZgSEK-xv)9TB~zH>(X(NHHln zJ`U2lWTel?;c{SI^2b=G;#`EqyQ5U+9OWZx=(mHI{3OC6R4{?9!OIRl*Mkf<+8O;< zlgX~6s#pP0!u2=_24(qy$jbCz)zSeanjIGy>`%J2oC;791e=c5fpaUC;;@n?v$ds6q)9o$RmtS3mM?ooHy}uRbmdbfC~VG$ipCnHd;! zkSNQ-fHD(Ugz`s#GBWD*C&aymdDT$77<^p$)m3!=u~Dx-DU~#>osUg~iId@ZC;CSY z{XvpwHF5J85&aWS1JH%b&yD~sP(LZ$5aN%xyGg;)C?so_i?fgtXeLZ8#Y-ovgh`-? z6_4f$oN9u|3|~)CY^YGor@~Jn{MorzznkJ^YSJlyD3c*Fh+h>mxzrCkoT@=ki&K!m zHPZs=u_&ffL=Xb`KkrofP(KJ|pbUf~!Vujy6s5Rb_n7r^F%C8i)lwWxAx))X8_pvF zrG*nky4SwXES4Z{B~l3p4bMVofK|@wqz9pW5Lkh;IxW?z)GoCV;!DWUsZ&Owxmlf3 zdhtC8aE#A{`l*J>N}qBUr-NGS%pFC9B0r*_LO4$O zfHy0DWl!B2Q4F(wa2DXp@3@O$ItTZ~*WPuSj!nE^kixBqx(MhvZYP{aBeL z6kHc#MnPZY`|HRUXzHk0g~C?DT!rh3BH>{Oh8#zk#MPgoxghvE7*ljU+M%NCfc!WuVH6dTDGo%n<{nA)h!0QA%hYu7c5_Qu&EvX=u*TV!hXphFdhU-kVs-u=nqMSYscYV=tSYyA*9UL zcmHMFL+q`nCt%hvs)+0VC`?Xrax;NQ9BU!SY>}=-_K^Pw?1K9)ToE@zLG&w9&I_!f zXSAW4g-mg3xq%wR6nW%AcC;sx@mZ5O>;-R<7nO{-QeTz2jXlYcAOmE3-6Z&hF$p=+r|ABOj!sRIB|;8s=O={VvH zCRmId)Nj6N(+#9-iVD!eF}@IInJ*aI2FIIJ2wt$gvwF5r@%RSz{;|*g`LG^#%1`dz zK0gt>d{yZ3wc9C1k@NLM)C+Y->luNT6wLZy z3QxeU!0c^WiR2GH4Ag@9{O_I1S43Z3mOyB9;totr$5&9P-QF5lTZ>G3O>-DU39X?> zOKnRi{{c(+U_oSX?r1$9^$+1d2W?6;99&yV^$`3$9*Cp?(AROJM+l>}WjD^ffB63S?Ttu038Oq_%`(*MpOvKcuQksE*pH96x*pdTs; zOf}*;3^5)p?YZ+1c@mv>kcddq^7#>=)1*!o?WD?V1M)}#2jP@K$n9lUR&5r$j6&0| zpn?+Tvzu3^@adoUZL7PFI#l>W=`SrmMExAEJf|uqxxDQ-Q^&`0BuZZP%fn<2RGzT; z3{kj@ZX~dTxHdP?fuBdwSqmoW=Cr)cg%yF8IgqzF(9BtdrP3(Z6TSlQQ=BCHup9@C z-#x81)Kw#YjW3x)YH!o`zOkNyQ)IqK2B(xNaB8~#ZXTB2mJm`K1H znTb?mR71%&917Y35|qGY2t;9WQf*r#6{<~PToI&x`>70%lv+`)i;4y5OB16!E{tvC zL+Pmi3tfN2XHZ2>11A*sCMvcJS(k^kH>cWQMQ{Tw0h1S7sQ6B_I1ks(dGqIP=VOF- zp2zQ`9BH&>#OX%Vl)p_~B`3C(#1 zSym|A$}EvEy#|ho`dz-eP(1XvdB49R6_o^&(a&4wcH*;T^xyr_ioY?JgsBEyz{^iE z7e#}4PhYik(FJ{#Cmw?^7^^&SIxOZBr`d$r>{IcpRV$i!4XFa3OL0P}Q;Q_^&!H~B zml*`p5rH_LI1L4e=mkd96mfkbP~4s*DHlv$#)UZw{&&R1ZOl`W=Hevmq}*NK-V{MB zPYqxxv_70VFoO#pp>a^Wj$d;SD|roIfDlq>JxkJJaqhG{w8}OM-@h+ zf5p)&n{RA-1SRMwbOtgCxd%U@AS|~(3}lvIqi@v1Z9S~=h}Tg(b>oj`ay*fN=}aG!`;`u+i`C;~vi~Ny)D|DJB~UmRNJR|YVE(bMl`(jv}P=`X|m+}ktDwBO&KZB!~BBWk$=kJ^x3~rWJT0Nb|LJQ$~eqzL;;@Uxt8wrdQpa!|PMH z-d?_F9`ikmNUUdsYOun$r+>%vF{887r`bCE6l9i;UWsxta-xw9F&E8CH~e)3a*}DG zyKT-O^M*8Rw3YdrP%M2=tT+z_pO9dB;)k}LP|Q@98%ir^crhU7k@sQ#w?9`x9A?!Y zotwXMvUDU+A{PAoKT2r9d#V8j`}eH+uMy}s+_x;Gjr$C^6q#4P`)%64zp{Oh5J2!W)P@KWe3@W+a}oi+8;^3}iFyk2hzh ztMsVzs5zG@w+3pvX7eyCvN(^|Txjzcp&Vgv)Bw{H<;>|zCzjA!i_tJtpEHf^bVOu` z8TFBtaO=Ui)4z^xjWSFnf4Q3F8x$IqUa~Zq(Zpk zg0iO!DTrU*Q-Z8u+P@;aIzm(hH5mpVF+|cFElacR<^?fG@A<#+QVFhps5iFQ^O*kP zm!0MewmS(-mLP346|s}D0;(MI-7y@VT(MOT_2*1`_U3HkjGi7@#=X(^`u4w2%PGH& z5TKD*5J}un0JDU;N-y?Os>;nzrd?H)o!W>x@2mf{!D0rEiMu$OE@w31)7{2vFKh!Z zz2N*ZJXTEWI+EGq>^Nnw-C=KUtKmBNy=aR-=d|lnz)xWm7VeGZjzf{YsJ$%Jz=jFg zX%s=^Ti=A6fWV*lttiosP<%mcYG4D8dcux)>d6B@DXXryPLw*^E0cwf#CmHW2lHQ9 zO11h!rM#H_P1O9)M3HMj@~xYi`QPd~0J||%WDWEjR{fEBx{swiKBmwxlJy9QGT%E( zJw)q3ym0?J(w zGyulpy^^lotIz1!bjUj&5t=J|2Dh5mwxKgW$_pk%SP1m}>e(`&Zy@@M{X5g&F-4^^ zKdj&aJWk045=wL`ECGlIrU*v(;Ms0A%GX_j{9x7fjoFz~mC&96D0oDLhyto=<9+eg zWrRKb=gg9%VG^2k8kL5S-N`6&ez2zmS6fV?%I$Ne|9v5^?BxeQGCj#lA4DUI41NPe zXj~Wbf9<(4+6$&XXJ%(mCAc6i5rY=*Gzk6^RJel&Fjj@XU}c5UUFBG-$+WvhleZvm z+A~rZzJ2sc0?9zj9Y8YJs4>@+(IyVpfnwDk`*?P`B|8*qBlNbSxv&>L;~}Q9>cdYH zX%eXxIQ0edMZP!6p)_i5rHJV#UrLPF^nv4E5?W;U>bXwCX|5yONO-Y;sbue7kwBlX z@1J*jNFw%@f$DoquW1!67hIxLl-4OyF#0p1kA(R@SdP47`Z*zoU#w^>bl0SSP>q-k zk55_m4T3i1)HKPeNBt-}twCKhid@{I&RtbIy4ed>9Mhj(lx?(}Ly$}f$xy2>l`In* znPZWcVgAJd4=4eqUp3xA_S^ukji9_U?n7!D5(z2h`_ncLP^(l{u~()a*+blr2G(4F z2vWwW255m)K_Ck%xVc3)0;;gadw?rYZoiWWY_7rQ&Z{{WM$xh*E*bDYQjQ_^VtcJV zXZqVGWv5yp_+U%^ktYk0Cu5nv!^>^COy9JQSfRup_>72+!Qu&Dj`^}U06b!{A}-Oz zNId2N*FKn}>AwD74M)=!!aR37!Xp?w5N(t35rQ@Zswa=`Ny`m$C6H1_4+N%HIsuF^ zVSvw{Mc>4yeH%9VM_<0n1Ls;vc&WWI?X3Hq1|zlzurVZ5$=Rf4#e{D@Lp>vVp3tyz zUK#8N8czr)rQSM006vtlWge|#{=-I6VqhS_V|vqx*+v2t5}t$2t(?s6aVV@BG07Cg zGp3!rnoRIq-t-ftIH#Q3yP1AXf}C-A^AKPt&Q0+WUFQE;DZ;HV{dM3|SS2e?GRStM zy9k2;XoPeuk!~xefU6SAVy{fQ=>|twY3|adCG(B+NyAZETWpEt@;TF1%_0aUWrYba z4m$ZxJPr(Z>u5Zol1t=x5s0pVZ7a-c1kf5%9K>0;II`Brwim3_`<&B92l0p?5}Nl2#ZG6b&Y zUD=tInwyIm$~1(4&Icy`V2n9*Lzy^Villvg!_du-&^Too{-PuADWnvM+AV-r1%`?S_ z8#YRRWyoYzSf>9^guA4q5VZ71OJiIah(W zen(gxV#?9x#$lN6vCo%)7`er&*n6h^b3Vmgl(?H6!Qm$qrJzy{$lT$Zu+uQDJ;m1DozY1(jveS7G(Zy zr5xBTMq{zhS#_0Z(>@QgWT|i-qxlGGgwz84Ck>a)5H1cuMN%oF@7dw7WZX0WIT)4= z1+lp$kh^x0#?E$3*~DP;wit+^LE3nmNJVRsDDOyj?F$Jgyzik9q7WIdZ7n%!mb{?v z=J$`3kTy?#B0_PZ4AKdZt0Z{h^ux$m$*rU&m&GcQO`lc@Q{##;gK6uo zvVAegKs*wF!A}6=Bz&0Z8fwMF;YghMt4ayyu^2tYK4<#$i;y+p;fm=>OXiVF7qI%2IDZ&L_|xM#eGa zgl<+`N*8`RTW`6AKurkql6wyI@4xrwCA2-oNH|cRGyUZ&vW?28#OP+QiZoUcF35(<4Vd2f&oX8K)Bo^2N8pt2HCKlqGser;(U}yZc?a`KaYXW9 zMOytG)7N99vNBLwQXO$4l;pB4`i!QhVi-&3H#231fjyKJwmVThCv%9YD=6T#RDX6E@gx`h4=x*M}3aC`Y`Z%TRR5 zB*FxvfNNq@Ia-3nn9KA=ScvMnn4d_*IAoJ`NihG5Lopw$*w2^x=dAjOyRuWM0G}Tg zVoyIY(Jy*YZ!!JHox}nW>7y6yg9>5VnSKX` zaPE(*2s=eJ+hZLeQ-SY=aY}ughQfeg+EXV1+l)ZG`2Kf=f}qA}HS_9c!!6eM*OSvqM>4znXEqyz+ zGt#qT{?CFSQfCemDNf7In8`uTsfw95ckW)j0N&5ZYs9;3 zD-afQF_)Y=hWWngCB`uA8DK8WMA7k=juG^8@(0#8X>BMjceO7={mQhN6NC=sJ4|RH zWG+!XhtVD7m6*6Of>f-RS)U03-XGV8k-oU3RH$}6=1^F$FGPcF47@rL+hz7vN?7#? z-*R!1Dj|7IWO{r#!tL!XCx+^KOj|mdB1p0Y+(zR`e~c=eM+&^~zOs{P(eVY@NXm+j ze~NR|qqQ8}tqu0km-lBq@xGEX*zYs#H>+-`lGZ4%74N62=w zhqJ*(G%>U(Ym+|Rh`fnm4$Y)*30>aC^=LB@b{68IC#gxDtcfc|ZiLMYmGGLsD{JVor})kj4*-IGdnrf86j6hHW%};` z=U2dgaGL^ro|5nTfA*jNC|)t`&$kcCBjLfD0k&S^Llu3bGRi zb1#4uk&z%37UFYpMG00wPhPy*gC~UP*B?W}IrHKzTwgj|#b_oK0l)$CJy#ALv`X3s zdS&|9>jqE^$S(mYDxL|FYS`pOEeZGe`2mmwd>_?3|63+_W%AtKC?t8eylazMd*YzPz20>Gj)6)%u5pwX7w=r@yV#EwTx_H71gaJ z)13$FN(PTK$h14Rf{j)flh~N(K-um=Htq>vqnnKjB7r2uHP8S-2s}{k2dkYN_?PZ# zrbsLvr^GSc1-50#{6~(YyMXC)|KT*0Fr}eg!e1yLCsa{@P3@ud8D3}}Vp?)*mV;pM z2mugrf}s{%an8mF0yRlRNwE{+iEGX*^Y1>Vgs((aef(I_4i~(8QSR zltI&yR?b~+CKG|EA?vZ3zbCpMC}a9hCknL10avtYo_j?fyL`W_C_0q@2vw9Qmq%9r z7;%c4VN7(xq~BYL;W9uUAMYTfH4$3p>=dvl!6d9Whkf$jQc7MOpb;BHQN1{eqMF{_ z2;jT%ANxTD25TG-_unz?k?#tuJ#l(gP`t*aSn(KIg!b|NxpxT zqQX|9%kIr_d2dF#nj5YzQ*_W2e~A>h|vD+G~h|J-Dp|wzJq7-qX*S{`U<f)Q0P^0}Wr^t=*0ZcID;pvKaM){hU=-%o9F8f#cW`9S;~rG?p*Z%)k8hVPqH6ufDX9@ES?L zxd%<9IE?goFX?>uW}Z?)@vjQ(#%azvIa1&r zIq%V7731r!w#B#=CD&MtJM$6~2^U1(tg%O(%9+#KSJYkLnSK|PuClStjKrD)5emL>quYSpjmXmc5uKaXJHKPk(L7Vc zB>9vX;ZUWoDreXgw>S*;J=3;EC{pFP(H1&xw1t=_G@I@-qdf-A*hzYkCic-VNap|J z@g;C450+B(cdYu5XE9$$T5A0exQ_YX@s}lmwfBpnF^U!}R5M~p8Bn2RdaM^AHq`F! z>nqddEX&rbNrM*i_!&s15;QlGCcB+Ge}&7Wr82yE^UqjyCiAymI}B38^h}dIch{N> zTws;W0fS=hMFebI%06OJXina{jx81`jP*Iw#>&$NeT!1$M# zzmF|MA3AP=+fxTw+cQ*K2i%k?*_jFsTW}c4o0okv|E>dB!7)@M9jNE9>h~=|vxdsN zS-e}uD@tJkKihdwP%S}a)nn?jGYN2lTMBfPXOo%GEbu7X5-2Li;l5zo2;v#jKffV6 z(=rb&o&ZD`25>Tg>4vZYn1A|fBZw*L_%c0wS0RBBs>!$MK+d;PYbuvljJRlZt0sQh z!cwqM-qVueBM#tMc{wwtc8paY`hM3v#~GrOweR{HM&KD!+;P7$?PtphoxPO7_0hqL z&CxxV$GZX-9Yr#83=}V*0xn>ZB5U3#mM^vk&*`S~JvbWCDp$CK7`S5yShIOe&sUUdko+5^O$VCs-0RGgHhT^RKgYw z1cT_3GBLbJjY`cV&73)@W;iMUG)7ff)5D!6YW4K*(cICV4V&MwhGFIWL`&ER#%MrN z!tBn(QVEm((*S2p44&k9zQ16=+mOTRU>a8d%saZ0VHjUZ%AN_28)WpR24%7@&C^Am+NWW|umIms^KkeJF(Leg~ zUBk$YvfLj9W#3vj`+UlavFHOe!D)cppP-`d= ziUt8B5{2L*A&8hs26sl1WD5SixI2R=0HX_?z{UKd1G@|iW(qO?EhC|RXsCn|Fd1tc zp#N$o_+@5qgM;<9f+yBvvN7@8clY0v^f>P_?fI+&H8|(lMko>rCh@Q~yRZ1;FRF)> zL70JQ@td=a7FwH&xTM(Dzk~HDTIL0LqeCDL0KOxX7-|wI9iR#$^t#CDf80`>7!$eyDVc z`#A_W%_3>s^ntbK3)*(CUWBT(@o$TF*)Tyvxmz`&p(OcCCdzwr0(3cpU;S^CVtSob zpL|xf!NL+4h`fOZyE6YLj03RIO#ebn&bs+{qoUEl(jGVKmcoJF^YOGcy!#?C+bIAm zgu>yL5u0A*P4tUT0?pjQwqL|^oEXQ-XIw_;{52Dt0TAs7+|6PJhcE+LNh--kjolyF zWL7<=E!$whCy8|>C~%^3uf881L`NMM9hGVSvo%YT-}%*&&qf)(kmX@B%CS&*!1Jw# zpQXIdrtz1(N8LhaJ8vN|&@~antm2i2r}G%>&0}zcW$$#sraH z5XTWJDAe7L4tfBkl0zN|-`_+I^n9kjc2Tx|hPuqxLK#7r(3)LPBl)L!Q6sr|#PoJ( zC~Fqm*X?J?^$sD+o`Il%;ipQqE_y(_y_heCWka>t*pg9EPUlWVmpAcHbkv z@SyCw_kC~QGwtoGvh`NkQ=S9JlKp;XlVgVKeT3QmQzMqbGYxkL26BY^3=OJCRz(lyv^81BDg`loNA;yrbZ=CUY)Q;LYzrjgh! zIMB|ZBkrzjolAc}KM?v7skKm7D3}6lA|`~z2`8RcI)*yXkCU$5AG3el>t))d69rNT z4-Q3QtzzbjBU^>lc9Z!VO1G9X46B>+V(*!jS>+f}yEw-83H+F3Lb(YXFy{M(m#`#? zvBLd1)83pws4EH<{))lD!vE;YPFVQ5`o@jE=YDfqQ%6lI8IBme6?e2wY^-fOW5qnP zNliex=R_3#n5*#bz*-9#rxu2f$KKFggT0}$smyC9-~83tPNO|W~06J~a(cXOcUG5w`$gxfE-x&W8N0JZ|g>Z$K7!F?Zy;$r{K z^b4OB#w~FIXTD7u9+G@>eK>#!KXAYzqsx$Nrr-KA!ihxl1}6_@N=%tnD5hTv+XbCN z%=h2Vl_7D(_H<7_XZmrb-C)H1n^;`ppOB((&RYGQ7lG4Qb@eh~(vg%r7J>H~h$P{z zBbs$^oVEi~K#tRHkmt$CsaizyTWgF!M;y1yDBV}W=ZRI%ydNF<3S7#u-5lZ$gp6xT zC3s^URpq76Ikp6eL090@oQO>y*tCvox819kAa_}}oWIE~f%HO^)A<$tx4*F*75JX& zvVHw~riXqCU}S*?wImSdp+z}QS&nuw(kuQ_f&#Ixlo$Ix(>{9_RnUto)Mg1!R+>h4 zG?-~m#G>KLN!t8>D90cV;7~bjcR(@Mk@I1CQ6=(jd4_4t9ufk{gcfMtNEs!T-p7dJNslDkHE4LH1 zx9erv9q)>cBsz&5!pJE&Jc0RN_`8Qp9aeq#R#D_BRS=1c4a_vc470B;m>Wf6%ITmNGE+>u5yg_l#eqr&6QM{f z(Be8G$Z1oFnbjG|<;Ct3^S_~$z#YV@Km7CTG-~FQm!^vdDg>q8YT+y9l91L)vG#Fa z1zvrhX){nm=@5KTAy6C)EIs!?mZmW+HNnOVTf%E6CZF51gto{T*-l(g0#c@UI?yZA zw;Yw7swNP0^jDPep>1VE*Fba^`*)_D*F*der}MFnwKai`mKrEw=6|IWv`4XZ57+0I z5%6;!Jr)s+4pFyAbw{E(J;Fh#C9LwhKN|rOG|*14>bg(bBa@b(MU`qzc{7xwbsw_= zP?v(j_%?KE00S&Ef}H99ZV-jO+)cqxVPp7D9TI3WW&;loI4NigVZOgl z^w7=#SaN5!p)_ z#y>xvWW4xhC&L|~7~(EoETu&JWo5r79OZrKm0sHKfo>J`@0jE1k_&aa2$e5z#nQ=b z9y$w(_F}IHQ}*}qu|ycnAY^==fW0`Ezjqw zh1^S_CDoB>hP{wr{_gL2fPSXmy{^CA4s|61Nwiwc@{-r1HrxG*t~0J1idl-SMz|$C z>CYb6b~ojNeGmA7ExE@d*G+B8H6^fl95o}PEuN1{{otZ>D+`@dn9ZBUAOdpMM2vyUZ&y#Q)#`odMYcW|!e;PBA?ACCmR;bx6`52&ymBriGBM4SO(;j$B_V41x$ZzSG7)wTRc zZ5i{mqXaZxK7T~YAp_%m)<`&5N_x~Q(<6w5SvV_BwX-0?!~Bt0w2hZf_}AW81~Pzk3;UwiwHkAL{L8b zoma}3H%$L8Smil#oqL0HWH7-Y%zXEaq`(H#c0KIkO78YYTaEP%%=gqqWxVx!dQ6yJ zaZLYAiJ|l6$PsxvX!Br(<(wjyyu<=XmN5UVUN$cao_q9Z-o3vHTA3*0>b%@74-ibhD=8E+#S@MwS^ zFr<6E>|`+g5$;qtE=RYC0Kp*qFjSLxIbOr64?}!6$5zVqIHEBz)XdXYhWm=)V^{mX zOPTMQp37p9a46~REVIZW_bVVO7&S5)2So#5zYOU>^b)Xx%>QmVHuUEmhU&UIT`Iz@ zD-($@ipAeE5{l25z5vB$7UpCjGuudE>wCABu`l5kfnx8O{^;5PnSoUMl2Sx_D@N4b ze$KQ{UFTwk`zlREJCHS`8KGqzz!L#E3;4ZIXn~J|r{Y59`^IVyodl-6h_GAE@mHHH zGY`>NrZXI!IhFa(_EPl(>J3p9kwbXyEg;)7DQ$PIms|&?UjtVmhj6vyA}15$vK|R! zx|x5vmm><8_=5;S4kvO&Al{a2N2zUlTK8gU71L(j-aq*S;xsbKg4}l`<7GnqBrfHM z7v}rUNH7xf+4Eoh8;zVjMi^abBQS|&LEq;a)A2-DO#DqEN73!&!YZcUg>+4S$~6&- z6BuE-+DrCS{z;kbwy#`w3{A^nKGVw=Z9Y>T8sOqhHAlh-RUYSsN_IE(?)OYT8WW{`+G_$XIV#BEKq!!Z7!K z5A>dC@1T&ZpBptHa^1|o%uC*>n=P2B)4#V$Y=FPEek2?V#T=%8eW2q3rp$SL!VT*# z%J`}=e}w+OD%fE}Wi|@>rW_*@a3WOS>N`MJh*vK>^;-2i1dFK zccu^XLYYl51`PIdrZwGFM2KWiT_P1k5nO)uM;;I*Rz0S(UmwPZwW3+~?U7W`tfYli zfAr`9dBbZCIMB0iYnK-ULfcWFZRp1gF}U9nZG+LevYcBS)Gil$W%{*ff#}D(H&SS_ z^dIF#%z|P(QJ*t?9=w_y-sGmDjBfNMCnIRwzQF@$LXlnUm1#eNubY#G&W#n)e2sK; zWSSnEQJ9ejk2II{4J1>+c6_bvEK4*G0jE??TL||egVH$xuaK|v zE2Y+FLJ1VxpED8)Z?<|kUQ_tU)?z(t$MUD?Lz91E>q1(|4%8Ay^|u+4*~UugrTe|`g);c^?D<{r9D zF{|EdNPq(2&q=pi`70l)OdUkE!GnF}4rN1s3`vRWFg?o)MzCTF)7Czodkebdz)nd# zSk9FpO#l1(TtbykOr@$6|61zBDGq9%_x2S{*Dq!3tSR7*IExXA@X#R~;sh|xm~ZPd zUcM)^9X;9lLUB|FA80}l;Ev!adxIG)k7%VFY@(Yp-RK?jZS?ZtVcIWV8ff!_k(7Zc zvFWOdJ#-3~HvQOv2ycmX1TYHCx3SLygfs2IRRa+m>Oz;Gk)CkA2k3QQ3jjGhB3ti_ zjVV9SKJl%Ah!IL(c8>?iSL|TgEs+7)kcvdW0{1xe7{+?s<0WOtw4FP%_0tQu%C<93-Weu`tC^9dDGnS~E}w4jKYee`Lzxi<{LVq6l2;*5T8MI83FL_EFZ`yP@C!~+ro zSw@m>c*4woUpeDQF#VO8xy0scKM)(u(5yqkvqg&ht#XKhun&CXd1qoAERjRxz z;JyZlb<&#e(!glFoc$WFcb$dvEDTXlp;|;kC$d`(EAlaTi z><|x9Z*f68{Si7FcjQ$F+jn^~kwOvdQJ!XlJ`a<8omOtXFi=;V@0n%~3xg#T`snew z3N!z5fM$rc#Go9W^#VuGEewkL_hvg$DGl^EFI)H+c{HG9-$h=1daW0+Z4mT(!PWwl z?6tH&H$wXzD432!&>ei%2+#qxF1WVRE)p!l6O(XSnSZPoie;ES2Y6p~jvMhtSvs9G zyQxJSiQ*AiQ?4XppjTddZWYuhiQyHQ3sz7ohB+=0GWdZqWGh0tb2v?Jrro(LJA)8b zs2zwFOglcQkE-SI2E7ELB#ik_81KQ8k22uj*>w?$d=TnRY$*AsHiG5I`3E{e$agaT z8`pb)E3EqDv$E6b^2g@V6#&>_3U38WF^D4&LEDtE)|+hi@mt2++M0{lMO+xQ zdrrWlO3-A;j0X})GuFyR?fzJ@J!H}_Sks6Hf*~{9Y9<4Twono?ML+G^u+cv{uq$lv z_LHz-5QwvX+@&56nt@c|VE-My==-x%b0(hTh~26MD{Q67{4M2?IOy#XO%@jH8+j4d zQCgpgMN%EGs9*3>HC?eCXZm4i$jd|V;@mjmp=F!|8XTI%|OL#Mwe&nA;-LxfmWHv$4$Z!h5Y=Xa>33W*{SWKG_ z!E#=EXepDV-SVi5B*$5j*Ilvm!+hI@GWE&ys=I|%X0g|?76P@fZv?nryBbTFuj<^e z>f>HTi#CN>1W`0N`{&lS zTw-fzf=8ew)I#PEwsAeS6;`w_``dCRS9{_5Y~8e;O&{3OBgoyodTGz5LmQThciE*d z4!Lbu=4cA;ecoU1IckG#FGO3KJFM>QBdO}_p;fR0dTl#ke=Ve3pUbp)r)29XqR&;0 z$Vii-Ss|;|%?0e;S$C(R!6cud_1VvtF;kg#-+Ym#b`Z-07|obC95Z8)P#~I7p_q(H z?I2f;yw9+U5^~X(=B=K}=!_J1Y3Jxp)^wn%TO(~?7$Gw`QQN_xqAOPC5f!6%xIYJE{wha|1N;HLlQuoGrinf zdBp3et%)H+)am*s6P_#8pF02C3}eK1DA9^sBWbVY89Nz$?}4l&VEW6;v(v1Z0((Xm z#`uJSsYJ+4n^GDs!p_X%4-Zt-hw0sI{SwBoVF=e^P$VrA=h)tXs&bB`45TBOK7C%l zj3G%TJc&Tm=m;m>dmEI+B?$Nu->f2v^e4V>0C!gr$+R!b&rWkHXxDlNCWcbFp@i#e zCSl*_h;RD%QTu^DrY(J7|EwQ_VAn@-Nnrkp+512P(;MI1FKbP;xOmNcJBG3`o$2p6 za!?B|prqlpK{~{IVZlyI;+g-$bUF@{LQ^6?*jJ{XU%R(di!&jq9`I-|->%)m$Oxvt z?~eULXu&h|>kl0OT3NO4h5bTP{#o;Xb2z%2nf~HG`z4UB=k+*!1bv@#(J=onybNio zjyKcaydgV{+FC@ctksAV^*z!b+I9eBQmt&bUYT}YPp%2xRg@#BNKten<+zNemQ!|3QC#em z=@&jtcaP-6QjQ20GAPK?7K(-vm@U#`#-b+GQ5z_ePNx08E@4f>w1&@Tr&=+NrLkyD zb0miBbr4&)7I9-bDY3Xogz-v>f1O>z)D+t^_vcKnt)hY^CC;%#M<9Y>IR%88a*b3* zD=e)Xx&G>BhLIIaf95oY97g*g!H5Km_5uX>{K({wBMu zISJ56oK?CPsU^XPr4ncz;$ydv_V)kapJgaaOyB+8teUsBjCYIDwJ4}uA)1Kku3-L~ zjx9s-)Lt|FmrrLK2cT0FHXE=B(hJJ5l$&W?TS?)HworRBW6=OteDOp$8l>`dxCp6o z6jrsH?pLON?Yp8^iPRU(eCW4%7mW{hmyj%@aiW#FdG8$a+k3gHu?SH0ud?Zw`LAdw zp>?}=VW{3S{Tu&lH}C`J2>LeH`#NbPLBv9WJ zKuRn}Bk*F&KoS`G%_%|xf8f3{K2}V7ZC!Roz0~@WP)l>DdSK>Hl+#qKV!Jxn&zXMP z;{=a`Kp5Q!hDa@NP2x!Colp*K$%7?%PydeT=XMEaRI&(xfKY;r+rnDotXsjYyR9f4?z ziLpYV^rWf#z!0Wg{93j_!L=`24_`Bsuzxs~pkb9*g|vALGZ{nRk@Q(6$$a1J*r%WV z(<%1c$h@B>Iwjrm_e@^dM5S98H9l(}epzvSpjV6rf5SF?@^&Ss5#EvcVg3hRIsmIv zt7rOao3f1xd#>Ork&!Un`6=dq?GHn+O7te(NC~1%CoEQO`f_s9e<0lSW`nJgN&>ctMm__e5obYxJafIm` zCWs~tMLCz*Ji9Qx?sFcZ+ASvl{+?%Zfjg1Ob{@`xZiuO9R}3{L{&`-u1)09SGh07Z zn!}I91D(LRzNg8}mp{a{68uz!a%$avd4wgLUfSqY=;wbdk`zm@}Onc#WB2DR8g;hwT!3`k7nBVa7l$2sZ!1OJTk}WSiRNFwXTK$=Sjh8!06l35V zK4L?uOG~MEn~m?fa*mQQ?T4L2tfRp197pEhoKz^$EyEN6RJ%uzHi)A3-K25>=6|~! z>feA&_jGo;3iPc@g+obauELqdQ&9?E_CSIWG41)+vNLApqSo(TeJ=Ll!{>=kjK^T^ zwg-|m!DOT+Kw*k+-ai8GGp7A%Jpzi2J)6e#-XIurF8Kl>l<W7Qj8jCkluW17xO&f$Yrx=B5$2 z8Lax03yG<+*VQG~MMYV#lllI%cprEM5O9s|fGv(w)s~6`c;O4MztQ1D{(=F(7MUnL z$JmFT+f#Yl)4yl>H8t6(jf#~t=R#G#TB$xY3+7*5IQXo(c1^ayYI8a_6psK?rz6BY zV>(&ufgOt}4VXT#rJQY*VuHZ5|Lh|4IqU4iBjF%5=yBQ+LX_0|wUH1&VfxG)a=2lH zlB#)uiap46i^SRpSd;lDc9-x$cJDWOG8@T|lkI%xhKyKby}I}#;edgbOh?1md5@Mb zZA`!JYT<|SPFtv0Y9hsg-RTojSrp;QgMj#1DbJP2-@3oOBEp-TTx=bYi@l>G%6;zk za*86j$=lcWOuzZ|>~yQa-)0YmB`kwh-CoEJzk5Ro%eLYMtFBw-lyRB+S7az>%YSpE z42V%g4fd7kkDm;bz)2+FJnt{gIq9d|sv~8J+`r6&Tu|I%`u~n0%tUoXQ`jxWb24^x z$@i0?9KE7`x!hiv_Sd_pQ(tl_5ku8XOo)udDpO!?qG-nVs+Z?(G5v#&J5USGT|Sre zA%gpqyEJp~-VIg3kzW1v5uDB+65{?_K9}?YK@6fdoB8iMDEY-fdzt>q-Gt(x zbVn*$lMJK#77Pru08<;4Qv$UjeR?^2H%v=(I&FYdR5ez2z=e@RmPCHS^go<-3ivr^`?G_FiHd%2w;@ru1wY|EW)l@Z0XyD;%NXtPu(%f^ZqAbldGs zP`Ni997k4s)VKo~>)uR#B&iBvo|n$q<3TYukh2aX}vcKs?L{w9)PR_0c6{ zF);nPpJf}Vb(L?H>O17-4bC;Lg7$RED4_+HiqtdhYc<(=%S^~+98hs+7F9SgvU%4Z zkD4J`-N{h8q{C*zC2UN)?iv!VLZ>nqNf}6sm-z&nedVl}fK&MRiMGu2`6H?5+s#i% z&>O`h$jW@y9@Oh7@H}}J&8y3~!ea@30k#GrMkqbGoW=&a`$?El=|nG`+kIDW_8ZxDEWkF4zM4OAAuST zSdh;aGq}KTd1gFTFVUTl*03qso#tVs` z{moP$(PFZ5VLKfdd1NUhnD43n(6aXT5=-s*Ods`hG1H1CApP49Bs5#8vB$k0R(;f$ ziz%^WB84KK-(@|l!`HTD${;>f3drPE464#3@MFU zM=}r5=mZ`WR{fpf1Pc^sB0P;Hf-3i`JK&=KOs;pbL^QeikYP+4=2i``-lzqdt?NzBn7!;%v~sO0M?^o z7)l=gu>7EIEUFueZ5*pUWQ<7R5jTxcBos^nCy{DW0SPQ&az{c*Ze3j+xTO3S?@ml_~+e%=e#boqA zf6nwPCuHl?5SbNrt62bB9SH#Cuv?7DqcXEh5|vk|!$ET%4V3xBf$#z_9(|LI7vx+Z zAhl^3frtgG&FA@9^>B`*qTw7Jt!$kGJ zX+u{t-{(pJs1fiP&)9G>jy1Q0np17&A%Qkrwzo8l0ENNyCtl4qHs|>W%{n0sMWpT@b0oeI}GuV*T;v`fvapH|v=H(%r)#G)&)!uHXX7iQ4#O)hVBH&V1X-xg-uD_OW8T zd4cV)t`FFcu*H)minzJo)y;fw9SE>erl0yO4QCOEagL)&yWnoggmD{Eea*fN!_lG7 zv>(5cZBR45T+0n}7Q(CHWg!u>nbr$c62dqc2Px>T!<3s;5>DPhvsam?`|DMhy$bg@ zZ^Ph0p}0I}!;+cKOehpJQ&H(uVQgEd0~j|XqX&JIhgRil{Gr-BzFE9Gr+}(D8`yZE z2xh5qvoV~6no1!`?Ehy;L^i5xFe0dccSUMUSrMjlfRgV=rBq$PwEumU)^Ej~Tqh+$ zjq*V_^OnIE&%}hjW4`AT!*G2MBy&tZtfpXOLhOh@=8%`3@bp8WvY9?-0)=Aod|^6HMyeTO`qnDb%>O_+ z0GBES!t__4vQ0XpJpeFJYT}NBn^D`#0VKwF83si0VW3y0&we~xXPLg7Pn4Wl0tCQB zw@I@aS9HRMKxk({7!$wwBzJUoJhoq?aolI@c|R+#76nws4Q*I-FziAJVSy`y4qD^? zxA!ezZj@F3nY45>q2>NBhy_dWE4OCp-ghgsF5O-h=!NbUREo=NGTDtyGHEi|3#jh{=4PgLtNEY{q>@`>NF&*E3B>gnHOMch?{8ETKO( z-$NApeH`a0nUaF-tJ>Fgj)9blBpi$~SHDoTt(p&AA%DJoRp*KgYsSC=*X!;IL<>9% zzHLGUEmv6ft;PZivZhifobHHi#j#X4R+M4YmdVHnKRy@=2%fj3k(P`vq9o&fnf;}H z>iNe7wroNWTWijiUI@wmD+5NsbLTfkGMPc!EJgQ>-;}{4PL`Pju_0{|W<30GIBYmP z$Rxyw6%%9Guf(GC%8pPpsDKNKc|Q$Rk8c}kHc_au4S;?;^^bbPVJ~B#$14TkX}f1^ z6J3X@#A0Z+n03P2iK-Apy_nU2Ix3kD7ICa}Ox}!rU^#8*6*bF?G`3Ld>eyvRCI}dWVKFO9RZZ zn1-kcvr4Hfz)rI98a&OPW7TbX(k2fjH{M#<)U*mV1FJGg$1axv*?IRpL4 z{)$aT808v<3m=ft$7l=%(|o50-vopH+}f2LX$6nAcz-B?*D;SUU7u+75j=l6b?nzC z_^&6sX%!=VR4=<{1=p*kSbAa*1D<#Okx2|U4)!M+81s-Vk96%vCjm_3PnfK)Q1x(g zZgQf*L^$`82t5l*@JS3rz%%^9*b{XOM%n)G-nbGCU8d(1nd_z(tqu30lz$KFRVOUv z#;>2Oui*K|w^(XwNblpIffbmC#eEbQm~Sh=zj(5qe5!vACJ5fouS-9*N+0`4Ff$7o zl>DJ^h-QetCv8l{46-$Em?IzC@dmrxjCoYJ&Q*zHRkoZ+ zb(gZOoGLb&uUwQEx+&ib7_kG~pGC5my^vs(?Ei7vA_gszvT(>Y#j zD8X~QG}6TC9>~~q!rmoc#j0%51FWHB+i-AH@a&!>pCQf;2N3#hE&)>no-c3YSFHRm zU%noMw9~gW`Ncip`Js2Dk=+{_K);8H2d$h>_lMM8UITjG$t55Zlcg@;`S1&->FanQ zNX}~}{4qIssdxXfj2^rYfKYYe5Wl$P!q7`s2}YvWsPAAId5SOBfaMCYR1vT?kO(i74qvbGP5QizvWm=$5bYr7Omyv4;3|n0 zHv6*}uc@^S+bPHBjIyPesHWzEAiz8~i@xz;twF@A#i)uh{-Nke2hWR8Vq4V3CDy@hkG{g%(`@> zhILVJw=L_rGRGDOkq0Y+=xtj}8}~XfUuY$oNk2B^Gm3@1<+ytg*H3zxNSKo+8_mg+ zWFVL~=mFQ=<>cMxH3wCHxOb!>lO5UEhB=1Ta&TtyJ@CPLA3TX;S&l)sy9jiy9E0oM z2cu=MSeRgK!K))pnY_xzl^v;bZ>a#&TP!>a{amQ}FeVH$llYVS4B#v15X^W5I2O zrG0U4JXE2t{DMCd-zS*^hyjtBBNlRfeyEI;0ji#9=d~~t8*GeX9XPWC7!ok|H<79< zhkdGr=r8m+R0Wbj-VrQi5R8ck)j^shHvPgGJ{^8BT%Ax5HCMh!WFTnM1F?%xd{>4?hwwZRa z^1nFu(V2QjDb`)(d$4@()0hjY1=MXF^A#9HD7NP8F{_eR?4{GJ?oy?MvZ;-<@4Y1~ z@mMVNmMKlVk>;vk22s^(>rBIOup_XPO&pn?rp84KevG_zL!C_IO8cw+7+a7Lm#7R} zj`NwUIKITFBl_KRh={;5dzqO#+#hf8TCkz&>Q9!i?B!FziM|h>huW|mJR<`e5g6w5 zwzs9%AmgmqZ|nv$75H)qLxfAc{if@A<4Kt7z9=o>YUc>+=}Y&>QJEKUf$)!m;i-c7 z?(j%$CcxU5K#-X%>ivYm*Klxo$(7_zRL&;)@4@rpCq|maoFxOa)!|?wkn%ZuRSMU; zLDdJJ9cjsIK_a#?bC(k+b47Kky#0OAciF-)S~_$sR9fI zh}H9WS10+HedvqGv~&cqFn8AdrIMENa1J0-xg z8uQX@!N<^bpT<2Q9~;-MkgD#B%)3HrYMXCx{r2a}S|dK3@esyJhV8*q>#OU}>1a#0 zGWP(3m(=|yVHla-h@Vq`!D*SDBDcL=e|-cOi|h?AyOb{$$%vvkGiqeWQ;W(;9`Wdq z82-0=KaK5AxYdG>>7usCgiPrz?!91LNF>50C}DeBX2Pkks~D>gKs;f=NOKEL`uj9i zT;tzF@{aKdvyG?+Y&b)lxqP@n!1qukSjwud_}FAK6B^7an9xW|YC4{b`c$0XnmWA{ zZd##g(}nB?nD-R2kylEXrNPXCrPrYtRalGbONdeMNPin?Hs-4n@=7>~=zgFa)4TbM zbg|xts_U>JyH1ymF?5-dcZZ?@^zl;1Jz7HIP%Iz{{aj4P^|OpAAJSk2in7YMiEM>~ zQ)Um?iu(_aZCUWJ5fyr1I~mU}Uw zWJqBK#o9m!Z#2%+9QnhGpO1W=AmZoUMZFl)46-`%HaQ&X!w7u19Se??VT@XbS1S>D zI5RnI83_M*ZW0j0pbAD>j1ia@g~9>96c12sZz#$yyH8&>3BPB&LUXXc52`MHYoxZ0 zHJp=wPoXB;-IzC^N*#_SqwKPDP}O=eD|orx`{tAU{+fZ1uLh{DoR@}xN5+*u%@|(1 z`C|^nlMD-=Dks#`Y29T={$wj5D%A;O=C+-9<&hl1U7OyA2khUz%wLVX&nfj}Hl%Rs z_CTpINU>25Q4}2DuoKqp+Eg=i`~1)r;_3Vlb}Zx2Gxx8tu>^mm!$(nY z&&MYmHuTwDo9c$XGCzcCE-?4dLBpxxkYKP4$Nd^ZsZ(OL!_JshfI}bKx@(g$?{$^F zQy4L89b4JkK6VKJ!V5T=v~-0V=G^$vU7MPQwjFWB-s|C{BUfqXB(W}JdvJpsORd?V z#8sTQDWbl*UK!rK^w8V7m%6;W>s;Q96J}pQ}c5arsbQ#J^v>T z&6J~`PBeq}4nb=k+IGUcJ9N*tJ({}iDK)O75_N$jpN2AH<`boS0_Ag0O6`3(?AvGV z+GK1nT8+jL_cnpB_(u-7W8P7*NrTxh`!I&6VNNR#B5L4>y4rPpDD~Kg5t92sxaduX zkppK0<{aLI2;==^#v`n$t^x1v2Fy{-m6Oo`mPk;=k`%@j-rr{p2d@k}-a#oG8z8Ps zYkXe<9`iNTwM1KHn;g}iu`(&Vq@OEOtq3ysix(UQ_xs=n@xo)wNY^o>$6#fi)mkaS z9BJ2QzU|<<-}vG=GAZFCh)3@>^HiVB(>Z!E&xhI2NXL>*4(|KQABe8YHC{wSmaBpB zgqvE|?9jVraDgJ~)OuW0=?}$lJtnx9u{~lAUlZdCygxX?jC&))eT`m{Ol=I?gOcgI z0AT~xAv>^7l6kVL35d@Po9Sp`bWoKzYa(MBptpZw!8kiyguzt~8wY&2fVk%ht%g#$ zWOSMt+ULn~%qL+*6c*((GgE)IgYW?(Y?trJehuDls%8dT7=vq-sINP$Y+bX%j~s5+ zvzhB+SmH)?`QZBPoerl5%qfVM?9gf&S<>ltJ?T`-V(<>Ou`5xBHwL(|>yTh@Y-5+u ziPeLpdj*0*c|iAWFlYAJ7%3YK1a%AqIyx}{#{j@iW=x-d{Hbz$_5;Pt{_kMUl6u4t z=U`^C4Rt)*fatOFt`k)lM}wjt=-A?kxq6drd+k4u+hW!$4U3Olg)Hh>BTPRqB3VN` z2m{}9EbjqZUOVCk`WnRlys6PRVuLA46h#Bwkujzoc(=pUlrsh1ri-;&Rx@WXLy4ue z?Hyyp$mcr5OgS-jRRi&r|F#lEnI$CZj0{t5!R;_LJ|-08;q$C<&sv**rAJV zL?ApzGE(QaVGPu|-XJG+{QDekrk)$mt)H=SL%F6E z1F}D*9uQ9dwZqS(@dM&Lhilj)i8_Hf+B$xvy;{LzqyH9+DmSO)!30inl!wE- zkS#3-hLgB7nj1{(c4V*@v{+dcACz(mmF+ zT^sh_B*UzB{Fpw6pQ7^v-r=ulwRDrElR+6BDoBy|3JG>TtuUszrOv+4Vda2X0nhh_ ztZ0*wGDe_bno|lo@E$O{`)iB}eLsjhZ`EoWnG3Ouxe)CCsGw1bvkSsrb~YK@@lppv zWrWuruV5a*tG;E&jm!$0YRgh7A)MKpA38Q0socwR5TZBi5RonDX4h6K4)Vy0&(q(m z0DSVPCU`ISyB#-5p!&nf1dc-72W|_`t03G!yzAq3oG6{iJI(h2)6)-B08A)GuiD|E zv|>OBhoyZ;k?Rl56#$Q2`#=mR8qU)+AB2?r>s1oC-y)x>avzN)3}tW1?O++N(Y2mw z2aVEl3^d%>mJc;y;P47W4X>70+R>s!*=E=qXe;b+J^5@Ug63T-+Ci&X%u3l5YT3x` zoVt&GrUJ1t)YABh>NzV5JM!+81eI{^;}mcozO#Z51n-UWvXCNwK9~%L5r`iw{iMq^ z@PKQ^>NkgA<}cKJ37>Gs;tGHcyr=bKK}P;Pi543OpZ@@G-EdJQKqSt^T!_`Ds3BK= zGloF&V19gr_wA|xd<;8f{|e#@3p85tX-Z0vYmbF;`vC2VO6+<8@602zz#>OKDyvbv z3ra@P-K<7*U+VZUTkdXCA6Y)vOY_PY6$2gnR}gzUv(O?}oll_68`o5@i_Ug3kD2RQa?xpRcV4iZ zET8R+t0mvOhwVDg2b%kxH&viM8u|&|ZBJ{pR7RhS>zc0{2F?f1qrA z1@G?`W#K~ZH^+rtZ{^oCA-%c`u>tR~AIrjoyzCI$qH9kN|EQqn*6OJJNe>_DtGRbOxiuJi9+{r-E#~&7=rdyzH4Gwc)lHVa_r-B#0I?k*oPh9#|=DqZ+T6tGnY}; zS5tJ5NOt4M=*?zRzP%E!@eA35LZ5^83{k5yU!~Po^I(IWlr#gwjPX&Gba`C}yNP}d z;%DbE?0Lt_o^f@&c;;M|*;?|*XWrIAA@kl6>R`d83cEJdv%xUCE@@4r)kpwl{p%;Y zHZAA-if=k3h*Q>aWifXyv2gtPb4p=a49vOVF5C=(TaGhRS#*bZ)F&|++=;cnvY!SZ z&p1_cjOe(H=tSjoy#F4&j|v(Rn3?Ne&pYQveKbXGr(g2pZDFtM!^MkOZ`()JSz!=@ z<$OUnUht;+`#}6~l#zv(OW5+J`|G1VYKY&-D}6!u^6`$Em7JQ{B?Y{TF3{>}ehV>4 z?*6Ece50M4QRC!zR1W*F4l>;vQqh7YJx(<})eE$y3=LfZVN?wuq zr08eVr;y93#C(atgpU{X!VK|SjzE-*K;RhZpO}fGTc1%M&S7x$wgQ%-+4Yvn$VPo} zhkm>S9{+7gKC@Wr@7w9;y(^)7t%UA6{+;N44ce+s>_4Sjw^<%PF3aLI_?ZEY*$8nUV+))D0o@H7+ zjdCMTwubItM|}gjE6WyZ{;m=W5{qpVi~aLKd=))i6R~=VhbkF%;`~=1PuQgvRKom= zVxxVaKOgf5Z)muN-pHud=vkmvQa`;7Ig@~M@9l6*(%AP`>^ zw+(_IobM1c^#pld{)mMjJss2LoMEiEcltV*{0yrfvyOVYW+m4=B^vb2W&=&DPIk0z z%C)Z0kq6$tb!zn{^7LfOYA5QO)=F8BcZ&LqWo3AsPu+*3zID1arsO!CmhL&PIeI(g zdJEz|Ptxj5{OH-34o5F5OE2|oOeg83D)oSS{uz!wPPsl7vZv$y9K^4m%k+BN33YY) zy1NEe(6=(PRvWO2uM_vrV~J*>4%d_kk+NKOhk)&KO&-kouccV*NbB%0=cP697Miuz zxfEltrBA(dG#X53r<{gcQz8@#J=C|%l$F`HAzKoPbsQIyNXO)vwj_1T0D zYHE^c>Z0_eqXYaulsNvk%+*(T{H!uiU+}I{wR)opv!R+&hRY=y5v^~+wnBn6w7oh4 z?)pV#fWUZ-F ze(VFqWFW{4)#<8(Vcw$?Ja>Q9j436$Xqku->n7EvVOdta4lBBNzUOrZ+6=Vdee6^- zl$3T_gFSWe!813s=Fswpj$-|Z6@((1!i`#kQNf5VFlA}h;(*O;GZ@8p^#k-crTSw%URQ#TW!C`vYm5LsWO-}~0oKQr zp12grVP^OT%n1uu&Wl#7>uCRVAEKYaLCV4!w%QYHc4Uq;taRe zA5B9sv5QTi*Wmf#9t%!%kFMi%bAFuKhuc|3f?>r{5+Iz}S_Wu=_`rbHV3g*d)R0fU zc4dc;$w{`BVTv$JPk)`$@UdhFyhrS|phs?aD=uV;D9Jp>HCxxjl&z|ghrWR4)1TKG zjB9gDo|0qUMs4g&=*$q>j1}*7CmDSGm1(4b;O(2QH5fON_{iip)1v2WHA_aZDUwOa z`zv9ve<72d?{o0H&})H|eC8GLI9~){b(3ZGHi^xj)=eX^$@lEVdLO(Wx>jqTxib7( zgB)p!L$Kv9EK|c@j__GkV&OhI8r&DvRUp3LeIC8lMtx+-f5tbmT-t|T zndp*UG%XY$Y+zdfl^g+MTv7NH)Xa}nAW;XZI2fQm#0bvJ@Iag?B59BI%JGmYMg25` z)M|A?{6n%kH(pi7aO0BdZ!>sI7xRtmV!kyJxCw9Mmn+fPJ;^xjjHUxU)s35o@dkUB zf635Ivo1Kaz;!mVw$JPCss0>hzhlR)O${wW+cGnG8u<-7*u=Il!Lvi<>-nx%i(ITTdiZ=vZ0XZlo!+ff?MWRv*oFPAB zT}9Z#*ky%~j3YtFXISNsHdne5x6T?;m+vcx$F8(O$@@W>G^&F!@}4b{2*S=ER-o4A z!>`c$;0^7u;>&wESx#EbhwzMlISA)H%rW+_)*7jfL_ckK^JPND=H=clw$Lv7Kz5Wr zS63!ielwK3-7z7DX@qT}D-_LtCV^1(;xv>~5U-nSl^@wO;%#OD*1JhYnfc4Me8LjU?O~hQE124w z`NH$`-(#LssXg0t`FlY8&eyCQ@Q{Z^hFy}X#;F262OE`cMCizF;Coj_2`!8bbKvAS znfozCfjgO0ZlvSO;~^5lu7IBE&w+9UOCy!p=xFhfN1v;b4U_xAuQ?_(uRos8WP|s2 zFKLZtn0e$Akh_yTT@h94?h5MHGd4%70+VNEn0PqDVal7$aL@NuuuOvYcG)UhJa7qw z5eH&6&D`c@WE?c2{j&yW!X0;w`h)yd2Z3HkNV73 zc|i74fM|@5v}gTOSA4ddMN6FVGplInLsf%H+%E^Zl2OvUT#47$t|((%jN=bP^+6jx zJR}HWFH@J20~fdF=?cKbz-OXg!F&B7S|e4d>Ry{ZIF#W#*tI1og+sv*3L3iiwNC|XxONs2%d}_s+)94W=DiDSKJ$Rn%u|dfF{LMKNC8^8r zalqSeC*Mv2c=rCu20Hip!vRdK=9F3x7QXEupBH&t+S6!5lm`feD39ony+DQzS$k%ogh>U7MH_{6u>HmJlQ}HZh2-Jiz#^L&(a#H zKTLOpYPq+KoxxpFIIQ${Nzp<6_(92^9WjD?RVj|30q;*Y+MbL1ykpN5ilUE)D?+=N zr<3FKo-WVDU03#8)cP-l?-HO`N8!@&p~`t5C^ugN8nrJ|8IOPnODCnvqk>Vm#@+K zhK7c2b6<(WW^da=JLC;8_&n)6V5t6*1%tOQ8c)G}%zRHlExp<1!F|N7MPwDcH$G<* zJnr}zf2Dr7V zkSu_3uPxWjxbRFR&todKzJhnd7p!_&&s|R?fhR|{JUSPn<2W}8k;X4ZE%MJj=~yV> zq);aSaQ1;+&;9clX6rXQ(p;1cLtL6^Oo#3z)$?$HW#d>A6(+OTWY8@5!Bs)UU>1CM zpb?A9K^%UDWlB}z3^(S(SjC_KJeaFmEvkwzH-${tdTIo)W8FkL@(YRAyPQeyi1N^;dqWvr7W(` zEYHqk5;dNT`X!Z3cj?KtQciJ%)-*Qk1-Ak5=s_<4?^2>&@<1rZom>SS{Z@RqqtB)V zVd}I$jsxOzCg>^_AMUUB$T4%pMz&;udb~)LAJ4)yinWxHuK~v zoFw*>V;sEmR^#Tw9mKWgnXRHee-c9>1oH<=Kk0G}Jm8wK`pqGj`3se0JlU~g1|Ec` zzUSax5O?sdf76OH9X@QAtPRjq>v9Lrf_UbW=kdOe3mh&t+ZPJ)q)4C|>#u{1k`)6| zBo;>B(LMj04j)D10~=!ht~J$|C;m3EiN70?Q6KA9ghPVC)<7f_4Pg%`4gLk8{>Rg4 z=r7Fv%i>*|n(9nLew+A^-wqbe;mRE*ZZEZ_zPTw90C&s%jS^UE}( zj!*S%;!}M)@P?gjO0v-Q+Y21p4mxe%ea{XvT@=4;;As;ZVZz59Jv(^Ql)$s|y=I~) zkizNiY&Tt83FCSst9BjrT}Qj7T)RL_p070-jmu5O5Mh2&ZGoA$_GtRpS7r%AQS7IW z=qL2=|L*XW;S0RdLMx8s`kQbZ^^wb|@x}>o?R|#>Uj{zoES{{dAYQp%Ycl#Sm{`*> zVWESMqjTt(!1eZc>B^>q4g(7vtC@juv}0d)Y~zKy(D!B2LHFYpI{0uRM>`IRc2FYJ zLI*EaaOgNFbWq;NLI-c!aOjvaI*cYNc9c_HfrXCs&e>7O=1_?(7(^YLw4xh=kQPn$BBM!@W4CF-x^Gu*29x7X2<*ejtoqc<3j)5kbz8NJyAii{yG&m12YCp{(_zhOQeLi9EWYc z9X9Y>Q>!&KnQIQ3SYag0u+Wv98Mhjn3X9y^i50i^fTu)XYlhBm^IJcC+KXD>&weoOb*y=?710C zsB$Ecy7&){`b?Sn;NgFqSxxjtz+ghf^JXxXTC;;%{|wXiz^1%Yh zNGu_n=ty0Dhr`CCvw;KXey=qf-6!lwrwU?yUXO92Kk_#R`bmf0ZkY1D2Jfgy(+y0@;`p`;ZxCgGJeUW0C&Q^7KAU{1sIQG8DmuqpU#NQN;s+)^|cfHm~oK(suCZB8OxoV;pE|Nh`;?Scz^vxt;Lx8PI(|b!9cyfJGonTP9tj?SVfVJW+$Uk;?ZSy@UZ!z*m9|Mif zc~~QHnp(Mxz*udB9Ib(<@C*wJu7NI9vu4c zSqOXG&{vMQV(;~UilXVM?RI^BCf5;GN6(Z-RnnZE##0;VoQ4u|@NWjy|clZPEbvIqh3&Yx*5#sxW|sn5#B z8^5sZTa9@bCe#FFM~vSM&^)@fj9VqN|FMj41@W2Vt$2|4vRvlMPU~n%!1f8r8XTF9 zK}~tI`GNS0y;ex*mZFV~h^L;dJa}}lwqn1G``ydAXBE7uA8RefxFM!MbX#yyFLqWB z-h#SA76@CchufoRRT;+d0>i77h&-Ippk*L@;=f8*Ucfv160L;>$dJJ$_A{Nybl8Cq zda{I{!0w<`+G`O1=F(b>yZM&tI&S2%CxCM@UANxjkePK-9;ncOxZqD#@aaV1P@{b? z%14At1|8HV4fT9%fvDYUWrNIFhK-dWwuDBAz2R_CbS~^1f%wlwTFv6c=1DP_lfZzt zHIcvzcR2uu1cROM_V%EXO4KP~yo5UI2bCBE!<;wH*tMxUE)N(LPb zNJecqfa4NepLyJ2q3A43RMkN|`YkJq6pt|$6W9WCw9nzN^f~l=HeltD3cFYhu~CCk zi-dykgu~`k+~}PrTiKvmEx#J}F%n!4e%(>2l2<9itb({?7m`VnG`Pn>C0>loUUsVl z?m6omI!m5T@WQoL8mUZd_5f2!R-Xs17jAZVJm@@vC_QWCiK@P44;bfI>iB;-G#zxB z4C|QhD|oi~kVa!ODT}rjgLiks?16ZMbyc%E^ZT6`t@yr3K7tCp4`R~{8-X>9z%X8L zN?|pESHxgX5 z_z%KhhXd%i0i7&u0&&l$Y{XFdA|~N6(~lAF8BPsr>7FwAqyW>rkJwnHghpHr^h&Bv zkEBz_&T=$v$}|oIWS6x{dkr3K6VbQrgu1%x zfhx|iod$2JkKca((vDl>;U4=-dl^i7!?`Wk*izcInr3sIp7pS%jL zJCAZ~Rnct~h-aLO!fg~X*3|IJc2n57%n+;p`RS1kAw?quyzAPL2&zY9u2)Sp z1)r^a)_O?A`jupyIO*t>;%ozs>#o-wJ|@fuh-aRPxEni$5O-dx90~{gQk<%|*GdsN zkzSbIAjiTXzl0@MX;#LKKCv7}+y8+*(~t)6zSyAE)EN6;@UbcQx^y(&->Yb+Fx^L+ zY&@guKjl=rKiwP{5dYg{<%)u`OGnS_Q^LrVu*a!0pN9Dl@5gPdQpAR=Vn@7`466z4 z6xL?cA5weM2{}v++jt5;_rqyuZi=mP;QhcJRFO>0U`;heSO}&XRAb$WqH-{CAfuFK zU2(nC#;d44H0E-2xGxk}q7nQLEE0X!H>MH5Ab#mD_~5mc^59w)oM0#Bbx)~sJSt&H zun@b~2~fyJj4NP)Ij0_nfl5t7CQ#8^0MA!w3(*=mk&t?rPwcvV8VO6WwQ#C`K8RO6 zkHT*>YSti0Jf2($d*{j$UScvoMyB3<5LTY(P&Hw9xe&!5{$!(_61t*nXKQVd4Rob- z)!BHr!^foa0pf3WBL0o~oP{^XHD^I=>a%Y04&g5E=QpNXBfg{>3e((+Q|qhi&*^AO zx0>or<#>7{evaEA<-}<@Co{DAw_f+u=BSeH56gibJYdsm;-*7_!G&q+Scyvk8CQUA zMnfun>tG&GFy|c$n8C-*!1LKe15EO@M+5QzxQ4bI%)blOZCnRdxqTnZUhx~`qqYX+ z_)V8MutT`=hR5c;he`8{m)+Oa)d`Q^v)47t^{L&xFJAMFPS>21f9;x$AI|beRJEpd zchAt8JLkIQEDXB5_^!tv=^jXgYZmVguAH;{ChPlZ2;Y~#|J>T!%s-`j0Dp@AA+6_2 zuET;s<7Y=g_-+^dM$^0W8$U?Dk-cmEjhE1Gw7gHhaTEPU(@&w_*h$}g=$1> zYasJ3;*<#E(=6V-BzE`Wb2IO=pTW>;+2cB8iTPdn+nS#}^wx!$cMn0V@mrfLKbX_9 zcz5G@uU|T7{?<5t>w+7%Ts-U&ktg>5`0o?pmfa`5c>7xZhW@6iw(PEI`1h>~%- + + You can get the latest distribution version of Am-utils from + + + Additional alpha, beta, and release distributions are available in + . + + Revision 5.2 was part of the 4.3BSD Reno distribution. + + Revision 5.3bsdnet, a late alpha version of 5.3, was part of the BSD +network version 2 distribution + + Revision 6.0 was made independently by Erez Zadok at the Computer +Science Department of Columbia University (http://www.cs.columbia.edu/), +as part of his PhD thesis work +(http://www.fsl.cs.sunysb.edu/docs/zadok-thesis-proposal/). Am-utils +(especially version 6.1) continues to be developed and maintained at the +Computer Science Department (http://www.cs.sunysb.edu/) of Stony Brook +University (http://www.stonybrook.edu/), as a service to the user +community. + + *Note History::, for more details. + + +File: am-utils.info, Node: AddInfo, Next: Intro, Prev: Distrib, Up: Top + +Getting Additional Information +****************************** + +Bug Reports +=========== + +Before reporting a bug, see if it is a known one in the bugs +(http://www.am-utils.org/docs/am-utils/BUGS.txt) file. + + If you find a problem and hopefully you can reproduce it, please +describe it in detail and submit a bug report +(https://bugzilla.filesystems.org/) via Bugzilla +(http://www.bugzilla.org/). Alternatively, you can send your bug report +to the "am-utils" list (see under "Mailing +Lists") quoting the details of the release and your configuration. +These details can be obtained by running the command 'amd -v'. It would +greatly help if you could provide a reproducible procedure for detecting +the bug you are reporting. + + Providing working patches is highly encouraged. Every patch +incorporated, however small, will get its author an honorable mention in +the authors file (http://www.am-utils.org/docs/am-utils/AUTHORS.txt). + +Mailing Lists +============= + +There are several mailing lists for people interested in keeping +up-to-date with developments. + + 1. The users mailing list, 'am-utils' is for + + - announcements of alpha and beta releases of am-utils + - reporting of bugs and patches + - discussions of new features for am-utils + - implementation and porting issues + + To subscribe, visit under "Mailing + Lists." After subscribing, you can post a message to this list. + To avoid as much spam as possible, only subscribers to this list + may post to it. + + Subscribers of 'am-utils' are most helpful if they have the time + and resources to test new and development versions of amd, on as + many different platforms as possible. They should also be prepared + to learn and use the GNU Autoconf, Automake, and Libtool packages, + as needed; and of course, become familiar with the complex code in + the am-utils package. In other words, subscribers on this list + should hopefully be able to contribute meaningfully to the + development of amd. + + Note that this 'am-utils' list used to be called 'amd-dev' before + January 1st, 2004. Please use the new name, 'am-utils'. + + 2. The announcements mailing list, 'am-utils-announce' is for + announcements only (mostly new releases). To subscribe, visit + under "Mailing Lists." This list is + read-only: only am-utils developers may post to it. + + 3. We distribute nightly CVS snapshots in + . If you + like to get email notices of commits to the am-utils CVS + repository, subscribe to the CVS logs mailing list, 'am-utils-cvs' + at under "Mailing Lists." + + 4. The older list which was used to user discussions, 'amd-workers', + is defunct as of January 2004. (Its last address was .) Don't use 'amd-workers': use the + newer, more active 'am-utils' list. + + 5. For completeness, there's a developers-only closed list called + 'am-utils-developers' (see under + "Mailing Lists"). + +Am-utils Book +============= + +Erez Zadok (http://www.cs.sunysb.edu/~ezk) wrote a book +(http://www.fsl.cs.sunysb.edu/docs/amd-book/), titled Linux NFS and +Automounter Administration, ISBN 0-7821-2739-8, (Sybex, 2001). The book +is full of details and examples that go beyond what this manual has. +The book also covers NFS in great detail. Although the book is geared +toward Linux users, it is general enough for any Unix administrator and +contains specific sections for non-Linux systems. + + +File: am-utils.info, Node: Intro, Next: History, Prev: AddInfo, Up: Top + +Introduction +************ + +An "automounter" maintains a cache of mounted filesystems. Filesystems +are mounted on demand when they are first referenced, and unmounted +after a period of inactivity. + + Amd may be used as a replacement for Sun's automounter. The choice +of which filesystem to mount can be controlled dynamically with +"selectors". Selectors allow decisions of the form "hostname is THIS," +or "architecture is not THAT." Selectors may be combined arbitrarily. +Amd also supports a variety of filesystem types, including NFS, UFS and +the novel "program" filesystem. The combination of selectors and +multiple filesystem types allows identical configuration files to be +used on all machines thus reducing the administrative overhead. + + Amd ensures that it will not hang if a remote server goes down. +Moreover, Amd can determine when a remote server has become inaccessible +and then mount replacement filesystems as and when they become +available. + + Amd contains no proprietary source code and has been ported to +numerous flavors of Unix. + + +File: am-utils.info, Node: History, Next: Overview, Prev: Intro, Up: Top + +History +******* + +The Amd package has been without an official maintainer since 1992. +Several people have stepped in to maintain it unofficially. Most +notable were the 'upl' (Unofficial Patch Level) releases of Amd, created +by me (Erez Zadok (http://www.cs.sunysb.edu/~ezk)), and available from +. The last such unofficial release was +'upl102'. + + Through the process of patching and aging, it was becoming more and +more apparent that Amd was in much need of revitalizing. Maintaining +Amd had become a difficult task. I took it upon myself to cleanup the +code, so that it would be easier to port to new platforms, add new +features, keep up with the many new feature requests, and deal with the +never ending stream of bug reports. + + I have been working on such a release of Amd on and off since January +of 1996. The new suite of tools is currently named "am-utils" +(AutoMounter Utilities), in line with GNU naming conventions, befitting +the contents of the package. In October of 1996 I had received enough +offers to help me with this task that I decided to make a mailing list +for this group of people. Around the same time, Amd had become a +necessary part of my PhD thesis work, resulting in more work performed +on am-utils. + + Am-utils version 6.0 was numbered with a major new release number to +distinguish it from the last official release of Amd (5.x). Many new +features have been added such as a GNU 'configure' system, NFS Version +3, a run-time configuration file ('amd.conf'), many new ports, more +scripts and programs, as well as numerous bug fixes. Another reason for +the new major release number was to alert users of am-utils that +user-visible interfaces may have changed. In order to make Amd work +well for the next 10 years, and be easier to maintain, it was necessary +to remove old or unused features, change various syntax files, etc. +However, great care was taken to ensure the maximum possible backwards +compatibility. + + Am-utils version 6.1 has autofs support for Linux and Solaris 2.5+ as +the major new feature, in addition to several other minor new features. +The autofs support is completely transparent to the end-user, aside from +the fact that '/bin/pwd' now always returns the correct amd-ified path. +The administrator can easily switch between NFS and autofs mounts by +changing one parameter in 'amd.conf'. Autofs support and maintenance +was developed in conjunction with Ion Badulescu . + + +File: am-utils.info, Node: Overview, Next: Supported Platforms, Prev: History, Up: Top + +1 Overview +********** + +Amd maintains a cache of mounted filesystems. Filesystems are +"demand-mounted" when they are first referenced, and unmounted after a +period of inactivity. Amd may be used as a replacement for Sun's +automount(8) program. It contains no proprietary source code and has +been ported to numerous flavors of Unix. *Note Supported Platforms::. + + Amd was designed as the basis for experimenting with filesystem +layout and management. Although Amd has many direct applications it is +loaded with additional features which have little practical use. At +some point the infrequently used components may be removed to streamline +the production system. + + Amd supports the notion of "replicated" filesystems by evaluating +each member of a list of possible filesystem locations one by one. Amd +checks that each cached mapping remains valid. Should a mapping be lost +- such as happens when a fileserver goes down - Amd automatically +selects a replacement should one be available. + +* Menu: + +* Fundamentals:: +* Filesystems and Volumes:: +* Volume Naming:: +* Volume Binding:: +* Operational Principles:: +* Mounting a Volume:: +* Automatic Unmounting:: +* Keep-alives:: +* Non-blocking Operation:: + + +File: am-utils.info, Node: Fundamentals, Next: Filesystems and Volumes, Prev: Overview, Up: Overview + +1.1 Fundamentals +================ + +The fundamental concept behind Amd is the ability to separate the name +used to refer to a file from the name used to refer to its physical +storage location. This allows the same files to be accessed with the +same name regardless of where in the network the name is used. This is +very different from placing '/n/hostname' in front of the pathname since +that includes location dependent information which may change if files +are moved to another machine. + + By placing the required mappings in a centrally administered +database, filesystems can be re-organized without requiring changes to +configuration files, shell scripts and so on. + + +File: am-utils.info, Node: Filesystems and Volumes, Next: Volume Naming, Prev: Fundamentals, Up: Overview + +1.2 Filesystems and Volumes +=========================== + +Amd views the world as a set of fileservers, each containing one or more +filesystems where each filesystem contains one or more "volumes". Here +the term "volume" is used to refer to a coherent set of files such as a +user's home directory or a TeX distribution. + + In order to access the contents of a volume, Amd must be told in +which filesystem the volume resides and which host owns the filesystem. +By default the host is assumed to be local and the volume is assumed to +be the entire filesystem. If a filesystem contains more than one +volume, then a "sublink" is used to refer to the sub-directory within +the filesystem where the volume can be found. + + +File: am-utils.info, Node: Volume Naming, Next: Volume Binding, Prev: Filesystems and Volumes, Up: Overview + +1.3 Volume Naming +================= + +Volume names are defined to be unique across the entire network. A +volume name is the pathname to the volume's root as known by the users +of that volume. Since this name uniquely identifies the volume +contents, all volumes can be named and accessed from each host, subject +to administrative controls. + + Volumes may be replicated or duplicated. Replicated volumes contain +identical copies of the same data and reside at two or more locations in +the network. Each of the replicated volumes can be used +interchangeably. Duplicated volumes each have the same name but contain +different, though functionally identical, data. For example, '/vol/tex' +might be the name of a TeX distribution which varied for each machine +architecture. + + Amd provides facilities to take advantage of both replicated and +duplicated volumes. Configuration options allow a single set of +configuration data to be shared across an entire network by taking +advantage of replicated and duplicated volumes. + + Amd can take advantage of replacement volumes by mounting them as +required should an active fileserver become unavailable. + + +File: am-utils.info, Node: Volume Binding, Next: Operational Principles, Prev: Volume Naming, Up: Overview + +1.4 Volume Binding +================== + +Unix implements a namespace of hierarchically mounted filesystems. Two +forms of binding between names and files are provided. A "hard link" +completes the binding when the name is added to the filesystem. A "soft +link" delays the binding until the name is accessed. An "automounter" +adds a further form in which the binding of name to filesystem is +delayed until the name is accessed. + + The target volume, in its general form, is a tuple (host, filesystem, +sublink) which can be used to name the physical location of any volume +in the network. + + When a target is referenced, Amd ignores the sublink element and +determines whether the required filesystem is already mounted. This is +done by computing the local mount point for the filesystem and checking +for an existing filesystem mounted at the same place. If such a +filesystem already exists then it is assumed to be functionally +identical to the target filesystem. By default there is a one-to-one +mapping between the pair (host, filesystem) and the local mount point so +this assumption is valid. + + +File: am-utils.info, Node: Operational Principles, Next: Mounting a Volume, Prev: Volume Binding, Up: Overview + +1.5 Operational Principles +========================== + +Amd operates by introducing new mount points into the namespace. These +are called "automount" points. The kernel sees these automount points +as NFS filesystems being served by Amd. Having attached itself to the +namespace, Amd is now able to control the view the rest of the system +has of those mount points. RPC calls are received from the kernel one +at a time. + + When a "lookup" call is received Amd checks whether the name is +already known. If it is not, the required volume is mounted. A +symbolic link pointing to the volume root is then returned. Once the +symbolic link is returned, the kernel will send all other requests +direct to the mounted filesystem. + + If a volume is not yet mounted, Amd consults a configuration +"mount-map" corresponding to the automount point. Amd then makes a +runtime decision on what and where to mount a filesystem based on the +information obtained from the map. + + Amd does not implement all the NFS requests; only those relevant to +name binding such as "lookup", "readlink" and "readdir". Some other +calls are also implemented but most simply return an error code; for +example "mkdir" always returns "read-only filesystem". + + +File: am-utils.info, Node: Mounting a Volume, Next: Automatic Unmounting, Prev: Operational Principles, Up: Overview + +1.6 Mounting a Volume +===================== + +Each automount point has a corresponding mount map. The mount map +contains a list of key-value pairs. The key is the name of the volume +to be mounted. The value is a list of locations describing where the +filesystem is stored in the network. In the source for the map the +value would look like + + location1 location2 ... locationN + + Amd examines each location in turn. Each location may contain +"selectors" which control whether Amd can use that location. For +example, the location may be restricted to use by certain hosts. Those +locations which cannot be used are ignored. + + Amd attempts to mount the filesystem described by each remaining +location until a mount succeeds or Amd can no longer proceed. The +latter can occur in three ways: + + * If none of the locations could be used, or if all of the locations + caused an error, then the last error is returned. + + * If a location could be used but was being mounted in the background + then Amd marks that mount as being "in progress" and continues with + the next request; no reply is sent to the kernel. + + * Lastly, one or more of the mounts may have been "deferred". A + mount is deferred if extra information is required before the mount + can proceed. When the information becomes available the mount will + take place, but in the mean time no reply is sent to the kernel. + If the mount is deferred, Amd continues to try any remaining + locations. + + Once a volume has been mounted, Amd establishes a "volume mapping" +which is used to satisfy subsequent requests. + + +File: am-utils.info, Node: Automatic Unmounting, Next: Keep-alives, Prev: Mounting a Volume, Up: Overview + +1.7 Automatic Unmounting +======================== + +To avoid an ever increasing number of filesystem mounts, Amd removes +volume mappings which have not been used recently. A time-to-live +interval is associated with each mapping and when that expires the +mapping is removed. When the last reference to a filesystem is removed, +that filesystem is unmounted. If the unmount fails, for example the +filesystem is still busy, the mapping is re-instated and its +time-to-live interval is extended. The global default for this grace +period is controlled by the '-w' command-line option (*note -w: -w +Option.) or the amd.conf parameter 'dismount_interval' (*note +dismount_interval Parameter::). It is also possible to set this value +on a per-mount basis (*note opts: opts Option.). + + Filesystems can be forcefully timed out using the Amq command. *Note +Run-time Administration::. Note that on new enough systems that support +forced unmounts, such as Linux, Amd can try to use the umount2(2) system +call to force the unmount, if the regular umount(2) system call failed +in a way that indicates that the mount point is hung or stale. *Note +forced_unmounts Parameter::. + + +File: am-utils.info, Node: Keep-alives, Next: Non-blocking Operation, Prev: Automatic Unmounting, Up: Overview + +1.8 Keep-alives +=============== + +Use of some filesystem types requires the presence of a server on +another machine. If a machine crashes then it is of no concern to +processes on that machine that the filesystem is unavailable. However, +to processes on a remote host using that machine as a fileserver this +event is important. This situation is most widely recognized when an +NFS server crashes and the behavior observed on client machines is that +more and more processes hang. In order to provide the possibility of +recovery, Amd implements a "keep-alive" interval timer for some +filesystem types. Currently only NFS makes use of this service. + + The basis of the NFS keep-alive implementation is the observation +that most sites maintain replicated copies of common system data such as +manual pages, most or all programs, system source code and so on. If +one of those servers goes down it would be reasonable to mount one of +the others as a replacement. + + The first part of the process is to keep track of which fileservers +are up and which are down. Amd does this by sending RPC requests to the +servers' NFS 'NullProc' and checking whether a reply is returned. While +the server state is uncertain the requests are re-transmitted at three +second intervals and if no reply is received after four attempts the +server is marked down. If a reply is received the fileserver is marked +up and stays in that state for 30 seconds at which time another NFS ping +is sent. This interval is configurable and can even be turned off using +the ping option. *Note opts Option::. + + Once a fileserver is marked down, requests continue to be sent every +30 seconds in order to determine when the fileserver comes back up. +During this time any reference through Amd to the filesystems on that +server fail with the error "Operation would block". If a replacement +volume is available then it will be mounted, otherwise the error is +returned to the user. + + Although this action does not protect user files, which are unique on +the network, or processes which do not access files via Amd or already +have open files on the hung filesystem, it can prevent most new +processes from hanging. + + +File: am-utils.info, Node: Non-blocking Operation, Prev: Keep-alives, Up: Overview + +1.9 Non-blocking Operation +========================== + +Since there is only one instance of Amd for each automount point, and +usually only one instance on each machine, it is important that it is +always available to service kernel calls. Amd goes to great lengths to +ensure that it does not block in a system call. As a last resort Amd +will fork before it attempts a system call that may block indefinitely, +such as mounting an NFS filesystem. Other tasks such as obtaining +filehandle information for an NFS filesystem, are done using a purpose +built non-blocking RPC library which is integrated with Amd's task +scheduler. This library is also used to implement NFS keep-alives +(*note Keep-alives::). + + Whenever a mount is deferred or backgrounded, Amd must wait for it to +complete before replying to the kernel. However, this would cause Amd +to block waiting for a reply to be constructed. Rather than do this, +Amd simply "drops" the call under the assumption that the kernel RPC +mechanism will automatically retry the request. + + +File: am-utils.info, Node: Supported Platforms, Next: Mount Maps, Prev: Overview, Up: Top + +2 Supported Platforms +********************* + +Am-utils has been ported to a wide variety of machines and operating +systems. Am-utils's code works for little-endian and big-endian +machines, as well as 32 bit and 64 bit architectures. Furthermore, when +Am-utils ports to an Operating System on one architecture, it is +generally readily portable to the same Operating System on all platforms +on which it is available. + + See the 'INSTALL' in the distribution for more specific details on +building and/or configuring for some systems. + + +File: am-utils.info, Node: Mount Maps, Next: Amd Command Line Options, Prev: Supported Platforms, Up: Top + +3 Mount Maps +************ + +Amd has no built-in knowledge of machines or filesystems. External +"mount-maps" are used to provide the required information. +Specifically, Amd needs to know when and under what conditions it should +mount filesystems. + + The map entry corresponding to the requested name contains a list of +possible locations from which to resolve the request. Each location +specifies filesystem type, information required by that filesystem (for +example the block special device in the case of UFS), and some +information describing where to mount the filesystem (*note fs +Option::). A location may also contain "selectors" (*note Selectors::). + +* Menu: + +* Map Types:: +* Key Lookup:: +* Location Format:: + + +File: am-utils.info, Node: Map Types, Next: Key Lookup, Prev: Mount Maps, Up: Mount Maps + +3.1 Map Types +============= + +A mount-map provides the run-time configuration information to Amd. +Maps can be implemented in many ways. Some of the forms supported by +Amd are regular files, ndbm databases, NIS maps, the "Hesiod" name +server, and even the password file. + + A mount-map "name" is a sequence of characters. When an automount +point is created a handle on the mount-map is obtained. For each map +type configured, Amd attempts to reference the map of the appropriate +type. If a map is found, Amd notes the type for future use and deletes +the reference, for example closing any open file descriptors. The +available maps are configured when Amd is built and can be displayed by +running the command 'amd -v'. + + When using an Amd configuration file (*note Amd Configuration File::) +and the keyword 'map_type' (*note map_type Parameter::), you may force +the map used to any type. + + By default, Amd caches data in a mode dependent on the type of map. +This is the same as specifying 'cache:=mapdefault' and selects a +suitable default cache mode depending on the map type. The individual +defaults are described below. The CACHE option can be specified on +automount points to alter the caching behavior (*note Automount +Filesystem::). + + The following map types have been implemented, though some are not +available on all machines. Run the command 'amd -v' to obtain a list of +map types configured on your machine. + +* Menu: + +* File maps:: +* ndbm maps:: +* NIS maps:: +* NIS+ maps:: +* Hesiod maps:: +* Password maps:: +* Union maps:: +* LDAP maps:: +* Executable maps:: + + +File: am-utils.info, Node: File maps, Next: ndbm maps, Prev: Map Types, Up: Map Types + +3.1.1 File maps +--------------- + +When Amd searches a file for a map entry it does a simple scan of the +file and supports both comments and continuation lines. + + Continuation lines are indicated by a backslash character ('\') as +the last character of a line in the file. The backslash, newline +character _and any leading white space on the following line_ are +discarded. A maximum line length of 2047 characters is enforced after +continuation lines are read but before comments are stripped. Each line +must end with a newline character; that is newlines are terminators, not +separators. The following examples illustrate this: + + key valA valB; \ + valC + + specifies _three_ locations, and is identical to + + key valA valB; valC + + However, + + key valA valB;\ + valC + + specifies only _two_ locations, and is identical to + + key valA valB;valC + + After a complete line has been read from the file, including +continuations, Amd determines whether there is a comment on the line. A +comment begins with a hash ("'#'") character and continues to the end of +the line. There is no way to escape or change the comment lead-in +character. + + Note that continuation lines and comment support "only" apply to file +maps, or ndbm maps built with the 'mk-amd-map' program. + + When caching is enabled, file maps have a default cache mode of 'all' +(*note Automount Filesystem::). + + +File: am-utils.info, Node: ndbm maps, Next: NIS maps, Prev: File maps, Up: Map Types + +3.1.2 ndbm maps +--------------- + +An ndbm map may be used as a fast access form of a file map. The +program, 'mk-amd-map', converts a normal map file into an ndbm database. +This program supports the same continuation and comment conventions that +are provided for file maps. Note that ndbm format files may _not_ be +sharable across machine architectures. The notion of speed generally +only applies to large maps; a small map, less than a single disk block, +is almost certainly better implemented as a file map. + + ndbm maps have a default cache mode of 'all' (*note Automount +Filesystem::). + + +File: am-utils.info, Node: NIS maps, Next: NIS+ maps, Prev: ndbm maps, Up: Map Types + +3.1.3 NIS maps +-------------- + +When using NIS (formerly YP), an Amd map is implemented directly by the +underlying NIS map. Comments and continuation lines are _not_ supported +in the automounter and must be stripped when constructing the NIS +server's database. + + NIS maps have a default cache mode of 'all' (*note Automount +Filesystem::). + + The following rule illustrates what could be added to your NIS +'Makefile', in this case causing the 'amd.home' map to be rebuilt: + $(YPTSDIR)/amd.home.time: $(ETCDIR)/amd.home + -@sed -e "s/#.*$$//" -e "/^$$/d" $(ETCDIR)/amd.home | \ + awk '{ \ + for (i = 1; i <= NF; i++) \ + if (i == NF) { \ + if (substr($$i, length($$i), 1) == "\\") \ + printf("%s", substr($$i, 1, length($$i) - 1)); \ + else \ + printf("%s\n", $$i); \ + } \ + else \ + printf("%s ", $$i); \ + }' | \ + $(MAKEDBM) - $(YPDBDIR)/amd.home; \ + touch $(YPTSDIR)/amd.home.time; \ + echo "updated amd.home"; \ + if [ ! $(NOPUSH) ]; then \ + $(YPPUSH) amd.home; \ + echo "pushed amd.home"; \ + else \ + : ; \ + fi + + Here '$(YPTSDIR)' contains the time stamp files, and '$(YPDBDIR)' +contains the dbm format NIS files. + + +File: am-utils.info, Node: NIS+ maps, Next: Hesiod maps, Prev: NIS maps, Up: Map Types + +3.1.4 NIS+ maps +--------------- + +NIS+ maps do not support cache mode 'all' and, when caching is enabled, +have a default cache mode of 'inc'. + + XXX: FILL IN WITH AN EXAMPLE. + + +File: am-utils.info, Node: Hesiod maps, Next: Password maps, Prev: NIS+ maps, Up: Map Types + +3.1.5 Hesiod maps +----------------- + +When the map name begins with the string 'hesiod.' lookups are made +using the "Hesiod" name server. The string following the dot is used as +a name qualifier and is prepended with the key being located. The +entire string is then resolved in the 'automount' context, or the +amd.conf parameter 'hesiod_base' (*note hesiod_base Parameter::). For +example, if the key is 'jsp' and map name is 'hesiod.homes' then +"Hesiod" is asked to resolve 'jsp.homes.automount'. + + Hesiod maps do not support cache mode 'all' and, when caching is +enabled, have a default cache mode of 'inc' (*note Automount +Filesystem::). + + The following is an example of a "Hesiod" map entry: + + jsp.homes.automount HS TXT "rfs:=/home/charm;rhost:=charm;sublink:=jsp" + njw.homes.automount HS TXT "rfs:=/home/dylan/dk2;rhost:=dylan;sublink:=njw" + + +File: am-utils.info, Node: Password maps, Next: Union maps, Prev: Hesiod maps, Up: Map Types + +3.1.6 Password maps +------------------- + +The password map support is unlike the four previous map types. When +the map name is the string '/etc/passwd' Amd can lookup a user name in +the password file and re-arrange the home directory field to produce a +usable map entry. + + Amd assumes the home directory has the format +'/anydir/dom1/../domN/login'. It breaks this string into a map entry +where '${rfs}' has the value '/anydir/domN', '${rhost}' has the value +'domN.....dom1', and '${sublink}' has the value login. + + Thus if the password file entry was + + /home/achilles/jsp + + the map entry used by Amd would be + + rfs:=/home/achilles;rhost:=achilles;sublink:=jsp + + Similarly, if the password file entry was + + /home/cc/sugar/mjh + + the map entry used by Amd would be + + rfs:=/home/sugar;rhost:=sugar.cc;sublink:=mhj + + +File: am-utils.info, Node: Union maps, Next: LDAP maps, Prev: Password maps, Up: Map Types + +3.1.7 Union maps +---------------- + +The union map support is provided specifically for use with the union +filesystem, *note Union Filesystem::. + + It is identified by the string 'union:' which is followed by a colon +separated list of directories. The directories are read in order, and +the names of all entries are recorded in the map cache. Later +directories take precedence over earlier ones. The union filesystem +type then uses the map cache to determine the union of the names in all +the directories. + + +File: am-utils.info, Node: LDAP maps, Next: Executable maps, Prev: Union maps, Up: Map Types + +3.1.8 LDAP maps +--------------- + +LDAP (Lightweight Directory Access Protocol) maps do not support cache +mode 'all' and, when caching is enabled, have a default cache mode of +'inc'. + + For example, an Amd map 'amd.home' that looks as follows: + + /defaults opts:=rw,intr;type:=link + + zing -rhost:=shekel \ + host==shekel \ + host!=shekel;type:=nfs +when converted to LDAP (*note amd2ldif::), will result in the following +LDAP database: + $ amd2ldif amd.home CUCS < amd.home + dn: cn=amdmap timestamp, CUCS + cn : amdmap timestamp + objectClass : amdmapTimestamp + amdmapTimestamp: 873071363 + + dn: cn=amdmap amd.home[/defaults], CUCS + cn : amdmap amd.home[/defaults] + objectClass : amdmap + amdmapName : amd.home + amdmapKey : /defaults + amdmapValue : opts:=rw,intr;type:=link + + dn: cn=amdmap amd.home[], CUCS + cn : amdmap amd.home[] + objectClass : amdmap + amdmapName : amd.home + amdmapKey : + amdmapValue : + + dn: cn=amdmap amd.home[zing], CUCS + cn : amdmap amd.home[zing] + objectClass : amdmap + amdmapName : amd.home + amdmapKey : zing + amdmapValue : -rhost:=shekel host==shekel host!=shekel;type:=nfs + + +File: am-utils.info, Node: Executable maps, Prev: LDAP maps, Up: Map Types + +3.1.9 Executable maps +--------------------- + +An executable map is a dynamic map in which the keys and values for the +maps are generated on the fly by a program or script. The program is +expected to take a single parameter argument which is the key to lookup. +If the key is found, the program should print on stdout the key-value +pair that were found; if the key was not found, nothing should be +printed out. Below is an sample of such a map script: + + #!/bin/sh + # executable map example + case "$1" in + "/defaults" ) + echo "/defaults type:=nfs;rfs:=filer" + ;; + "a" ) + echo "a type:=nfs;fs:=/tmp" + ;; + "b" ) + echo "b type:=link;fs:=/usr/local" + ;; + * ) # no match, echo nothing + ;; + esac + + *Note exec_map_timeout Parameter::. + + +File: am-utils.info, Node: Key Lookup, Next: Location Format, Prev: Map Types, Up: Mount Maps + +3.2 How keys are looked up +========================== + +The key is located in the map whose type was determined when the +automount point was first created. In general the key is a pathname +component. In some circumstances this may be modified by variable +expansion (*note Variable Expansion::) and prefixing. If the automount +point has a prefix, specified by the PREF option, then that is prepended +to the search key before the map is searched. + + If the map cache is a 'regexp' cache then the key is treated as an +egrep-style regular expression, otherwise a normal string comparison is +made. + + If the key cannot be found then a "wildcard" match is attempted. Amd +repeatedly strips the basename from the key, appends '/*' and attempts a +lookup. Finally, Amd attempts to locate the special key '*'. + + For example, the following sequence would be checked if +'home/dylan/dk2' was being located: + + home/dylan/dk2 + home/dylan/* + home/* + * + + At any point when a wildcard is found, Amd proceeds as if an exact +match had been found and the value field is then used to resolve the +mount request, otherwise an error code is propagated back to the kernel. +(*note Filesystem Types::). + + +File: am-utils.info, Node: Location Format, Prev: Key Lookup, Up: Mount Maps + +3.3 Location Format +=================== + +The value field from the lookup provides the information required to +mount a filesystem. The information is parsed according to the syntax +shown below. + + location-list: + location-selection + location-list white-space || white-space location-selection + location-selection: + location + location-selection white-space location + location: + location-info + -location-info + - + location-info: + sel-or-opt + location-info;sel-or-opt + ; + sel-or-opt: + selection + opt-ass + selection: + selector==value + selector!=value + opt-ass: + option:=value + white-space: + space + tab + + Note that unquoted whitespace is not allowed in a location +description. White space is only allowed, and is mandatory, where shown +with non-terminal white-space. + + A "location-selection" is a list of possible volumes with which to +satisfy the request. Each "location-selection" is tried sequentially, +until either one succeeds or all fail. This, by the way, is different +from the historically documented behavior, which claimed (falsely, at +least for last 3 years) that Amd would attempt to mount all +"location-selection"s in parallel and the first one to succeed would be +used. + + "location-selection"s are optionally separated by the '||' operator. +The effect of this operator is to prevent use of location-selections to +its right if any of the location-selections on its left were selected, +whether or not any of them were successfully mounted (*note +Selectors::). + + The location-selection, and singleton "location-list", +'type:=ufs;dev:=/dev/xd1g' would inform Amd to mount a UFS filesystem +from the block special device '/dev/xd1g'. + + The "sel-or-opt" component is either the name of an option required +by a specific filesystem, or it is the name of a built-in, predefined +selector such as the architecture type. The value may be quoted with +double quotes '"', for example 'type:="ufs";dev:="/dev/xd1g"'. These +quotes are stripped when the value is parsed and there is no way to get +a double quote into a value field. Double quotes are used to get white +space into a value field, which is needed for the program filesystem +(*note Program Filesystem::). + +* Menu: + +* Map Defaults:: +* Variable Expansion:: +* Selectors:: +* Map Options:: + + +File: am-utils.info, Node: Map Defaults, Next: Variable Expansion, Prev: Location Format, Up: Location Format + +3.3.1 Map Defaults +------------------ + +A location beginning with a dash '-' is used to specify default values +for subsequent locations. Any previously specified defaults in the +location-list are discarded. The default string can be empty in which +case no defaults apply. + + The location '-fs:=/mnt;opts:=ro' would set the local mount point to +'/mnt' and cause mounts to be read-only by default. Defaults specified +this way are appended to, and so override, any global map defaults given +with '/defaults'). + + +File: am-utils.info, Node: Variable Expansion, Next: Selectors, Prev: Map Defaults, Up: Location Format + +3.3.2 Variable Expansion +------------------------ + +To allow generic location specifications Amd does variable expansion on +each location and also on some of the option strings. Any option or +selector appearing in the form '$"var"' is replaced by the current value +of that option or selector. For example, if the value of '${key}' was +'bin', '${autodir}' was '/a' and '${fs}' was '${autodir}/local/${key}' +then after expansion '${fs}' would have the value '/a/local/bin'. Any +environment variable can be accessed in a similar way. + + Two pathname operators are available when expanding a variable. If +the variable name begins with '/' then only the last component of the +pathname is substituted. For example, if '${path}' was '/foo/bar' then +'${/path}' would be expanded to 'bar'. Similarly, if the variable name +ends with '/' then all but the last component of the pathname is +substituted. In the previous example, '${path/}' would be expanded to +'/foo'. + + Two domain name operators are also provided. If the variable name +begins with '.' then only the domain part of the name is substituted. +For example, if '${rhost}' was 'swan.doc.ic.ac.uk' then '${.rhost}' +would be expanded to 'doc.ic.ac.uk'. Similarly, if the variable name +ends with '.' then only the host component is substituted. In the +previous example, '${rhost.}' would be expanded to 'swan'. + + Variable expansion is a two phase process. Before a location is +parsed, all references to selectors, eg '${path}', are expanded. The +location is then parsed, selections are evaluated and option assignments +recorded. If there were no selections or they all succeeded the +location is used and the values of the following options are expanded in +the order given: SUBLINK, RFS, FS, OPTS, REMOPTS, MOUNT and UNMOUNT. + + Note that expansion of option values is done after "all" assignments +have been completed and not in a purely left to right order as is done +by the shell. This generally has the desired effect but care must be +taken if one of the options references another, in which case the +ordering can become significant. + + There are two special cases concerning variable expansion: + + 1. before a map is consulted, any selectors in the name received from + the kernel are expanded. For example, if the request from the + kernel was for '${arch}.bin' and the machine architecture was + 'vax', the value given to '${key}' would be 'vax.bin'. + + 2. the value of '${rhost}' is expanded and normalized before the other + options are expanded. The normalization process strips any local + sub-domain components. For example, if '${domain}' was + 'Berkeley.EDU' and '${rhost}' was initially 'snow.Berkeley.EDU', + after the normalization it would simply be 'snow'. Hostname + normalization is currently done in a _case-dependent_ manner. + + +File: am-utils.info, Node: Selectors, Next: Map Options, Prev: Variable Expansion, Up: Location Format + +3.3.3 Selectors +--------------- + +Selectors are used to control the use of a location. It is possible to +share a mount map between many machines in such a way that filesystem +location, architecture and operating system differences are hidden from +the users. A selector of the form 'arch==sun3;os==sunos4' would only +apply on Sun-3s running SunOS 4.x. + + Selectors can be negated by using '!=' instead of '=='. For example +to select a location on all non-Vax machines the selector 'arch!=vax' +would be used. + + Selectors are evaluated left to right. If a selector fails then that +location is ignored. Thus the selectors form a conjunction and the +locations form a disjunction. If all the locations are ignored or +otherwise fail then Amd uses the "error" filesystem (*note Error +Filesystem::). This is equivalent to having a location 'type:=error' at +the end of each mount-map entry. + + The default value of many of the selectors listed here can be +overridden by an Amd command line switch or in an Amd configuration +file. *Note Amd Configuration File::. + + The following selectors are currently implemented. + +* Menu: + +* arch Selector Variable:: +* autodir Selector Variable:: +* byte Selector Variable:: +* cluster Selector Variable:: +* domain Selector Variable:: +* dollar Selector Variable:: +* host Selector Variable:: +* hostd Selector Variable:: +* karch Selector Variable:: +* os Selector Variable:: +* osver Selector Variable:: +* full_os Selector Variable:: +* vendor Selector Variable:: + +* key Selector Variable:: +* map Selector Variable:: +* netnumber Selector Variable:: +* network Selector Variable:: +* path Selector Variable:: +* wire Selector Variable:: +* uid Selector Variable:: +* gid Selector Variable:: + +* exists Selector Function:: +* false Selector Function:: +* netgrp Selector Function:: +* netgrpd Selector Function:: +* in_network Selector Function:: +* true Selector Function:: +* xhost Selector Function:: + + +File: am-utils.info, Node: arch Selector Variable, Next: autodir Selector Variable, Prev: Selectors, Up: Selectors + +3.3.3.1 arch Selector Variable +.............................. + +The machine architecture which was automatically determined at compile +time. The architecture type can be displayed by running the command +'amd -v'. You can override this value also using the '-A' command line +option. *Note Supported Platforms::. + + +File: am-utils.info, Node: autodir Selector Variable, Next: byte Selector Variable, Prev: arch Selector Variable, Up: Selectors + +3.3.3.2 autodir Selector Variable +................................. + +The default directory under which to mount filesystems. This may be +changed by the '-a' command line option. *Note fs Option::. + + +File: am-utils.info, Node: byte Selector Variable, Next: cluster Selector Variable, Prev: autodir Selector Variable, Up: Selectors + +3.3.3.3 byte Selector Variable +.............................. + +The machine's byte ordering. This is either 'little', indicating +little-endian, or 'big', indicating big-endian. One possible use is to +share 'rwho' databases (*note rwho servers::). Another is to share ndbm +databases, however this use can be considered a courageous juggling act. + + +File: am-utils.info, Node: cluster Selector Variable, Next: domain Selector Variable, Prev: byte Selector Variable, Up: Selectors + +3.3.3.4 cluster Selector Variable +................................. + +This is provided as a hook for the name of the local cluster. This can +be used to decide which servers to use for copies of replicated +filesystems. '${cluster}' defaults to the value of '${domain}' unless a +different value is set with the '-C' command line option. + + +File: am-utils.info, Node: domain Selector Variable, Next: dollar Selector Variable, Prev: cluster Selector Variable, Up: Selectors + +3.3.3.5 domain Selector Variable +................................ + +The local domain name as specified by the '-d' command line option. +*Note host Selector Variable::. + + +File: am-utils.info, Node: dollar Selector Variable, Next: host Selector Variable, Prev: domain Selector Variable, Up: Selectors + +3.3.3.6 dollar Selector Variable +................................ + +This is a special variable, whose sole purpose is to produce a literal +dollar sign in the value of another variable. For example, if you have +a remote file system whose name is '/disk$s', you can mount it by +setting the remote file system variable as follows: + + rfs:=/disk${dollar}s + + +File: am-utils.info, Node: host Selector Variable, Next: hostd Selector Variable, Prev: dollar Selector Variable, Up: Selectors + +3.3.3.7 host Selector Variable +.............................. + +The local hostname as determined by gethostname(2). If no domain name +was specified on the command line and the hostname contains a period '.' +then the string before the period is used as the host name, and the +string after the period is assigned to '${domain}'. For example, if the +hostname is 'styx.doc.ic.ac.uk' then 'host' would be 'styx' and 'domain' +would be 'doc.ic.ac.uk'. 'hostd' would be 'styx.doc.ic.ac.uk'. + + +File: am-utils.info, Node: hostd Selector Variable, Next: karch Selector Variable, Prev: host Selector Variable, Up: Selectors + +3.3.3.8 hostd Selector Variable +............................... + +This resolves to the '${host}' and '${domain}' concatenated with a '.' +inserted between them if required. If '${domain}' is an empty string +then '${host}' and '${hostd}' will be identical. + + +File: am-utils.info, Node: karch Selector Variable, Next: os Selector Variable, Prev: hostd Selector Variable, Up: Selectors + +3.3.3.9 karch Selector Variable +............................... + +This is provided as a hook for the kernel architecture. This is used on +SunOS 4 and SunOS 5, for example, to distinguish between different +'/usr/kvm' volumes. '${karch}' defaults to the "machine" value gotten +from uname(2). If the uname(2) system call is not available, the value +of '${karch}' defaults to that of '${arch}'. Finally, a different value +can be set with the '-k' command line option. + + +File: am-utils.info, Node: os Selector Variable, Next: osver Selector Variable, Prev: karch Selector Variable, Up: Selectors + +3.3.3.10 os Selector Variable +............................. + +The operating system. Like the machine architecture, this is +automatically determined at compile time. The operating system name can +be displayed by running the command 'amd -v'. *Note Supported +Platforms::. + + +File: am-utils.info, Node: osver Selector Variable, Next: full_os Selector Variable, Prev: os Selector Variable, Up: Selectors + +3.3.3.11 osver Selector Variable +................................ + +The operating system version. Like the machine architecture, this is +automatically determined at compile time. The operating system name can +be displayed by running the command 'amd -v'. *Note Supported +Platforms::. + + +File: am-utils.info, Node: full_os Selector Variable, Next: vendor Selector Variable, Prev: osver Selector Variable, Up: Selectors + +3.3.3.12 full_os Selector Variable +.................................. + +The full name of the operating system, including its version. This +value is automatically determined at compile time. The full operating +system name and version can be displayed by running the command 'amd +-v'. *Note Supported Platforms::. + + +File: am-utils.info, Node: vendor Selector Variable, Next: key Selector Variable, Prev: full_os Selector Variable, Up: Selectors + +3.3.3.13 vendor Selector Variable +................................. + +The name of the vendor of the operating system. This value is +automatically determined at compile time. The name of the vendor can be +displayed by running the command 'amd -v'. *Note Supported Platforms::. + + + + + The following selectors are also provided. Unlike the other +selectors, they vary for each lookup. Note that when the name from the +kernel is expanded prior to a map lookup, these selectors are all +defined as empty strings. + + +File: am-utils.info, Node: key Selector Variable, Next: map Selector Variable, Prev: vendor Selector Variable, Up: Selectors + +3.3.3.14 key Selector Variable +.............................. + +The name being resolved. For example, if '/home' is an automount point, +then accessing '/home/foo' would set '${key}' to the string 'foo'. The +key is prefixed by the PREF option set in the parent mount point. The +default prefix is an empty string. If the prefix was 'blah/' then +'${key}' would be set to 'blah/foo'. + + +File: am-utils.info, Node: map Selector Variable, Next: netnumber Selector Variable, Prev: key Selector Variable, Up: Selectors + +3.3.3.15 map Selector Variable +.............................. + +The name of the mount map being used. + + +File: am-utils.info, Node: netnumber Selector Variable, Next: network Selector Variable, Prev: map Selector Variable, Up: Selectors + +3.3.3.16 netnumber Selector Variable +.................................... + +This selector is identical to the 'in_network' selector function, see +*note in_network Selector Function::. It will match either the name or +number of any network interface on which this host is connected to. The +names and numbers of all attached interfaces are available from the +output of 'amd -v'. + + +File: am-utils.info, Node: network Selector Variable, Next: path Selector Variable, Prev: netnumber Selector Variable, Up: Selectors + +3.3.3.17 network Selector Variable +.................................. + +This selector is identical to the 'in_network' selector function, see +*note in_network Selector Function::. It will match either the name or +number of any network interface on which this host is connected to. The +names and numbers of all attached interfaces are available from the +output of 'amd -v'. + + +File: am-utils.info, Node: path Selector Variable, Next: wire Selector Variable, Prev: network Selector Variable, Up: Selectors + +3.3.3.18 path Selector Variable +............................... + +The full pathname of the name being resolved. For example '/home/foo' +in the example above. + + +File: am-utils.info, Node: wire Selector Variable, Next: uid Selector Variable, Prev: path Selector Variable, Up: Selectors + +3.3.3.19 wire Selector Variable +............................... + +This selector is identical to the 'in_network' selector function, see +*note in_network Selector Function::. It will match either the name or +number of any network interface on which this host is connected to. The +names and numbers of all attached interfaces are available from the +output of 'amd -v'. + + +File: am-utils.info, Node: uid Selector Variable, Next: gid Selector Variable, Prev: wire Selector Variable, Up: Selectors + +3.3.3.20 uid Selector Variable +.............................. + +This selector provides the numeric effective user ID (UID) of the user +which last accessed an automounted path name. This simple example shows +how floppy mounting can be assigned only to machine owners: + + floppy -type:=pcfs \ + uid==2301;host==shekel;dev:=/dev/floppy \ + uid==6712;host==titan;dev=/dev/fd0 \ + uid==0;dev:=/dev/fd0c \ + type:=error + + The example allows two machine owners to mount floppies on their +designated workstations, allows the root user to mount on any host, and +otherwise forces an error. + + +File: am-utils.info, Node: gid Selector Variable, Next: exists Selector Function, Prev: uid Selector Variable, Up: Selectors + +3.3.3.21 gid Selector Variable +.............................. + +This selector provides the numeric effective group ID (GID) of the user +which last accessed an automounted path name. + + + + The following boolean functions are selectors which take an argument +ARG. They return a value of true or false, and thus do not need to be +compared with a value. Each of these may be negated by prepending '!' +to their name. + + +File: am-utils.info, Node: exists Selector Function, Next: false Selector Function, Prev: gid Selector Variable, Up: Selectors + +3.3.3.22 exists Selector Function +................................. + +If the file listed by ARG exists (via lstat(2)), this function evaluates +to true. Otherwise it evaluates to false. + + +File: am-utils.info, Node: false Selector Function, Next: netgrp Selector Function, Prev: exists Selector Function, Up: Selectors + +3.3.3.23 false Selector Function +................................ + +Always evaluates to false. ARG is ignored. + + +File: am-utils.info, Node: netgrp Selector Function, Next: netgrpd Selector Function, Prev: false Selector Function, Up: Selectors + +3.3.3.24 netgrp Selector Function +................................. + +The argument ARG of this selector is a netgroup name followed optionally +by a comma and a host name. If the host name is not specified, it +defaults to '${host}'. If the host name (short name) is a member of the +netgroup, this selector evaluates to true. Otherwise it evaluates to +false. + + For example, suppose you have a netgroup 'ppp-hosts', and for reasons +of performance, these have a local '/home' partition, while all other +clients on the faster network can access a shared home directory. A +common map to use for both might look like the following: + + home/* netgrp(ppp-hosts);type:=link;fs:=/local/${key} \ + !netgrp(ppp-hosts);type:=nfs;rhost:=serv1;rfs:=/remote/${key} + + A more complex example that takes advantage of the two argument +netgrp mount selector is given in the following scenario. Suppose one +wants to mount the local scratch space from a each host under +'scratch/' and some hosts have their scratch space in a +different path than others. Hosts in the netgroup 'apple-hosts' have +their scratch space in the '/apple' path, where hosts in the netgroup +'cherry-hosts' have their scratch space in the '/cherry' path. For +hosts that are neither in the 'apple-hosts' or 'cherry-hosts' netgroups +we want to make a symlink pointing to nowhere but provide a descriptive +error message in the link destination: + + scratch/* netgrp(apple-hosts,${/key});type:=nfs;rhost:=${/key};\ + rfs:="/apple" \ + netgrp(cherry-hosts,${/key});type:=nfs;rhost:=${/key};\ + rfs:="/cherry" \ + type:=link;rfs:="no local partition for ${/key}" + + +File: am-utils.info, Node: netgrpd Selector Function, Next: in_network Selector Function, Prev: netgrp Selector Function, Up: Selectors + +3.3.3.25 netgrpd Selector Function +.................................. + +The argument ARG of this selector is a netgroup name followed optionally +by a comma and a host name. If the host name is not specified, it +defaults to '${hostd}'. If the host name (fully-qualified name) is a +member of the netgroup, this selector evaluates to true. Otherwise it +evaluates to false. + + The 'netgrpd' function uses fully-qualified host names to match +netgroup names, while the 'netgrp' function (*note netgrp Selector +Function::) uses short host names. + + +File: am-utils.info, Node: in_network Selector Function, Next: true Selector Function, Prev: netgrpd Selector Function, Up: Selectors + +3.3.3.26 in_network Selector Function +..................................... + +This selector matches against any network name or number with an +optional netmask. First, if the current host has any network interface +that is locally attached to the network specified in ARG (either via +name or number), this selector evaluates to true. + + Second, 'in_network' supports a network/netmask syntax such as +'128.59.16.0/255.255.255.0', '128.59.16.0/24', '128.59.16.0/0xffffff00', +or '128.59.16.0/'. Using the last form, Amd will match the specified +network number against the default netmasks of each of the locally +attached interfaces. + + If the selector does not match, it evaluates to false. + + For example, suppose you have two servers that have an exportable +'/opt' that smaller clients can NFS mount. The two servers are say, +'serv1' on network 'foo-net.site.com' and 'serv2' on network +'123.4.5.0'. You can write a map to be used by all clients that will +attempt to mount the closest one as follows: + + opt in_network(foo-net.site.com);rhost:=serv1;rfs:=/opt \ + in_network(123.4.5.0);rhost:=serv2;rfs:=/opt \ + rhost:=fallback-server + + +File: am-utils.info, Node: true Selector Function, Next: xhost Selector Function, Prev: in_network Selector Function, Up: Selectors + +3.3.3.27 true Selector Function +............................... + +Always evaluates to true. ARG is ignored. + + +File: am-utils.info, Node: xhost Selector Function, Prev: true Selector Function, Up: Selectors + +3.3.3.28 xhost Selector Function +................................ + +This function compares ARG against the current hostname, similarly to +the *note host Selector Variable::. However, this function will also +match if ARG is a CNAME (DNS Canonical Name, or alias) for the current +host's name. + + +File: am-utils.info, Node: Map Options, Prev: Selectors, Up: Location Format + +3.3.4 Map Options +----------------- + +Options are parsed concurrently with selectors. The difference is that +when an option is seen the string following the ':=' is recorded for +later use. As a minimum the TYPE option must be specified. Each +filesystem type has other options which must also be specified. *Note +Filesystem Types::, for details on the filesystem specific options. + + Superfluous option specifications are ignored and are not reported as +errors. + + The following options apply to more than one filesystem type. + +* Menu: + +* addopts Option:: +* delay Option:: +* fs Option:: +* opts Option:: +* remopts Option:: +* sublink Option:: +* type Option:: + + +File: am-utils.info, Node: addopts Option, Next: delay Option, Prev: Map Options, Up: Map Options + +3.3.4.1 addopts Option +...................... + +This option adds additional options to default options normally +specified in the '/defaults' entry or the defaults of the key entry +being processed (*note opts Option::). Normally when you specify 'opts' +in both the '/defaults' and the map entry, the latter overrides the +former completely. But with 'addopts' it will append the options and +override any conflicting ones. + + 'addopts' also overrides the value of the 'remopts' option (*note +remopts Option::), which unless specified defaults to the value of +'opts'. + + Options which start with 'no' will override those with the same name +that do not start with 'no' and vice verse. Special handling is given +to inverted options such as 'soft' and 'hard', 'bg' and 'fg', 'ro' and +'rw', etc. + + For example, if the default options specified were + opts:=rw,nosuid,intr,rsize=1024,wsize=1024,quota,posix + + and the ones specified in a map entry were + + addopts:=grpid,suid,ro,rsize=2048,quota,nointr + + then the actual options used would be + + wsize=1024,posix,grpid,suid,ro,rsize=2048,quota,nointr + + +File: am-utils.info, Node: delay Option, Next: fs Option, Prev: addopts Option, Up: Map Options + +3.3.4.2 delay Option +.................... + +The delay, in seconds, before an attempt will be made to mount from the +current location. Auxiliary data, such as network address, file handles +and so on are computed regardless of this value. + + A delay can be used to implement the notion of primary and secondary +file servers. The secondary servers would have a delay of a few +seconds, thus giving the primary servers a chance to respond first. + + +File: am-utils.info, Node: fs Option, Next: opts Option, Prev: delay Option, Up: Map Options + +3.3.4.3 fs Option +................. + +The local mount point. The semantics of this option vary between +filesystems. + + For NFS and UFS filesystems the value of '${fs}' is used as the local +mount point. For other filesystem types it has other meanings which are +described in the section describing the respective filesystem type. It +is important that this string uniquely identifies the filesystem being +mounted. To satisfy this requirement, it should contain the name of the +host on which the filesystem is resident and the pathname of the +filesystem on the local or remote host. + + The reason for requiring the hostname is clear if replicated +filesystems are considered. If a fileserver goes down and a replacement +filesystem is mounted then the "local" mount point "must" be different +from that of the filesystem which is hung. Some encoding of the +filesystem name is required if more than one filesystem is to be mounted +from any given host. + + If the hostname is first in the path then all mounts from a +particular host will be gathered below a single directory. If that +server goes down then the hung mount points are less likely to be +accidentally referenced, for example when getcwd(3) traverses the +namespace to find the pathname of the current directory. + + The 'fs' option defaults to '${autodir}/${rhost}${rfs}'. In +addition, 'rhost' defaults to the local host name ('${host}') and 'rfs' +defaults to the value of '${path}', which is the full path of the +requested file; '/home/foo' in the example above (*note Selectors::). +'${autodir}' defaults to '/a' but may be changed with the '-a' command +line option. Sun's automounter defaults to '/tmp_mnt'. Note that there +is no '/' between the '${rhost}' and '${rfs}' since '${rfs}' begins with +a '/'. + + +File: am-utils.info, Node: opts Option, Next: remopts Option, Prev: fs Option, Up: Map Options + +3.3.4.4 opts Option +................... + +The options to pass to the mount system call. A leading '-' is silently +ignored. The mount options supported generally correspond to those used +by mount(8) and are listed below. Some additional pseudo-options are +interpreted by Amd and are also listed. + + Unless specifically overridden, each of the system default mount +options applies. Any options not recognized are ignored. If no options +list is supplied the string 'rw,defaults' is used and all the system +default mount options apply. Options which are not applicable for a +particular operating system are silently ignored. For example, only +4.4BSD is known to implement the 'compress' and 'spongy' options. + +'acdirmax=N' + Set the maximum directory attribute cache timeout to N. + +'acdirmin=N' + Set the minimum directory attribute cache timeout to N. + +'acregmax=N' + Set the maximum file attribute cache timeout to N. + +'acregmin=N' + Set the minimum file attribute cache timeout to N. + +'actimeo=N' + Set the overall attribute cache timeout to N. + +'auto' +'ignore' + Ignore this mount by df(1). + +'cache' + Allow data to be cached from a remote server for this mount. + +'closesession' + For UDF mounts, close the session when unmounting. + +'compress' + Use NFS compression protocol. + +'defperm' + Ignore the permission mode bits, and default file permissions to + 0555, UID 0, and GID 0. Useful for CD-ROMs formatted as ISO-9660. + +'dev' + Allow local special devices on this filesystem. + +'dirmask=N' + For PCFS mounts, specify the maximum file permissions for + directories in the file system. See the 'mask' option's + description for more details. The mask value of N can be specified + in decimal, octal, or hexadecimal. + +'dumbtimr' + Turn off the dynamic retransmit timeout estimator. This may be + useful for UDP mounts that exhibit high retry rates, since it is + possible that the dynamically estimated timeout interval is too + short. + +'extatt' + Enable extended attributes in ISO-9660 file systems. + +'fsid' + Set ID of filesystem. + +'gens' + Enable generations in ISO-9660 file systems. Generations allow you + to see all versions of a given file. + +'gmtoff=N' + For UDF mounts, set the time zone offset from UTC to N seconds, + with positive values indicating east of the Prime Meridian. If not + set, the user's current time zone will be used. + +'group=N' + For PCFS and UDF mounts, set the group of the files in the file + system to N (which can either be a group name or a GID number). + The default group is the group of the directory on which the file + system is being mounted. + +'grpid' + Use BSD directory group-id semantics. + +'int' +'intr' + Allow keyboard interrupts on hard mounts. + +'lock' + Use the NFS locking protocol (default) + +'longname' + For PCFS mounts, force Win95 long names. + +'mask=N' + For PCFS mounts, specify the maximum file permissions for files in + the file system. For example, a mask of 755 specifies that, by + default, the owner should have read, write, and execute permissions + for files, but others should only have read and execute + permissions. Only the nine low-order bits of mask are used. The + default mask is taken from the directory on which the file system + is being mounted. The mask value of N can be specified in decimal, + octal, or hexadecimal. + +'multi' + Perform multi-component lookup on files. + +'maxgroups' + Set the maximum number of groups to allow for this mount. + +'nfsv3' + Use NFS Version 3 for this mount. + +'noac' + Turn off the attribute cache. + +'noauto' + This option is used by the mount command in '/etc/fstab' or + '/etc/vfstab' and means not to mount this file system when mount -a + is used. + +'nocache' + Do not allow data to be cached from a remote server for this mount. + +'nocasetrans' + Don't do case translation. Useful for CD-ROMS formatted as + ISO-9660. + +'noconn' + Don't make a connection on datagram transports. + +'nocto' + No close-to-open consistency. + +'nodefperm' + Do not ignore the permission mode bits. Useful for CD-ROMS + formatted as ISO-9660. + +'nodev' +'nodevs' + Don't allow local special devices on this filesystem. + +'noexec' + Don't allow program execution. + +'noint' + Do not allow keyboard interrupts for this mount + +'nojoliet' + Turn off the Joliet extensions. Useful for CD-ROMS formatted as + ISO-9660. + +'nolock' + Do not use the NFS locking protocol + +'nomnttab' + This option is used internally to tell Amd that a Solaris 8 system + using mntfs is in use. + +'norrip' + Turn off using of the Rock Ridge Interchange Protocol (RRIP) + extensions to ISO-9660. + +'nosub' + Disallow mounts beneath this mount. + +'nosuid' + Don't allow set-uid or set-gid executables on this filesystem. + +'noversion' + Strip the extension ';#' from the version string of files recorded + on an ISO-9660 CD-ROM. + +'nowin95' + For PCFS mounts, completely ignore Win95 entries. + +'optionstr' + Under Solaris 8, provide the kernel a string of options to parse + and show as part of the special in-kernel mount file system. + +'overlay' + Overlay this mount on top of an existing mount, if any. + +'pgthresh=N' + Set the paging threshold to N kilobytes. + +'port=N' + Set the NFS port to N. + +'posix' + Turn on POSIX static pathconf for mounts. + +'private' + Use local locking instead of the NLM protocol, useful for IRIX 6 + only. + +'proplist' + Support property lists (ACLs) for this mount, useful primarily for + Tru64 UNIX. + +'proto=S' + Use transport protocol S for NFS (can be '"tcp"' or '"udp"'). + +'quota' + Enable quota checking on this mount. + +'rdonly' +'ro' + Mount this filesystem readonly. + +'resvport' + Use a reserved port (smaller than 1024) for remote NFS mounts. + Most systems assume that, but some allow for mounts to occur on + non-reserved ports. This causes problems when such a system tries + to NFS mount one that requires reserved ports. It is recommended + that this option always be on. + +'retrans=n' + The number of NFS retransmits made before a user error is generated + by a 'soft' mounted filesystem, and before a 'hard' mounted + filesystem reports 'NFS server "yoyo" not responding still trying'. + +'retry' + Set the NFS retry counter. + +'rrcaseins' + Enable the Rock Ridge Interchange Protocol (RRIP) case insensitive + extensions. Useful for CD-ROMS formatted as ISO-9660. + +'rrip' + Uses the Rock Ridge Interchange Protocol (RRIP) extensions to + ISO-9660. + +'rsize=N' + The NFS read packet size. You may need to set this if you are + using NFS/UDP through a gateway or a slow link. + +'rw' + Allow reads and writes on this filesystem. + +'sessionnr=N' + For multisession UDF mounts, use session number N when mounting. + +'shortname' + For PCFS mounts, force old DOS short names only. + +'soft' + Give up after "retrans" retransmissions. + +'spongy' + Like 'soft' for status requests, and 'hard' for data transfers. + +'suid' + Allow set-uid programs on this mount. + +'symttl' + Turn off the symbolic link cache time-to-live. + +'sync' + Perform synchronous filesystem operations on this mount. + +'tcp' + Use TCP/IP instead of UDP/IP, ignored if the NFS implementation + does not support TCP/IP mounts. + +'timeo=N' + The NFS timeout, in tenth-seconds, before a request is + retransmitted. + +'user=N' + For PCFS and UDF mounts, set the owner of the files in the file + system to N (which can either be a user name or a UID number). The + default owner is the owner of the directory on which the file + system is being mounted. + +'vers=N' + Use NFS protocol version number N (can be 2 or 3). + +'wsize=N' + The NFS write packet size. You may need to set this if you are + using NFS/UDP through a gateway or a slow link. + + The following options are implemented by Amd, rather than being +passed to the kernel. + +'nounmount' + Configures the mount so that its time-to-live will never expire. + This is the default for non-network based filesystem types (such as + mounting local disks, floppies, and CD-ROMs). See also the related + unmount option. + +'ping=N' + The interval, in seconds, between keep-alive pings. When four + consecutive pings have failed the mount point is marked as hung. + This interval defaults to 30 seconds; if the ping interval is set + to zero, Amd will use the default 30-second interval. If the + interval is set to -1 (or any other negative value), no pings are + sent and the host is assumed to be always up, which can cause + unmounts to hang See the softlookup option for a better + alternative. Turning pings off can be useful in NFS-HA + (High-Availability) sites where the NFS service rarely goes down. + Setting the ping value to a large value can reduce the amount of + NFS_NULL chatter on your network considerably, especially in large + sites. + + Note that if you have multiple Amd entries using the same file + server, and each entry sets a different value of N, then each time + Amd mounts a new entry, the ping value will be re-evaluated (and + updated, turned off, or turned back on as needed). Finally, note + that NFS_NULL pings are sent for both UDP and TCP mounts, because + even a hung TCP mount can cause user processes to hang. + +'public' + Use WebNFS multi-component lookup on the public file handle instead + of the mount protocol to obtain NFS file handles, as documented in + the WebNFS Client Specification, RFC 2054. This means that Amd + will not attempt to contact the remote portmapper or remote mountd + daemon, and will only connect to the well-known NFS port 2049 or + the port specified with the port mount option, thus making it + easier to use NFS through a firewall. + +'retry=N' + The number of times to retry the mount system call. + +'softlookup' + Configures Amd's behavior with respect to already-mounted shares + from NFS fileservers that are unreachable. If softlookup is + specified, trying to access such a share will result in an error + (EIO, which is changed from the ENOENT 6.0 used to return). If it + is not specified, a regular symlink is provided and the access will + probably hang in the NFS filesystem. + + The default behavior depends on whether the mount is 'soft' or + 'hard'; softlookup can be used to change this default. This is + changed from 6.0 which always behaved as if softlookup was + specified. + +'unmount' + Configures the mount so that its time-to-live will indeed expire + (and thus may be automatically unmounted). This is also the + default for network-based filesystem types (e.g., NFS). This option + is useful for removable local media such as CD-ROMs, USB drives, + etc. so they can expire when not in use, and get unmounted (such + drives can get work out when they keep spinning). See also the + related nounmount option. + +'utimeout=N' + The interval, in seconds, that looked up and mounted map entries + are cached. After that period of time, Amd will attempt to unmount + the entries. If, however, the unmount fails (with EBUSY), then Amd + will extend the mount's time-to-live by the utimeout value before + the next unmount attempt is made. In fact the interval is extended + before the unmount is attempted, to avoid thrashing. The default + value is 120 seconds (two minutes) or as set by the '-w' command + line option. + +'xlatecookie' + Translate directory cookies between 32-long and 64-long lengths. + + +File: am-utils.info, Node: remopts Option, Next: sublink Option, Prev: opts Option, Up: Map Options + +3.3.4.5 remopts Option +...................... + +This option has the same use as '${opts}' but applies only when the +remote host is on a non-local network. For example, when using NFS +across a gateway it is often necessary to use smaller values for the +data read and write sizes. This can simply be done by specifying the +small values in REMOPTS. When a non-local host is accessed, the smaller +sizes will automatically be used. + + Amd determines whether a host is local by examining the network +interface configuration at startup. Any interface changes made after +Amd has been started will not be noticed. The likely effect will be +that a host may incorrectly be declared non-local. + + Unless otherwise set, the value of '${remopts}' is the same as the +value of '${opts}'. + + +File: am-utils.info, Node: sublink Option, Next: type Option, Prev: remopts Option, Up: Map Options + +3.3.4.6 sublink Option +...................... + +The subdirectory within the mounted filesystem to which the reference +should point. This can be used to prevent duplicate mounts in cases +where multiple directories in the same mounted filesystem are used. + + +File: am-utils.info, Node: type Option, Prev: sublink Option, Up: Map Options + +3.3.4.7 type Option +................... + +The filesystem type to be used. *Note Filesystem Types::, for a full +description of each type. + + +File: am-utils.info, Node: Amd Command Line Options, Next: Filesystem Types, Prev: Mount Maps, Up: Top + +4 Amd Command Line Options +************************** + +Many of Amd's parameters can be set from the command line. The command +line is also used to specify automount points and maps. + + The general format of a command line is + + amd [options] [{ directory map-name [-map-options] } ...] + + For each directory and map-name given or specified in the 'amd.conf' +file, Amd establishes an automount point. The "map-options" may be any +sequence of options or selectors--*note Location Format::. The +"map-options" apply only to Amd's mount point. + + 'type:=toplvl;cache:=mapdefault;fs:=${map}' is the default value for +the map options. Default options for a map are read from a special +entry in the map whose key is the string '/defaults'. When default +options are given they are prepended to any options specified in the +mount-map locations as explained in *note Map Defaults::. + + The "options" are any combination of those listed below. + + Once the command line has been parsed, the automount points are +mounted. The mount points are created if they do not already exist, in +which case they will be removed when Amd exits. Finally, Amd +disassociates itself from its controlling terminal and forks into the +background. + + Note: Even if Amd has been built with '-DDEBUG' (via 'configure +--enable-debug'), it will still background itself and disassociate +itself from the controlling terminal. To use a debugger it is necessary +to specify '-D daemon' on the command line. However, even with all of +this, mounts and unmounts are performed in the background, and Amd will +always fork before doing them. Therefore, debugging what happens +closely during un/mounts is more challenging. + + _All_ of Amd's command options (save '-F' and '-T') can be specified +in the 'amd.conf' file. *Note Amd Configuration File::. If Amd is +invoked without any command line options, it will default to using the +configuration file '/etc/amd.conf', if one exists. + +* Menu: + +* -a Option:: Automount directory. +* -c Option:: Cache timeout interval. +* -d Option:: Domain name. +* -k Option:: Kernel architecture. +* -l Option:: Log file. +* -n Option:: Hostname normalization. +* -o Option:: Operating system version. +* -p Option:: Output process id. +* -r Option:: Restart existing mounts. +* -t Option:: Kernel RPC timeout. +* -v Option:: Version information. +* -w Option:: Wait interval after failed unmount. +* -x Option:: Log options. +* -y Option:: NIS domain. +* -A Option:: Operating system Architecture. +* -C Option:: Cluster name. +* -D Option:: Debug flags. +* -F Option:: Amd configuration file. +* -H Option:: Show brief help. +* -O Option:: Operating system name. +* -S Option:: Lock executable pages in memory. +* -T Option:: Set tag for configuration file. + + +File: am-utils.info, Node: -a Option, Next: -c Option, Prev: Amd Command Line Options, Up: Amd Command Line Options + +4.1 '-a' DIRECTORY +================== + +Specifies the default mount directory. This option changes the variable +'${autodir}' which otherwise defaults to '/a'. For example, some sites +prefer '/amd' or '/n'. + + amd -a /amd ... + + +File: am-utils.info, Node: -c Option, Next: -d Option, Prev: -a Option, Up: Amd Command Line Options + +4.2 '-c' CACHE-INTERVAL +======================= + +Selects the period, in seconds, for which a name is cached by Amd. If +no reference is made to the volume in this period, Amd discards the +volume name to filesystem mapping. + + Once the last reference to a filesystem has been removed, Amd +attempts to unmount the filesystem. If the unmount fails the interval +is extended by a further period as specified by the '-w' command line +option or by the 'utimeout' mount option. + + The default "cache-interval" is 300 seconds (five minutes). + + +File: am-utils.info, Node: -d Option, Next: -k Option, Prev: -c Option, Up: Amd Command Line Options + +4.3 '-d' DOMAIN +=============== + +Specifies the host's domain. This sets the internal variable +'${domain}' and affects the '${hostd}' variable. + + If this option is not specified and the hostname already contains the +local domain then that is used, otherwise the default value of +'${domain}' is 'unknown.domain'. + + For example, if the local domain was 'doc.ic.ac.uk', Amd could be +started as follows: + + amd -d doc.ic.ac.uk ... + + +File: am-utils.info, Node: -k Option, Next: -l Option, Prev: -d Option, Up: Amd Command Line Options + +4.4 '-k' KERNEL-ARCHITECTURE +============================ + +Specifies the kernel architecture of the system. This is usually the +output of 'uname -m' (the "machine" value gotten from uname(2)). If the +uname(2) system call is not available, the value of '${karch}' defaults +to that of '${arch}'. + + The only effect of this option is to set the variable '${karch}'. + + This option would be used as follows: + + amd -k `arch -k` ... + + +File: am-utils.info, Node: -l Option, Next: -n Option, Prev: -k Option, Up: Amd Command Line Options + +4.5 '-l' LOG-OPTION +=================== + +Selects the form of logging to be made. Several special "log-options" +are recognized. + + 1. If "log-option" is the string 'syslog', Amd will use the syslog(3) + mechanism. If your system supports syslog facilities, then the + default facility used is 'LOG_DAEMON'. + + 2. When using syslog, if you wish to change the facility, append its + name to the log option name, delimited by a single colon. For + example, if "log-options" is the string 'syslog:local7' then Amd + will log messages via syslog(3) using the 'LOG_LOCAL7' facility. + If the facility name specified is not recognized, Amd will default + to 'LOG_DAEMON'. Note: while you can use any syslog facility + available on your system, it is generally a bad idea to use those + reserved for other services such as 'kern', 'lpr', 'cron', etc. + + 3. If "log-option" is the string '/dev/stderr', Amd will use standard + error, which is also the default target for log messages. To + implement this, Amd simulates the effect of the '/dev/fd' driver. + + Any other string is taken as a filename to use for logging. Log +messages are appended to the file if it already exists, otherwise a new +file is created. The file is opened once and then held open, rather +than being re-opened for each message. + + Normally, when long-running daemons hold an open file descriptor on a +log file, it is impossible to "rotate" the log file and compress older +logs on a daily basis. The daemon needs to be told to discard (via +close(2)) its file handle, and re-open the log file. This is done using +'amq -l' log-option. *Note Amq -l option::. + + If the 'syslog' option is specified but the system does not support +syslog or if the named file cannot be opened or created, Amd will use +standard error. Error messages generated before Amd has finished +parsing the command line are printed on standard error. + + Since Amd tends to generate a lot of logging information (especially +if debugging was turned on), and due to it being an important program +running on the system, it is usually best to log to a separate disk +file. In that case Amd would be started as follows: + + amd -l /var/log/amd ... + + +File: am-utils.info, Node: -n Option, Next: -o Option, Prev: -l Option, Up: Amd Command Line Options + +4.6 '-n' +======== + +Normalizes the remote hostname before using it. Normalization is done +by replacing the value of '${rhost}' with the (generally fully +qualified) primary name returned by a hostname lookup. + + This option should be used if several names are used to refer to a +single host in a mount map. + + +File: am-utils.info, Node: -o Option, Next: -p Option, Prev: -n Option, Up: Amd Command Line Options + +4.7 '-o' OP-SYS-VER +=================== + +Overrides the compiled-in version number of the operating system, with +OP-SYS-VER. Useful when the built-in version is not desired for +backward compatibility reasons. For example, if the built-in version is +'2.5.1', you can override it to '5.5.1', and use older maps that were +written with the latter in mind. + + +File: am-utils.info, Node: -p Option, Next: -r Option, Prev: -o Option, Up: Amd Command Line Options + +4.8 '-p' +======== + +Causes Amd's process id to be printed on standard output. This can be +redirected to a suitable file for use with kill: + + amd -p > /var/run/amd.pid ... + + This option only has an affect if Amd is running in daemon mode. If +Amd is started with the '-D daemon' debug flag, this option is ignored. + + +File: am-utils.info, Node: -r Option, Next: -t Option, Prev: -p Option, Up: Amd Command Line Options + +4.9 '-r' +======== + +Tells Amd to restart existing mounts (*note Inheritance Filesystem::). + + +File: am-utils.info, Node: -t Option, Next: -v Option, Prev: -r Option, Up: Amd Command Line Options + +4.10 '-t' TIMEOUT.RETRANSMIT +============================ + +Specifies the RPC "timeout" interval and the "retransmit" counter used +by the kernel to communicate to Amd. These are used to set the 'timeo' +and 'retrans' mount options, respectively. The default timeout is 0.8 +seconds, and the default number of retransmissions is 11. + + Amd relies on the kernel RPC retransmit mechanism to trigger mount +retries. The values of these parameters change the overall retry +interval. Too long an interval gives poor interactive response; too +short an interval causes excessive retries. + + +File: am-utils.info, Node: -v Option, Next: -w Option, Prev: -t Option, Up: Amd Command Line Options + +4.11 '-v' +========= + +Print version information on standard error and then exit. The output +is of the form: + + Copyright (c) 1997-1999 Erez Zadok + Copyright (c) 1990 Jan-Simon Pendry + Copyright (c) 1990 Imperial College of Science, Technology & Medicine + Copyright (c) 1990 The Regents of the University of California. + am-utils version 6.0a15 (build 61). + Built by ezk@example.com on date Wed Oct 22 15:21:03 EDT 1997. + cpu=sparc (big-endian), arch=sun4, karch=sun4u. + full_os=solaris2.5.1, os=sos5, osver=5.5.1, vendor=sun. + Map support for: root, passwd, union, nisplus, nis, ndbm, file, error. + AMFS: nfs, link, nfsx, nfsl, host, linkx, program, union, inherit, + ufs, lofs, hsfs, pcfs, auto, direct, toplvl, error. + FS: autofs, cachefs, cdfs, lofs, nfs, nfs3, pcfs, tfs, tmpfs, udf, ufs. + Network 1: wire="mcl-lab-net.cs.columbia.edu" (netnumber=128.59.13). + Network 2: wire="14-net.cs.columbia.edu" (netnumber=128.59.14). + Network 3: wire="old-net.cs.columbia.edu" (netnumber=128.59.16). + + The information includes the version number, number of times Amd was +compiled on the local system, release date and name of the release. +Following come the cpu type, byte ordering, and the architecture and +kernel architecture as '${arch}' and '${karch}', respectively. The next +line lists the operating system full name, short name, version, and +vendor. These four values correspond to the variables '${full_os}', +'${os}', '${osver}', and '${vendor}', respectively. *Note Supported +Platforms::. + + Then come a list of map types supported, filesystems internally +supported by Amd (AMFS), and generic filesystems available (FS). Finally +all known networks (if any) of this host are listed by name and number. +They are available via the variables '${wire}' or '${network}', and +'${netnumber}' (*note Selectors::) or the 'in_network' selector function +(*note in_network Selector Function::). + + +File: am-utils.info, Node: -w Option, Next: -x Option, Prev: -v Option, Up: Amd Command Line Options + +4.12 '-w' WAIT-TIMEOUT +====================== + +Selects the interval in seconds between unmount attempts after the +initial time-to-live has expired. + + This defaults to 120 seconds (two minutes). + + +File: am-utils.info, Node: -x Option, Next: -y Option, Prev: -w Option, Up: Amd Command Line Options + +4.13 '-x' OPTS +============== + +Specifies the type and verbosity of log messages. "opts" is a comma +separated list selected from the following options: + +'fatal' + Fatal errors (cannot be turned off) +'error' + Non-fatal errors (cannot be turned off) +'user' + Non-fatal user errors +'warn' + Recoverable errors +'warning' + Alias for 'warn' +'info' + Information messages +'map' + Mount map usage +'stats' + Additional statistics +'all' + All of the above +'defaults' + An alias for "fatal,error,user,warning,info". + + Initially a set of default logging flags is enabled. This is as if +'-x defaults' or '-x fatal,error,user,warning,info' had been selected. +The command line is parsed and logging is controlled by the '-x' option. +The very first set of logging flags is saved and can not be subsequently +disabled using Amq. This default set of options is useful for general +production use. + + The 'info' messages include details of what is mounted and unmounted +and when filesystems have timed out. If you want to have the default +set of messages without the 'info' messages then you simply need '-x +noinfo'. The messages given by 'user' relate to errors in the mount +maps, so these are useful when new maps are installed. The following +table lists the syslog priorities used for each of the message types. + +'fatal' + 'LOG_CRIT' +'error' + 'LOG_ERR' +'user' + 'LOG_WARNING' +'warning' + 'LOG_WARNING' +'info' + 'LOG_INFO' +'debug' + 'LOG_DEBUG' +'map' + 'LOG_DEBUG' +'stats' + 'LOG_INFO' + + The options can be prefixed by the string 'no' to indicate that this +option should be turned off. For example, to obtain all but 'info' +messages the option '-x all,noinfo' would be used. + + If Amd was built with debugging enabled the 'debug' option is +automatically enabled regardless of the command line options. + + +File: am-utils.info, Node: -y Option, Next: -A Option, Prev: -x Option, Up: Amd Command Line Options + +4.14 '-y' NIS-DOMAIN +==================== + +Selects an alternate NIS domain. This is useful for debugging and +cross-domain shared mounting. If this flag is specified, Amd +immediately attempts to bind to a server for this domain. + + +File: am-utils.info, Node: -A Option, Next: -C Option, Prev: -y Option, Up: Amd Command Line Options + +4.15 '-A' ARCHITECTURE +====================== + +Specifies the OS architecture of the system. The only effect of this +option is to set the variable '${arch}'. + + This option would be used as follows: + + amd -A i386 ... + + +File: am-utils.info, Node: -C Option, Next: -D Option, Prev: -A Option, Up: Amd Command Line Options + +4.16 '-C' CLUSTER-NAME +====================== + +Specifies the name of the cluster of which the local machine is a +member. The only effect is to set the variable '${cluster}'. The +"cluster-name" is will usually obtained by running another command which +uses a database to map the local hostname into a cluster name. +'${cluster}' can then be used as a selector to restrict mounting of +replicated data. If this option is not given, '${cluster}' has the same +value as '${domain}'. This would be used as follows: + + amd -C `clustername` ... + + +File: am-utils.info, Node: -D Option, Next: -F Option, Prev: -C Option, Up: Amd Command Line Options + +4.17 '-D' OPTS +============== + +Controls the verbosity and coverage of the debugging trace; "opts" is a +comma separated list of debugging options. The '-D' option is only +available if Amd was compiled with '-DDEBUG', or configured with +'configure --enable-debug'. The memory debugging facilities ('mem') are +only available if Amd was compiled with '-DDEBUG_MEM' (in addition to +'-DDEBUG'), or configured with 'configure --enable-debug=mem'. + + The most common options to use are '-D trace' and '-D test' (which +turns on all the useful debug options). As usual, every option can be +prefixed with 'no' to turn it off. + +'all' + all options (excluding hrtime and mtab) +'defaults' + "sensible" default options (all-excluding hrtime, mtab, and + xdrtrace) +'test' + full debug options plus mtab,nodaemon,nofork,noamq +'amq' + register Amd with the RPC portmapper, for Amq +'daemon' + enter daemon mode +'fork' + fork child worker (hlfsd only) +'full' + program trace +'hrtime' + print high resolution time stamps (only if syslog(3) is not used) +'info' + info service specific debugging (hesiod, nis, etc.) In the case of + hesiod maps, turns on the hesiod RES_DEBUG internal debugging + option. +'mem' + trace memory allocations. Needs to be explicitly enabled at + compile time with -enable-debug=mem. +'mtab' + use local mount-table file (defaults to '/tmp/mtab', *note + debug_mtab_file Parameter::) +'readdir' + show readdir progress +'str' + debug string munging +'trace' + trace RPC protocol and NFS mount arguments +'xdrtrace' + trace XDR routines + + You may also refer to the program source for a more detailed +explanation of the available options. + + +File: am-utils.info, Node: -F Option, Next: -H Option, Prev: -D Option, Up: Amd Command Line Options + +4.18 '-F' CONF-FILE +=================== + +Specify an Amd configuration file CONF-FILE to use. For a description +of the format and syntax, *note Amd Configuration File::. This +configuration file is used to specify any options in lieu of typing many +of them on the command line. The 'amd.conf' file includes directives +for every command line option Amd has, and many more that are only +available via the configuration file facility. The configuration file +specified by this option is processed after all other options had been +processed, regardless of the actual location of this option on the +command line. + + +File: am-utils.info, Node: -H Option, Next: -O Option, Prev: -F Option, Up: Amd Command Line Options + +4.19 '-H' +========= + +Print a brief help and usage string. + + +File: am-utils.info, Node: -O Option, Next: -S Option, Prev: -H Option, Up: Amd Command Line Options + +4.20 '-O' OP-SYS-NAME +===================== + +Overrides the compiled-in name of the operating system, with +OP-SYS-NAME. Useful when the built-in name is not desired for backward +compatibility reasons. For example, if the build in name is 'sunos5', +you can override it to the old name 'sos5', and use older maps which +were written with the latter in mind. + + +File: am-utils.info, Node: -S Option, Next: -T Option, Prev: -O Option, Up: Amd Command Line Options + +4.21 '-S' +========= + +Do _not_ lock the running executable pages of Amd into memory. To +improve Amd's performance, systems that support the plock(3) or +mlockall(2) call lock the Amd process into memory. This way there is +less chance the operating system will schedule, page out, and swap the +Amd process as needed. This tends to improve Amd's performance, at the +cost of reserving the memory used by the Amd process (making it +unavailable for other processes). If this behavior is not desired, use +the '-S' option. + + +File: am-utils.info, Node: -T Option, Prev: -S Option, Up: Amd Command Line Options + +4.22 '-T' TAG +============= + +Specify a tag to use with 'amd.conf'. All map entries tagged with TAG +will be processed. Map entries that are not tagged are always +processed. Map entries that are tagged with a tag other than TAG will +not be processed. + + +File: am-utils.info, Node: Filesystem Types, Next: Amd Configuration File, Prev: Amd Command Line Options, Up: Top + +5 Filesystem Types +****************** + +To mount a volume, Amd must be told the type of filesystem to be used. +Each filesystem type typically requires additional information such as +the fileserver name for NFS. + + From the point of view of Amd, a "filesystem" is anything that can +resolve an incoming name lookup. An important feature is support for +multiple filesystem types. Some of these filesystems are implemented in +the local kernel and some on remote fileservers, whilst the others are +implemented internally by Amd. + + The two common filesystem types are UFS and NFS. Four other user +accessible filesystems ('link', 'program', 'auto' and 'direct') are also +implemented internally by Amd and these are described below. There are +two additional filesystem types internal to Amd which are not directly +accessible to the user ('inherit' and 'error'). Their use is described +since they may still have an effect visible to the user. + +* Menu: + +* Network Filesystem:: A single NFS filesystem. +* Network Host Filesystem:: NFS mount a host's entire export tree. +* Network Filesystem Group:: An atomic group of NFS filesystems. +* Unix Filesystem:: Native disk filesystem. +* Caching Filesystem:: Caching from remote server filesystem. +* CD-ROM Filesystem:: ISO9660 CD ROM. +* UDF Filesystem:: Universal Disk Format filesystem. +* Loopback Filesystem:: Local loopback-mount filesystem. +* Memory/RAM Filesystem:: A memory or RAM-based filesystem. +* Null Filesystem:: 4.4BSD's loopback-mount filesystem. +* Floppy Filesystem:: MS-DOS Floppy filesystem. +* Translucent Filesystem:: The directory merging filesystem. +* Shared Memory+Swap Filesystem:: Sun's tmpfs filesystem. +* User ID Mapping Filesystem:: 4.4BSD's umapfs filesystem. +* Program Filesystem:: Generic Program mounts. +* Symbolic Link Filesystem:: Local link. +* Symbolic Link Filesystem II:: Local link referencing existing filesystem. +* NFS-Link Filesystem:: Link if path exists, NFS otherwise. +* Automount Filesystem:: +* Direct Automount Filesystem:: +* Union Filesystem:: +* Error Filesystem:: +* Top-level Filesystem:: +* Root Filesystem:: +* Inheritance Filesystem:: + + +File: am-utils.info, Node: Network Filesystem, Next: Network Host Filesystem, Prev: Filesystem Types, Up: Filesystem Types + +5.1 Network Filesystem ('nfs') +============================== + +The "nfs" ('type:=nfs') filesystem type provides access to Sun's NFS. + +The following options must be specified: + +'rhost' + the remote fileserver. This must be an entry in the hosts + database. IP addresses are not accepted. The default value is + taken from the local host name ('${host}') if no other value is + specified. + +'rfs' + the remote filesystem. If no value is specified for this option, + an internal default of '${path}' is used. + + NFS mounts require a two stage process. First, the "file handle" of +the remote file system must be obtained from the server. Then a mount +system call must be done on the local system. Amd keeps a cache of file +handles for remote file systems. The cache entries have a lifetime of a +few minutes. + + If a required file handle is not in the cache, Amd sends a request to +the remote server to obtain it. + + Historically, this documentation has maintained that Amd will try all +the locations in parallel and use the first one which responds with a +valid file handle. This has not been the case for quite some time, +however. Instead, Amd will go through each location, one by one, and +will only skip to the next one if the previous one either fails or times +out. + +An NFS entry might be: + + jsp host!=charm;type:=nfs;rhost:=charm;rfs:=/home/charm;sublink:=jsp + + The mount system call and any unmount attempts are always done in a +new task to avoid the possibility of blocking Amd. + + +File: am-utils.info, Node: Network Host Filesystem, Next: Network Filesystem Group, Prev: Network Filesystem, Up: Filesystem Types + +5.2 Network Host Filesystem ('host') +==================================== + +The "host" ('type:=host') filesystem allows access to the entire export +tree of an NFS server. The implementation is layered above the 'nfs' +implementation so keep-alives work in the same way. The only option +which needs to be specified is 'rhost' which is the name of the +fileserver to mount. + + The 'host' filesystem type works by querying the mount daemon on the +given fileserver to obtain its export list. Amd then obtains +filehandles for each of the exported filesystems. Any errors at this +stage cause that particular filesystem to be ignored. Finally each +filesystem is mounted. Again, errors are logged but ignored. One +common reason for mounts to fail is that the mount point does not exist. +Although Amd attempts to automatically create the mount point, it may be +on a remote filesystem to which Amd does not have write permission. + + When an attempt to unmount a 'host' filesystem mount fails, Amd +remounts any filesystems which had successfully been unmounted. To do +this Amd queries the mount daemon again and obtains a fresh copy of the +export list. Amd then tries to mount any exported filesystems which are +not currently mounted. + + Sun's automounter provides a special '-hosts' map. To achieve the +same effect with Amd requires two steps. First a mount map must be +created as follows: + + * type:=host;rhost:=${key};fs:=${autodir}/${rhost}/root + +and then start Amd with the following command + + amd /net net.map + +where 'net.map' is the name of map described above. Note that the value +of '${fs}' is overridden in the map. This is done to avoid a clash +between the mount tree and any other filesystem already mounted from the +same fileserver. + + If different mount options are needed for different hosts then +additional entries can be added to the map, for example + + host2 opts:=ro,nosuid,soft + +would soft mount 'host2' read-only. + + +File: am-utils.info, Node: Network Filesystem Group, Next: Unix Filesystem, Prev: Network Host Filesystem, Up: Filesystem Types + +5.3 Network Filesystem Group ('nfsx') +===================================== + +The "nfsx" ('type:=nfsx') filesystem allows a group of filesystems to be +mounted from a single NFS server. The implementation is layered above +the 'nfs' implementation so keep-alives work in the same way. + + _WARNING_: 'nfsx' is meant to be a "last resort" kind of solution. +It is racy and poorly supported. The authors _highly_ recommend that +other solutions be considered before relying on it. + + The options are the same as for the 'nfs' filesystem with one +difference for 'rfs', as explained below. + +The following options should be specified: + +'rhost' + the remote fileserver. The default value is taken from the local + host name ('${host}') if no other value is specified. + +'rfs' + is a list of filesystems to mount, and must be specified. The list + is in the form of a comma separated strings. + +For example: + + pub type:=nfsx;rhost:=gould;\ + rfs:=/public,/,graphics,usenet;fs:=${autodir}/${rhost}/root + + The first string defines the root of the tree, and is applied as a +prefix to the remaining members of the list which define the individual +filesystems. The first string is _not_ used as a filesystem name. A +serial operation is used to determine the local mount points to ensure a +consistent layout of a tree of mounts. + + Here, the _three_ filesystems, '/public', '/public/graphics' and +'/public/usenet', would be mounted. + + A local mount point, '${fs}', _must_ be specified. The default local +mount point will not work correctly in the general case. A suggestion +is to use 'fs:=${autodir}/${rhost}/root'. + + +File: am-utils.info, Node: Unix Filesystem, Next: Caching Filesystem, Prev: Network Filesystem Group, Up: Filesystem Types + +5.4 Unix Filesystem ('ufs', 'xfs', or 'efs') +============================================ + +The "ufs" ('type:=ufs') filesystem type provides access to the system's +standard disk filesystem--usually a derivative of the Berkeley Fast +Filesystem. + +The following option must be specified: + +'dev' + the block special device to be mounted. + + A UFS entry might be: + + jsp host==charm;type:=ufs;dev:=/dev/sd0d;sublink:=jsp + + UFS is the default Unix disk-based file system, which Am-utils picks +up during the autoconfiguration phase. Some systems have more than one +type, such as IRIX, that comes with EFS (Extent File System) and XFS +(Extended File System). In those cases, you may explicitly set the file +system type, by using entries such: + + ez1 type:=efs;dev:=/dev/xd0a + ez2 type:=xfs;dev:=/dev/sd3c + + The UFS/XFS/EFS filesystems are never timed out by default, i.e. +they will never be unmounted by Amd. If automatic unmounting is +desired, the "unmount" option should be added to the mount options for +the entry. + + +File: am-utils.info, Node: Caching Filesystem, Next: CD-ROM Filesystem, Prev: Unix Filesystem, Up: Filesystem Types + +5.5 Caching Filesystem ('cachefs') +================================== + +The "cachefs" ('type:=cachefs') filesystem caches files from one +location onto another, presumably providing faster access. It is +particularly useful to cache from a larger and remote (slower) NFS +partition to a smaller and local (faster) UFS directory. + +The following options must be specified: + +'cachedir' + the directory where the cache is stored. +'rfs' + the path name to the "back file system" to be cached from. +'fs' + the "front file system" mount point to the cached files, where Amd + will set a symbolic link pointing to. + + A CacheFS entry for, say, the '/import' Amd mount point, might be: + + copt type:=cachefs;cachedir:=/cache;rfs:=/import/opt;fs:=/n/import/copt + + Access to the pathname '/import/copt' will follow a symbolic link to +'/n/import/copt'. The latter is the mount point for a caching file +system, that caches from '/import/opt' to '/cache'. + + The cachefs filesystem is never timed out by default, i.e. it will +never be unmounted by Amd. If automatic unmounting is desired, the +"unmount" option should be added to the mount options for the entry. + + Caveats: + 1. This file system is currently only implemented for Solaris 2.x! + 2. Before being used for the first time, the cache directory must be + initialized with 'cfsadmin -c CACHEDIR'. See the manual page for + cfsadmin(1M) for more information. + 3. The "back file system" mounted must be a complete file system, not + a subdirectory thereof; otherwise you will get an error "Invalid + Argument". + 4. If Amd aborts abnormally, the state of the cache may be + inconsistent, requiring running the command 'fsck -F cachefs + CACHEDIR'. Otherwise you will get the error "No Space Left on + Device". + + +File: am-utils.info, Node: CD-ROM Filesystem, Next: UDF Filesystem, Prev: Caching Filesystem, Up: Filesystem Types + +5.6 CD-ROM Filesystem ('cdfs') +============================== + +The "cdfs" ('type:=cdfs') filesystem mounts a CD-ROM with an ISO9660 +format filesystem on it. + +The following option must be specified: + +'dev' + the block special device to be mounted. + + Some operating systems will fail to mount read-only CDs unless the +'ro' option is specified. A cdfs entry might be: + + cdfs os==sunos4;type:=cdfs;dev:=/dev/sr0 \ + os==sunos5;addopts:=ro;type:=cdfs;dev:=/dev/dsk/c0t6d0s2 + + +File: am-utils.info, Node: UDF Filesystem, Next: Loopback Filesystem, Prev: CD-ROM Filesystem, Up: Filesystem Types + +5.7 CD-ROM Filesystem ('udf') +============================= + +The "udf" ('type:=udf') filesystem mounts media with a Universal Disk +Format (UDF) filesystem on it, e.g., a video DVD. + +The following option must be specified: + +'dev' + the block special device to be mounted. + + Some operating systems will fail to mount read-only media unless the +'ro' option is specified. A udf entry might be: + + udf os==sunos4;type:=udf;dev:=/dev/sr0 \ + os==sunos5;addopts:=ro;type:=udf;dev:=/dev/dsk/c0t6d0s2 + + +File: am-utils.info, Node: Loopback Filesystem, Next: Memory/RAM Filesystem, Prev: UDF Filesystem, Up: Filesystem Types + +5.8 Loopback Filesystem ('lofs') +================================ + +The "lofs" ('type:=lofs') filesystem is also called the loopback +filesystem. It mounts a local directory on another, thus providing +mount-time binding to another location (unlike symbolic links). + + The loopback filesystem is particularly useful within the context of +a chroot-ed directory (via chroot(2)), to provide access to directories +otherwise inaccessible. + +The following option must be specified: + +'rfs' + the pathname to be mounted on top of '${fs}'. + + Usually, the FTP server runs in a chroot-ed environment, for security +reasons. In this example, lofs is used to provide a subdirectory within +a user's home directory, also available for public ftp. + + lofs type:=lofs;rfs:=/home/ezk/myftpdir;fs:=/usr/ftp/pub/ezk + + +File: am-utils.info, Node: Memory/RAM Filesystem, Next: Null Filesystem, Prev: Loopback Filesystem, Up: Filesystem Types + +5.9 Memory/RAM Filesystem ('mfs') +================================= + +The "mfs" ('type:=mfs') filesystem is available in 4.4BSD, Linux, and +other systems. It creates a filesystem in a portion of the system's +memory, thus providing very fast file (volatile) access. + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: Null Filesystem, Next: Floppy Filesystem, Prev: Memory/RAM Filesystem, Up: Filesystem Types + +5.10 Null Filesystem ('nullfs') +=============================== + +The "nullfs" ('type:=nullfs') filesystem is available from 4.4BSD, and +is very similar to the loopback filesystem, "lofs". + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: Floppy Filesystem, Next: Translucent Filesystem, Prev: Null Filesystem, Up: Filesystem Types + +5.11 Floppy Filesystem ('pcfs') +=============================== + +The "pcfs" ('type:=pcfs') filesystem mounts a floppy previously +formatted for the MS-DOS format. + +The following option must be specified: + +'dev' + the block special device to be mounted. + + A pcfs entry might be: + + pcfs os==sunos4;type:=pcfs;dev:=/dev/fd0 \ + os==sunos5;type:=pcfs;dev:=/dev/diskette + + +File: am-utils.info, Node: Translucent Filesystem, Next: Shared Memory+Swap Filesystem, Prev: Floppy Filesystem, Up: Filesystem Types + +5.12 Translucent Filesystem ('tfs') +=================================== + +The "tfs" ('type:=tfs') filesystem is an older version of the 4.4BSD +"unionfs". + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: Shared Memory+Swap Filesystem, Next: User ID Mapping Filesystem, Prev: Translucent Filesystem, Up: Filesystem Types + +5.13 Shared Memory+Swap Filesystem ('tmpfs') +============================================ + +The "tmpfs" ('type:=tmpfs') filesystem shares memory between a the swap +device and the rest of the system. It is generally used to provide a +fast access '/tmp' directory, one that uses memory that is otherwise +unused. This filesystem is available in SunOS 4.x and 5.x. + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: User ID Mapping Filesystem, Next: Program Filesystem, Prev: Shared Memory+Swap Filesystem, Up: Filesystem Types + +5.14 User ID Mapping Filesystem ('umapfs') +========================================== + +The "umapfs" ('type:=umapfs') filesystem maps User IDs of file +ownership, and is available from 4.4BSD. + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: Program Filesystem, Next: Symbolic Link Filesystem, Prev: User ID Mapping Filesystem, Up: Filesystem Types + +5.15 Program Filesystem ('program') +=================================== + +The "program" ('type:=program') filesystem type allows a program to be +run whenever a mount or unmount is required. This allows easy addition +of support for other filesystem types, such as MIT's Remote Virtual Disk +(RVD) which has a programmatic interface via the commands 'rvdmount' and +'rvdunmount'. + +Both of the following options must be specified: + +'mount' + the program which will perform the mount. + +'unmount' +'umount' + the program which will perform the unmount. For convenience, you + may use either 'unmount' or 'umount' but not both. If neither is + defined, Amd will default to 'umount ${fs}' (the actual unmount + program pathname will be automatically determined at the time GNU + 'configure' runs.) + + The exit code from these two programs is interpreted as a Unix error +code. As usual, exit code zero indicates success. To execute the +program, Amd splits the string on whitespace to create an array of +substrings. Single quotes ''' can be used to quote whitespace if that +is required in an argument. There is no way to escape or change the +single quote character. + + To run e.g. the program 'rvdmount' with a host name and filesystem +as arguments, it would be specified by +'fs:=${autodir}${path};type:=program;mount:="/etc/rvdmount rvdmount +fserver ${fs}";unmount:="/etc/rdvumount rvdumount ${fs}"'. + + The first element in the array is taken as the pathname of the +program to execute. The other members of the array form the argument +vector to be passed to the program, "including argument zero". The +array is exactly the same as the array passed to the execv() system call +(man execv for details). The split string must have at least two +elements. The programs are directly executed by Amd, not via a shell. +Therefore, if a script is to be used as a mount/umount program, it +"must" begin with a '#!' interpreter specification. + + Often, this program mount type is used for Samba mounts, where you +need a double slash in pathnames. However, Amd normalizes sequences of +slashes into one slash. Therefore, you must use an escaped slash, +preceded by an escaped backslash. So to get a double slash in the mount +command, you need the eight character sequence '\\\/\\\/' in your map. +For example: + + 'mount="/sbin/mount mount -r -t smbfs -o-N,-Ihostname +\\\/\\\/guest@venus/mp3"' + + If a filesystem type is to be heavily used, it may be worthwhile +adding a new filesystem type into Amd, but for most uses the program +filesystem should suffice. + + When the program is run, standard input and standard error are +inherited from the current values used by Amd. Standard output is a +duplicate of standard error. The value specified with the '-l' command +line option has no effect on standard error. + + Amd guarantees that the mountpoint will be created before calling the +mount program, and that it will be removed after the umount program +returns success. + + +File: am-utils.info, Node: Symbolic Link Filesystem, Next: Symbolic Link Filesystem II, Prev: Program Filesystem, Up: Filesystem Types + +5.16 Symbolic Link Filesystem ('link') +====================================== + +Each filesystem type creates a symbolic link to point from the volume +name to the physical mount point. The 'link' filesystem does the same +without any other side effects. This allows any part of the machines +name space to be accessed via Amd. + + One common use for the symlink filesystem is '/homes' which can be +made to contain an entry for each user which points to their +(auto-mounted) home directory. Although this may seem rather expensive, +it provides a great deal of administrative flexibility. + +The following option must be defined: + +'fs' + The value of FS option specifies the destination of the link, as + modified by the SUBLINK option. If SUBLINK is non-null, it is + appended to '${fs}''/' and the resulting string is used as the + target. + + The 'link' filesystem can be thought of as identical to the 'ufs' +filesystem but without actually mounting anything. + + An example entry might be: + + jsp host==charm;type:=link;fs:=/home/charm;sublink:=jsp + which would return a symbolic link pointing to '/home/charm/jsp'. + + +File: am-utils.info, Node: Symbolic Link Filesystem II, Next: NFS-Link Filesystem, Prev: Symbolic Link Filesystem, Up: Filesystem Types + +5.17 Symbolic Link Filesystem II ('linkx') +========================================== + +The "linkx" ('type:=linkx') filesystem type is identical to 'link' with +the exception that the target of the link must exist. Existence is +checked with the lstat(2) system call. + + The 'linkx' filesystem type is particularly useful for wildcard map +entries. In this case, a list of possible targets can be given and Amd +will choose the first one which exists on the local machine. + + +File: am-utils.info, Node: NFS-Link Filesystem, Next: Automount Filesystem, Prev: Symbolic Link Filesystem II, Up: Filesystem Types + +5.18 NFS-Link Filesystem ('nfsl') +================================= + +The "nfsl" ('type:=nfsl') filesystem type is a combination of two +others: 'link' and 'nfs'. If the local host name is equal to the value +of '${rhost}' _and_ the target pathname listed in '${fs}' exists, 'nfsl' +will behave exactly as 'type:=link', and refer to the target as a +symbolic link. If the local host name is not equal to the value of +'${rhost}', or if the target of the link does not exist, Amd will treat +it as 'type:=nfs', and will mount a remote pathname for it. + + The 'nfsl' filesystem type is particularly useful as a shorthand for +the more cumbersome and yet one of the most popular Amd entries. For +example, you can simplify all map entries that look like: + + zing -fs:=/n/shekel/u/zing \ + host!=shekel;type:=nfs;rhost:=shekel;rfs:=${fs} \ + host==shekel;type:=link + + or + + zing -fs:=/n/shekel/u/zing \ + exists(${fs});type:=link \ + !exists(${fs});type:=nfs;rhost:=shekel;rfs:=${fs} + + into a shorter form + + zing type:=nfsl;fs:=/n/shekel/u/zing;rhost:=shekel;rfs:=${fs} + + Not just does it make the maps smaller and simpler, but it avoids +possible mistakes that often happen when forgetting to set up the two +entries (one for 'type:=nfs' and the other for 'type:=link') necessary +to perform transparent mounts of existing or remote mounts. + + +File: am-utils.info, Node: Automount Filesystem, Next: Direct Automount Filesystem, Prev: NFS-Link Filesystem, Up: Filesystem Types + +5.19 Automount Filesystem ('auto') +================================== + +The "auto" ('type:=auto') filesystem type creates a new automount point +below an existing automount point. Top-level automount points appear as +system mount points. An automount mount point can also appear as a +sub-directory of an existing automount point. This allows some +additional structure to be added, for example to mimic the mount tree of +another machine. + + The following options may be specified: + +'cache' + specifies whether the data in this mount-map should be cached. The + default value is 'none', in which case no caching is done in order + to conserve memory. + + However, better performance and reliability can be obtained by + caching some or all of a mount-map. + + If the cache option specifies 'all', the entire map is enumerated + when the mount point is created. + + If the cache option specifies 'inc', caching is done incrementally + as and when data is required. Some map types do not support cache + mode 'all', in which case 'inc' is used whenever 'all' is + requested. + + Caching can be entirely disabled by using cache mode 'none'. + + If the cache option specifies 'regexp' then the entire map will be + enumerated and each key will be treated as an egrep-style regular + expression. The order in which a cached map is searched does not + correspond to the ordering in the source map so the regular + expressions should be mutually exclusive to avoid confusion. + + Each mount map type has a default cache type, usually 'inc', which + can be selected by specifying 'mapdefault'. + + The cache mode for a mount map can only be selected on the command + line. Starting Amd with the command: + + amd /homes hesiod.homes -cache:=inc + + will cause '/homes' to be automounted using the "Hesiod" name + server with local incremental caching of all successfully resolved + names. + + All cached data is forgotten whenever Amd receives a 'SIGHUP' + signal and, if cache 'all' mode was selected, the cache will be + reloaded. This can be used to inform Amd that a map has been + updated. In addition, whenever a cache lookup fails and Amd needs + to examine a map, the map's modify time is examined. If the cache + is out of date with respect to the map then it is flushed as if a + 'SIGHUP' had been received. + + An additional option ('sync') may be specified to force Amd to + check the map's modify time whenever a cached entry is being used. + For example, an incremental, synchronized cache would be created by + the following command: + + amd /homes hesiod.homes -cache:=inc,sync + +'fs' + specifies the name of the mount map to use for the new mount point. + + Arguably this should have been specified with the '${rfs}' option + but we are now stuck with it due to historical accident. + +'pref' + alters the name that is looked up in the mount map. If '${pref}', + the "prefix", is non-null then it is prepended to the name + requested by the kernel "before" the map is searched. The default + prefix is the prefix of the parent map (if any) with name of the + auto node appended to it. That means if you want no prefix you + must say so in the map: 'pref:=null'. + +'opts' + Normally, 'auto' style maps are not browsable even if you turn on + directory browsability (*note browsable_dirs Parameter::). To + enable browsing entries in 'auto' maps, specify 'opts:=browsable' + or 'opts:=fullybrowsable' in the description of this map. + + The server 'dylan.doc.ic.ac.uk' has two user disks: '/dev/dsk/2s0' +and '/dev/dsk/5s0'. These are accessed as '/home/dylan/dk2' and +'/home/dylan/dk5' respectively. Since '/home' is already an automount +point, this naming is achieved with the following map entries: + + dylan type:=auto;fs:=${map};pref:=${key}/ + dylan/dk2 type:=ufs;dev:=/dev/dsk/2s0 + dylan/dk5 type:=ufs;dev:=/dev/dsk/5s0 + + +File: am-utils.info, Node: Direct Automount Filesystem, Next: Union Filesystem, Prev: Automount Filesystem, Up: Filesystem Types + +5.20 Direct Automount Filesystem ('direct') +=========================================== + +The "direct" ('type:=direct') filesystem is almost identical to the +automount filesystem. Instead of appearing to be a directory of mount +points, it appears as a symbolic link to a mounted filesystem. The +mount is done at the time the link is accessed. *Note Automount +Filesystem::, for a list of required options. + + Direct automount points are created by specifying the 'direct' +filesystem type on the command line: + + amd ... /usr/man auto.direct -type:=direct + + where 'auto.direct' would contain an entry such as: + + usr/man -type:=nfs;rfs:=/usr/man \ + rhost:=man-server1 rhost:=man-server2 + + In this example, 'man-server1' and 'man-server2' are file servers +which export copies of the manual pages. Note that the key which is +looked up is the name of the automount point without the leading '/'. + + Note that the implementation of the traditional "direct" filesystem +is essentially a hack (pretending that the root of an NFS filesystem is +a symlink) and many modern operating systems get very unhappy about it. +For example, Linux kernel 2.4+ completely disallows it, and Solaris 2.8 +fails to unmount it when Amd shuts down. Therefore, the use of the +traditional "direct" filesystem is strongly discouraged; it is only +semi-supported, at best. + + The autofs implementations that permit direct mounts are fully +supported, however. That currently includes all versions of Solaris. +Linux autofs does NOT support direct mounts at all. + + +File: am-utils.info, Node: Union Filesystem, Next: Error Filesystem, Prev: Direct Automount Filesystem, Up: Filesystem Types + +5.21 Union Filesystem ('union') +=============================== + +The "union" ('type:=union') filesystem type allows the contents of +several directories to be merged and made visible in a single directory. +This can be used to overcome one of the major limitations of the Unix +mount mechanism which only allows complete directories to be mounted. + + For example, supposing '/tmp' and '/var/tmp' were to be merged into a +new directory called '/mtmp', with files in '/var/tmp' taking +precedence. The following command could be used to achieve this effect: + + amd ... /mtmp union:/tmp:/var/tmp -type:=union + + Currently, the unioned directories must _not_ be automounted. That +would cause a deadlock. This seriously limits the current usefulness of +this filesystem type and the problem will be addressed in a future +release of Amd. + + Files created in the union directory are actually created in the last +named directory. This is done by creating a wildcard entry which points +to the correct directory. The wildcard entry is visible if the union +directory is listed, so allowing you to see which directory has +priority. + + The files visible in the union directory are computed at the time Amd +is started, and are not kept up-to-date with respect to the underlying +directories. Similarly, if a link is removed, for example with the 'rm' +command, it will be lost forever. + + +File: am-utils.info, Node: Error Filesystem, Next: Top-level Filesystem, Prev: Union Filesystem, Up: Filesystem Types + +5.22 Error Filesystem ('error') +=============================== + +The "error" ('type:=error') filesystem type is used internally as a +catch-all in the case where none of the other filesystems was selected, +or some other error occurred. Lookups and mounts always fail with "No +such file or directory". All other operations trivially succeed. + + The error filesystem is not directly accessible. + + +File: am-utils.info, Node: Top-level Filesystem, Next: Root Filesystem, Prev: Error Filesystem, Up: Filesystem Types + +5.23 Top-level Filesystem ('toplvl') +==================================== + +The "toplvl" ('type:=toplvl') filesystems is derived from the 'auto' +filesystem and is used to mount the top-level automount nodes. Requests +of this type are automatically generated from the command line +arguments. + + +File: am-utils.info, Node: Root Filesystem, Next: Inheritance Filesystem, Prev: Top-level Filesystem, Up: Filesystem Types + +5.24 Root Filesystem ('root') +============================= + +The "root" ('type:=root') filesystem type acts as an internal +placeholder onto which Amd can pin 'toplvl' mounts. Only one node of +this type need ever exist and one is created automatically during +startup. The effect of having more than one root node is undefined. + + The root filesystem is not directly accessible. + + +File: am-utils.info, Node: Inheritance Filesystem, Prev: Root Filesystem, Up: Filesystem Types + +5.25 Inheritance Filesystem ('inherit') +======================================= + +The "inheritance" ('type:=inherit') filesystem is not directly +accessible. Instead, internal mount nodes of this type are +automatically generated when Amd is started with the '-r' option. At +this time the system mount table is scanned to locate any filesystems +which are already mounted. If any reference to these filesystems is +made through Amd then instead of attempting to mount it, Amd simulates +the mount and "inherits" the filesystem. This allows a new version of +Amd to be installed on a live system simply by killing the old daemon +with 'SIGTERM' and starting the new one. + + This filesystem type is not generally visible externally, but it is +possible that the output from 'amq -m' may list 'inherit' as the +filesystem type. This happens when an inherit operation cannot be +completed for some reason, usually because a fileserver is down. + + +File: am-utils.info, Node: Amd Configuration File, Next: Run-time Administration, Prev: Filesystem Types, Up: Top + +6 Amd Configuration File +************************ + +The 'amd.conf' file is the configuration file for Amd, as part of the +am-utils suite. This file contains runtime configuration information +for the Amd automounter program. + +* Menu: + +* File Format:: +* The Global Section:: +* Regular Map Sections:: +* Common Parameters:: +* Global Parameters:: +* Regular Map Parameters:: +* amd.conf Examples:: + + +File: am-utils.info, Node: File Format, Next: The Global Section, Prev: Amd Configuration File, Up: Amd Configuration File + +6.1 File Format +=============== + +The 'amd.conf' file consists of sections and parameters. A section +begins with the name of the section in square brackets '[]' and +continues until the next section begins or the end of the file is +reached. Sections contain parameters of the form 'name = value'. + + The file is line-based -- that is, each newline-terminated line +represents either a comment, a section name or a parameter. No +line-continuation syntax is available. + + Section names, parameter names and their values are case sensitive. + + Only the first equals sign in a parameter is significant. Whitespace +before or after the first equals sign is discarded. Leading, trailing +and internal whitespace in section and parameter names is irrelevant. +Leading and trailing whitespace in a parameter value is discarded. +Internal whitespace within a parameter value is not allowed, unless the +whole parameter value is quoted with double quotes as in 'name = "some +value"'. + + Any line beginning with a pound sign '#' is ignored, as are lines +containing only whitespace. + + The values following the equals sign in parameters are all either a +string (no quotes needed if string does not include spaces) or a +boolean, which may be given as 'yes'/'no'. Case is significant in all +values. Some items such as cache timeouts are numeric. + + +File: am-utils.info, Node: The Global Section, Next: Regular Map Sections, Prev: File Format, Up: Amd Configuration File + +6.2 The Global Section +====================== + +The global section must be specified as '[global]'. Parameters in this +section either apply to Amd as a whole, or to all other regular map +sections which follow. There should be only one global section defined +in one configuration file. + + It is highly recommended that this section be specified first in the +configuration file. If it is not, then regular map sections which +precede it will not use global values defined later. + + +File: am-utils.info, Node: Regular Map Sections, Next: Common Parameters, Prev: The Global Section, Up: Amd Configuration File + +6.3 Regular Map Sections +======================== + +Parameters in regular (non-global) sections apply to a single map entry. +For example, if the map section '[/homes]' is defined, then all +parameters following it will be applied to the '/homes' Amd-managed +mount point. + + +File: am-utils.info, Node: Common Parameters, Next: Global Parameters, Prev: Regular Map Sections, Up: Amd Configuration File + +6.4 Common Parameters +===================== + +These parameters can be specified either in the global or a map-specific +section. Entries specified in a map-specific section override the +default value or one defined in the global section. If such a common +parameter is specified only in the global section, it is applicable to +all regular map sections that follow. + +* Menu: + +* autofs_use_lofs Parameter:: +* browsable_dirs Parameter:: +* map_defaults Parameter:: +* map_options Parameter:: +* map_type Parameter:: +* mount_type Parameter:: +* search_path Parameter:: +* selectors_in_defaults Parameter:: +* sun_map_syntax Parameter:: + + +File: am-utils.info, Node: autofs_use_lofs Parameter, Next: browsable_dirs Parameter, Prev: Common Parameters, Up: Common Parameters + +6.4.1 autofs_use_lofs Parameter +------------------------------- + +(type=string, default='yes'). When set to 'yes', Amd's autofs code will +use lofs-type (loopback) mounts for 'type:=link' mounts, as well as +several other cases that require local references. This has the +advantage that Amd does not use a secondary mount point and users do not +see external pathnames (the infamous '/bin/pwd' problem, where it +reports a different path than the user chdir'ed into). One of the +disadvantages of using this option is that the autofs code is relatively +new and the in-place mounts have not been throughly tested. + + If this option is set to 'no', then Amd's autofs code will use +symlinks instead of lofs-type mounts for local references. This has the +advantage of using simpler (more stable) code, but at the expense of +negating one of autofs's big advantages: the hiding of Amd's internal +paths. Note that symlinks are not supported in all autofs +implementations, especially those derived from Solaris Autofs v1. Also, +on Solaris 2.6 and newer, autofs symlinks are not cached, resulting in +repeated up-call requests to Amd. + + +File: am-utils.info, Node: browsable_dirs Parameter, Next: map_defaults Parameter, Prev: autofs_use_lofs Parameter, Up: Common Parameters + +6.4.2 browsable_dirs Parameter +------------------------------ + +(type=string, default='no'). If 'yes', then Amd's top-level mount +points will be browsable to readdir(3) calls. This means you could run +for example ls(1) and see what keys are available to mount in that +directory. Not all entries are made visible to readdir(3): the +'/defaults' entry, wildcard entries, and those with a '/' in them are +not included. If you specify 'full' to this option, all but the +'/defaults' entry will be visible. Note that if you run a command which +will attempt to stat(2) the entries, such as often done by 'ls -l' or +'ls -F', Amd will attempt to mount every entry in that map. This is +often called a "mount storm". + + Note that mount storms are mostly avoided by using autofs mounts +('mount_type = autofs'). + + +File: am-utils.info, Node: map_defaults Parameter, Next: map_options Parameter, Prev: browsable_dirs Parameter, Up: Common Parameters + +6.4.3 map_defaults Parameter +---------------------------- + +(type=string, default to empty). This option sets a string to be used +as the map's '/defaults' entry, overriding any '/defaults' specified in +the map. This allows local users to override a given map's defaults +without modifying maps globally (which is impossible in sites where the +maps are managed by a different administrative group). + + +File: am-utils.info, Node: map_options Parameter, Next: map_type Parameter, Prev: map_defaults Parameter, Up: Common Parameters + +6.4.4 map_options Parameter +--------------------------- + +(type=string, default no options). This option is the same as +specifying map options on the command line to Amd, such as 'cache:=all'. + + +File: am-utils.info, Node: map_type Parameter, Next: mount_type Parameter, Prev: map_options Parameter, Up: Common Parameters + +6.4.5 map_type Parameter +------------------------ + +(type=string, default search all map types). If specified, Amd will +initialize the map only for the type given. This is useful to avoid the +default map search type used by Amd which takes longer and can have +undesired side-effects such as initializing NIS even if not used. +Possible values are + +'file' + plain files +'hesiod' + Hesiod name service from MIT +'ldap' + Lightweight Directory Access Protocol +'ndbm' + (New) dbm style hash files +'nis' + Network Information Services (version 2) +'nisplus' + Network Information Services Plus (version 3) +'passwd' + local password files +'union' + union maps + + +File: am-utils.info, Node: mount_type Parameter, Next: search_path Parameter, Prev: map_type Parameter, Up: Common Parameters + +6.4.6 mount_type Parameter +-------------------------- + +(type=string, default='nfs'). All Amd mount types default to NFS. That +is, Amd is an NFS server on the map mount points, for the local host it +is running on. If 'autofs' is specified, Amd will be an autofs server +for those mount points. + + +File: am-utils.info, Node: search_path Parameter, Next: selectors_in_defaults Parameter, Prev: mount_type Parameter, Up: Common Parameters + +6.4.7 search_path Parameter +--------------------------- + +(type=string, default no search path). This provides a +(colon-delimited) search path for file maps. Using a search path, sites +can allow for local map customizations and overrides, and can +distributed maps in several locations as needed. + + +File: am-utils.info, Node: selectors_in_defaults Parameter, Next: sun_map_syntax Parameter, Prev: search_path Parameter, Up: Common Parameters + +6.4.8 selectors_in_defaults Parameter +------------------------------------- + +(type=boolean, default='no'). If 'yes', then the '/defaults' entry of +maps will search for and process any selectors before setting defaults +for all other keys in that map. Useful when you want to set different +options for a complete map based on some parameters. For example, you +may want to better the NFS performance over slow slip-based networks as +follows: + + /defaults \ + wire==slip-net;opts:=intr,rsize=1024,wsize=1024 \ + wire!=slip-net;opts:=intr,rsize=8192,wsize=8192 + + Deprecated form: selectors_on_default. + + +File: am-utils.info, Node: sun_map_syntax Parameter, Prev: selectors_in_defaults Parameter, Up: Common Parameters + +6.4.9 sun_map_syntax Parameter +------------------------------ + +(type=boolean, default='no'). If 'yes', then Amd will parse the map +according to the Sun Automount syntax. + + +File: am-utils.info, Node: Global Parameters, Next: Regular Map Parameters, Prev: Common Parameters, Up: Amd Configuration File + +6.5 Global Parameters +===================== + +The following parameters are applicable to the '[global]' section only. + +* Menu: + +* arch Parameter:: +* auto_attrcache Parameter:: +* auto_dir Parameter:: +* cache_duration Parameter:: +* cluster Parameter:: +* debug_mtab_file Parameter:: +* debug_options Parameter:: +* dismount_interval Parameter:: +* domain_strip Parameter:: +* exec_map_timeout Parameter:: +* forced_unmounts Parameter:: +* full_os Parameter:: +* fully_qualified_hosts Parameter:: +* hesiod_base Parameter:: +* karch Parameter:: +* ldap_base Parameter:: +* ldap_cache_maxmem Parameter:: +* ldap_cache_seconds Parameter:: +* ldap_hostports Parameter:: +* ldap_proto_version Parameter:: +* local_domain Parameter:: +* localhost_address Parameter:: +* log_file Parameter:: +* log_options Parameter:: +* map_reload_interval Parameter:: +* nfs_allow_any_interface Parameter:: +* nfs_allow_insecure_port Parameter:: +* nfs_proto Parameter:: +* nfs_retransmit_counter Parameter:: +* nfs_retransmit_counter_udp Parameter:: +* nfs_retransmit_counter_tcp Parameter:: +* nfs_retransmit_counter_toplvl Parameter:: +* nfs_retry_interval Parameter:: +* nfs_retry_interval_udp Parameter:: +* nfs_retry_interval_tcp Parameter:: +* nfs_retry_interval_toplvl Parameter:: +* nfs_vers Parameter:: +* nis_domain Parameter:: +* normalize_hostnames Parameter:: +* normalize_slashes Parameter:: +* os Parameter:: +* osver Parameter:: +* pid_file Parameter:: +* plock Parameter:: +* portmap_program Parameter:: +* preferred_amq_port Parameter:: +* print_pid Parameter:: +* print_version Parameter:: +* restart_mounts Parameter:: +* show_statfs_entries Parameter:: +* truncate_log Parameter:: +* unmount_on_exit Parameter:: +* use_tcpwrappers Parameter:: +* vendor Parameter:: + + +File: am-utils.info, Node: arch Parameter, Next: auto_attrcache Parameter, Prev: Global Parameters, Up: Global Parameters + +6.5.1 arch Parameter +-------------------- + +(type=string, default to compiled in value). Same as the '-A' option to +Amd. Allows you to override the value of the arch Amd variable. + + +File: am-utils.info, Node: auto_attrcache Parameter, Next: auto_dir Parameter, Prev: arch Parameter, Up: Global Parameters + +6.5.2 auto_attrcache Parameter +------------------------------ + +(type=numeric, default=0). Specify in seconds (or units of 0.1 seconds, +depending on the OS), what is the (kernel-side) NFS attribute cache +timeout for Amd's own automount points. A value of 0 is supposed to +turn off attribute caching, meaning that Amd will be consulted via a +kernel-RPC each time someone stat()'s the mount point (which could be +abused as a denial-of-service attack). + + _WARNING_: Amd depends on being able to turn off the NFS attribute +cache of the client OS. If it cannot be turned off, then users may get +ESTALE errors or symlinks that point to the wrong places. This is more +likely under heavy use of Amd, for example if your system is +experiencing frequent map changes or frequent mounts/unmounts. +Therefore, under normal circumstances, this parameter should remain set +to 0, to ensure that the attribute cache is indeed off. + + Unfortunately, some kernels (e.g., certain BSDs) don't have a way to +turn off the NFS attribute cache. Setting this parameter to 0 is +supposed to turn off attribute caching entirely, but unfortunately it +does not; instead, the attribute cache is set to some internal +hard-coded default (usually anywhere from 5-30 seconds). If you suspect +that your OS doesn't have a reliable way of turning off the attribute +cache, then it is better to set this parameter to the smallest possible +non-zero value (set 'auto_attrcache=1' in your 'amd.conf'). This will +not eliminate the problem, but reduce the risk window somewhat. The +best solutions are (1) to use Amd in Autofs mode, if it's supported in +your OS, and (2) talk to your OS vendor to support a true 'noac' flag. +See the README.attrcache +(http://www.am-utils.org/docs/am-utils/attrcache.txt) document for more +details. + + If you are able to turn off the attribute cache on your OS, alas, +Amd's performance may degrade (when not using Autofs) because every +traversal of an automounter-controlled pathname will result in a lookup +request from the kernel to Amd. Under heavy loads, for example when +using recursive tools like 'find', 'rdist', or 'rsync', this performance +degradation can be noticeable. There are two possible solutions that +some administrators have chosen to improve performance: + + 1. First, you can turn off unmounting using the 'nounmount' mount + option. This will ensure that no Amd symlink could ever change, + thereby the kernel's attribute cache and Amd will always be in + sync. However, this method will cause the number of mounts to keep + growing, even if some are no longer in use; this has the + disadvantage that your system could be more susceptible to hangs if + even one of those accumulating mounts hangs due to a downed server. + + 2. Second, you can turn on attribute caching carefully by setting a + small automounter attribute cache value (say, one second), and a + relatively large dismount interval (say, one hour). (*Note + dismount_interval Parameter::.) For example, you can set this in + your 'amd.conf': + + [global] + auto_attrcache = 1 + dismount_interval = 3600 + + This has the benefit of using the kernel's attribute cache and thus + improving performance. The disadvantage with this option is that + the window of vulnerability is not eliminated entirely: it is only + made smaller. + + +File: am-utils.info, Node: auto_dir Parameter, Next: cache_duration Parameter, Prev: auto_attrcache Parameter, Up: Global Parameters + +6.5.3 auto_dir Parameter +------------------------ + +(type=string, default='/a'). Same as the '-a' option to Amd. This sets +the private directory where Amd will create sub-directories for its real +mount points. + + +File: am-utils.info, Node: cache_duration Parameter, Next: cluster Parameter, Prev: auto_dir Parameter, Up: Global Parameters + +6.5.4 cache_duration Parameter +------------------------------ + +(type=numeric, default=300). Same as the '-c' option to Amd. Sets the +duration in seconds that looked-up or mounted map entries remain in the +cache. + + +File: am-utils.info, Node: cluster Parameter, Next: debug_mtab_file Parameter, Prev: cache_duration Parameter, Up: Global Parameters + +6.5.5 cluster Parameter +----------------------- + +(type=string, default no cluster). Same as the '-C' option to Amd. +Specifies the alternate HP-UX cluster to use. + + +File: am-utils.info, Node: debug_mtab_file Parameter, Next: debug_options Parameter, Prev: cluster Parameter, Up: Global Parameters + +6.5.6 debug_mtab_file Parameter +------------------------------- + +(type=string, default="/tmp/mtab"). Path to mtab file that is used by +Amd to store a list of mounted file systems during debug-mtab mode. +This option only applies to systems that store mtab information on disk. + + +File: am-utils.info, Node: debug_options Parameter, Next: dismount_interval Parameter, Prev: debug_mtab_file Parameter, Up: Global Parameters + +6.5.7 debug_options Parameter +----------------------------- + +(type=string, default no debug options). Same as the '-D' option to +Amd. Specify any debugging options for Amd. Works only if am-utils was +configured for debugging using the '--enable-debug' option. The +additional 'mem' option can be turned on via '--enable-debug=mem'. +Otherwise debugging options are ignored. Options are comma delimited, +and can be preceded by the string 'no' to negate their meaning. You can +get the list of supported debugging and logging options by running 'amd +-H'. Possible values those listed for the -D option. *Note -D +Option::. + + +File: am-utils.info, Node: dismount_interval Parameter, Next: domain_strip Parameter, Prev: debug_options Parameter, Up: Global Parameters + +6.5.8 dismount_interval Parameter +--------------------------------- + +(type=numeric, default=120). Same as the '-w' option to Amd. Specify +in seconds, the time between attempts to dismount file systems that have +exceeded their cached times. + + +File: am-utils.info, Node: domain_strip Parameter, Next: exec_map_timeout Parameter, Prev: dismount_interval Parameter, Up: Global Parameters + +6.5.9 domain_strip Parameter +---------------------------- + +(type=boolean, default='yes'). If 'yes', then the domain name part +referred to by '${rhost}' is stripped off. This is useful to keep logs +and smaller. If 'no', then the domain name part is left changed. This +is useful when using multiple domains with the same maps (as you may +have hosts whose domain-stripped name is identical). + + +File: am-utils.info, Node: exec_map_timeout Parameter, Next: forced_unmounts Parameter, Prev: domain_strip Parameter, Up: Global Parameters + +6.5.10 exec_map_timeout Parameter +--------------------------------- + +(type=numeric, default=10). The timeout in seconds that Amd will wait +for an executable map program before an answer is returned from that +program (or script). This value should be set to as small as possible +while still allowing normal replies to be returned before the timer +expires, because during the time that the executable map program is +queried, Amd is essentially waiting and is thus not responding to any +other queries. *Note Executable maps::. + + +File: am-utils.info, Node: forced_unmounts Parameter, Next: full_os Parameter, Prev: exec_map_timeout Parameter, Up: Global Parameters + +6.5.11 forced_unmounts Parameter +-------------------------------- + +(type=boolean, default='no'). Sometimes, mount points are hung due to +unrecoverable conditions, such as when NFS servers migrate, change their +IP address, are down permanently, or due to hardware failures, and more. +In this case, attempting to unmount an existing mount point, or even +just to stat(2) it, results in one of three fatal errors: EIO, ESTALE, +or EBUSY. At that point, Amd can do little to recover that hung point +(in fact, the OS cannot automatically recover either). For that reason, +some OSs support special kinds of forced unmounts, which must be used +very carefully: they will force an unmount immediately (or lazily on +Linux), which could result in application data loss. However, that may +be the only way to recover the entire host (without rebooting). Once a +hung mount point is forced out, Amd can then re-mount a replacement one +(if available), bringing a mostly-hung system back to operation and +avoiding a potentially costly reboot. + + If the 'forced_unmounts' option is set to 'yes', and the client OS +supports forced or lazy unmounts, then Amd will attempt to use them if +it gets any of the three serious error conditions listed above. Note +that Amd will force the unmount of mount points that returned EBUSY only +for 'type:=toplvl' mounts (*note Top-level Filesystem::): that is, Amd's +own mount points. This is useful to recover from a previously hung Amd, +and to ensure that an existing Amd can shutdown cleanly even if some +processes are keeping its mount points busy (i.e., when a user's shell +process uses 'cd' to set its CWD to Amd's own mount point). + + If this option is set to 'no' (the default), then Amd will not +attempt this special recovery procedure. + + +File: am-utils.info, Node: full_os Parameter, Next: fully_qualified_hosts Parameter, Prev: forced_unmounts Parameter, Up: Global Parameters + +6.5.12 full_os Parameter +------------------------ + +(type=string, default to compiled in value). The full name of the +operating system, along with its version. Allows you to override the +compiled-in full name and version of the operating system. Useful when +the compiled-in name is not desired. For example, the full operating +system name on linux comes up as 'linux', but you can override it to +'linux-2.2.5'. + + +File: am-utils.info, Node: fully_qualified_hosts Parameter, Next: hesiod_base Parameter, Prev: full_os Parameter, Up: Global Parameters + +6.5.13 fully_qualified_hosts Parameter +-------------------------------------- + +(type=string, default='no'). If 'yes', Amd will perform RPC +authentication using fully-qualified host names. This is necessary for +some systems, and especially when performing cross-domain mounting. For +this function to work, the Amd variable '${hostd}' is used, requiring +that '${domain}' not be null. + + +File: am-utils.info, Node: hesiod_base Parameter, Next: karch Parameter, Prev: fully_qualified_hosts Parameter, Up: Global Parameters + +6.5.14 hesiod_base Parameter +---------------------------- + +(type=string, default='automount'). Specify the base name for hesiod +maps. + + +File: am-utils.info, Node: karch Parameter, Next: ldap_base Parameter, Prev: hesiod_base Parameter, Up: Global Parameters + +6.5.15 karch Parameter +---------------------- + +(type=string, default to karch of the system). Same as the '-k' option +to Amd. Allows you to override the kernel-architecture of your system. +Useful for example on Sun (Sparc) machines, where you can build one Amd +binary, and run it on multiple machines, yet you want each one to get +the correct karch variable set (for example, sun4c, sun4m, sun4u, etc.) +Note that if not specified, Amd will use uname(2) to figure out the +kernel architecture of the machine. + + +File: am-utils.info, Node: ldap_base Parameter, Next: ldap_cache_maxmem Parameter, Prev: karch Parameter, Up: Global Parameters + +6.5.16 ldap_base Parameter +-------------------------- + +(type=string, default not set). Specify the base name for LDAP. This +often includes LDAP-specific values such as country and organization. + + +File: am-utils.info, Node: ldap_cache_maxmem Parameter, Next: ldap_cache_seconds Parameter, Prev: ldap_base Parameter, Up: Global Parameters + +6.5.17 ldap_cache_maxmem Parameter +---------------------------------- + +(type=numeric, default=131072). Specify the maximum memory Amd should +use to cache LDAP entries. + + +File: am-utils.info, Node: ldap_cache_seconds Parameter, Next: ldap_hostports Parameter, Prev: ldap_cache_maxmem Parameter, Up: Global Parameters + +6.5.18 ldap_cache_seconds Parameter +----------------------------------- + +(type=numeric, default=0). Specify the number of seconds to keep +entries in the cache. + + +File: am-utils.info, Node: ldap_hostports Parameter, Next: ldap_proto_version Parameter, Prev: ldap_cache_seconds Parameter, Up: Global Parameters + +6.5.19 ldap_hostports Parameter +------------------------------- + +(type=string, default not set). Specify the LDAP host and port values. + + +File: am-utils.info, Node: ldap_proto_version Parameter, Next: local_domain Parameter, Prev: ldap_hostports Parameter, Up: Global Parameters + +6.5.20 ldap_proto_version Parameter +----------------------------------- + +(type=numeric, default=2). Specify the LDAP protocol version to use. +With a value of 3 will use LDAPv3 protocol. + + +File: am-utils.info, Node: local_domain Parameter, Next: localhost_address Parameter, Prev: ldap_proto_version Parameter, Up: Global Parameters + +6.5.21 local_domain Parameter +----------------------------- + +(type=string, default no sub-domain). Same as the '-d' option to Amd. +Specify the local domain name. If this option is not given the domain +name is determined from the hostname, by removing the first component of +the fully-qualified host name. + + +File: am-utils.info, Node: localhost_address Parameter, Next: log_file Parameter, Prev: local_domain Parameter, Up: Global Parameters + +6.5.22 localhost_address Parameter +---------------------------------- + +(type=string, default to localhost or 127.0.0.1). Specify the name or +IP address for Amd to use when connecting the sockets for the local NFS +server and the RPC server. This defaults to 127.0.0.1 or whatever the +host reports as its local address. This parameter is useful on hosts +with multiple addresses where you want to force Amd to connect to a +specific address. + + +File: am-utils.info, Node: log_file Parameter, Next: log_options Parameter, Prev: localhost_address Parameter, Up: Global Parameters + +6.5.23 log_file Parameter +------------------------- + +(type=string, default='stderr'). Same as the '-l' option to Amd. +Specify a file name to log Amd events to. If the string '/dev/stderr' +is specified, Amd will send its events to the standard error file +descriptor. + + If the string 'syslog' is given, Amd will record its events with the +system logger syslogd(8). If your system supports syslog facilities, +then the default facility used is 'LOG_DAEMON'. + + When using syslog, if you wish to change the facility, append its +name to the option name, delimited by a single colon. For example, if +it is the string 'syslog:local7' then Amd will log messages via +syslog(3) using the 'LOG_LOCAL7' facility. If the facility name +specified is not recognized, Amd will default to 'LOG_DAEMON'. Note: +while you can use any syslog facility available on your system, it is +generally a bad idea to use those reserved for other services such as +'kern', 'lpr', 'cron', etc. + + +File: am-utils.info, Node: log_options Parameter, Next: map_reload_interval Parameter, Prev: log_file Parameter, Up: Global Parameters + +6.5.24 log_options Parameter +---------------------------- + +(type=string, default="defaults"). Same as the '-x' option to Amd. +Specify any logging options for Amd. Options are comma delimited, and +can be preceded by the string 'no' to negate their meaning. The 'debug' +logging option is only available if am-utils was configured with +'--enable-debug'. You can get the list of supported debugging options +by running 'amd -H'. Possible values are: + +'all' + all messages +'defaults' + an alias for "fatal,error,user,warning,info" +'debug' + debug messages +'error' + non-fatal system errors (cannot be turned off) +'fatal' + fatal errors (cannot be turned off) +'info' + information +'map' + map errors +'stats' + additional statistical information +'user' + non-fatal user errors +'warn' + warnings +'warning' + warnings + + +File: am-utils.info, Node: map_reload_interval Parameter, Next: nfs_allow_any_interface Parameter, Prev: log_options Parameter, Up: Global Parameters + +6.5.25 map_reload_interval Parameter +------------------------------------ + +(type=numeric, default=3600). The number of seconds that Amd will wait +before it checks to see if any maps have changed at their source (NIS +servers, LDAP servers, files, etc.). Amd will reload only those maps +that have changed. + + +File: am-utils.info, Node: nfs_allow_any_interface Parameter, Next: nfs_allow_insecure_port Parameter, Prev: map_reload_interval Parameter, Up: Global Parameters + +6.5.26 nfs_allow_any_interface Parameter +---------------------------------------- + +(type=string, default='no'). Normally Amd accepts local NFS packets +only from 127.0.0.1. If this parameter is set to 'yes', then amd will +accept local NFS packets from any local interface; this is useful on +hosts that may have multiple interfaces where the system is forced to +send all outgoing packets (even those bound to the same host) via an +address other than 127.0.0.1. + + +File: am-utils.info, Node: nfs_allow_insecure_port Parameter, Next: nfs_proto Parameter, Prev: nfs_allow_any_interface Parameter, Up: Global Parameters + +6.5.27 nfs_allow_insecure_port Parameter +---------------------------------------- + +(type=string, default='no'). Normally Amd will refuse requests coming +from unprivileged ports (i.e., ports >= 1024 on Unix systems), so that +only privileged users and the kernel can send NFS requests to it. +However, some kernels (certain versions of Darwin, MacOS X, and Linux) +have bugs that cause them to use unprivileged ports in certain +situations, which causes Amd to stop dead in its tracks. This parameter +allows Amd to operate normally even on such systems, at the expense of a +slight decrease in the security of its operations. If you see messages +like "ignoring request from foo:1234, port not reserved" in your Amd +log, try enabling this parameter and give it another go. + + +File: am-utils.info, Node: nfs_proto Parameter, Next: nfs_retransmit_counter Parameter, Prev: nfs_allow_insecure_port Parameter, Up: Global Parameters + +6.5.28 nfs_proto Parameter +-------------------------- + +(type=string, default to trying version tcp then udp). By default, Amd +tries 'tcp' and then 'udp'. This option forces the overall NFS protocol +used to TCP or UDP. It overrides what is in the Amd maps, and is useful +when Amd is compiled with TCP support in NFSv2/NFSv3 that may not be +stable. With this option you can turn off the complete usage of TCP for +NFS dynamically (without having to recompile Amd), and use UDP only, +until such time as TCP support is desired again. + + +File: am-utils.info, Node: nfs_retransmit_counter Parameter, Next: nfs_retransmit_counter_udp Parameter, Prev: nfs_proto Parameter, Up: Global Parameters + +6.5.29 nfs_retransmit_counter Parameter +--------------------------------------- + +(type=numeric, default=11). Same as the retransmit part of the '-t' +timeout.retransmit option to Amd. Specifies the number of NFS +retransmissions that the kernel will use to communicate with Amd using +either UDP or TCP mounts. *Note -t Option::. + + +File: am-utils.info, Node: nfs_retransmit_counter_udp Parameter, Next: nfs_retransmit_counter_tcp Parameter, Prev: nfs_retransmit_counter Parameter, Up: Global Parameters + +6.5.30 nfs_retransmit_counter_udp Parameter +------------------------------------------- + +(type=numeric, default=11). Same as the nfs_retransmit_counter +parameter, but applied globally only to UDP mounts. *Note +nfs_retransmit_counter Parameter::. + + +File: am-utils.info, Node: nfs_retransmit_counter_tcp Parameter, Next: nfs_retransmit_counter_toplvl Parameter, Prev: nfs_retransmit_counter_udp Parameter, Up: Global Parameters + +6.5.31 nfs_retransmit_counter_tcp Parameter +------------------------------------------- + +(type=numeric, default=11). Same as the nfs_retransmit_counter +parameter, but applied globally only to TCP mounts. *Note +nfs_retransmit_counter Parameter::. + + +File: am-utils.info, Node: nfs_retransmit_counter_toplvl Parameter, Next: nfs_retry_interval Parameter, Prev: nfs_retransmit_counter_tcp Parameter, Up: Global Parameters + +6.5.32 nfs_retransmit_counter_toplvl Parameter +---------------------------------------------- + +(type=numeric, default=11). Same as the nfs_retransmit_counter +parameter, applied only for Amd's top-level UDP mounts. On some systems +it is useful to set this differently than the OS default, so as to +better tune Amd's responsiveness under heavy scheduler loads. *Note +nfs_retransmit_counter Parameter::. + + +File: am-utils.info, Node: nfs_retry_interval Parameter, Next: nfs_retry_interval_udp Parameter, Prev: nfs_retransmit_counter_toplvl Parameter, Up: Global Parameters + +6.5.33 nfs_retry_interval Parameter +----------------------------------- + +(type=numeric, default=8). Same as the timeout part of the '-t' +timeout.retransmit option to Amd. Specifies the NFS timeout interval, +in _tenths_ of seconds, between NFS/RPC retries (for UDP or TCP). This +is the value that the kernel will use to communicate with Amd. *Note -t +Option::. + + Amd relies on the kernel RPC retransmit mechanism to trigger mount +retries. The values of the nfs_retransmit_counter and the +nfs_retry_interval parameters change the overall retry interval. Too +long an interval gives poor interactive response; too short an interval +causes excessive retries. + + +File: am-utils.info, Node: nfs_retry_interval_udp Parameter, Next: nfs_retry_interval_tcp Parameter, Prev: nfs_retry_interval Parameter, Up: Global Parameters + +6.5.34 nfs_retry_interval_udp Parameter +--------------------------------------- + +(type=numeric, default=8). Same as the nfs_retry_interval parameter, +but applied globally only to UDP mounts. *Note nfs_retry_interval +Parameter::. + + +File: am-utils.info, Node: nfs_retry_interval_tcp Parameter, Next: nfs_retry_interval_toplvl Parameter, Prev: nfs_retry_interval_udp Parameter, Up: Global Parameters + +6.5.35 nfs_retry_interval_tcp Parameter +--------------------------------------- + +(type=numeric, default=8). Same as the nfs_retry_interval parameter, +but applied globally only to TCP mounts. *Note nfs_retry_interval +Parameter::. + + +File: am-utils.info, Node: nfs_retry_interval_toplvl Parameter, Next: nfs_vers Parameter, Prev: nfs_retry_interval_tcp Parameter, Up: Global Parameters + +6.5.36 nfs_retry_interval_toplvl Parameter +------------------------------------------ + +(type=numeric, default=8). Same as the nfs_retry_interval parameter, +applied only for Amd's top-level UDP mounts. On some systems it is +useful to set this differently than the OS default, so as to better tune +Amd's responsiveness under heavy scheduler loads. *Note +nfs_retry_interval Parameter::. + + +File: am-utils.info, Node: nfs_vers Parameter, Next: nis_domain Parameter, Prev: nfs_retry_interval_toplvl Parameter, Up: Global Parameters + +6.5.37 nfs_vers Parameter +------------------------- + +(type=numeric, default to trying version 3 then 2). By default, Amd +tries version 3 and then version 2. This option forces the overall NFS +protocol used to version 3 or 2. It overrides what is in the Amd maps, +and is useful when Amd is compiled with NFSv3 support that may not be +stable. With this option you can turn off the complete usage of NFSv3 +dynamically (without having to recompile Amd), and use NFSv2 only, until +such time as NFSv3 support is desired again. + + +File: am-utils.info, Node: nis_domain Parameter, Next: normalize_hostnames Parameter, Prev: nfs_vers Parameter, Up: Global Parameters + +6.5.38 nis_domain Parameter +--------------------------- + +(type=string, default to local NIS domain name). Same as the '-y' +option to Amd. Specify an alternative NIS domain from which to fetch +the NIS maps. The default is the system domain name. This option is +ignored if NIS support is not available. + + +File: am-utils.info, Node: normalize_hostnames Parameter, Next: normalize_slashes Parameter, Prev: nis_domain Parameter, Up: Global Parameters + +6.5.39 normalize_hostnames Parameter +------------------------------------ + +(type=boolean, default='no'). Same as the '-n' option to Amd. If +'yes', then the name referred to by '${rhost}' is normalized relative to +the host database before being used. The effect is to translate aliases +into "official" names. + + +File: am-utils.info, Node: normalize_slashes Parameter, Next: os Parameter, Prev: normalize_hostnames Parameter, Up: Global Parameters + +6.5.40 normalize_slashes Parameter +---------------------------------- + +(type=boolean, default='yes'). If 'yes' then amd will condense all +multiple '/' (slash) characters into one and remove all trailing +slashes. If 'no', then amd will not touch strings that may contain +repeated or trailing slashes. The latter is sometimes useful with SMB +mounts, which often require multiple slash characters in pathnames. + + +File: am-utils.info, Node: os Parameter, Next: osver Parameter, Prev: normalize_slashes Parameter, Up: Global Parameters + +6.5.41 os Parameter +------------------- + +(type=string, default to compiled in value). Same as the '-O' option to +Amd. Allows you to override the compiled-in name of the operating +system. Useful when the built-in name is not desired for backward +compatibility reasons. For example, if the built-in name is 'sunos5', +you can override it to 'sos5', and use older maps which were written +with the latter in mind. + + +File: am-utils.info, Node: osver Parameter, Next: pid_file Parameter, Prev: os Parameter, Up: Global Parameters + +6.5.42 osver Parameter +---------------------- + +(type=string, default to compiled in value). Same as the '-o' option to +Amd. Allows you to override the compiled-in version number of the +operating system. Useful when the built-in version is not desired for +backward compatibility reasons. For example, if the build in version is +'2.5.1', you can override it to '5.5.1', and use older maps that were +written with the latter in mind. + + +File: am-utils.info, Node: pid_file Parameter, Next: plock Parameter, Prev: osver Parameter, Up: Global Parameters + +6.5.43 pid_file Parameter +------------------------- + +(type=string, default='/dev/stdout'). Specify a file to store the +process ID of the running daemon into. If not specified, Amd will print +its process id onto the standard output. Useful for killing Amd after +it had run. Note that the PID of a running Amd can also be retrieved +via Amq (*note Amq -p option::). + + This file is used only if the 'print_pid' option is on (*note +print_pid Parameter::). + + +File: am-utils.info, Node: plock Parameter, Next: portmap_program Parameter, Prev: pid_file Parameter, Up: Global Parameters + +6.5.44 plock Parameter +---------------------- + +(type=boolean, default='yes'). Same as the '-S' option to Amd. If +'yes', lock the running executable pages of Amd into memory. To improve +Amd's performance, systems that support the plock(3) or mlockall(2) call +can lock the Amd process into memory. This way there is less chance the +operating system will schedule, page out, and swap the Amd process as +needed. This improves Amd's performance, at the cost of reserving the +memory used by the Amd process (making it unavailable for other +processes). + + +File: am-utils.info, Node: portmap_program Parameter, Next: preferred_amq_port Parameter, Prev: plock Parameter, Up: Global Parameters + +6.5.45 portmap_program Parameter +-------------------------------- + +(type=numeric, default=300019). Specify an alternate Port-mapper RPC +program number, other than the official number. This is useful when +running multiple Amd processes. For example, you can run another Amd in +"test" mode, without affecting the primary Amd process in any way. For +safety reasons, the alternate program numbers that can be specified must +be in the range 300019-300029, inclusive. Amq has an option '-P' which +can be used to specify an alternate program number of an Amd to contact. +In this way, amq can fully control any number of Amd processes running +on the same host. + + +File: am-utils.info, Node: preferred_amq_port Parameter, Next: print_pid Parameter, Prev: portmap_program Parameter, Up: Global Parameters + +6.5.46 preferred_amq_port Parameter +----------------------------------- + +(type=numeric, default=0). Specify an alternate Port-mapper RPC port +number for Amd's Amq service. This is used for both UDP and TCP. +Setting this value to 0 (or not defining it) will cause Amd to select an +arbitrary port number. Setting the Amq RPC service port to a specific +number is useful in firewalled or NAT'ed environments, where you need to +know which port Amd will listen on. + + +File: am-utils.info, Node: print_pid Parameter, Next: print_version Parameter, Prev: preferred_amq_port Parameter, Up: Global Parameters + +6.5.47 print_pid Parameter +-------------------------- + +(type=boolean, default='no'). Same as the '-p' option to Amd. If +'yes', Amd will print its process ID upon starting. + + +File: am-utils.info, Node: print_version Parameter, Next: restart_mounts Parameter, Prev: print_pid Parameter, Up: Global Parameters + +6.5.48 print_version Parameter +------------------------------ + +(type=boolean, default='no'). Same as the '-v' option to Amd, but the +version prints and Amd continues to run. If 'yes', Amd will print its +version information string, which includes some configuration and +compilation values. + + +File: am-utils.info, Node: restart_mounts Parameter, Next: show_statfs_entries Parameter, Prev: print_version Parameter, Up: Global Parameters + +6.5.49 restart_mounts Parameter +------------------------------- + +(type=boolean, default='no'). Same as the '-r' option to Amd. If 'yes' +Amd will scan the mount table to determine which file systems are +currently mounted. Whenever one of these would have been auto-mounted, +Amd inherits it. + + +File: am-utils.info, Node: show_statfs_entries Parameter, Next: truncate_log Parameter, Prev: restart_mounts Parameter, Up: Global Parameters + +6.5.50 show_statfs_entries Parameter +------------------------------------ + +(type=boolean), default='no'). If 'yes', then all maps which are +browsable will also show the number of entries (keys) they have when +df(1) runs. (This is accomplished by returning non-zero values to the +statfs(2) system call). + + +File: am-utils.info, Node: truncate_log Parameter, Next: unmount_on_exit Parameter, Prev: show_statfs_entries Parameter, Up: Global Parameters + +6.5.51 truncate_log Parameter +----------------------------- + +(type=boolean), default='no'). If 'yes', then Amd will truncate the log +file (if it's a regular file) on startup. This could be useful when +conducting extensive testing on Amd maps (or Amd itself) and you don't +want to see log data from a previous run in the same file. + + +File: am-utils.info, Node: unmount_on_exit Parameter, Next: use_tcpwrappers Parameter, Prev: truncate_log Parameter, Up: Global Parameters + +6.5.52 unmount_on_exit Parameter +-------------------------------- + +(type=boolean, default='no'). If 'yes', then Amd will attempt to +unmount all file systems which it knows about. Normally it leaves all +(esp. NFS) mounted file systems intact. Note that Amd does not know +about file systems mounted before it starts up, unless the +'restart_mounts' option is used (*note restart_mounts Parameter::). + + +File: am-utils.info, Node: use_tcpwrappers Parameter, Next: vendor Parameter, Prev: unmount_on_exit Parameter, Up: Global Parameters + +6.5.53 use_tcpwrappers Parameter +-------------------------------- + +(type=boolean), default='yes'). If 'yes', then amd will use the +tcpwrappers (tcpd/librwap) library (if available) to control access to +Amd via the '/etc/hosts.allow' and '/etc/hosts.deny' files. Amd will +verify that the host running Amq is authorized to connect. The 'amd' +service name must used in the '/etc/hosts.allow' and '/etc/hosts.deny' +files. For example, to allow only localhost to connect to Amd, add this +line to '/etc/hosts.allow': + + amd: localhost + + and this line to '/etc/hosts.deny': + + amd: ALL + + Consult the man pages for hosts_access(5) for more information on +using the tcpwrappers access-control library. + + Note that in particular, you should not configure your 'hosts.allow' +file to spawn a command for Amd: that will cause Amd to not be able to +'waitpid' on the child process ID of any background un/mount that Amd +issued, resulting in a confused Amd that does not know what happened to +those background un/mount requests. + + +File: am-utils.info, Node: vendor Parameter, Prev: use_tcpwrappers Parameter, Up: Global Parameters + +6.5.54 vendor Parameter +----------------------- + +(type=string, default to compiled in value). The name of the vendor of +the operating system. Overrides the compiled-in vendor name. Useful +when the compiled-in name is not desired. For example, most Intel based +systems set the vendor name to 'unknown', but you can set it to +'redhat'. + + +File: am-utils.info, Node: Regular Map Parameters, Next: amd.conf Examples, Prev: Global Parameters, Up: Amd Configuration File + +6.6 Regular Map Parameters +========================== + +The following parameters are applicable only to regular map sections. + +* Menu: + +* map_name Parameter:: +* tag Parameter:: + + +File: am-utils.info, Node: map_name Parameter, Next: tag Parameter, Prev: Regular Map Parameters, Up: Regular Map Parameters + +6.6.1 map_name Parameter +------------------------ + +(type=string, must be specified). Name of the map where the keys are +located. + + +File: am-utils.info, Node: tag Parameter, Prev: map_name Parameter, Up: Regular Map Parameters + +6.6.2 tag Parameter +------------------- + +(type=string, default no tag). Each map entry in the configuration file +can be tagged. If no tag is specified, that map section will always be +processed by Amd. If it is specified, then Amd will process the map if +the '-T' option was given to Amd, and the value given to that +command-line option matches that in the map section. + + +File: am-utils.info, Node: amd.conf Examples, Prev: Regular Map Parameters, Up: Amd Configuration File + +6.7 amd.conf Examples +===================== + +The following is the actual 'amd.conf' file I used at the Computer +Science Department of Columbia University. + + # GLOBAL OPTIONS SECTION + [ global ] + normalize_hostnames = no + print_pid = no + #pid_file = /var/run/amd.pid + restart_mounts = yes + #unmount_on_exit = yes + auto_dir = /n + log_file = /var/log/amd + log_options = all + #debug_options = defaults + plock = no + selectors_in_defaults = yes + # config.guess picks up "sunos5" and I don't want to edit my maps yet + os = sos5 + # if you print_version after setting up "os", it will show it. + print_version = no + map_type = file + search_path = /etc/amdmaps:/usr/lib/amd:/usr/local/AMD/lib + browsable_dirs = yes + fully_qualified_hosts = no + + # DEFINE AN AMD MOUNT POINT + [ /u ] + map_name = amd.u + + [ /proj ] + map_name = amd.proj + + [ /src ] + map_name = amd.src + + [ /misc ] + map_name = amd.misc + + [ /import ] + map_name = amd.import + + [ /tftpboot/.amd ] + tag = tftpboot + map_name = amd.tftpboot + + +File: am-utils.info, Node: Run-time Administration, Next: FSinfo, Prev: Amd Configuration File, Up: Top + +7 Run-time Administration +************************* + +* Menu: + +* Starting Amd:: +* Stopping Amd:: +* Restarting Amd:: +* Controlling Amd:: + + +File: am-utils.info, Node: Starting Amd, Next: Stopping Amd, Prev: Run-time Administration, Up: Run-time Administration + +7.1 Starting Amd +================ + +Amd is best started from '/etc/rc.local' on BSD systems, or from the +appropriate start-level script in '/etc/init.d' on System V systems. + + if [ -f /usr/local/sbin/ctl-amd ]; then + /usr/local/sbin/ctl-amd start; (echo -n ' amd') > /dev/console + fi + +The shell script, 'ctl-amd' is used to start, stop, or restart Amd. It +is a relatively generic script. All options you want to set should not +be made in this script, but rather updated in the 'amd.conf' file. +*Note Amd Configuration File::. + + If you do not wish to use an Amd configuration file, you may start +Amd manually. For example, getting the map entries via NIS: + + amd -r -l /var/log/amd `ypcat -k auto.master` + + +File: am-utils.info, Node: Stopping Amd, Next: Restarting Amd, Prev: Starting Amd, Up: Run-time Administration + +7.2 Stopping Amd +================ + +Amd stops in response to two signals. + +'SIGTERM' + causes the top-level automount points to be unmounted and then Amd + to exit. Any automounted filesystems are left mounted. They can + be recovered by restarting Amd with the '-r' command line option. + +'SIGINT' + causes Amd to attempt to unmount any filesystems which it has + automounted, in addition to the actions of 'SIGTERM'. This signal + is primarily used for debugging. + + Actions taken for other signals are undefined. + + The easiest and safest way to stop Amd, without having to find its +process ID by hand, is to use the 'ctl-amd' script, as with: + + ctl-amd stop + + +File: am-utils.info, Node: Restarting Amd, Next: Controlling Amd, Prev: Stopping Amd, Up: Run-time Administration + +7.3 Restarting Amd +================== + +Before Amd can be started, it is vital to ensure that no other Amd +processes are managing any of the mount points, and that the previous +process(es) have terminated cleanly. When a terminating signal is set +to Amd, the automounter does _not_ terminate right then. Rather, it +starts by unmounting all of its managed mount mounts in the background, +and then terminates. It usually takes a few seconds for this process to +happen, but it can take an arbitrarily longer time. If two or more Amd +processes attempt to manage the same mount point, it usually will result +in a system lockup. + + The easiest and safest way to restart Amd, without having to find its +process ID by hand, sending it the 'SIGTERM' signal, waiting for Amd to +die cleanly, and verifying so, is to use the 'ctl-amd' script, as with: + + ctl-amd restart + + The script will locate the process ID of Amd, kill it, and wait for +it to die cleanly before starting a new instance of the automounter. +'ctl-amd' will wait for a total of 30 seconds for Amd to die, and will +check once every 5 seconds if it had. + + +File: am-utils.info, Node: Controlling Amd, Prev: Restarting Amd, Up: Run-time Administration + +7.4 Controlling Amd +=================== + +It is sometimes desirable or necessary to exercise external control over +some of Amd's internal state. To support this requirement, Amd +implements an RPC interface which is used by the "Amq" program. A +variety of information is available. + + Amq generally applies an operation, specified by a single letter +option, to a list of mount points. The default operation is to obtain +statistics about each mount point. This is similar to the output shown +above but includes information about the number and type of accesses to +each mount point. + +* Menu: + +* Amq default:: Default command behavior. +* Amq -f option:: Flushing the map cache. +* Amq -h option:: Controlling a non-local host. +* Amq -H option:: Print help message. +* Amq -l option:: Controlling the log file. +* Amq -m option:: Obtaining mount statistics. +* Amq -p option:: Getting Amd's process ID. +* Amq -P option:: Contacting alternate Amd processes. +* Amq -q option:: Suppress synchronous unmounting errors. +* Amq -s option:: Obtaining global statistics. +* Amq -T option:: Use TCP transport. +* Amq -U option:: Use UDP transport. +* Amq -u option:: Forcing volumes to time out. +* Amq -v option:: Version information. +* Amq -w option:: Print Amd current working directory. +* Other Amq options:: Three other special options. + + +File: am-utils.info, Node: Amq default, Next: Amq -f option, Prev: Controlling Amd, Up: Controlling Amd + +7.4.1 Amq default information +----------------------------- + +With no arguments, "Amq" obtains a brief list of all existing mounts +created by Amd. This is different from the list displayed by df(1) +since the latter only includes system mount points. + +The output from this option includes the following information: + + * the automount point, + * the filesystem type, + * the mount map or mount information, + * the internal, or system mount point. + +For example: + + / root "root" sky:(pid75) + /homes toplvl /usr/local/etc/amd.homes /homes + /home toplvl /usr/local/etc/amd.home /home + /homes/jsp nfs charm:/home/charm /a/charm/home/charm/jsp + /homes/phjk nfs toytown:/home/toytown /a/toytown/home/toytown/ai/phjk + +If an argument is given then statistics for that volume name will be +output. For example: + + What Uid Getattr Lookup RdDir RdLnk Statfs Mounted@ + /homes 0 1196 512 22 0 30 90/09/14 12:32:55 + /homes/jsp 0 0 0 0 1180 0 90/10/13 12:56:58 + +'What' + the volume name. + +'Uid' + ignored. + +'Getattr' + the count of NFS "getattr" requests on this node. This should only + be non-zero for directory nodes. + +'Lookup' + the count of NFS "lookup" requests on this node. This should only + be non-zero for directory nodes. + +'RdDir' + the count of NFS "readdir" requests on this node. This should only + be non-zero for directory nodes. + +'RdLnk' + the count of NFS "readlink" requests on this node. This should be + zero for directory nodes. + +'Statfs' + the count of NFS "statfs" requests on this node. This should only + be non-zero for top-level automount points. + +'Mounted@' + the date and time the volume name was first referenced. + + +File: am-utils.info, Node: Amq -f option, Next: Amq -h option, Prev: Amq default, Up: Controlling Amd + +7.4.2 Amq '-f' option +--------------------- + +The '-f' option causes Amd to flush the internal mount map cache. This +is useful for example in Hesiod maps since Amd will not automatically +notice when they have been updated. The map cache can also be +synchronized with the map source by using the 'sync' option (*note +Automount Filesystem::). + + +File: am-utils.info, Node: Amq -h option, Next: Amq -H option, Prev: Amq -f option, Up: Controlling Amd + +7.4.3 Amq '-h' option +--------------------- + +By default the local host is used. In an HP-UX cluster the root server +is used since that is the only place in the cluster where Amd will be +running. To query Amd on another host the '-h' option should be used. + + +File: am-utils.info, Node: Amq -H option, Next: Amq -l option, Prev: Amq -h option, Up: Controlling Amd + +7.4.4 Amq '-H' option +--------------------- + +Print a brief help and usage string. + + +File: am-utils.info, Node: Amq -l option, Next: Amq -m option, Prev: Amq -H option, Up: Controlling Amd + +7.4.5 Amq '-l' option +--------------------- + +Tell Amd to use log_file as the log file name. For security reasons, +this _must_ be the same log file which Amd used when started. This +option is therefore only useful to refresh Amd's open file handle on the +log file, so that it can be rotated and compressed via daily cron jobs. + + +File: am-utils.info, Node: Amq -m option, Next: Amq -p option, Prev: Amq -l option, Up: Controlling Amd + +7.4.6 Amq '-m' option +--------------------- + +The '-m' option displays similar information about mounted filesystems, +rather than automount points. The output includes the following +information: + + * the mount information, + * the mount point, + * the filesystem type, + * the number of references to this filesystem, + * the server hostname, + * the state of the file server, + * any error which has occurred. + + For example: + + "root" truth:(pid602) root 1 localhost is up + hesiod.home /home toplvl 1 localhost is up + hesiod.vol /vol toplvl 1 localhost is up + hesiod.homes /homes toplvl 1 localhost is up + amy:/home/amy /a/amy/home/amy nfs 5 amy is up + swan:/home/swan /a/swan/home/swan nfs 0 swan is up (Permission denied) + ex:/home/ex /a/ex/home/ex nfs 0 ex is down + + When the reference count is zero the filesystem is not mounted but +the mount point and server information is still being maintained by Amd. + + +File: am-utils.info, Node: Amq -p option, Next: Amq -P option, Prev: Amq -m option, Up: Controlling Amd + +7.4.7 Amq '-p' option +--------------------- + +Return the process ID of the remote or locally running Amd. Useful when +you need to send a signal to the local Amd process, and would rather not +have to search through the process table. This option is used in the +'ctl-amd' script. + + +File: am-utils.info, Node: Amq -P option, Next: Amq -q option, Prev: Amq -p option, Up: Controlling Amd + +7.4.8 Amq '-P' option +--------------------- + +Contact an alternate running Amd that had registered itself on a +different RPC PROGRAM_NUMBER and apply all other operations to that +instance of the automounter. This is useful when you run multiple +copies of Amd, and need to manage each one separately. If not +specified, Amq will use the default program number for Amd, 300019. For +security reasons, the only alternate program numbers Amd can use range +from 300019 to 300029, inclusive. + + For example, to kill an alternate running Amd: + + kill `amq -p -P 300020` + + +File: am-utils.info, Node: Amq -q option, Next: Amq -s option, Prev: Amq -P option, Up: Controlling Amd + +7.4.9 Amq '-q' option +--------------------- + +Suppress any error messages produced when a synchronous unmount fails. +See *note Amq -u option::. + + +File: am-utils.info, Node: Amq -s option, Next: Amq -T option, Prev: Amq -q option, Up: Controlling Amd + +7.4.10 Amq '-s' option +---------------------- + +The '-s' option displays global statistics. If any other options are +specified or any filesystems named then this option is ignored. For +example: + + requests stale mount mount unmount + deferred fhandles ok failed failed + 1054 1 487 290 7017 + +'Deferred requests' + are those for which an immediate reply could not be constructed. + For example, this would happen if a background mount was required. + +'Stale filehandles' + counts the number of times the kernel passes a stale filehandle to + Amd. Large numbers indicate problems. + +'Mount ok' + counts the number of automounts which were successful. + +'Mount failed' + counts the number of automounts which failed. + +'Unmount failed' + counts the number of times a filesystem could not be unmounted. + Very large numbers here indicate that the time between unmount + attempts should be increased. + + +File: am-utils.info, Node: Amq -T option, Next: Amq -U option, Prev: Amq -s option, Up: Controlling Amd + +7.4.11 Amq '-T' option +---------------------- + +The '-T' option causes the Amq to contact Amd using the TCP transport +only (connection oriented). Normally, Amq will use TCP first, and if +that failed, will try UDP. + + +File: am-utils.info, Node: Amq -U option, Next: Amq -u option, Prev: Amq -T option, Up: Controlling Amd + +7.4.12 Amq '-U' option +---------------------- + +The '-U' option causes the Amq to contact Amd using the UDP transport +only (connectionless). Normally, Amq will use TCP first, and if that +failed, will try UDP. + + +File: am-utils.info, Node: Amq -u option, Next: Amq -v option, Prev: Amq -U option, Up: Controlling Amd + +7.4.13 Amq '-u' option +---------------------- + +The '-u' option causes the time-to-live interval of the named mount +points to be expired, thus causing an unmount attempt. This is the only +safe way to unmount an automounted filesystem. If '-u' is repeated, +then Amd will attempt to unmount the filesystem synchronously. This +makes things like + + amq -uu /t/cd0d && eject cd0 + +work as expected. Any error messages this might produce can be +suppressed with the '-q' option. See *note Amq -q option::. + + +File: am-utils.info, Node: Amq -v option, Next: Amq -w option, Prev: Amq -u option, Up: Controlling Amd + +7.4.14 Amq '-v' option +---------------------- + +The '-v' option displays the version of Amd in a similar way to Amd's +'-v' option. + + +File: am-utils.info, Node: Amq -w option, Next: Other Amq options, Prev: Amq -v option, Up: Controlling Amd + +7.4.15 Amq '-w' option +---------------------- + +The '-w' option translates a full pathname as returned by getpwd(3) into +a short Amd pathname that goes through its mount points. This option +requires that Amd is running. + + +File: am-utils.info, Node: Other Amq options, Prev: Amq -w option, Up: Controlling Amd + +7.4.16 Other Amq options +------------------------ + +Two other operations are implemented. These modify the state of Amd as +a whole, rather than any particular filesystem. The '-x' and '-D' +options have exactly the same effect as Amd's corresponding command line +options. + + When Amd receives the '-x' flag, it disallows turning off the 'fatal' +or 'error' flags. Both are on by default. They are mandatory so that +Amd could report important errors, including errors relating to turning +flags on/off. + + +File: am-utils.info, Node: FSinfo, Next: Hlfsd, Prev: Run-time Administration, Up: Top + +8 FSinfo +******** + +XXX: this chapter should be reviewed by someone knowledgeable with +fsinfo. + +* Menu: + +* FSinfo Overview:: Introduction to FSinfo. +* Using FSinfo:: Basic concepts. +* FSinfo Grammar:: Language syntax, semantics and examples. +* FSinfo host definitions:: Defining a new host. +* FSinfo host attributes:: Definable host attributes. +* FSinfo filesystems:: Defining locally attached filesystems. +* FSinfo static mounts:: Defining additional static mounts. +* FSinfo automount definitions:: +* FSinfo Command Line Options:: +* FSinfo errors:: + + +File: am-utils.info, Node: FSinfo Overview, Next: Using FSinfo, Prev: FSinfo, Up: FSinfo + +8.1 FSinfo overview +=================== + +FSinfo is a filesystem management tool. It has been designed to work +with Amd to help system administrators keep track of the ever increasing +filesystem namespace under their control. + + The purpose of FSinfo is to generate all the important standard +filesystem data files from a single set of input data. Starting with a +single data source guarantees that all the generated files are +self-consistent. One of the possible output data formats is a set of +Amd maps which can be used among the set of hosts described in the input +data. + + FSinfo implements a declarative language. This language is +specifically designed for describing filesystem namespace and physical +layouts. The basic declaration defines a mounted filesystem including +its device name, mount point, and all the volumes and access +permissions. FSinfo reads this information and builds an internal map +of the entire network of hosts. Using this map, many different data +formats can be produced including '/etc/fstab', '/etc/exports', Amd +mount maps and '/etc/bootparams'. + + +File: am-utils.info, Node: Using FSinfo, Next: FSinfo Grammar, Prev: FSinfo Overview, Up: FSinfo + +8.2 Using FSinfo +================ + +The basic strategy when using FSinfo is to gather all the information +about all disks on all machines into one set of declarations. For each +machine being managed, the following data is required: + + * Hostname + * List of all filesystems and, optionally, their mount points. + * Names of volumes stored on each filesystem. + * NFS export information for each volume. + * The list of static filesystem mounts. + + The following information can also be entered into the same +configuration files so that all data can be kept in one place. + + * List of network interfaces + * IP address of each interface + * Hardware address of each interface + * Dumpset to which each filesystem belongs + * and more ... + + To generate Amd mount maps, the automount tree must also be defined +(*note FSinfo automount definitions::). This will have been designed at +the time the volume names were allocated. Some volume names will not be +automounted, so FSinfo needs an explicit list of which volumes should be +automounted. + + Hostnames are required at several places in the FSinfo language. It +is important to stick to either fully qualified names or unqualified +names. Using a mixture of the two will inevitably result in confusion. + + Sometimes volumes need to be referenced which are not defined in the +set of hosts being managed with FSinfo. The required action is to add a +dummy set of definitions for the host and volume names required. Since +the files generated for those particular hosts will not be used on them, +the exact values used is not critical. + + +File: am-utils.info, Node: FSinfo Grammar, Next: FSinfo host definitions, Prev: Using FSinfo, Up: FSinfo + +8.3 FSinfo grammar +================== + +FSinfo has a relatively simple grammar. Distinct syntactic constructs +exist for each of the different types of data, though they share a +common flavor. Several conventions are used in the grammar fragments +below. + + The notation, list(xxx), indicates a list of zero or more xxx's. The +notation, opt(xxx), indicates zero or one xxx. Items in double quotes, +eg "host", represent input tokens. Items in angle brackets, eg +, represent strings in the input. Strings need not be in +double quotes, except to differentiate them from reserved words. Quoted +strings may include the usual set of C "\" escape sequences with one +exception: a backslash-newline-whitespace sequence is squashed into a +single space character. To defeat this feature, put a further backslash +at the start of the second line. + + At the outermost level of the grammar, the input consists of a +sequence of host and automount declarations. These declarations are all +parsed before they are analyzed. This means they can appear in any +order and cyclic host references are possible. + + fsinfo : list(fsinfo_attr) ; + + fsinfo_attr : host | automount ; + +* Menu: + +* FSinfo host definitions:: +* FSinfo automount definitions:: + + +File: am-utils.info, Node: FSinfo host definitions, Next: FSinfo host attributes, Prev: FSinfo Grammar, Up: FSinfo + +8.4 FSinfo host definitions +=========================== + +A host declaration consists of three parts: a set of machine attribute +data, a list of filesystems physically attached to the machine, and a +list of additional statically mounted filesystems. + + host : "host" host_data list(filesystem) list(mount) ; + + Each host must be declared in this way exactly once. Such things as +the hardware address, the architecture and operating system types and +the cluster name are all specified within the "host data". + + All the disks the machine has should then be described in the "list +of filesystems". When describing disks, you can specify what "volname" +the disk/partition should have and all such entries are built up into a +dictionary which can then be used for building the automounter maps. + + The "list of mounts" specifies all the filesystems that should be +statically mounted on the machine. + +* Menu: + +* FSinfo host attributes:: +* FSinfo filesystems:: +* FSinfo static mounts:: + + +File: am-utils.info, Node: FSinfo host attributes, Next: FSinfo filesystems, Prev: FSinfo host definitions, Up: FSinfo host definitions + +8.5 FSinfo host attributes +========================== + +The host data, "host_data", always includes the "hostname". In +addition, several other host attributes can be given. + + host_data : + | "{" list(host_attrs) "}" + ; + + host_attrs : host_attr "=" + | netif + ; + + host_attr : "config" + | "arch" + | "os" + | "cluster" + ; + + The "hostname" is, typically, the fully qualified hostname of the +machine. + + Examples: + + host dylan.doc.ic.ac.uk + + host { + os = hpux + arch = hp300 + } dougal.doc.ic.ac.uk + + The options that can be given as host attributes are shown below. + +* Menu: + +* FSinfo netif Option:: FSinfo host netif. +* FSinfo config Option:: FSinfo host config. +* FSinfo arch Option:: FSinfo host arch. +* FSinfo os Option:: FSinfo host os. +* FSinfo cluster Option:: FSinfo host cluster. + + +File: am-utils.info, Node: FSinfo netif Option, Next: FSinfo config Option, Up: FSinfo host attributes + +8.5.1 netif Option +------------------ + +This defines the set of network interfaces configured on the machine. +The interface attributes collected by FSinfo are the IP address, subnet +mask and hardware address. Multiple interfaces may be defined for hosts +with several interfaces by an entry for each interface. The values +given are sanity checked, but are currently unused for anything else. + + netif : "netif" "{" list(netif_attrs) "}" ; + + netif_attrs : netif_attr "=" ; + + netif_attr : "inaddr" | "netmask" | "hwaddr" ; + + Examples: + + netif ie0 { + inaddr = 129.31.81.37 + netmask = 0xfffffe00 + hwaddr = "08:00:20:01:a6:a5" + } + + netif ec0 { } + + +File: am-utils.info, Node: FSinfo config Option, Next: FSinfo arch Option, Prev: FSinfo netif Option, Up: FSinfo host attributes + +8.5.2 config Option +------------------- + +This option allows you to specify configuration variables for the +startup scripts ('rc' scripts). A simple string should immediately +follow the keyword. + + Example: + + config "NFS_SERVER=true" + config "ZEPHYR=true" + + This option is currently unsupported. + + +File: am-utils.info, Node: FSinfo arch Option, Next: FSinfo os Option, Prev: FSinfo config Option, Up: FSinfo host attributes + +8.5.3 arch Option +----------------- + +This defines the architecture of the machine. For example: + + arch = hp300 + + This is intended to be of use when building architecture specific +mountmaps, however, the option is currently unsupported. + + +File: am-utils.info, Node: FSinfo os Option, Next: FSinfo cluster Option, Prev: FSinfo arch Option, Up: FSinfo host attributes + +8.5.4 os Option +--------------- + +This defines the operating system type of the host. For example: + + os = hpux + + This information is used when creating the 'fstab' files, for example +in choosing which format to use for the 'fstab' entries within the file. + + +File: am-utils.info, Node: FSinfo cluster Option, Prev: FSinfo os Option, Up: FSinfo host attributes + +8.5.5 cluster Option +-------------------- + +This is used for specifying in which cluster the machine belongs. For +example: + + cluster = "theory" + + The cluster is intended to be used when generating the automount +maps, although it is currently unsupported. + + +File: am-utils.info, Node: FSinfo filesystems, Next: FSinfo static mounts, Prev: FSinfo host attributes, Up: FSinfo host definitions + +8.6 FSinfo filesystems +====================== + +The list of physically attached filesystems follows the machine +attributes. These should define all the filesystems available from this +machine, whether exported or not. In addition to the device name, +filesystems have several attributes, such as filesystem type, mount +options, and 'fsck' pass number which are needed to generate 'fstab' +entries. + + filesystem : "fs" "{" list(fs_data) "}" ; + + fs_data : fs_data_attr "=" + | mount + ; + + fs_data_attr + : "fstype" | "opts" | "passno" + | "freq" | "dumpset" | "log" + ; + + Here, is the device name of the disk (for example, +'/dev/dsk/2s0'). The device name is used for building the mount maps +and for the 'fstab' file. The attributes that can be specified are +shown in the following section. + + The FSinfo configuration file for 'dylan.doc.ic.ac.uk' is listed +below. + + host dylan.doc.ic.ac.uk + + fs /dev/dsk/0s0 { + fstype = swap + } + + fs /dev/dsk/0s0 { + fstype = hfs + opts = rw,noquota,grpid + passno = 0; + freq = 1; + mount / { } + } + + fs /dev/dsk/1s0 { + fstype = hfs + opts = defaults + passno = 1; + freq = 1; + mount /usr { + local { + exportfs "dougal eden dylan zebedee brian" + volname /nfs/hp300/local + } + } + } + + fs /dev/dsk/2s0 { + fstype = hfs + opts = defaults + passno = 1; + freq = 1; + mount default { + exportfs "toytown_clients hangers_on" + volname /home/dylan/dk2 + } + } + + fs /dev/dsk/3s0 { + fstype = hfs + opts = defaults + passno = 1; + freq = 1; + mount default { + exportfs "toytown_clients hangers_on" + volname /home/dylan/dk3 + } + } + + fs /dev/dsk/5s0 { + fstype = hfs + opts = defaults + passno = 1; + freq = 1; + mount default { + exportfs "toytown_clients hangers_on" + volname /home/dylan/dk5 + } + } + +* Menu: + +* FSinfo fstype Option:: FSinfo filesystems fstype. +* FSinfo opts Option:: FSinfo filesystems opts. +* FSinfo passno Option:: FSinfo filesystems passno. +* FSinfo freq Option:: FSinfo filesystems freq. +* FSinfo mount Option:: FSinfo filesystems mount. +* FSinfo dumpset Option:: FSinfo filesystems dumpset. +* FSinfo log Option:: FSinfo filesystems log. + + +File: am-utils.info, Node: FSinfo fstype Option, Next: FSinfo opts Option, Up: FSinfo filesystems + +8.6.1 fstype Option +------------------- + +This specifies the type of filesystem being declared and will be placed +into the 'fstab' file as is. The value of this option will be handed to +'mount' as the filesystem type--it should have such values as '4.2', +'nfs' or 'swap'. The value is not examined for correctness. + + There is one special case. If the filesystem type is specified as +'export' then the filesystem information will not be added to the host's +'fstab' information, but it will still be visible on the network. This +is useful for defining hosts which contain referenced volumes but which +are not under full control of FSinfo. + + Example: + + fstype = swap + + +File: am-utils.info, Node: FSinfo opts Option, Next: FSinfo passno Option, Prev: FSinfo fstype Option, Up: FSinfo filesystems + +8.6.2 opts Option +----------------- + +This defines any options that should be given to mount(8) in the 'fstab' +file. For example: + + opts = rw,nosuid,grpid + + +File: am-utils.info, Node: FSinfo passno Option, Next: FSinfo freq Option, Prev: FSinfo opts Option, Up: FSinfo filesystems + +8.6.3 passno Option +------------------- + +This defines the fsck(8) pass number in which to check the filesystem. +This value will be placed into the 'fstab' file. + + Example: + + passno = 1 + + +File: am-utils.info, Node: FSinfo freq Option, Next: FSinfo mount Option, Prev: FSinfo passno Option, Up: FSinfo filesystems + +8.6.4 freq Option +----------------- + +This defines the interval (in days) between dumps. The value is placed +as is into the 'fstab' file. + + Example: + + freq = 3 + + +File: am-utils.info, Node: FSinfo mount Option, Next: FSinfo dumpset Option, Prev: FSinfo freq Option, Up: FSinfo filesystems + +8.6.5 mount Option +------------------ + +This defines the mountpoint at which to place the filesystem. If the +mountpoint of the filesystem is specified as 'default', then the +filesystem will be mounted in the automounter's tree under its volume +name and the mount will automatically be inherited by the automounter. + + Following the mountpoint, namespace information for the filesystem +may be described. The options that can be given here are 'exportfs', +'volname' and 'sel'. + + The format is: + + mount : "mount" vol_tree ; + + vol_tree : list(vol_tree_attr) ; + + vol_tree_attr + : "{" list(vol_tree_info) vol_tree "}" ; + + vol_tree_info + : "exportfs" + | "volname" + | "sel" + ; + + Example: + + mount default { + exportfs "dylan dougal florence zebedee" + volname /vol/andrew + } + + In the above example, the filesystem currently being declared will +have an entry placed into the 'exports' file allowing the filesystem to +be exported to the machines 'dylan', 'dougal', 'florence' and 'zebedee'. +The volume name by which the filesystem will be referred to remotely, is +'/vol/andrew'. By declaring the mountpoint to be 'default', the +filesystem will be mounted on the local machine in the automounter tree, +where Amd will automatically inherit the mount as '/vol/andrew'. + +'exportfs' + a string defining which machines the filesystem may be exported to. + This is copied, as is, into the 'exports' file--no sanity checking + is performed on this string. + +'volname' + a string which declares the remote name by which to reference the + filesystem. The string is entered into a dictionary and allows you + to refer to this filesystem in other places by this volume name. + +'sel' + a string which is placed into the automounter maps as a selector + for the filesystem. + + +File: am-utils.info, Node: FSinfo dumpset Option, Next: FSinfo log Option, Prev: FSinfo mount Option, Up: FSinfo filesystems + +8.6.6 dumpset Option +-------------------- + +This provides support for Imperial College's local file backup tools and +is not documented further here. + + +File: am-utils.info, Node: FSinfo log Option, Prev: FSinfo dumpset Option, Up: FSinfo filesystems + +8.6.7 log Option +---------------- + +Specifies the log device for the current filesystem. This is ignored if +not required by the particular filesystem type. + + +File: am-utils.info, Node: FSinfo static mounts, Next: FSinfo automount definitions, Prev: FSinfo filesystems, Up: FSinfo host definitions + +8.7 FSinfo static mounts +======================== + +Each host may also have a number of statically mounted filesystems. For +example, the host may be a diskless workstation in which case it will +have no 'fs' declarations. In this case the 'mount' declaration is used +to determine from where its filesystems will be mounted. In addition to +being added to the 'fstab' file, this information can also be used to +generate a suitable 'bootparams' file. + + mount : "mount" list(localinfo) ; + + localinfo : localinfo_attr ; + + localinfo_attr + : "as" + | "from" + | "fstype" + | "opts" + ; + + The filesystem specified to be mounted will be searched for in the +dictionary of volume names built when scanning the list of hosts' +definitions. + + The attributes have the following semantics: +'from MACHINE' + mount the filesystem from the machine with the hostname of + "machine". + +'as MOUNTPOINT' + mount the filesystem locally as the name given, in case this is + different from the advertised volume name of the filesystem. + +'opts OPTIONS' + native mount(8) options. + +'fstype TYPE' + type of filesystem to be mounted. + + An example: + + mount /export/exec/hp300/local as /usr/local + + If the mountpoint specified is either '/' or 'swap', the machine will +be considered to be booting off the net and this will be noted for use +in generating a 'bootparams' file for the host which owns the +filesystems. + + +File: am-utils.info, Node: FSinfo automount definitions, Next: FSinfo Command Line Options, Prev: FSinfo static mounts, Up: FSinfo + +8.8 Defining an Amd Mount Map in FSinfo +======================================= + +The maps used by Amd can be constructed from FSinfo by defining all the +automount trees. FSinfo takes all the definitions found and builds one +map for each top level tree. + + The automount tree is usually defined last. A single automount +configuration will usually apply to an entire management domain. One +'automount' declaration is needed for each Amd automount point. FSinfo +determines whether the automount point is "direct" (*note Direct +Automount Filesystem::) or "indirect" (*note Top-level Filesystem::). +Direct automount points are distinguished by the fact that there is no +underlying "automount_tree". + + automount : "automount" opt(auto_opts) automount_tree ; + + auto_opts : "opts" ; + + automount_tree + : list(automount_attr) + ; + + automount_attr + : "=" + | "->" + | "{" automount_tree "}" + ; + + If is given, then it is the string to be placed in +the maps for Amd for the 'opts' option. + + A "map" is typically a tree of filesystems, for example 'home' +normally contains a tree of filesystems representing other machines in +the network. + + A map can either be given as a name representing an already defined +volume name, or it can be a tree. A tree is represented by placing +braces after the name. For example, to define a tree '/vol', the +following map would be defined: + + automount /vol { } + + Within a tree, the only items that can appear are more maps. For +example: + + automount /vol { + andrew { } + X11 { } + } + + In this case, FSinfo will look for volumes named '/vol/andrew' and +'/vol/X11' and a map entry will be generated for each. If the volumes +are defined more than once, then FSinfo will generate a series of +alternate entries for them in the maps. + + Instead of a tree, either a link (NAME '->' DESTINATION) or a +reference can be specified (NAME '=' DESTINATION). A link creates a +symbolic link to the string specified, without further processing the +entry. A reference will examine the destination filesystem and optimize +the reference. For example, to create an entry for 'njw' in the +'/homes' map, either of the two forms can be used: + + automount /homes { + njw -> /home/dylan/njw + } + + or + + automount /homes { + njw = /home/dylan/njw + } + + In the first example, when '/homes/njw' is referenced from Amd, a +link will be created leading to '/home/dylan/njw' and the automounter +will be referenced a second time to resolve this filename. The map +entry would be: + + njw type:=link;fs:=/home/dylan/njw + + In the second example, the destination directory is analyzed and +found to be in the filesystem '/home/dylan' which has previously been +defined in the maps. Hence the map entry will look like: + + njw rhost:=dylan;rfs:=/home/dylan;sublink:=njw + + Creating only one symbolic link, and one access to Amd. + + +File: am-utils.info, Node: FSinfo Command Line Options, Next: FSinfo errors, Prev: FSinfo automount definitions, Up: FSinfo + +8.9 FSinfo Command Line Options +=============================== + +FSinfo is started from the command line by using the command: + + fsinfo [options] files ... + + The input to FSinfo is a single set of definitions of machines and +automount maps. If multiple files are given on the command-line, then +the files are concatenated together to form the input source. The files +are passed individually through the C pre-processor before being parsed. + + Several options define a prefix for the name of an output file. If +the prefix is not specified no output of that type is produced. The +suffix used will correspond either to the hostname to which a file +belongs, or to the type of output if only one file is produced. +Dumpsets and the 'bootparams' file are in the latter class. To put the +output into a subdirectory simply put a '/' at the end of the prefix, +making sure that the directory has already been made before running +Fsinfo. + +* Menu: + +* -a FSinfo Option:: Amd automount directory: +* -b FSinfo Option:: Prefix for bootparams files. +* -d FSinfo Option:: Prefix for dumpset data files. +* -e FSinfo Option:: Prefix for exports files. +* -f FSinfo Option:: Prefix for fstab files. +* -h FSinfo Option:: Local hostname. +* -m FSinfo Option:: Prefix for automount maps. +* -q FSinfo Option:: Ultra quiet mode. +* -v FSinfo Option:: Verbose mode. +* -I FSinfo Option:: Define new #include directory. +* -D-FSinfo Option:: Define macro. +* -U FSinfo Option:: Undefine macro. + + +File: am-utils.info, Node: -a FSinfo Option, Next: -b FSinfo Option, Prev: FSinfo Command Line Options, Up: FSinfo Command Line Options + +8.9.1 '-a' AUTODIR +------------------ + +Specifies the directory name in which to place the automounter's +mountpoints. This defaults to '/a'. Some sites have the autodir set to +be '/amd', and this would be achieved by: + + fsinfo -a /amd ... + + +File: am-utils.info, Node: -b FSinfo Option, Next: -d FSinfo Option, Prev: -a FSinfo Option, Up: FSinfo Command Line Options + +8.9.2 '-b' BOOTPARAMS +--------------------- + +This specifies the prefix for the 'bootparams' filename. If it is not +given, then the file will not be generated. The 'bootparams' file will +be constructed for the destination machine and will be placed into a +file named 'bootparams' and prefixed by this string. The file generated +contains a list of entries describing each diskless client that can boot +from the destination machine. + + As an example, to create a 'bootparams' file in the directory +'generic', the following would be used: + + fsinfo -b generic/ ... + + +File: am-utils.info, Node: -d FSinfo Option, Next: -e FSinfo Option, Prev: -b FSinfo Option, Up: FSinfo Command Line Options + +8.9.3 '-d' DUMPSETS +------------------- + +This specifies the prefix for the 'dumpsets' file. If it is not +specified, then the file will not be generated. The file will be for +the destination machine and will be placed into a filename 'dumpsets', +prefixed by this string. The 'dumpsets' file is for use by Imperial +College's local backup system. + + For example, to create a 'dumpsets' file in the directory 'generic', +then you would use the following: + + fsinfo -d generic/ ... + + +File: am-utils.info, Node: -e FSinfo Option, Next: -f FSinfo Option, Prev: -d FSinfo Option, Up: FSinfo Command Line Options + +8.9.4 '-e' EXPORTFS +------------------- + +Defines the prefix for the 'exports' files. If it is not given, then +the file will not be generated. For each machine defined in the +configuration files as having disks, an 'exports' file is constructed +and given a filename determined by the name of the machine, prefixed +with this string. If a machine is defined as diskless, then no +'exports' file will be created for it. The files contain entries for +directories on the machine that may be exported to clients. + + Example: To create the 'exports' files for each diskfull machine and +place them into the directory 'exports': + + fsinfo -e exports/ ... + + +File: am-utils.info, Node: -f FSinfo Option, Next: -h FSinfo Option, Prev: -e FSinfo Option, Up: FSinfo Command Line Options + +8.9.5 '-f' FSTAB +---------------- + +This defines the prefix for the 'fstab' files. The files will only be +created if this prefix is defined. For each machine defined in the +configuration files, a 'fstab' file is created with the filename +determined by prefixing this string with the name of the machine. These +files contain entries for filesystems and partitions to mount at boot +time. + + Example, to create the files in the directory 'fstabs': + + fsinfo -f fstabs/ ... + + +File: am-utils.info, Node: -h FSinfo Option, Next: -m FSinfo Option, Prev: -f FSinfo Option, Up: FSinfo Command Line Options + +8.9.6 '-h' HOSTNAME +------------------- + +Defines the hostname of the destination machine to process for. If this +is not specified, it defaults to the local machine name, as returned by +gethostname(2). + + Example: + + fsinfo -h dylan.doc.ic.ac.uk ... + + +File: am-utils.info, Node: -m FSinfo Option, Next: -q FSinfo Option, Prev: -h FSinfo Option, Up: FSinfo Command Line Options + +8.9.7 '-m' MOUNT-MAPS +--------------------- + +Defines the prefix for the automounter files. The maps will only be +produced if this prefix is defined. The mount maps suitable for the +network defined by the configuration files will be placed into files +with names calculated by prefixing this string to the name of each map. + + For example, to create the automounter maps and place them in the +directory 'automaps': + + fsinfo -m automaps/ ... + + +File: am-utils.info, Node: -q FSinfo Option, Next: -v FSinfo Option, Prev: -m FSinfo Option, Up: FSinfo Command Line Options + +8.9.8 '-q' +---------- + +Selects quiet mode. FSinfo suppress the "running commentary" and only +outputs any error messages which are generated. + + +File: am-utils.info, Node: -v FSinfo Option, Next: -D-FSinfo Option, Prev: -q FSinfo Option, Up: FSinfo Command Line Options + +8.9.9 '-v' +---------- + +Selects verbose mode. When this is activated, the program will display +more messages, and display all the information discovered when +performing the semantic analysis phase. Each verbose message is output +to 'stdout' on a line starting with a '#' character. + + +File: am-utils.info, Node: -D-FSinfo Option, Next: -I FSinfo Option, Prev: -v FSinfo Option, Up: FSinfo Command Line Options + +8.9.10 '-D' NAME[=defn] +----------------------- + +Defines a symbol "name" for the preprocessor when reading the +configuration files. Equivalent to '#define' directive. + + +File: am-utils.info, Node: -I FSinfo Option, Next: -U FSinfo Option, Prev: -D-FSinfo Option, Up: FSinfo Command Line Options + +8.9.11 '-I' DIRECTORY +--------------------- + +This option is passed into the preprocessor for the configuration files. +It specifies directories in which to find include files + + +File: am-utils.info, Node: -U FSinfo Option, Prev: -I FSinfo Option, Up: FSinfo Command Line Options + +8.9.12 '-U' NAME +---------------- + +Removes any initial definition of the symbol "name". Inverse of the +'-D' option. + + +File: am-utils.info, Node: FSinfo errors, Prev: FSinfo Command Line Options, Up: FSinfo + +8.10 Errors produced by FSinfo +============================== + +The following table documents the errors and warnings which FSinfo may +produce. + +" expected + Occurs if an unescaped newline is found in a quoted string. + +ambiguous mount: VOLUME is a replicated filesystem + If several filesystems are declared as having the same volume name, + they will be considered replicated filesystems. To mount a + replicated filesystem statically, a specific host will need to be + named, to say which particular copy to try and mount, else this + error will result. + +can't open FILENAME for writing + Occurs if any errors are encountered when opening an output file. + +cannot determine localname since volname VOLUME is not uniquely defined + If a volume is replicated and an attempt is made to mount the + filesystem statically without specifying a local mountpoint, FSinfo + cannot calculate a mountpoint, as the desired pathname would be + ambiguous. + +DEVICE has duplicate exportfs data + Produced if the 'exportfs' option is used multiple times within the + same branch of a filesystem definition. For example, if you + attempt to set the 'exportfs' data at different levels of the + mountpoint directory tree. + +dump frequency for HOST:DEVICE is non-zero + Occurs if DEVICE has its 'fstype' declared to be 'swap' or 'export' + and the 'dump' option is set to a value greater than zero. Swap + devices should not be dumped. + +duplicate host HOSTNAME! + If a host has more than one definition. + +end of file within comment + A comment was unterminated before the end of one of the + configuration files. + +FILENAME: cannot open for reading + If a file specified on the command line as containing configuration + data could not be opened. + +FILESYSTEM has a volname but no exportfs data + Occurs when a volume name is declared for a file system, but the + string specifying what machines the filesystem can be exported to + is missing. + +fs field "FIELD-NAME" already set + Occurs when multiple definitions are given for one of the + attributes of a host's filesystem. + +host field "FIELD-NAME" already set + If duplicate definitions are given for any of the fields with a + host definition. + +HOST:DEVICE has more than one mount point + Occurs if the mount option for a host's filesystem specifies + multiple trees at which to place the mountpoint. + +HOST:DEVICE has no mount point + Occurs if the 'mount' option is not specified for a host's + filesystem. + +HOST:DEVICE needs field "FIELD-NAME" + Occurs when a filesystem is missing a required field. FIELD-NAME + could be one of 'fstype', 'opts', 'passno' or 'mount'. + +HOST:mount field specified for swap partition + Occurs if a mountpoint is given for a filesystem whose type is + declared to be 'swap'. + +malformed IP dotted quad: ADDRESS + If the Internet address of an interface is incorrectly specified. + An Internet address definition is handled to inet_addr(3N) to see + if it can cope. If not, then this message will be displayed. + +malformed netmask: NETMASK + If the netmask cannot be decoded as though it were a hexadecimal + number, then this message will be displayed. It will typically be + caused by incorrect characters in the NETMASK value. + +mount field "FIELD-NAME" already set + Occurs when a static mount has multiple definitions of the same + field. + +mount tree field "FIELD-NAME" already set + Occurs when the FIELD-NAME is defined more than once during the + definition of a filesystems mountpoint. + +netif field FIELD-NAME already set + Occurs if you attempt to define an attribute of an interface more + than once. + +network booting requires both root and swap areas + Occurs if a machine has mount declarations for either the root + partition or the swap area, but not both. You cannot define a + machine to only partially boot via the network. + +no disk mounts on HOSTNAME + If there are no static mounts, nor local disk mounts specified for + a machine, this message will be displayed. + +no volname given for HOST:DEVICE + Occurs when a filesystem is defined to be mounted on 'default', but + no volume name is given for the file system, then the mountpoint + cannot be determined. + +not allowed '/' in a directory name + Occurs when a pathname with multiple directory elements is + specified as the name for an automounter tree. A tree should only + have one name at each level. + +pass number for HOST:DEVICE is non-zero + Occurs if DEVICE has its 'fstype' declared to be 'swap' or 'export' + and the fsck(8) pass number is set. Swap devices should not be + fsck'd. *Note FSinfo fstype Option::. + +sub-directory DIRECTORY of DIRECTORY-TREE starts with '/' + Within the filesystem specification for a host, if an element + DIRECTORY of the mountpoint begins with a '/' and it is not the + start of the tree. + +sub-directory of DIRECTORY-TREE is named "default" + 'default' is a keyword used to specify if a mountpoint should be + automatically calculated by FSinfo. If you attempt to specify a + directory name as this, it will use the filename of 'default' but + will produce this warning. + +unknown \ sequence + Occurs if an unknown escape sequence is found inside a string. + Within a string, you can give the standard C escape sequences for + strings, such as newlines and tab characters. + +unknown directory attribute + If an unknown keyword is found while reading the definition of a + host's filesystem mount option. + +unknown filesystem attribute + Occurs if an unrecognized keyword is used when defining a host's + filesystems. + +unknown host attribute + Occurs if an unrecognized keyword is used when defining a host. + +unknown mount attribute + Occurs if an unrecognized keyword is found while parsing the list + of static mounts. + +unknown volname VOLUME automounted [ on name ] + Occurs if VOLUME is used in a definition of an automount map but + the volume name has not been declared during the host filesystem + definitions. + +volname VOLUME is unknown + Occurs if an attempt is made to mount or reference a volume name + which has not been declared during the host filesystem definitions. + +volname VOLUME not exported from MACHINE + Occurs if you attempt to mount the volume VOLUME from a machine + which has not declared itself to have such a filesystem available. + + +File: am-utils.info, Node: Hlfsd, Next: Assorted Tools, Prev: FSinfo, Up: Top + +9 Hlfsd +******* + +Hlfsd is a daemon which implements a filesystem containing a symbolic +link to subdirectory within a user's home directory, depending on the +user which accessed that link. It was primarily designed to redirect +incoming mail to users' home directories, so that it can be read from +anywhere. It was designed and implemented by Erez Zadok +(http://www.cs.sunysb.edu/~ezk) and Alexander Dupuy , at the Computer Science Department +(http://www.cs.columbia.edu/) of Columbia University +(http://www.columbia.edu/). A paper +(http://www.fsl.cs.sunysb.edu/docs/hlfsd/hlfsd.html) on Hlfsd was +presented at the Usenix LISA VII conference in 1993. + + Hlfsd operates by mounting itself as an NFS server for the directory +containing linkname, which defaults to '/hlfs/home'. Lookups within +that directory are handled by Hlfsd, which uses the password map to +determine how to resolve the lookup. The directory will be created if +it doesn't already exist. The symbolic link will be to the accessing +user's home directory, with subdir appended to it. If not specified, +subdir defaults to '.hlfsdir'. This directory will also be created if +it does not already exist. + + A 'SIGTERM' sent to Hlfsd will cause it to shutdown. A 'SIGHUP' will +flush the internal caches, and reload the password map. It will also +close and reopen the log file, to enable the original log file to be +removed or rotated. A 'SIGUSR1' will cause it to dump its internal +table of user IDs and home directories to the file '/tmp/hlfsddump'. + +* Menu: + +* Introduction to Hlfsd:: +* Background to Mail Delivery:: +* Using Hlfsd:: + + +File: am-utils.info, Node: Introduction to Hlfsd, Next: Background to Mail Delivery, Prev: Hlfsd, Up: Hlfsd + +9.1 Introduction to Hlfsd +========================= + +Electronic mail has become one of the major applications for many +computer networks, and use of this service is expected to increase over +time, as networks proliferate and become faster. Providing a convenient +environment for users to read, compose, and send electronic mail has +become a requirement for systems administrators (SAs). + + Widely used methods for handling mail usually require users to be +logged into a designated "home" machine, where their mailbox files +reside. Only on that one machine can they read newly arrived mail. +Since users have to be logged into that system to read their mail, they +often find it convenient to run all of their other processes on that +system as well, including memory and CPU-intensive jobs. For example, +in our department, we have allocated and configured several +multi-processor servers to handle such demanding CPU/memory +applications, but these were underutilized, in large part due to the +inconvenience of not being able to read mail on those machines. (No +home directories were located on these designated CPU-servers, since we +did not want NFS service for users' home directories to have to compete +with CPU-intensive jobs. At the same time, we discouraged users from +running demanding applications on their home machines.) + + Many different solutions have been proposed to allow users to read +their mail on any host. However, all of these solutions fail in one or +more of several ways: + + * they introduce new single points of failure + + * they require using different mail transfer agents (MTAs) or user + agents (UAs) + + * they do not solve the problem for all cases, i.e. the solution is + only partially successful for a particular environment. + + We have designed a simple filesystem, called the "Home-Link File +System", to provide the ability to deliver mail to users' home +directories, without modification to mail-related applications. We have +endeavored to make it as stable as possible. Of great importance to us +was to make sure the HLFS daemon, 'hlfsd' , would not hang under any +circumstances, and would take the next-best action when faced with +problems. Compared to alternative methods, Hlfsd is a stable, more +general solution, and easier to install/use. In fact, in some ways, we +have even managed to improve the reliability and security of mail +service. + + Our server implements a small filesystem containing a symbolic link +to a subdirectory of the invoking user's home directory, and named +symbolic links to users' mailbox files. + + The Hlfsd server finds out the UID of the process that is accessing +its mount point, and resolves the pathname component 'home' as a +symbolic link to a subdirectory within the home directory given by the +UID's entry in the password file. If the GID of the process that +attempts to access a mailbox file is a special one (called HLFS_GID), +then the server maps the name of the _next_ pathname component directly +to the user's mailbox. This is necessary so that access to a mailbox +file by users other than the owner can succeed. The server has safety +features in case of failures such as hung filesystems or home directory +filesystems that are inaccessible or full. + + On most of our machines, mail gets delivered to the directory +'/var/spool/mail'. Many programs, including UAs, depend on that path. +Hlfsd creates a directory '/mail', and mounts itself on top of that +directory. Hlfsd implements the path name component called 'home', +pointing to a subdirectory of the user's home directory. We have made +'/var/spool/mail' a symbolic link to '/mail/home', so that accessing +'/var/spool/mail' actually causes access to a subdirectory within a +user's home directory. + + The following table shows an example of how resolving the pathname +'/var/mail/NAME' to '/users/ezk/.mailspool/NAME' proceeds. + +Resolving Component Pathname left to resolve Value if symbolic link + +/ var/mail/NAME + +var/ mail/NAME + +mail@ /mail/home/NAME mail@ -> /mail/home + +/ mail/home/NAME + +mail/ home/NAME + +home@ NAME home@ -> + /users/ezk/.mailspool + +/ users/ezk/.mailspool/NAME + +users/ ezk/.mailspool/NAME + +ezk/ .mailspool/NAME + +.mailspool/ NAME + +NAME + + +File: am-utils.info, Node: Background to Mail Delivery, Next: Using Hlfsd, Prev: Introduction to Hlfsd, Up: Hlfsd + +9.2 Background to Mail Delivery +=============================== + +This section provides an in-depth discussion of why available methods +for delivering mail to home directories are not as good as the one used +by Hlfsd. + +* Menu: + +* Single-Host Mail Spool Directory:: +* Centralized Mail Spool Directory:: +* Distributed Mail Spool Service:: +* Why Deliver Into the Home Directory?:: + + +File: am-utils.info, Node: Single-Host Mail Spool Directory, Next: Centralized Mail Spool Directory, Prev: Background to Mail Delivery, Up: Background to Mail Delivery + +9.2.1 Single-Host Mail Spool Directory +-------------------------------------- + +The most common method for mail delivery is for mail to be appended to a +mailbox file in a standard spool directory on the designated "mail home" +machine of the user. The greatest advantage of this method is that it +is the default method most vendors provide with their systems, thus very +little (if any) configuration is required on the SA's part. All they +need to set up are mail aliases directing mail to the host on which the +user's mailbox file is assigned. (Otherwise, mail is delivered locally, +and users find mailboxes on many machines.) + + As users become more sophisticated, and aided by windowing systems, +they find themselves logging in on multiple hosts at once, performing +several tasks concurrently. They ask to be able to read their mail on +any host on the network, not just the one designated as their "mail +home". + + +File: am-utils.info, Node: Centralized Mail Spool Directory, Next: Distributed Mail Spool Service, Prev: Single-Host Mail Spool Directory, Up: Background to Mail Delivery + +9.2.2 Centralized Mail Spool Directory +-------------------------------------- + +A popular method for providing mail readability from any host is to have +all mail delivered to a mail spool directory on a designated +"mail-server" which is exported via NFS to all of the hosts on the +network. Configuring such a system is relatively easy. On most +systems, the bulk of the work is a one-time addition to one or two +configuration files in '/etc'. The file-server's spool directory is +then hard-mounted across every machine on the local network. In small +environments with only a handful of hosts this can be an acceptable +solution. In our department, with a couple of hundred active hosts and +thousands of mail messages processed daily, this was deemed completely +unacceptable, as it introduced several types of problems: + +Scalability and Performance + + As more and more machines get added to the network, more mail + traffic has to go over NFS to and from the mail-server. Users like + to run mail-watchers, and read their mail often. The stress on the + shared infrastructure increases with every user and host added; + loads on the mail server would most certainly be high since all + mail delivery goes through that one machine.(1) This leads to + lower reliability and performance. To reduce the number of + concurrent connections between clients and the server host, some + SAs have resorted to automounting the mail-spool directory. But + this solution only makes things worse: since users often run mail + watchers, and many popular applications such as 'trn', 'emacs', + 'csh' or 'ksh' check periodically for new mail, the automounted + directory would be effectively permanently mounted. If it gets + unmounted automatically by the automounter program, it is most + likely to get mounted shortly afterwards, consuming more I/O + resources by the constant cycle of mount and umount calls. + +Reliability + + The mail-server host and its network connectivity must be very + reliable. Worse, since the spool directory has to be + hard-mounted,(2) many processes which access the spool directory + (various shells, 'login', 'emacs', etc.) would be hung as long as + connectivity to the mail-server is severed. To improve + reliability, SAs may choose to backup the mail-server's spool + partition several times a day. This may make things worse since + reading or delivering mail while backups are in progress may cause + backups to be inconsistent; more backups consume more backup-media + resources, and increase the load on the mail-server host. + + ---------- Footnotes ---------- + + (1) Delivery via NFS-mounted filesystems may require usage of +'rpc.lockd' and 'rpc.statd' to provide distributed file-locking, both of +which are widely regarded as unstable and unreliable. Furthermore, this +will degrade performance, as local processes as well as remote 'nfsd' +processes are kept busy. + + (2) No SA in their right minds would soft-mount read/write partitions +-- the chances for data loss are too great. + + +File: am-utils.info, Node: Distributed Mail Spool Service, Next: Why Deliver Into the Home Directory?, Prev: Centralized Mail Spool Directory, Up: Background to Mail Delivery + +9.2.3 Distributed Mail Spool Service +------------------------------------ + +Despite the existence of a few systems that support delivery to users' +home directories, mail delivery to home directories hasn't caught on. +We believe the main reason is that there are too many programs that +"know" where mailbox files reside. Besides the obvious (the delivery +program '/bin/mail' and mail readers like '/usr/ucb/Mail', 'mush', 'mm', +etc.), other programs that know mailbox location are login, from, almost +every shell, 'xbiff', 'xmailbox', and even some programs not directly +related to mail, such as 'emacs' and 'trn'. Although some of these +programs can be configured to look in different directories with the use +of environment variables and other resources, many of them cannot. The +overall porting work is significant. + + Other methods that have yet to catch on require the use of a special +mail-reading server, such as IMAP or POP. The main disadvantage of these +systems is that UAs need to be modified to use these services -- a long +and involved task. That is why they are not popular at this time. + + Several other ideas have been proposed and even used in various +environments. None of them is robust. They are mostly very +specialized, inflexible, and do not extend to the general case. Some of +the ideas are plain bad, potentially leading to lost or corrupt mail: + +automounters + + Using an automounter such as Amd to provide a set of symbolic links + from the normal spool directory to user home directories is not + sufficient. UAs rename, unlink, and recreate the mailbox as a + regular file, therefore it must be a real file, not a symbolic + link. Furthermore, it must reside in a real directory which is + writable by the UAs and MTAs. This method may also require + populating '/var/spool/mail' with symbolic links and making sure + they are updated. Making Amd manage that directory directly fails, + since many various lock files need to be managed as well. Also, + Amd does not provide all of the NFS operations which are required + to write mail such as write, create, remove, and unlink. + +'$MAIL' + + Setting this variable to an automounted directory pointing to the + user's mail spool host only solves the problem for those programs + which know and use '$MAIL'. Many programs don't, therefore this + solution is partial and of limited flexibility. Also, it requires + the SAs or the users to set it themselves -- an added level of + inconvenience and possible failures. + +/bin/mail + + Using a different mail delivery agent could be the solution. One + such example is 'hdmail'. However, 'hdmail' still requires + modifying all UAs, the MTA's configuration, installing new daemons, + and changing login scripts. This makes the system less upgradable + or compatible with others, and adds one more complicated system for + SAs to deal with. It is not a complete solution because it still + requires each user have their '$MAIL' variable setup correctly, and + that every program use this variable. + + +File: am-utils.info, Node: Why Deliver Into the Home Directory?, Prev: Distributed Mail Spool Service, Up: Background to Mail Delivery + +9.2.4 Why Deliver Into the Home Directory? +------------------------------------------ + +There are several major reasons why SAs might want to deliver mail +directly into the users' home directories: + +Location + + Many mail readers need to move mail from the spool directory to the + user's home directory. It speeds up this operation if the two are + on the same filesystem. If for some reason the user's home + directory is inaccessible, it isn't that useful to be able to read + mail, since there is no place to move it to. In some cases, trying + to move mail to a non-existent or hung filesystem may result in + mail loss. + +Distribution + + Having all mail spool directories spread among the many more + filesystems minimizes the chances that complete environments will + grind to a halt when a single server is down. It does increase the + chance that there will be someone who is not able to read their + mail when a machine is down, but that is usually preferred to + having no one be able to read their mail because a centralized mail + server is down. The problem of losing some mail due to the + (presumably) higher chances that a user's machine is down is + minimized in HLFS. + +Security + + Delivering mail to users' home directories has another advantage -- + enhanced security and privacy. Since a shared system mail spool + directory has to be world-readable and searchable, any user can see + whether other users have mail, when they last received new mail, or + when they last read their mail. Programs such as 'finger' display + this information, which some consider an infringement of privacy. + While it is possible to disable this feature of 'finger' so that + remote users cannot see a mailbox file's status, this doesn't + prevent local users from getting the information. Furthermore, + there are more programs which make use of this information. In + shared environments, disabling such programs has to be done on a + system-wide basis, but with mail delivered to users' home + directories, users less concerned with privacy who do want to let + others know when they last received or read mail can easily do so + using file protection bits. + + In summary, delivering mail to home directories provides users the +functionality sought, and also avoids most of the problems just +discussed. + + +File: am-utils.info, Node: Using Hlfsd, Prev: Background to Mail Delivery, Up: Hlfsd + +9.3 Using Hlfsd +=============== + +* Menu: + +* Controlling Hlfsd:: +* Hlfsd Options:: +* Hlfsd Files:: + + +File: am-utils.info, Node: Controlling Hlfsd, Next: Hlfsd Options, Prev: Using Hlfsd, Up: Using Hlfsd + +9.3.1 Controlling Hlfsd +----------------------- + +Much the same way Amd is controlled by 'ctl-amd', so does Hlfsd get +controlled by the 'ctl-hlfsd' script: + +ctl-hlfsd start + Start a new Hlfsd. + +ctl-hlfsd stop + Stop a running Hlfsd. + +ctl-hlfsd restart + Stop a running Hlfsd, wait for 10 seconds, and then start a new + one. It is hoped that within 10 seconds, the previously running + Hlfsd terminate properly; otherwise, starting a second one could + cause system lockup. + + For example, on our systems, we start Hlfsd within 'ctl-hlfsd' as +follows on Solaris 2 systems: + + hlfsd -a /var/alt_mail -x all -l /var/log/hlfsd /mail/home .mailspool + + The directory '/var/alt_mail' is a directory in the root partition +where alternate mail will be delivered into, when it cannot be delivered +into the user's home directory. + + Normal mail gets delivered into '/var/mail', but on our systems, that +is a symbolic link to '/mail/home'. '/mail' is managed by Hlfsd, which +creates a dynamic symlink named 'home', pointing to the subdirectory +'.mailspool' _within_ the accessing user's home directory. This results +in mail which normally should go to '/var/mail/$USER', to go to +'$HOME/.mailspool/$USER'. + + Hlfsd does not create the '/var/mail' symlink. This needs to be +created (manually) once on each host, by the system administrators, as +follows: + + mv /var/mail /var/alt_mail + ln -s /mail/home /var/mail + + Hlfsd also responds to the following signals: + + A 'SIGHUP' signal sent to Hlfsd will force it to reload the password +map immediately. + + A 'SIGUSR1' signal sent to Hlfsd will cause it to dump its internal +password map to the file '/usr/tmp/hlfsd.dump.XXXXXX', where 'XXXXXX' +will be replaced by a random string generated by mktemp(3) or (the more +secure) mkstemp(3). + + +File: am-utils.info, Node: Hlfsd Options, Next: Hlfsd Files, Prev: Controlling Hlfsd, Up: Using Hlfsd + +9.3.2 Hlfsd Options +------------------- + +-a ALT_DIR + Alternate directory. The name of the directory to which the + symbolic link returned by Hlfsd will point, if it cannot access the + home directory of the user. This defaults to '/var/hlfs'. This + directory will be created if it doesn't exist. It is expected that + either users will read these files, or the system administrators + will run a script to resend this "lost mail" to its owner. + +-c CACHE-INTERVAL + Caching interval. Hlfsd will cache the validity of home + directories for this interval, in seconds. Entries which have been + verified within the last CACHE-INTERVAL seconds will not be + verified again, since the operation could be expensive, and the + entries are most likely still valid. After the interval has + expired, Hlfsd will re-verify the validity of the user's home + directory, and reset the cache time-counter. The default value for + CACHE-INTERVAL is 300 seconds (5 minutes). + +-f + Force fast startup. This option tells Hlfsd to skip startup-time + consistency checks such as existence of mount directory, alternate + spool directory, symlink to be hidden under the mount directory, + their permissions and validity. + +-g GROUP + Set the special group HLFS_GID to GROUP. Programs such as + '/usr/ucb/from' or '/usr/sbin/in.comsat', which access the + mailboxes of other users, must be setgid 'HLFS_GID' to work + properly. The default group is 'hlfs'. If no group is provided, + and there is no group 'hlfs', this feature is disabled. + +-h + Help. Print a brief help message, and exit. + +-i RELOAD-INTERVAL + Map-reloading interval. Each RELOAD-INTERVAL seconds, Hlfsd will + reload the password map. Hlfsd needs the password map for the UIDs + and home directory pathnames. Hlfsd schedules a 'SIGALRM' to + reload the password maps. A 'SIGHUP' sent to Hlfsd will force it + to reload the maps immediately. The default value for + RELOAD-INTERVAL is 900 seconds (15 minutes.) + +-l LOGFILE + Specify a log file to which Hlfsd will record events. If LOGFILE + is the string 'syslog' then the log messages will be sent to the + system log daemon by syslog(3), using the 'LOG_DAEMON' facility. + This is also the default. + +-n + No verify. Hlfsd will not verify the validity of the symbolic link + it will be returning, or that the user's home directory contains + sufficient disk-space for spooling. This can speed up Hlfsd at the + cost of possibly returning symbolic links to home directories which + are not currently accessible or are full. By default, Hlfsd + validates the symbolic-link in the background. The '-n' option + overrides the meaning of the '-c' option, since no caching is + necessary. + +-o MOUNT-OPTIONS + Mount options which Hlfsd will use to mount itself on top of + DIRNAME. By default, MOUNT-OPTIONS is set to 'ro'. If the system + supports symbolic-link caching, default options are set to + 'ro,nocache'. + +-p + Print PID. Outputs the process-id of Hlfsd to standard output where + it can be saved into a file. + +-v + Version. Displays version information to standard error. + +-x LOG-OPTIONS + Specify run-time logging options. The options are a comma + separated list chosen from: 'fatal', 'error', 'user', 'warn', + 'info', 'map', 'stats', 'all'. + +-C + Force Hlfsd to run on systems that cannot turn off the NFS + attribute-cache. Use of this option on those systems is + discouraged, as it may result in loss or misdelivery of mail. The + option is ignored on systems that can turn off the attribute-cache. + +-D LOG-OPTIONS + Select from a variety of debugging options. Prefixing an option + with the string 'no' reverses the effect of that option. Options + are cumulative. The most useful option is 'all'. Since this + option is only used for debugging other options are not documented + here. A fuller description is available in the program source. + +-P PASSWORD-FILE + Read the user-name, user-id, and home directory information from + the file PASSWORD-FILE. Normally, Hlfsd will use getpwent(3) to + read the password database. This option allows you to override the + default database, and is useful if you want to map users' mail + files to a directory other than their home directory. Only the + username, uid, and home-directory fields of the file PASSWORD-FILE + are read and checked. All other fields are ignored. The file + PASSWORD-FILE must otherwise be compliant with Unix Version 7 + colon-delimited format passwd(4). + + +File: am-utils.info, Node: Hlfsd Files, Prev: Hlfsd Options, Up: Using Hlfsd + +9.3.3 Hlfsd Files +----------------- + +The following files are used by Hlfsd: + +'/hlfs' + directory under which Hlfsd mounts itself and manages the symbolic + link 'home'. + +'.hlfsdir' + default sub-directory in the user's home directory, to which the + 'home' symbolic link returned by Hlfsd points. + +'/var/hlfs' + directory to which 'home' symbolic link returned by Hlfsd points if + it is unable to verify the that user's home directory is + accessible. + +'/usr/tmp/hlfsd.dump.XXXXXX' + file to which Hlfsd will dump its internal password map when it + receives the 'SIGUSR1' signal. 'XXXXXX' will be replaced by a + random string generated by mktemp(3) or (the more secure) + mkstemp(3). + + For discussion on other files used by Hlfsd, see *Note lostaltmail::, +and *note lostaltmail.conf-sample::. + + +File: am-utils.info, Node: Assorted Tools, Next: Examples, Prev: Hlfsd, Up: Top + +10 Assorted Tools +***************** + +The following are additional utilities and scripts included with +am-utils, and get installed. + +* Menu: + +* am-eject:: +* amd.conf-sample:: +* amd2ldif:: +* amd2sun:: +* automount2amd:: +* ctl-amd:: +* ctl-hlfsd:: +* fix-amd-map:: +* fixmount:: +* fixrmtab:: +* lostaltmail:: +* lostaltmail.conf-sample:: +* mk-amd-map:: +* pawd:: +* redhat-ctl-amd:: +* wait4amd:: +* wait4amd2die:: +* wire-test:: + + +File: am-utils.info, Node: am-eject, Next: amd.conf-sample, Prev: Assorted Tools, Up: Assorted Tools + +10.1 am-eject +============= + +A shell script unmounts a floppy or CD-ROM that is automounted, and then +attempts to eject the removable device. + + +File: am-utils.info, Node: amd.conf-sample, Next: amd2ldif, Prev: am-eject, Up: Assorted Tools + +10.2 amd.conf-sample +==================== + +A sample Amd configuration file. *Note Amd Configuration File::. + + +File: am-utils.info, Node: amd2ldif, Next: amd2sun, Prev: amd.conf-sample, Up: Assorted Tools + +10.3 amd2ldif +============= + +A script to convert Amd maps to LDAP input files. Use it as follows: + + amd2ldif mapname base < amd.mapfile > mapfile.ldif + + +File: am-utils.info, Node: amd2sun, Next: automount2amd, Prev: amd2ldif, Up: Assorted Tools + +10.4 amd2sun +============ + +A script to convert Amd maps to Sun Automounter maps. Use it as follows + + amd2sun < amd.mapfile > auto_mapfile + + +File: am-utils.info, Node: automount2amd, Next: ctl-amd, Prev: amd2sun, Up: Assorted Tools + +10.5 automount2amd +================== + +A script to convert old Sun Automounter maps to Amd maps. + + Say you have the Sun automount file auto.foo, with these two lines: + home earth:/home + moon -ro,intr server:/proj/images + Running + automount2amd auto.foo > amd.foo + + will produce the Amd map amd.foo with this content: + + # generated by automount2amd on Sat Aug 14 17:59:32 US/Eastern 1999 + + /defaults \\ + type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 + + home \ + host==earth;type:=link;fs:=/home \\ + rhost:=earth;rfs:=/home + + moon \ + -addopts:=ro,intr \\ + host==server;type:=link;fs:=/proj/images \\ + rhost:=server;rfs:=/proj/images + + This perl script will use the following /default entry + type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 + If you wish to override that, define the $DEFAULTS environment +variable, or modify the script. + + If you wish to generate Amd maps using the hostd (*note hostd +Selector Variable::) Amd map syntax, then define the environment +variable $DOMAIN or modify the script. + + Note that automount2amd does not understand the syntax in newer Sun +Automount maps, those used with autofs. + + +File: am-utils.info, Node: ctl-amd, Next: ctl-hlfsd, Prev: automount2amd, Up: Assorted Tools + +10.6 ctl-amd +============ + +A script to start, stop, or restart Amd. Use it as follows: + +ctl-amd start + Start a new Amd process. +ctl-amd stop + Stop the running Amd. +ctl-amd restart + Stop the running Amd (if any), safely wait for it to terminate, and + then start a new process -- only if the previous one died cleanly. + + *Note Run-time Administration::, for more details. + + +File: am-utils.info, Node: ctl-hlfsd, Next: fix-amd-map, Prev: ctl-amd, Up: Assorted Tools + +10.7 ctl-hlfsd +============== + +A script for controlling Hlfsd, much the same way 'ctl-amd' controls +Amd. Use it as follows: + +ctl-hlfsd start + Start a new Hlfsd process. +ctl-hlfsd stop + Stop the running Hlfsd. +ctl-hlfsd restart + Stop the running Hlfsd (if any), wait for 10 seconds for it to + terminate, and then start a new process -- only if the previous one + died cleanly. + + *Note Hlfsd::, for more details. + + +File: am-utils.info, Node: fix-amd-map, Next: fixmount, Prev: ctl-hlfsd, Up: Assorted Tools + +10.8 fix-amd-map +================ + +Am-utils changed some of the syntax and default values of some +variables. For example, the default value for '${os}' for Solaris 2.x +(aka SunOS 5.x) systems used to be 'sos5', it is now more automatically +generated from 'config.guess' and its value is 'sunos5'. + + This script converts older Amd maps to new ones. Use it as follows: + + fix-amd-map < old.map > new.map + + +File: am-utils.info, Node: fixmount, Next: fixrmtab, Prev: fix-amd-map, Up: Assorted Tools + +10.9 fixmount +============= + +'fixmount' is a variant of showmount(8) that can delete bogus mount +entries in remote mountd(8) daemons. This is useful to cleanup +otherwise ever-accumulating "junk". Use it for example: + + fixmount -r host + + See the online manual page for 'fixmount' for more details of its +usage. + + +File: am-utils.info, Node: fixrmtab, Next: lostaltmail, Prev: fixmount, Up: Assorted Tools + +10.10 fixrmtab +============== + +A script to invalidate '/etc/rmtab' entries for hosts named. Also +restart mountd for changes to take effect. Use it for example: + + fixrmtab host1 host2 ... + + +File: am-utils.info, Node: lostaltmail, Next: lostaltmail.conf-sample, Prev: fixrmtab, Up: Assorted Tools + +10.11 lostaltmail +================= + +A script used with Hlfsd to resend any "lost" mail. Hlfsd redirects +mail which cannot be written into the user's home directory to an +alternate directory. This is useful to continue delivering mail, even +if the user's file system was unavailable, full, or over quota. But, +the mail which gets delivered to the alternate directory needs to be +resent to its respective users. This is what the 'lostaltmail' script +does. + + Use it as follows: + + lostaltmail + + This script needs a configuration file 'lostaltmail.conf' set up with +the right parameters to properly work. *Note Hlfsd::, for more details. + + +File: am-utils.info, Node: lostaltmail.conf-sample, Next: mk-amd-map, Prev: lostaltmail, Up: Assorted Tools + +10.12 lostaltmail.conf-sample +============================= + +This is a text file with configuration parameters needed for the +'lostaltmail' script. The script includes comments explaining each of +the configuration variables. See it for more information. Also *note +Hlfsd:: for general information. + + +File: am-utils.info, Node: mk-amd-map, Next: pawd, Prev: lostaltmail.conf-sample, Up: Assorted Tools + +10.13 mk-amd-map +================ + +This program converts a normal Amd map file into an ndbm database with +the same prefix as the named file. Use it as follows: + + mk-amd-map mapname + + +File: am-utils.info, Node: pawd, Next: redhat-ctl-amd, Prev: mk-amd-map, Up: Assorted Tools + +10.14 pawd +========== + +Pawd is used to print the current working directory, adjusted to reflect +proper paths that can be reused to go through the automounter for the +shortest possible path. In particular, the path printed back does not +include any of Amd's local mount points. Using them is unsafe, because +Amd may unmount managed file systems from the mount points, and thus +including them in paths may not always find the files within. + + Without any arguments, Pawd will print the automounter adjusted +current working directory. With any number of arguments, it will print +the adjusted path of each one of the arguments. + + +File: am-utils.info, Node: redhat-ctl-amd, Next: wait4amd, Prev: pawd, Up: Assorted Tools + +10.15 redhat-ctl-amd +==================== + +This script is similar to ctl-amd (*note ctl-amd::) but is intended for +Red Hat Linux systems. You can safely copy redhat-ctl-amd onto +'/etc/rc.d/init.d/amd'. The script supplied by Am-utils is usually +better than the one provided by Red Hat, because the Red Hat script does +not correctly kill Amd processes: it is too quick to kill the wrong +processes, leaving stale or hung mount points behind. + + +File: am-utils.info, Node: wait4amd, Next: wait4amd2die, Prev: redhat-ctl-amd, Up: Assorted Tools + +10.16 wait4amd +============== + +A script to wait for Amd to start on a particular host before performing +an arbitrary command. The command is executed repeatedly, with 1 second +intervals in between. You may interrupt the script using '^C' (or +whatever keyboard sequence your terminal's 'intr' function is bound to). + + Examples: + +wait4amd saturn amq -p -h saturn + When Amd is up on host 'saturn', get the process ID of that running + Amd. +wait4amd pluto rlogin pluto + Remote login to host 'pluto' when Amd is up on that host. It is + generally necessary to wait for Amd to properly start and + initialize on a remote host before logging in to it, because + otherwise user home directories may not be accessible across the + network. +wait4amd pluto + A short-hand version of the previous command, since the most useful + reason for this script is to login to a remote host. I use it very + often when testing out new versions of Amd, and need to reboot hung + hosts. + + +File: am-utils.info, Node: wait4amd2die, Next: wire-test, Prev: wait4amd, Up: Assorted Tools + +10.17 wait4amd2die +================== + +This script is used internally by 'ctl-amd' when used to restart Amd. +It waits for Amd to terminate. If it detected that Amd terminated +cleanly, this script will return an exist status of zero. Otherwise, it +will return a non-zero exit status. + + The script tests for Amd's existence once every 5 seconds, six times, +for a total of 30 seconds. It will return a zero exist status as soon +as it detects that Amd dies. + + +File: am-utils.info, Node: wire-test, Prev: wait4amd2die, Up: Assorted Tools + +10.18 wire-test +=============== + +A simple program to test if some of the most basic networking functions +in am-util's library 'libamu' work. It also tests the combination of +NFS protocol and version number that are supported from the current +host, to a remote one. + + For example, in this test a machine which only supports NFS Version 2 +is contacting a remote host that can support the same version, but using +both UDP and TCP. If no host name is specified, 'wire-test' will try +'localhost'. + + $ wire-test moisil + Network name is "mcl-lab-net.cs.columbia.edu" + Network number is "128.59.13" + Network name is "old-net.cs.columbia.edu" + Network number is "128.59.16" + My IP address is 0x7f000001. + NFS Version and protocol tests to host "moisil"... + testing vers=2, proto="udp" -> found version 2. + testing vers=3, proto="udp" -> failed! + testing vers=2, proto="tcp" -> found version 2. + testing vers=3, proto="tcp" -> failed! + + +File: am-utils.info, Node: Examples, Next: Internals, Prev: Assorted Tools, Up: Top + +11 Examples +*********** + +* Menu: + +* User Filesystems:: +* Home Directories:: +* Architecture Sharing:: +* Wildcard Names:: +* rwho servers:: +* /vol:: +* /defaults with selectors:: +* /tftpboot in a chroot-ed environment:: + + +File: am-utils.info, Node: User Filesystems, Next: Home Directories, Prev: Examples, Up: Examples + +11.1 User Filesystems +===================== + +With more than one fileserver, the directories most frequently +cross-mounted are those containing user home directories. A common +convention used at Imperial College is to mount the user disks under +/home/machine. + + Typically, the '/etc/fstab' file contained a long list of entries +such as: + + machine:/home/machine /home/machine nfs ... + + for each fileserver on the network. + + There are numerous problems with this system. The mount list can +become quite large and some of the machines may be down when a system is +booted. When a new fileserver is installed, '/etc/fstab' must be +updated on every machine, the mount directory created and the filesystem +mounted. + + In many environments most people use the same few workstations, but +it is convenient to go to a colleague's machine and access your own +files. When a server goes down, it can cause a process on a client +machine to hang. By minimizing the mounted filesystems to only include +those actively being used, there is less chance that a filesystem will +be mounted when a server goes down. + + The following is a short extract from a map taken from a research +fileserver at Imperial College. + + Note the entry for 'localhost' which is used for users such as the +operator ('opr') who have a home directory on most machine as +'/home/localhost/opr'. + + /defaults opts:=rw,intr,grpid,nosuid + charm host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \ + host==${key};type:=ufs;dev:=/dev/xd0g + # + ... + + # + localhost type:=link;fs:=${host} + ... + # + # dylan has two user disks so have a + # top directory in which to mount them. + # + dylan type:=auto;fs:=${map};pref:=${key}/ + # + dylan/dk2 host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/${key} \ + host==dylan;type:=ufs;dev:=/dev/dsk/2s0 + # + dylan/dk5 host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/${key} \ + host==dylan;type:=ufs;dev:=/dev/dsk/5s0 + ... + # + toytown host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \ + host==${key};type:=ufs;dev:=/dev/xy1g + ... + # + zebedee host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \ + host==${key};type:=ufs;dev:=/dev/dsk/1s0 + # + # Just for access... + # + gould type:=auto;fs:=${map};pref:=${key}/ + gould/staff host!=gould;type:=nfs;rhost:=gould;rfs:=/home/${key} + # + gummo host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} + ... + + This map is shared by most of the machines listed so on those systems +any of the user disks is accessible via a consistent name. Amd is +started with the following command + + amd /home amd.home + + Note that when mounting a remote filesystem, the "automounted" mount +point is referenced, so that the filesystem will be mounted if it is not +yet (at the time the remote 'mountd' obtains the file handle). + + +File: am-utils.info, Node: Home Directories, Next: Architecture Sharing, Prev: User Filesystems, Up: Examples + +11.2 Home Directories +===================== + +One convention for home directories is to locate them in '/homes' so +user 'jsp''s home directory is '/homes/jsp'. With more than a single +fileserver it is convenient to spread user files across several +machines. All that is required is a mount-map which converts login +names to an automounted directory. + + Such a map might be started by the command: + + amd /homes amd.homes + + where the map 'amd.homes' contained the entries: + + /defaults type:=link # All the entries are of type:=link + jsp fs:=/home/charm/jsp + njw fs:=/home/dylan/dk5/njw + ... + phjk fs:=/home/toytown/ai/phjk + sjv fs:=/home/ganymede/sjv + + Whenever a login name is accessed in '/homes' a symbolic link appears +pointing to the real location of that user's home directory. In this +example, '/homes/jsp' would appear to be a symbolic link pointing to +'/home/charm/jsp'. Of course, '/home' would also be an automount point. + + This system causes an extra level of symbolic links to be used. +Although that turns out to be relatively inexpensive, an alternative is +to directly mount the required filesystems in the '/homes' map. The +required map is simple, but long, and its creation is best automated. +The entry for 'jsp' could be: + + jsp -sublink:=${key};rfs:=/home/charm \ + host==charm;type:=ufs;dev:=/dev/xd0g \ + host!=charm;type:=nfs;rhost:=charm + + This map can become quite big if it contains a large number of +entries. By combining two other features of Amd it can be greatly +simplified. + + First the UFS partitions should be mounted under the control of +'/etc/fstab', taking care that they are mounted in the same place that +Amd would have automounted them. In most cases this would be something +like '/a/"host"/home/"host"' and '/etc/fstab' on host 'charm' would have +a line: + + /dev/xy0g /a/charm/home/charm 4.2 rw,nosuid,grpid 1 5 + + The map can then be changed to: + + /defaults type:=nfs;sublink:=${key};opts:=rw,intr,nosuid,grpid + jsp rhost:=charm;rfs:=/home/charm + njw rhost:=dylan;rfs:=/home/dylan/dk5 + ... + phjk rhost:=toytown;rfs:=/home/toytown;sublink:=ai/${key} + sjv rhost:=ganymede;rfs:=/home/ganymede + + This map operates as usual on a remote machine (ie '${host}' not +equal to '${rhost}'). On the machine where the filesystem is stored (ie +'${host}' equal to '${rhost}'), Amd will construct a local filesystem +mount point which corresponds to the name of the locally mounted UFS +partition. If Amd is started with the '-r' option then instead of +attempting an NFS mount, Amd will simply inherit the UFS mount (*note +Inheritance Filesystem::). If '-r' is not used then a loopback NFS +mount will be made. This type of mount is known to cause a deadlock on +many systems. + + +File: am-utils.info, Node: Architecture Sharing, Next: Wildcard Names, Prev: Home Directories, Up: Examples + +11.3 Architecture Sharing +========================= + +Often a filesystem will be shared by machines of different +architectures. Separate trees can be maintained for the executable +images for each architecture, but it may be more convenient to have a +shared tree, with distinct subdirectories. + + A shared tree might have the following structure on the fileserver +(called 'fserver' in the example): + + local/tex + local/tex/fonts + local/tex/lib + local/tex/bin + local/tex/bin/sun3 + local/tex/bin/sun4 + local/tex/bin/hp9000 + ... + + In this example, the subdirectories of 'local/tex/bin' should be +hidden when accessed via the automount point (conventionally '/vol'). A +mount-map for '/vol' to achieve this would look like: + + /defaults sublink:=${/key};rhost:=fserver;type:=link + tex type:=auto;fs:=${map};pref:=${key}/ + tex/fonts host!=fserver;type:=nfs;rfs:=/vol/tex \ + host==fserver;fs:=/usr/local/tex + tex/lib host!=fserver;type:=nfs;rfs:=/vol/tex \ + host==fserver;fs:=/usr/local/tex + tex/bin -sublink:=${/key}/${arch} \ + host!=fserver;type:=nfs;rfs:=/vol/tex \ + host:=fserver;fs:=/usr/local/tex + + When '/vol/tex/bin' is referenced, the current machine architecture +is automatically appended to the path by the '${sublink}' variable. +This means that users can have '/vol/tex/bin' in their 'PATH' without +concern for architecture dependencies. + + +File: am-utils.info, Node: Wildcard Names, Next: rwho servers, Prev: Architecture Sharing, Up: Examples + +11.4 Wildcard Names & Replicated Servers +======================================== + +By using the wildcard facility, Amd can "overlay" an existing directory +with additional entries. The system files are usually mounted under +'/usr'. If instead, Amd is mounted on '/usr', additional names can be +overlayed to augment or replace names in the "master" '/usr'. A map to +do this would have the form: + + local type:=auto;fs:=local-map + share type:=auto;fs:=share-map + * -type:=nfs;rfs:=/export/exec/${arch};sublink:="${key}" \ + rhost:=fserv1 rhost:=fserv2 rhost:=fserv3 + + Note that the assignment to '${sublink}' is surrounded by double +quotes to prevent the incoming key from causing the map to be +misinterpreted. This map has the effect of directing any access to +'/usr/local' or '/usr/share' to another automount point. + + In this example, it is assumed that the '/usr' files are replicated +on three fileservers: 'fserv1', 'fserv2' and 'fserv3'. For any +references other than to 'local' and 'share' one of the servers is used +and a symbolic link to ${autodir}/${rhost}/export/exec/${arch}/whatever +is returned once an appropriate filesystem has been mounted. + + +File: am-utils.info, Node: rwho servers, Next: /vol, Prev: Wildcard Names, Up: Examples + +11.5 'rwho' servers +=================== + +The '/usr/spool/rwho' directory is a good candidate for automounting. +For efficiency reasons it is best to capture the rwho data on a small +number of machines and then mount that information onto a large number +of clients. The data written into the rwho files is byte order +dependent so only servers with the correct byte ordering can be used by +a client: + + /defaults type:=nfs + usr/spool/rwho -byte==little;rfs:=/usr/spool/rwho \ + rhost:=vaxA rhost:=vaxB \ + || -rfs:=/usr/spool/rwho \ + rhost:=sun4 rhost:=hp300 + + +File: am-utils.info, Node: /vol, Next: /defaults with selectors, Prev: rwho servers, Up: Examples + +11.6 '/vol' +=========== + +'/vol' is used as a catch-all for volumes which do not have other +conventional names. + + Below is part of the '/vol' map for the domain 'doc.ic.ac.uk'. The +'r+d' tree is used for new or experimental software that needs to be +available everywhere without installing it on all the fileservers. +Users wishing to try out the new software then simply include +'/vol/r+d/{bin,ucb}' in their path. + + The main tree resides on one host 'gould.doc.ic.ac.uk', which has +different 'bin', 'etc', 'lib' and 'ucb' sub-directories for each machine +architecture. For example, '/vol/r+d/bin' for a Sun-4 would be stored +in the sub-directory 'bin/sun4' of the filesystem '/usr/r+d'. When it +was accessed a symbolic link pointing to '/a/gould/usr/r+d/bin/sun4' +would be returned. + + /defaults type:=nfs;opts:=rw,grpid,nosuid,intr,soft + wp -opts:=rw,grpid,nosuid;rhost:=charm \ + host==charm;type:=link;fs:=/usr/local/wp \ + host!=charm;type:=nfs;rfs:=/vol/wp + ... + # + src -opts:=rw,grpid,nosuid;rhost:=charm \ + host==charm;type:=link;fs:=/usr/src \ + host!=charm;type:=nfs;rfs:=/vol/src + # + r+d type:=auto;fs:=${map};pref:=r+d/ + # per architecture bin,etc,lib&ucb... + r+d/bin rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch} + r+d/etc rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch} + r+d/include rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key} + r+d/lib rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch} + r+d/man rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key} + r+d/src rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key} + r+d/ucb rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch} + # hades pictures + pictures -opts:=rw,grpid,nosuid;rhost:=thpfs \ + host==thpfs;type:=link;fs:=/nbsd/pictures \ + host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=pictures + # hades tools + hades -opts:=rw,grpid,nosuid;rhost:=thpfs \ + host==thpfs;type:=link;fs:=/nbsd/hades \ + host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=hades + # bsd tools for hp. + bsd -opts:=rw,grpid,nosuid;arch==hp9000;rhost:=thpfs \ + host==thpfs;type:=link;fs:=/nbsd/bsd \ + host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=bsd + + +File: am-utils.info, Node: /defaults with selectors, Next: /tftpboot in a chroot-ed environment, Prev: /vol, Up: Examples + +11.7 '/defaults' with selectors +=============================== + +It is sometimes useful to have different defaults for a given map. To +achieve this, the '/defaults' entry must be able to process normal +selectors. This feature is turned on by setting 'selectors_in_defaults += yes' in the 'amd.conf' file. *Note selectors_in_defaults Parameter::. + + In this example, I set different default NFS mount options for hosts +which are running over a slower network link. By setting a smaller size +for the NFS read and write buffer sizes, you can greatly improve remote +file service performance. + + /defaults \ + wire==slip-net;opts:=rw,intr,rsize=1024,wsize=1024,timeo=20,retrans=10 \ + wire!=slip-net;opts:=rw,intr + + +File: am-utils.info, Node: /tftpboot in a chroot-ed environment, Prev: /defaults with selectors, Up: Examples + +11.8 '/tftpboot' in a chroot-ed environment +=========================================== + +In this complex example, we attempt to run an Amd process _inside_ a +chroot-ed environment. 'tftpd' (Trivial FTP) is used to trivially +retrieve files used to boot X-Terminals, Network Printers, Network +routers, diskless workstations, and other such devices. For security +reasons, 'tftpd' (and also 'ftpd') processes are run using the chroot(2) +system call. This provides an environment for these processes, where +access to any files outside the directory where the chroot-ed process +runs is denied. + + For example, if you start 'tftpd' on your system with + + chroot /tftpboot /usr/sbin/tftpd + +then the 'tftpd' process will not be able to access any files outside +'/tftpboot'. This ensures that no one can retrieve files such as +'/etc/passwd' and run password crackers on it. + + Since the TFTP service works by broadcast, it is necessary to have at +least one TFTP server running on each subnet. If you have lots of files +that you need to make available for 'tftp', and many subnets, it could +take significant amounts of disk space on each host serving them. + + A solution we implemented at Columbia University was to have every +host run 'tftpd', but have those servers retrieve the boot files from +two replicated servers. Those replicated servers have special +partitions dedicated to the many network boot files. + + We start Amd as follows: + + amd /tftpboot/.amd amd.tftpboot + + That is, Amd is serving the directory '/tftpboot/.amd'. The 'tftp' +server runs inside '/tftpboot' and is chroot-ed in that directory too. +The 'amd.tftpboot' map looks like: + + # + # Amd /tftpboot directory -> host map + # + + /defaults opts:=nosuid,ro,intr,soft;fs:=/tftpboot/import;type:=nfs + + tp host==lol;rfs:=/n/lol/import/tftpboot;type:=lofs \ + host==ober;rfs:=/n/ober/misc/win/tftpboot;type:=lofs \ + rhost:=ober;rfs:=/n/ober/misc/win/tftpboot \ + rhost:=lol;rfs:=/n/lol/import/tftpboot + + To help understand this example, I list a few of the file entries +that are created inside '/tftpboot': + + $ ls -la /tftpboot + dr-xr-xr-x 2 root 512 Aug 30 23:11 .amd + drwxrwsr-x 12 root 512 Aug 30 08:00 import + lrwxrwxrwx 1 root 33 Feb 27 1997 adminpr.cfg -> ./.amd/tp/hplj/adminpr.cfg + lrwxrwxrwx 1 root 22 Dec 5 1996 tekxp -> ./.amd/tp/xterms/tekxp + lrwxrwxrwx 1 root 1 Dec 5 1996 tftpboot -> . + + Here is an explanation of each of the entries listed above: + +'.amd' + This is the Amd mount point. Note that you do not need to run a + separate Amd process for the TFTP service. The chroot(2) system + call only protects against file access, but the same process can + still serve files and directories inside and outside the chroot-ed + environment, because Amd itself was not run in chroot-ed mode. + +'import' + This is the mount point where Amd will mount the directories + containing the boot files. The map is designed so that remote + directories will be NFS mounted (even if they are already mounted + elsewhere), and local directories are loopback mounted (since they + are not accessible outside the chroot-ed '/tftpboot' directory). + +'adminpr.cfg' +'tekxp' + Two manually created symbolic links to directories _inside_ the + Amd-managed directory. The crossing of the component 'tp' will + cause Amd to automount one of the remote replicas. Once crossed, + access to files inside proceeds as usual. The 'adminpr.cfg' is a + configuration file for an HP Laser-Jet 4si printer, and the 'tekxp' + is a directory for Tektronix X-Terminal boot files. + +'tftpboot' + This innocent looking symlink is important. Usually, when devices + boot via the TFTP service, they perform the 'get file' command to + retrieve FILE. However, some devices assume that 'tftpd' does not + run in a chroot-ed environment, but rather "unprotected", and thus + use a full pathname for files to retrieve, as in 'get + /tftpboot/file'. This symlink effectively strips out the leading + '/tftpboot/'. + + +File: am-utils.info, Node: Internals, Next: Acknowledgments & Trademarks, Prev: Examples, Up: Top + +12 Internals +************ + +Note that there are more error and logging messages possible than are +listed here. Most of them are self-explanatory. Refer to the program +sources for more details on the rest. + +* Menu: + +* Log Messages:: + + +File: am-utils.info, Node: Log Messages, Prev: Internals, Up: Internals + +12.1 Log Messages +================= + +In the following sections a brief explanation is given of some of the +log messages made by Amd. Where the message is in 'typewriter' font, it +corresponds exactly to the message produced by Amd. Words in "italic" +are replaced by an appropriate string. Variables, '${var}', indicate +that the value of the appropriate variable is output. + + Log messages are either sent directly to a file, or logged via the +syslog(3) mechanism. *Note log_file Parameter::. In either case, +entries in the file are of the form: + date-string hostname amd[pid] message + +* Menu: + +* Fatal errors:: +* Info messages:: + + +File: am-utils.info, Node: Fatal errors, Next: Info messages, Prev: Log Messages, Up: Log Messages + +12.1.1 Fatal errors +------------------- + +Amd attempts to deal with unusual events. Whenever it is not possible +to deal with such an error, Amd will log an appropriate message and, if +it cannot possibly continue, will either exit or abort. These messages +are selected by '-x fatal' on the command line. When syslog(3) is being +used, they are logged with level 'LOG_FATAL'. Even if Amd continues to +operate it is likely to remain in a precarious state and should be +restarted at the earliest opportunity. + +Attempting to inherit not-a-filesystem + The prototype mount point created during a filesystem restart did + not contain a reference to the restarted filesystem. This error + "should never happen". + +Can't bind to domain "NIS-domain" + A specific NIS domain was requested on the command line, but no + server for that domain is available on the local net. + +Can't determine IP address of this host (hostname) + When Amd starts it determines its own IP address. If this lookup + fails then Amd cannot continue. The hostname it looks up is that + obtained returned by gethostname(2) system call. + +Can't find root file handle for automount point + Amd creates its own file handles for the automount points. When it + mounts itself as a server, it must pass these file handles to the + local kernel. If the filehandle is not obtainable the mount point + is ignored. This error "should never happen". + +Must be root to mount filesystems (euid = euid) + To prevent embarrassment, Amd makes sure it has appropriate system + privileges. This amounts to having an euid of 0. The check is + made after argument processing complete to give non-root users a + chance to access the '-v' option. + +No work to do - quitting + No automount points were given on the command line and so there is + no work to do. + +Out of memory + While attempting to malloc some memory, the memory space available + to Amd was exhausted. This is an unrecoverable error. + +Out of memory in realloc + While attempting to realloc some memory, the memory space available + to Amd was exhausted. This is an unrecoverable error. + +cannot create rpc/udp service + Either the NFS or AMQ endpoint could not be created. + +gethostname: description + The gethostname(2) system call failed during startup. + +host name is not set + The gethostname(2) system call returned a zero length host name. + This can happen if Amd is started in single user mode just after + booting the system. + +ifs_match called! + An internal error occurred while restarting a pre-mounted + filesystem. This error "should never happen". + +mount_afs: description + An error occurred while Amd was mounting itself. + +run_rpc failed + Somehow the main NFS server loop failed. This error "should never + happen". + +unable to free rpc arguments in amqprog_1 + The incoming arguments to the AMQ server could not be free'ed. + +unable to free rpc arguments in nfs_program_1 + The incoming arguments to the NFS server could not be free'ed. + +unable to register (AMQ_PROGRAM, AMQ_VERSION, udp) + The AMQ server could not be registered with the local portmapper or + the internal RPC dispatcher. + +unable to register (NFS_PROGRAM, NFS_VERSION, 0) + The NFS server could not be registered with the internal RPC + dispatcher. + + XXX: This section needs to be updated + + +File: am-utils.info, Node: Info messages, Prev: Fatal errors, Up: Log Messages + +12.1.2 Info messages +-------------------- + +Amd generates information messages to record state changes. These +messages are selected by '-x info' on the command line. When syslog(3) +is being used, they are logged with level 'LOG_INFO'. + + The messages listed below can be generated and are in a format +suitable for simple statistical analysis. "mount-info" is the string +that is displayed by "Amq" in its mount information column and placed in +the system mount table. + +"${path}" forcibly timed out + An automount point has been timed out by the Amq command. + +"${path}" has timed out + No access to the automount point has been made within the timeout + period. + +Filehandle denied for "${rhost}:${rfs}" + The mount daemon refused to return a file handle for the requested + filesystem. + +Filehandle error for "${rhost}:${rfs}": description + The mount daemon gave some other error for the requested + filesystem. + +Finishing with status exit-status + Amd is about to exit with the given exit status. + +Re-synchronizing cache for map ${map} + The named map has been modified and the internal cache is being + re-synchronized. + +file server ${rhost} is down - timeout of "${path}" ignored + An automount point has timed out, but the corresponding file server + is known to be down. This message is only produced once for each + mount point for which the server is down. + +file server ${rhost} type nfs is down + An NFS file server that was previously up is now down. + +file server ${rhost} type nfs is up + An NFS file server that was previously down is now up. + +file server ${rhost} type nfs starts down + A new NFS file server has been referenced and is known to be down. + +file server ${rhost} type nfs starts up + A new NFS file server has been referenced and is known to be up. + +mount of "${path}" on ${fs} timed out + Attempts to mount a filesystem for the given automount point have + failed to complete within 30 seconds. + +mount-info mounted fstype ${type} on ${fs} + A new file system has been mounted. + +mount-info restarted fstype ${type} on ${fs} + Amd is using a pre-mounted filesystem to satisfy a mount request. + +mount-info unmounted fstype ${type} from ${fs} + A file system has been unmounted. + +mount-info unmounted fstype ${type} from ${fs} link ${fs}/${sublink} + A file system of which only a sub-directory was in use has been + unmounted. + +restarting mount-info on ${fs} + A pre-mounted file system has been noted. + + XXX: This section needs to be updated + + +File: am-utils.info, Node: Acknowledgments & Trademarks, Next: Index, Prev: Internals, Up: Top + +Acknowledgments & Trademarks +**************************** + +Many thanks to the Am-Utils Users mailing list through the months +developing am-utils. These members have contributed to the discussions, +ideas, code and documentation, and subjected their systems to alpha +quality code. Special thanks go to those authors +(http://www.am-utils.org/docs/am-utils/AUTHORS.txt) who have submitted +patches, and especially to the maintainers: + + * Erez Zadok (http://www.cs.sunysb.edu/~ezk) + * Ion Badulescu + * Rainer Orth + * Nick Williams + + Thanks to the Formal Methods Group at Imperial College for suffering +patiently while Amd was being developed on their machines. + + Thanks to the many people who have helped with the development of +Amd, especially Piete Brooks at the Cambridge University Computing Lab +for many hours of testing, experimentation and discussion. + + Thanks to the older Amd Workers mailing list (now defunct) members for many +suggestions and bug reports to Amd. + + * DEC, VAX and Ultrix are registered trademarks of Digital Equipment + Corporation. + * AIX and IBM are registered trademarks of International Business + Machines Corporation. + * Sun, NFS and SunOS are registered trademarks of Sun Microsystems, + Inc. + * UNIX is a registered trademark in the USA and other countries, + exclusively licensed through X/Open Company, Ltd. + * All other registered trademarks are owned by their respective + owners. + + +File: am-utils.info, Node: Index, Prev: Acknowledgments & Trademarks, Up: Top + +Index +***** + +[index] +* Menu: + +* !exists, boolean mount selector: exists Selector Function. + (line 6) +* !false, boolean mount selector: false Selector Function. + (line 6) +* !in_network, boolean mount selector: in_network Selector Function. + (line 6) +* !netgrp, boolean mount selector: netgrp Selector Function. + (line 6) +* !netgrpd, boolean mount selector: netgrpd Selector Function. + (line 6) +* !true, boolean mount selector: true Selector Function. + (line 6) +* !xhost, boolean mount selector: xhost Selector Function. + (line 6) +* /defaults with selectors: /defaults with selectors. + (line 6) +* /etc/passwd maps: Password maps. (line 6) +* /etc/rc.local additions: Starting Amd. (line 6) +* /tftpboot in a chroot-ed environment: /tftpboot in a chroot-ed environment. + (line 6) +* /vol: /vol. (line 6) +* Additions to /etc/rc.local: Starting Amd. (line 6) +* addopts, mount option: addopts Option. (line 6) +* Aliased hostnames: -n Option. (line 6) +* Alternate locations: Mounting a Volume. (line 6) +* am-eject: am-eject. (line 6) +* Am-utils book: AddInfo. (line 79) +* Amd book: AddInfo. (line 79) +* Amd command line options: Amd Command Line Options. + (line 6) +* Amd configuration file: -F Option. (line 6) +* Amd Configuration File: Amd Configuration File. + (line 6) +* Amd configuration file; specifying name: -F Option. (line 6) +* Amd's PID: Amq -p option. (line 6) +* Amd's process ID: Amq -p option. (line 6) +* amd.conf: Amd Configuration File. + (line 6) +* amd.conf common parameters: Common Parameters. (line 6) +* amd.conf examples: amd.conf Examples. (line 6) +* amd.conf file: -F Option. (line 6) +* amd.conf file format: File Format. (line 6) +* amd.conf global parameters: Global Parameters. (line 6) +* amd.conf global section: The Global Section. (line 6) +* amd.conf regular map parameters: Regular Map Parameters. + (line 6) +* amd.conf regular map sections: Regular Map Sections. + (line 6) +* amd.conf-sample: amd.conf-sample. (line 6) +* amd2ldif: amd2ldif. (line 6) +* amd2sun: amd2sun. (line 6) +* Amq command: Run-time Administration. + (line 6) +* arch Parameter: arch Parameter. (line 6) +* arch Selector Variable: arch Selector Variable. + (line 6) +* arch, FSinfo host attribute: FSinfo arch Option. (line 6) +* arch, mount selector: arch Selector Variable. + (line 6) +* Architecture dependent volumes: Architecture Sharing. + (line 6) +* Architecture sharing: Architecture Sharing. + (line 6) +* Architecture specific mounts: rwho servers. (line 6) +* Assorted Tools: Assorted Tools. (line 6) +* Atomic NFS mounts: Network Filesystem Group. + (line 6) +* auto, filesystem type: Automount Filesystem. + (line 6) +* autodir Selector Variable: autodir Selector Variable. + (line 6) +* autodir, mount selector: autodir Selector Variable. + (line 6) +* autofs_use_lofs Parameter: autofs_use_lofs Parameter. + (line 6) +* Automatic generation of user maps: Password maps. (line 6) +* Automount directory: -a Option. (line 6) +* Automount filesystem: Automount Filesystem. + (line 6) +* automount2amd: automount2amd. (line 6) +* Automounter book: AddInfo. (line 79) +* Automounter configuration maps: Mount Maps. (line 6) +* Automounter fundamentals: Fundamentals. (line 6) +* auto_attrcache Parameter: auto_attrcache Parameter. + (line 6) +* auto_dir Parameter: auto_dir Parameter. (line 6) +* Background mounts: Mounting a Volume. (line 6) +* Background to Mail Delivery: Background to Mail Delivery. + (line 6) +* Binding names to filesystems: Volume Binding. (line 6) +* book: AddInfo. (line 79) +* bootparams, FSinfo prefix: -b FSinfo Option. (line 6) +* browsable_dirs Parameter: browsable_dirs Parameter. + (line 6) +* Bug reports: AddInfo. (line 9) +* byte Selector Variable: byte Selector Variable. + (line 6) +* byte, mount selector: byte Selector Variable. + (line 6) +* Cache interval: -c Option. (line 6) +* cache, mount map option: Automount Filesystem. + (line 15) +* cachedir, mount option: Caching Filesystem. (line 13) +* cachefs, filesystem type: Caching Filesystem. (line 6) +* cache_duration Parameter: cache_duration Parameter. + (line 6) +* Caching Filesystem: Caching Filesystem. (line 6) +* Catch-all mount point: /vol. (line 6) +* CD-ROM Filesystem: CD-ROM Filesystem. (line 6) +* CD-ROM Filesystem <1>: UDF Filesystem. (line 6) +* cdfs, filesystem type: CD-ROM Filesystem. (line 6) +* Centralized Mail Spool Directory: Centralized Mail Spool Directory. + (line 6) +* Changing the interval before a filesystem times out: -c Option. + (line 6) +* chroot; /tftpboot example: /tftpboot in a chroot-ed environment. + (line 6) +* Cluster names: -C Option. (line 6) +* cluster Parameter: cluster Parameter. (line 6) +* cluster Selector Variable: cluster Selector Variable. + (line 6) +* cluster, FSinfo host attribute: FSinfo cluster Option. + (line 6) +* cluster, mount selector: cluster Selector Variable. + (line 6) +* CNAMEs: xhost Selector Function. + (line 6) +* Command line options, Amd: Amd Command Line Options. + (line 6) +* Command line options, FSinfo: FSinfo Command Line Options. + (line 6) +* config, FSinfo host attribute: FSinfo config Option. + (line 6) +* Configuration file; tags: -T Option. (line 6) +* Configuration map types: Map Types. (line 6) +* Controlling Amd: Controlling Amd. (line 6) +* Controlling Hlfsd: Controlling Hlfsd. (line 6) +* Creating a pid file: -p Option. (line 6) +* ctl-amd: ctl-amd. (line 6) +* ctl-amd <1>: Starting Amd. (line 6) +* ctl-hlfsd: Controlling Hlfsd. (line 6) +* ctl-hlfsd <1>: ctl-hlfsd. (line 6) +* Debug options: -D Option. (line 6) +* Debugging a new Amd configuration: Amq -P option. (line 6) +* debugging hesiod resolver service: -D Option. (line 35) +* Debugging options via Amq: Other Amq options. (line 6) +* debug_mtab_file Parameter: debug_mtab_file Parameter. + (line 6) +* debug_options Parameter: debug_options Parameter. + (line 6) +* Defining a host, FSinfo: FSinfo host definitions. + (line 6) +* Defining an Amd mount map, FSinfo: FSinfo automount definitions. + (line 6) +* Defining host attributes, FSinfo: FSinfo host attributes. + (line 6) +* delay, mount option: delay Option. (line 6) +* Delaying mounts from specific locations: delay Option. (line 6) +* Determining the map type: Map Types. (line 6) +* dev, mount option: Unix Filesystem. (line 12) +* dev, mount option <1>: CD-ROM Filesystem. (line 11) +* dev, mount option <2>: UDF Filesystem. (line 11) +* dev, mount option <3>: Floppy Filesystem. (line 11) +* Direct automount filesystem: Direct Automount Filesystem. + (line 6) +* direct, filesystem type: Direct Automount Filesystem. + (line 6) +* Discovering version information: -v Option. (line 6) +* Discovering what is going on at run-time: Controlling Amd. (line 6) +* Disk filesystems: Unix Filesystem. (line 6) +* dismount_interval Parameter: dismount_interval Parameter. + (line 6) +* Displaying brief help: -H Option. (line 6) +* Displaying brief help <1>: Amq -H option. (line 6) +* Displaying the process id: -p Option. (line 6) +* Distributed Mail Spool Service: Distributed Mail Spool Service. + (line 6) +* dollar Selector Variable: dollar Selector Variable. + (line 6) +* Domain name: -d Option. (line 6) +* domain Selector Variable: domain Selector Variable. + (line 6) +* Domain stripping: Variable Expansion. (line 6) +* domain, mount selector: domain Selector Variable. + (line 6) +* Domainname operators: Variable Expansion. (line 6) +* domain_strip Parameter: domain_strip Parameter. + (line 6) +* dumpset, FSinfo filesystems option: FSinfo dumpset Option. + (line 6) +* dumpset, FSinfo prefix: -d FSinfo Option. (line 6) +* Duplicated volumes: Volume Naming. (line 6) +* EFS: Unix Filesystem. (line 6) +* efs, filesystem type: Unix Filesystem. (line 6) +* Environment variables: Variable Expansion. (line 6) +* Error filesystem: Error Filesystem. (line 6) +* error, filesystem type: Error Filesystem. (line 6) +* Example of architecture specific mounts: rwho servers. (line 6) +* Example of mounting home directories: Home Directories. (line 6) +* Executable maps: Executable maps. (line 6) +* exec_map_timeout Parameter: exec_map_timeout Parameter. + (line 6) +* exists Selector Function: exists Selector Function. + (line 6) +* exists, boolean mount selector: exists Selector Function. + (line 6) +* export, FSinfo special fstype: FSinfo fstype Option. + (line 6) +* exportfs, FSinfo mount option: FSinfo mount Option. (line 6) +* exports, FSinfo prefix: -e FSinfo Option. (line 6) +* false Selector Function: false Selector Function. + (line 6) +* false, boolean mount selector: false Selector Function. + (line 6) +* File map syntactic conventions: File maps. (line 6) +* File maps: File maps. (line 6) +* Fileserver: Filesystems and Volumes. + (line 6) +* Filesystem: Filesystems and Volumes. + (line 6) +* Filesystem info package: FSinfo. (line 6) +* Filesystem type; auto: Automount Filesystem. + (line 6) +* Filesystem type; cachefs: Caching Filesystem. (line 6) +* Filesystem type; cdfs: CD-ROM Filesystem. (line 6) +* Filesystem type; direct: Direct Automount Filesystem. + (line 6) +* Filesystem type; efs: Unix Filesystem. (line 6) +* Filesystem type; error: Error Filesystem. (line 6) +* Filesystem type; host: Network Host Filesystem. + (line 6) +* Filesystem type; inherit: Inheritance Filesystem. + (line 6) +* Filesystem type; link: Symbolic Link Filesystem. + (line 6) +* Filesystem type; linkx: Symbolic Link Filesystem II. + (line 6) +* Filesystem type; lofs: Loopback Filesystem. (line 6) +* Filesystem type; mfs: Memory/RAM Filesystem. + (line 6) +* Filesystem type; nfs: Network Filesystem. (line 6) +* Filesystem type; nfsl: NFS-Link Filesystem. (line 6) +* Filesystem type; nfsx: Network Filesystem Group. + (line 6) +* Filesystem type; nullfs: Null Filesystem. (line 6) +* Filesystem type; pcfs: Floppy Filesystem. (line 6) +* Filesystem type; program: Program Filesystem. (line 6) +* Filesystem type; root: Root Filesystem. (line 6) +* Filesystem type; tfs: Translucent Filesystem. + (line 6) +* Filesystem type; tmpfs: Shared Memory+Swap Filesystem. + (line 6) +* Filesystem type; toplvl: Top-level Filesystem. + (line 6) +* Filesystem type; udf: UDF Filesystem. (line 6) +* Filesystem type; ufs: Unix Filesystem. (line 6) +* Filesystem type; umapfs: User ID Mapping Filesystem. + (line 6) +* Filesystem type; union: Union Filesystem. (line 6) +* Filesystem type; xfs: Unix Filesystem. (line 6) +* Filesystem types: Filesystem Types. (line 6) +* fix-amd-map: fix-amd-map. (line 6) +* fixmount: fixmount. (line 6) +* fixrmtab: fixrmtab. (line 6) +* Flat file maps: File maps. (line 6) +* Floppy Filesystem: Floppy Filesystem. (line 6) +* Flushing the map cache: Amq -f option. (line 6) +* forced_unmounts Parameter: forced_unmounts Parameter. + (line 6) +* Forcing Amq to use a TCP transport: Amq -T option. (line 6) +* Forcing Amq to use a UDP transport: Amq -U option. (line 6) +* Forcing filesystem to time out: Amq -u option. (line 6) +* freq, FSinfo filesystems option: FSinfo freq Option. (line 6) +* fs, mount option: fs Option. (line 6) +* FSinfo: FSinfo. (line 6) +* FSinfo arch host attribute: FSinfo arch Option. (line 6) +* FSinfo automount definitions: FSinfo automount definitions. + (line 6) +* FSinfo cluster host attribute: FSinfo cluster Option. + (line 6) +* FSinfo command line options: FSinfo Command Line Options. + (line 6) +* FSinfo config host attribute: FSinfo config Option. + (line 6) +* FSinfo dumpset filesystems option: FSinfo dumpset Option. + (line 6) +* FSinfo error messages: FSinfo errors. (line 6) +* FSinfo filesystems: FSinfo filesystems. (line 6) +* FSinfo freq filesystems option: FSinfo freq Option. (line 6) +* FSinfo fstype filesystems option: FSinfo fstype Option. + (line 6) +* FSinfo grammar: FSinfo Grammar. (line 6) +* FSinfo host attributes: FSinfo host attributes. + (line 6) +* FSinfo host definitions: FSinfo host definitions. + (line 6) +* FSinfo log filesystems option: FSinfo log Option. (line 6) +* FSinfo mount filesystems option: FSinfo mount Option. (line 6) +* FSinfo opts filesystems option: FSinfo opts Option. (line 6) +* FSinfo os host attribute: FSinfo os Option. (line 6) +* FSinfo overview: FSinfo Overview. (line 6) +* FSinfo passno filesystems option: FSinfo passno Option. + (line 6) +* FSinfo static mounts: FSinfo static mounts. + (line 6) +* fstab, FSinfo prefix: -f FSinfo Option. (line 6) +* fstype, FSinfo filesystems option: FSinfo fstype Option. + (line 6) +* fully_qualified_hosts Parameter: fully_qualified_hosts Parameter. + (line 6) +* full_os Parameter: full_os Parameter. (line 6) +* full_os Selector Variable: full_os Selector Variable. + (line 6) +* full_os, mount selector: full_os Selector Variable. + (line 6) +* Generic volume name: /vol. (line 6) +* Getting Additional Information: AddInfo. (line 5) +* Getting real working directory: Amq -w option. (line 6) +* gid Selector Variable: gid Selector Variable. + (line 6) +* gid, mount selector: gid Selector Variable. + (line 6) +* Global statistics: Amq -s option. (line 6) +* Grammar, FSinfo: FSinfo Grammar. (line 6) +* Help; showing from Amd: -H Option. (line 6) +* Help; showing from Amq: Amq -H option. (line 6) +* Hesiod maps: Hesiod maps. (line 6) +* Hesiod; turning on RES_DEBUG: -D Option. (line 35) +* hesiod_base Parameter: hesiod_base Parameter. + (line 6) +* History: History. (line 6) +* Hlfsd: Hlfsd. (line 6) +* Hlfsd Files: Hlfsd Files. (line 6) +* Hlfsd Options: Hlfsd Options. (line 6) +* Hlfsd; background: Background to Mail Delivery. + (line 6) +* Hlfsd; controlling: Controlling Hlfsd. (line 6) +* Hlfsd; Files: Hlfsd Files. (line 6) +* Hlfsd; introduction: Introduction to Hlfsd. + (line 6) +* Hlfsd; Options: Hlfsd Options. (line 6) +* Hlfsd; using: Using Hlfsd. (line 6) +* Hlfsd; Why Deliver Into the Home Directory?: Why Deliver Into the Home Directory?. + (line 6) +* Home directories: Home Directories. (line 6) +* Home-Link Filesystem: Hlfsd. (line 6) +* host Selector Variable: host Selector Variable. + (line 6) +* host, filesystem type: Network Host Filesystem. + (line 6) +* host, mount selector: host Selector Variable. + (line 6) +* hostd Selector Variable: hostd Selector Variable. + (line 6) +* hostd, mount selector: hostd Selector Variable. + (line 6) +* Hostname normalization: -n Option. (line 6) +* hostname, FSinfo command line option: -h FSinfo Option. (line 6) +* How keys are looked up: Key Lookup. (line 6) +* How locations are parsed: Location Format. (line 6) +* How to access environment variables in maps: Variable Expansion. + (line 6) +* How to discover your version of Amd: -v Option. (line 6) +* How to mount a local disk: Unix Filesystem. (line 6) +* How to mount a UFS filesystems: Unix Filesystem. (line 6) +* How to mount all NFS exported filesystems: Network Host Filesystem. + (line 6) +* How to mount an atomic group of NFS filesystems: Network Filesystem Group. + (line 6) +* How to mount and NFS filesystem: Network Filesystem. (line 6) +* How to reference an existing part of the local name space: Symbolic Link Filesystem II. + (line 6) +* How to reference part of the local name space: Symbolic Link Filesystem. + (line 6) +* How to select log messages: -x Option. (line 6) +* How to set default map parameters: Map Defaults. (line 6) +* How to set map cache parameters: Automount Filesystem. + (line 6) +* How to start a direct automount point: Direct Automount Filesystem. + (line 6) +* How to start an indirect automount point: Automount Filesystem. + (line 6) +* How variables are expanded: Variable Expansion. (line 6) +* inherit, filesystem type: Inheritance Filesystem. + (line 6) +* Inheritance filesystem: Inheritance Filesystem. + (line 6) +* Interval before a filesystem times out: -c Option. (line 6) +* Introduction: Intro. (line 6) +* Introduction to Hlfsd: Introduction to Hlfsd. + (line 6) +* in_network Selector Function: in_network Selector Function. + (line 6) +* in_network, boolean mount selector: in_network Selector Function. + (line 6) +* karch Parameter: karch Parameter. (line 6) +* karch Selector Variable: karch Selector Variable. + (line 6) +* karch, mount selector: karch Selector Variable. + (line 6) +* Keep-alives: Keep-alives. (line 6) +* Key lookup: Key Lookup. (line 6) +* key Selector Variable: key Selector Variable. + (line 6) +* key, mount selector: key Selector Variable. + (line 6) +* Killing and starting Amd: Restarting Amd. (line 6) +* LDAP maps: LDAP maps. (line 6) +* ldap_base Parameter: ldap_base Parameter. (line 6) +* ldap_cache_maxmem Parameter: ldap_cache_maxmem Parameter. + (line 6) +* ldap_cache_seconds Parameter: ldap_cache_seconds Parameter. + (line 6) +* ldap_hostports Parameter: ldap_hostports Parameter. + (line 6) +* ldap_proto_version Parameter: ldap_proto_version Parameter. + (line 6) +* License Information: License. (line 6) +* Lightweight Directory Access Protocol: LDAP maps. (line 6) +* link, filesystem type: Symbolic Link Filesystem. + (line 6) +* linkx, filesystem type: Symbolic Link Filesystem II. + (line 6) +* Listing currently mounted filesystems: Controlling Amd. (line 6) +* localhost_address Parameter: localhost_address Parameter. + (line 6) +* local_domain Parameter: local_domain Parameter. + (line 6) +* Location format: Location Format. (line 6) +* Location lists: Mounting a Volume. (line 6) +* locking executable pages in memory: -S Option. (line 6) +* lofs, filesystem type: Loopback Filesystem. (line 6) +* Log file, resetting: Amq -l option. (line 6) +* Log filename: -l Option. (line 6) +* Log message selection: -x Option. (line 6) +* log, FSinfo filesystems option: FSinfo log Option. (line 6) +* Logging options via Amq: Other Amq options. (line 6) +* log_file Parameter: log_file Parameter. (line 6) +* log_options Parameter: log_options Parameter. + (line 6) +* Looking up keys: Key Lookup. (line 6) +* Loopback Filesystem: Loopback Filesystem. (line 6) +* lostaltmail: lostaltmail. (line 6) +* lostaltmail.conf-sample: lostaltmail.conf-sample. + (line 6) +* lostaltmail; configuration file: lostaltmail.conf-sample. + (line 6) +* Mailing lists: AddInfo. (line 29) +* Map cache options: Automount Filesystem. + (line 6) +* Map cache synchronizing: Automount Filesystem. + (line 6) +* Map cache types: Automount Filesystem. + (line 6) +* Map cache, flushing: Amq -f option. (line 6) +* Map defaults: Map Defaults. (line 6) +* Map entry format: Location Format. (line 6) +* Map lookup: Key Lookup. (line 6) +* Map options: Map Options. (line 6) +* map Selector Variable: map Selector Variable. + (line 6) +* Map types: Map Types. (line 6) +* map, mount selector: map Selector Variable. + (line 6) +* maps, FSinfo command line option: -m FSinfo Option. (line 6) +* map_defaults Parameter: map_defaults Parameter. + (line 6) +* map_name Parameter: map_name Parameter. (line 6) +* map_options Parameter: map_options Parameter. + (line 6) +* map_reload_interval Parameter: map_reload_interval Parameter. + (line 6) +* map_type Parameter: map_type Parameter. (line 6) +* Memory/RAM Filesystem: Memory/RAM Filesystem. + (line 6) +* mfs, filesystem type: Memory/RAM Filesystem. + (line 6) +* mk-amd-map: mk-amd-map. (line 6) +* mlockall; using: -S Option. (line 6) +* Mount a filesystem under program control: Program Filesystem. + (line 6) +* Mount flags; acdirmax: opts Option. (line 19) +* Mount flags; acdirmin: opts Option. (line 22) +* Mount flags; acregmax: opts Option. (line 25) +* Mount flags; acregmin: opts Option. (line 28) +* Mount flags; actimeo: opts Option. (line 31) +* Mount flags; auto: opts Option. (line 34) +* Mount flags; cache: opts Option. (line 38) +* Mount flags; closesession: opts Option. (line 41) +* Mount flags; compress: opts Option. (line 44) +* Mount flags; defperm: opts Option. (line 47) +* Mount flags; dev: opts Option. (line 51) +* Mount flags; dirmask: opts Option. (line 54) +* Mount flags; dumbtimr: opts Option. (line 60) +* Mount flags; extatt: opts Option. (line 66) +* Mount flags; fsid: opts Option. (line 69) +* Mount flags; gens: opts Option. (line 72) +* Mount flags; gmtoff: opts Option. (line 76) +* Mount flags; group: opts Option. (line 81) +* Mount flags; grpid: opts Option. (line 87) +* Mount flags; ignore: opts Option. (line 35) +* Mount flags; int: opts Option. (line 90) +* Mount flags; intr: opts Option. (line 91) +* Mount flags; lock: opts Option. (line 94) +* Mount Flags; longname: opts Option. (line 97) +* Mount Flags; longname <1>: opts Option. (line 249) +* Mount flags; mask: opts Option. (line 100) +* Mount flags; maxgroups: opts Option. (line 113) +* Mount flags; multi: opts Option. (line 110) +* Mount flags; nfsv3: opts Option. (line 116) +* Mount flags; noac: opts Option. (line 119) +* Mount flags; noauto: opts Option. (line 122) +* Mount flags; nocache: opts Option. (line 127) +* Mount flags; nocasetrans: opts Option. (line 130) +* Mount flags; noconn: opts Option. (line 134) +* Mount flags; nocto: opts Option. (line 137) +* Mount flags; nodefperm: opts Option. (line 140) +* Mount flags; nodev: opts Option. (line 144) +* Mount flags; nodevs: opts Option. (line 145) +* Mount flags; noexec: opts Option. (line 148) +* Mount flags; noint: opts Option. (line 151) +* Mount flags; nojoliet: opts Option. (line 154) +* Mount flags; nolock: opts Option. (line 158) +* Mount flags; nomnttab: opts Option. (line 161) +* Mount flags; norrip: opts Option. (line 165) +* Mount flags; nosub: opts Option. (line 169) +* Mount flags; nosuid: opts Option. (line 172) +* Mount flags; nounmount: opts Option. (line 291) +* Mount flags; noversion: opts Option. (line 175) +* Mount Flags; nowin95: opts Option. (line 179) +* Mount flags; optionstr: opts Option. (line 182) +* Mount flags; overlay: opts Option. (line 186) +* Mount flags; pgthresh: opts Option. (line 189) +* Mount flags; ping: opts Option. (line 297) +* Mount flags; port: opts Option. (line 192) +* Mount flags; posix: opts Option. (line 195) +* Mount flags; private: opts Option. (line 198) +* Mount flags; proplist: opts Option. (line 202) +* Mount flags; proto: opts Option. (line 206) +* Mount flags; public: opts Option. (line 318) +* Mount flags; quota: opts Option. (line 209) +* Mount flags; rdonly: opts Option. (line 212) +* Mount flags; resvport: opts Option. (line 216) +* Mount flags; retrans: opts Option. (line 223) +* Mount flags; retry: opts Option. (line 228) +* Mount flags; retry=N: opts Option. (line 327) +* Mount flags; ro: opts Option. (line 213) +* Mount flags; rrcaseins: opts Option. (line 231) +* Mount flags; rrip: opts Option. (line 235) +* Mount flags; rsize: opts Option. (line 239) +* Mount flags; rw: opts Option. (line 243) +* Mount Flags; sessionnr: opts Option. (line 246) +* Mount flags; soft: opts Option. (line 252) +* Mount flags; softlookup: opts Option. (line 330) +* Mount flags; spongy: opts Option. (line 255) +* Mount flags; suid: opts Option. (line 258) +* Mount flags; symttl: opts Option. (line 261) +* Mount flags; sync: opts Option. (line 264) +* Mount flags; tcp: opts Option. (line 267) +* Mount flags; timeo: opts Option. (line 271) +* Mount flags; unmount: opts Option. (line 343) +* Mount flags; user: opts Option. (line 275) +* Mount flags; utimeout=N: opts Option. (line 352) +* Mount flags; vers: opts Option. (line 281) +* Mount flags; wsize: opts Option. (line 284) +* Mount flags; xlatecookie: opts Option. (line 362) +* Mount home directories: Home Directories. (line 6) +* Mount information: Mount Maps. (line 6) +* Mount map option; cache: Automount Filesystem. + (line 15) +* Mount map types: Map Types. (line 6) +* Mount maps: Mount Maps. (line 6) +* Mount option; addopts: addopts Option. (line 6) +* Mount option; cachedir: Caching Filesystem. (line 13) +* Mount option; delay: delay Option. (line 6) +* Mount option; dev: Unix Filesystem. (line 12) +* Mount option; dev <1>: CD-ROM Filesystem. (line 11) +* Mount option; dev <2>: UDF Filesystem. (line 11) +* Mount option; dev <3>: Floppy Filesystem. (line 11) +* Mount option; fs: fs Option. (line 6) +* Mount option; mount: Program Filesystem. (line 14) +* Mount option; opts: opts Option. (line 6) +* Mount option; remopts: remopts Option. (line 6) +* Mount option; rfs: Network Filesystem. (line 16) +* Mount option; rfs <1>: Loopback Filesystem. (line 16) +* Mount option; rhost: Network Filesystem. (line 10) +* Mount option; sublink: sublink Option. (line 6) +* Mount option; type: type Option. (line 6) +* Mount option; umount: Program Filesystem. (line 17) +* Mount option; unmount: Program Filesystem. (line 17) +* Mount retries: Mounting a Volume. (line 6) +* Mount selector; arch: arch Selector Variable. + (line 6) +* Mount selector; autodir: autodir Selector Variable. + (line 6) +* Mount selector; byte: byte Selector Variable. + (line 6) +* Mount selector; cluster: cluster Selector Variable. + (line 6) +* Mount selector; domain: domain Selector Variable. + (line 6) +* Mount selector; exists: exists Selector Function. + (line 6) +* Mount selector; false: false Selector Function. + (line 6) +* Mount selector; full_os: full_os Selector Variable. + (line 6) +* Mount selector; gid: gid Selector Variable. + (line 6) +* Mount selector; host: host Selector Variable. + (line 6) +* Mount selector; hostd: hostd Selector Variable. + (line 6) +* Mount selector; in_network: in_network Selector Function. + (line 6) +* Mount selector; karch: karch Selector Variable. + (line 6) +* Mount selector; key: key Selector Variable. + (line 6) +* Mount selector; map: map Selector Variable. + (line 6) +* Mount selector; netgrp: netgrp Selector Function. + (line 6) +* Mount selector; netgrpd: netgrpd Selector Function. + (line 6) +* Mount selector; netnumber: netnumber Selector Variable. + (line 6) +* Mount selector; network: network Selector Variable. + (line 6) +* Mount selector; os: os Selector Variable. + (line 6) +* Mount selector; osver: osver Selector Variable. + (line 6) +* Mount selector; path: path Selector Variable. + (line 6) +* Mount selector; true: true Selector Function. + (line 6) +* Mount selector; uid: uid Selector Variable. + (line 6) +* Mount selector; vendor: vendor Selector Variable. + (line 6) +* Mount selector; wire: wire Selector Variable. + (line 6) +* Mount selector; xhost: xhost Selector Function. + (line 6) +* mount system call: opts Option. (line 6) +* mount system call flags: opts Option. (line 6) +* Mount types: Filesystem Types. (line 6) +* mount, FSinfo filesystems option: FSinfo mount Option. (line 6) +* mount, mount option: Program Filesystem. (line 14) +* Mounting a local disk: Unix Filesystem. (line 6) +* Mounting a remote part of the name space if target is missing: NFS-Link Filesystem. + (line 6) +* Mounting a UFS filesystem: Unix Filesystem. (line 6) +* Mounting a volume: Mounting a Volume. (line 6) +* Mounting an atomic group of NFS filesystems: Network Filesystem Group. + (line 6) +* Mounting an existing part of the local name space: Symbolic Link Filesystem II. + (line 6) +* Mounting an NFS filesystem: Network Filesystem. (line 6) +* Mounting entire export trees: Network Host Filesystem. + (line 6) +* Mounting part of the local name space: Symbolic Link Filesystem. + (line 6) +* Mounting user filesystems: User Filesystems. (line 6) +* mount_type Parameter: mount_type Parameter. + (line 6) +* Multiple Amd processes: Amq -P option. (line 6) +* Multiple-threaded server: Non-blocking Operation. + (line 6) +* Namespace: Volume Binding. (line 6) +* ndbm maps: ndbm maps. (line 6) +* netgrp Selector Function: netgrp Selector Function. + (line 6) +* netgrp, boolean mount selector: netgrp Selector Function. + (line 6) +* netgrpd Selector Function: netgrpd Selector Function. + (line 6) +* netgrpd, boolean mount selector: netgrpd Selector Function. + (line 6) +* netnumber Selector Variable: netnumber Selector Variable. + (line 6) +* netnumber, mount selector: netnumber Selector Variable. + (line 6) +* Network filesystem group: Network Filesystem Group. + (line 6) +* Network host filesystem: Network Host Filesystem. + (line 6) +* network Selector Variable: network Selector Variable. + (line 6) +* network, mount selector: network Selector Variable. + (line 6) +* Network-wide naming: Volume Naming. (line 6) +* NFS: Network Filesystem. (line 6) +* NFS ping: Keep-alives. (line 6) +* NFS V.3 support: Supported Platforms. (line 6) +* nfs, filesystem type: Network Filesystem. (line 6) +* NFS-Link filesystem II: NFS-Link Filesystem. (line 6) +* nfsl, filesystem type: NFS-Link Filesystem. (line 6) +* nfsx, filesystem type: Network Filesystem Group. + (line 6) +* nfs_allow_any_interface Parameter: nfs_allow_any_interface Parameter. + (line 6) +* nfs_allow_insecure_port Parameter: nfs_allow_insecure_port Parameter. + (line 6) +* nfs_proto Parameter: nfs_proto Parameter. (line 6) +* nfs_retransmit_counter Parameter: nfs_retransmit_counter Parameter. + (line 6) +* nfs_retransmit_counter Parameter <1>: nfs_retransmit_counter_udp Parameter. + (line 6) +* nfs_retransmit_counter Parameter <2>: nfs_retransmit_counter_tcp Parameter. + (line 6) +* nfs_retransmit_counter Parameter <3>: nfs_retransmit_counter_toplvl Parameter. + (line 6) +* nfs_retransmit_counter_tcp Parameter: nfs_retransmit_counter_tcp Parameter. + (line 6) +* nfs_retransmit_counter_toplvl Parameter: nfs_retransmit_counter_toplvl Parameter. + (line 6) +* nfs_retransmit_counter_udp Parameter: nfs_retransmit_counter_udp Parameter. + (line 6) +* nfs_retry_interval Parameter: nfs_retry_interval Parameter. + (line 6) +* nfs_retry_interval Parameter <1>: nfs_retry_interval_udp Parameter. + (line 6) +* nfs_retry_interval Parameter <2>: nfs_retry_interval_tcp Parameter. + (line 6) +* nfs_retry_interval Parameter <3>: nfs_retry_interval_toplvl Parameter. + (line 6) +* nfs_retry_interval_tcp Parameter: nfs_retry_interval_tcp Parameter. + (line 6) +* nfs_retry_interval_toplvl Parameter: nfs_retry_interval_toplvl Parameter. + (line 6) +* nfs_retry_interval_udp Parameter: nfs_retry_interval_udp Parameter. + (line 6) +* nfs_vers Parameter: nfs_vers Parameter. (line 6) +* NIS (YP) domain name: -y Option. (line 6) +* NIS (YP) maps: NIS maps. (line 6) +* NIS+ maps: NIS+ maps. (line 6) +* nis_domain Parameter: nis_domain Parameter. + (line 6) +* Nodes generated on a restart: Inheritance Filesystem. + (line 6) +* Non-blocking operation: Non-blocking Operation. + (line 6) +* normalize_hostnames Parameter: normalize_hostnames Parameter. + (line 6) +* normalize_slashes Parameter: normalize_slashes Parameter. + (line 6) +* Normalizing hostnames: -n Option. (line 6) +* Null Filesystem: Null Filesystem. (line 6) +* nullfs, filesystem type: Null Filesystem. (line 6) +* Obtaining the source code: Distrib. (line 6) +* Operating System name: -O Option. (line 6) +* Operating System version: -o Option. (line 6) +* Operational principles: Operational Principles. + (line 6) +* opts, FSinfo filesystems option: FSinfo opts Option. (line 6) +* opts, mount option: opts Option. (line 6) +* os Parameter: os Parameter. (line 6) +* os Selector Variable: os Selector Variable. + (line 6) +* os, FSinfo host attribute: FSinfo os Option. (line 6) +* os, mount selector: os Selector Variable. + (line 6) +* osver Parameter: osver Parameter. (line 6) +* osver Selector Variable: osver Selector Variable. + (line 6) +* osver, mount selector: osver Selector Variable. + (line 6) +* Overriding defaults on the command line: Amd Command Line Options. + (line 6) +* Overriding or adding options to a mount: addopts Option. (line 6) +* Overriding the default mount point: fs Option. (line 6) +* Overriding the local domain name: -d Option. (line 6) +* Overriding the NIS (YP) domain name: -y Option. (line 6) +* Passing parameters to the mount system call: opts Option. (line 6) +* passno, FSinfo filesystems option: FSinfo passno Option. + (line 6) +* Password file maps: Password maps. (line 6) +* path Selector Variable: path Selector Variable. + (line 6) +* path, mount selector: path Selector Variable. + (line 6) +* Pathname operators: Variable Expansion. (line 6) +* pawd: pawd. (line 6) +* pcfs, filesystem type: Floppy Filesystem. (line 6) +* Picking up existing mounts: -r Option. (line 6) +* pid file, creating with -p option: -p Option. (line 6) +* PID; Amd: Amq -p option. (line 6) +* pid_file Parameter: pid_file Parameter. (line 6) +* plock Parameter: plock Parameter. (line 6) +* plock; using: -S Option. (line 6) +* portmap_program Parameter: portmap_program Parameter. + (line 6) +* preferred_amq_port Parameter: preferred_amq_port Parameter. + (line 6) +* Primary server: delay Option. (line 6) +* print_pid Parameter: print_pid Parameter. (line 6) +* print_version Parameter: print_version Parameter. + (line 6) +* Process id: -p Option. (line 6) +* process id of Amd daemon: -p Option. (line 6) +* Process ID; Amd: Amq -p option. (line 6) +* Program filesystem: Program Filesystem. (line 6) +* program, filesystem type: Program Filesystem. (line 6) +* Querying an alternate host: Amq -h option. (line 6) +* quiet, FSinfo command line option: -q FSinfo Option. (line 6) +* redhat-ctl-amd: redhat-ctl-amd. (line 6) +* Referencing an existing part of the local name space: Symbolic Link Filesystem II. + (line 6) +* Referencing an existing part of the name space if target exists: NFS-Link Filesystem. + (line 6) +* Referencing part of the local name space: Symbolic Link Filesystem. + (line 6) +* Regular expressions in maps: Automount Filesystem. + (line 6) +* remopts, mount option: remopts Option. (line 6) +* Replacement volumes: Volume Naming. (line 6) +* Replicated volumes: Volume Naming. (line 6) +* Resetting the Amd log file: Amq -l option. (line 6) +* Resolving aliased hostnames: -n Option. (line 6) +* Restarting Amd: Restarting Amd. (line 6) +* Restarting existing mounts: -r Option. (line 6) +* restart_mounts Parameter: restart_mounts Parameter. + (line 6) +* rfs, mount option: Network Filesystem. (line 16) +* rfs, mount option <1>: Loopback Filesystem. (line 16) +* rhost, mount option: Network Filesystem. (line 10) +* Root filesystem: Root Filesystem. (line 6) +* root, filesystem type: Root Filesystem. (line 6) +* RPC Program numbers; Amd: Amq -P option. (line 6) +* RPC retries: Non-blocking Operation. + (line 6) +* Run-time administration: Run-time Administration. + (line 6) +* Running multiple Amd: Amq -P option. (line 6) +* rwho servers: rwho servers. (line 6) +* search_path Parameter: search_path Parameter. + (line 6) +* Secondary server: delay Option. (line 6) +* sel, FSinfo mount option: FSinfo mount Option. (line 6) +* Selecting specific log messages: -x Option. (line 6) +* Selector; arch: arch Selector Variable. + (line 6) +* Selector; autodir: autodir Selector Variable. + (line 6) +* Selector; byte: byte Selector Variable. + (line 6) +* Selector; cluster: cluster Selector Variable. + (line 6) +* Selector; domain: domain Selector Variable. + (line 6) +* Selector; exists: exists Selector Function. + (line 6) +* Selector; false: false Selector Function. + (line 6) +* Selector; full_os: full_os Selector Variable. + (line 6) +* Selector; gid: gid Selector Variable. + (line 6) +* Selector; host: host Selector Variable. + (line 6) +* Selector; hostd: hostd Selector Variable. + (line 6) +* Selector; in_network: in_network Selector Function. + (line 6) +* Selector; karch: karch Selector Variable. + (line 6) +* Selector; key: key Selector Variable. + (line 6) +* Selector; map: map Selector Variable. + (line 6) +* Selector; netgrp: netgrp Selector Function. + (line 6) +* Selector; netgrpd: netgrpd Selector Function. + (line 6) +* Selector; netnumber: netnumber Selector Variable. + (line 6) +* Selector; network: network Selector Variable. + (line 6) +* Selector; os: os Selector Variable. + (line 6) +* Selector; osver: osver Selector Variable. + (line 6) +* Selector; path: path Selector Variable. + (line 6) +* Selector; true: true Selector Function. + (line 6) +* Selector; uid: uid Selector Variable. + (line 6) +* Selector; vendor: vendor Selector Variable. + (line 6) +* Selector; wire: wire Selector Variable. + (line 6) +* Selector; xhost: xhost Selector Function. + (line 6) +* Selectors: Selectors. (line 6) +* selectors on default: /defaults with selectors. + (line 6) +* selectors_in_defaults Parameter: selectors_in_defaults Parameter. + (line 6) +* Server crashes: Keep-alives. (line 6) +* Setting a delay on a mount location: delay Option. (line 6) +* Setting additional options on a mount location: addopts Option. + (line 6) +* Setting Amd's RPC parameters: -t Option. (line 6) +* Setting debug flags: -D Option. (line 6) +* Setting default map parameters: Map Defaults. (line 6) +* Setting map cache parameters: Automount Filesystem. + (line 6) +* Setting map options: Map Options. (line 6) +* Setting system mount options: opts Option. (line 6) +* Setting system mount options for non-local networks: remopts Option. + (line 6) +* Setting the Amd log file via Amq: Amq -l option. (line 6) +* Setting the cluster name: -C Option. (line 6) +* Setting the default mount directory: -a Option. (line 6) +* Setting the filesystem type option: type Option. (line 6) +* Setting the interval before a filesystem times out: -c Option. + (line 6) +* Setting the interval between unmount attempts: -w Option. (line 6) +* Setting the Kernel architecture: -k Option. (line 6) +* Setting the local domain name: -d Option. (line 6) +* Setting the local mount point: fs Option. (line 6) +* Setting the log file: -l Option. (line 6) +* Setting the NIS (YP) domain name: -y Option. (line 6) +* Setting the operating system architecture: -A Option. (line 6) +* Setting the Operating System name: -O Option. (line 6) +* Setting the Operating System version: -o Option. (line 6) +* Setting the sublink option: sublink Option. (line 6) +* shared libraries: Supported Platforms. (line 6) +* Shared Memory and Swap Filesystem: Shared Memory+Swap Filesystem. + (line 6) +* Sharing a fileserver between architectures: Architecture Sharing. + (line 6) +* show_statfs_entries Parameter: show_statfs_entries Parameter. + (line 6) +* SIGHUP signal: Automount Filesystem. + (line 6) +* SIGINT signal: Stopping Amd. (line 6) +* SIGTERM signal: Stopping Amd. (line 6) +* Single-Host Mail Spool Directory: Single-Host Mail Spool Directory. + (line 6) +* Source code distribution: Distrib. (line 6) +* Starting Amd: Starting Amd. (line 6) +* Statically mounts filesystems, FSinfo: FSinfo static mounts. + (line 6) +* Statistics: Amq -s option. (line 6) +* Stopping Amd: Stopping Amd. (line 6) +* Stripping the local domain name: Variable Expansion. (line 6) +* sublink: Filesystems and Volumes. + (line 6) +* sublink, mount option: sublink Option. (line 6) +* sun_map_syntax Parameter: sun_map_syntax Parameter. + (line 6) +* Supported Platforms: Supported Platforms. (line 6) +* Symbolic link filesystem: Symbolic Link Filesystem. + (line 6) +* Symbolic link filesystem II: Symbolic Link Filesystem II. + (line 6) +* Symlink if target exists, NFS otherwise: NFS-Link Filesystem. + (line 6) +* symlink, link filesystem type: Symbolic Link Filesystem. + (line 6) +* symlink, linkx filesystem type: Symbolic Link Filesystem II. + (line 6) +* symlink, nfsl filesystem type: NFS-Link Filesystem. (line 6) +* Synchronizing the map cache: Automount Filesystem. + (line 6) +* syslog: -l Option. (line 6) +* syslog facility; specifying an alternate: -l Option. (line 13) +* syslog priorities: -x Option. (line 6) +* tag Parameter: tag Parameter. (line 6) +* Tags for Amd configuration file: -T Option. (line 6) +* TCP: nfs_retransmit_counter_tcp Parameter. + (line 6) +* TCP <1>: nfs_retry_interval_tcp Parameter. + (line 6) +* TCP; using with Amq: Amq -T option. (line 6) +* tfs, filesystem type: Translucent Filesystem. + (line 6) +* The mount system call: opts Option. (line 6) +* tmpfs, filesystem type: Shared Memory+Swap Filesystem. + (line 6) +* Top level filesystem: Top-level Filesystem. + (line 6) +* toplvl, filesystem type: Top-level Filesystem. + (line 6) +* Translucent Filesystem: Translucent Filesystem. + (line 6) +* true Selector Function: true Selector Function. + (line 6) +* true, boolean mount selector: true Selector Function. + (line 6) +* truncate_log Parameter: truncate_log Parameter. + (line 6) +* type, mount option: type Option. (line 6) +* Types of configuration map: Map Types. (line 6) +* Types of filesystem: Filesystem Types. (line 6) +* Types of mount map: Map Types. (line 6) +* udf, filesystem type: UDF Filesystem. (line 6) +* UDP: nfs_retransmit_counter_udp Parameter. + (line 6) +* UDP <1>: nfs_retransmit_counter_toplvl Parameter. + (line 6) +* UDP <2>: nfs_retry_interval_udp Parameter. + (line 6) +* UDP <3>: nfs_retry_interval_toplvl Parameter. + (line 6) +* UDP; using with Amq: Amq -U option. (line 6) +* UFS: Unix Filesystem. (line 6) +* ufs, filesystem type: Unix Filesystem. (line 6) +* uid Selector Variable: uid Selector Variable. + (line 6) +* uid, mount selector: uid Selector Variable. + (line 6) +* umapfs, filesystem type: User ID Mapping Filesystem. + (line 6) +* umount, mount option: Program Filesystem. (line 17) +* Union file maps: Union maps. (line 6) +* Union filesystem: Union Filesystem. (line 6) +* union, filesystem type: Union Filesystem. (line 6) +* Unix filesystem: Unix Filesystem. (line 6) +* Unix namespace: Volume Binding. (line 6) +* unmount attempt backoff interval: -w Option. (line 6) +* unmount, mount option: Program Filesystem. (line 17) +* Unmounting a filesystem: Amq -q option. (line 6) +* Unmounting a filesystem <1>: Amq -u option. (line 6) +* unmount_on_exit Parameter: unmount_on_exit Parameter. + (line 6) +* User filesystems: User Filesystems. (line 6) +* User ID Mapping Filesystem: User ID Mapping Filesystem. + (line 6) +* User maps, automatic generation: Password maps. (line 6) +* use_tcpwrappers Parameter: use_tcpwrappers Parameter. + (line 6) +* Using FSinfo: Using FSinfo. (line 6) +* Using Hlfsd: Using Hlfsd. (line 6) +* Using syslog to log errors: -l Option. (line 6) +* Using the password file as a map: Password maps. (line 6) +* Variable expansion: Variable Expansion. (line 6) +* vendor Parameter: vendor Parameter. (line 6) +* vendor Selector Variable: vendor Selector Variable. + (line 6) +* vendor, mount selector: vendor Selector Variable. + (line 6) +* verbose, FSinfo command line option: -v FSinfo Option. (line 6) +* Version information: -v Option. (line 6) +* Version information at run-time: Amq -v option. (line 6) +* volname, FSinfo mount option: FSinfo mount Option. (line 6) +* Volume: Filesystems and Volumes. + (line 6) +* Volume binding: Volume Binding. (line 6) +* Volume names: Volume Naming. (line 6) +* wait4amd: wait4amd. (line 6) +* wait4amd2die: wait4amd2die. (line 6) +* Why Deliver Into the Home Directory?: Why Deliver Into the Home Directory?. + (line 6) +* Wildcards in maps: Key Lookup. (line 6) +* wire Selector Variable: wire Selector Variable. + (line 6) +* wire, mount selector: wire Selector Variable. + (line 6) +* wire-test: wire-test. (line 6) +* XFS: Unix Filesystem. (line 6) +* xfs, filesystem type: Unix Filesystem. (line 6) +* xhost Selector Function: xhost Selector Function. + (line 6) +* xhost, boolean mount selector: xhost Selector Function. + (line 6) +* YP domain name: -y Option. (line 6) + + + +Tag Table: +Node: Top222 +Node: License2377 +Node: Distrib4022 +Node: AddInfo5121 +Node: Intro8875 +Node: History10010 +Node: Overview12574 +Node: Fundamentals13875 +Node: Filesystems and Volumes14656 +Node: Volume Naming15484 +Node: Volume Binding16749 +Node: Operational Principles17963 +Node: Mounting a Volume19310 +Node: Automatic Unmounting21052 +Node: Keep-alives22332 +Node: Non-blocking Operation24631 +Node: Supported Platforms25757 +Node: Mount Maps26388 +Node: Map Types27220 +Node: File maps28895 +Node: ndbm maps30432 +Node: NIS maps31117 +Node: NIS+ maps32594 +Node: Hesiod maps32864 +Node: Password maps33824 +Node: Union maps34762 +Node: LDAP maps35369 +Node: Executable maps36754 +Node: Key Lookup37654 +Node: Location Format38968 +Node: Map Defaults41709 +Node: Variable Expansion42337 +Node: Selectors45289 +Node: arch Selector Variable47321 +Node: autodir Selector Variable47757 +Node: byte Selector Variable48092 +Node: cluster Selector Variable48578 +Node: domain Selector Variable49052 +Node: dollar Selector Variable49359 +Node: host Selector Variable49851 +Node: hostd Selector Variable50472 +Node: karch Selector Variable50862 +Node: os Selector Variable51462 +Node: osver Selector Variable51867 +Node: full_os Selector Variable52288 +Node: vendor Selector Variable52741 +Node: key Selector Variable53388 +Node: map Selector Variable53904 +Node: netnumber Selector Variable54141 +Node: network Selector Variable54659 +Node: path Selector Variable55174 +Node: wire Selector Variable55468 +Node: uid Selector Variable55968 +Node: gid Selector Variable56729 +Node: exists Selector Function57274 +Node: false Selector Function57594 +Node: netgrp Selector Function57843 +Node: netgrpd Selector Function59653 +Node: in_network Selector Function60339 +Node: true Selector Function61638 +Node: xhost Selector Function61886 +Node: Map Options62280 +Node: addopts Option63025 +Node: delay Option64241 +Node: fs Option64788 +Node: opts Option66659 +Node: remopts Option78491 +Node: sublink Option79377 +Node: type Option79739 +Node: Amd Command Line Options79961 +Node: -a Option82860 +Node: -c Option83213 +Node: -d Option83858 +Node: -k Option84401 +Node: -l Option84945 +Node: -n Option87276 +Node: -o Option87692 +Node: -p Option88154 +Node: -r Option88583 +Node: -t Option88782 +Node: -v Option89472 +Node: -w Option91535 +Node: -x Option91840 +Node: -y Option93801 +Node: -A Option94140 +Node: -C Option94471 +Node: -D Option95122 +Node: -F Option96936 +Node: -H Option97654 +Node: -O Option97821 +Node: -S Option98286 +Node: -T Option98913 +Node: Filesystem Types99256 +Node: Network Filesystem101622 +Node: Network Host Filesystem103272 +Node: Network Filesystem Group105371 +Node: Unix Filesystem107142 +Node: Caching Filesystem108309 +Node: CD-ROM Filesystem110232 +Node: UDF Filesystem110852 +Node: Loopback Filesystem111494 +Node: Memory/RAM Filesystem112429 +Node: Null Filesystem112872 +Node: Floppy Filesystem113236 +Node: Translucent Filesystem113756 +Node: Shared Memory+Swap Filesystem114100 +Node: User ID Mapping Filesystem114662 +Node: Program Filesystem115049 +Node: Symbolic Link Filesystem118170 +Node: Symbolic Link Filesystem II119448 +Node: NFS-Link Filesystem120063 +Node: Automount Filesystem121602 +Node: Direct Automount Filesystem125752 +Node: Union Filesystem127451 +Node: Error Filesystem128962 +Node: Top-level Filesystem129483 +Node: Root Filesystem129899 +Node: Inheritance Filesystem130410 +Node: Amd Configuration File131447 +Node: File Format131960 +Node: The Global Section133427 +Node: Regular Map Sections134035 +Node: Common Parameters134439 +Node: autofs_use_lofs Parameter135198 +Node: browsable_dirs Parameter136465 +Node: map_defaults Parameter137415 +Node: map_options Parameter137955 +Node: map_type Parameter138284 +Node: mount_type Parameter139094 +Node: search_path Parameter139522 +Node: selectors_in_defaults Parameter139966 +Node: sun_map_syntax Parameter140736 +Node: Global Parameters141028 +Node: arch Parameter142878 +Node: auto_attrcache Parameter143189 +Node: auto_dir Parameter146697 +Node: cache_duration Parameter147049 +Node: cluster Parameter147397 +Node: debug_mtab_file Parameter147701 +Node: debug_options Parameter148118 +Node: dismount_interval Parameter148893 +Node: domain_strip Parameter149282 +Node: exec_map_timeout Parameter149825 +Node: forced_unmounts Parameter150500 +Node: full_os Parameter152410 +Node: fully_qualified_hosts Parameter152972 +Node: hesiod_base Parameter153501 +Node: karch Parameter153778 +Node: ldap_base Parameter154417 +Node: ldap_cache_maxmem Parameter154748 +Node: ldap_cache_seconds Parameter155066 +Node: ldap_hostports Parameter155381 +Node: ldap_proto_version Parameter155673 +Node: local_domain Parameter156009 +Node: localhost_address Parameter156468 +Node: log_file Parameter157051 +Node: log_options Parameter158159 +Node: map_reload_interval Parameter159148 +Node: nfs_allow_any_interface Parameter159612 +Node: nfs_allow_insecure_port Parameter160243 +Node: nfs_proto Parameter161172 +Node: nfs_retransmit_counter Parameter161863 +Node: nfs_retransmit_counter_udp Parameter162355 +Node: nfs_retransmit_counter_tcp Parameter162782 +Node: nfs_retransmit_counter_toplvl Parameter163216 +Node: nfs_retry_interval Parameter163798 +Node: nfs_retry_interval_udp Parameter164633 +Node: nfs_retry_interval_tcp Parameter165031 +Node: nfs_retry_interval_toplvl Parameter165436 +Node: nfs_vers Parameter165983 +Node: nis_domain Parameter166656 +Node: normalize_hostnames Parameter167103 +Node: normalize_slashes Parameter167565 +Node: os Parameter168119 +Node: osver Parameter168661 +Node: pid_file Parameter169215 +Node: plock Parameter169795 +Node: portmap_program Parameter170479 +Node: preferred_amq_port Parameter171280 +Node: print_pid Parameter171889 +Node: print_version Parameter172208 +Node: restart_mounts Parameter172640 +Node: show_statfs_entries Parameter173084 +Node: truncate_log Parameter173539 +Node: unmount_on_exit Parameter174023 +Node: use_tcpwrappers Parameter174571 +Node: vendor Parameter175741 +Node: Regular Map Parameters176186 +Node: map_name Parameter176498 +Node: tag Parameter176761 +Node: amd.conf Examples177236 +Node: Run-time Administration178744 +Node: Starting Amd178991 +Node: Stopping Amd179846 +Node: Restarting Amd180652 +Node: Controlling Amd181890 +Node: Amq default183376 +Node: Amq -f option185343 +Node: Amq -h option185795 +Node: Amq -H option186165 +Node: Amq -l option186359 +Node: Amq -m option186799 +Node: Amq -p option187957 +Node: Amq -P option188348 +Node: Amq -q option189027 +Node: Amq -s option189282 +Node: Amq -T option190374 +Node: Amq -U option190700 +Node: Amq -u option191021 +Node: Amq -v option191638 +Node: Amq -w option191880 +Node: Other Amq options192216 +Node: FSinfo192813 +Node: FSinfo Overview193550 +Node: Using FSinfo194734 +Node: FSinfo Grammar196435 +Node: FSinfo host definitions197803 +Node: FSinfo host attributes198920 +Node: FSinfo netif Option200094 +Node: FSinfo config Option200921 +Node: FSinfo arch Option201365 +Node: FSinfo os Option201742 +Node: FSinfo cluster Option202139 +Node: FSinfo filesystems202508 +Node: FSinfo fstype Option205506 +Node: FSinfo opts Option206286 +Node: FSinfo passno Option206579 +Node: FSinfo freq Option206902 +Node: FSinfo mount Option207201 +Node: FSinfo dumpset Option209294 +Node: FSinfo log Option209575 +Node: FSinfo static mounts209836 +Node: FSinfo automount definitions211511 +Node: FSinfo Command Line Options214736 +Node: -a FSinfo Option216375 +Node: -b FSinfo Option216763 +Node: -d FSinfo Option217464 +Node: -e FSinfo Option218080 +Node: -f FSinfo Option218865 +Node: -h FSinfo Option219474 +Node: -m FSinfo Option219861 +Node: -q FSinfo Option220440 +Node: -v FSinfo Option220715 +Node: -D-FSinfo Option221131 +Node: -I FSinfo Option221432 +Node: -U FSinfo Option221739 +Node: FSinfo errors221964 +Node: Hlfsd228561 +Node: Introduction to Hlfsd230278 +Node: Background to Mail Delivery235180 +Node: Single-Host Mail Spool Directory235679 +Node: Centralized Mail Spool Directory236771 +Ref: Centralized Mail Spool Directory-Footnote-1239625 +Ref: Centralized Mail Spool Directory-Footnote-2239932 +Node: Distributed Mail Spool Service240050 +Node: Why Deliver Into the Home Directory?243340 +Node: Using Hlfsd245891 +Node: Controlling Hlfsd246081 +Node: Hlfsd Options248002 +Node: Hlfsd Files252796 +Node: Assorted Tools253712 +Node: am-eject254216 +Node: amd.conf-sample254467 +Node: amd2ldif254679 +Node: amd2sun254937 +Node: automount2amd255180 +Node: ctl-amd256491 +Node: ctl-hlfsd256981 +Node: fix-amd-map257513 +Node: fixmount258022 +Node: fixrmtab258439 +Node: lostaltmail258731 +Node: lostaltmail.conf-sample259492 +Node: mk-amd-map259909 +Node: pawd260204 +Node: redhat-ctl-amd260932 +Node: wait4amd261472 +Node: wait4amd2die262583 +Node: wire-test263143 +Node: Examples264231 +Node: User Filesystems264539 +Node: Home Directories267701 +Node: Architecture Sharing270704 +Node: Wildcard Names272302 +Node: rwho servers273608 +Node: /vol274353 +Node: /defaults with selectors276944 +Node: /tftpboot in a chroot-ed environment277800 +Node: Internals282074 +Node: Log Messages282413 +Node: Fatal errors283132 +Node: Info messages286641 +Node: Acknowledgments & Trademarks289272 +Node: Index290961 + +End Tag Table diff --git a/doc/am-utils.info-1 b/doc/am-utils.info-1 new file mode 100644 index 00000000000..37ac0b5e53e --- /dev/null +++ b/doc/am-utils.info-1 @@ -0,0 +1,7645 @@ +This is ../../doc/am-utils.info, produced by makeinfo version 4.8 from +../../doc/am-utils.texi. + +INFO-DIR-SECTION Administration +START-INFO-DIR-ENTRY +* Am-utils: (am-utils). The Amd automounter suite of utilities +END-INFO-DIR-ENTRY + + +File: am-utils.info, Node: Top, Next: License, Up: (DIR) + + Am-utils (4.4BSD Automounter Utilities) User Manual +For version 6.2-rc1, 21 November 2010 + + Erez Zadok +(Originally by Jan-Simon Pendry and Nick Williams) + + Copyright (C) 1997-2009 Erez Zadok +Copyright (C) 1989 Jan-Simon Pendry +Copyright (C) 1989 Imperial College of Science, Technology & Medicine +Copyright (C) 1989 The Regents of the University of California. +All Rights Reserved. + + Permission to copy this document, or any portion of it, as necessary +for use of this software is granted provided this copyright notice and +statement of permission are included. + + Am-utils is the 4.4BSD Automounter Tool Suite, which includes the Amd +automounter, the Amq query and control program, the Hlfsd daemon, and +other tools. This Info file describes how to use and understand the +tools within Am-utils. + +* Menu: + +* License:: Explains the terms and conditions for using + and distributing Am-utils. +* Distrib:: How to get the latest Am-utils distribution. +* AddInfo:: How to get additional information. +* Intro:: An introduction to Automounting concepts. +* History:: History of am-utils' development. +* Overview:: An overview of Amd. +* Supported Platforms:: Machines and Systems supported by Amd. +* Mount Maps:: Details of mount maps. +* Amd Command Line Options:: All the Amd command line options explained. +* Filesystem Types:: The different mount types supported by Amd. +* Amd Configuration File:: The amd.conf file syntax and meaning. +* Run-time Administration:: How to start, stop and control Amd. +* FSinfo:: The FSinfo filesystem management tool. +* Hlfsd:: The Home-Link Filesystem server. +* Assorted Tools:: Other tools which come with am-utils. +* Examples:: Some examples showing how Amd might be used. +* Internals:: Implementation details. +* Acknowledgments & Trademarks:: Legal Notes. + +Indexes +* Index:: An item for each concept. + + +File: am-utils.info, Node: License, Next: Distrib, Prev: Top, Up: Top + +License +******* + +Am-utils is not in the public domain; it is copyrighted and there are +restrictions on its distribution. + + 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 acknowledgment: + + "This product includes software developed by the University of + California, Berkeley and its contributors, as well as the Trustees + of Columbia University." + + 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. + + +File: am-utils.info, Node: Distrib, Next: AddInfo, Prev: License, Up: Top + +Source Distribution +******************* + +The Am-utils home page is located in + `http://www.am-utils.org/' + + You can get the latest distribution version of Am-utils from + `ftp://ftp.am-utils.org/pub/am-utils/am-utils.tar.gz' + + Additional alpha, beta, and release distributions are available in + `ftp://ftp.am-utils.org/pub/am-utils/'. + + Revision 5.2 was part of the 4.3BSD Reno distribution. + + Revision 5.3bsdnet, a late alpha version of 5.3, was part of the BSD +network version 2 distribution + + Revision 6.0 was made independently by Erez Zadok at the Computer +Science Department of Columbia University (http://www.cs.columbia.edu/), +as part of his PhD thesis work +(http://www.fsl.cs.sunysb.edu/docs/zadok-thesis-proposal/). Am-utils +(especially version 6.1) continues to be developed and maintained at the +Computer Science Department (http://www.cs.sunysb.edu/) of Stony Brook +University (http://www.stonybrook.edu/), as a service to the user +community. + + *Note History::, for more details. + + +File: am-utils.info, Node: AddInfo, Next: Intro, Prev: Distrib, Up: Top + +Getting Additional Information +****************************** + +Bug Reports +=========== + +Before reporting a bug, see if it is a known one in the bugs +(http://www.am-utils.org/docs/am-utils/BUGS.txt) file. + + If you find a problem and hopefully you can reproduce it, please +describe it in detail and submit a bug report +(https://bugzilla.filesystems.org/) via Bugzilla +(http://www.bugzilla.org/). Alternatively, you can send your bug +report to the "am-utils" list (see `http://www.am-utils.org/' under +"Mailing Lists") quoting the details of the release and your +configuration. These details can be obtained by running the command +`amd -v'. It would greatly help if you could provide a reproducible +procedure for detecting the bug you are reporting. + + Providing working patches is highly encouraged. Every patch +incorporated, however small, will get its author an honorable mention in +the authors file (http://www.am-utils.org/docs/am-utils/AUTHORS.txt). + +Mailing Lists +============= + +There are several mailing lists for people interested in keeping +up-to-date with developments. + + 1. The users mailing list, `am-utils' is for + + - announcements of alpha and beta releases of am-utils + + - reporting of bugs and patches + + - discussions of new features for am-utils + + - implementation and porting issues + + To subscribe, visit `http://www.am-utils.org/' under "Mailing + Lists." After subscribing, you can post a message to this list. + To avoid as much spam as possible, only subscribers to this list + may post to it. + + Subscribers of `am-utils' are most helpful if they have the time + and resources to test new and development versions of amd, on as + many different platforms as possible. They should also be + prepared to learn and use the GNU Autoconf, Automake, and Libtool + packages, as needed; and of course, become familiar with the + complex code in the am-utils package. In other words, subscribers + on this list should hopefully be able to contribute meaningfully + to the development of amd. + + Note that this `am-utils' list used to be called `amd-dev' before + January 1st, 2004. Please use the new name, `am-utils'. + + 2. The announcements mailing list, `am-utils-announce' is for + announcements only (mostly new releases). To subscribe, visit + `http://www.am-utils.org/' under "Mailing Lists." This list is + read-only: only am-utils developers may post to it. + + 3. We distribute nightly CVS snapshots in + `ftp://ftp.am-utils.org/pub/am-utils/snapshots/daily/'. If you + like to get email notices of commits to the am-utils CVS + repository, subscribe to the CVS logs mailing list, `am-utils-cvs' + at `http://www.am-utils.org/' under "Mailing Lists." + + 4. The older list which was used to user discussions, `amd-workers', + is defunct as of January 2004. (Its last address was .) Don't use `amd-workers': use the + newer, more active `am-utils' list. + + 5. For completeness, there's a developers-only closed list called + `am-utils-developers' (see `http://www.am-utils.org/' under + "Mailing Lists"). + + +Am-utils Book +============= + +Erez Zadok (http://www.cs.sunysb.edu/~ezk) wrote a book +(http://www.fsl.cs.sunysb.edu/docs/amd-book/), titled Linux NFS and +Automounter Administration, ISBN 0-7821-2739-8, (Sybex, 2001). The +book is full of details and examples that go beyond what this manual +has. The book also covers NFS in great detail. Although the book is +geared toward Linux users, it is general enough for any Unix +administrator and contains specific sections for non-Linux systems. + + +File: am-utils.info, Node: Intro, Next: History, Prev: AddInfo, Up: Top + +Introduction +************ + +An "automounter" maintains a cache of mounted filesystems. Filesystems +are mounted on demand when they are first referenced, and unmounted +after a period of inactivity. + + Amd may be used as a replacement for Sun's automounter. The choice +of which filesystem to mount can be controlled dynamically with +"selectors". Selectors allow decisions of the form "hostname is THIS," +or "architecture is not THAT." Selectors may be combined arbitrarily. +Amd also supports a variety of filesystem types, including NFS, UFS and +the novel "program" filesystem. The combination of selectors and +multiple filesystem types allows identical configuration files to be +used on all machines thus reducing the administrative overhead. + + Amd ensures that it will not hang if a remote server goes down. +Moreover, Amd can determine when a remote server has become +inaccessible and then mount replacement filesystems as and when they +become available. + + Amd contains no proprietary source code and has been ported to +numerous flavors of Unix. + + +File: am-utils.info, Node: History, Next: Overview, Prev: Intro, Up: Top + +History +******* + +The Amd package has been without an official maintainer since 1992. +Several people have stepped in to maintain it unofficially. Most +notable were the `upl' (Unofficial Patch Level) releases of Amd, +created by me (Erez Zadok (http://www.cs.sunysb.edu/~ezk)), and +available from `ftp://ftp.am-utils.org/pub/amd/'. The last such +unofficial release was `upl102'. + + Through the process of patching and aging, it was becoming more and +more apparent that Amd was in much need of revitalizing. Maintaining +Amd had become a difficult task. I took it upon myself to cleanup the +code, so that it would be easier to port to new platforms, add new +features, keep up with the many new feature requests, and deal with the +never ending stream of bug reports. + + I have been working on such a release of Amd on and off since +January of 1996. The new suite of tools is currently named "am-utils" +(AutoMounter Utilities), in line with GNU naming conventions, befitting +the contents of the package. In October of 1996 I had received enough +offers to help me with this task that I decided to make a mailing list +for this group of people. Around the same time, Amd had become a +necessary part of my PhD thesis work, resulting in more work performed +on am-utils. + + Am-utils version 6.0 was numbered with a major new release number to +distinguish it from the last official release of Amd (5.x). Many new +features have been added such as a GNU `configure' system, NFS Version +3, a run-time configuration file (`amd.conf'), many new ports, more +scripts and programs, as well as numerous bug fixes. Another reason +for the new major release number was to alert users of am-utils that +user-visible interfaces may have changed. In order to make Amd work +well for the next 10 years, and be easier to maintain, it was necessary +to remove old or unused features, change various syntax files, etc. +However, great care was taken to ensure the maximum possible backwards +compatibility. + + Am-utils version 6.1 has autofs support for Linux and Solaris 2.5+ as +the major new feature, in addition to several other minor new features. +The autofs support is completely transparent to the end-user, aside +from the fact that `/bin/pwd' now always returns the correct amd-ified +path. The administrator can easily switch between NFS and autofs +mounts by changing one parameter in `amd.conf'. Autofs support and +maintenance was developed in conjunction with Ion Badulescu . + + +File: am-utils.info, Node: Overview, Next: Supported Platforms, Prev: History, Up: Top + +1 Overview +********** + +Amd maintains a cache of mounted filesystems. Filesystems are +"demand-mounted" when they are first referenced, and unmounted after a +period of inactivity. Amd may be used as a replacement for Sun's +automount(8) program. It contains no proprietary source code and has +been ported to numerous flavors of Unix. *Note Supported Platforms::. + + Amd was designed as the basis for experimenting with filesystem +layout and management. Although Amd has many direct applications it is +loaded with additional features which have little practical use. At +some point the infrequently used components may be removed to streamline +the production system. + + Amd supports the notion of "replicated" filesystems by evaluating +each member of a list of possible filesystem locations one by one. Amd +checks that each cached mapping remains valid. Should a mapping be +lost - such as happens when a fileserver goes down - Amd automatically +selects a replacement should one be available. + +* Menu: + +* Fundamentals:: +* Filesystems and Volumes:: +* Volume Naming:: +* Volume Binding:: +* Operational Principles:: +* Mounting a Volume:: +* Automatic Unmounting:: +* Keep-alives:: +* Non-blocking Operation:: + + +File: am-utils.info, Node: Fundamentals, Next: Filesystems and Volumes, Prev: Overview, Up: Overview + +1.1 Fundamentals +================ + +The fundamental concept behind Amd is the ability to separate the name +used to refer to a file from the name used to refer to its physical +storage location. This allows the same files to be accessed with the +same name regardless of where in the network the name is used. This is +very different from placing `/n/hostname' in front of the pathname +since that includes location dependent information which may change if +files are moved to another machine. + + By placing the required mappings in a centrally administered +database, filesystems can be re-organized without requiring changes to +configuration files, shell scripts and so on. + + +File: am-utils.info, Node: Filesystems and Volumes, Next: Volume Naming, Prev: Fundamentals, Up: Overview + +1.2 Filesystems and Volumes +=========================== + +Amd views the world as a set of fileservers, each containing one or +more filesystems where each filesystem contains one or more "volumes". +Here the term "volume" is used to refer to a coherent set of files such +as a user's home directory or a TeX distribution. + + In order to access the contents of a volume, Amd must be told in +which filesystem the volume resides and which host owns the filesystem. +By default the host is assumed to be local and the volume is assumed to +be the entire filesystem. If a filesystem contains more than one +volume, then a "sublink" is used to refer to the sub-directory within +the filesystem where the volume can be found. + + +File: am-utils.info, Node: Volume Naming, Next: Volume Binding, Prev: Filesystems and Volumes, Up: Overview + +1.3 Volume Naming +================= + +Volume names are defined to be unique across the entire network. A +volume name is the pathname to the volume's root as known by the users +of that volume. Since this name uniquely identifies the volume +contents, all volumes can be named and accessed from each host, subject +to administrative controls. + + Volumes may be replicated or duplicated. Replicated volumes contain +identical copies of the same data and reside at two or more locations in +the network. Each of the replicated volumes can be used +interchangeably. Duplicated volumes each have the same name but contain +different, though functionally identical, data. For example, +`/vol/tex' might be the name of a TeX distribution which varied for +each machine architecture. + + Amd provides facilities to take advantage of both replicated and +duplicated volumes. Configuration options allow a single set of +configuration data to be shared across an entire network by taking +advantage of replicated and duplicated volumes. + + Amd can take advantage of replacement volumes by mounting them as +required should an active fileserver become unavailable. + + +File: am-utils.info, Node: Volume Binding, Next: Operational Principles, Prev: Volume Naming, Up: Overview + +1.4 Volume Binding +================== + +Unix implements a namespace of hierarchically mounted filesystems. Two +forms of binding between names and files are provided. A "hard link" +completes the binding when the name is added to the filesystem. A +"soft link" delays the binding until the name is accessed. An +"automounter" adds a further form in which the binding of name to +filesystem is delayed until the name is accessed. + + The target volume, in its general form, is a tuple (host, filesystem, +sublink) which can be used to name the physical location of any volume +in the network. + + When a target is referenced, Amd ignores the sublink element and +determines whether the required filesystem is already mounted. This is +done by computing the local mount point for the filesystem and checking +for an existing filesystem mounted at the same place. If such a +filesystem already exists then it is assumed to be functionally +identical to the target filesystem. By default there is a one-to-one +mapping between the pair (host, filesystem) and the local mount point so +this assumption is valid. + + +File: am-utils.info, Node: Operational Principles, Next: Mounting a Volume, Prev: Volume Binding, Up: Overview + +1.5 Operational Principles +========================== + +Amd operates by introducing new mount points into the namespace. These +are called "automount" points. The kernel sees these automount points +as NFS filesystems being served by Amd. Having attached itself to the +namespace, Amd is now able to control the view the rest of the system +has of those mount points. RPC calls are received from the kernel one +at a time. + + When a "lookup" call is received Amd checks whether the name is +already known. If it is not, the required volume is mounted. A +symbolic link pointing to the volume root is then returned. Once the +symbolic link is returned, the kernel will send all other requests +direct to the mounted filesystem. + + If a volume is not yet mounted, Amd consults a configuration +"mount-map" corresponding to the automount point. Amd then makes a +runtime decision on what and where to mount a filesystem based on the +information obtained from the map. + + Amd does not implement all the NFS requests; only those relevant to +name binding such as "lookup", "readlink" and "readdir". Some other +calls are also implemented but most simply return an error code; for +example "mkdir" always returns "read-only filesystem". + + +File: am-utils.info, Node: Mounting a Volume, Next: Automatic Unmounting, Prev: Operational Principles, Up: Overview + +1.6 Mounting a Volume +===================== + +Each automount point has a corresponding mount map. The mount map +contains a list of key-value pairs. The key is the name of the volume +to be mounted. The value is a list of locations describing where the +filesystem is stored in the network. In the source for the map the +value would look like + + location1 location2 ... locationN + + Amd examines each location in turn. Each location may contain +"selectors" which control whether Amd can use that location. For +example, the location may be restricted to use by certain hosts. Those +locations which cannot be used are ignored. + + Amd attempts to mount the filesystem described by each remaining +location until a mount succeeds or Amd can no longer proceed. The +latter can occur in three ways: + + * If none of the locations could be used, or if all of the locations + caused an error, then the last error is returned. + + * If a location could be used but was being mounted in the + background then Amd marks that mount as being "in progress" and + continues with the next request; no reply is sent to the kernel. + + * Lastly, one or more of the mounts may have been "deferred". A + mount is deferred if extra information is required before the + mount can proceed. When the information becomes available the + mount will take place, but in the mean time no reply is sent to + the kernel. If the mount is deferred, Amd continues to try any + remaining locations. + + Once a volume has been mounted, Amd establishes a "volume mapping" +which is used to satisfy subsequent requests. + + +File: am-utils.info, Node: Automatic Unmounting, Next: Keep-alives, Prev: Mounting a Volume, Up: Overview + +1.7 Automatic Unmounting +======================== + +To avoid an ever increasing number of filesystem mounts, Amd removes +volume mappings which have not been used recently. A time-to-live +interval is associated with each mapping and when that expires the +mapping is removed. When the last reference to a filesystem is removed, +that filesystem is unmounted. If the unmount fails, for example the +filesystem is still busy, the mapping is re-instated and its +time-to-live interval is extended. The global default for this grace +period is controlled by the `-w' command-line option (*note -w: -w +Option.) or the amd.conf parameter `dismount_interval' (*note +dismount_interval Parameter::). It is also possible to set this value +on a per-mount basis (*note opts: opts Option.). + + Filesystems can be forcefully timed out using the Amq command. +*Note Run-time Administration::. Note that on new enough systems that +support forced unmounts, such as Linux, Amd can try to use the +umount2(2) system call to force the unmount, if the regular umount(2) +system call failed in a way that indicates that the mount point is hung +or stale. *Note forced_unmounts Parameter::. + + +File: am-utils.info, Node: Keep-alives, Next: Non-blocking Operation, Prev: Automatic Unmounting, Up: Overview + +1.8 Keep-alives +=============== + +Use of some filesystem types requires the presence of a server on +another machine. If a machine crashes then it is of no concern to +processes on that machine that the filesystem is unavailable. However, +to processes on a remote host using that machine as a fileserver this +event is important. This situation is most widely recognized when an +NFS server crashes and the behavior observed on client machines is that +more and more processes hang. In order to provide the possibility of +recovery, Amd implements a "keep-alive" interval timer for some +filesystem types. Currently only NFS makes use of this service. + + The basis of the NFS keep-alive implementation is the observation +that most sites maintain replicated copies of common system data such as +manual pages, most or all programs, system source code and so on. If +one of those servers goes down it would be reasonable to mount one of +the others as a replacement. + + The first part of the process is to keep track of which fileservers +are up and which are down. Amd does this by sending RPC requests to the +servers' NFS `NullProc' and checking whether a reply is returned. +While the server state is uncertain the requests are re-transmitted at +three second intervals and if no reply is received after four attempts +the server is marked down. If a reply is received the fileserver is +marked up and stays in that state for 30 seconds at which time another +NFS ping is sent. This interval is configurable and can even be turned +off using the ping option. *Note opts Option::. + + Once a fileserver is marked down, requests continue to be sent every +30 seconds in order to determine when the fileserver comes back up. +During this time any reference through Amd to the filesystems on that +server fail with the error "Operation would block". If a replacement +volume is available then it will be mounted, otherwise the error is +returned to the user. + + Although this action does not protect user files, which are unique on +the network, or processes which do not access files via Amd or already +have open files on the hung filesystem, it can prevent most new +processes from hanging. + + +File: am-utils.info, Node: Non-blocking Operation, Prev: Keep-alives, Up: Overview + +1.9 Non-blocking Operation +========================== + +Since there is only one instance of Amd for each automount point, and +usually only one instance on each machine, it is important that it is +always available to service kernel calls. Amd goes to great lengths to +ensure that it does not block in a system call. As a last resort Amd +will fork before it attempts a system call that may block indefinitely, +such as mounting an NFS filesystem. Other tasks such as obtaining +filehandle information for an NFS filesystem, are done using a purpose +built non-blocking RPC library which is integrated with Amd's task +scheduler. This library is also used to implement NFS keep-alives +(*note Keep-alives::). + + Whenever a mount is deferred or backgrounded, Amd must wait for it +to complete before replying to the kernel. However, this would cause +Amd to block waiting for a reply to be constructed. Rather than do +this, Amd simply "drops" the call under the assumption that the kernel +RPC mechanism will automatically retry the request. + + +File: am-utils.info, Node: Supported Platforms, Next: Mount Maps, Prev: Overview, Up: Top + +2 Supported Platforms +********************* + +Am-utils has been ported to a wide variety of machines and operating +systems. Am-utils's code works for little-endian and big-endian +machines, as well as 32 bit and 64 bit architectures. Furthermore, when +Am-utils ports to an Operating System on one architecture, it is +generally readily portable to the same Operating System on all +platforms on which it is available. + + See the `INSTALL' in the distribution for more specific details on +building and/or configuring for some systems. + + +File: am-utils.info, Node: Mount Maps, Next: Amd Command Line Options, Prev: Supported Platforms, Up: Top + +3 Mount Maps +************ + +Amd has no built-in knowledge of machines or filesystems. External +"mount-maps" are used to provide the required information. +Specifically, Amd needs to know when and under what conditions it +should mount filesystems. + + The map entry corresponding to the requested name contains a list of +possible locations from which to resolve the request. Each location +specifies filesystem type, information required by that filesystem (for +example the block special device in the case of UFS), and some +information describing where to mount the filesystem (*note fs +Option::). A location may also contain "selectors" (*note Selectors::). + +* Menu: + +* Map Types:: +* Key Lookup:: +* Location Format:: + + +File: am-utils.info, Node: Map Types, Next: Key Lookup, Prev: Mount Maps, Up: Mount Maps + +3.1 Map Types +============= + +A mount-map provides the run-time configuration information to Amd. +Maps can be implemented in many ways. Some of the forms supported by +Amd are regular files, ndbm databases, NIS maps, the "Hesiod" name +server, and even the password file. + + A mount-map "name" is a sequence of characters. When an automount +point is created a handle on the mount-map is obtained. For each map +type configured, Amd attempts to reference the map of the appropriate +type. If a map is found, Amd notes the type for future use and deletes +the reference, for example closing any open file descriptors. The +available maps are configured when Amd is built and can be displayed by +running the command `amd -v'. + + When using an Amd configuration file (*note Amd Configuration File::) +and the keyword `map_type' (*note map_type Parameter::), you may force +the map used to any type. + + By default, Amd caches data in a mode dependent on the type of map. +This is the same as specifying `cache:=mapdefault' and selects a +suitable default cache mode depending on the map type. The individual +defaults are described below. The CACHE option can be specified on +automount points to alter the caching behavior (*note Automount +Filesystem::). + + The following map types have been implemented, though some are not +available on all machines. Run the command `amd -v' to obtain a list +of map types configured on your machine. + +* Menu: + +* File maps:: +* ndbm maps:: +* NIS maps:: +* NIS+ maps:: +* Hesiod maps:: +* Password maps:: +* Union maps:: +* LDAP maps:: +* Executable maps:: + + +File: am-utils.info, Node: File maps, Next: ndbm maps, Prev: Map Types, Up: Map Types + +3.1.1 File maps +--------------- + +When Amd searches a file for a map entry it does a simple scan of the +file and supports both comments and continuation lines. + + Continuation lines are indicated by a backslash character (`\') as +the last character of a line in the file. The backslash, newline +character _and any leading white space on the following line_ are +discarded. A maximum line length of 2047 characters is enforced after +continuation lines are read but before comments are stripped. Each +line must end with a newline character; that is newlines are +terminators, not separators. The following examples illustrate this: + + key valA valB; \ + valC + + specifies _three_ locations, and is identical to + + key valA valB; valC + + However, + + key valA valB;\ + valC + + specifies only _two_ locations, and is identical to + + key valA valB;valC + + After a complete line has been read from the file, including +continuations, Amd determines whether there is a comment on the line. +A comment begins with a hash ("`#'") character and continues to the end +of the line. There is no way to escape or change the comment lead-in +character. + + Note that continuation lines and comment support "only" apply to +file maps, or ndbm maps built with the `mk-amd-map' program. + + When caching is enabled, file maps have a default cache mode of +`all' (*note Automount Filesystem::). + + +File: am-utils.info, Node: ndbm maps, Next: NIS maps, Prev: File maps, Up: Map Types + +3.1.2 ndbm maps +--------------- + +An ndbm map may be used as a fast access form of a file map. The +program, `mk-amd-map', converts a normal map file into an ndbm database. +This program supports the same continuation and comment conventions that +are provided for file maps. Note that ndbm format files may _not_ be +sharable across machine architectures. The notion of speed generally +only applies to large maps; a small map, less than a single disk block, +is almost certainly better implemented as a file map. + + ndbm maps have a default cache mode of `all' (*note Automount +Filesystem::). + + +File: am-utils.info, Node: NIS maps, Next: NIS+ maps, Prev: ndbm maps, Up: Map Types + +3.1.3 NIS maps +-------------- + +When using NIS (formerly YP), an Amd map is implemented directly by the +underlying NIS map. Comments and continuation lines are _not_ +supported in the automounter and must be stripped when constructing the +NIS server's database. + + NIS maps have a default cache mode of `all' (*note Automount +Filesystem::). + + The following rule illustrates what could be added to your NIS +`Makefile', in this case causing the `amd.home' map to be rebuilt: + $(YPTSDIR)/amd.home.time: $(ETCDIR)/amd.home + -@sed -e "s/#.*$$//" -e "/^$$/d" $(ETCDIR)/amd.home | \ + awk '{ \ + for (i = 1; i <= NF; i++) \ + if (i == NF) { \ + if (substr($$i, length($$i), 1) == "\\") \ + printf("%s", substr($$i, 1, length($$i) - 1)); \ + else \ + printf("%s\n", $$i); \ + } \ + else \ + printf("%s ", $$i); \ + }' | \ + $(MAKEDBM) - $(YPDBDIR)/amd.home; \ + touch $(YPTSDIR)/amd.home.time; \ + echo "updated amd.home"; \ + if [ ! $(NOPUSH) ]; then \ + $(YPPUSH) amd.home; \ + echo "pushed amd.home"; \ + else \ + : ; \ + fi + + Here `$(YPTSDIR)' contains the time stamp files, and `$(YPDBDIR)' +contains the dbm format NIS files. + + +File: am-utils.info, Node: NIS+ maps, Next: Hesiod maps, Prev: NIS maps, Up: Map Types + +3.1.4 NIS+ maps +--------------- + +NIS+ maps do not support cache mode `all' and, when caching is enabled, +have a default cache mode of `inc'. + + XXX: FILL IN WITH AN EXAMPLE. + + +File: am-utils.info, Node: Hesiod maps, Next: Password maps, Prev: NIS+ maps, Up: Map Types + +3.1.5 Hesiod maps +----------------- + +When the map name begins with the string `hesiod.' lookups are made +using the "Hesiod" name server. The string following the dot is used +as a name qualifier and is prepended with the key being located. The +entire string is then resolved in the `automount' context, or the +amd.conf parameter `hesiod_base' (*note hesiod_base Parameter::). For +example, if the key is `jsp' and map name is `hesiod.homes' then +"Hesiod" is asked to resolve `jsp.homes.automount'. + + Hesiod maps do not support cache mode `all' and, when caching is +enabled, have a default cache mode of `inc' (*note Automount +Filesystem::). + + The following is an example of a "Hesiod" map entry: + + jsp.homes.automount HS TXT "rfs:=/home/charm;rhost:=charm;sublink:=jsp" + njw.homes.automount HS TXT "rfs:=/home/dylan/dk2;rhost:=dylan;sublink:=njw" + + +File: am-utils.info, Node: Password maps, Next: Union maps, Prev: Hesiod maps, Up: Map Types + +3.1.6 Password maps +------------------- + +The password map support is unlike the four previous map types. When +the map name is the string `/etc/passwd' Amd can lookup a user name in +the password file and re-arrange the home directory field to produce a +usable map entry. + + Amd assumes the home directory has the format +`/anydir/dom1/../domN/login'. It breaks this string into a map entry +where `${rfs}' has the value `/anydir/domN', `${rhost}' has the value +`domN.....dom1', and `${sublink}' has the value login. + + Thus if the password file entry was + + /home/achilles/jsp + + the map entry used by Amd would be + + rfs:=/home/achilles;rhost:=achilles;sublink:=jsp + + Similarly, if the password file entry was + + /home/cc/sugar/mjh + + the map entry used by Amd would be + + rfs:=/home/sugar;rhost:=sugar.cc;sublink:=mhj + + +File: am-utils.info, Node: Union maps, Next: LDAP maps, Prev: Password maps, Up: Map Types + +3.1.7 Union maps +---------------- + +The union map support is provided specifically for use with the union +filesystem, *note Union Filesystem::. + + It is identified by the string `union:' which is followed by a colon +separated list of directories. The directories are read in order, and +the names of all entries are recorded in the map cache. Later +directories take precedence over earlier ones. The union filesystem +type then uses the map cache to determine the union of the names in all +the directories. + + +File: am-utils.info, Node: LDAP maps, Next: Executable maps, Prev: Union maps, Up: Map Types + +3.1.8 LDAP maps +--------------- + +LDAP (Lightweight Directory Access Protocol) maps do not support cache +mode `all' and, when caching is enabled, have a default cache mode of +`inc'. + + For example, an Amd map `amd.home' that looks as follows: + + /defaults opts:=rw,intr;type:=link + + zing -rhost:=shekel \ + host==shekel \ + host!=shekel;type:=nfs + when converted to LDAP (*note amd2ldif::), will result in the +following LDAP database: + $ amd2ldif amd.home CUCS < amd.home + dn: cn=amdmap timestamp, CUCS + cn : amdmap timestamp + objectClass : amdmapTimestamp + amdmapTimestamp: 873071363 + + dn: cn=amdmap amd.home[/defaults], CUCS + cn : amdmap amd.home[/defaults] + objectClass : amdmap + amdmapName : amd.home + amdmapKey : /defaults + amdmapValue : opts:=rw,intr;type:=link + + dn: cn=amdmap amd.home[], CUCS + cn : amdmap amd.home[] + objectClass : amdmap + amdmapName : amd.home + amdmapKey : + amdmapValue : + + dn: cn=amdmap amd.home[zing], CUCS + cn : amdmap amd.home[zing] + objectClass : amdmap + amdmapName : amd.home + amdmapKey : zing + amdmapValue : -rhost:=shekel host==shekel host!=shekel;type:=nfs + + +File: am-utils.info, Node: Executable maps, Prev: LDAP maps, Up: Map Types + +3.1.9 Executable maps +--------------------- + +An executable map is a dynamic map in which the keys and values for the +maps are generated on the fly by a program or script. The program is +expected to take a single parameter argument which is the key to +lookup. If the key is found, the program should print on stdout the +key-value pair that were found; if the key was not found, nothing +should be printed out. Below is an sample of such a map script: + + #!/bin/sh + # executable map example + case "$1" in + "/defaults" ) + echo "/defaults type:=nfs;rfs:=filer" + ;; + "a" ) + echo "a type:=nfs;fs:=/tmp" + ;; + "b" ) + echo "b type:=link;fs:=/usr/local" + ;; + * ) # no match, echo nothing + ;; + esac + + *Note exec_map_timeout Parameter::. + + +File: am-utils.info, Node: Key Lookup, Next: Location Format, Prev: Map Types, Up: Mount Maps + +3.2 How keys are looked up +========================== + +The key is located in the map whose type was determined when the +automount point was first created. In general the key is a pathname +component. In some circumstances this may be modified by variable +expansion (*note Variable Expansion::) and prefixing. If the automount +point has a prefix, specified by the PREF option, then that is +prepended to the search key before the map is searched. + + If the map cache is a `regexp' cache then the key is treated as an +egrep-style regular expression, otherwise a normal string comparison is +made. + + If the key cannot be found then a "wildcard" match is attempted. +Amd repeatedly strips the basename from the key, appends `/*' and +attempts a lookup. Finally, Amd attempts to locate the special key `*'. + + For example, the following sequence would be checked if +`home/dylan/dk2' was being located: + + home/dylan/dk2 + home/dylan/* + home/* + * + + At any point when a wildcard is found, Amd proceeds as if an exact +match had been found and the value field is then used to resolve the +mount request, otherwise an error code is propagated back to the kernel. +(*note Filesystem Types::). + + +File: am-utils.info, Node: Location Format, Prev: Key Lookup, Up: Mount Maps + +3.3 Location Format +=================== + +The value field from the lookup provides the information required to +mount a filesystem. The information is parsed according to the syntax +shown below. + + location-list: + location-selection + location-list white-space || white-space location-selection + location-selection: + location + location-selection white-space location + location: + location-info + -location-info + - + location-info: + sel-or-opt + location-info;sel-or-opt + ; + sel-or-opt: + selection + opt-ass + selection: + selector==value + selector!=value + opt-ass: + option:=value + white-space: + space + tab + + Note that unquoted whitespace is not allowed in a location +description. White space is only allowed, and is mandatory, where +shown with non-terminal white-space. + + A "location-selection" is a list of possible volumes with which to +satisfy the request. Each "location-selection" is tried sequentially, +until either one succeeds or all fail. This, by the way, is different +from the historically documented behavior, which claimed (falsely, at +least for last 3 years) that Amd would attempt to mount all +"location-selection"s in parallel and the first one to succeed would be +used. + + "location-selection"s are optionally separated by the `||' operator. +The effect of this operator is to prevent use of location-selections +to its right if any of the location-selections on its left were +selected, whether or not any of them were successfully mounted (*note +Selectors::). + + The location-selection, and singleton "location-list", +`type:=ufs;dev:=/dev/xd1g' would inform Amd to mount a UFS filesystem +from the block special device `/dev/xd1g'. + + The "sel-or-opt" component is either the name of an option required +by a specific filesystem, or it is the name of a built-in, predefined +selector such as the architecture type. The value may be quoted with +double quotes `"', for example `type:="ufs";dev:="/dev/xd1g"'. These +quotes are stripped when the value is parsed and there is no way to get +a double quote into a value field. Double quotes are used to get white +space into a value field, which is needed for the program filesystem +(*note Program Filesystem::). + +* Menu: + +* Map Defaults:: +* Variable Expansion:: +* Selectors:: +* Map Options:: + + +File: am-utils.info, Node: Map Defaults, Next: Variable Expansion, Prev: Location Format, Up: Location Format + +3.3.1 Map Defaults +------------------ + +A location beginning with a dash `-' is used to specify default values +for subsequent locations. Any previously specified defaults in the +location-list are discarded. The default string can be empty in which +case no defaults apply. + + The location `-fs:=/mnt;opts:=ro' would set the local mount point to +`/mnt' and cause mounts to be read-only by default. Defaults specified +this way are appended to, and so override, any global map defaults +given with `/defaults'). + + +File: am-utils.info, Node: Variable Expansion, Next: Selectors, Prev: Map Defaults, Up: Location Format + +3.3.2 Variable Expansion +------------------------ + +To allow generic location specifications Amd does variable expansion on +each location and also on some of the option strings. Any option or +selector appearing in the form `$"var"' is replaced by the current +value of that option or selector. For example, if the value of +`${key}' was `bin', `${autodir}' was `/a' and `${fs}' was +`${autodir}/local/${key}' then after expansion `${fs}' would have the +value `/a/local/bin'. Any environment variable can be accessed in a +similar way. + + Two pathname operators are available when expanding a variable. If +the variable name begins with `/' then only the last component of the +pathname is substituted. For example, if `${path}' was `/foo/bar' then +`${/path}' would be expanded to `bar'. Similarly, if the variable name +ends with `/' then all but the last component of the pathname is +substituted. In the previous example, `${path/}' would be expanded to +`/foo'. + + Two domain name operators are also provided. If the variable name +begins with `.' then only the domain part of the name is substituted. +For example, if `${rhost}' was `swan.doc.ic.ac.uk' then `${.rhost}' +would be expanded to `doc.ic.ac.uk'. Similarly, if the variable name +ends with `.' then only the host component is substituted. In the +previous example, `${rhost.}' would be expanded to `swan'. + + Variable expansion is a two phase process. Before a location is +parsed, all references to selectors, eg `${path}', are expanded. The +location is then parsed, selections are evaluated and option assignments +recorded. If there were no selections or they all succeeded the +location is used and the values of the following options are expanded in +the order given: SUBLINK, RFS, FS, OPTS, REMOPTS, MOUNT and UNMOUNT. + + Note that expansion of option values is done after "all" assignments +have been completed and not in a purely left to right order as is done +by the shell. This generally has the desired effect but care must be +taken if one of the options references another, in which case the +ordering can become significant. + + There are two special cases concerning variable expansion: + + 1. before a map is consulted, any selectors in the name received from + the kernel are expanded. For example, if the request from the + kernel was for `${arch}.bin' and the machine architecture was + `vax', the value given to `${key}' would be `vax.bin'. + + 2. the value of `${rhost}' is expanded and normalized before the + other options are expanded. The normalization process strips any + local sub-domain components. For example, if `${domain}' was + `Berkeley.EDU' and `${rhost}' was initially `snow.Berkeley.EDU', + after the normalization it would simply be `snow'. Hostname + normalization is currently done in a _case-dependent_ manner. + + +File: am-utils.info, Node: Selectors, Next: Map Options, Prev: Variable Expansion, Up: Location Format + +3.3.3 Selectors +--------------- + +Selectors are used to control the use of a location. It is possible to +share a mount map between many machines in such a way that filesystem +location, architecture and operating system differences are hidden from +the users. A selector of the form `arch==sun3;os==sunos4' would only +apply on Sun-3s running SunOS 4.x. + + Selectors can be negated by using `!=' instead of `=='. For example +to select a location on all non-Vax machines the selector `arch!=vax' +would be used. + + Selectors are evaluated left to right. If a selector fails then that +location is ignored. Thus the selectors form a conjunction and the +locations form a disjunction. If all the locations are ignored or +otherwise fail then Amd uses the "error" filesystem (*note Error +Filesystem::). This is equivalent to having a location `type:=error' +at the end of each mount-map entry. + + The default value of many of the selectors listed here can be +overridden by an Amd command line switch or in an Amd configuration +file. *Note Amd Configuration File::. + + The following selectors are currently implemented. + +* Menu: + +* arch Selector Variable:: +* autodir Selector Variable:: +* byte Selector Variable:: +* cluster Selector Variable:: +* domain Selector Variable:: +* dollar Selector Variable:: +* host Selector Variable:: +* hostd Selector Variable:: +* karch Selector Variable:: +* os Selector Variable:: +* osver Selector Variable:: +* full_os Selector Variable:: +* vendor Selector Variable:: + +* key Selector Variable:: +* map Selector Variable:: +* netnumber Selector Variable:: +* network Selector Variable:: +* path Selector Variable:: +* wire Selector Variable:: +* uid Selector Variable:: +* gid Selector Variable:: + +* exists Selector Function:: +* false Selector Function:: +* netgrp Selector Function:: +* netgrpd Selector Function:: +* in_network Selector Function:: +* true Selector Function:: +* xhost Selector Function:: + + +File: am-utils.info, Node: arch Selector Variable, Next: autodir Selector Variable, Prev: Selectors, Up: Selectors + +3.3.3.1 arch Selector Variable +.............................. + +The machine architecture which was automatically determined at compile +time. The architecture type can be displayed by running the command +`amd -v'. You can override this value also using the `-A' command line +option. *Note Supported Platforms::. + + +File: am-utils.info, Node: autodir Selector Variable, Next: byte Selector Variable, Prev: arch Selector Variable, Up: Selectors + +3.3.3.2 autodir Selector Variable +................................. + +The default directory under which to mount filesystems. This may be +changed by the `-a' command line option. *Note fs Option::. + + +File: am-utils.info, Node: byte Selector Variable, Next: cluster Selector Variable, Prev: autodir Selector Variable, Up: Selectors + +3.3.3.3 byte Selector Variable +.............................. + +The machine's byte ordering. This is either `little', indicating +little-endian, or `big', indicating big-endian. One possible use is to +share `rwho' databases (*note rwho servers::). Another is to share +ndbm databases, however this use can be considered a courageous +juggling act. + + +File: am-utils.info, Node: cluster Selector Variable, Next: domain Selector Variable, Prev: byte Selector Variable, Up: Selectors + +3.3.3.4 cluster Selector Variable +................................. + +This is provided as a hook for the name of the local cluster. This can +be used to decide which servers to use for copies of replicated +filesystems. `${cluster}' defaults to the value of `${domain}' unless +a different value is set with the `-C' command line option. + + +File: am-utils.info, Node: domain Selector Variable, Next: dollar Selector Variable, Prev: cluster Selector Variable, Up: Selectors + +3.3.3.5 domain Selector Variable +................................ + +The local domain name as specified by the `-d' command line option. +*Note host Selector Variable::. + + +File: am-utils.info, Node: dollar Selector Variable, Next: host Selector Variable, Prev: domain Selector Variable, Up: Selectors + +3.3.3.6 dollar Selector Variable +................................ + +This is a special variable, whose sole purpose is to produce a literal +dollar sign in the value of another variable. For example, if you have +a remote file system whose name is `/disk$s', you can mount it by +setting the remote file system variable as follows: + + rfs:=/disk${dollar}s + + +File: am-utils.info, Node: host Selector Variable, Next: hostd Selector Variable, Prev: dollar Selector Variable, Up: Selectors + +3.3.3.7 host Selector Variable +.............................. + +The local hostname as determined by gethostname(2). If no domain name +was specified on the command line and the hostname contains a period +`.' then the string before the period is used as the host name, and the +string after the period is assigned to `${domain}'. For example, if +the hostname is `styx.doc.ic.ac.uk' then `host' would be `styx' and +`domain' would be `doc.ic.ac.uk'. `hostd' would be `styx.doc.ic.ac.uk'. + + +File: am-utils.info, Node: hostd Selector Variable, Next: karch Selector Variable, Prev: host Selector Variable, Up: Selectors + +3.3.3.8 hostd Selector Variable +............................... + +This resolves to the `${host}' and `${domain}' concatenated with a `.' +inserted between them if required. If `${domain}' is an empty string +then `${host}' and `${hostd}' will be identical. + + +File: am-utils.info, Node: karch Selector Variable, Next: os Selector Variable, Prev: hostd Selector Variable, Up: Selectors + +3.3.3.9 karch Selector Variable +............................... + +This is provided as a hook for the kernel architecture. This is used on +SunOS 4 and SunOS 5, for example, to distinguish between different +`/usr/kvm' volumes. `${karch}' defaults to the "machine" value gotten +from uname(2). If the uname(2) system call is not available, the value +of `${karch}' defaults to that of `${arch}'. Finally, a different +value can be set with the `-k' command line option. + + +File: am-utils.info, Node: os Selector Variable, Next: osver Selector Variable, Prev: karch Selector Variable, Up: Selectors + +3.3.3.10 os Selector Variable +............................. + +The operating system. Like the machine architecture, this is +automatically determined at compile time. The operating system name can +be displayed by running the command `amd -v'. *Note Supported +Platforms::. + + +File: am-utils.info, Node: osver Selector Variable, Next: full_os Selector Variable, Prev: os Selector Variable, Up: Selectors + +3.3.3.11 osver Selector Variable +................................ + +The operating system version. Like the machine architecture, this is +automatically determined at compile time. The operating system name can +be displayed by running the command `amd -v'. *Note Supported +Platforms::. + + +File: am-utils.info, Node: full_os Selector Variable, Next: vendor Selector Variable, Prev: osver Selector Variable, Up: Selectors + +3.3.3.12 full_os Selector Variable +.................................. + +The full name of the operating system, including its version. This +value is automatically determined at compile time. The full operating +system name and version can be displayed by running the command `amd +-v'. *Note Supported Platforms::. + + +File: am-utils.info, Node: vendor Selector Variable, Next: key Selector Variable, Prev: full_os Selector Variable, Up: Selectors + +3.3.3.13 vendor Selector Variable +................................. + +The name of the vendor of the operating system. This value is +automatically determined at compile time. The name of the vendor can be +displayed by running the command `amd -v'. *Note Supported Platforms::. + + + + + The following selectors are also provided. Unlike the other +selectors, they vary for each lookup. Note that when the name from the +kernel is expanded prior to a map lookup, these selectors are all +defined as empty strings. + + +File: am-utils.info, Node: key Selector Variable, Next: map Selector Variable, Prev: vendor Selector Variable, Up: Selectors + +3.3.3.14 key Selector Variable +.............................. + +The name being resolved. For example, if `/home' is an automount +point, then accessing `/home/foo' would set `${key}' to the string +`foo'. The key is prefixed by the PREF option set in the parent mount +point. The default prefix is an empty string. If the prefix was +`blah/' then `${key}' would be set to `blah/foo'. + + +File: am-utils.info, Node: map Selector Variable, Next: netnumber Selector Variable, Prev: key Selector Variable, Up: Selectors + +3.3.3.15 map Selector Variable +.............................. + +The name of the mount map being used. + + +File: am-utils.info, Node: netnumber Selector Variable, Next: network Selector Variable, Prev: map Selector Variable, Up: Selectors + +3.3.3.16 netnumber Selector Variable +.................................... + +This selector is identical to the `in_network' selector function, see +*Note in_network Selector Function::. It will match either the name or +number of any network interface on which this host is connected to. +The names and numbers of all attached interfaces are available from the +output of `amd -v'. + + +File: am-utils.info, Node: network Selector Variable, Next: path Selector Variable, Prev: netnumber Selector Variable, Up: Selectors + +3.3.3.17 network Selector Variable +.................................. + +This selector is identical to the `in_network' selector function, see +*Note in_network Selector Function::. It will match either the name or +number of any network interface on which this host is connected to. +The names and numbers of all attached interfaces are available from the +output of `amd -v'. + + +File: am-utils.info, Node: path Selector Variable, Next: wire Selector Variable, Prev: network Selector Variable, Up: Selectors + +3.3.3.18 path Selector Variable +............................... + +The full pathname of the name being resolved. For example `/home/foo' +in the example above. + + +File: am-utils.info, Node: wire Selector Variable, Next: uid Selector Variable, Prev: path Selector Variable, Up: Selectors + +3.3.3.19 wire Selector Variable +............................... + +This selector is identical to the `in_network' selector function, see +*Note in_network Selector Function::. It will match either the name or +number of any network interface on which this host is connected to. +The names and numbers of all attached interfaces are available from the +output of `amd -v'. + + +File: am-utils.info, Node: uid Selector Variable, Next: gid Selector Variable, Prev: wire Selector Variable, Up: Selectors + +3.3.3.20 uid Selector Variable +.............................. + +This selector provides the numeric effective user ID (UID) of the user +which last accessed an automounted path name. This simple example shows +how floppy mounting can be assigned only to machine owners: + + floppy -type:=pcfs \ + uid==2301;host==shekel;dev:=/dev/floppy \ + uid==6712;host==titan;dev=/dev/fd0 \ + uid==0;dev:=/dev/fd0c \ + type:=error + + The example allows two machine owners to mount floppies on their +designated workstations, allows the root user to mount on any host, and +otherwise forces an error. + + +File: am-utils.info, Node: gid Selector Variable, Next: exists Selector Function, Prev: uid Selector Variable, Up: Selectors + +3.3.3.21 gid Selector Variable +.............................. + +This selector provides the numeric effective group ID (GID) of the user +which last accessed an automounted path name. + + + + The following boolean functions are selectors which take an argument +ARG. They return a value of true or false, and thus do not need to be +compared with a value. Each of these may be negated by prepending `!' +to their name. + + +File: am-utils.info, Node: exists Selector Function, Next: false Selector Function, Prev: gid Selector Variable, Up: Selectors + +3.3.3.22 exists Selector Function +................................. + +If the file listed by ARG exists (via lstat(2)), this function +evaluates to true. Otherwise it evaluates to false. + + +File: am-utils.info, Node: false Selector Function, Next: netgrp Selector Function, Prev: exists Selector Function, Up: Selectors + +3.3.3.23 false Selector Function +................................ + +Always evaluates to false. ARG is ignored. + + +File: am-utils.info, Node: netgrp Selector Function, Next: netgrpd Selector Function, Prev: false Selector Function, Up: Selectors + +3.3.3.24 netgrp Selector Function +................................. + +The argument ARG of this selector is a netgroup name followed +optionally by a comma and a host name. If the host name is not +specified, it defaults to `${host}'. If the host name (short name) is +a member of the netgroup, this selector evaluates to true. Otherwise +it evaluates to false. + + For example, suppose you have a netgroup `ppp-hosts', and for +reasons of performance, these have a local `/home' partition, while all +other clients on the faster network can access a shared home directory. +A common map to use for both might look like the following: + + home/* netgrp(ppp-hosts);type:=link;fs:=/local/${key} \ + !netgrp(ppp-hosts);type:=nfs;rhost:=serv1;rfs:=/remote/${key} + + A more complex example that takes advantage of the two argument +netgrp mount selector is given in the following scenario. Suppose one +wants to mount the local scratch space from a each host under +`scratch/' and some hosts have their scratch space in a +different path than others. Hosts in the netgroup `apple-hosts' have +their scratch space in the `/apple' path, where hosts in the netgroup +`cherry-hosts' have their scratch space in the `/cherry' path. For +hosts that are neither in the `apple-hosts' or `cherry-hosts' netgroups +we want to make a symlink pointing to nowhere but provide a descriptive +error message in the link destination: + + scratch/* netgrp(apple-hosts,${/key});type:=nfs;rhost:=${/key};\ + rfs:="/apple" \ + netgrp(cherry-hosts,${/key});type:=nfs;rhost:=${/key};\ + rfs:="/cherry" \ + type:=link;rfs:="no local partition for ${/key}" + + +File: am-utils.info, Node: netgrpd Selector Function, Next: in_network Selector Function, Prev: netgrp Selector Function, Up: Selectors + +3.3.3.25 netgrpd Selector Function +.................................. + +The argument ARG of this selector is a netgroup name followed +optionally by a comma and a host name. If the host name is not +specified, it defaults to `${hostd}'. If the host name +(fully-qualified name) is a member of the netgroup, this selector +evaluates to true. Otherwise it evaluates to false. + + The `netgrpd' function uses fully-qualified host names to match +netgroup names, while the `netgrp' function (*note netgrp Selector +Function::) uses short host names. + + +File: am-utils.info, Node: in_network Selector Function, Next: true Selector Function, Prev: netgrpd Selector Function, Up: Selectors + +3.3.3.26 in_network Selector Function +..................................... + +This selector matches against any network name or number with an +optional netmask. First, if the current host has any network interface +that is locally attached to the network specified in ARG (either via +name or number), this selector evaluates to true. + + Second, `in_network' supports a network/netmask syntax such as +`128.59.16.0/255.255.255.0', `128.59.16.0/24', +`128.59.16.0/0xffffff00', or `128.59.16.0/'. Using the last form, Amd +will match the specified network number against the default netmasks of +each of the locally attached interfaces. + + If the selector does not match, it evaluates to false. + + For example, suppose you have two servers that have an exportable +`/opt' that smaller clients can NFS mount. The two servers are say, +`serv1' on network `foo-net.site.com' and `serv2' on network +`123.4.5.0'. You can write a map to be used by all clients that will +attempt to mount the closest one as follows: + + opt in_network(foo-net.site.com);rhost:=serv1;rfs:=/opt \ + in_network(123.4.5.0);rhost:=serv2;rfs:=/opt \ + rhost:=fallback-server + + +File: am-utils.info, Node: true Selector Function, Next: xhost Selector Function, Prev: in_network Selector Function, Up: Selectors + +3.3.3.27 true Selector Function +............................... + +Always evaluates to true. ARG is ignored. + + +File: am-utils.info, Node: xhost Selector Function, Prev: true Selector Function, Up: Selectors + +3.3.3.28 xhost Selector Function +................................ + +This function compares ARG against the current hostname, similarly to +the *Note host Selector Variable::. However, this function will also +match if ARG is a CNAME (DNS Canonical Name, or alias) for the current +host's name. + + +File: am-utils.info, Node: Map Options, Prev: Selectors, Up: Location Format + +3.3.4 Map Options +----------------- + +Options are parsed concurrently with selectors. The difference is that +when an option is seen the string following the `:=' is recorded for +later use. As a minimum the TYPE option must be specified. Each +filesystem type has other options which must also be specified. *Note +Filesystem Types::, for details on the filesystem specific options. + + Superfluous option specifications are ignored and are not reported +as errors. + + The following options apply to more than one filesystem type. + +* Menu: + +* addopts Option:: +* delay Option:: +* fs Option:: +* opts Option:: +* remopts Option:: +* sublink Option:: +* type Option:: + + +File: am-utils.info, Node: addopts Option, Next: delay Option, Prev: Map Options, Up: Map Options + +3.3.4.1 addopts Option +...................... + +This option adds additional options to default options normally +specified in the `/defaults' entry or the defaults of the key entry +being processed (*note opts Option::). Normally when you specify +`opts' in both the `/defaults' and the map entry, the latter overrides +the former completely. But with `addopts' it will append the options +and override any conflicting ones. + + `addopts' also overrides the value of the `remopts' option (*note +remopts Option::), which unless specified defaults to the value of +`opts'. + + Options which start with `no' will override those with the same name +that do not start with `no' and vice verse. Special handling is given +to inverted options such as `soft' and `hard', `bg' and `fg', `ro' and +`rw', etc. + + For example, if the default options specified were + opts:=rw,nosuid,intr,rsize=1024,wsize=1024,quota,posix + + and the ones specified in a map entry were + + addopts:=grpid,suid,ro,rsize=2048,quota,nointr + + then the actual options used would be + + wsize=1024,posix,grpid,suid,ro,rsize=2048,quota,nointr + + +File: am-utils.info, Node: delay Option, Next: fs Option, Prev: addopts Option, Up: Map Options + +3.3.4.2 delay Option +.................... + +The delay, in seconds, before an attempt will be made to mount from the +current location. Auxiliary data, such as network address, file handles +and so on are computed regardless of this value. + + A delay can be used to implement the notion of primary and secondary +file servers. The secondary servers would have a delay of a few +seconds, thus giving the primary servers a chance to respond first. + + +File: am-utils.info, Node: fs Option, Next: opts Option, Prev: delay Option, Up: Map Options + +3.3.4.3 fs Option +................. + +The local mount point. The semantics of this option vary between +filesystems. + + For NFS and UFS filesystems the value of `${fs}' is used as the +local mount point. For other filesystem types it has other meanings +which are described in the section describing the respective filesystem +type. It is important that this string uniquely identifies the +filesystem being mounted. To satisfy this requirement, it should +contain the name of the host on which the filesystem is resident and the +pathname of the filesystem on the local or remote host. + + The reason for requiring the hostname is clear if replicated +filesystems are considered. If a fileserver goes down and a +replacement filesystem is mounted then the "local" mount point "must" +be different from that of the filesystem which is hung. Some encoding +of the filesystem name is required if more than one filesystem is to be +mounted from any given host. + + If the hostname is first in the path then all mounts from a +particular host will be gathered below a single directory. If that +server goes down then the hung mount points are less likely to be +accidentally referenced, for example when getcwd(3) traverses the +namespace to find the pathname of the current directory. + + The `fs' option defaults to `${autodir}/${rhost}${rfs}'. In +addition, `rhost' defaults to the local host name (`${host}') and `rfs' +defaults to the value of `${path}', which is the full path of the +requested file; `/home/foo' in the example above (*note Selectors::). +`${autodir}' defaults to `/a' but may be changed with the `-a' command +line option. Sun's automounter defaults to `/tmp_mnt'. Note that +there is no `/' between the `${rhost}' and `${rfs}' since `${rfs}' +begins with a `/'. + + +File: am-utils.info, Node: opts Option, Next: remopts Option, Prev: fs Option, Up: Map Options + +3.3.4.4 opts Option +................... + +The options to pass to the mount system call. A leading `-' is +silently ignored. The mount options supported generally correspond to +those used by mount(8) and are listed below. Some additional +pseudo-options are interpreted by Amd and are also listed. + + Unless specifically overridden, each of the system default mount +options applies. Any options not recognized are ignored. If no +options list is supplied the string `rw,defaults' is used and all the +system default mount options apply. Options which are not applicable +for a particular operating system are silently ignored. For example, +only 4.4BSD is known to implement the `compress' and `spongy' options. + +`acdirmax=N' + Set the maximum directory attribute cache timeout to N. + +`acdirmin=N' + Set the minimum directory attribute cache timeout to N. + +`acregmax=N' + Set the maximum file attribute cache timeout to N. + +`acregmin=N' + Set the minimum file attribute cache timeout to N. + +`actimeo=N' + Set the overall attribute cache timeout to N. + +`auto' +`ignore' + Ignore this mount by df(1). + +`cache' + Allow data to be cached from a remote server for this mount. + +`closesession' + For UDF mounts, close the session when unmounting. + +`compress' + Use NFS compression protocol. + +`defperm' + Ignore the permission mode bits, and default file permissions to + 0555, UID 0, and GID 0. Useful for CD-ROMs formatted as ISO-9660. + +`dev' + Allow local special devices on this filesystem. + +`dirmask=N' + For PCFS mounts, specify the maximum file permissions for + directories in the file system. See the `mask' option's + description for more details. The mask value of N can be + specified in decimal, octal, or hexadecimal. + +`dumbtimr' + Turn off the dynamic retransmit timeout estimator. This may be + useful for UDP mounts that exhibit high retry rates, since it is + possible that the dynamically estimated timeout interval is too + short. + +`extatt' + Enable extended attributes in ISO-9660 file systems. + +`fsid' + Set ID of filesystem. + +`gens' + Enable generations in ISO-9660 file systems. Generations allow + you to see all versions of a given file. + +`gmtoff=N' + For UDF mounts, set the time zone offset from UTC to N seconds, + with positive values indicating east of the Prime Meridian. If not + set, the user's current time zone will be used. + +`group=N' + For PCFS and UDF mounts, set the group of the files in the file + system to N (which can either be a group name or a GID number). + The default group is the group of the directory on which the file + system is being mounted. + +`grpid' + Use BSD directory group-id semantics. + +`int' +`intr' + Allow keyboard interrupts on hard mounts. + +`lock' + Use the NFS locking protocol (default) + +`longname' + For PCFS mounts, force Win95 long names. + +`mask=N' + For PCFS mounts, specify the maximum file permissions for files in + the file system. For example, a mask of 755 specifies that, by + default, the owner should have read, write, and execute + permissions for files, but others should only have read and + execute permissions. Only the nine low-order bits of mask are + used. The default mask is taken from the directory on which the + file system is being mounted. The mask value of N can be + specified in decimal, octal, or hexadecimal. + +`multi' + Perform multi-component lookup on files. + +`maxgroups' + Set the maximum number of groups to allow for this mount. + +`nfsv3' + Use NFS Version 3 for this mount. + +`noac' + Turn off the attribute cache. + +`noauto' + This option is used by the mount command in `/etc/fstab' or + `/etc/vfstab' and means not to mount this file system when mount -a + is used. + +`nocache' + Do not allow data to be cached from a remote server for this mount. + +`nocasetrans' + Don't do case translation. Useful for CD-ROMS formatted as + ISO-9660. + +`noconn' + Don't make a connection on datagram transports. + +`nocto' + No close-to-open consistency. + +`nodefperm' + Do not ignore the permission mode bits. Useful for CD-ROMS + formatted as ISO-9660. + +`nodev' +`nodevs' + Don't allow local special devices on this filesystem. + +`noexec' + Don't allow program execution. + +`noint' + Do not allow keyboard interrupts for this mount + +`nojoliet' + Turn off the Joliet extensions. Useful for CD-ROMS formatted as + ISO-9660. + +`nolock' + Do not use the NFS locking protocol + +`nomnttab' + This option is used internally to tell Amd that a Solaris 8 system + using mntfs is in use. + +`norrip' + Turn off using of the Rock Ridge Interchange Protocol (RRIP) + extensions to ISO-9660. + +`nosub' + Disallow mounts beneath this mount. + +`nosuid' + Don't allow set-uid or set-gid executables on this filesystem. + +`noversion' + Strip the extension `;#' from the version string of files recorded + on an ISO-9660 CD-ROM. + +`nowin95' + For PCFS mounts, completely ignore Win95 entries. + +`optionstr' + Under Solaris 8, provide the kernel a string of options to parse + and show as part of the special in-kernel mount file system. + +`overlay' + Overlay this mount on top of an existing mount, if any. + +`pgthresh=N' + Set the paging threshold to N kilobytes. + +`port=N' + Set the NFS port to N. + +`posix' + Turn on POSIX static pathconf for mounts. + +`private' + Use local locking instead of the NLM protocol, useful for IRIX 6 + only. + +`proplist' + Support property lists (ACLs) for this mount, useful primarily for + Tru64 UNIX. + +`proto=S' + Use transport protocol S for NFS (can be `"tcp"' or `"udp"'). + +`quota' + Enable quota checking on this mount. + +`rdonly' +`ro' + Mount this filesystem readonly. + +`resvport' + Use a reserved port (smaller than 1024) for remote NFS mounts. + Most systems assume that, but some allow for mounts to occur on + non-reserved ports. This causes problems when such a system + tries to NFS mount one that requires reserved ports. It is + recommended that this option always be on. + +`retrans=n' + The number of NFS retransmits made before a user error is + generated by a `soft' mounted filesystem, and before a `hard' + mounted filesystem reports `NFS server "yoyo" not responding still + trying'. + +`retry' + Set the NFS retry counter. + +`rrcaseins' + Enable the Rock Ridge Interchange Protocol (RRIP) case insensitive + extensions. Useful for CD-ROMS formatted as ISO-9660. + +`rrip' + Uses the Rock Ridge Interchange Protocol (RRIP) extensions to + ISO-9660. + +`rsize=N' + The NFS read packet size. You may need to set this if you are + using NFS/UDP through a gateway or a slow link. + +`rw' + Allow reads and writes on this filesystem. + +`sessionnr=N' + For multisession UDF mounts, use session number N when mounting. + +`shortname' + For PCFS mounts, force old DOS short names only. + +`soft' + Give up after "retrans" retransmissions. + +`spongy' + Like `soft' for status requests, and `hard' for data transfers. + +`suid' + Allow set-uid programs on this mount. + +`symttl' + Turn off the symbolic link cache time-to-live. + +`sync' + Perform synchronous filesystem operations on this mount. + +`tcp' + Use TCP/IP instead of UDP/IP, ignored if the NFS implementation + does not support TCP/IP mounts. + +`timeo=N' + The NFS timeout, in tenth-seconds, before a request is + retransmitted. + +`user=N' + For PCFS and UDF mounts, set the owner of the files in the file + system to N (which can either be a user name or a UID number). The + default owner is the owner of the directory on which the file + system is being mounted. + +`vers=N' + Use NFS protocol version number N (can be 2 or 3). + +`wsize=N' + The NFS write packet size. You may need to set this if you are + using NFS/UDP through a gateway or a slow link. + + + The following options are implemented by Amd, rather than being +passed to the kernel. + +`nounmount' + Configures the mount so that its time-to-live will never expire. + This is the default for non-network based filesystem types (such as + mounting local disks, floppies, and CD-ROMs). See also the related + unmount option. + +`ping=N' + The interval, in seconds, between keep-alive pings. When four + consecutive pings have failed the mount point is marked as hung. + This interval defaults to 30 seconds; if the ping interval is set + to zero, Amd will use the default 30-second interval. If the + interval is set to -1 (or any other negative value), no pings are + sent and the host is assumed to be always up, which can cause + unmounts to hang See the softlookup option for a better + alternative. Turning pings off can be useful in NFS-HA + (High-Availability) sites where the NFS service rarely goes down. + Setting the ping value to a large value can reduce the amount of + NFS_NULL chatter on your network considerably, especially in large + sites. + + Note that if you have multiple Amd entries using the same file + server, and each entry sets a different value of N, then each time + Amd mounts a new entry, the ping value will be re-evaluated (and + updated, turned off, or turned back on as needed). Finally, note + that NFS_NULL pings are sent for both UDP and TCP mounts, because + even a hung TCP mount can cause user processes to hang. + +`public' + Use WebNFS multi-component lookup on the public file handle + instead of the mount protocol to obtain NFS file handles, as + documented in the WebNFS Client Specification, RFC 2054. This + means that Amd will not attempt to contact the remote portmapper + or remote mountd daemon, and will only connect to the well-known + NFS port 2049 or the port specified with the port mount option, + thus making it easier to use NFS through a firewall. + +`retry=N' + The number of times to retry the mount system call. + +`softlookup' + Configures Amd's behavior with respect to already-mounted shares + from NFS fileservers that are unreachable. If softlookup is + specified, trying to access such a share will result in an error + (EIO, which is changed from the ENOENT 6.0 used to return). If it + is not specified, a regular symlink is provided and the access + will probably hang in the NFS filesystem. + + The default behavior depends on whether the mount is 'soft' or + 'hard'; softlookup can be used to change this default. This is + changed from 6.0 which always behaved as if softlookup was + specified. + +`unmount' + Configures the mount so that its time-to-live will indeed expire + (and thus may be automatically unmounted). This is also the + default for network-based filesystem types (e.g., NFS). This + option is useful for removable local media such as CD-ROMs, USB + drives, etc. so they can expire when not in use, and get unmounted + (such drives can get work out when they keep spinning). See also + the related nounmount option. + +`utimeout=N' + The interval, in seconds, that looked up and mounted map entries + are cached. After that period of time, Amd will attempt to unmount + the entries. If, however, the unmount fails (with EBUSY), then + Amd will extend the mount's time-to-live by the utimeout value + before the next unmount attempt is made. In fact the interval is + extended before the unmount is attempted, to avoid thrashing. The + default value is 120 seconds (two minutes) or as set by the `-w' + command line option. + +`xlatecookie' + Translate directory cookies between 32-long and 64-long lengths. + + + +File: am-utils.info, Node: remopts Option, Next: sublink Option, Prev: opts Option, Up: Map Options + +3.3.4.5 remopts Option +...................... + +This option has the same use as `${opts}' but applies only when the +remote host is on a non-local network. For example, when using NFS +across a gateway it is often necessary to use smaller values for the +data read and write sizes. This can simply be done by specifying the +small values in REMOPTS. When a non-local host is accessed, the +smaller sizes will automatically be used. + + Amd determines whether a host is local by examining the network +interface configuration at startup. Any interface changes made after +Amd has been started will not be noticed. The likely effect will be +that a host may incorrectly be declared non-local. + + Unless otherwise set, the value of `${remopts}' is the same as the +value of `${opts}'. + + +File: am-utils.info, Node: sublink Option, Next: type Option, Prev: remopts Option, Up: Map Options + +3.3.4.6 sublink Option +...................... + +The subdirectory within the mounted filesystem to which the reference +should point. This can be used to prevent duplicate mounts in cases +where multiple directories in the same mounted filesystem are used. + + +File: am-utils.info, Node: type Option, Prev: sublink Option, Up: Map Options + +3.3.4.7 type Option +................... + +The filesystem type to be used. *Note Filesystem Types::, for a full +description of each type. + + +File: am-utils.info, Node: Amd Command Line Options, Next: Filesystem Types, Prev: Mount Maps, Up: Top + +4 Amd Command Line Options +************************** + +Many of Amd's parameters can be set from the command line. The command +line is also used to specify automount points and maps. + + The general format of a command line is + + amd [options] [{ directory map-name [-map-options] } ...] + + For each directory and map-name given or specified in the `amd.conf' +file, Amd establishes an automount point. The "map-options" may be any +sequence of options or selectors--*note Location Format::. The +"map-options" apply only to Amd's mount point. + + `type:=toplvl;cache:=mapdefault;fs:=${map}' is the default value for +the map options. Default options for a map are read from a special +entry in the map whose key is the string `/defaults'. When default +options are given they are prepended to any options specified in the +mount-map locations as explained in *Note Map Defaults::. + + The "options" are any combination of those listed below. + + Once the command line has been parsed, the automount points are +mounted. The mount points are created if they do not already exist, in +which case they will be removed when Amd exits. Finally, Amd +disassociates itself from its controlling terminal and forks into the +background. + + Note: Even if Amd has been built with `-DDEBUG' (via `configure +--enable-debug'), it will still background itself and disassociate +itself from the controlling terminal. To use a debugger it is +necessary to specify `-D daemon' on the command line. However, even +with all of this, mounts and unmounts are performed in the background, +and Amd will always fork before doing them. Therefore, debugging what +happens closely during un/mounts is more challenging. + + _All_ of Amd's command options (save `-F' and `-T') can be specified +in the `amd.conf' file. *Note Amd Configuration File::. If Amd is +invoked without any command line options, it will default to using the +configuration file `/etc/amd.conf', if one exists. + +* Menu: + +* -a Option:: Automount directory. +* -c Option:: Cache timeout interval. +* -d Option:: Domain name. +* -k Option:: Kernel architecture. +* -l Option:: Log file. +* -n Option:: Hostname normalization. +* -o Option:: Operating system version. +* -p Option:: Output process id. +* -r Option:: Restart existing mounts. +* -t Option:: Kernel RPC timeout. +* -v Option:: Version information. +* -w Option:: Wait interval after failed unmount. +* -x Option:: Log options. +* -y Option:: NIS domain. +* -A Option:: Operating system Architecture. +* -C Option:: Cluster name. +* -D Option:: Debug flags. +* -F Option:: Amd configuration file. +* -H Option:: Show brief help. +* -O Option:: Operating system name. +* -S Option:: Lock executable pages in memory. +* -T Option:: Set tag for configuration file. + + +File: am-utils.info, Node: -a Option, Next: -c Option, Prev: Amd Command Line Options, Up: Amd Command Line Options + +4.1 `-a' DIRECTORY +================== + +Specifies the default mount directory. This option changes the variable +`${autodir}' which otherwise defaults to `/a'. For example, some sites +prefer `/amd' or `/n'. + + amd -a /amd ... + + +File: am-utils.info, Node: -c Option, Next: -d Option, Prev: -a Option, Up: Amd Command Line Options + +4.2 `-c' CACHE-INTERVAL +======================= + +Selects the period, in seconds, for which a name is cached by Amd. If +no reference is made to the volume in this period, Amd discards the +volume name to filesystem mapping. + + Once the last reference to a filesystem has been removed, Amd +attempts to unmount the filesystem. If the unmount fails the interval +is extended by a further period as specified by the `-w' command line +option or by the `utimeout' mount option. + + The default "cache-interval" is 300 seconds (five minutes). + + +File: am-utils.info, Node: -d Option, Next: -k Option, Prev: -c Option, Up: Amd Command Line Options + +4.3 `-d' DOMAIN +=============== + +Specifies the host's domain. This sets the internal variable +`${domain}' and affects the `${hostd}' variable. + + If this option is not specified and the hostname already contains the +local domain then that is used, otherwise the default value of +`${domain}' is `unknown.domain'. + + For example, if the local domain was `doc.ic.ac.uk', Amd could be +started as follows: + + amd -d doc.ic.ac.uk ... + + +File: am-utils.info, Node: -k Option, Next: -l Option, Prev: -d Option, Up: Amd Command Line Options + +4.4 `-k' KERNEL-ARCHITECTURE +============================ + +Specifies the kernel architecture of the system. This is usually the +output of `uname -m' (the "machine" value gotten from uname(2)). If +the uname(2) system call is not available, the value of `${karch}' +defaults to that of `${arch}'. + + The only effect of this option is to set the variable `${karch}'. + + This option would be used as follows: + + amd -k `arch -k` ... + + +File: am-utils.info, Node: -l Option, Next: -n Option, Prev: -k Option, Up: Amd Command Line Options + +4.5 `-l' LOG-OPTION +=================== + +Selects the form of logging to be made. Several special "log-options" +are recognized. + + 1. If "log-option" is the string `syslog', Amd will use the syslog(3) + mechanism. If your system supports syslog facilities, then the + default facility used is `LOG_DAEMON'. + + 2. When using syslog, if you wish to change the facility, append its + name to the log option name, delimited by a single colon. For + example, if "log-options" is the string `syslog:local7' then Amd + will log messages via syslog(3) using the `LOG_LOCAL7' facility. + If the facility name specified is not recognized, Amd will default + to `LOG_DAEMON'. Note: while you can use any syslog facility + available on your system, it is generally a bad idea to use those + reserved for other services such as `kern', `lpr', `cron', etc. + + 3. If "log-option" is the string `/dev/stderr', Amd will use standard + error, which is also the default target for log messages. To + implement this, Amd simulates the effect of the `/dev/fd' driver. + + Any other string is taken as a filename to use for logging. Log +messages are appended to the file if it already exists, otherwise a new +file is created. The file is opened once and then held open, rather +than being re-opened for each message. + + Normally, when long-running daemons hold an open file descriptor on a +log file, it is impossible to "rotate" the log file and compress older +logs on a daily basis. The daemon needs to be told to discard (via +close(2)) its file handle, and re-open the log file. This is done +using `amq -l' log-option. *Note Amq -l option::. + + If the `syslog' option is specified but the system does not support +syslog or if the named file cannot be opened or created, Amd will use +standard error. Error messages generated before Amd has finished +parsing the command line are printed on standard error. + + Since Amd tends to generate a lot of logging information (especially +if debugging was turned on), and due to it being an important program +running on the system, it is usually best to log to a separate disk +file. In that case Amd would be started as follows: + + amd -l /var/log/amd ... + + +File: am-utils.info, Node: -n Option, Next: -o Option, Prev: -l Option, Up: Amd Command Line Options + +4.6 `-n' +======== + +Normalizes the remote hostname before using it. Normalization is done +by replacing the value of `${rhost}' with the (generally fully +qualified) primary name returned by a hostname lookup. + + This option should be used if several names are used to refer to a +single host in a mount map. + + +File: am-utils.info, Node: -o Option, Next: -p Option, Prev: -n Option, Up: Amd Command Line Options + +4.7 `-o' OP-SYS-VER +=================== + +Overrides the compiled-in version number of the operating system, with +OP-SYS-VER. Useful when the built-in version is not desired for +backward compatibility reasons. For example, if the built-in version is +`2.5.1', you can override it to `5.5.1', and use older maps that were +written with the latter in mind. + + +File: am-utils.info, Node: -p Option, Next: -r Option, Prev: -o Option, Up: Amd Command Line Options + +4.8 `-p' +======== + +Causes Amd's process id to be printed on standard output. This can be +redirected to a suitable file for use with kill: + + amd -p > /var/run/amd.pid ... + + This option only has an affect if Amd is running in daemon mode. If +Amd is started with the `-D daemon' debug flag, this option is ignored. + + +File: am-utils.info, Node: -r Option, Next: -t Option, Prev: -p Option, Up: Amd Command Line Options + +4.9 `-r' +======== + +Tells Amd to restart existing mounts (*note Inheritance Filesystem::). + + +File: am-utils.info, Node: -t Option, Next: -v Option, Prev: -r Option, Up: Amd Command Line Options + +4.10 `-t' TIMEOUT.RETRANSMIT +============================ + +Specifies the RPC "timeout" interval and the "retransmit" counter used +by the kernel to communicate to Amd. These are used to set the `timeo' +and `retrans' mount options, respectively. The default timeout is 0.8 +seconds, and the default number of retransmissions is 11. + + Amd relies on the kernel RPC retransmit mechanism to trigger mount +retries. The values of these parameters change the overall retry +interval. Too long an interval gives poor interactive response; too +short an interval causes excessive retries. + + +File: am-utils.info, Node: -v Option, Next: -w Option, Prev: -t Option, Up: Amd Command Line Options + +4.11 `-v' +========= + +Print version information on standard error and then exit. The output +is of the form: + + Copyright (c) 1997-1999 Erez Zadok + Copyright (c) 1990 Jan-Simon Pendry + Copyright (c) 1990 Imperial College of Science, Technology & Medicine + Copyright (c) 1990 The Regents of the University of California. + am-utils version 6.0a15 (build 61). + Built by ezk@example.com on date Wed Oct 22 15:21:03 EDT 1997. + cpu=sparc (big-endian), arch=sun4, karch=sun4u. + full_os=solaris2.5.1, os=sos5, osver=5.5.1, vendor=sun. + Map support for: root, passwd, union, nisplus, nis, ndbm, file, error. + AMFS: nfs, link, nfsx, nfsl, host, linkx, program, union, inherit, + ufs, lofs, hsfs, pcfs, auto, direct, toplvl, error. + FS: autofs, cachefs, cdfs, lofs, nfs, nfs3, pcfs, tfs, tmpfs, udf, ufs. + Network 1: wire="mcl-lab-net.cs.columbia.edu" (netnumber=128.59.13). + Network 2: wire="14-net.cs.columbia.edu" (netnumber=128.59.14). + Network 3: wire="old-net.cs.columbia.edu" (netnumber=128.59.16). + + The information includes the version number, number of times Amd was +compiled on the local system, release date and name of the release. +Following come the cpu type, byte ordering, and the architecture and +kernel architecture as `${arch}' and `${karch}', respectively. The +next line lists the operating system full name, short name, version, +and vendor. These four values correspond to the variables +`${full_os}', `${os}', `${osver}', and `${vendor}', respectively. +*Note Supported Platforms::. + + Then come a list of map types supported, filesystems internally +supported by Amd (AMFS), and generic filesystems available (FS). +Finally all known networks (if any) of this host are listed by name and +number. They are available via the variables `${wire}' or +`${network}', and `${netnumber}' (*note Selectors::) or the `in_network' +selector function (*note in_network Selector Function::). + + +File: am-utils.info, Node: -w Option, Next: -x Option, Prev: -v Option, Up: Amd Command Line Options + +4.12 `-w' WAIT-TIMEOUT +====================== + +Selects the interval in seconds between unmount attempts after the +initial time-to-live has expired. + + This defaults to 120 seconds (two minutes). + + +File: am-utils.info, Node: -x Option, Next: -y Option, Prev: -w Option, Up: Amd Command Line Options + +4.13 `-x' OPTS +============== + +Specifies the type and verbosity of log messages. "opts" is a comma +separated list selected from the following options: + +`fatal' + Fatal errors (cannot be turned off) + +`error' + Non-fatal errors (cannot be turned off) + +`user' + Non-fatal user errors + +`warn' + Recoverable errors + +`warning' + Alias for `warn' + +`info' + Information messages + +`map' + Mount map usage + +`stats' + Additional statistics + +`all' + All of the above + +`defaults' + An alias for "fatal,error,user,warning,info". + + Initially a set of default logging flags is enabled. This is as if +`-x defaults' or `-x fatal,error,user,warning,info' had been selected. +The command line is parsed and logging is controlled by the `-x' +option. The very first set of logging flags is saved and can not be +subsequently disabled using Amq. This default set of options is useful +for general production use. + + The `info' messages include details of what is mounted and unmounted +and when filesystems have timed out. If you want to have the default +set of messages without the `info' messages then you simply need `-x +noinfo'. The messages given by `user' relate to errors in the mount +maps, so these are useful when new maps are installed. The following +table lists the syslog priorities used for each of the message types. + +`fatal' + `LOG_CRIT' + +`error' + `LOG_ERR' + +`user' + `LOG_WARNING' + +`warning' + `LOG_WARNING' + +`info' + `LOG_INFO' + +`debug' + `LOG_DEBUG' + +`map' + `LOG_DEBUG' + +`stats' + `LOG_INFO' + + The options can be prefixed by the string `no' to indicate that this +option should be turned off. For example, to obtain all but `info' +messages the option `-x all,noinfo' would be used. + + If Amd was built with debugging enabled the `debug' option is +automatically enabled regardless of the command line options. + + +File: am-utils.info, Node: -y Option, Next: -A Option, Prev: -x Option, Up: Amd Command Line Options + +4.14 `-y' NIS-DOMAIN +==================== + +Selects an alternate NIS domain. This is useful for debugging and +cross-domain shared mounting. If this flag is specified, Amd +immediately attempts to bind to a server for this domain. + + +File: am-utils.info, Node: -A Option, Next: -C Option, Prev: -y Option, Up: Amd Command Line Options + +4.15 `-A' ARCHITECTURE +====================== + +Specifies the OS architecture of the system. The only effect of this +option is to set the variable `${arch}'. + + This option would be used as follows: + + amd -A i386 ... + + +File: am-utils.info, Node: -C Option, Next: -D Option, Prev: -A Option, Up: Amd Command Line Options + +4.16 `-C' CLUSTER-NAME +====================== + +Specifies the name of the cluster of which the local machine is a +member. The only effect is to set the variable `${cluster}'. The +"cluster-name" is will usually obtained by running another command +which uses a database to map the local hostname into a cluster name. +`${cluster}' can then be used as a selector to restrict mounting of +replicated data. If this option is not given, `${cluster}' has the +same value as `${domain}'. This would be used as follows: + + amd -C `clustername` ... + + +File: am-utils.info, Node: -D Option, Next: -F Option, Prev: -C Option, Up: Amd Command Line Options + +4.17 `-D' OPTS +============== + +Controls the verbosity and coverage of the debugging trace; "opts" is a +comma separated list of debugging options. The `-D' option is only +available if Amd was compiled with `-DDEBUG', or configured with +`configure --enable-debug'. The memory debugging facilities (`mem') +are only available if Amd was compiled with `-DDEBUG_MEM' (in addition +to `-DDEBUG'), or configured with `configure --enable-debug=mem'. + + The most common options to use are `-D trace' and `-D test' (which +turns on all the useful debug options). As usual, every option can be +prefixed with `no' to turn it off. + +`all' + all options (excluding hrtime and mtab) + +`defaults' + "sensible" default options (all-excluding hrtime, mtab, and + xdrtrace) + +`test' + full debug options plus mtab,nodaemon,nofork,noamq + +`amq' + register Amd with the RPC portmapper, for Amq + +`daemon' + enter daemon mode + +`fork' + fork child worker (hlfsd only) + +`full' + program trace + +`hrtime' + print high resolution time stamps (only if syslog(3) is not used) + +`info' + info service specific debugging (hesiod, nis, etc.) In the case of + hesiod maps, turns on the hesiod RES_DEBUG internal debugging + option. + +`mem' + trace memory allocations. Needs to be explicitly enabled at + compile time with -enable-debug=mem. + +`mtab' + use local mount-table file (defaults to `/tmp/mtab', *note + debug_mtab_file Parameter::) + +`readdir' + show readdir progress + +`str' + debug string munging + +`trace' + trace RPC protocol and NFS mount arguments + +`xdrtrace' + trace XDR routines + + You may also refer to the program source for a more detailed +explanation of the available options. + + +File: am-utils.info, Node: -F Option, Next: -H Option, Prev: -D Option, Up: Amd Command Line Options + +4.18 `-F' CONF-FILE +=================== + +Specify an Amd configuration file CONF-FILE to use. For a description +of the format and syntax, *note Amd Configuration File::. This +configuration file is used to specify any options in lieu of typing +many of them on the command line. The `amd.conf' file includes +directives for every command line option Amd has, and many more that +are only available via the configuration file facility. The +configuration file specified by this option is processed after all other +options had been processed, regardless of the actual location of this +option on the command line. + + +File: am-utils.info, Node: -H Option, Next: -O Option, Prev: -F Option, Up: Amd Command Line Options + +4.19 `-H' +========= + +Print a brief help and usage string. + + +File: am-utils.info, Node: -O Option, Next: -S Option, Prev: -H Option, Up: Amd Command Line Options + +4.20 `-O' OP-SYS-NAME +===================== + +Overrides the compiled-in name of the operating system, with +OP-SYS-NAME. Useful when the built-in name is not desired for backward +compatibility reasons. For example, if the build in name is `sunos5', +you can override it to the old name `sos5', and use older maps which +were written with the latter in mind. + + +File: am-utils.info, Node: -S Option, Next: -T Option, Prev: -O Option, Up: Amd Command Line Options + +4.21 `-S' +========= + +Do _not_ lock the running executable pages of Amd into memory. To +improve Amd's performance, systems that support the plock(3) or +mlockall(2) call lock the Amd process into memory. This way there is +less chance the operating system will schedule, page out, and swap the +Amd process as needed. This tends to improve Amd's performance, at the +cost of reserving the memory used by the Amd process (making it +unavailable for other processes). If this behavior is not desired, use +the `-S' option. + + +File: am-utils.info, Node: -T Option, Prev: -S Option, Up: Amd Command Line Options + +4.22 `-T' TAG +============= + +Specify a tag to use with `amd.conf'. All map entries tagged with TAG +will be processed. Map entries that are not tagged are always +processed. Map entries that are tagged with a tag other than TAG will +not be processed. + + +File: am-utils.info, Node: Filesystem Types, Next: Amd Configuration File, Prev: Amd Command Line Options, Up: Top + +5 Filesystem Types +****************** + +To mount a volume, Amd must be told the type of filesystem to be used. +Each filesystem type typically requires additional information such as +the fileserver name for NFS. + + From the point of view of Amd, a "filesystem" is anything that can +resolve an incoming name lookup. An important feature is support for +multiple filesystem types. Some of these filesystems are implemented +in the local kernel and some on remote fileservers, whilst the others +are implemented internally by Amd. + + The two common filesystem types are UFS and NFS. Four other user +accessible filesystems (`link', `program', `auto' and `direct') are +also implemented internally by Amd and these are described below. +There are two additional filesystem types internal to Amd which are not +directly accessible to the user (`inherit' and `error'). Their use is +described since they may still have an effect visible to the user. + +* Menu: + +* Network Filesystem:: A single NFS filesystem. +* Network Host Filesystem:: NFS mount a host's entire export tree. +* Network Filesystem Group:: An atomic group of NFS filesystems. +* Unix Filesystem:: Native disk filesystem. +* Caching Filesystem:: Caching from remote server filesystem. +* CD-ROM Filesystem:: ISO9660 CD ROM. +* UDF Filesystem:: Universal Disk Format filesystem. +* Loopback Filesystem:: Local loopback-mount filesystem. +* Memory/RAM Filesystem:: A memory or RAM-based filesystem. +* Null Filesystem:: 4.4BSD's loopback-mount filesystem. +* Floppy Filesystem:: MS-DOS Floppy filesystem. +* Translucent Filesystem:: The directory merging filesystem. +* Shared Memory+Swap Filesystem:: Sun's tmpfs filesystem. +* User ID Mapping Filesystem:: 4.4BSD's umapfs filesystem. +* Program Filesystem:: Generic Program mounts. +* Symbolic Link Filesystem:: Local link. +* Symbolic Link Filesystem II:: Local link referencing existing filesystem. +* NFS-Link Filesystem:: Link if path exists, NFS otherwise. +* Automount Filesystem:: +* Direct Automount Filesystem:: +* Union Filesystem:: +* Error Filesystem:: +* Top-level Filesystem:: +* Root Filesystem:: +* Inheritance Filesystem:: + + +File: am-utils.info, Node: Network Filesystem, Next: Network Host Filesystem, Prev: Filesystem Types, Up: Filesystem Types + +5.1 Network Filesystem (`nfs') +============================== + +The "nfs" (`type:=nfs') filesystem type provides access to Sun's NFS. + +The following options must be specified: + +`rhost' + the remote fileserver. This must be an entry in the hosts + database. IP addresses are not accepted. The default value is + taken from the local host name (`${host}') if no other value is + specified. + +`rfs' + the remote filesystem. If no value is specified for this option, + an internal default of `${path}' is used. + + NFS mounts require a two stage process. First, the "file handle" of +the remote file system must be obtained from the server. Then a mount +system call must be done on the local system. Amd keeps a cache of +file handles for remote file systems. The cache entries have a +lifetime of a few minutes. + + If a required file handle is not in the cache, Amd sends a request +to the remote server to obtain it. + + Historically, this documentation has maintained that Amd will try +all the locations in parallel and use the first one which responds with +a valid file handle. This has not been the case for quite some time, +however. Instead, Amd will go through each location, one by one, and +will only skip to the next one if the previous one either fails or +times out. + +An NFS entry might be: + + jsp host!=charm;type:=nfs;rhost:=charm;rfs:=/home/charm;sublink:=jsp + + The mount system call and any unmount attempts are always done in a +new task to avoid the possibility of blocking Amd. + + +File: am-utils.info, Node: Network Host Filesystem, Next: Network Filesystem Group, Prev: Network Filesystem, Up: Filesystem Types + +5.2 Network Host Filesystem (`host') +==================================== + +The "host" (`type:=host') filesystem allows access to the entire export +tree of an NFS server. The implementation is layered above the `nfs' +implementation so keep-alives work in the same way. The only option +which needs to be specified is `rhost' which is the name of the +fileserver to mount. + + The `host' filesystem type works by querying the mount daemon on the +given fileserver to obtain its export list. Amd then obtains +filehandles for each of the exported filesystems. Any errors at this +stage cause that particular filesystem to be ignored. Finally each +filesystem is mounted. Again, errors are logged but ignored. One +common reason for mounts to fail is that the mount point does not exist. +Although Amd attempts to automatically create the mount point, it may +be on a remote filesystem to which Amd does not have write permission. + + When an attempt to unmount a `host' filesystem mount fails, Amd +remounts any filesystems which had successfully been unmounted. To do +this Amd queries the mount daemon again and obtains a fresh copy of the +export list. Amd then tries to mount any exported filesystems which +are not currently mounted. + + Sun's automounter provides a special `-hosts' map. To achieve the +same effect with Amd requires two steps. First a mount map must be +created as follows: + + * type:=host;rhost:=${key};fs:=${autodir}/${rhost}/root + +and then start Amd with the following command + + amd /net net.map + +where `net.map' is the name of map described above. Note that the +value of `${fs}' is overridden in the map. This is done to avoid a +clash between the mount tree and any other filesystem already mounted +from the same fileserver. + + If different mount options are needed for different hosts then +additional entries can be added to the map, for example + + host2 opts:=ro,nosuid,soft + +would soft mount `host2' read-only. + + +File: am-utils.info, Node: Network Filesystem Group, Next: Unix Filesystem, Prev: Network Host Filesystem, Up: Filesystem Types + +5.3 Network Filesystem Group (`nfsx') +===================================== + +The "nfsx" (`type:=nfsx') filesystem allows a group of filesystems to +be mounted from a single NFS server. The implementation is layered +above the `nfs' implementation so keep-alives work in the same way. + + _WARNING_: `nfsx' is meant to be a "last resort" kind of solution. +It is racy and poorly supported. The authors _highly_ recommend that +other solutions be considered before relying on it. + + The options are the same as for the `nfs' filesystem with one +difference for `rfs', as explained below. + +The following options should be specified: + +`rhost' + the remote fileserver. The default value is taken from the local + host name (`${host}') if no other value is specified. + +`rfs' + is a list of filesystems to mount, and must be specified. The + list is in the form of a comma separated strings. + +For example: + + pub type:=nfsx;rhost:=gould;\ + rfs:=/public,/,graphics,usenet;fs:=${autodir}/${rhost}/root + + The first string defines the root of the tree, and is applied as a +prefix to the remaining members of the list which define the individual +filesystems. The first string is _not_ used as a filesystem name. A +serial operation is used to determine the local mount points to ensure +a consistent layout of a tree of mounts. + + Here, the _three_ filesystems, `/public', `/public/graphics' and +`/public/usenet', would be mounted. + + A local mount point, `${fs}', _must_ be specified. The default +local mount point will not work correctly in the general case. A +suggestion is to use `fs:=${autodir}/${rhost}/root'. + + +File: am-utils.info, Node: Unix Filesystem, Next: Caching Filesystem, Prev: Network Filesystem Group, Up: Filesystem Types + +5.4 Unix Filesystem (`ufs', `xfs', or `efs') +============================================ + +The "ufs" (`type:=ufs') filesystem type provides access to the system's +standard disk filesystem--usually a derivative of the Berkeley Fast +Filesystem. + +The following option must be specified: + +`dev' + the block special device to be mounted. + + A UFS entry might be: + + jsp host==charm;type:=ufs;dev:=/dev/sd0d;sublink:=jsp + + UFS is the default Unix disk-based file system, which Am-utils picks +up during the autoconfiguration phase. Some systems have more than one +type, such as IRIX, that comes with EFS (Extent File System) and XFS +(Extended File System). In those cases, you may explicitly set the file +system type, by using entries such: + + ez1 type:=efs;dev:=/dev/xd0a + ez2 type:=xfs;dev:=/dev/sd3c + + The UFS/XFS/EFS filesystems are never timed out by default, i.e. they +will never be unmounted by Amd. If automatic unmounting is desired, the +"unmount" option should be added to the mount options for the entry. + + +File: am-utils.info, Node: Caching Filesystem, Next: CD-ROM Filesystem, Prev: Unix Filesystem, Up: Filesystem Types + +5.5 Caching Filesystem (`cachefs') +================================== + +The "cachefs" (`type:=cachefs') filesystem caches files from one +location onto another, presumably providing faster access. It is +particularly useful to cache from a larger and remote (slower) NFS +partition to a smaller and local (faster) UFS directory. + +The following options must be specified: + +`cachedir' + the directory where the cache is stored. + +`rfs' + the path name to the "back file system" to be cached from. + +`fs' + the "front file system" mount point to the cached files, where Amd + will set a symbolic link pointing to. + + A CacheFS entry for, say, the `/import' Amd mount point, might be: + + copt type:=cachefs;cachedir:=/cache;rfs:=/import/opt;fs:=/n/import/copt + + Access to the pathname `/import/copt' will follow a symbolic link to +`/n/import/copt'. The latter is the mount point for a caching file +system, that caches from `/import/opt' to `/cache'. + + The cachefs filesystem is never timed out by default, i.e. it will +never be unmounted by Amd. If automatic unmounting is desired, the +"unmount" option should be added to the mount options for the entry. + + Caveats: + 1. This file system is currently only implemented for Solaris 2.x! + + 2. Before being used for the first time, the cache directory must be + initialized with `cfsadmin -c CACHEDIR'. See the manual page for + cfsadmin(1M) for more information. + + 3. The "back file system" mounted must be a complete file system, not + a subdirectory thereof; otherwise you will get an error "Invalid + Argument". + + 4. If Amd aborts abnormally, the state of the cache may be + inconsistent, requiring running the command `fsck -F cachefs + CACHEDIR'. Otherwise you will get the error "No Space Left on + Device". + + +File: am-utils.info, Node: CD-ROM Filesystem, Next: UDF Filesystem, Prev: Caching Filesystem, Up: Filesystem Types + +5.6 CD-ROM Filesystem (`cdfs') +============================== + +The "cdfs" (`type:=cdfs') filesystem mounts a CD-ROM with an ISO9660 +format filesystem on it. + +The following option must be specified: + +`dev' + the block special device to be mounted. + + Some operating systems will fail to mount read-only CDs unless the +`ro' option is specified. A cdfs entry might be: + + cdfs os==sunos4;type:=cdfs;dev:=/dev/sr0 \ + os==sunos5;addopts:=ro;type:=cdfs;dev:=/dev/dsk/c0t6d0s2 + + +File: am-utils.info, Node: UDF Filesystem, Next: Loopback Filesystem, Prev: CD-ROM Filesystem, Up: Filesystem Types + +5.7 CD-ROM Filesystem (`udf') +============================= + +The "udf" (`type:=udf') filesystem mounts media with a Universal Disk +Format (UDF) filesystem on it, e.g., a video DVD. + +The following option must be specified: + +`dev' + the block special device to be mounted. + + Some operating systems will fail to mount read-only media unless the +`ro' option is specified. A udf entry might be: + + udf os==sunos4;type:=udf;dev:=/dev/sr0 \ + os==sunos5;addopts:=ro;type:=udf;dev:=/dev/dsk/c0t6d0s2 + + +File: am-utils.info, Node: Loopback Filesystem, Next: Memory/RAM Filesystem, Prev: UDF Filesystem, Up: Filesystem Types + +5.8 Loopback Filesystem (`lofs') +================================ + +The "lofs" (`type:=lofs') filesystem is also called the loopback +filesystem. It mounts a local directory on another, thus providing +mount-time binding to another location (unlike symbolic links). + + The loopback filesystem is particularly useful within the context of +a chroot-ed directory (via chroot(2)), to provide access to directories +otherwise inaccessible. + +The following option must be specified: + +`rfs' + the pathname to be mounted on top of `${fs}'. + + Usually, the FTP server runs in a chroot-ed environment, for security +reasons. In this example, lofs is used to provide a subdirectory within +a user's home directory, also available for public ftp. + + lofs type:=lofs;rfs:=/home/ezk/myftpdir;fs:=/usr/ftp/pub/ezk + + +File: am-utils.info, Node: Memory/RAM Filesystem, Next: Null Filesystem, Prev: Loopback Filesystem, Up: Filesystem Types + +5.9 Memory/RAM Filesystem (`mfs') +================================= + +The "mfs" (`type:=mfs') filesystem is available in 4.4BSD, Linux, and +other systems. It creates a filesystem in a portion of the system's +memory, thus providing very fast file (volatile) access. + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: Null Filesystem, Next: Floppy Filesystem, Prev: Memory/RAM Filesystem, Up: Filesystem Types + +5.10 Null Filesystem (`nullfs') +=============================== + +The "nullfs" (`type:=nullfs') filesystem is available from 4.4BSD, and +is very similar to the loopback filesystem, "lofs". + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: Floppy Filesystem, Next: Translucent Filesystem, Prev: Null Filesystem, Up: Filesystem Types + +5.11 Floppy Filesystem (`pcfs') +=============================== + +The "pcfs" (`type:=pcfs') filesystem mounts a floppy previously +formatted for the MS-DOS format. + +The following option must be specified: + +`dev' + the block special device to be mounted. + + A pcfs entry might be: + + pcfs os==sunos4;type:=pcfs;dev:=/dev/fd0 \ + os==sunos5;type:=pcfs;dev:=/dev/diskette + + +File: am-utils.info, Node: Translucent Filesystem, Next: Shared Memory+Swap Filesystem, Prev: Floppy Filesystem, Up: Filesystem Types + +5.12 Translucent Filesystem (`tfs') +=================================== + +The "tfs" (`type:=tfs') filesystem is an older version of the 4.4BSD +"unionfs". + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: Shared Memory+Swap Filesystem, Next: User ID Mapping Filesystem, Prev: Translucent Filesystem, Up: Filesystem Types + +5.13 Shared Memory+Swap Filesystem (`tmpfs') +============================================ + +The "tmpfs" (`type:=tmpfs') filesystem shares memory between a the swap +device and the rest of the system. It is generally used to provide a +fast access `/tmp' directory, one that uses memory that is otherwise +unused. This filesystem is available in SunOS 4.x and 5.x. + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: User ID Mapping Filesystem, Next: Program Filesystem, Prev: Shared Memory+Swap Filesystem, Up: Filesystem Types + +5.14 User ID Mapping Filesystem (`umapfs') +========================================== + +The "umapfs" (`type:=umapfs') filesystem maps User IDs of file +ownership, and is available from 4.4BSD. + + XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! + + +File: am-utils.info, Node: Program Filesystem, Next: Symbolic Link Filesystem, Prev: User ID Mapping Filesystem, Up: Filesystem Types + +5.15 Program Filesystem (`program') +=================================== + +The "program" (`type:=program') filesystem type allows a program to be +run whenever a mount or unmount is required. This allows easy addition +of support for other filesystem types, such as MIT's Remote Virtual +Disk (RVD) which has a programmatic interface via the commands +`rvdmount' and `rvdunmount'. + +Both of the following options must be specified: + +`mount' + the program which will perform the mount. + +`unmount' + +`umount' + the program which will perform the unmount. For convenience, you + may use either `unmount' or `umount' but not both. If neither is + defined, Amd will default to `umount ${fs}' (the actual unmount + program pathname will be automatically determined at the time GNU + `configure' runs.) + + The exit code from these two programs is interpreted as a Unix error +code. As usual, exit code zero indicates success. To execute the +program, Amd splits the string on whitespace to create an array of +substrings. Single quotes `'' can be used to quote whitespace if that +is required in an argument. There is no way to escape or change the +single quote character. + + To run e.g. the program `rvdmount' with a host name and filesystem as +arguments, it would be specified by +`fs:=${autodir}${path};type:=program;mount:="/etc/rvdmount rvdmount +fserver ${fs}";unmount:="/etc/rdvumount rvdumount ${fs}"'. + + The first element in the array is taken as the pathname of the +program to execute. The other members of the array form the argument +vector to be passed to the program, "including argument zero". The +array is exactly the same as the array passed to the execv() system call +(man execv for details). The split string must have at least two +elements. The programs are directly executed by Amd, not via a shell. +Therefore, if a script is to be used as a mount/umount program, it +"must" begin with a `#!' interpreter specification. + + Often, this program mount type is used for Samba mounts, where you +need a double slash in pathnames. However, Amd normalizes sequences of +slashes into one slash. Therefore, you must use an escaped slash, +preceded by an escaped backslash. So to get a double slash in the +mount command, you need the eight character sequence `\\\/\\\/' in your +map. For example: + + `mount="/sbin/mount mount -r -t smbfs -o-N,-Ihostname +\\\/\\\/guest@venus/mp3"' + + If a filesystem type is to be heavily used, it may be worthwhile +adding a new filesystem type into Amd, but for most uses the program +filesystem should suffice. + + When the program is run, standard input and standard error are +inherited from the current values used by Amd. Standard output is a +duplicate of standard error. The value specified with the `-l' command +line option has no effect on standard error. + + Amd guarantees that the mountpoint will be created before calling +the mount program, and that it will be removed after the umount program +returns success. + + +File: am-utils.info, Node: Symbolic Link Filesystem, Next: Symbolic Link Filesystem II, Prev: Program Filesystem, Up: Filesystem Types + +5.16 Symbolic Link Filesystem (`link') +====================================== + +Each filesystem type creates a symbolic link to point from the volume +name to the physical mount point. The `link' filesystem does the same +without any other side effects. This allows any part of the machines +name space to be accessed via Amd. + + One common use for the symlink filesystem is `/homes' which can be +made to contain an entry for each user which points to their +(auto-mounted) home directory. Although this may seem rather expensive, +it provides a great deal of administrative flexibility. + +The following option must be defined: + +`fs' + The value of FS option specifies the destination of the link, as + modified by the SUBLINK option. If SUBLINK is non-null, it is + appended to `${fs}'`/' and the resulting string is used as the + target. + + The `link' filesystem can be thought of as identical to the `ufs' +filesystem but without actually mounting anything. + + An example entry might be: + + jsp host==charm;type:=link;fs:=/home/charm;sublink:=jsp + which would return a symbolic link pointing to `/home/charm/jsp'. + + +File: am-utils.info, Node: Symbolic Link Filesystem II, Next: NFS-Link Filesystem, Prev: Symbolic Link Filesystem, Up: Filesystem Types + +5.17 Symbolic Link Filesystem II (`linkx') +========================================== + +The "linkx" (`type:=linkx') filesystem type is identical to `link' with +the exception that the target of the link must exist. Existence is +checked with the lstat(2) system call. + + The `linkx' filesystem type is particularly useful for wildcard map +entries. In this case, a list of possible targets can be given and Amd +will choose the first one which exists on the local machine. + + +File: am-utils.info, Node: NFS-Link Filesystem, Next: Automount Filesystem, Prev: Symbolic Link Filesystem II, Up: Filesystem Types + +5.18 NFS-Link Filesystem (`nfsl') +================================= + +The "nfsl" (`type:=nfsl') filesystem type is a combination of two +others: `link' and `nfs'. If the local host name is equal to the value +of `${rhost}' _and_ the target pathname listed in `${fs}' exists, +`nfsl' will behave exactly as `type:=link', and refer to the target as +a symbolic link. If the local host name is not equal to the value of +`${rhost}', or if the target of the link does not exist, Amd will treat +it as `type:=nfs', and will mount a remote pathname for it. + + The `nfsl' filesystem type is particularly useful as a shorthand for +the more cumbersome and yet one of the most popular Amd entries. For +example, you can simplify all map entries that look like: + + zing -fs:=/n/shekel/u/zing \ + host!=shekel;type:=nfs;rhost:=shekel;rfs:=${fs} \ + host==shekel;type:=link + + or + + zing -fs:=/n/shekel/u/zing \ + exists(${fs});type:=link \ + !exists(${fs});type:=nfs;rhost:=shekel;rfs:=${fs} + + into a shorter form + + zing type:=nfsl;fs:=/n/shekel/u/zing;rhost:=shekel;rfs:=${fs} + + Not just does it make the maps smaller and simpler, but it avoids +possible mistakes that often happen when forgetting to set up the two +entries (one for `type:=nfs' and the other for `type:=link') necessary +to perform transparent mounts of existing or remote mounts. + + +File: am-utils.info, Node: Automount Filesystem, Next: Direct Automount Filesystem, Prev: NFS-Link Filesystem, Up: Filesystem Types + +5.19 Automount Filesystem (`auto') +================================== + +The "auto" (`type:=auto') filesystem type creates a new automount point +below an existing automount point. Top-level automount points appear +as system mount points. An automount mount point can also appear as a +sub-directory of an existing automount point. This allows some +additional structure to be added, for example to mimic the mount tree of +another machine. + + The following options may be specified: + +`cache' + specifies whether the data in this mount-map should be cached. + The default value is `none', in which case no caching is done in + order to conserve memory. + + However, better performance and reliability can be obtained by + caching some or all of a mount-map. + + If the cache option specifies `all', the entire map is enumerated + when the mount point is created. + + If the cache option specifies `inc', caching is done incrementally + as and when data is required. Some map types do not support cache + mode `all', in which case `inc' is used whenever `all' is + requested. + + Caching can be entirely disabled by using cache mode `none'. + + If the cache option specifies `regexp' then the entire map will be + enumerated and each key will be treated as an egrep-style regular + expression. The order in which a cached map is searched does not + correspond to the ordering in the source map so the regular + expressions should be mutually exclusive to avoid confusion. + + Each mount map type has a default cache type, usually `inc', which + can be selected by specifying `mapdefault'. + + The cache mode for a mount map can only be selected on the command + line. Starting Amd with the command: + + amd /homes hesiod.homes -cache:=inc + + will cause `/homes' to be automounted using the "Hesiod" name + server with local incremental caching of all successfully resolved + names. + + All cached data is forgotten whenever Amd receives a `SIGHUP' + signal and, if cache `all' mode was selected, the cache will be + reloaded. This can be used to inform Amd that a map has been + updated. In addition, whenever a cache lookup fails and Amd needs + to examine a map, the map's modify time is examined. If the cache + is out of date with respect to the map then it is flushed as if a + `SIGHUP' had been received. + + An additional option (`sync') may be specified to force Amd to + check the map's modify time whenever a cached entry is being used. + For example, an incremental, synchronized cache would be created + by the following command: + + amd /homes hesiod.homes -cache:=inc,sync + +`fs' + specifies the name of the mount map to use for the new mount point. + + Arguably this should have been specified with the `${rfs}' option + but we are now stuck with it due to historical accident. + +`pref' + alters the name that is looked up in the mount map. If `${pref}', + the "prefix", is non-null then it is prepended to the name + requested by the kernel "before" the map is searched. The default + prefix is the prefix of the parent map (if any) with name of the + auto node appended to it. That means if you want no prefix you + must say so in the map: `pref:=null'. + +`opts' + Normally, `auto' style maps are not browsable even if you turn on + directory browsability (*note browsable_dirs Parameter::). To + enable browsing entries in `auto' maps, specify `opts:=browsable' + or `opts:=fullybrowsable' in the description of this map. + + + The server `dylan.doc.ic.ac.uk' has two user disks: `/dev/dsk/2s0' +and `/dev/dsk/5s0'. These are accessed as `/home/dylan/dk2' and +`/home/dylan/dk5' respectively. Since `/home' is already an automount +point, this naming is achieved with the following map entries: + + dylan type:=auto;fs:=${map};pref:=${key}/ + dylan/dk2 type:=ufs;dev:=/dev/dsk/2s0 + dylan/dk5 type:=ufs;dev:=/dev/dsk/5s0 + + +File: am-utils.info, Node: Direct Automount Filesystem, Next: Union Filesystem, Prev: Automount Filesystem, Up: Filesystem Types + +5.20 Direct Automount Filesystem (`direct') +=========================================== + +The "direct" (`type:=direct') filesystem is almost identical to the +automount filesystem. Instead of appearing to be a directory of mount +points, it appears as a symbolic link to a mounted filesystem. The +mount is done at the time the link is accessed. *Note Automount +Filesystem::, for a list of required options. + + Direct automount points are created by specifying the `direct' +filesystem type on the command line: + + amd ... /usr/man auto.direct -type:=direct + + where `auto.direct' would contain an entry such as: + + usr/man -type:=nfs;rfs:=/usr/man \ + rhost:=man-server1 rhost:=man-server2 + + In this example, `man-server1' and `man-server2' are file servers +which export copies of the manual pages. Note that the key which is +looked up is the name of the automount point without the leading `/'. + + Note that the implementation of the traditional "direct" filesystem +is essentially a hack (pretending that the root of an NFS filesystem is +a symlink) and many modern operating systems get very unhappy about it. +For example, Linux kernel 2.4+ completely disallows it, and Solaris 2.8 +fails to unmount it when Amd shuts down. Therefore, the use of the +traditional "direct" filesystem is strongly discouraged; it is only +semi-supported, at best. + + The autofs implementations that permit direct mounts are fully +supported, however. That currently includes all versions of Solaris. +Linux autofs does NOT support direct mounts at all. + + +File: am-utils.info, Node: Union Filesystem, Next: Error Filesystem, Prev: Direct Automount Filesystem, Up: Filesystem Types + +5.21 Union Filesystem (`union') +=============================== + +The "union" (`type:=union') filesystem type allows the contents of +several directories to be merged and made visible in a single +directory. This can be used to overcome one of the major limitations +of the Unix mount mechanism which only allows complete directories to +be mounted. + + For example, supposing `/tmp' and `/var/tmp' were to be merged into +a new directory called `/mtmp', with files in `/var/tmp' taking +precedence. The following command could be used to achieve this effect: + + amd ... /mtmp union:/tmp:/var/tmp -type:=union + + Currently, the unioned directories must _not_ be automounted. That +would cause a deadlock. This seriously limits the current usefulness of +this filesystem type and the problem will be addressed in a future +release of Amd. + + Files created in the union directory are actually created in the last +named directory. This is done by creating a wildcard entry which points +to the correct directory. The wildcard entry is visible if the union +directory is listed, so allowing you to see which directory has +priority. + + The files visible in the union directory are computed at the time +Amd is started, and are not kept up-to-date with respect to the +underlying directories. Similarly, if a link is removed, for example +with the `rm' command, it will be lost forever. + + +File: am-utils.info, Node: Error Filesystem, Next: Top-level Filesystem, Prev: Union Filesystem, Up: Filesystem Types + +5.22 Error Filesystem (`error') +=============================== + +The "error" (`type:=error') filesystem type is used internally as a +catch-all in the case where none of the other filesystems was selected, +or some other error occurred. Lookups and mounts always fail with "No +such file or directory". All other operations trivially succeed. + + The error filesystem is not directly accessible. + + +File: am-utils.info, Node: Top-level Filesystem, Next: Root Filesystem, Prev: Error Filesystem, Up: Filesystem Types + +5.23 Top-level Filesystem (`toplvl') +==================================== + +The "toplvl" (`type:=toplvl') filesystems is derived from the `auto' +filesystem and is used to mount the top-level automount nodes. +Requests of this type are automatically generated from the command line +arguments. + + +File: am-utils.info, Node: Root Filesystem, Next: Inheritance Filesystem, Prev: Top-level Filesystem, Up: Filesystem Types + +5.24 Root Filesystem (`root') +============================= + +The "root" (`type:=root') filesystem type acts as an internal +placeholder onto which Amd can pin `toplvl' mounts. Only one node of +this type need ever exist and one is created automatically during +startup. The effect of having more than one root node is undefined. + + The root filesystem is not directly accessible. + + +File: am-utils.info, Node: Inheritance Filesystem, Prev: Root Filesystem, Up: Filesystem Types + +5.25 Inheritance Filesystem (`inherit') +======================================= + +The "inheritance" (`type:=inherit') filesystem is not directly +accessible. Instead, internal mount nodes of this type are +automatically generated when Amd is started with the `-r' option. At +this time the system mount table is scanned to locate any filesystems +which are already mounted. If any reference to these filesystems is +made through Amd then instead of attempting to mount it, Amd simulates +the mount and "inherits" the filesystem. This allows a new version of +Amd to be installed on a live system simply by killing the old daemon +with `SIGTERM' and starting the new one. + + This filesystem type is not generally visible externally, but it is +possible that the output from `amq -m' may list `inherit' as the +filesystem type. This happens when an inherit operation cannot be +completed for some reason, usually because a fileserver is down. + + +File: am-utils.info, Node: Amd Configuration File, Next: Run-time Administration, Prev: Filesystem Types, Up: Top + +6 Amd Configuration File +************************ + +The `amd.conf' file is the configuration file for Amd, as part of the +am-utils suite. This file contains runtime configuration information +for the Amd automounter program. + +* Menu: + +* File Format:: +* The Global Section:: +* Regular Map Sections:: +* Common Parameters:: +* Global Parameters:: +* Regular Map Parameters:: +* amd.conf Examples:: + + +File: am-utils.info, Node: File Format, Next: The Global Section, Prev: Amd Configuration File, Up: Amd Configuration File + +6.1 File Format +=============== + +The `amd.conf' file consists of sections and parameters. A section +begins with the name of the section in square brackets `[]' and +continues until the next section begins or the end of the file is +reached. Sections contain parameters of the form `name = value'. + + The file is line-based -- that is, each newline-terminated line +represents either a comment, a section name or a parameter. No +line-continuation syntax is available. + + Section names, parameter names and their values are case sensitive. + + Only the first equals sign in a parameter is significant. Whitespace +before or after the first equals sign is discarded. Leading, trailing +and internal whitespace in section and parameter names is irrelevant. +Leading and trailing whitespace in a parameter value is discarded. +Internal whitespace within a parameter value is not allowed, unless the +whole parameter value is quoted with double quotes as in `name = "some +value"'. + + Any line beginning with a pound sign `#' is ignored, as are lines +containing only whitespace. + + The values following the equals sign in parameters are all either a +string (no quotes needed if string does not include spaces) or a +boolean, which may be given as `yes'/`no'. Case is significant in all +values. Some items such as cache timeouts are numeric. + + +File: am-utils.info, Node: The Global Section, Next: Regular Map Sections, Prev: File Format, Up: Amd Configuration File + +6.2 The Global Section +====================== + +The global section must be specified as `[global]'. Parameters in this +section either apply to Amd as a whole, or to all other regular map +sections which follow. There should be only one global section defined +in one configuration file. + + It is highly recommended that this section be specified first in the +configuration file. If it is not, then regular map sections which +precede it will not use global values defined later. + + +File: am-utils.info, Node: Regular Map Sections, Next: Common Parameters, Prev: The Global Section, Up: Amd Configuration File + +6.3 Regular Map Sections +======================== + +Parameters in regular (non-global) sections apply to a single map entry. +For example, if the map section `[/homes]' is defined, then all +parameters following it will be applied to the `/homes' Amd-managed +mount point. + + +File: am-utils.info, Node: Common Parameters, Next: Global Parameters, Prev: Regular Map Sections, Up: Amd Configuration File + +6.4 Common Parameters +===================== + +These parameters can be specified either in the global or a map-specific +section. Entries specified in a map-specific section override the +default value or one defined in the global section. If such a common +parameter is specified only in the global section, it is applicable to +all regular map sections that follow. + +* Menu: + +* autofs_use_lofs Parameter:: +* browsable_dirs Parameter:: +* map_defaults Parameter:: +* map_options Parameter:: +* map_type Parameter:: +* mount_type Parameter:: +* search_path Parameter:: +* selectors_in_defaults Parameter:: +* sun_map_syntax Parameter:: + + +File: am-utils.info, Node: autofs_use_lofs Parameter, Next: browsable_dirs Parameter, Prev: Common Parameters, Up: Common Parameters + +6.4.1 autofs_use_lofs Parameter +------------------------------- + +(type=string, default=`yes'). When set to `yes', Amd's autofs code +will use lofs-type (loopback) mounts for `type:=link' mounts, as well +as several other cases that require local references. This has the +advantage that Amd does not use a secondary mount point and users do +not see external pathnames (the infamous `/bin/pwd' problem, where it +reports a different path than the user chdir'ed into). One of the +disadvantages of using this option is that the autofs code is +relatively new and the in-place mounts have not been throughly tested. + + If this option is set to `no', then Amd's autofs code will use +symlinks instead of lofs-type mounts for local references. This has +the advantage of using simpler (more stable) code, but at the expense +of negating one of autofs's big advantages: the hiding of Amd's +internal paths. Note that symlinks are not supported in all autofs +implementations, especially those derived from Solaris Autofs v1. +Also, on Solaris 2.6 and newer, autofs symlinks are not cached, +resulting in repeated up-call requests to Amd. + + +File: am-utils.info, Node: browsable_dirs Parameter, Next: map_defaults Parameter, Prev: autofs_use_lofs Parameter, Up: Common Parameters + +6.4.2 browsable_dirs Parameter +------------------------------ + +(type=string, default=`no'). If `yes', then Amd's top-level mount +points will be browsable to readdir(3) calls. This means you could run +for example ls(1) and see what keys are available to mount in that +directory. Not all entries are made visible to readdir(3): the +`/defaults' entry, wildcard entries, and those with a `/' in them are +not included. If you specify `full' to this option, all but the +`/defaults' entry will be visible. Note that if you run a command +which will attempt to stat(2) the entries, such as often done by `ls +-l' or `ls -F', Amd will attempt to mount every entry in that map. +This is often called a "mount storm". + + Note that mount storms are mostly avoided by using autofs mounts +(`mount_type = autofs'). + + +File: am-utils.info, Node: map_defaults Parameter, Next: map_options Parameter, Prev: browsable_dirs Parameter, Up: Common Parameters + +6.4.3 map_defaults Parameter +---------------------------- + +(type=string, default to empty). This option sets a string to be used +as the map's `/defaults' entry, overriding any `/defaults' specified in +the map. This allows local users to override a given map's defaults +without modifying maps globally (which is impossible in sites where the +maps are managed by a different administrative group). + + +File: am-utils.info, Node: map_options Parameter, Next: map_type Parameter, Prev: map_defaults Parameter, Up: Common Parameters + +6.4.4 map_options Parameter +--------------------------- + +(type=string, default no options). This option is the same as +specifying map options on the command line to Amd, such as `cache:=all'. + + +File: am-utils.info, Node: map_type Parameter, Next: mount_type Parameter, Prev: map_options Parameter, Up: Common Parameters + +6.4.5 map_type Parameter +------------------------ + +(type=string, default search all map types). If specified, Amd will +initialize the map only for the type given. This is useful to avoid the +default map search type used by Amd which takes longer and can have +undesired side-effects such as initializing NIS even if not used. +Possible values are + +`file' + plain files + +`hesiod' + Hesiod name service from MIT + +`ldap' + Lightweight Directory Access Protocol + +`ndbm' + (New) dbm style hash files + +`nis' + Network Information Services (version 2) + +`nisplus' + Network Information Services Plus (version 3) + +`passwd' + local password files + +`union' + union maps + + +File: am-utils.info, Node: mount_type Parameter, Next: search_path Parameter, Prev: map_type Parameter, Up: Common Parameters + +6.4.6 mount_type Parameter +-------------------------- + +(type=string, default=`nfs'). All Amd mount types default to NFS. +That is, Amd is an NFS server on the map mount points, for the local +host it is running on. If `autofs' is specified, Amd will be an autofs +server for those mount points. + + +File: am-utils.info, Node: search_path Parameter, Next: selectors_in_defaults Parameter, Prev: mount_type Parameter, Up: Common Parameters + +6.4.7 search_path Parameter +--------------------------- + +(type=string, default no search path). This provides a +(colon-delimited) search path for file maps. Using a search path, +sites can allow for local map customizations and overrides, and can +distributed maps in several locations as needed. + + +File: am-utils.info, Node: selectors_in_defaults Parameter, Next: sun_map_syntax Parameter, Prev: search_path Parameter, Up: Common Parameters + +6.4.8 selectors_in_defaults Parameter +------------------------------------- + +(type=boolean, default=`no'). If `yes', then the `/defaults' entry of +maps will search for and process any selectors before setting defaults +for all other keys in that map. Useful when you want to set different +options for a complete map based on some parameters. For example, you +may want to better the NFS performance over slow slip-based networks as +follows: + + /defaults \ + wire==slip-net;opts:=intr,rsize=1024,wsize=1024 \ + wire!=slip-net;opts:=intr,rsize=8192,wsize=8192 + + Deprecated form: selectors_on_default. + + +File: am-utils.info, Node: sun_map_syntax Parameter, Prev: selectors_in_defaults Parameter, Up: Common Parameters + +6.4.9 sun_map_syntax Parameter +------------------------------ + +(type=boolean, default=`no'). If `yes', then Amd will parse the map +according to the Sun Automount syntax. + + +File: am-utils.info, Node: Global Parameters, Next: Regular Map Parameters, Prev: Common Parameters, Up: Amd Configuration File + +6.5 Global Parameters +===================== + +The following parameters are applicable to the `[global]' section only. + +* Menu: + +* arch Parameter:: +* auto_attrcache Parameter:: +* auto_dir Parameter:: +* cache_duration Parameter:: +* cluster Parameter:: +* debug_mtab_file Parameter:: +* debug_options Parameter:: +* dismount_interval Parameter:: +* domain_strip Parameter:: +* exec_map_timeout Parameter:: +* forced_unmounts Parameter:: +* full_os Parameter:: +* fully_qualified_hosts Parameter:: +* hesiod_base Parameter:: +* karch Parameter:: +* ldap_base Parameter:: +* ldap_cache_maxmem Parameter:: +* ldap_cache_seconds Parameter:: +* ldap_hostports Parameter:: +* ldap_proto_version Parameter:: +* local_domain Parameter:: +* localhost_address Parameter:: +* log_file Parameter:: +* log_options Parameter:: +* map_reload_interval Parameter:: +* nfs_allow_any_interface Parameter:: +* nfs_allow_insecure_port Parameter:: +* nfs_proto Parameter:: +* nfs_retransmit_counter Parameter:: +* nfs_retransmit_counter_udp Parameter:: +* nfs_retransmit_counter_tcp Parameter:: +* nfs_retransmit_counter_toplvl Parameter:: +* nfs_retry_interval Parameter:: +* nfs_retry_interval_udp Parameter:: +* nfs_retry_interval_tcp Parameter:: +* nfs_retry_interval_toplvl Parameter:: +* nfs_vers Parameter:: +* nis_domain Parameter:: +* normalize_hostnames Parameter:: +* normalize_slashes Parameter:: +* os Parameter:: +* osver Parameter:: +* pid_file Parameter:: +* plock Parameter:: +* portmap_program Parameter:: +* preferred_amq_port Parameter:: +* print_pid Parameter:: +* print_version Parameter:: +* restart_mounts Parameter:: +* show_statfs_entries Parameter:: +* truncate_log Parameter:: +* unmount_on_exit Parameter:: +* use_tcpwrappers Parameter:: +* vendor Parameter:: + + +File: am-utils.info, Node: arch Parameter, Next: auto_attrcache Parameter, Prev: Global Parameters, Up: Global Parameters + +6.5.1 arch Parameter +-------------------- + +(type=string, default to compiled in value). Same as the `-A' option +to Amd. Allows you to override the value of the arch Amd variable. + + +File: am-utils.info, Node: auto_attrcache Parameter, Next: auto_dir Parameter, Prev: arch Parameter, Up: Global Parameters + +6.5.2 auto_attrcache Parameter +------------------------------ + +(type=numeric, default=0). Specify in seconds (or units of 0.1 +seconds, depending on the OS), what is the (kernel-side) NFS attribute +cache timeout for Amd's own automount points. A value of 0 is supposed +to turn off attribute caching, meaning that Amd will be consulted via a +kernel-RPC each time someone stat()'s the mount point (which could be +abused as a denial-of-service attack). + + _WARNING_: Amd depends on being able to turn off the NFS attribute +cache of the client OS. If it cannot be turned off, then users may get +ESTALE errors or symlinks that point to the wrong places. This is more +likely under heavy use of Amd, for example if your system is +experiencing frequent map changes or frequent mounts/unmounts. +Therefore, under normal circumstances, this parameter should remain set +to 0, to ensure that the attribute cache is indeed off. + + Unfortunately, some kernels (e.g., certain BSDs) don't have a way to +turn off the NFS attribute cache. Setting this parameter to 0 is +supposed to turn off attribute caching entirely, but unfortunately it +does not; instead, the attribute cache is set to some internal +hard-coded default (usually anywhere from 5-30 seconds). If you +suspect that your OS doesn't have a reliable way of turning off the +attribute cache, then it is better to set this parameter to the +smallest possible non-zero value (set `auto_attrcache=1' in your +`amd.conf'). This will not eliminate the problem, but reduce the risk +window somewhat. The best solutions are (1) to use Amd in Autofs mode, +if it's supported in your OS, and (2) talk to your OS vendor to support +a true `noac' flag. See the README.attrcache +(http://www.am-utils.org/docs/am-utils/attrcache.txt) document for more +details. + + If you are able to turn off the attribute cache on your OS, alas, +Amd's performance may degrade (when not using Autofs) because every +traversal of an automounter-controlled pathname will result in a lookup +request from the kernel to Amd. Under heavy loads, for example when +using recursive tools like `find', `rdist', or `rsync', this +performance degradation can be noticeable. There are two possible +solutions that some administrators have chosen to improve performance: + + 1. First, you can turn off unmounting using the `nounmount' mount + option. This will ensure that no Amd symlink could ever change, + thereby the kernel's attribute cache and Amd will always be in + sync. However, this method will cause the number of mounts to keep + growing, even if some are no longer in use; this has the + disadvantage that your system could be more susceptible to hangs + if even one of those accumulating mounts hangs due to a downed + server. + + 2. Second, you can turn on attribute caching carefully by setting a + small automounter attribute cache value (say, one second), and a + relatively large dismount interval (say, one hour). (*Note + dismount_interval Parameter::.) For example, you can set this in + your `amd.conf': + + [global] + auto_attrcache = 1 + dismount_interval = 3600 + + This has the benefit of using the kernel's attribute cache and thus + improving performance. The disadvantage with this option is that + the window of vulnerability is not eliminated entirely: it is only + made smaller. + + + +File: am-utils.info, Node: auto_dir Parameter, Next: cache_duration Parameter, Prev: auto_attrcache Parameter, Up: Global Parameters + +6.5.3 auto_dir Parameter +------------------------ + +(type=string, default=`/a'). Same as the `-a' option to Amd. This +sets the private directory where Amd will create sub-directories for +its real mount points. + + +File: am-utils.info, Node: cache_duration Parameter, Next: cluster Parameter, Prev: auto_dir Parameter, Up: Global Parameters + +6.5.4 cache_duration Parameter +------------------------------ + +(type=numeric, default=300). Same as the `-c' option to Amd. Sets the +duration in seconds that looked-up or mounted map entries remain in the +cache. + + +File: am-utils.info, Node: cluster Parameter, Next: debug_mtab_file Parameter, Prev: cache_duration Parameter, Up: Global Parameters + +6.5.5 cluster Parameter +----------------------- + +(type=string, default no cluster). Same as the `-C' option to Amd. +Specifies the alternate HP-UX cluster to use. + + +File: am-utils.info, Node: debug_mtab_file Parameter, Next: debug_options Parameter, Prev: cluster Parameter, Up: Global Parameters + +6.5.6 debug_mtab_file Parameter +------------------------------- + +(type=string, default="/tmp/mtab"). Path to mtab file that is used by +Amd to store a list of mounted file systems during debug-mtab mode. +This option only applies to systems that store mtab information on disk. + + +File: am-utils.info, Node: debug_options Parameter, Next: dismount_interval Parameter, Prev: debug_mtab_file Parameter, Up: Global Parameters + +6.5.7 debug_options Parameter +----------------------------- + +(type=string, default no debug options). Same as the `-D' option to +Amd. Specify any debugging options for Amd. Works only if am-utils +was configured for debugging using the `--enable-debug' option. The +additional `mem' option can be turned on via `--enable-debug=mem'. +Otherwise debugging options are ignored. Options are comma delimited, +and can be preceded by the string `no' to negate their meaning. You +can get the list of supported debugging and logging options by running +`amd -H'. Possible values those listed for the -D option. *Note -D +Option::. + + +File: am-utils.info, Node: dismount_interval Parameter, Next: domain_strip Parameter, Prev: debug_options Parameter, Up: Global Parameters + +6.5.8 dismount_interval Parameter +--------------------------------- + +(type=numeric, default=120). Same as the `-w' option to Amd. Specify +in seconds, the time between attempts to dismount file systems that +have exceeded their cached times. + + +File: am-utils.info, Node: domain_strip Parameter, Next: exec_map_timeout Parameter, Prev: dismount_interval Parameter, Up: Global Parameters + +6.5.9 domain_strip Parameter +---------------------------- + +(type=boolean, default=`yes'). If `yes', then the domain name part +referred to by `${rhost}' is stripped off. This is useful to keep logs +and smaller. If `no', then the domain name part is left changed. This +is useful when using multiple domains with the same maps (as you may +have hosts whose domain-stripped name is identical). + + +File: am-utils.info, Node: exec_map_timeout Parameter, Next: forced_unmounts Parameter, Prev: domain_strip Parameter, Up: Global Parameters + +6.5.10 exec_map_timeout Parameter +--------------------------------- + +(type=numeric, default=10). The timeout in seconds that Amd will wait +for an executable map program before an answer is returned from that +program (or script). This value should be set to as small as possible +while still allowing normal replies to be returned before the timer +expires, because during the time that the executable map program is +queried, Amd is essentially waiting and is thus not responding to any +other queries. *Note Executable maps::. + + +File: am-utils.info, Node: forced_unmounts Parameter, Next: full_os Parameter, Prev: exec_map_timeout Parameter, Up: Global Parameters + +6.5.11 forced_unmounts Parameter +-------------------------------- + +(type=boolean, default=`no'). Sometimes, mount points are hung due to +unrecoverable conditions, such as when NFS servers migrate, change +their IP address, are down permanently, or due to hardware failures, +and more. In this case, attempting to unmount an existing mount point, +or even just to stat(2) it, results in one of three fatal errors: EIO, +ESTALE, or EBUSY. At that point, Amd can do little to recover that hung +point (in fact, the OS cannot automatically recover either). For that +reason, some OSs support special kinds of forced unmounts, which must +be used very carefully: they will force an unmount immediately (or +lazily on Linux), which could result in application data loss. +However, that may be the only way to recover the entire host (without +rebooting). Once a hung mount point is forced out, Amd can then +re-mount a replacement one (if available), bringing a mostly-hung +system back to operation and avoiding a potentially costly reboot. + + If the `forced_unmounts' option is set to `yes', and the client OS +supports forced or lazy unmounts, then Amd will attempt to use them if +it gets any of the three serious error conditions listed above. Note +that Amd will force the unmount of mount points that returned EBUSY +only for `type:=toplvl' mounts (*note Top-level Filesystem::): that is, +Amd's own mount points. This is useful to recover from a previously +hung Amd, and to ensure that an existing Amd can shutdown cleanly even +if some processes are keeping its mount points busy (i.e., when a +user's shell process uses `cd' to set its CWD to Amd's own mount point). + + If this option is set to `no' (the default), then Amd will not +attempt this special recovery procedure. + + +File: am-utils.info, Node: full_os Parameter, Next: fully_qualified_hosts Parameter, Prev: forced_unmounts Parameter, Up: Global Parameters + +6.5.12 full_os Parameter +------------------------ + +(type=string, default to compiled in value). The full name of the +operating system, along with its version. Allows you to override the +compiled-in full name and version of the operating system. Useful when +the compiled-in name is not desired. For example, the full operating +system name on linux comes up as `linux', but you can override it to +`linux-2.2.5'. + + +File: am-utils.info, Node: fully_qualified_hosts Parameter, Next: hesiod_base Parameter, Prev: full_os Parameter, Up: Global Parameters + +6.5.13 fully_qualified_hosts Parameter +-------------------------------------- + +(type=string, default=`no'). If `yes', Amd will perform RPC +authentication using fully-qualified host names. This is necessary for +some systems, and especially when performing cross-domain mounting. For +this function to work, the Amd variable `${hostd}' is used, requiring +that `${domain}' not be null. + + +File: am-utils.info, Node: hesiod_base Parameter, Next: karch Parameter, Prev: fully_qualified_hosts Parameter, Up: Global Parameters + +6.5.14 hesiod_base Parameter +---------------------------- + +(type=string, default=`automount'). Specify the base name for hesiod +maps. + + +File: am-utils.info, Node: karch Parameter, Next: ldap_base Parameter, Prev: hesiod_base Parameter, Up: Global Parameters + +6.5.15 karch Parameter +---------------------- + +(type=string, default to karch of the system). Same as the `-k' option +to Amd. Allows you to override the kernel-architecture of your system. +Useful for example on Sun (Sparc) machines, where you can build one +Amd binary, and run it on multiple machines, yet you want each one to +get the correct karch variable set (for example, sun4c, sun4m, sun4u, +etc.) Note that if not specified, Amd will use uname(2) to figure out +the kernel architecture of the machine. + + +File: am-utils.info, Node: ldap_base Parameter, Next: ldap_cache_maxmem Parameter, Prev: karch Parameter, Up: Global Parameters + +6.5.16 ldap_base Parameter +-------------------------- + +(type=string, default not set). Specify the base name for LDAP. This +often includes LDAP-specific values such as country and organization. + + +File: am-utils.info, Node: ldap_cache_maxmem Parameter, Next: ldap_cache_seconds Parameter, Prev: ldap_base Parameter, Up: Global Parameters + +6.5.17 ldap_cache_maxmem Parameter +---------------------------------- + +(type=numeric, default=131072). Specify the maximum memory Amd should +use to cache LDAP entries. + + +File: am-utils.info, Node: ldap_cache_seconds Parameter, Next: ldap_hostports Parameter, Prev: ldap_cache_maxmem Parameter, Up: Global Parameters + +6.5.18 ldap_cache_seconds Parameter +----------------------------------- + +(type=numeric, default=0). Specify the number of seconds to keep +entries in the cache. + + +File: am-utils.info, Node: ldap_hostports Parameter, Next: ldap_proto_version Parameter, Prev: ldap_cache_seconds Parameter, Up: Global Parameters + +6.5.19 ldap_hostports Parameter +------------------------------- + +(type=string, default not set). Specify the LDAP host and port values. + + +File: am-utils.info, Node: ldap_proto_version Parameter, Next: local_domain Parameter, Prev: ldap_hostports Parameter, Up: Global Parameters + +6.5.20 ldap_proto_version Parameter +----------------------------------- + +(type=numeric, default=2). Specify the LDAP protocol version to use. +With a value of 3 will use LDAPv3 protocol. + + +File: am-utils.info, Node: local_domain Parameter, Next: localhost_address Parameter, Prev: ldap_proto_version Parameter, Up: Global Parameters + +6.5.21 local_domain Parameter +----------------------------- + +(type=string, default no sub-domain). Same as the `-d' option to Amd. +Specify the local domain name. If this option is not given the domain +name is determined from the hostname, by removing the first component +of the fully-qualified host name. + + +File: am-utils.info, Node: localhost_address Parameter, Next: log_file Parameter, Prev: local_domain Parameter, Up: Global Parameters + +6.5.22 localhost_address Parameter +---------------------------------- + +(type=string, default to localhost or 127.0.0.1). Specify the name or +IP address for Amd to use when connecting the sockets for the local NFS +server and the RPC server. This defaults to 127.0.0.1 or whatever the +host reports as its local address. This parameter is useful on hosts +with multiple addresses where you want to force Amd to connect to a +specific address. + + +File: am-utils.info, Node: log_file Parameter, Next: log_options Parameter, Prev: localhost_address Parameter, Up: Global Parameters + +6.5.23 log_file Parameter +------------------------- + +(type=string, default=`stderr'). Same as the `-l' option to Amd. +Specify a file name to log Amd events to. If the string `/dev/stderr' +is specified, Amd will send its events to the standard error file +descriptor. + + If the string `syslog' is given, Amd will record its events with the +system logger syslogd(8). If your system supports syslog facilities, +then the default facility used is `LOG_DAEMON'. + + When using syslog, if you wish to change the facility, append its +name to the option name, delimited by a single colon. For example, if +it is the string `syslog:local7' then Amd will log messages via +syslog(3) using the `LOG_LOCAL7' facility. If the facility name +specified is not recognized, Amd will default to `LOG_DAEMON'. Note: +while you can use any syslog facility available on your system, it is +generally a bad idea to use those reserved for other services such as +`kern', `lpr', `cron', etc. + + +File: am-utils.info, Node: log_options Parameter, Next: map_reload_interval Parameter, Prev: log_file Parameter, Up: Global Parameters + +6.5.24 log_options Parameter +---------------------------- + +(type=string, default="defaults"). Same as the `-x' option to Amd. +Specify any logging options for Amd. Options are comma delimited, and +can be preceded by the string `no' to negate their meaning. The +`debug' logging option is only available if am-utils was configured +with `--enable-debug'. You can get the list of supported debugging +options by running `amd -H'. Possible values are: + +`all' + all messages + +`defaults' + an alias for "fatal,error,user,warning,info" + +`debug' + debug messages + +`error' + non-fatal system errors (cannot be turned off) + +`fatal' + fatal errors (cannot be turned off) + +`info' + information + +`map' + map errors + +`stats' + additional statistical information + +`user' + non-fatal user errors + +`warn' + warnings + +`warning' + warnings + + +File: am-utils.info, Node: map_reload_interval Parameter, Next: nfs_allow_any_interface Parameter, Prev: log_options Parameter, Up: Global Parameters + +6.5.25 map_reload_interval Parameter +------------------------------------ + +(type=numeric, default=3600). The number of seconds that Amd will wait +before it checks to see if any maps have changed at their source (NIS +servers, LDAP servers, files, etc.). Amd will reload only those maps +that have changed. + + +File: am-utils.info, Node: nfs_allow_any_interface Parameter, Next: nfs_allow_insecure_port Parameter, Prev: map_reload_interval Parameter, Up: Global Parameters + +6.5.26 nfs_allow_any_interface Parameter +---------------------------------------- + +(type=string, default=`no'). Normally Amd accepts local NFS packets +only from 127.0.0.1. If this parameter is set to `yes', then amd will +accept local NFS packets from any local interface; this is useful on +hosts that may have multiple interfaces where the system is forced to +send all outgoing packets (even those bound to the same host) via an +address other than 127.0.0.1. + + +File: am-utils.info, Node: nfs_allow_insecure_port Parameter, Next: nfs_proto Parameter, Prev: nfs_allow_any_interface Parameter, Up: Global Parameters + +6.5.27 nfs_allow_insecure_port Parameter +---------------------------------------- + +(type=string, default=`no'). Normally Amd will refuse requests coming +from unprivileged ports (i.e., ports >= 1024 on Unix systems), so that +only privileged users and the kernel can send NFS requests to it. +However, some kernels (certain versions of Darwin, MacOS X, and Linux) +have bugs that cause them to use unprivileged ports in certain +situations, which causes Amd to stop dead in its tracks. This +parameter allows Amd to operate normally even on such systems, at the +expense of a slight decrease in the security of its operations. If you +see messages like "ignoring request from foo:1234, port not reserved" +in your Amd log, try enabling this parameter and give it another go. + + +File: am-utils.info, Node: nfs_proto Parameter, Next: nfs_retransmit_counter Parameter, Prev: nfs_allow_insecure_port Parameter, Up: Global Parameters + +6.5.28 nfs_proto Parameter +-------------------------- + +(type=string, default to trying version tcp then udp). By default, Amd +tries `tcp' and then `udp'. This option forces the overall NFS +protocol used to TCP or UDP. It overrides what is in the Amd maps, and +is useful when Amd is compiled with TCP support in NFSv2/NFSv3 that may +not be stable. With this option you can turn off the complete usage of +TCP for NFS dynamically (without having to recompile Amd), and use UDP +only, until such time as TCP support is desired again. + + +File: am-utils.info, Node: nfs_retransmit_counter Parameter, Next: nfs_retransmit_counter_udp Parameter, Prev: nfs_proto Parameter, Up: Global Parameters + +6.5.29 nfs_retransmit_counter Parameter +--------------------------------------- + +(type=numeric, default=11). Same as the retransmit part of the `-t' +timeout.retransmit option to Amd. Specifies the number of NFS +retransmissions that the kernel will use to communicate with Amd using +either UDP or TCP mounts. *Note -t Option::. + + +File: am-utils.info, Node: nfs_retransmit_counter_udp Parameter, Next: nfs_retransmit_counter_tcp Parameter, Prev: nfs_retransmit_counter Parameter, Up: Global Parameters + +6.5.30 nfs_retransmit_counter_udp Parameter +------------------------------------------- + +(type=numeric, default=11). Same as the nfs_retransmit_counter +parameter, but applied globally only to UDP mounts. *Note +nfs_retransmit_counter Parameter::. + + +File: am-utils.info, Node: nfs_retransmit_counter_tcp Parameter, Next: nfs_retransmit_counter_toplvl Parameter, Prev: nfs_retransmit_counter_udp Parameter, Up: Global Parameters + +6.5.31 nfs_retransmit_counter_tcp Parameter +------------------------------------------- + +(type=numeric, default=11). Same as the nfs_retransmit_counter +parameter, but applied globally only to TCP mounts. *Note +nfs_retransmit_counter Parameter::. + + +File: am-utils.info, Node: nfs_retransmit_counter_toplvl Parameter, Next: nfs_retry_interval Parameter, Prev: nfs_retransmit_counter_tcp Parameter, Up: Global Parameters + +6.5.32 nfs_retransmit_counter_toplvl Parameter +---------------------------------------------- + +(type=numeric, default=11). Same as the nfs_retransmit_counter +parameter, applied only for Amd's top-level UDP mounts. On some +systems it is useful to set this differently than the OS default, so as +to better tune Amd's responsiveness under heavy scheduler loads. *Note +nfs_retransmit_counter Parameter::. + + +File: am-utils.info, Node: nfs_retry_interval Parameter, Next: nfs_retry_interval_udp Parameter, Prev: nfs_retransmit_counter_toplvl Parameter, Up: Global Parameters + +6.5.33 nfs_retry_interval Parameter +----------------------------------- + +(type=numeric, default=8). Same as the timeout part of the `-t' +timeout.retransmit option to Amd. Specifies the NFS timeout interval, +in _tenths_ of seconds, between NFS/RPC retries (for UDP or TCP). This +is the value that the kernel will use to communicate with Amd. *Note +-t Option::. + + Amd relies on the kernel RPC retransmit mechanism to trigger mount +retries. The values of the nfs_retransmit_counter and the +nfs_retry_interval parameters change the overall retry interval. Too +long an interval gives poor interactive response; too short an interval +causes excessive retries. + + +File: am-utils.info, Node: nfs_retry_interval_udp Parameter, Next: nfs_retry_interval_tcp Parameter, Prev: nfs_retry_interval Parameter, Up: Global Parameters + +6.5.34 nfs_retry_interval_udp Parameter +--------------------------------------- + +(type=numeric, default=8). Same as the nfs_retry_interval parameter, +but applied globally only to UDP mounts. *Note nfs_retry_interval +Parameter::. + + +File: am-utils.info, Node: nfs_retry_interval_tcp Parameter, Next: nfs_retry_interval_toplvl Parameter, Prev: nfs_retry_interval_udp Parameter, Up: Global Parameters + +6.5.35 nfs_retry_interval_tcp Parameter +--------------------------------------- + +(type=numeric, default=8). Same as the nfs_retry_interval parameter, +but applied globally only to TCP mounts. *Note nfs_retry_interval +Parameter::. + + +File: am-utils.info, Node: nfs_retry_interval_toplvl Parameter, Next: nfs_vers Parameter, Prev: nfs_retry_interval_tcp Parameter, Up: Global Parameters + +6.5.36 nfs_retry_interval_toplvl Parameter +------------------------------------------ + +(type=numeric, default=8). Same as the nfs_retry_interval parameter, +applied only for Amd's top-level UDP mounts. On some systems it is +useful to set this differently than the OS default, so as to better +tune Amd's responsiveness under heavy scheduler loads. *Note +nfs_retry_interval Parameter::. + + +File: am-utils.info, Node: nfs_vers Parameter, Next: nis_domain Parameter, Prev: nfs_retry_interval_toplvl Parameter, Up: Global Parameters + +6.5.37 nfs_vers Parameter +------------------------- + +(type=numeric, default to trying version 3 then 2). By default, Amd +tries version 3 and then version 2. This option forces the overall NFS +protocol used to version 3 or 2. It overrides what is in the Amd maps, +and is useful when Amd is compiled with NFSv3 support that may not be +stable. With this option you can turn off the complete usage of NFSv3 +dynamically (without having to recompile Amd), and use NFSv2 only, +until such time as NFSv3 support is desired again. + + +File: am-utils.info, Node: nis_domain Parameter, Next: normalize_hostnames Parameter, Prev: nfs_vers Parameter, Up: Global Parameters + +6.5.38 nis_domain Parameter +--------------------------- + +(type=string, default to local NIS domain name). Same as the `-y' +option to Amd. Specify an alternative NIS domain from which to fetch +the NIS maps. The default is the system domain name. This option is +ignored if NIS support is not available. + + +File: am-utils.info, Node: normalize_hostnames Parameter, Next: normalize_slashes Parameter, Prev: nis_domain Parameter, Up: Global Parameters + +6.5.39 normalize_hostnames Parameter +------------------------------------ + +(type=boolean, default=`no'). Same as the `-n' option to Amd. If +`yes', then the name referred to by `${rhost}' is normalized relative +to the host database before being used. The effect is to translate +aliases into "official" names. + + +File: am-utils.info, Node: normalize_slashes Parameter, Next: os Parameter, Prev: normalize_hostnames Parameter, Up: Global Parameters + +6.5.40 normalize_slashes Parameter +---------------------------------- + +(type=boolean, default=`yes'). If `yes' then amd will condense all +multiple `/' (slash) characters into one and remove all trailing +slashes. If `no', then amd will not touch strings that may contain +repeated or trailing slashes. The latter is sometimes useful with SMB +mounts, which often require multiple slash characters in pathnames. + + +File: am-utils.info, Node: os Parameter, Next: osver Parameter, Prev: normalize_slashes Parameter, Up: Global Parameters + +6.5.41 os Parameter +------------------- + +(type=string, default to compiled in value). Same as the `-O' option +to Amd. Allows you to override the compiled-in name of the operating +system. Useful when the built-in name is not desired for backward +compatibility reasons. For example, if the built-in name is `sunos5', +you can override it to `sos5', and use older maps which were written +with the latter in mind. + + +File: am-utils.info, Node: osver Parameter, Next: pid_file Parameter, Prev: os Parameter, Up: Global Parameters + +6.5.42 osver Parameter +---------------------- + +(type=string, default to compiled in value). Same as the `-o' option +to Amd. Allows you to override the compiled-in version number of the +operating system. Useful when the built-in version is not desired for +backward compatibility reasons. For example, if the build in version +is `2.5.1', you can override it to `5.5.1', and use older maps that +were written with the latter in mind. + + +File: am-utils.info, Node: pid_file Parameter, Next: plock Parameter, Prev: osver Parameter, Up: Global Parameters + +6.5.43 pid_file Parameter +------------------------- + +(type=string, default=`/dev/stdout'). Specify a file to store the +process ID of the running daemon into. If not specified, Amd will +print its process id onto the standard output. Useful for killing Amd +after it had run. Note that the PID of a running Amd can also be +retrieved via Amq (*note Amq -p option::). + + This file is used only if the `print_pid' option is on (*note +print_pid Parameter::). + + +File: am-utils.info, Node: plock Parameter, Next: portmap_program Parameter, Prev: pid_file Parameter, Up: Global Parameters + +6.5.44 plock Parameter +---------------------- + +(type=boolean, default=`yes'). Same as the `-S' option to Amd. If +`yes', lock the running executable pages of Amd into memory. To +improve Amd's performance, systems that support the plock(3) or +mlockall(2) call can lock the Amd process into memory. This way there +is less chance the operating system will schedule, page out, and swap +the Amd process as needed. This improves Amd's performance, at the +cost of reserving the memory used by the Amd process (making it +unavailable for other processes). + + +File: am-utils.info, Node: portmap_program Parameter, Next: preferred_amq_port Parameter, Prev: plock Parameter, Up: Global Parameters + +6.5.45 portmap_program Parameter +-------------------------------- + +(type=numeric, default=300019). Specify an alternate Port-mapper RPC +program number, other than the official number. This is useful when +running multiple Amd processes. For example, you can run another Amd +in "test" mode, without affecting the primary Amd process in any way. +For safety reasons, the alternate program numbers that can be specified +must be in the range 300019-300029, inclusive. Amq has an option `-P' +which can be used to specify an alternate program number of an Amd to +contact. In this way, amq can fully control any number of Amd +processes running on the same host. + + +File: am-utils.info, Node: preferred_amq_port Parameter, Next: print_pid Parameter, Prev: portmap_program Parameter, Up: Global Parameters + +6.5.46 preferred_amq_port Parameter +----------------------------------- + +(type=numeric, default=0). Specify an alternate Port-mapper RPC port +number for Amd's Amq service. This is used for both UDP and TCP. +Setting this value to 0 (or not defining it) will cause Amd to select +an arbitrary port number. Setting the Amq RPC service port to a +specific number is useful in firewalled or NAT'ed environments, where +you need to know which port Amd will listen on. + + +File: am-utils.info, Node: print_pid Parameter, Next: print_version Parameter, Prev: preferred_amq_port Parameter, Up: Global Parameters + +6.5.47 print_pid Parameter +-------------------------- + +(type=boolean, default=`no'). Same as the `-p' option to Amd. If +`yes', Amd will print its process ID upon starting. + + +File: am-utils.info, Node: print_version Parameter, Next: restart_mounts Parameter, Prev: print_pid Parameter, Up: Global Parameters + +6.5.48 print_version Parameter +------------------------------ + +(type=boolean, default=`no'). Same as the `-v' option to Amd, but the +version prints and Amd continues to run. If `yes', Amd will print its +version information string, which includes some configuration and +compilation values. + + +File: am-utils.info, Node: restart_mounts Parameter, Next: show_statfs_entries Parameter, Prev: print_version Parameter, Up: Global Parameters + +6.5.49 restart_mounts Parameter +------------------------------- + +(type=boolean, default=`no'). Same as the `-r' option to Amd. If +`yes' Amd will scan the mount table to determine which file systems are +currently mounted. Whenever one of these would have been auto-mounted, +Amd inherits it. + + +File: am-utils.info, Node: show_statfs_entries Parameter, Next: truncate_log Parameter, Prev: restart_mounts Parameter, Up: Global Parameters + +6.5.50 show_statfs_entries Parameter +------------------------------------ + +(type=boolean), default=`no'). If `yes', then all maps which are +browsable will also show the number of entries (keys) they have when +df(1) runs. (This is accomplished by returning non-zero values to the +statfs(2) system call). + + +File: am-utils.info, Node: truncate_log Parameter, Next: unmount_on_exit Parameter, Prev: show_statfs_entries Parameter, Up: Global Parameters + +6.5.51 truncate_log Parameter +----------------------------- + +(type=boolean), default=`no'). If `yes', then Amd will truncate the +log file (if it's a regular file) on startup. This could be useful +when conducting extensive testing on Amd maps (or Amd itself) and you +don't want to see log data from a previous run in the same file. + + +File: am-utils.info, Node: unmount_on_exit Parameter, Next: use_tcpwrappers Parameter, Prev: truncate_log Parameter, Up: Global Parameters + +6.5.52 unmount_on_exit Parameter +-------------------------------- + +(type=boolean, default=`no'). If `yes', then Amd will attempt to +unmount all file systems which it knows about. Normally it leaves all +(esp. NFS) mounted file systems intact. Note that Amd does not know +about file systems mounted before it starts up, unless the +`restart_mounts' option is used (*note restart_mounts Parameter::). + + +File: am-utils.info, Node: use_tcpwrappers Parameter, Next: vendor Parameter, Prev: unmount_on_exit Parameter, Up: Global Parameters + +6.5.53 use_tcpwrappers Parameter +-------------------------------- + +(type=boolean), default=`yes'). If `yes', then amd will use the +tcpwrappers (tcpd/librwap) library (if available) to control access to +Amd via the `/etc/hosts.allow' and `/etc/hosts.deny' files. Amd will +verify that the host running Amq is authorized to connect. The `amd' +service name must used in the `/etc/hosts.allow' and `/etc/hosts.deny' +files. For example, to allow only localhost to connect to Amd, add +this line to `/etc/hosts.allow': + + amd: localhost + + and this line to `/etc/hosts.deny': + + amd: ALL + + Consult the man pages for hosts_access(5) for more information on +using the tcpwrappers access-control library. + + Note that in particular, you should not configure your `hosts.allow' +file to spawn a command for Amd: that will cause Amd to not be able to +`waitpid' on the child process ID of any background un/mount that Amd +issued, resulting in a confused Amd that does not know what happened to +those background un/mount requests. + + +File: am-utils.info, Node: vendor Parameter, Prev: use_tcpwrappers Parameter, Up: Global Parameters + +6.5.54 vendor Parameter +----------------------- + +(type=string, default to compiled in value). The name of the vendor of +the operating system. Overrides the compiled-in vendor name. Useful +when the compiled-in name is not desired. For example, most Intel based +systems set the vendor name to `unknown', but you can set it to +`redhat'. + + +File: am-utils.info, Node: Regular Map Parameters, Next: amd.conf Examples, Prev: Global Parameters, Up: Amd Configuration File + +6.6 Regular Map Parameters +========================== + +The following parameters are applicable only to regular map sections. + +* Menu: + +* map_name Parameter:: +* tag Parameter:: + + +File: am-utils.info, Node: map_name Parameter, Next: tag Parameter, Prev: Regular Map Parameters, Up: Regular Map Parameters + +6.6.1 map_name Parameter +------------------------ + +(type=string, must be specified). Name of the map where the keys are +located. + + +File: am-utils.info, Node: tag Parameter, Prev: map_name Parameter, Up: Regular Map Parameters + +6.6.2 tag Parameter +------------------- + +(type=string, default no tag). Each map entry in the configuration file +can be tagged. If no tag is specified, that map section will always be +processed by Amd. If it is specified, then Amd will process the map if +the `-T' option was given to Amd, and the value given to that +command-line option matches that in the map section. + + +File: am-utils.info, Node: amd.conf Examples, Prev: Regular Map Parameters, Up: Amd Configuration File + +6.7 amd.conf Examples +===================== + +The following is the actual `amd.conf' file I used at the Computer +Science Department of Columbia University. + + # GLOBAL OPTIONS SECTION + [ global ] + normalize_hostnames = no + print_pid = no + #pid_file = /var/run/amd.pid + restart_mounts = yes + #unmount_on_exit = yes + auto_dir = /n + log_file = /var/log/amd + log_options = all + #debug_options = defaults + plock = no + selectors_in_defaults = yes + # config.guess picks up "sunos5" and I don't want to edit my maps yet + os = sos5 + # if you print_version after setting up "os", it will show it. + print_version = no + map_type = file + search_path = /etc/amdmaps:/usr/lib/amd:/usr/local/AMD/lib + browsable_dirs = yes + fully_qualified_hosts = no + + # DEFINE AN AMD MOUNT POINT + [ /u ] + map_name = amd.u + + [ /proj ] + map_name = amd.proj + + [ /src ] + map_name = amd.src + + [ /misc ] + map_name = amd.misc + + [ /import ] + map_name = amd.import + + [ /tftpboot/.amd ] + tag = tftpboot + map_name = amd.tftpboot + + +File: am-utils.info, Node: Run-time Administration, Next: FSinfo, Prev: Amd Configuration File, Up: Top + +7 Run-time Administration +************************* + +* Menu: + +* Starting Amd:: +* Stopping Amd:: +* Restarting Amd:: +* Controlling Amd:: + + +File: am-utils.info, Node: Starting Amd, Next: Stopping Amd, Prev: Run-time Administration, Up: Run-time Administration + +7.1 Starting Amd +================ + +Amd is best started from `/etc/rc.local' on BSD systems, or from the +appropriate start-level script in `/etc/init.d' on System V systems. + + if [ -f /usr/local/sbin/ctl-amd ]; then + /usr/local/sbin/ctl-amd start; (echo -n ' amd') > /dev/console + fi + +The shell script, `ctl-amd' is used to start, stop, or restart Amd. It +is a relatively generic script. All options you want to set should not +be made in this script, but rather updated in the `amd.conf' file. +*Note Amd Configuration File::. + + If you do not wish to use an Amd configuration file, you may start +Amd manually. For example, getting the map entries via NIS: + + amd -r -l /var/log/amd `ypcat -k auto.master` + + +File: am-utils.info, Node: Stopping Amd, Next: Restarting Amd, Prev: Starting Amd, Up: Run-time Administration + +7.2 Stopping Amd +================ + +Amd stops in response to two signals. + +`SIGTERM' + causes the top-level automount points to be unmounted and then Amd + to exit. Any automounted filesystems are left mounted. They can + be recovered by restarting Amd with the `-r' command line option. + +`SIGINT' + causes Amd to attempt to unmount any filesystems which it has + automounted, in addition to the actions of `SIGTERM'. This signal + is primarily used for debugging. + + Actions taken for other signals are undefined. + + The easiest and safest way to stop Amd, without having to find its +process ID by hand, is to use the `ctl-amd' script, as with: + + ctl-amd stop + + +File: am-utils.info, Node: Restarting Amd, Next: Controlling Amd, Prev: Stopping Amd, Up: Run-time Administration + +7.3 Restarting Amd +================== + +Before Amd can be started, it is vital to ensure that no other Amd +processes are managing any of the mount points, and that the previous +process(es) have terminated cleanly. When a terminating signal is set +to Amd, the automounter does _not_ terminate right then. Rather, it +starts by unmounting all of its managed mount mounts in the background, +and then terminates. It usually takes a few seconds for this process +to happen, but it can take an arbitrarily longer time. If two or more +Amd processes attempt to manage the same mount point, it usually will +result in a system lockup. + + The easiest and safest way to restart Amd, without having to find +its process ID by hand, sending it the `SIGTERM' signal, waiting for Amd +to die cleanly, and verifying so, is to use the `ctl-amd' script, as +with: + + ctl-amd restart + + The script will locate the process ID of Amd, kill it, and wait for +it to die cleanly before starting a new instance of the automounter. +`ctl-amd' will wait for a total of 30 seconds for Amd to die, and will +check once every 5 seconds if it had. + + +File: am-utils.info, Node: Controlling Amd, Prev: Restarting Amd, Up: Run-time Administration + +7.4 Controlling Amd +=================== + +It is sometimes desirable or necessary to exercise external control +over some of Amd's internal state. To support this requirement, Amd +implements an RPC interface which is used by the "Amq" program. A +variety of information is available. + + Amq generally applies an operation, specified by a single letter +option, to a list of mount points. The default operation is to obtain +statistics about each mount point. This is similar to the output shown +above but includes information about the number and type of accesses to +each mount point. + +* Menu: + +* Amq default:: Default command behavior. +* Amq -f option:: Flushing the map cache. +* Amq -h option:: Controlling a non-local host. +* Amq -H option:: Print help message. +* Amq -l option:: Controlling the log file. +* Amq -m option:: Obtaining mount statistics. +* Amq -p option:: Getting Amd's process ID. +* Amq -P option:: Contacting alternate Amd processes. +* Amq -q option:: Suppress synchronous unmounting errors. +* Amq -s option:: Obtaining global statistics. +* Amq -T option:: Use TCP transport. +* Amq -U option:: Use UDP transport. +* Amq -u option:: Forcing volumes to time out. +* Amq -v option:: Version information. +* Amq -w option:: Print Amd current working directory. +* Other Amq options:: Three other special options. + + +File: am-utils.info, Node: Amq default, Next: Amq -f option, Prev: Controlling Amd, Up: Controlling Amd + +7.4.1 Amq default information +----------------------------- + +With no arguments, "Amq" obtains a brief list of all existing mounts +created by Amd. This is different from the list displayed by df(1) +since the latter only includes system mount points. + +The output from this option includes the following information: + + * the automount point, + + * the filesystem type, + + * the mount map or mount information, + + * the internal, or system mount point. + +For example: + + / root "root" sky:(pid75) + /homes toplvl /usr/local/etc/amd.homes /homes + /home toplvl /usr/local/etc/amd.home /home + /homes/jsp nfs charm:/home/charm /a/charm/home/charm/jsp + /homes/phjk nfs toytown:/home/toytown /a/toytown/home/toytown/ai/phjk + +If an argument is given then statistics for that volume name will be +output. For example: + + What Uid Getattr Lookup RdDir RdLnk Statfs Mounted@ + /homes 0 1196 512 22 0 30 90/09/14 12:32:55 + /homes/jsp 0 0 0 0 1180 0 90/10/13 12:56:58 + +`What' + the volume name. + +`Uid' + ignored. + +`Getattr' + the count of NFS "getattr" requests on this node. This should + only be non-zero for directory nodes. + +`Lookup' + the count of NFS "lookup" requests on this node. This should only + be non-zero for directory nodes. + +`RdDir' + the count of NFS "readdir" requests on this node. This should only + be non-zero for directory nodes. + +`RdLnk' + the count of NFS "readlink" requests on this node. This should be + zero for directory nodes. + +`Statfs' + the count of NFS "statfs" requests on this node. This should only + be non-zero for top-level automount points. + +`Mounted@' + the date and time the volume name was first referenced. + + +File: am-utils.info, Node: Amq -f option, Next: Amq -h option, Prev: Amq default, Up: Controlling Amd + +7.4.2 Amq `-f' option +--------------------- + +The `-f' option causes Amd to flush the internal mount map cache. This +is useful for example in Hesiod maps since Amd will not automatically +notice when they have been updated. The map cache can also be +synchronized with the map source by using the `sync' option (*note +Automount Filesystem::). + + +File: am-utils.info, Node: Amq -h option, Next: Amq -H option, Prev: Amq -f option, Up: Controlling Amd + +7.4.3 Amq `-h' option +--------------------- + +By default the local host is used. In an HP-UX cluster the root server +is used since that is the only place in the cluster where Amd will be +running. To query Amd on another host the `-h' option should be used. + + +File: am-utils.info, Node: Amq -H option, Next: Amq -l option, Prev: Amq -h option, Up: Controlling Amd + +7.4.4 Amq `-H' option +--------------------- + +Print a brief help and usage string. + + +File: am-utils.info, Node: Amq -l option, Next: Amq -m option, Prev: Amq -H option, Up: Controlling Amd + +7.4.5 Amq `-l' option +--------------------- + +Tell Amd to use log_file as the log file name. For security reasons, +this _must_ be the same log file which Amd used when started. This +option is therefore only useful to refresh Amd's open file handle on +the log file, so that it can be rotated and compressed via daily cron +jobs. + + +File: am-utils.info, Node: Amq -m option, Next: Amq -p option, Prev: Amq -l option, Up: Controlling Amd + +7.4.6 Amq `-m' option +--------------------- + +The `-m' option displays similar information about mounted filesystems, +rather than automount points. The output includes the following +information: + + * the mount information, + + * the mount point, + + * the filesystem type, + + * the number of references to this filesystem, + + * the server hostname, + + * the state of the file server, + + * any error which has occurred. + + For example: + + "root" truth:(pid602) root 1 localhost is up + hesiod.home /home toplvl 1 localhost is up + hesiod.vol /vol toplvl 1 localhost is up + hesiod.homes /homes toplvl 1 localhost is up + amy:/home/amy /a/amy/home/amy nfs 5 amy is up + swan:/home/swan /a/swan/home/swan nfs 0 swan is up (Permission denied) + ex:/home/ex /a/ex/home/ex nfs 0 ex is down + + When the reference count is zero the filesystem is not mounted but +the mount point and server information is still being maintained by Amd. + + +File: am-utils.info, Node: Amq -p option, Next: Amq -P option, Prev: Amq -m option, Up: Controlling Amd + +7.4.7 Amq `-p' option +--------------------- + +Return the process ID of the remote or locally running Amd. Useful +when you need to send a signal to the local Amd process, and would +rather not have to search through the process table. This option is +used in the `ctl-amd' script. + + +File: am-utils.info, Node: Amq -P option, Next: Amq -q option, Prev: Amq -p option, Up: Controlling Amd + +7.4.8 Amq `-P' option +--------------------- + +Contact an alternate running Amd that had registered itself on a +different RPC PROGRAM_NUMBER and apply all other operations to that +instance of the automounter. This is useful when you run multiple +copies of Amd, and need to manage each one separately. If not +specified, Amq will use the default program number for Amd, 300019. +For security reasons, the only alternate program numbers Amd can use +range from 300019 to 300029, inclusive. + + For example, to kill an alternate running Amd: + + kill `amq -p -P 300020` + + +File: am-utils.info, Node: Amq -q option, Next: Amq -s option, Prev: Amq -P option, Up: Controlling Amd + +7.4.9 Amq `-q' option +--------------------- + +Suppress any error messages produced when a synchronous unmount fails. +See *Note Amq -u option::. + + +File: am-utils.info, Node: Amq -s option, Next: Amq -T option, Prev: Amq -q option, Up: Controlling Amd + +7.4.10 Amq `-s' option +---------------------- + +The `-s' option displays global statistics. If any other options are +specified or any filesystems named then this option is ignored. For +example: + + requests stale mount mount unmount + deferred fhandles ok failed failed + 1054 1 487 290 7017 + +`Deferred requests' + are those for which an immediate reply could not be constructed. + For example, this would happen if a background mount was required. + +`Stale filehandles' + counts the number of times the kernel passes a stale filehandle to + Amd. Large numbers indicate problems. + +`Mount ok' + counts the number of automounts which were successful. + +`Mount failed' + counts the number of automounts which failed. + +`Unmount failed' + counts the number of times a filesystem could not be unmounted. + Very large numbers here indicate that the time between unmount + attempts should be increased. + + +File: am-utils.info, Node: Amq -T option, Next: Amq -U option, Prev: Amq -s option, Up: Controlling Amd + +7.4.11 Amq `-T' option +---------------------- + +The `-T' option causes the Amq to contact Amd using the TCP transport +only (connection oriented). Normally, Amq will use TCP first, and if +that failed, will try UDP. + + +File: am-utils.info, Node: Amq -U option, Next: Amq -u option, Prev: Amq -T option, Up: Controlling Amd + +7.4.12 Amq `-U' option +---------------------- + +The `-U' option causes the Amq to contact Amd using the UDP transport +only (connectionless). Normally, Amq will use TCP first, and if that +failed, will try UDP. + + +File: am-utils.info, Node: Amq -u option, Next: Amq -v option, Prev: Amq -U option, Up: Controlling Amd + +7.4.13 Amq `-u' option +---------------------- + +The `-u' option causes the time-to-live interval of the named mount +points to be expired, thus causing an unmount attempt. This is the +only safe way to unmount an automounted filesystem. If `-u' is +repeated, then Amd will attempt to unmount the filesystem +synchronously. This makes things like + + amq -uu /t/cd0d && eject cd0 + +work as expected. Any error messages this might produce can be +suppressed with the `-q' option. See *Note Amq -q option::. + + +File: am-utils.info, Node: Amq -v option, Next: Amq -w option, Prev: Amq -u option, Up: Controlling Amd + +7.4.14 Amq `-v' option +---------------------- + +The `-v' option displays the version of Amd in a similar way to Amd's +`-v' option. + + +File: am-utils.info, Node: Amq -w option, Next: Other Amq options, Prev: Amq -v option, Up: Controlling Amd + +7.4.15 Amq `-w' option +---------------------- + +The `-w' option translates a full pathname as returned by getpwd(3) +into a short Amd pathname that goes through its mount points. This +option requires that Amd is running. + + +File: am-utils.info, Node: Other Amq options, Prev: Amq -w option, Up: Controlling Amd + +7.4.16 Other Amq options +------------------------ + +Two other operations are implemented. These modify the state of Amd as +a whole, rather than any particular filesystem. The `-x' and `-D' +options have exactly the same effect as Amd's corresponding command +line options. + + When Amd receives the `-x' flag, it disallows turning off the +`fatal' or `error' flags. Both are on by default. They are mandatory +so that Amd could report important errors, including errors relating to +turning flags on/off. + + +File: am-utils.info, Node: FSinfo, Next: Hlfsd, Prev: Run-time Administration, Up: Top + +8 FSinfo +******** + +XXX: this chapter should be reviewed by someone knowledgeable with +fsinfo. + +* Menu: + +* FSinfo Overview:: Introduction to FSinfo. +* Using FSinfo:: Basic concepts. +* FSinfo Grammar:: Language syntax, semantics and examples. +* FSinfo host definitions:: Defining a new host. +* FSinfo host attributes:: Definable host attributes. +* FSinfo filesystems:: Defining locally attached filesystems. +* FSinfo static mounts:: Defining additional static mounts. +* FSinfo automount definitions:: +* FSinfo Command Line Options:: +* FSinfo errors:: + + +File: am-utils.info, Node: FSinfo Overview, Next: Using FSinfo, Prev: FSinfo, Up: FSinfo + +8.1 FSinfo overview +=================== + +FSinfo is a filesystem management tool. It has been designed to work +with Amd to help system administrators keep track of the ever +increasing filesystem namespace under their control. + + The purpose of FSinfo is to generate all the important standard +filesystem data files from a single set of input data. Starting with a +single data source guarantees that all the generated files are +self-consistent. One of the possible output data formats is a set of +Amd maps which can be used among the set of hosts described in the +input data. + + FSinfo implements a declarative language. This language is +specifically designed for describing filesystem namespace and physical +layouts. The basic declaration defines a mounted filesystem including +its device name, mount point, and all the volumes and access +permissions. FSinfo reads this information and builds an internal map +of the entire network of hosts. Using this map, many different data +formats can be produced including `/etc/fstab', `/etc/exports', Amd +mount maps and `/etc/bootparams'. + + +File: am-utils.info, Node: Using FSinfo, Next: FSinfo Grammar, Prev: FSinfo Overview, Up: FSinfo + +8.2 Using FSinfo +================ + +The basic strategy when using FSinfo is to gather all the information +about all disks on all machines into one set of declarations. For each +machine being managed, the following data is required: + + * Hostname + + * List of all filesystems and, optionally, their mount points. + + * Names of volumes stored on each filesystem. + + * NFS export information for each volume. + + * The list of static filesystem mounts. + + The following information can also be entered into the same +configuration files so that all data can be kept in one place. + + * List of network interfaces + + * IP address of each interface + + * Hardware address of each interface + + * Dumpset to which each filesystem belongs + + * and more ... + + To generate Amd mount maps, the automount tree must also be defined +(*note FSinfo automount definitions::). This will have been designed at +the time the volume names were allocated. Some volume names will not be +automounted, so FSinfo needs an explicit list of which volumes should +be automounted. + + Hostnames are required at several places in the FSinfo language. It +is important to stick to either fully qualified names or unqualified +names. Using a mixture of the two will inevitably result in confusion. + + Sometimes volumes need to be referenced which are not defined in the +set of hosts being managed with FSinfo. The required action is to add a +dummy set of definitions for the host and volume names required. Since +the files generated for those particular hosts will not be used on them, +the exact values used is not critical. + + +File: am-utils.info, Node: FSinfo Grammar, Next: FSinfo host definitions, Prev: Using FSinfo, Up: FSinfo + +8.3 FSinfo grammar +================== + +FSinfo has a relatively simple grammar. Distinct syntactic constructs +exist for each of the different types of data, though they share a +common flavor. Several conventions are used in the grammar fragments +below. + + The notation, list(xxx), indicates a list of zero or more xxx's. +The notation, opt(xxx), indicates zero or one xxx. Items in double +quotes, eg "host", represent input tokens. Items in angle brackets, eg +, represent strings in the input. Strings need not be in +double quotes, except to differentiate them from reserved words. +Quoted strings may include the usual set of C "\" escape sequences with +one exception: a backslash-newline-whitespace sequence is squashed into +a single space character. To defeat this feature, put a further +backslash at the start of the second line. + + At the outermost level of the grammar, the input consists of a +sequence of host and automount declarations. These declarations are +all parsed before they are analyzed. This means they can appear in any +order and cyclic host references are possible. + + fsinfo : list(fsinfo_attr) ; + + fsinfo_attr : host | automount ; + +* Menu: + +* FSinfo host definitions:: +* FSinfo automount definitions:: + + +File: am-utils.info, Node: FSinfo host definitions, Next: FSinfo host attributes, Prev: FSinfo Grammar, Up: FSinfo + +8.4 FSinfo host definitions +=========================== + +A host declaration consists of three parts: a set of machine attribute +data, a list of filesystems physically attached to the machine, and a +list of additional statically mounted filesystems. + + host : "host" host_data list(filesystem) list(mount) ; + + Each host must be declared in this way exactly once. Such things as +the hardware address, the architecture and operating system types and +the cluster name are all specified within the "host data". + + All the disks the machine has should then be described in the "list +of filesystems". When describing disks, you can specify what "volname" +the disk/partition should have and all such entries are built up into a +dictionary which can then be used for building the automounter maps. + + The "list of mounts" specifies all the filesystems that should be +statically mounted on the machine. + +* Menu: + +* FSinfo host attributes:: +* FSinfo filesystems:: +* FSinfo static mounts:: + + +File: am-utils.info, Node: FSinfo host attributes, Next: FSinfo filesystems, Prev: FSinfo host definitions, Up: FSinfo host definitions + +8.5 FSinfo host attributes +========================== + +The host data, "host_data", always includes the "hostname". In +addition, several other host attributes can be given. + + host_data : + | "{" list(host_attrs) "}" + ; + + host_attrs : host_attr "=" + | netif + ; + + host_attr : "config" + | "arch" + | "os" + | "cluster" + ; + + The "hostname" is, typically, the fully qualified hostname of the +machine. + + Examples: + + host dylan.doc.ic.ac.uk + + host { + os = hpux + arch = hp300 + } dougal.doc.ic.ac.uk + + The options that can be given as host attributes are shown below. + +* Menu: + +* FSinfo netif Option:: FSinfo host netif. +* FSinfo config Option:: FSinfo host config. +* FSinfo arch Option:: FSinfo host arch. +* FSinfo os Option:: FSinfo host os. +* FSinfo cluster Option:: FSinfo host cluster. + + +File: am-utils.info, Node: FSinfo netif Option, Next: FSinfo config Option, Up: FSinfo host attributes + +8.5.1 netif Option +------------------ + +This defines the set of network interfaces configured on the machine. +The interface attributes collected by FSinfo are the IP address, subnet +mask and hardware address. Multiple interfaces may be defined for +hosts with several interfaces by an entry for each interface. The +values given are sanity checked, but are currently unused for anything +else. + + netif : "netif" "{" list(netif_attrs) "}" ; + + netif_attrs : netif_attr "=" ; + + netif_attr : "inaddr" | "netmask" | "hwaddr" ; + + Examples: + + netif ie0 { + inaddr = 129.31.81.37 + netmask = 0xfffffe00 + hwaddr = "08:00:20:01:a6:a5" + } + + netif ec0 { } + + +File: am-utils.info, Node: FSinfo config Option, Next: FSinfo arch Option, Prev: FSinfo netif Option, Up: FSinfo host attributes + +8.5.2 config Option +------------------- + +This option allows you to specify configuration variables for the +startup scripts (`rc' scripts). A simple string should immediately +follow the keyword. + + Example: + + config "NFS_SERVER=true" + config "ZEPHYR=true" + + This option is currently unsupported. + + +File: am-utils.info, Node: FSinfo arch Option, Next: FSinfo os Option, Prev: FSinfo config Option, Up: FSinfo host attributes + +8.5.3 arch Option +----------------- + +This defines the architecture of the machine. For example: + + arch = hp300 + + This is intended to be of use when building architecture specific +mountmaps, however, the option is currently unsupported. + + +File: am-utils.info, Node: FSinfo os Option, Next: FSinfo cluster Option, Prev: FSinfo arch Option, Up: FSinfo host attributes + +8.5.4 os Option +--------------- + +This defines the operating system type of the host. For example: + + os = hpux + + This information is used when creating the `fstab' files, for +example in choosing which format to use for the `fstab' entries within +the file. + + +File: am-utils.info, Node: FSinfo cluster Option, Prev: FSinfo os Option, Up: FSinfo host attributes + +8.5.5 cluster Option +-------------------- + +This is used for specifying in which cluster the machine belongs. For +example: + + cluster = "theory" + + The cluster is intended to be used when generating the automount +maps, although it is currently unsupported. + + +File: am-utils.info, Node: FSinfo filesystems, Next: FSinfo static mounts, Prev: FSinfo host attributes, Up: FSinfo host definitions + +8.6 FSinfo filesystems +====================== + +The list of physically attached filesystems follows the machine +attributes. These should define all the filesystems available from this +machine, whether exported or not. In addition to the device name, +filesystems have several attributes, such as filesystem type, mount +options, and `fsck' pass number which are needed to generate `fstab' +entries. + + filesystem : "fs" "{" list(fs_data) "}" ; + + fs_data : fs_data_attr "=" + | mount + ; + + fs_data_attr + : "fstype" | "opts" | "passno" + | "freq" | "dumpset" | "log" + ; + + Here, is the device name of the disk (for example, +`/dev/dsk/2s0'). The device name is used for building the mount maps +and for the `fstab' file. The attributes that can be specified are +shown in the following section. + + The FSinfo configuration file for `dylan.doc.ic.ac.uk' is listed +below. + + host dylan.doc.ic.ac.uk + + fs /dev/dsk/0s0 { + fstype = swap + } + + fs /dev/dsk/0s0 { + fstype = hfs + opts = rw,noquota,grpid + passno = 0; + freq = 1; + mount / { } + } + + fs /dev/dsk/1s0 { + fstype = hfs + opts = defaults + passno = 1; + freq = 1; + mount /usr { + local { + exportfs "dougal eden dylan zebedee brian" + volname /nfs/hp300/local + } + } + } + + fs /dev/dsk/2s0 { + fstype = hfs + opts = defaults + passno = 1; + freq = 1; + mount default { + exportfs "toytown_clients hangers_on" + volname /home/dylan/dk2 + } + } + + fs /dev/dsk/3s0 { + fstype = hfs + opts = defaults + passno = 1; + freq = 1; + mount default { + exportfs "toytown_clients hangers_on" + volname /home/dylan/dk3 + } + } + + fs /dev/dsk/5s0 { + fstype = hfs + opts = defaults + passno = 1; + freq = 1; + mount default { + exportfs "toytown_clients hangers_on" + volname /home/dylan/dk5 + } + } + +* Menu: + +* FSinfo fstype Option:: FSinfo filesystems fstype. +* FSinfo opts Option:: FSinfo filesystems opts. +* FSinfo passno Option:: FSinfo filesystems passno. +* FSinfo freq Option:: FSinfo filesystems freq. +* FSinfo mount Option:: FSinfo filesystems mount. +* FSinfo dumpset Option:: FSinfo filesystems dumpset. +* FSinfo log Option:: FSinfo filesystems log. + + +File: am-utils.info, Node: FSinfo fstype Option, Next: FSinfo opts Option, Up: FSinfo filesystems + +8.6.1 fstype Option +------------------- + +This specifies the type of filesystem being declared and will be placed +into the `fstab' file as is. The value of this option will be handed +to `mount' as the filesystem type--it should have such values as `4.2', +`nfs' or `swap'. The value is not examined for correctness. + + There is one special case. If the filesystem type is specified as +`export' then the filesystem information will not be added to the +host's `fstab' information, but it will still be visible on the +network. This is useful for defining hosts which contain referenced +volumes but which are not under full control of FSinfo. + + Example: + + fstype = swap + + +File: am-utils.info, Node: FSinfo opts Option, Next: FSinfo passno Option, Prev: FSinfo fstype Option, Up: FSinfo filesystems + +8.6.2 opts Option +----------------- + +This defines any options that should be given to mount(8) in the +`fstab' file. For example: + + opts = rw,nosuid,grpid + + +File: am-utils.info, Node: FSinfo passno Option, Next: FSinfo freq Option, Prev: FSinfo opts Option, Up: FSinfo filesystems + +8.6.3 passno Option +------------------- + +This defines the fsck(8) pass number in which to check the filesystem. +This value will be placed into the `fstab' file. + + Example: + + passno = 1 + + +File: am-utils.info, Node: FSinfo freq Option, Next: FSinfo mount Option, Prev: FSinfo passno Option, Up: FSinfo filesystems + +8.6.4 freq Option +----------------- + +This defines the interval (in days) between dumps. The value is placed +as is into the `fstab' file. + + Example: + + freq = 3 + + +File: am-utils.info, Node: FSinfo mount Option, Next: FSinfo dumpset Option, Prev: FSinfo freq Option, Up: FSinfo filesystems + +8.6.5 mount Option +------------------ + +This defines the mountpoint at which to place the filesystem. If the +mountpoint of the filesystem is specified as `default', then the +filesystem will be mounted in the automounter's tree under its volume +name and the mount will automatically be inherited by the automounter. + + Following the mountpoint, namespace information for the filesystem +may be described. The options that can be given here are `exportfs', +`volname' and `sel'. + + The format is: + + mount : "mount" vol_tree ; + + vol_tree : list(vol_tree_attr) ; + + vol_tree_attr + : "{" list(vol_tree_info) vol_tree "}" ; + + vol_tree_info + : "exportfs" + | "volname" + | "sel" + ; + + Example: + + mount default { + exportfs "dylan dougal florence zebedee" + volname /vol/andrew + } + + In the above example, the filesystem currently being declared will +have an entry placed into the `exports' file allowing the filesystem to +be exported to the machines `dylan', `dougal', `florence' and +`zebedee'. The volume name by which the filesystem will be referred to +remotely, is `/vol/andrew'. By declaring the mountpoint to be +`default', the filesystem will be mounted on the local machine in the +automounter tree, where Amd will automatically inherit the mount as +`/vol/andrew'. + +`exportfs' + a string defining which machines the filesystem may be exported to. + This is copied, as is, into the `exports' file--no sanity checking + is performed on this string. + +`volname' + a string which declares the remote name by which to reference the + filesystem. The string is entered into a dictionary and allows + you to refer to this filesystem in other places by this volume + name. + +`sel' + a string which is placed into the automounter maps as a selector + for the filesystem. + + + +File: am-utils.info, Node: FSinfo dumpset Option, Next: FSinfo log Option, Prev: FSinfo mount Option, Up: FSinfo filesystems + +8.6.6 dumpset Option +-------------------- + +This provides support for Imperial College's local file backup tools and +is not documented further here. + + +File: am-utils.info, Node: FSinfo log Option, Prev: FSinfo dumpset Option, Up: FSinfo filesystems + +8.6.7 log Option +---------------- + +Specifies the log device for the current filesystem. This is ignored if +not required by the particular filesystem type. + + +File: am-utils.info, Node: FSinfo static mounts, Next: FSinfo automount definitions, Prev: FSinfo filesystems, Up: FSinfo host definitions + +8.7 FSinfo static mounts +======================== + +Each host may also have a number of statically mounted filesystems. For +example, the host may be a diskless workstation in which case it will +have no `fs' declarations. In this case the `mount' declaration is +used to determine from where its filesystems will be mounted. In +addition to being added to the `fstab' file, this information can also +be used to generate a suitable `bootparams' file. + + mount : "mount" list(localinfo) ; + + localinfo : localinfo_attr ; + + localinfo_attr + : "as" + | "from" + | "fstype" + | "opts" + ; + + The filesystem specified to be mounted will be searched for in the +dictionary of volume names built when scanning the list of hosts' +definitions. + + The attributes have the following semantics: +`from MACHINE' + mount the filesystem from the machine with the hostname of + "machine". + +`as MOUNTPOINT' + mount the filesystem locally as the name given, in case this is + different from the advertised volume name of the filesystem. + +`opts OPTIONS' + native mount(8) options. + +`fstype TYPE' + type of filesystem to be mounted. + + An example: + + mount /export/exec/hp300/local as /usr/local + + If the mountpoint specified is either `/' or `swap', the machine +will be considered to be booting off the net and this will be noted for +use in generating a `bootparams' file for the host which owns the +filesystems. + + +File: am-utils.info, Node: FSinfo automount definitions, Next: FSinfo Command Line Options, Prev: FSinfo static mounts, Up: FSinfo + +8.8 Defining an Amd Mount Map in FSinfo +======================================= + +The maps used by Amd can be constructed from FSinfo by defining all the +automount trees. FSinfo takes all the definitions found and builds one +map for each top level tree. + + The automount tree is usually defined last. A single automount +configuration will usually apply to an entire management domain. One +`automount' declaration is needed for each Amd automount point. FSinfo +determines whether the automount point is "direct" (*note Direct +Automount Filesystem::) or "indirect" (*note Top-level Filesystem::). +Direct automount points are distinguished by the fact that there is no +underlying "automount_tree". + + automount : "automount" opt(auto_opts) automount_tree ; + + auto_opts : "opts" ; + + automount_tree + : list(automount_attr) + ; + + automount_attr + : "=" + | "->" + | "{" automount_tree "}" + ; + + If is given, then it is the string to be placed in +the maps for Amd for the `opts' option. + + A "map" is typically a tree of filesystems, for example `home' +normally contains a tree of filesystems representing other machines in +the network. + + A map can either be given as a name representing an already defined +volume name, or it can be a tree. A tree is represented by placing +braces after the name. For example, to define a tree `/vol', the +following map would be defined: + + automount /vol { } + + Within a tree, the only items that can appear are more maps. For +example: + + automount /vol { + andrew { } + X11 { } + } + + In this case, FSinfo will look for volumes named `/vol/andrew' and +`/vol/X11' and a map entry will be generated for each. If the volumes +are defined more than once, then FSinfo will generate a series of +alternate entries for them in the maps. + + Instead of a tree, either a link (NAME `->' DESTINATION) or a +reference can be specified (NAME `=' DESTINATION). A link creates a +symbolic link to the string specified, without further processing the +entry. A reference will examine the destination filesystem and +optimize the reference. For example, to create an entry for `njw' in +the `/homes' map, either of the two forms can be used: + + automount /homes { + njw -> /home/dylan/njw + } + + or + + automount /homes { + njw = /home/dylan/njw + } + + In the first example, when `/homes/njw' is referenced from Amd, a +link will be created leading to `/home/dylan/njw' and the automounter +will be referenced a second time to resolve this filename. The map +entry would be: + + njw type:=link;fs:=/home/dylan/njw + + In the second example, the destination directory is analyzed and +found to be in the filesystem `/home/dylan' which has previously been +defined in the maps. Hence the map entry will look like: + + njw rhost:=dylan;rfs:=/home/dylan;sublink:=njw + + Creating only one symbolic link, and one access to Amd. + + +File: am-utils.info, Node: FSinfo Command Line Options, Next: FSinfo errors, Prev: FSinfo automount definitions, Up: FSinfo + +8.9 FSinfo Command Line Options +=============================== + +FSinfo is started from the command line by using the command: + + fsinfo [options] files ... + + The input to FSinfo is a single set of definitions of machines and +automount maps. If multiple files are given on the command-line, then +the files are concatenated together to form the input source. The files +are passed individually through the C pre-processor before being parsed. + + Several options define a prefix for the name of an output file. If +the prefix is not specified no output of that type is produced. The +suffix used will correspond either to the hostname to which a file +belongs, or to the type of output if only one file is produced. +Dumpsets and the `bootparams' file are in the latter class. To put the +output into a subdirectory simply put a `/' at the end of the prefix, +making sure that the directory has already been made before running +Fsinfo. + +* Menu: + +* -a FSinfo Option:: Amd automount directory: +* -b FSinfo Option:: Prefix for bootparams files. +* -d FSinfo Option:: Prefix for dumpset data files. +* -e FSinfo Option:: Prefix for exports files. +* -f FSinfo Option:: Prefix for fstab files. +* -h FSinfo Option:: Local hostname. +* -m FSinfo Option:: Prefix for automount maps. +* -q FSinfo Option:: Ultra quiet mode. +* -v FSinfo Option:: Verbose mode. +* -I FSinfo Option:: Define new #include directory. +* -D-FSinfo Option:: Define macro. +* -U FSinfo Option:: Undefine macro. + + +File: am-utils.info, Node: -a FSinfo Option, Next: -b FSinfo Option, Prev: FSinfo Command Line Options, Up: FSinfo Command Line Options + +8.9.1 `-a' AUTODIR +------------------ + +Specifies the directory name in which to place the automounter's +mountpoints. This defaults to `/a'. Some sites have the autodir set +to be `/amd', and this would be achieved by: + + fsinfo -a /amd ... + + +File: am-utils.info, Node: -b FSinfo Option, Next: -d FSinfo Option, Prev: -a FSinfo Option, Up: FSinfo Command Line Options + +8.9.2 `-b' BOOTPARAMS +--------------------- + +This specifies the prefix for the `bootparams' filename. If it is not +given, then the file will not be generated. The `bootparams' file will +be constructed for the destination machine and will be placed into a +file named `bootparams' and prefixed by this string. The file +generated contains a list of entries describing each diskless client +that can boot from the destination machine. + + As an example, to create a `bootparams' file in the directory +`generic', the following would be used: + + fsinfo -b generic/ ... + + +File: am-utils.info, Node: -d FSinfo Option, Next: -e FSinfo Option, Prev: -b FSinfo Option, Up: FSinfo Command Line Options + +8.9.3 `-d' DUMPSETS +------------------- + +This specifies the prefix for the `dumpsets' file. If it is not +specified, then the file will not be generated. The file will be for +the destination machine and will be placed into a filename `dumpsets', +prefixed by this string. The `dumpsets' file is for use by Imperial +College's local backup system. + + For example, to create a `dumpsets' file in the directory `generic', +then you would use the following: + + fsinfo -d generic/ ... + + +File: am-utils.info, Node: -e FSinfo Option, Next: -f FSinfo Option, Prev: -d FSinfo Option, Up: FSinfo Command Line Options + +8.9.4 `-e' EXPORTFS +------------------- + +Defines the prefix for the `exports' files. If it is not given, then +the file will not be generated. For each machine defined in the +configuration files as having disks, an `exports' file is constructed +and given a filename determined by the name of the machine, prefixed +with this string. If a machine is defined as diskless, then no +`exports' file will be created for it. The files contain entries for +directories on the machine that may be exported to clients. + + Example: To create the `exports' files for each diskfull machine and +place them into the directory `exports': + + fsinfo -e exports/ ... + + +File: am-utils.info, Node: -f FSinfo Option, Next: -h FSinfo Option, Prev: -e FSinfo Option, Up: FSinfo Command Line Options + +8.9.5 `-f' FSTAB +---------------- + +This defines the prefix for the `fstab' files. The files will only be +created if this prefix is defined. For each machine defined in the +configuration files, a `fstab' file is created with the filename +determined by prefixing this string with the name of the machine. These +files contain entries for filesystems and partitions to mount at boot +time. + + Example, to create the files in the directory `fstabs': + + fsinfo -f fstabs/ ... + + +File: am-utils.info, Node: -h FSinfo Option, Next: -m FSinfo Option, Prev: -f FSinfo Option, Up: FSinfo Command Line Options + +8.9.6 `-h' HOSTNAME +------------------- + +Defines the hostname of the destination machine to process for. If this +is not specified, it defaults to the local machine name, as returned by +gethostname(2). + + Example: + + fsinfo -h dylan.doc.ic.ac.uk ... + + +File: am-utils.info, Node: -m FSinfo Option, Next: -q FSinfo Option, Prev: -h FSinfo Option, Up: FSinfo Command Line Options + +8.9.7 `-m' MOUNT-MAPS +--------------------- + +Defines the prefix for the automounter files. The maps will only be +produced if this prefix is defined. The mount maps suitable for the +network defined by the configuration files will be placed into files +with names calculated by prefixing this string to the name of each map. + + For example, to create the automounter maps and place them in the +directory `automaps': + + fsinfo -m automaps/ ... + + +File: am-utils.info, Node: -q FSinfo Option, Next: -v FSinfo Option, Prev: -m FSinfo Option, Up: FSinfo Command Line Options + +8.9.8 `-q' +---------- + +Selects quiet mode. FSinfo suppress the "running commentary" and only +outputs any error messages which are generated. + + +File: am-utils.info, Node: -v FSinfo Option, Next: -D-FSinfo Option, Prev: -q FSinfo Option, Up: FSinfo Command Line Options + +8.9.9 `-v' +---------- + +Selects verbose mode. When this is activated, the program will display +more messages, and display all the information discovered when +performing the semantic analysis phase. Each verbose message is output +to `stdout' on a line starting with a `#' character. + + +File: am-utils.info, Node: -D-FSinfo Option, Next: -I FSinfo Option, Prev: -v FSinfo Option, Up: FSinfo Command Line Options + +8.9.10 `-D' NAME[=defn] +----------------------- + +Defines a symbol "name" for the preprocessor when reading the +configuration files. Equivalent to `#define' directive. + + +File: am-utils.info, Node: -I FSinfo Option, Next: -U FSinfo Option, Prev: -D-FSinfo Option, Up: FSinfo Command Line Options + +8.9.11 `-I' DIRECTORY +--------------------- + +This option is passed into the preprocessor for the configuration files. +It specifies directories in which to find include files + + +File: am-utils.info, Node: -U FSinfo Option, Prev: -I FSinfo Option, Up: FSinfo Command Line Options + +8.9.12 `-U' NAME +---------------- + +Removes any initial definition of the symbol "name". Inverse of the +`-D' option. + + +File: am-utils.info, Node: FSinfo errors, Prev: FSinfo Command Line Options, Up: FSinfo + +8.10 Errors produced by FSinfo +============================== + +The following table documents the errors and warnings which FSinfo may +produce. + +" expected + Occurs if an unescaped newline is found in a quoted string. + +ambiguous mount: VOLUME is a replicated filesystem + If several filesystems are declared as having the same volume + name, they will be considered replicated filesystems. To mount a + replicated filesystem statically, a specific host will need to be + named, to say which particular copy to try and mount, else this + error will result. + +can't open FILENAME for writing + Occurs if any errors are encountered when opening an output file. + +cannot determine localname since volname VOLUME is not uniquely defined + If a volume is replicated and an attempt is made to mount the + filesystem statically without specifying a local mountpoint, + FSinfo cannot calculate a mountpoint, as the desired pathname + would be ambiguous. + +DEVICE has duplicate exportfs data + Produced if the `exportfs' option is used multiple times within the + same branch of a filesystem definition. For example, if you + attempt to set the `exportfs' data at different levels of the + mountpoint directory tree. + +dump frequency for HOST:DEVICE is non-zero + Occurs if DEVICE has its `fstype' declared to be `swap' or + `export' and the `dump' option is set to a value greater than + zero. Swap devices should not be dumped. + +duplicate host HOSTNAME! + If a host has more than one definition. + +end of file within comment + A comment was unterminated before the end of one of the + configuration files. + +FILENAME: cannot open for reading + If a file specified on the command line as containing + configuration data could not be opened. + +FILESYSTEM has a volname but no exportfs data + Occurs when a volume name is declared for a file system, but the + string specifying what machines the filesystem can be exported to + is missing. + +fs field "FIELD-NAME" already set + Occurs when multiple definitions are given for one of the + attributes of a host's filesystem. + +host field "FIELD-NAME" already set + If duplicate definitions are given for any of the fields with a + host definition. + +HOST:DEVICE has more than one mount point + Occurs if the mount option for a host's filesystem specifies + multiple trees at which to place the mountpoint. + +HOST:DEVICE has no mount point + Occurs if the `mount' option is not specified for a host's + filesystem. + +HOST:DEVICE needs field "FIELD-NAME" + Occurs when a filesystem is missing a required field. FIELD-NAME + could be one of `fstype', `opts', `passno' or `mount'. + +HOST:mount field specified for swap partition + Occurs if a mountpoint is given for a filesystem whose type is + declared to be `swap'. + +malformed IP dotted quad: ADDRESS + If the Internet address of an interface is incorrectly specified. + An Internet address definition is handled to inet_addr(3N) to see + if it can cope. If not, then this message will be displayed. + +malformed netmask: NETMASK + If the netmask cannot be decoded as though it were a hexadecimal + number, then this message will be displayed. It will typically be + caused by incorrect characters in the NETMASK value. + +mount field "FIELD-NAME" already set + Occurs when a static mount has multiple definitions of the same + field. + +mount tree field "FIELD-NAME" already set + Occurs when the FIELD-NAME is defined more than once during the + definition of a filesystems mountpoint. + +netif field FIELD-NAME already set + Occurs if you attempt to define an attribute of an interface more + than once. + +network booting requires both root and swap areas + Occurs if a machine has mount declarations for either the root + partition or the swap area, but not both. You cannot define a + machine to only partially boot via the network. + +no disk mounts on HOSTNAME + If there are no static mounts, nor local disk mounts specified for + a machine, this message will be displayed. + +no volname given for HOST:DEVICE + Occurs when a filesystem is defined to be mounted on `default', but + no volume name is given for the file system, then the mountpoint + cannot be determined. + +not allowed '/' in a directory name + Occurs when a pathname with multiple directory elements is + specified as the name for an automounter tree. A tree should only + have one name at each level. + +pass number for HOST:DEVICE is non-zero + Occurs if DEVICE has its `fstype' declared to be `swap' or + `export' and the fsck(8) pass number is set. Swap devices should + not be fsck'd. *Note FSinfo fstype Option::. + +sub-directory DIRECTORY of DIRECTORY-TREE starts with '/' + Within the filesystem specification for a host, if an element + DIRECTORY of the mountpoint begins with a `/' and it is not the + start of the tree. + +sub-directory of DIRECTORY-TREE is named "default" + `default' is a keyword used to specify if a mountpoint should be + automatically calculated by FSinfo. If you attempt to specify a + directory name as this, it will use the filename of `default' but + will produce this warning. + +unknown \ sequence + Occurs if an unknown escape sequence is found inside a string. + Within a string, you can give the standard C escape sequences for + strings, such as newlines and tab characters. + +unknown directory attribute + If an unknown keyword is found while reading the definition of a + host's filesystem mount option. + +unknown filesystem attribute + Occurs if an unrecognized keyword is used when defining a host's + filesystems. + +unknown host attribute + Occurs if an unrecognized keyword is used when defining a host. + +unknown mount attribute + Occurs if an unrecognized keyword is found while parsing the list + of static mounts. + +unknown volname VOLUME automounted [ on name ] + Occurs if VOLUME is used in a definition of an automount map but + the volume name has not been declared during the host filesystem + definitions. + +volname VOLUME is unknown + Occurs if an attempt is made to mount or reference a volume name + which has not been declared during the host filesystem definitions. + +volname VOLUME not exported from MACHINE + Occurs if you attempt to mount the volume VOLUME from a machine + which has not declared itself to have such a filesystem available. + + + +File: am-utils.info, Node: Hlfsd, Next: Assorted Tools, Prev: FSinfo, Up: Top + +9 Hlfsd +******* + +Hlfsd is a daemon which implements a filesystem containing a symbolic +link to subdirectory within a user's home directory, depending on the +user which accessed that link. It was primarily designed to redirect +incoming mail to users' home directories, so that it can be read from +anywhere. It was designed and implemented by Erez Zadok +(http://www.cs.sunysb.edu/~ezk) and Alexander Dupuy , at the Computer Science Department +(http://www.cs.columbia.edu/) of Columbia University +(http://www.columbia.edu/). A paper +(http://www.fsl.cs.sunysb.edu/docs/hlfsd/hlfsd.html) on Hlfsd was +presented at the Usenix LISA VII conference in 1993. + + Hlfsd operates by mounting itself as an NFS server for the directory +containing linkname, which defaults to `/hlfs/home'. Lookups within +that directory are handled by Hlfsd, which uses the password map to +determine how to resolve the lookup. The directory will be created if +it doesn't already exist. The symbolic link will be to the accessing +user's home directory, with subdir appended to it. If not specified, +subdir defaults to `.hlfsdir'. This directory will also be created if +it does not already exist. + + A `SIGTERM' sent to Hlfsd will cause it to shutdown. A `SIGHUP' +will flush the internal caches, and reload the password map. It will +also close and reopen the log file, to enable the original log file to +be removed or rotated. A `SIGUSR1' will cause it to dump its internal +table of user IDs and home directories to the file `/tmp/hlfsddump'. + +* Menu: + +* Introduction to Hlfsd:: +* Background to Mail Delivery:: +* Using Hlfsd:: + + +File: am-utils.info, Node: Introduction to Hlfsd, Next: Background to Mail Delivery, Prev: Hlfsd, Up: Hlfsd + +9.1 Introduction to Hlfsd +========================= + +Electronic mail has become one of the major applications for many +computer networks, and use of this service is expected to increase over +time, as networks proliferate and become faster. Providing a convenient +environment for users to read, compose, and send electronic mail has +become a requirement for systems administrators (SAs). + + Widely used methods for handling mail usually require users to be +logged into a designated "home" machine, where their mailbox files +reside. Only on that one machine can they read newly arrived mail. +Since users have to be logged into that system to read their mail, they +often find it convenient to run all of their other processes on that +system as well, including memory and CPU-intensive jobs. For example, +in our department, we have allocated and configured several +multi-processor servers to handle such demanding CPU/memory +applications, but these were underutilized, in large part due to the +inconvenience of not being able to read mail on those machines. (No +home directories were located on these designated CPU-servers, since we +did not want NFS service for users' home directories to have to compete +with CPU-intensive jobs. At the same time, we discouraged users from +running demanding applications on their home machines.) + + Many different solutions have been proposed to allow users to read +their mail on any host. However, all of these solutions fail in one or +more of several ways: + + * they introduce new single points of failure + + * they require using different mail transfer agents (MTAs) or user + agents (UAs) + + * they do not solve the problem for all cases, i.e. the solution is + only partially successful for a particular environment. + + + We have designed a simple filesystem, called the "Home-Link File +System", to provide the ability to deliver mail to users' home +directories, without modification to mail-related applications. We have +endeavored to make it as stable as possible. Of great importance to us +was to make sure the HLFS daemon, `hlfsd' , would not hang under any +circumstances, and would take the next-best action when faced with +problems. Compared to alternative methods, Hlfsd is a stable, more +general solution, and easier to install/use. In fact, in some ways, we +have even managed to improve the reliability and security of mail +service. + + Our server implements a small filesystem containing a symbolic link +to a subdirectory of the invoking user's home directory, and named +symbolic links to users' mailbox files. + + The Hlfsd server finds out the UID of the process that is accessing +its mount point, and resolves the pathname component `home' as a +symbolic link to a subdirectory within the home directory given by the +UID's entry in the password file. If the GID of the process that +attempts to access a mailbox file is a special one (called HLFS_GID), +then the server maps the name of the _next_ pathname component directly +to the user's mailbox. This is necessary so that access to a mailbox +file by users other than the owner can succeed. The server has safety +features in case of failures such as hung filesystems or home directory +filesystems that are inaccessible or full. + + On most of our machines, mail gets delivered to the directory +`/var/spool/mail'. Many programs, including UAs, depend on that path. +Hlfsd creates a directory `/mail', and mounts itself on top of that +directory. Hlfsd implements the path name component called `home', +pointing to a subdirectory of the user's home directory. We have made +`/var/spool/mail' a symbolic link to `/mail/home', so that accessing +`/var/spool/mail' actually causes access to a subdirectory within a +user's home directory. + + The following table shows an example of how resolving the pathname +`/var/mail/NAME' to `/users/ezk/.mailspool/NAME' proceeds. + +Resolving Component Pathname left to resolve Value if symbolic link +/ var/mail/NAME +var/ mail/NAME +mail@ /mail/home/NAME mail@ -> /mail/home +/ mail/home/NAME +mail/ home/NAME +home@ NAME home@ -> + /users/ezk/.mailspool +/ users/ezk/.mailspool/NAME +users/ ezk/.mailspool/NAME +ezk/ .mailspool/NAME +.mailspool/ NAME +NAME + + +File: am-utils.info, Node: Background to Mail Delivery, Next: Using Hlfsd, Prev: Introduction to Hlfsd, Up: Hlfsd + +9.2 Background to Mail Delivery +=============================== + +This section provides an in-depth discussion of why available methods +for delivering mail to home directories are not as good as the one used +by Hlfsd. + +* Menu: + +* Single-Host Mail Spool Directory:: +* Centralized Mail Spool Directory:: +* Distributed Mail Spool Service:: +* Why Deliver Into the Home Directory?:: + + +File: am-utils.info, Node: Single-Host Mail Spool Directory, Next: Centralized Mail Spool Directory, Prev: Background to Mail Delivery, Up: Background to Mail Delivery + +9.2.1 Single-Host Mail Spool Directory +-------------------------------------- + +The most common method for mail delivery is for mail to be appended to a +mailbox file in a standard spool directory on the designated "mail +home" machine of the user. The greatest advantage of this method is +that it is the default method most vendors provide with their systems, +thus very little (if any) configuration is required on the SA's part. +All they need to set up are mail aliases directing mail to the host on +which the user's mailbox file is assigned. (Otherwise, mail is +delivered locally, and users find mailboxes on many machines.) + + As users become more sophisticated, and aided by windowing systems, +they find themselves logging in on multiple hosts at once, performing +several tasks concurrently. They ask to be able to read their mail on +any host on the network, not just the one designated as their "mail +home". + + +File: am-utils.info, Node: Centralized Mail Spool Directory, Next: Distributed Mail Spool Service, Prev: Single-Host Mail Spool Directory, Up: Background to Mail Delivery + +9.2.2 Centralized Mail Spool Directory +-------------------------------------- + +A popular method for providing mail readability from any host is to have +all mail delivered to a mail spool directory on a designated +"mail-server" which is exported via NFS to all of the hosts on the +network. Configuring such a system is relatively easy. On most +systems, the bulk of the work is a one-time addition to one or two +configuration files in `/etc'. The file-server's spool directory is +then hard-mounted across every machine on the local network. In small +environments with only a handful of hosts this can be an acceptable +solution. In our department, with a couple of hundred active hosts and +thousands of mail messages processed daily, this was deemed completely +unacceptable, as it introduced several types of problems: + +Scalability and Performance + As more and more machines get added to the network, more mail + traffic has to go over NFS to and from the mail-server. Users like + to run mail-watchers, and read their mail often. The stress on the + shared infrastructure increases with every user and host added; + loads on the mail server would most certainly be high since all + mail delivery goes through that one machine.(1) This leads to + lower reliability and performance. To reduce the number of + concurrent connections between clients and the server host, some + SAs have resorted to automounting the mail-spool directory. But + this solution only makes things worse: since users often run mail + watchers, and many popular applications such as `trn', `emacs', + `csh' or `ksh' check periodically for new mail, the automounted + directory would be effectively permanently mounted. If it gets + unmounted automatically by the automounter program, it is most + likely to get mounted shortly afterwards, consuming more I/O + resources by the constant cycle of mount and umount calls. + +Reliability + The mail-server host and its network connectivity must be very + reliable. Worse, since the spool directory has to be + hard-mounted,(2) many processes which access the spool directory + (various shells, `login', `emacs', etc.) would be hung as long as + connectivity to the mail-server is severed. To improve + reliability, SAs may choose to backup the mail-server's spool + partition several times a day. This may make things worse since + reading or delivering mail while backups are in progress may cause + backups to be inconsistent; more backups consume more backup-media + resources, and increase the load on the mail-server host. + + + ---------- Footnotes ---------- + + (1) Delivery via NFS-mounted filesystems may require usage of +`rpc.lockd' and `rpc.statd' to provide distributed file-locking, both +of which are widely regarded as unstable and unreliable. Furthermore, +this will degrade performance, as local processes as well as remote +`nfsd' processes are kept busy. + + (2) No SA in their right minds would soft-mount read/write +partitions -- the chances for data loss are too great. + + +File: am-utils.info, Node: Distributed Mail Spool Service, Next: Why Deliver Into the Home Directory?, Prev: Centralized Mail Spool Directory, Up: Background to Mail Delivery + +9.2.3 Distributed Mail Spool Service +------------------------------------ + +Despite the existence of a few systems that support delivery to users' +home directories, mail delivery to home directories hasn't caught on. +We believe the main reason is that there are too many programs that +"know" where mailbox files reside. Besides the obvious (the delivery +program `/bin/mail' and mail readers like `/usr/ucb/Mail', `mush', +`mm', etc.), other programs that know mailbox location are login, from, +almost every shell, `xbiff', `xmailbox', and even some programs not +directly related to mail, such as `emacs' and `trn'. Although some of +these programs can be configured to look in different directories with +the use of environment variables and other resources, many of them +cannot. The overall porting work is significant. + + Other methods that have yet to catch on require the use of a special +mail-reading server, such as IMAP or POP. The main disadvantage of +these systems is that UAs need to be modified to use these services -- +a long and involved task. That is why they are not popular at this +time. + + Several other ideas have been proposed and even used in various +environments. None of them is robust. They are mostly very +specialized, inflexible, and do not extend to the general case. Some of +the ideas are plain bad, potentially leading to lost or corrupt mail: + +automounters + Using an automounter such as Amd to provide a set of symbolic links + from the normal spool directory to user home directories is not + sufficient. UAs rename, unlink, and recreate the mailbox as a + regular file, therefore it must be a real file, not a symbolic + link. Furthermore, it must reside in a real directory which is + writable by the UAs and MTAs. This method may also require + populating `/var/spool/mail' with symbolic links and making sure + they are updated. Making Amd manage that directory directly + fails, since many various lock files need to be managed as well. + Also, Amd does not provide all of the NFS operations which are + required to write mail such as write, create, remove, and unlink. + +`$MAIL' + Setting this variable to an automounted directory pointing to the + user's mail spool host only solves the problem for those programs + which know and use `$MAIL'. Many programs don't, therefore this + solution is partial and of limited flexibility. Also, it requires + the SAs or the users to set it themselves -- an added level of + inconvenience and possible failures. + +/bin/mail + Using a different mail delivery agent could be the solution. One + such example is `hdmail'. However, `hdmail' still requires + modifying all UAs, the MTA's configuration, installing new + daemons, and changing login scripts. This makes the system less + upgradable or compatible with others, and adds one more + complicated system for SAs to deal with. It is not a complete + solution because it still requires each user have their `$MAIL' + variable setup correctly, and that every program use this variable. + + + +File: am-utils.info, Node: Why Deliver Into the Home Directory?, Prev: Distributed Mail Spool Service, Up: Background to Mail Delivery + +9.2.4 Why Deliver Into the Home Directory? +------------------------------------------ + +There are several major reasons why SAs might want to deliver mail +directly into the users' home directories: + +Location + Many mail readers need to move mail from the spool directory to the + user's home directory. It speeds up this operation if the two are + on the same filesystem. If for some reason the user's home + directory is inaccessible, it isn't that useful to be able to read + mail, since there is no place to move it to. In some cases, + trying to move mail to a non-existent or hung filesystem may + result in mail loss. + +Distribution + Having all mail spool directories spread among the many more + filesystems minimizes the chances that complete environments will + grind to a halt when a single server is down. It does increase + the chance that there will be someone who is not able to read + their mail when a machine is down, but that is usually preferred + to having no one be able to read their mail because a centralized + mail server is down. The problem of losing some mail due to the + (presumably) higher chances that a user's machine is down is + minimized in HLFS. + +Security + Delivering mail to users' home directories has another advantage -- + enhanced security and privacy. Since a shared system mail spool + directory has to be world-readable and searchable, any user can see + whether other users have mail, when they last received new mail, + or when they last read their mail. Programs such as `finger' + display this information, which some consider an infringement of + privacy. While it is possible to disable this feature of `finger' + so that remote users cannot see a mailbox file's status, this + doesn't prevent local users from getting the information. + Furthermore, there are more programs which make use of this + information. In shared environments, disabling such programs has + to be done on a system-wide basis, but with mail delivered to + users' home directories, users less concerned with privacy who do + want to let others know when they last received or read mail can + easily do so using file protection bits. + + + In summary, delivering mail to home directories provides users the +functionality sought, and also avoids most of the problems just +discussed. + + +File: am-utils.info, Node: Using Hlfsd, Prev: Background to Mail Delivery, Up: Hlfsd + +9.3 Using Hlfsd +=============== + +* Menu: + +* Controlling Hlfsd:: +* Hlfsd Options:: +* Hlfsd Files:: + + +File: am-utils.info, Node: Controlling Hlfsd, Next: Hlfsd Options, Prev: Using Hlfsd, Up: Using Hlfsd + +9.3.1 Controlling Hlfsd +----------------------- + +Much the same way Amd is controlled by `ctl-amd', so does Hlfsd get +controlled by the `ctl-hlfsd' script: + +ctl-hlfsd start + Start a new Hlfsd. + +ctl-hlfsd stop + Stop a running Hlfsd. + +ctl-hlfsd restart + Stop a running Hlfsd, wait for 10 seconds, and then start a new + one. It is hoped that within 10 seconds, the previously running + Hlfsd terminate properly; otherwise, starting a second one could + cause system lockup. + + + For example, on our systems, we start Hlfsd within `ctl-hlfsd' as +follows on Solaris 2 systems: + + hlfsd -a /var/alt_mail -x all -l /var/log/hlfsd /mail/home .mailspool + + The directory `/var/alt_mail' is a directory in the root partition +where alternate mail will be delivered into, when it cannot be delivered +into the user's home directory. + + Normal mail gets delivered into `/var/mail', but on our systems, +that is a symbolic link to `/mail/home'. `/mail' is managed by Hlfsd, +which creates a dynamic symlink named `home', pointing to the +subdirectory `.mailspool' _within_ the accessing user's home directory. +This results in mail which normally should go to `/var/mail/`$USER'', +to go to ``$HOME'/.mailspool/`$USER''. + + Hlfsd does not create the `/var/mail' symlink. This needs to be +created (manually) once on each host, by the system administrators, as +follows: + + mv /var/mail /var/alt_mail + ln -s /mail/home /var/mail + + Hlfsd also responds to the following signals: + + A `SIGHUP' signal sent to Hlfsd will force it to reload the password +map immediately. + + A `SIGUSR1' signal sent to Hlfsd will cause it to dump its internal +password map to the file `/usr/tmp/hlfsd.dump.XXXXXX', where `XXXXXX' +will be replaced by a random string generated by mktemp(3) or (the more +secure) mkstemp(3). + + +File: am-utils.info, Node: Hlfsd Options, Next: Hlfsd Files, Prev: Controlling Hlfsd, Up: Using Hlfsd + +9.3.2 Hlfsd Options +------------------- + +-a ALT_DIR + Alternate directory. The name of the directory to which the + symbolic link returned by Hlfsd will point, if it cannot access + the home directory of the user. This defaults to `/var/hlfs'. + This directory will be created if it doesn't exist. It is + expected that either users will read these files, or the system + administrators will run a script to resend this "lost mail" to its + owner. + +-c CACHE-INTERVAL + Caching interval. Hlfsd will cache the validity of home + directories for this interval, in seconds. Entries which have + been verified within the last CACHE-INTERVAL seconds will not be + verified again, since the operation could be expensive, and the + entries are most likely still valid. After the interval has + expired, Hlfsd will re-verify the validity of the user's home + directory, and reset the cache time-counter. The default value + for CACHE-INTERVAL is 300 seconds (5 minutes). + +-f + Force fast startup. This option tells Hlfsd to skip startup-time + consistency checks such as existence of mount directory, alternate + spool directory, symlink to be hidden under the mount directory, + their permissions and validity. + +-g GROUP + Set the special group HLFS_GID to GROUP. Programs such as + `/usr/ucb/from' or `/usr/sbin/in.comsat', which access the + mailboxes of other users, must be setgid `HLFS_GID' to work + properly. The default group is `hlfs'. If no group is provided, + and there is no group `hlfs', this feature is disabled. + +-h + Help. Print a brief help message, and exit. + +-i RELOAD-INTERVAL + Map-reloading interval. Each RELOAD-INTERVAL seconds, Hlfsd will + reload the password map. Hlfsd needs the password map for the + UIDs and home directory pathnames. Hlfsd schedules a `SIGALRM' to + reload the password maps. A `SIGHUP' sent to Hlfsd will force it + to reload the maps immediately. The default value for + RELOAD-INTERVAL is 900 seconds (15 minutes.) + +-l LOGFILE + Specify a log file to which Hlfsd will record events. If LOGFILE + is the string `syslog' then the log messages will be sent to the + system log daemon by syslog(3), using the `LOG_DAEMON' facility. + This is also the default. + +-n + No verify. Hlfsd will not verify the validity of the symbolic link + it will be returning, or that the user's home directory contains + sufficient disk-space for spooling. This can speed up Hlfsd at the + cost of possibly returning symbolic links to home directories + which are not currently accessible or are full. By default, Hlfsd + validates the symbolic-link in the background. The `-n' option + overrides the meaning of the `-c' option, since no caching is + necessary. + +-o MOUNT-OPTIONS + Mount options which Hlfsd will use to mount itself on top of + DIRNAME. By default, MOUNT-OPTIONS is set to `ro'. If the system + supports symbolic-link caching, default options are set to + `ro,nocache'. + +-p + Print PID. Outputs the process-id of Hlfsd to standard output + where it can be saved into a file. + +-v + Version. Displays version information to standard error. + +-x LOG-OPTIONS + Specify run-time logging options. The options are a comma + separated list chosen from: `fatal', `error', `user', `warn', + `info', `map', `stats', `all'. + +-C + Force Hlfsd to run on systems that cannot turn off the NFS + attribute-cache. Use of this option on those systems is + discouraged, as it may result in loss or misdelivery of mail. The + option is ignored on systems that can turn off the attribute-cache. + +-D LOG-OPTIONS + Select from a variety of debugging options. Prefixing an option + with the string `no' reverses the effect of that option. Options + are cumulative. The most useful option is `all'. Since this + option is only used for debugging other options are not documented + here. A fuller description is available in the program source. + +-P PASSWORD-FILE + Read the user-name, user-id, and home directory information from + the file PASSWORD-FILE. Normally, Hlfsd will use getpwent(3) to + read the password database. This option allows you to override the + default database, and is useful if you want to map users' mail + files to a directory other than their home directory. Only the + username, uid, and home-directory fields of the file PASSWORD-FILE + are read and checked. All other fields are ignored. The file + PASSWORD-FILE must otherwise be compliant with Unix Version 7 + colon-delimited format passwd(4). + + + +File: am-utils.info, Node: Hlfsd Files, Prev: Hlfsd Options, Up: Using Hlfsd + +9.3.3 Hlfsd Files +----------------- + +The following files are used by Hlfsd: + +`/hlfs' + directory under which Hlfsd mounts itself and manages the symbolic + link `home'. + +`.hlfsdir' + default sub-directory in the user's home directory, to which the + `home' symbolic link returned by Hlfsd points. + +`/var/hlfs' + directory to which `home' symbolic link returned by Hlfsd points + if it is unable to verify the that user's home directory is + accessible. + +`/usr/tmp/hlfsd.dump.XXXXXX' + file to which Hlfsd will dump its internal password map when it + receives the `SIGUSR1' signal. `XXXXXX' will be replaced by a + random string generated by mktemp(3) or (the more secure) + mkstemp(3). + + + For discussion on other files used by Hlfsd, see *Note +lostaltmail::, and *Note lostaltmail.conf-sample::. + + +File: am-utils.info, Node: Assorted Tools, Next: Examples, Prev: Hlfsd, Up: Top + +10 Assorted Tools +***************** + +The following are additional utilities and scripts included with +am-utils, and get installed. + +* Menu: + +* am-eject:: +* amd.conf-sample:: +* amd2ldif:: +* amd2sun:: +* automount2amd:: +* ctl-amd:: +* ctl-hlfsd:: +* expn:: +* fix-amd-map:: +* fixmount:: +* fixrmtab:: +* lostaltmail:: +* lostaltmail.conf-sample:: +* mk-amd-map:: +* pawd:: +* redhat-ctl-amd:: +* wait4amd:: +* wait4amd2die:: +* wire-test:: + + +File: am-utils.info, Node: am-eject, Next: amd.conf-sample, Prev: Assorted Tools, Up: Assorted Tools + +10.1 am-eject +============= + +A shell script unmounts a floppy or CD-ROM that is automounted, and +then attempts to eject the removable device. + + +File: am-utils.info, Node: amd.conf-sample, Next: amd2ldif, Prev: am-eject, Up: Assorted Tools + +10.2 amd.conf-sample +==================== + +A sample Amd configuration file. *Note Amd Configuration File::. + + +File: am-utils.info, Node: amd2ldif, Next: amd2sun, Prev: amd.conf-sample, Up: Assorted Tools + +10.3 amd2ldif +============= + +A script to convert Amd maps to LDAP input files. Use it as follows: + + amd2ldif mapname base < amd.mapfile > mapfile.ldif + + +File: am-utils.info, Node: amd2sun, Next: automount2amd, Prev: amd2ldif, Up: Assorted Tools + +10.4 amd2sun +============ + +A script to convert Amd maps to Sun Automounter maps. Use it as follows + + amd2sun < amd.mapfile > auto_mapfile + + +File: am-utils.info, Node: automount2amd, Next: ctl-amd, Prev: amd2sun, Up: Assorted Tools + +10.5 automount2amd +================== + +A script to convert old Sun Automounter maps to Amd maps. + + Say you have the Sun automount file auto.foo, with these two lines: + home earth:/home + moon -ro,intr server:/proj/images + Running + automount2amd auto.foo > amd.foo + + will produce the Amd map amd.foo with this content: + + # generated by automount2amd on Sat Aug 14 17:59:32 US/Eastern 1999 + + /defaults \\ + type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 + + home \ + host==earth;type:=link;fs:=/home \\ + rhost:=earth;rfs:=/home + + moon \ + -addopts:=ro,intr \\ + host==server;type:=link;fs:=/proj/images \\ + rhost:=server;rfs:=/proj/images + + This perl script will use the following /default entry + type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 + If you wish to override that, define the $DEFAULTS environment +variable, or modify the script. + + If you wish to generate Amd maps using the hostd (*note hostd +Selector Variable::) Amd map syntax, then define the environment +variable $DOMAIN or modify the script. + + Note that automount2amd does not understand the syntax in newer Sun +Automount maps, those used with autofs. + + +File: am-utils.info, Node: ctl-amd, Next: ctl-hlfsd, Prev: automount2amd, Up: Assorted Tools + +10.6 ctl-amd +============ + +A script to start, stop, or restart Amd. Use it as follows: + +ctl-amd start + Start a new Amd process. + +ctl-amd stop + Stop the running Amd. + +ctl-amd restart + Stop the running Amd (if any), safely wait for it to terminate, and + then start a new process -- only if the previous one died cleanly. + + *Note Run-time Administration::, for more details. + + +File: am-utils.info, Node: ctl-hlfsd, Next: expn, Prev: ctl-amd, Up: Assorted Tools + +10.7 ctl-hlfsd +============== + +A script for controlling Hlfsd, much the same way `ctl-amd' controls +Amd. Use it as follows: + +ctl-hlfsd start + Start a new Hlfsd process. + +ctl-hlfsd stop + Stop the running Hlfsd. + +ctl-hlfsd restart + Stop the running Hlfsd (if any), wait for 10 seconds for it to + terminate, and then start a new process -- only if the previous one + died cleanly. + + *Note Hlfsd::, for more details. + + +File: am-utils.info, Node: expn, Next: fix-amd-map, Prev: ctl-hlfsd, Up: Assorted Tools + +10.8 expn +========= + +A script to expand email addresses into their full name. It is +generally useful when using with the `lostaltmail' script, but is a +useful tools otherwise. + + $ expn -v ezk@example.com + ezk@example.com -> + ezk@shekel.example.com + ezk@shekel.example.com -> + Erez Zadok <"| /usr/local/mh/lib/slocal -user ezk || exit 75> + Erez Zadok <\ezk> + Erez Zadok + + +File: am-utils.info, Node: fix-amd-map, Next: fixmount, Prev: expn, Up: Assorted Tools + +10.9 fix-amd-map +================ + +Am-utils changed some of the syntax and default values of some +variables. For example, the default value for `${os}' for Solaris 2.x +(aka SunOS 5.x) systems used to be `sos5', it is now more automatically +generated from `config.guess' and its value is `sunos5'. + + This script converts older Amd maps to new ones. Use it as follows: + + fix-amd-map < old.map > new.map + + +File: am-utils.info, Node: fixmount, Next: fixrmtab, Prev: fix-amd-map, Up: Assorted Tools + +10.10 fixmount +============== + +`fixmount' is a variant of showmount(8) that can delete bogus mount +entries in remote mountd(8) daemons. This is useful to cleanup +otherwise ever-accumulating "junk". Use it for example: + + fixmount -r host + + See the online manual page for `fixmount' for more details of its +usage. + + +File: am-utils.info, Node: fixrmtab, Next: lostaltmail, Prev: fixmount, Up: Assorted Tools + +10.11 fixrmtab +============== + +A script to invalidate `/etc/rmtab' entries for hosts named. Also +restart mountd for changes to take effect. Use it for example: + + fixrmtab host1 host2 ... + + +File: am-utils.info, Node: lostaltmail, Next: lostaltmail.conf-sample, Prev: fixrmtab, Up: Assorted Tools + +10.12 lostaltmail +================= + +A script used with Hlfsd to resend any "lost" mail. Hlfsd redirects +mail which cannot be written into the user's home directory to an +alternate directory. This is useful to continue delivering mail, even +if the user's file system was unavailable, full, or over quota. But, +the mail which gets delivered to the alternate directory needs to be +resent to its respective users. This is what the `lostaltmail' script +does. + + Use it as follows: + + lostaltmail + + This script needs a configuration file `lostaltmail.conf' set up +with the right parameters to properly work. *Note Hlfsd::, for more +details. + + +File: am-utils.info, Node: lostaltmail.conf-sample, Next: mk-amd-map, Prev: lostaltmail, Up: Assorted Tools + +10.13 lostaltmail.conf-sample +============================= + +This is a text file with configuration parameters needed for the +`lostaltmail' script. The script includes comments explaining each of +the configuration variables. See it for more information. Also *note +Hlfsd:: for general information. + + +File: am-utils.info, Node: mk-amd-map, Next: pawd, Prev: lostaltmail.conf-sample, Up: Assorted Tools + +10.14 mk-amd-map +================ + +This program converts a normal Amd map file into an ndbm database with +the same prefix as the named file. Use it as follows: + + mk-amd-map mapname + + +File: am-utils.info, Node: pawd, Next: redhat-ctl-amd, Prev: mk-amd-map, Up: Assorted Tools + +10.15 pawd +========== + +Pawd is used to print the current working directory, adjusted to +reflect proper paths that can be reused to go through the automounter +for the shortest possible path. In particular, the path printed back +does not include any of Amd's local mount points. Using them is +unsafe, because Amd may unmount managed file systems from the mount +points, and thus including them in paths may not always find the files +within. + + Without any arguments, Pawd will print the automounter adjusted +current working directory. With any number of arguments, it will print +the adjusted path of each one of the arguments. + + +File: am-utils.info, Node: redhat-ctl-amd, Next: wait4amd, Prev: pawd, Up: Assorted Tools + +10.16 redhat-ctl-amd +==================== + +This script is similar to ctl-amd (*note ctl-amd::) but is intended for +Red Hat Linux systems. You can safely copy redhat-ctl-amd onto +`/etc/rc.d/init.d/amd'. The script supplied by Am-utils is usually +better than the one provided by Red Hat, because the Red Hat script +does not correctly kill Amd processes: it is too quick to kill the +wrong processes, leaving stale or hung mount points behind. + + +File: am-utils.info, Node: wait4amd, Next: wait4amd2die, Prev: redhat-ctl-amd, Up: Assorted Tools + +10.17 wait4amd +============== + +A script to wait for Amd to start on a particular host before +performing an arbitrary command. The command is executed repeatedly, +with 1 second intervals in between. You may interrupt the script using +`^C' (or whatever keyboard sequence your terminal's `intr' function is +bound to). + + Examples: + +wait4amd saturn amq -p -h saturn + When Amd is up on host `saturn', get the process ID of that + running Amd. + +wait4amd pluto rlogin pluto + Remote login to host `pluto' when Amd is up on that host. It is + generally necessary to wait for Amd to properly start and + initialize on a remote host before logging in to it, because + otherwise user home directories may not be accessible across the + network. + +wait4amd pluto + A short-hand version of the previous command, since the most useful + reason for this script is to login to a remote host. I use it very + often when testing out new versions of Amd, and need to reboot hung + hosts. + + +File: am-utils.info, Node: wait4amd2die, Next: wire-test, Prev: wait4amd, Up: Assorted Tools + +10.18 wait4amd2die +================== + +This script is used internally by `ctl-amd' when used to restart Amd. +It waits for Amd to terminate. If it detected that Amd terminated +cleanly, this script will return an exist status of zero. Otherwise, +it will return a non-zero exit status. + + The script tests for Amd's existence once every 5 seconds, six +times, for a total of 30 seconds. It will return a zero exist status as +soon as it detects that Amd dies. + + +File: am-utils.info, Node: wire-test, Prev: wait4amd2die, Up: Assorted Tools + +10.19 wire-test +=============== + +A simple program to test if some of the most basic networking functions +in am-util's library `libamu' work. It also tests the combination of +NFS protocol and version number that are supported from the current +host, to a remote one. + + For example, in this test a machine which only supports NFS Version +2 is contacting a remote host that can support the same version, but +using both UDP and TCP. If no host name is specified, `wire-test' will +try `localhost'. + + $ wire-test moisil + Network name is "mcl-lab-net.cs.columbia.edu" + Network number is "128.59.13" + Network name is "old-net.cs.columbia.edu" + Network number is "128.59.16" + My IP address is 0x7f000001. + NFS Version and protocol tests to host "moisil"... + testing vers=2, proto="udp" -> found version 2. + testing vers=3, proto="udp" -> failed! + testing vers=2, proto="tcp" -> found version 2. + testing vers=3, proto="tcp" -> failed! + + +File: am-utils.info, Node: Examples, Next: Internals, Prev: Assorted Tools, Up: Top + +11 Examples +*********** + +* Menu: + +* User Filesystems:: +* Home Directories:: +* Architecture Sharing:: +* Wildcard Names:: +* rwho servers:: +* /vol:: +* /defaults with selectors:: +* /tftpboot in a chroot-ed environment:: + + +File: am-utils.info, Node: User Filesystems, Next: Home Directories, Prev: Examples, Up: Examples + +11.1 User Filesystems +===================== + +With more than one fileserver, the directories most frequently +cross-mounted are those containing user home directories. A common +convention used at Imperial College is to mount the user disks under +/home/machine. + + Typically, the `/etc/fstab' file contained a long list of entries +such as: + + machine:/home/machine /home/machine nfs ... + + for each fileserver on the network. + + There are numerous problems with this system. The mount list can +become quite large and some of the machines may be down when a system is +booted. When a new fileserver is installed, `/etc/fstab' must be +updated on every machine, the mount directory created and the filesystem +mounted. + + In many environments most people use the same few workstations, but +it is convenient to go to a colleague's machine and access your own +files. When a server goes down, it can cause a process on a client +machine to hang. By minimizing the mounted filesystems to only include +those actively being used, there is less chance that a filesystem will +be mounted when a server goes down. + + The following is a short extract from a map taken from a research +fileserver at Imperial College. + + Note the entry for `localhost' which is used for users such as the +operator (`opr') who have a home directory on most machine as +`/home/localhost/opr'. + + /defaults opts:=rw,intr,grpid,nosuid + charm host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \ + host==${key};type:=ufs;dev:=/dev/xd0g + # + ... + + # + localhost type:=link;fs:=${host} + ... + # + # dylan has two user disks so have a + # top directory in which to mount them. + # + dylan type:=auto;fs:=${map};pref:=${key}/ + # + dylan/dk2 host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/${key} \ + host==dylan;type:=ufs;dev:=/dev/dsk/2s0 + # + dylan/dk5 host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/${key} \ + host==dylan;type:=ufs;dev:=/dev/dsk/5s0 + ... + # + toytown host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \ + host==${key};type:=ufs;dev:=/dev/xy1g + ... + # + zebedee host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \ + host==${key};type:=ufs;dev:=/dev/dsk/1s0 + # + # Just for access... + # + gould type:=auto;fs:=${map};pref:=${key}/ + gould/staff host!=gould;type:=nfs;rhost:=gould;rfs:=/home/${key} + # + gummo host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} + ... + + This map is shared by most of the machines listed so on those +systems any of the user disks is accessible via a consistent name. Amd +is started with the following command + + amd /home amd.home + + Note that when mounting a remote filesystem, the "automounted" mount +point is referenced, so that the filesystem will be mounted if it is +not yet (at the time the remote `mountd' obtains the file handle). + + +File: am-utils.info, Node: Home Directories, Next: Architecture Sharing, Prev: User Filesystems, Up: Examples + +11.2 Home Directories +===================== + +One convention for home directories is to locate them in `/homes' so +user `jsp''s home directory is `/homes/jsp'. With more than a single +fileserver it is convenient to spread user files across several +machines. All that is required is a mount-map which converts login +names to an automounted directory. + + Such a map might be started by the command: + + amd /homes amd.homes + + where the map `amd.homes' contained the entries: + + /defaults type:=link # All the entries are of type:=link + jsp fs:=/home/charm/jsp + njw fs:=/home/dylan/dk5/njw + ... + phjk fs:=/home/toytown/ai/phjk + sjv fs:=/home/ganymede/sjv + + Whenever a login name is accessed in `/homes' a symbolic link +appears pointing to the real location of that user's home directory. In +this example, `/homes/jsp' would appear to be a symbolic link pointing +to `/home/charm/jsp'. Of course, `/home' would also be an automount +point. + + This system causes an extra level of symbolic links to be used. +Although that turns out to be relatively inexpensive, an alternative is +to directly mount the required filesystems in the `/homes' map. The +required map is simple, but long, and its creation is best automated. +The entry for `jsp' could be: + + jsp -sublink:=${key};rfs:=/home/charm \ + host==charm;type:=ufs;dev:=/dev/xd0g \ + host!=charm;type:=nfs;rhost:=charm + + This map can become quite big if it contains a large number of +entries. By combining two other features of Amd it can be greatly +simplified. + + First the UFS partitions should be mounted under the control of +`/etc/fstab', taking care that they are mounted in the same place that +Amd would have automounted them. In most cases this would be something +like `/a/"host"/home/"host"' and `/etc/fstab' on host `charm' would +have a line: + + /dev/xy0g /a/charm/home/charm 4.2 rw,nosuid,grpid 1 5 + + The map can then be changed to: + + /defaults type:=nfs;sublink:=${key};opts:=rw,intr,nosuid,grpid + jsp rhost:=charm;rfs:=/home/charm + njw rhost:=dylan;rfs:=/home/dylan/dk5 + ... + phjk rhost:=toytown;rfs:=/home/toytown;sublink:=ai/${key} + sjv rhost:=ganymede;rfs:=/home/ganymede + + This map operates as usual on a remote machine (ie `${host}' not +equal to `${rhost}'). On the machine where the filesystem is stored +(ie `${host}' equal to `${rhost}'), Amd will construct a local +filesystem mount point which corresponds to the name of the locally +mounted UFS partition. If Amd is started with the `-r' option then +instead of attempting an NFS mount, Amd will simply inherit the UFS +mount (*note Inheritance Filesystem::). If `-r' is not used then a +loopback NFS mount will be made. This type of mount is known to cause +a deadlock on many systems. + + +File: am-utils.info, Node: Architecture Sharing, Next: Wildcard Names, Prev: Home Directories, Up: Examples + +11.3 Architecture Sharing +========================= + +Often a filesystem will be shared by machines of different +architectures. Separate trees can be maintained for the executable +images for each architecture, but it may be more convenient to have a +shared tree, with distinct subdirectories. + + A shared tree might have the following structure on the fileserver +(called `fserver' in the example): + + local/tex + local/tex/fonts + local/tex/lib + local/tex/bin + local/tex/bin/sun3 + local/tex/bin/sun4 + local/tex/bin/hp9000 + ... + + In this example, the subdirectories of `local/tex/bin' should be +hidden when accessed via the automount point (conventionally `/vol'). +A mount-map for `/vol' to achieve this would look like: + + /defaults sublink:=${/key};rhost:=fserver;type:=link + tex type:=auto;fs:=${map};pref:=${key}/ + tex/fonts host!=fserver;type:=nfs;rfs:=/vol/tex \ + host==fserver;fs:=/usr/local/tex + tex/lib host!=fserver;type:=nfs;rfs:=/vol/tex \ + host==fserver;fs:=/usr/local/tex + tex/bin -sublink:=${/key}/${arch} \ + host!=fserver;type:=nfs;rfs:=/vol/tex \ + host:=fserver;fs:=/usr/local/tex + + When `/vol/tex/bin' is referenced, the current machine architecture +is automatically appended to the path by the `${sublink}' variable. +This means that users can have `/vol/tex/bin' in their `PATH' without +concern for architecture dependencies. + + +File: am-utils.info, Node: Wildcard Names, Next: rwho servers, Prev: Architecture Sharing, Up: Examples + +11.4 Wildcard Names & Replicated Servers +======================================== + +By using the wildcard facility, Amd can "overlay" an existing directory +with additional entries. The system files are usually mounted under +`/usr'. If instead, Amd is mounted on `/usr', additional names can be +overlayed to augment or replace names in the "master" `/usr'. A map to +do this would have the form: + + local type:=auto;fs:=local-map + share type:=auto;fs:=share-map + * -type:=nfs;rfs:=/export/exec/${arch};sublink:="${key}" \ + rhost:=fserv1 rhost:=fserv2 rhost:=fserv3 + + Note that the assignment to `${sublink}' is surrounded by double +quotes to prevent the incoming key from causing the map to be +misinterpreted. This map has the effect of directing any access to +`/usr/local' or `/usr/share' to another automount point. + + In this example, it is assumed that the `/usr' files are replicated +on three fileservers: `fserv1', `fserv2' and `fserv3'. For any +references other than to `local' and `share' one of the servers is used +and a symbolic link to ${autodir}/${rhost}/export/exec/${arch}/whatever +is returned once an appropriate filesystem has been mounted. + + +File: am-utils.info, Node: rwho servers, Next: /vol, Prev: Wildcard Names, Up: Examples + +11.5 `rwho' servers +=================== + +The `/usr/spool/rwho' directory is a good candidate for automounting. +For efficiency reasons it is best to capture the rwho data on a small +number of machines and then mount that information onto a large number +of clients. The data written into the rwho files is byte order +dependent so only servers with the correct byte ordering can be used by +a client: + + /defaults type:=nfs + usr/spool/rwho -byte==little;rfs:=/usr/spool/rwho \ + rhost:=vaxA rhost:=vaxB \ + || -rfs:=/usr/spool/rwho \ + rhost:=sun4 rhost:=hp300 + + +File: am-utils.info, Node: /vol, Next: /defaults with selectors, Prev: rwho servers, Up: Examples + +11.6 `/vol' +=========== + +`/vol' is used as a catch-all for volumes which do not have other +conventional names. + + Below is part of the `/vol' map for the domain `doc.ic.ac.uk'. The +`r+d' tree is used for new or experimental software that needs to be +available everywhere without installing it on all the fileservers. +Users wishing to try out the new software then simply include +`/vol/r+d/{bin,ucb}' in their path. + + The main tree resides on one host `gould.doc.ic.ac.uk', which has +different `bin', `etc', `lib' and `ucb' sub-directories for each +machine architecture. For example, `/vol/r+d/bin' for a Sun-4 would be +stored in the sub-directory `bin/sun4' of the filesystem `/usr/r+d'. +When it was accessed a symbolic link pointing to +`/a/gould/usr/r+d/bin/sun4' would be returned. + + /defaults type:=nfs;opts:=rw,grpid,nosuid,intr,soft + wp -opts:=rw,grpid,nosuid;rhost:=charm \ + host==charm;type:=link;fs:=/usr/local/wp \ + host!=charm;type:=nfs;rfs:=/vol/wp + ... + # + src -opts:=rw,grpid,nosuid;rhost:=charm \ + host==charm;type:=link;fs:=/usr/src \ + host!=charm;type:=nfs;rfs:=/vol/src + # + r+d type:=auto;fs:=${map};pref:=r+d/ + # per architecture bin,etc,lib&ucb... + r+d/bin rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch} + r+d/etc rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch} + r+d/include rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key} + r+d/lib rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch} + r+d/man rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key} + r+d/src rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key} + r+d/ucb rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch} + # hades pictures + pictures -opts:=rw,grpid,nosuid;rhost:=thpfs \ + host==thpfs;type:=link;fs:=/nbsd/pictures \ + host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=pictures + # hades tools + hades -opts:=rw,grpid,nosuid;rhost:=thpfs \ + host==thpfs;type:=link;fs:=/nbsd/hades \ + host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=hades + # bsd tools for hp. + bsd -opts:=rw,grpid,nosuid;arch==hp9000;rhost:=thpfs \ + host==thpfs;type:=link;fs:=/nbsd/bsd \ + host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=bsd + + +File: am-utils.info, Node: /defaults with selectors, Next: /tftpboot in a chroot-ed environment, Prev: /vol, Up: Examples + +11.7 `/defaults' with selectors +=============================== + +It is sometimes useful to have different defaults for a given map. To +achieve this, the `/defaults' entry must be able to process normal +selectors. This feature is turned on by setting `selectors_in_defaults += yes' in the `amd.conf' file. *Note selectors_in_defaults Parameter::. + + In this example, I set different default NFS mount options for hosts +which are running over a slower network link. By setting a smaller size +for the NFS read and write buffer sizes, you can greatly improve remote +file service performance. + + /defaults \ + wire==slip-net;opts:=rw,intr,rsize=1024,wsize=1024,timeo=20,retrans=10 \ + wire!=slip-net;opts:=rw,intr + + +File: am-utils.info, Node: /tftpboot in a chroot-ed environment, Prev: /defaults with selectors, Up: Examples + +11.8 `/tftpboot' in a chroot-ed environment +=========================================== + +In this complex example, we attempt to run an Amd process _inside_ a +chroot-ed environment. `tftpd' (Trivial FTP) is used to trivially +retrieve files used to boot X-Terminals, Network Printers, Network +routers, diskless workstations, and other such devices. For security +reasons, `tftpd' (and also `ftpd') processes are run using the +chroot(2) system call. This provides an environment for these +processes, where access to any files outside the directory where the +chroot-ed process runs is denied. + + For example, if you start `tftpd' on your system with + + chroot /tftpboot /usr/sbin/tftpd + +then the `tftpd' process will not be able to access any files outside +`/tftpboot'. This ensures that no one can retrieve files such as +`/etc/passwd' and run password crackers on it. + + Since the TFTP service works by broadcast, it is necessary to have at +least one TFTP server running on each subnet. If you have lots of files +that you need to make available for `tftp', and many subnets, it could +take significant amounts of disk space on each host serving them. + + A solution we implemented at Columbia University was to have every +host run `tftpd', but have those servers retrieve the boot files from +two replicated servers. Those replicated servers have special +partitions dedicated to the many network boot files. + + We start Amd as follows: + + amd /tftpboot/.amd amd.tftpboot + + That is, Amd is serving the directory `/tftpboot/.amd'. The `tftp' +server runs inside `/tftpboot' and is chroot-ed in that directory too. +The `amd.tftpboot' map looks like: + + # + # Amd /tftpboot directory -> host map + # + + /defaults opts:=nosuid,ro,intr,soft;fs:=/tftpboot/import;type:=nfs + + tp host==lol;rfs:=/n/lol/import/tftpboot;type:=lofs \ + host==ober;rfs:=/n/ober/misc/win/tftpboot;type:=lofs \ + rhost:=ober;rfs:=/n/ober/misc/win/tftpboot \ + rhost:=lol;rfs:=/n/lol/import/tftpboot + + To help understand this example, I list a few of the file entries +that are created inside `/tftpboot': + + $ ls -la /tftpboot + dr-xr-xr-x 2 root 512 Aug 30 23:11 .amd + drwxrwsr-x 12 root 512 Aug 30 08:00 import + lrwxrwxrwx 1 root 33 Feb 27 1997 adminpr.cfg -> ./.amd/tp/hplj/adminpr.cfg + lrwxrwxrwx 1 root 22 Dec 5 1996 tekxp -> ./.amd/tp/xterms/tekxp + lrwxrwxrwx 1 root 1 Dec 5 1996 tftpboot -> . + + Here is an explanation of each of the entries listed above: + +`.amd' + This is the Amd mount point. Note that you do not need to run a + separate Amd process for the TFTP service. The chroot(2) system + call only protects against file access, but the same process can + still serve files and directories inside and outside the chroot-ed + environment, because Amd itself was not run in chroot-ed mode. + +`import' + This is the mount point where Amd will mount the directories + containing the boot files. The map is designed so that remote + directories will be NFS mounted (even if they are already mounted + elsewhere), and local directories are loopback mounted (since they + are not accessible outside the chroot-ed `/tftpboot' directory). + +`adminpr.cfg' +`tekxp' + Two manually created symbolic links to directories _inside_ the + Amd-managed directory. The crossing of the component `tp' will + cause Amd to automount one of the remote replicas. Once crossed, + access to files inside proceeds as usual. The `adminpr.cfg' is a + configuration file for an HP Laser-Jet 4si printer, and the `tekxp' + is a directory for Tektronix X-Terminal boot files. + +`tftpboot' + This innocent looking symlink is important. Usually, when devices + boot via the TFTP service, they perform the `get file' command to + retrieve FILE. However, some devices assume that `tftpd' does not + run in a chroot-ed environment, but rather "unprotected", and thus + use a full pathname for files to retrieve, as in `get + /tftpboot/file'. This symlink effectively strips out the leading + `/tftpboot/'. + + + +File: am-utils.info, Node: Internals, Next: Acknowledgments & Trademarks, Prev: Examples, Up: Top + +12 Internals +************ + +Note that there are more error and logging messages possible than are +listed here. Most of them are self-explanatory. Refer to the program +sources for more details on the rest. + +* Menu: + +* Log Messages:: + + +File: am-utils.info, Node: Log Messages, Prev: Internals, Up: Internals + +12.1 Log Messages +================= + +In the following sections a brief explanation is given of some of the +log messages made by Amd. Where the message is in `typewriter' font, +it corresponds exactly to the message produced by Amd. Words in +"italic" are replaced by an appropriate string. Variables, `${var}', +indicate that the value of the appropriate variable is output. + + Log messages are either sent directly to a file, or logged via the +syslog(3) mechanism. *Note log_file Parameter::. In either case, +entries in the file are of the form: + date-string hostname amd[pid] message + +* Menu: + +* Fatal errors:: +* Info messages:: + + +File: am-utils.info, Node: Fatal errors, Next: Info messages, Prev: Log Messages, Up: Log Messages + +12.1.1 Fatal errors +------------------- + +Amd attempts to deal with unusual events. Whenever it is not possible +to deal with such an error, Amd will log an appropriate message and, if +it cannot possibly continue, will either exit or abort. These messages +are selected by `-x fatal' on the command line. When syslog(3) is +being used, they are logged with level `LOG_FATAL'. Even if Amd +continues to operate it is likely to remain in a precarious state and +should be restarted at the earliest opportunity. + +Attempting to inherit not-a-filesystem + The prototype mount point created during a filesystem restart did + not contain a reference to the restarted filesystem. This error + "should never happen". + +Can't bind to domain "NIS-domain" + A specific NIS domain was requested on the command line, but no + server for that domain is available on the local net. + +Can't determine IP address of this host (hostname) + When Amd starts it determines its own IP address. If this lookup + fails then Amd cannot continue. The hostname it looks up is that + obtained returned by gethostname(2) system call. + +Can't find root file handle for automount point + Amd creates its own file handles for the automount points. When it + mounts itself as a server, it must pass these file handles to the + local kernel. If the filehandle is not obtainable the mount point + is ignored. This error "should never happen". + +Must be root to mount filesystems (euid = euid) + To prevent embarrassment, Amd makes sure it has appropriate system + privileges. This amounts to having an euid of 0. The check is + made after argument processing complete to give non-root users a + chance to access the `-v' option. + +No work to do - quitting + No automount points were given on the command line and so there is + no work to do. + +Out of memory + While attempting to malloc some memory, the memory space available + to Amd was exhausted. This is an unrecoverable error. + +Out of memory in realloc + While attempting to realloc some memory, the memory space + available to Amd was exhausted. This is an unrecoverable error. + +cannot create rpc/udp service + Either the NFS or AMQ endpoint could not be created. + +gethostname: description + The gethostname(2) system call failed during startup. + +host name is not set + The gethostname(2) system call returned a zero length host name. + This can happen if Amd is started in single user mode just after + booting the system. + +ifs_match called! + An internal error occurred while restarting a pre-mounted + filesystem. This error "should never happen". + +mount_afs: description + An error occurred while Amd was mounting itself. + +run_rpc failed + Somehow the main NFS server loop failed. This error "should never + happen". + +unable to free rpc arguments in amqprog_1 + The incoming arguments to the AMQ server could not be free'ed. + +unable to free rpc arguments in nfs_program_1 + The incoming arguments to the NFS server could not be free'ed. + +unable to register (AMQ_PROGRAM, AMQ_VERSION, udp) + The AMQ server could not be registered with the local portmapper + or the internal RPC dispatcher. + +unable to register (NFS_PROGRAM, NFS_VERSION, 0) + The NFS server could not be registered with the internal RPC + dispatcher. + + + XXX: This section needs to be updated + + +File: am-utils.info, Node: Info messages, Prev: Fatal errors, Up: Log Messages + +12.1.2 Info messages +-------------------- + +Amd generates information messages to record state changes. These +messages are selected by `-x info' on the command line. When syslog(3) +is being used, they are logged with level `LOG_INFO'. + + The messages listed below can be generated and are in a format +suitable for simple statistical analysis. "mount-info" is the string +that is displayed by "Amq" in its mount information column and placed +in the system mount table. + +"${path}" forcibly timed out + An automount point has been timed out by the Amq command. + +"${path}" has timed out + No access to the automount point has been made within the timeout + period. + +Filehandle denied for "${rhost}:${rfs}" + The mount daemon refused to return a file handle for the requested + filesystem. + +Filehandle error for "${rhost}:${rfs}": description + The mount daemon gave some other error for the requested + filesystem. + +Finishing with status exit-status + Amd is about to exit with the given exit status. + +Re-synchronizing cache for map ${map} + The named map has been modified and the internal cache is being + re-synchronized. + +file server ${rhost} is down - timeout of "${path}" ignored + An automount point has timed out, but the corresponding file + server is known to be down. This message is only produced once + for each mount point for which the server is down. + +file server ${rhost} type nfs is down + An NFS file server that was previously up is now down. + +file server ${rhost} type nfs is up + An NFS file server that was previously down is now up. + +file server ${rhost} type nfs starts down + A new NFS file server has been referenced and is known to be down. + +file server ${rhost} type nfs starts up + A new NFS file server has been referenced and is known to be up. + +mount of "${path}" on ${fs} timed out + Attempts to mount a filesystem for the given automount point have + failed to complete within 30 seconds. + +mount-info mounted fstype ${type} on ${fs} + A new file system has been mounted. + +mount-info restarted fstype ${type} on ${fs} + Amd is using a pre-mounted filesystem to satisfy a mount request. + +mount-info unmounted fstype ${type} from ${fs} + A file system has been unmounted. + +mount-info unmounted fstype ${type} from ${fs} link ${fs}/${sublink} + A file system of which only a sub-directory was in use has been + unmounted. + +restarting mount-info on ${fs} + A pre-mounted file system has been noted. + + + XXX: This section needs to be updated + + +File: am-utils.info, Node: Acknowledgments & Trademarks, Next: Index, Prev: Internals, Up: Top + +Acknowledgments & Trademarks +**************************** + +Many thanks to the Am-Utils Users mailing list through the months +developing am-utils. These members have contributed to the +discussions, ideas, code and documentation, and subjected their systems +to alpha quality code. Special thanks go to those authors +(http://www.am-utils.org/docs/am-utils/AUTHORS.txt) who have submitted +patches, and especially to the maintainers: + + * Erez Zadok (http://www.cs.sunysb.edu/~ezk) + + * Ion Badulescu + + * Rainer Orth + + * Nick Williams + + Thanks to the Formal Methods Group at Imperial College for suffering +patiently while Amd was being developed on their machines. + + Thanks to the many people who have helped with the development of +Amd, especially Piete Brooks at the Cambridge University Computing Lab +for many hours of testing, experimentation and discussion. + + Thanks to the older Amd Workers mailing list (now defunct) members for many +suggestions and bug reports to Amd. + + * DEC, VAX and Ultrix are registered trademarks of Digital Equipment + Corporation. + + * AIX and IBM are registered trademarks of International Business + Machines Corporation. + + * Sun, NFS and SunOS are registered trademarks of Sun Microsystems, + Inc. + + * UNIX is a registered trademark in the USA and other countries, + exclusively licensed through X/Open Company, Ltd. + + * All other registered trademarks are owned by their respective + owners. + diff --git a/doc/am-utils.info-2 b/doc/am-utils.info-2 new file mode 100644 index 0000000000000000000000000000000000000000..f03af323a76b7c1e353776a5b742a53fc9607bf1 GIT binary patch literal 76982 zcmd6QZFAf>lIDKg@Six`m)n^gm%D9ud%Eqp+i+WUThX?xv*ekZxVTVIRg}ba6vmjRkKpb2Z=-?kw_%YZ>mn2!U-VS3PtHI7{lUMBmkPym@dpj)kB>zE@BF3& z$x0OaU9)NS^{#A1x36}kXs!gouXa`0J$QX`I*NOij&f8*DZi@DE2cl2g=i_;ilT_kNJr-~F z^^yej=t1B3Z~E|ubyb)6%V&QiELX+4D|1i;Q%wz}sxRttch|I^Q+Nidsqp~Jb-PVr zA^A(Hd9bW9U?i5+)L?e)KCd!@sHR5p<)-O&8KDTlR1-t_ZdG0t`!!6%UA4RE2Xm)K zvl^-~vQY>1cja#R-L~kuyA>?;*2SQph*P3yT1lf#s%0IRQM-J!ZkEMb6sr}CX;XXr z&UQt+tLkeq#F~$=8SSoiTbR3@sA^G&kw;4>s{@!GVy`GSJ-Ss>#FD= zVHzQIu_?V?lkHg4HV=O4Fv6T#7no5=4T1_lfApRvUs8fX{Iyx{Hzk3x7-60*{}WT3 z-x_|Y{-Mb%fm@7TDwlvJ(9dyh=#yjkC>9@$=%=SN`;p_2=E0y2W3+5Go1$I`o?d0Y zxiY8sy;5ZFXcm^;*Nv*v@+I|Eb-kCKm5^?ZmaqC9CL0~evN4fdvBTvcS-i=rAmrvV zdLg=PxvZ}4N$W_(pNjx1M{`#H)``>Oqqx=(xR;yX#bPUDCu;o(FoH|GEW1ub`Q;fE zFqzb}G$7X0SC%NLQ%CJBjRcb3Y~a#wixx7)*tfNq^cUZr_TL7^xonaszZ9G8I%awL z_q|qRaYjM4>9r`(>7M0Lh=`H6YT8W^vO*+M@rJ+EogQO!y>2csB}QcQtNiv587W2` z>|(&s)9OYsJChUuW+`GX#kRcOuZxx@`~a+v>f87D)_^tUQX+^%waZW;6Nzfmxb{!u zSahs?v4Q1~$qsi#`((YUazhi0m~2oPXr{-g+XrUxUWNGsF#?&z$7V$4L`^fXW)Y{4 z`+BjfHdq*2E9`NtMZ3HiG%1Rvu*g)?Y~c_^zsUV-(N@JJt;(H$%*Z1fy-5$nn==k< zklQ4R-L9=J_d5%YB49wh`{gxBJ8F9E&Op*91}=r}HD>@ABWCcu8aax{kEhRDXpvZ~rB3MmuDVv(V@5+mHa|QQYyOzFWf@Gsg<|QdNR=G=YUDl;qKv5_e z=D-N1w_#)kI1TS3H&zbdQ6)plz(I*8a8v>S zl(n+RwDGh?LXQ*@O{~5TSaoYeU}P^3t*94ACImd+!InE?(?oQ&uUA<2)H?*momL_O z-+!fBW)JdTisk2P*kyzPSX3?tC8K<-#9)Mg()*%Xi=%Q~VM4OBC_y%A-~WPr486+k zD8x0WqS-_l_z{XaG~FfoTgirh<@+9tc3UzO2$d<1Y}=Ms)fc^iW~KqFFxjY0qF3amnR$@B zVrQbF9m3lp9`#);a|W5c65S?RZp%24t$6VLv~?QaO?vzzbu#0)Sm`KVWZI09joQtO z#qcP?A`#RFWJioCsvnMzIV8)Bt}v(v3nKz%{BO6sEU)>b-H7VN;YY08;#bt@`Ux`f$Q@;=^=|ri9z-Ep&Tf4y4ov6O5%c%GPX7O%1PH2llGsmX8 z-b*vL+#b?ii9N3HVES#hFczsB1{|d zuKp~}^~<#~=iM( z*zAhS3sUP?*eXgk>Qp7)qFNP$BCrKOm_4#lp&ZdW*zqcm9CycC*GqHjTJ|7sji09W z*cmJ{x+#%ly28@9Yt{&XaA>|-s?c<*r+(ly#ehh+{I)7+li${*4{#J)daSj>8>mMJ zFw}CO%EU9zyt4u+8_(_n(!%g3oHaADlr@x^CCuR_3Q%g3FWaV|^g%gjz{GfLC#jFl zC{dfD>37%0-Tz&c>*8L!O0vW4ewKrr$=oq+nH&V%3eGK&p*+rSRw*Y44;#r)0agwp zIN6lztQI4B@^WD1r><3bYd0)xRo|?e?e^YTL@Gp&A5-Wc!05?WE=8k^o(34DmZA|x zj&PJ^{!~|AoQCyN*W)MDG`Z#+^1+RTp2<>?O&Fw+VF<)T5d6=DGc@YS;T%=nvVjRD zRixcb*%-I zdORuMXI<-6q{ZmFw>+^WR4!2Fl*_1A6Nw8kVFX{RK6 zGo%Ml!z~$=#3<{mh&&^e(@Tf&3NxuoW^5ZdSAkS33z5NyXLs^2ZW@de=~y+GT1jMY z>5=s5_z`P>#i;yJE-&DDUr=TwV*QZ;A151iz`q8XJwgYF8vs+F)1^*2WKyr4X3<%~ zVdm4P1RWKa)sfXgr2Y{D&MOk~BWU>q~7@9gX1xgPu>!G9wjUrow72u4E#ILLJSUBGz@f27LQZ+6s|yfJ(V4<-j`-1lUb9ThIyeA zbdE{RsN=?FhIjlELE!~3&P*&n7uR08s~iK4iLl1g&?erIc)_6uzj>1{?L8bSmBN9N zPk8VdAx*&H0@X{!bmWTMV2AZ|O|J@HeB*mjhd+#Z`@Hc;%uwmQRa%iRoc*B*$Di3~Ut=?9>HLd7j;GE*q>2 z1h!B=&x*xKF@(y*u!!U1X*-GXrG0&Q*EHKpm@`u;HdEamKfzP0 zugNh;OJ}?E*$9!^IEdI#L=mr%h3h~%l}~L@X+%^Jz~O>ce59HIgBSt}py5kpF5n~k ze5hPY-K|l-1_}AYpG>REyUjL$h0ZlmnjDXrJY`g$Lb?>Eihd#u8JUZ3dD$MF#*l~B-gwtm{z#$F5!X8s4q1bZuk z40tf42h|t9Oi7k&KvZ z;DU!Pqn463@{E`)&gjh=+gw+A^%Z4DGU6DI$;m?GS=}%%kBk^PjP@O;SJUHpmSyx%M3ih?vkEXY_y{&mp5P!B@}$mRoua@HOghCfxP{!R z^Hi(egcyA~3Nre12qWrzeNwU!eBzpuh|w?fj}h%tjIP@9_dX6YaI-@7V5H(OM6DxB zPR~#%BB>D#q*BQYa_0(1&4*7U0qZ#Pm2ds)^?1+NDT!JQimRdKB$$Dr3M8L=1i}6m)m61iA8U1 z#YUCFp~dsh?_)q}GZ&reLoSq`82?1(VWvO!E(q z%=7X!g_rPScT<#X+-{Ps(%xq*pJzTW_ZPqKaS-vU!uo}*V?f{pCP6l;e14@O5(rYu z)RkybSpM+nujNjb*i?lku?0=V4XKiu87oK~oR<+i%?M{s)`E)d(%MQVQw+rgc=2+V zTD)B2s7gi$Nuz^gqska>$m!oaKvbnRHi{iKetidmhd7H?ukn;OVoy)XQ_)7t9@xx- ze<+)k@N3>8=M-fUZ<;&mWh&53hXp)-`P|VUBj@}CFmcn8*{pBnQ4T~WBGQq~Gsv`r z9J?+laF}f0a$-F~V;^6iT^zms<UFJ}Vf+lRuTF+VzGaN2a{boi zV07HE@jZ!%8BZY^)tS*Y$rc^Z<@*jMEXoE!ZTeodqi?9MgfGP3Ztit09ZaEUJ4H*a z{K5PGczzJoxbpIo8vAA#A1t8AedGaWHxrE9J7&Jn7nk`NK1?>MZ0HsF ztkix__U(ju5)z7BqsF{l2y!N&9N>Wwk^tH0{d0g1HV2fqXfEf`*W??cB8lxEYkkj` zJtwflNIPM=@TwVT#jsl3+EjyhlW-{Yu^gMfdw)0VxAI;fapN;;I%<&4 zcqB&ssYB+rEn1X#cLw)6Ri)jkWNZy=Vg$QaEV+2KQG$QSLdOK65|abj=VLC56&9Sz z;&W-@zS+0^$uwk-D|a=2AWbonBeP&Zt+B4@oYbNG-lxOp6Do5WL4#h{U&{z78dT&{ zrtv}rES@^Qg|ye$RULJZ+U=r4dR%#w+$fZ=x?*%eQ0$aURdduqwQ^u+accn$STIUL zN{t$DWm{5u8ZOr1OmlJzFi>{XMw;qr2(5V~j>EhKog$wreM_}2@<^qC_a(1N=?z_|BZ*PJhaISBK6yT^ z>MgA1p*w{Nkr?}sst(v(*{e1jI<+f;p$ zdys70UMl;FD~UxhErWc#qXPM@l7+qK029yL}?~kSVrRpZDkKP@2ba7w^(wH_25F_p z#>Yd8c0S!0mW{>}AR8YGGUIVSfiAKV>MNE_gltqi?@*Sb#`Z>N$I#GdMP{n9qs;HB z>zmzONk9A3*7vv^l>-S#`rkE6x=`?=BCL0w_A0df|aTwd|0SWgMYdX;$<8#2(i0A{}ho|ZT zsw}{k(gisT#|K52`Qj|M3a0~Mc~z!BW9Ed|JC*hIkgD#<+=Ed2c*A#{N)ynGD3%)H zpoG0x=bA>0R2rqaUe!!|P;3y8%|j6AZDM~1B2sNWK-lPE;KQX)mN$%rAe2&XSPG=9svxB*S=d#LYo zaezXvVSbAB4z-fJ15gGZ*r1+lmq%T(*k zj5vbzj_1dL=>_G;>70=(3&O$^Lh^7C306gjBYn$lBC>R#m?-Gpf&2K4p2Vr2q@&X~ zF&bq(PK=c449SMug&#!rL7MxBjoE-A8-5WSANR;c9@ddM+qy0CH?=5TbsH_pM{(w8 z5rAB1^^2|&8AyO^RM`>|-l~rK<|JL8%yl1#LeJOH6gYCFhWlcZ%LWLRRPc>OkZfGh9JEkS$JD1R0kQdf$O&OFkPSA| z_M$hmio!iTFK|XQGCNUc=ND1$`Px3~iWuDJhNIw!)zDcZo$vQtAmqUhCfe(eK(5xs zb%(M-OKkWd^5-iH#=dnzg<7da^H@4n+#-un6)2CEV)TToD?5mA>GW44dcv1i1sHub zqMxYVv%`q1`}rcGX*nvRr(6@;W`xVT0$d>1B%>cZMC{52IVBnSOlWRg*+X<+2aIcJX^|KJ<8x}mKKr^E7$e7B|!-=>)v{eii^ZvGSH z0L#E!o08FwAsNMNWRg*+X`6Z%tTdEj^vt)}n2b<%|7(T)EYxe=K3w=HiO6>%>ZaR= zr`i;wfD=(;VX~pciPyRWqbEP}wN94JuIW}2-#5$K?VZt3=Zt|KvMb)H2*8;;~61`pKU~w%5BGc>Xs&rz9f3Y4IB%5{#bw9AKoY zH?iq3ePfMF3B-`=5Lt=>GjB>ZOJ_B@jJ*;!j7v@0(o_;**lmlkffRZ&yvd4k>n$k-X>0 z8vW4f+rAQ*sYYo=zKq(SCqf((GJ5jFw@1V%*s?UEfQ*RI|2zqZJAvq_+DkLTK5bZu zGEED($8Ad?c1MPK268RG_B* zD&zm;2j7S6nk#>9WDQRt`q5WNViexwN-%mF=rxqwtFMEqonZ9jN59u%E=0Q5e)NY( zcfZ-~g1h=DM9+MMq@CWN8YKs9z|q<*gYH^ptUdE*kyto0Eu(;=6?3zajGhKOf7D;} zl{%}CfA+h7&u!c9eA|}jwWk4xogBZf@3nxVb@xqX@oX zT~ICTV5w!2QNHS`jc5~G4}(!)x3TZF$A3IG87`=9TGV$qlo2h4f7-*V4 zT!h_l6c!FhiBG^yoD#*0Dgy}u>H%X-adtfR)3`>>;*geO0CRaCj9t*-eYS#HI1vGBcV9+X+`N%Nq{N|G*^c`8S`U{F%f1wv+P z`dWrAkjU&rk7pjw^vZxx`0>n8hV%DUCk>AWJd+&DcRPs>A6rm(j+^65vInIMMrNiz zcFB9QnO2khC(9@GT<~71 zM(cKzdOS0jCbDiaF4~<%C{2gpmMaph-{|qoBH0$Zki$)nXGXGX_n`$6JsyzEV)!F_ z;CMU$nMF@fM{+(+Ruv9-NqLYlAlGieX7L6dPwGwAU`2)1-_^iaQqZT1Xl0wEB+-4D?WRQWQ zUd-Ww!y}2~FY*|@LpJ`DCZiZgAwrQkzx*IIC|^17J!y|*L=iTu-M2;oJ3ceSrRzk6 zl6FOVjZ$e&2|oN& z4s-Df6*;W0Rhz6P)vL?R0ri=BGA$Q+pUsHZhrT;tjRhgF4#6_gCmU5d@+HaIgM@!Z zEQTYi{Ulp35=($=0>Plf^kvhmOH_8zB|vz%aySFHuivvMDF1T8YKm_prf4$;MV0inXK_hV2ZI z4MuO0wXBl<;;veiRF;`tSn3x0pPCXdfebT(ZOP%w*uu0K=>OBbJ!qcm*N{^bPjS|K z4k+|UjQ;xQsp$6GaCWNXbtb>Yw0w%hAu37*XTYAM4m+%UP}Ahy5XSI4KK8^0;O-R? zKB5aOYn!`^qP~}>{jX3=+dXKH6HsZgarL@?8?sYTNvka{NbYe^5wg)i!FfZ${nX-A zkfa>4fXG#T@}}BdENKdagV}RcnH9vyC%f43-R}eS=xy}hIlN5#g>!yl(3abQbY@(f zLKMNZU;S6%QUfxKYgSoZAeD7^A#jB;*<>^Hp{LK!qsZo0{0mES;zF~?CJ~x4&9?|f zxpso)9^IJ(nJ3p7VfA@|Ay}pw&WNc`F$`e(ujxKxvi30zy*#mu>;doCD^s0j>^Dz$ z36?J-k8EmDS$Yx|l|?o>Cd!f@w8Ky$>4R!(V3WC?F@(83puFfo?&AR^cl(vu;Hyuu zN<2OjfB5_9A9Xqy1q=i7S=`$xoGdrXOFz+!ko@2T`vxInxd}3&Fhf$dyAO T42= z$xKcbqPptx1%NR|0%W5q;7PMWFE|pu)0rw~8U^8Lp48Vw{bRaT*w8 zPg!KsghKTNWhLKJOiC9VpGmS&J85`Rw=O!|cN#Vq39?b)oTv-jC>Tuv9F~yRQ6hhn z+X*rYjeQ57h3ayfOpYmgG=buPg}C#+0HY6=yQ1P-Yw1F&4p*LG<-Eigv9TTD_;6cY znxoqZUMtOngwEtvbJ%t*KIBZ7$B5n_9nHuKH;yafLBJeh zMX4+3>)uU4SE&GK*N5Tsg43W}EOM>}LGQz6PZ|mNQ|4dw3#z~fk7Q`MofIJ(xs%YQ zym;q;@&QQNinjFn3c%zFkP$R%YCh);&sWW6L)W;xtLjoIPB*Gx3^YwEa7d4E$pPN+ z{g`r>={bExHXy3K1|w>UsxGVcsMIxaP@McZFo%&!B56>wyygoFmHI4JCKRQZ)_8Il z^^U2!3_{Nmd6)LI;G7cU{ymZmwNmZCnHf%wkSs)7FshrZJyxbdQtMWZnY%&_!ls72 zOe5}N_hhD{?ldTr_~;IB2rfi6svgrT^5c6BB&R?^x`k0hj(!t4m#w#v#A~`XklYMd zP)E3TUY4|JfYs-1apzrN?=V^(;IO5SvC8wXrSA5P@EN4*oMhQ#RI>4Q=oc&Fc*lS@Q?giaq{zb7toJ%-v`K?9WF_smL73t z5wekm!|7Hcd=RXcPJWoGye%-I3y3L`YgHhp(=Ak(XLKqPz(i))=f^u3@n9IXfbG$s z8mGyI*qb-rC8JzGFwf|J@5}a{yf0+-;EtBEtq~>SMZblNn|6~*bo+ge3V^+nVfvKn zuOz?4?|Rv1*jURZV))$@yTx+1rsCulioWmh!6sAI)nfEf-AAoj*UueWBcWINc|38> zd?WQC=muOyy0JdQ8jAFe>8_aozfEMLT7{40^?qHnl<7((w5h%yU(w~ndnYV~BE1n+ zcR_o7aJ>Ck4XY>DZLmEFM?JS|q-|`F!7F46w(ZX-WzQ$yd@NDzZpp#j1Rr&}U!26V zcs}au#(0%M_L6SkB3osRLbe6Ti^ssIS>N)wTUSMgsB+j9F*t!-zx9k#er_hOSiqdX_Q+X zG^a{)Ofoe_9mVNNDrj=SL4?TKg?I(YMitE&U-6q=E#%hQoYVg2>nm#s}EV+`XI+dSRyrL zBpm*7J}BXuG75_PasV@NA4O`)NHEh^meH#C!e3YSnt~6!kEdy;R$F>m)QROUXX~Az zcuZi%AHE#$OgxGrHDzR1%~4rK>%a@Tz&9Whr8Lu5mKlH`k{bttFNe;VcqrH5nle%( z^2-6s#EK$c7a2wB%Q?ZwWl5-?0A`jGXoJGwjiH({eLu}`x@iCtsVO7DAU8r&PHl8~ zqd(L?gk+8^0Nv0Ryd@b!GRJ=9fFx2=Mt05&m1PDbk(x3R$@G}{7!w<3Erme z|7z6LL(df_2?N(IYgiewQ6Zgig#>KUb1JMxprkwe`mHRti(*~fmWHG)IiHm~Rm(+2 zM>zLchCXQHM@R1Sp_85wGL`7BkUA-2C)|UD%E%dbI%!K|Zp&yW2tEE=Cn%VR%^4(q zVC&A*%f-&#dSI~yg|jLz_lWX`N*mE1EshRnbXB0*1!eYxFulj)qmoI6{t6-@23&|e z#0Eh?1Yu++8j;^AL`*nTH;0sv8uWp;e}?wh!Dro9vc!wh5}zZUSQ&2dz6voCIJGQl zM2pp4rgXfZ3r>abDI`SMXy!hVxUC8b(kgM~cZ#%xI1h2X@90!5?Rq-$Uc5R~3H>ZU zRD$ME4X>mY#n&*RtuG~VE^#HhjsxU5)KwNI1hyZb?K|m3M1C)gP8&U^k@Bzd*_Nh|B_nAWhSX2yl+XXP83lGd6{7XmG%c3=310d9PZN<$>f?yJ z%=)B|_#pPhO9xf7*Sy09!(hvwR4@^Fj8y6nbRd6H!DOUs^c!PKiW++>vaY|~Hmhmf zO@TZRv92!LB2nf(U*+LUGJ22nAf#nc?(^9l%=<9GNZq!`{^XF1>jME0^|!JV(j&Tr zZKpA7_C5yeOG6n1LBt=93Z}b3u?cKi?@-?W=?Wz2&|Z9!Y*avJ$G^V)bSgUB7F|T@ zJCYJj?v+hqdchMXU*i#T%8%26?(GK#=`h*l10P~T}H~xdVMdQvd)-~ z`-3&lb*36=KK3|yW*PS!1d#3^kZNhV?nX=0NA{!OA`C}(@P%avO~pt`CaZ|(9jU7{ z$w%jA9p#PZkw-6Ov70wo*pAJvOm`Yr$_h#@FXe#gW?x@mQE-9F>UPDKkO}0*brG_0 z2bEvBDAe%>Onvv8OI+WKJ$&4uV~hib+nFZAp`g#k#5iuF^h+Ep!Y-5)!veCg;V_V) z)~npmeMog)MS~I2-c=p^-l=mjam^wDdFb{LUraP~R7@_T3dO?m#ZVXAmJH&3M@F0c4@xSwwUVw7TJ}EWP}@Kmeso2 z-M>)TI$pLnR(u{WHMz)}?Gz*A{x>bcUx72lj47Y*vn#HnM$>4dMW!ckYq~o}9d3?$ zQ1D^d)K}H@UM8=x258|e&h51Wzr$wq>NK1*X~4n9P$iSes;iv8I@JxZQP}^dG2s}O zQIpIr4m0Y&2QGCmNXDawIFAL4ot5*Hvw~&B0V$c{yhYR2`z0kv4{pM^O`=hruNR*W z(Cs$cLmD;T`tiKkigkI52+a`03TPF`7Lsft3Cr4d+3ubkM_8FWiG;~U)w%GNriUa< zHae1AU0)3Cd63j}g5iP=9K^G2fh0gSu1s(RWNx8AG69)4x7afaD6nL^a;7Kv6joQ$ zCc-(9>UoZAX_!%RAR89a;1^~jEuM>nUQGY;i1w?i?0^QNPe*SIRH}UzqEAQPJo`>r zS&(7%74cXop&xnzHcGBdS4WI7^%e0#aQKCBbAAA7hYgRC9?pXlto61bi4m%m4)D>;UQV%@4;%WaKy?JCWBT z@Bh`332bf1F_Jo-`Q#U2tGm;ycpH$VluO&l+tmk77Q%RwsTd1u>iw~6l zaBJuI(J{OrfQUkdR6S{^aa3SWgY33yZeB+HwhB(U%kn%yN%dsWDn2SnG`^IQGIGgS zP*&4o*`^Mz7}=<*C|{zjYSiDD2}^s~bXY2?@L|}zvjqHCS?v*%4Bb9~ z(dE@A;jRKBgM;inTL}Y|9M`JW+}j4{!~5)k|3H%uAscnr|E*fDmPNY?*83P* z`dfJ~-ZjnV{kCtOE2-c;s9rD5kkn4E$l5W1F#F^ex6&&XJJhW3#4tz}pL#MwwzeAn zpRpFnUk+Ht0TFxsgXxgCEPaj~32+-4AsbbN`5pOC>l{%2ewrz^F8e)~pZMUx{|C_d BWa), with Reserved Font Name CMMI10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMMI10 known{/CMMI10 findfont dup/UniqueID known{dup +/UniqueID get 5087385 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMMI10 def +/FontBBox {-32 -250 1048 750 }readonly def +/PaintType 0 def +/FontInfo 10 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMMI10.) readonly def +/FullName (CMMI10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +/ascent 750 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 58 /period put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3C05EF98F858322DCEA45E0874C5 +45D25FE192539D9CDA4BAA46D9C431465E6ABF4E4271F89EDED7F37BE4B31FB4 +7934F62D1F46E8671F6290D6FFF601D4937BF71C22D60FB800A15796421E3AA7 +72C500501D8B10C0093F6467C553250F7C27B2C3D893772614A846374A85BC4E +BEC0B0A89C4C161C3956ECE25274B962C854E535F418279FE26D8F83E38C5C89 +974E9A224B3CBEF90A9277AF10E0C7CAC8DC11C41DC18B814A7682E5F0248674 +11453BC81C443407AF41AF8A831A85A700CFC65E2181BCBFBC7878DFBD546AC2 +1EF6CC527FEEA044B7C8E686367E920F575AD585387358FFF41BCB212922791C +7B0BD3BED7C6D8F3D9D52D0F181CD4D164E75851D04F64309D810A0DEA1E257B +0D7633CEFE93FEF9D2FB7901453A46F8ACA007358D904E0189AE7B7221545085 +EDD3D5A3CEACD6023861F13C8A345A68115425E94B8FDCCEC1255454EC3E7A37 +404F6C00A3BCCF851B929D4FE66B6D8FD1C0C80130541609759F18EF07BCD133 +78CBC4A0D8A796A2574260C6A952CA73D9EB5C28356F5C90D1A59DC788762BFF +A1B6F0614958D09751C0DB2309406F6B4489125B31C5DD365B2F140CB5E42CEE +88BE11C7176E6BBC90D24E40956279FBDC9D89A6C4A1F4D27EC57F496602FBC4 +C854143903A53EF1188D117C49F8B6F2498B4698C25F2C5E8D8BD833206F88FC +BD5B495EB993A26B6055BD0BBA2B3DDFD462C39E022D4A1760C845EA448DED88 +98C44BAAB85CD0423E00154C4741240EB3A2290B67144A4C80C88BE3D59AD760 +E553DAC4E8BA00B06398B1D0DFE96FB89449D4AE18CE8B27AFE75D2B84EFDB44 +143FD887F8FB364D000651912E40B0BAEDDA5AD57A3BC0E411E1AD908C77DCE3 +981985F98E258A9BB3A1B845FC4A21BCC54559E51BC0E6C22F0C38540F8C9490 +88A0E23EA504FA79F8960CC9D58611C519D3ACDC63FB2FBCAE6674357D7F2285 +4BCC9F54D3DA421D744D3A341DA3B494BB526C0734E1A8FC71501745399F7683 +FD17EC3044419A88C3979FD2ABA5B0130907B145A8462AAF0A9B511D2C8A7C7F +347FF6AC057E6512902BFD2918E2CD31DE615F5D643764E900B60287670AE18F +FDE15545D8BC69591A8CBBB275AFFC9B14BD68DF0AAB32268FB84844D4DBC7BB +C591C1AC5102C50A9C7BAAA848DA88B0519F0F5F0813BF055CF0E3C86F633A04 +B779D2E8E656DB1E09A66A85FE21CA8BA5523F472A229E83F2C4E91ABA46C733 +F3C7B5775B06C97782BC225C46385BEBDC61572458EFC5CF4190AB7A9C1C92DA +29F84BAACF552089195966E3AD9E57CC914D20B6962BE80429A16D4DF1ECAA66 +36C4343FADF0B2B48F12E2EB8443C4AA29D00949255F3968617F98B8ABD4CC12 +048B838EE243A21AC808BD295195E4AE9027005F52258BFCA915C8D9AED9A2C0 +80814F79CF943FBE3594C530A22A92E11BE80FCEC1684C4F56712D5846B0749C +9B54A979B315222F209DEE72583B03093EC38F7C5B9F9BCB21DBE8EDDAE9BE8B +75ACE6B12A31083AC8348EC84D1D29D2297A266284B7E9734E207DAF59A25F4E +4AA38509E993C5394FED76E6A2F25462685C4C86C6E8CFC9863338EC1428BDFC +74616BB1BC8948B0ED4C87C15B4405F3A7796F9DB3798FFFE8BD0A94E834817B +D5E9812E308D0CC920470A6F2CD088FCB80462BF7CB3F039A7DF3DAF5B2B5355 +E083A385CD2EAF0FC181E40E96DD7E9AB9EF5C7E6866A13B8A54718E950FE097 +EF0951A357114F18CE9933D28B3A77AA71E3CE884661F13284BCED5D5FD1A86D +543E588FF473DC2CF9A4DC312500135F29C2D0174B32018C8DBD40EF9A232883 +710A1F2AB2CD11312300ACDF789A9B7B93D2035D81D1C84984D92D78A53A00C6 +EDA94B24BBAC1AD17774A4E07E6F74ABD90415965616AD540C8ECD8C3A44EE4F +7F4F6BB6238C5062D63FA59B7BF08BE93FAEA70A2AB08FBEAAF7DBF56B95FD93 +03CA406543BA6C9527D0DF01F5108D31A51778A5EB1C93F27B72B46146A353A2 +01CACBC829603B9989A87CF64528682CCBA0562A8165B185C58A5C6BB72F5E89 +500ACCAAB8ECEFBB2640E99EAEEC4EA979AA793D013D61D8ACF8784FF8D9398F +F6A252A709324FB39509F0B3A4E725E82F53543383C6765BE556CC897C758208 +AA3AD37B0406E4A79F8F0A6C1983FC73E71CD858C0DB66ED66D5D992978614EE +1EA91EBE191E082EBA1FC040AF19A2202575C2EBEB8058833E3520FA03D2F915 +85C1ED337E457B9FEEB0C6EF2735EFDA6E0D05FA641BCF698AC6B97751E8306C +4DF00A39B8581FF53DB8F8525FDB196D85950906CCB59B8EF171349AA3B567B1 +6A00819947A995FB383C3C1709C9A2C113B2E40BB832B7D4A0FBA0B16A2C455F +55809CC425C403E9668DC66BE45B71A81C332FD4DB279D22A2959962304A8F18 +085893DAC61317D24A8F198FDAB95F3B86F0AFD35047B868A9A17037A2829A02 +BAB042F75F349E197A7EED41984C2859754CAFD0251439921C248B463B516951 +2E1322C80D73F9CBCAA63A585450275AC2492E4D3FB78E800F788254DB5E610D +CF788DF5C70FF99892BCDF16133E34B24B77C8F097F546B87C603DDB8998B66E +BACB68BA27462AF54AA405682EC96D701F0D474DECD5F95CA2102DF639EB169E +D518162C2BAE45FF698B6DE15FC6E7DE48C336C40A670FD26952A6BAB09115E1 +991F0073419F2CC2A1C08BE91096936AA0C37E4ED3CCCEE235476074B8FF1125 +6BDE3701F85532D8BB64CCC927CC335281C95EA689706F0AC717DC2CF680C754 +E5EFD7FA4BB8880B2B727A964C876D4A223069D4E6001771F0E23EAD2A4BBC80 +E76675297B2EF05F52BF4E71B3EE2BE3048CF088C79540113C66AE98B2FD3CB1 +B0741A215FD070882C52765009D7D711DAA2508F19AE7DDA15229A856AC49BC3 +4DDF40814FF96500E4B9B02D412E94623C5FDCC76C0FB8E42DF56A904FE49D65 +1DA7C53901B2EA71AB658A464D3ABDE27D9DB8D9E0B48F64E61A2495AD5D8DAB +B5E72424AD017DF37964AF911BD7FA21A5EB4775DC8E95EF0C0EB856B00D89D7 +8172A1DE8530767D317B8256103E53CFB877E10686A04F5A08F8DC58D843DEBA +FD5F40597588663D103689F6EB3EB14D06E18C8078F2538B43E712DF491FC5C6 +AF639256C8C6134B64D560D8476DEA6329D995E46CC4BC78841C59E73648B47E +BFA7DE0846422F738454AE77E822A083405289247BD7C478BE4974F742CD6051 +E99FBB1D1B3FBABFEE855174734EE45E87D0AADF32B1283B911162A9955847FD +38944D70584FAA6B1A7191C5C134B73F98EB632B69E2F0C0F94156787C34C8A3 +7622A029D58F9626B74F8A8A1F3803E0BC20E0EADEB1E99B70F1BD9F980FB751 +2A842843DE42EB142A84D5D3138629AE9EAF6F3479C423E8829C8816FA6EFA27 +DCE5580E65AA9854B1C64163DC318420CD993C15BFD76A8BA1182860A6B03D6D +22B8CF43CFE6C8AB27C64842E239CAE707D3086BADDE1D7C94E3BC96319470D6 +8D26915C575CFDD03271D6BB9DE86A0EB6EEA6E768B224A626C62A9AB48A6EDB +44F70BB5AF991CDF9736D65933E81CC57A78F623F33EC9AF535F2F25FA4EEC90 +D50DB7E87F31E971A75A33A301CA6013EEC5A4E179D695B33DADF2C98364434A +42926776000B610E17524162253F6FA638D6581C18F99EA0BD1D2E24D2424ADF +C05010D08192485153DD03930C7BF45237593E484F9851E6D464FA10FECA5D9E +0C8CCC97DE029030900CDBB491C5CF226DBF903CFE7735D939C3FDF3A20B70CE +66579B28B99313FEE914E295388C7BC8E055A2E54EA3A8206D3C8F4F7C0BA5E6 +E519419FD8CE215F7B8E9BEC604A9E3FE272A0328A24E31997C8A91E0946BCF1 +6943A97CBED2AB9FC636B49828BBB8B89E0BBC2653796431224895ABA5DAC41E +1854BD9764E86147FD7624F736F40DE3B7582EDDFD15C2BDE3F22B5A54D7DF10 +B87A1301CE85CFC061689A890A321412A13314AE96DCD3EDA75035FDD8F4AB9B +897A2C68263A68457032C469987970648BA2D88B1C5375DFEAA35A917B8A952E +EE670427942AEDB3CB599C5746180E392837D371E15D860620ABDB6AA7772C40 +A5E346661673ACA530BE3D8E3FFB895E5DA3DC23B1B43C080C77F7E47847F0F3 +F3AA5CA9E4BF75FC5EBD18D19F21A7DAA3B11CABC6E4070A15F7DBC8B05EB6AA +A02EF1B078EB66D61D6AFE41DA9B36FE7EC9EF94D1EA26282A9871E2CACB3126 +2AD49C2D9B50A6E47D8F2CCAD50992D1B430979A45FD9E76182A19964BB2A1F6 +51779A2B258DC1DF4C2F3074621286831F3848AC152DDD2BA561E6586ADA88D3 +598A2CE2CD048F027CE0008B828BD915887D7785341E8305DF2346ADB76BE99F +87B02173BDC334E9221C8DF54114A6B24C1C5340299512FA6C8C51AB4C8778CE +178CEF531C6D1B5FF0A1BE8EFF767F959BD4C345C52699A29A17B2A230842BF6 +4B011217D6D24EDAC3F6D53482786F1CA33169B90ECD499407D37CE9B70DDF78 +7B7547B32952535BA9ACD1E244447AE3FCED3AF28717083CF9590A09780984D6 +AF0743C82AE4FB3E2BB2856A4153A3967A023FFC35382D6C22D84A924900B6A6 +3DDD400E6D2418DA6C27F2FA34C075C902B89EBAE658B3C9A18EEE449DA5A379 +337DE95CB7AB3F0970CF1A5D8FAD8090E495570FDFB2FBBA79244780D8035547 +C5A55BB21A2270F724BF5D442CDC5BB9F09BE0CAE59B1C2270F0BDACE698F2C5 +DE8F66BFB9634904B161F5BA2B1950048300D69BABD312D58D89C4ED527AF7BA +7DA2478EDC2CDEE3473DD8A8ED9D891CD1FC21F23013228BB3281B71FCE959BD +6F8E9059D682A7FCC5265A0620992D4FA8D78377EB34CE3ECA070EE3707239BC +98907DB0120CE42ABA32CF97127E28382BDDFD685674279F588D4F951216C355 +821361790F64C2CC720DE97E8ECB57326C43EE47367628E05769E106868B54F4 +C33C9951908DF6FC4F5ED2C7787BD8FA591BBB3E9C6C1DA94CC5E38D9B20C886 +7D237572FF46DD896A4D6163408EA6CEFAC398EE041EAE29D577E75326CA17A6 +B072D47A7B13EC441CE6DAA042ECD02134CBFA6809A435050413817193DAEB16 +A5882C8AEA44BCF36E74E9ECCDFE7E19FF5A5DD7A94E5AB4F8702C3DA7F42325 +23C808670A0490F5B373DADE40814FF9650241D3D69C91FBC5ECE728F827D9BF +C928602E05477903449E079164CA39859C4BCA60C579F490AA455F82B5050BB3 +969AFB478E0D4A257B3356EA3CD62051FCE6C6B1929CFF85BFDF166BEF658E10 +3A55E007F38EBBB248B3F0B8ED1925106B499B762E45113AE1AC9DE09644C84B +9C08034B297314EE69BC32DB6E7D7FB9913CE5AC17E7335979E9DCCE2BAB3725 +1976155551F9706A576FE0E3ADCCF72C87683291528ECB749CB0ED291966E239 +B5E3630676BD409E08F85BC1AEC9A2D4135376284A96EA24431243BD6FE8B966 +95F11A4BB53F392E0AEFEA623064FF8A7002367B0A515635CB2D2DDFB9B4A8D7 +FE721754E81BBA548848A235B91AD4E4F7DB19CCE2F61D277FC00AB956EB93BE +44AB4970CA56BF59506C94ED160FB1E25D3DF2988A532BDB787BFB8539D22986 +FDC378AC31444E63C4727FEE121A43751043849E6DCAC5B59D0FC703AAFBBFD4 +E8B7C268F21615AD02CE9DABEFA27B5FE6A6441B619539CAB1F810F1263447AA +633F5DAF483752EF1A0421740E3A811D2D2898CBF53E7F686C9223FD7235F02D +6F90D2D48CC20AB87778DE3C6FB335E0F0EC20B5DC5B65223FE117526DE2C72F +FE839DF93CB2A7D66CD900CB325F891E311BEC932F703FB4FEFA29DB8B9C88DD +375EC71B3D58C7BC59ADA91971A3BDA1ADEA629CE6CC92BD542CDDFAA7706FB2 +6CDDE2DF07E56D6741916AE8E8744339816F3E6C38062747AA9FDA2A2678A6B7 +EFEA870AA3A4D71B25EE3013EAB1DBA34401B867C7A41AE51E0421D41D3BB83C +E120C8FEABA6E5DEC53A689C21426D4BBCB68CB37568761C360E6D4E3596FB7D +F4DEC7918E58C0293D12D6DDA7E9DCDAAD7C939F55CD1BC4A228B31E9A904156 +DA6B40B08E6ACE674618B768DD681C772A3E55FE096CF949CF3B0460ABDCD891 +D17B37B355B29AB5137899C036F31DA026244FA25FB798FBE5105BDA29F46538 +D3D3AC1001A7BCECE64DE94FFE6C354166A0F97256137BDFA07F6E22A3D1D2F4 +9588DBAE95E895BC5E64DDCBBAA8D0A22C229B42CB717FC711E7E9DF793DF80B +9F14754585A3C7E17F37B32924B9F9870DA8635E3E18BD1DCD81EDF01834D9C6 +B33F23C956C2FCBFA47D84422F583459D827D1E120B97694D12F1F54D02379C0 +D288F7104F3FFCF4F76E3494F4ACBD1BE3A15543CC680924C78A473F8E311ADF +8FE00A04C6C393DE61AD3EDA5BC031E2353076A2489391B52632387CA28A7B93 +FBB065A6EF3658AE80B1ADA47E9B2539E73A71FA75645F85ED8ECC257FB4CF26 +B6C912DE9D0F9899E70BECCB934AD32CF49A093371A9F73DE6255EBC39DE1E7F +00D0CBDABD4D0383977E694890E71FBE5C376BE5F3A80C28987417504F515C50 +909F3D31178BB9B1D085BE514F71B910A9085BD6122DDC72A150BFE266920E49 +5661BCB4BAB51D6DEFE32B616963DBD989FCDD1637B294CE4E288655FBEFA1BF +7F25BBF8CF17C2D5FD161A7C2CC9CC7490D9BF15A1D35B3BFA43ADE256E88BDA +BD490D92907C57BAC408A575EC84D6AEE070148C7C9A91C03B09FDBD792E8FF0 +C0B886AAD2EDD86541E5E579359D40E3AC312ACD3D8FD49F71BD533DDF8859B1 +BAF17F1884E331DD07CEEF93B71D492AEBAADF7A263450A7A72210CE630A0D37 +BF024BDC09ACC882816B8C22C62AE38A3A8D0F6EBC2B1B2C0B8161A8B076DD5D +4B779C0788546BB4CF57332230D237856B00D79C28A7C01D11F44B7304F69075 +94B97A745DA43D1BE561372CE611C345A843834E46AD9DDB16CABCD3FA33D6F1 +F6B5C0497F5EE5400B305CDC16A7EC286AA4D45D0EEBB9DA06AC9C5294D68EC9 +E4DC3CA2B92CE8FC0526184A86EDC7AB34D67E60AC12D9CA8FD300235EC968BA +92C6FBDA47572BC5600F25249F60AD287CBDAE980E747FCBE7EE5CD323E733F0 +63553B494D3DDEB9CC1480B5C3BB79A28E419AA65B18CB297AB383419E890E2A +CE6F98C9900CCB4675280A10CF060B8D220DDA1BE55DFA65715EABCC1AFAA271 +B1F8732341613E17B231231A0D24D4D7FC198AE04D89A99C4536217769C6FBD9 +5EE24A6302F97438F7C0E311C878F674B4477A5ADA3952CDE4055AC408B8174E +86F8FB797646DFFFE0ECA25D1BAB9A9F71F3926D3D85AA63E7A8C931D71E79E0 +AF1EAC26FADE468F4FF7F3861D14C10E3BE1F9EAFD6D3A544E8108D5DAB5B180 +3950C74818BC8AF4758A108F462EF1826647A49667F5E482038C54716856D9BC +35F29922846D2148F92F943E951D7438C73D6A60459A8003174036C64E1629CD +155D47FD04B03C023AD67CD5A70C98AB556EEAB8C48169706E5B352F6505D580 +AC945171BFE62E81F8F500438AC3B64D857BA5BC54C2C4BBB237F8FA51296255 +E66A92A61FE13FDE781D393557EB72CEBAD86511035F775FAC39A0479CCD400F +226709118F887F47CC2ECC8F79816D4A945B2845F50AFD62D8C9A9BBF4739496 +9E644BC9F7B04803B7EE75A09EAE94365F6F374B4FCEB0B506C76297564B9B6B +8B812BC3A33929AA94692572B010E6210AEAA312BDFC88BF302244AB9D587A9B +919823FD01DE12438D960944D1977800FEB49E638C32E5B188B1CA033E0C37EE +A142F746367888AA119535F0CCAF7EAA461B790EB089D2D6962E28A398439BB7 +9C9943654D7A2D765B46BC0DD1F915327F369162E1BA1BA83110B93F442905E0 +523BFF5E279508A98568CD5CFD18FABBE9D17265A9081E7BF64155A2CE3C0DF7 +88D00671AD65654709589BAD7EA65BBA811387ABA5CA0BC3F66D3D48597A0D1D +2C268375DF47CCF62166262AE4840AB03BF49BE67A05EF66328EC729F03CA5FF +AD3937FC053E223303565DC771ACF32E63DFB96D5030E787961D72D02C195C66 +B48E9AF0309DC169CFE8D16E2818DA94693A18F027DEA0D916672480464F7E22 +CA6E431FE38D3FC019BDD229E064B72C545C61C6EA55984565CCA88ACB01F744 +3B4593CC8944C70F30925FB48A16342CC26D444F54CA15E5A624C4A2DAA2AEF8 +404145BBA339F2A2D6FC2F3ECE54387761CA1213C8D56FF96E37C6147CA44B84 +262EA87E7CC10D931E6B5B80D7F09813498497AA84ACB4AC69BC6C8481ED2953 +084F560D7B1CF90555E69BD2AF7C5D944E8E3506165014652462BE1BC81CA341 +E1B0725159D36DA0FFF3577D1DEBC5D91AE683FB0384 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMMI12 +%!PS-AdobeFont-1.0: CMMI12 003.002 +%%Title: CMMI12 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMMI12. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMMI12 known{/CMMI12 findfont dup/UniqueID known{dup +/UniqueID get 5087386 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMMI12 def +/FontBBox {-31 -250 1026 750 }readonly def +/PaintType 0 def +/FontInfo 10 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMMI12.) readonly def +/FullName (CMMI12) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +/ascent 750 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 58 /period put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3C05EF98F858322DCEA45E0874C5 +45D25FE192539D9CDA4BAA46D9C431465E6ABF4E4271F89EDED7F37BE4B31FB4 +7934F62D1F46E8671F6290D6FFF601D4937BF71C22D60FB800A15796421E3AA7 +72C500501D8B10C0093F6467C553250F7C27B2C3D893772614A846374A85BC4E +BEC0B0A89C4C161C3956ECE25274B962C854E535F418279FE26D8F83E38C5C89 +974E9A224B3CBEF90A9277AF10E0C7CAC8DC11C41DC18B814A7682E5F0248674 +11453BC81C443407AF41AF8A831A85A700CFC65E2181BCBFBFE3573BF464E2BE +882A715BE109B49A15C32F62CF5C10257E5EA12C24F72137EB63297C28625AC3 +2274038691582D6D75FE8F895A0813982793297E49CC9B54053BA2ABD429156A +7FFCD7B19DAA44E2107720921B74185AE507AC33141819511A6AC20BC20FB541 +0B5AAEC5743673E9E39C1976D5E6EB4E4D8E2B31BEA302E5AF1B2FBCEC6D9E69 +987970648B9276232093695D55A806D87648B1749CB537E78BB08AA83A5001F7 +609CD1D17FFA1043EB3807AF0B596AF38C91A9675E2A53196FEF45849C95F7DC +182A5EC0EC4435A8A4B6E1CDBF9A5AF457564EA72BF85228EB6FD244F2511F5A +CA9B71A65D53CC06EF5F7EC3A85106139A4D312378BC22183C09A229577B793A +1B7422611C03E84BF809F46C62CE52D3AE29CE01C32B202ACDAA5B72733EB0AE +C31D7EF7BA88D2D14F85313F7A8B9B7A5B124B03AB923744D336C969E5CE304D +3AD977A46664479EDEFB69F113024E761C05FA48A54072DF9E12C2F352ACB3E6 +D04F6EEFFDE209E7FA3DA22E5B1D1409461F4286B7F4F8251B44E5CB7805762E +E129FF4A06A7458F3191926B1CAF70E32C6571AD2DC07C34FF62840896F4D200 +761B1A7FA356526D1E3AB4C542AF13623BAEB9F61B1BEEF79A9205B1FEFDAE24 +8799D516A9ACC30BC0139C63C9A0523E9D5439213B67D490C96F902958779B8F +68BD8E9FDDCE8A3A2E35877DB6C94B7612382ED8F218EB1157D2ADD090A2448D +10B99FBC9211C5629ED1C61C74FE93041E5AA03EA4AC3FFDA00C2B6E719CFAA4 +262FE17F66804A6B54D3669836EE4367D2A2991580C5564463C973CA0DA38AC6 +922716E13B4A807B50304B8826CEFEAA47C305FC07EB2AF25FA7945797237B16 +56CDE17AB0834F5C97E0CC5741B061C6FF3A8DD1A79B9A173B66A6A750538E26 +32FBC92E75BA15CFFE22A7302F47908547007402569158F62C29BA2956534FEA +7DACF1E507AC309DAE8C325F2A6023D2FBD81EF42146BFCE6A16A6310A650460 +7B07BB7647C8760FADDF0DBBCD3DA6CC4645D1732DB3A22D8B76E1D2D48E4D4A +46F4BEB80CE65F3517283A1AE08391FD1C10ED452133706BC6725AABC80107FD +754A8BA47B0281D479F052CE26A723EFFACB79B213041A536542AB334769A2BF +88505D82C498ABDD5A73EB539530F47CAC52825D16A969C8BB56D4A7F2830B8F +CB63B92B576E7BD922A4B25E634751F8A3B7C4EBAFCB373EDC8B8281B1D1371A +7844E9AD990CFF09F0D7ED73A5CF873D2D5C9E8A9923CFA31E1A4B4CCCC40760 +8B3AC8FC3C88BC08BD7407725281BB879A1A822D94997826418F1B89D303F2C0 +BE7A0102E6F529630CBF1BC5BF3E4578C164A3DDE45E62A957EF3FB7F0FBBA6B +CA1E79A1ED195B6A11CFB345B663C5E72FA55D80476F604F6C4257B51686AE25 +8F7D159FE605DDA0AC74BAA5034F29FFFD403070013C6E2D8EF6A0990D91173B +D5A3AEB98B64E412991505C3CB7C2CDE13C091FEB3DFBCAF30C4C19511102300 +135BD5D444BB55692013F52056908DFAB2ABFACE81A58423ACEC59344CEF7D4A +C5A3EFFFFF70759BC3E593D878281225060B97D1BEE6B26EED90571FEAFA1812 +1115C0EEC892F5DE6FDD68321A0B3F10A2D771B79BD85476AF6018472A499A86 +07D64CFF4550866AFE590C471C80EB12CB3A989A60BC7BED39097C12D9286E39 +14C7952C4C64820B4DE44A1827B7B0B535244E93FDB80036D6332F90F95B472D +7031E7E3819E881BD0313CFA112EB3AAE943C99C47635CCA7E34DC0306C04E5D +2E9F60FF037EB11602BE74E8E6B711392E866E3E55D988F7C856417A2B9C186D +639819B4786D039B77F8578EF63C088FF28BD08D8353031445C8498A8F445BC3 +D08923D32AC04BF3CAFEFCCC1E77EA894F4E846F47EF62D6841B8D8576FEAE8F +90044626869D04D61D64D56E8C51AF8C18D6CC3FEF3B6C4F7D56FE3260354948 +10104F69B117FB8269292579A7D52FED688C663B643D8D99F13956612271073E +1A337AED059B7A93819A28CDF01569CBEB51069D22ADAE25C47355560F402B2E +8C9900DA82B79C64497C8494F42FABE5AC41791C2010D98FB7E593C744F250DC +D837DB0EAA4F75D0016970F3AE8359878A08CF9A697A06C5EA945819151265B9 +1A12122B98F79185DF852257BB4798E7DC03712EA6ED34F6E6AE1476788DBC33 +9229FADB8D581BE1A63F596698DBD6DB98A092F67197A4FD4A50B648F2691875 +EE2495D6BB310078F516785A0CEC7EB6E8305FDBAEB1D15690409FE32DD9CFAE +DBD3866FB63EBCAAB73E3E4BE5D7F3AA44793938AAF3F8341683F0790F1D46A3 +60CE083F9BEDDA22E0639A92393960F86602216FA51E2754BC2F4CD0BDECE3D8 +FFAB7E0E49613DD4956C9A10AEA798BDA1F756C755BEC12147ADECAB0FB73B7D +203A11D84DD2AB5AA98FD38C1C2573570FD49A4924A94A106D2A7D850E793608 +FB135853E8C4204441CDBE697FD0CB330B1C3596F32D2BCBF263237EAB362D09 +DA6F531B40384DC91F30674760CA7B64BA1968F6A7FC9EBEF431A1AFC5E76D7F +2D44DCB7F61C7F6B16196B3E8B47343F572DBA8B8B21B43E35BB6B2DD5C7982D +244FD4304D254D6CCB5E8CF70E77F50812F41A988EEB3B26BF0F6F69BBA18077 +31134B5A5823D10FEF6201D045AEE7A24E0F25376E9FC66340C56C05F6CD810B +724D85CC4BB8D789834A447CBBA159565D08BA5793D8599035BB5063271518E8 +F6C50E7DCE71B1D186270DDC860C6DC0CD506010EB5B1FDF6BE47A9A18CC15D7 +D657E58BED9EECAD5CE5D49F63139A39BC52C6584BB2C3264D51BD584B40F8EA +AFCD8B83F548594386EB2B05CE803105E84931DC6E7A1398073D48E130E0D907 +CD0F1ECC3254EDF5D4DDBF44415DC9BA66C673820CDB0FDF033D59BE2B5EFCEF +01FF9D33EDC88F8D522E07F1689D024DBCD09A16A63519E1764C8630FF36058D +CFC07027E0ECDA01E0E85B166C613B22F587B4D355EB018BA93E92A36007B4DA +287FF5A91F7D8A0EDF5554ACCF45AC8066E88865C5692E63EB99CAC81367B605 +8E6C19EB98EBFE0D2D161B447B9A70CDD1122C7B78A413369016E6D8481E2AE9 +9AA97B5DD0ACC9B0820F7742CEB2F46F89F3E2092621969A88DC0156B4F941A1 +6BF1546D4B136657C47B082A8A35FE96016BAF3D9679B8C32EDDD6AE6DF3BFB5 +7854074FA019707FC22BFA82299E72ADF9A980AE29A8E2434277E58B01F6B03C +192E1E25DADD49F6E3F69799AE62B56E00B60A031BF8721DB8B2CB6D4A4C15CA +AB1FDE010AB7DC0DDED977389B101B8E53A949222FAA126656E02817DD32B0D4 +A49516CEC2B97EA7C78FD66229B044EB92F502384BCC6CCDFFF995EABE3BB7A9 +50D5D1AED861E7D3BA8D333026C673C5762712E763E59261426044583D789C67 +A606B96F97663F92BF104CE02FBFDFC521EC0D6670B7D4F85A229F51426DE912 +3B729C4A535FB7C88D0A5E78074751B58885DD6BDD2DD9E9C83F105E8CF63DDF +CA7DB39D0319CA7CC2E73F42747F007574DE25AE1538B4D493D22D0D5F0F80C6 +5F6FA3937C8391DE2F0116F81DB2DB0EF751EC838A7F85F163A6F48804E84B96 +8D715EF25B7E2A5CAECC558D80F421052A1D698F3B8452AC27E30A4E6226E3CE +084C8A83ADA0818A110923CF7AC7AD4CB92AE4ABBE0A9EC1FF935FD02774C1F7 +92A278E513012AD17722A23C55EF82E18F8847B5CCE47F4FE3EC508BA563F7B2 +AE56C94285A18DED4D432FB0CEFC05A20BC17DDF9FF919C724810A8ED7358A27 +97EC93C1A13C443A91947FE1F6F528EA7B628917FA7E554A1D7B31ED46C5ABCF +92BA57961C8876DB4041305EBB029B03D8351D5E2819FF87E97ED214D8F1CEF5 +7F7668DDE223721C0B810F4A4AC81CA4EAC86EAE546E1B15D91E626FB9A31824 +5BFF17C4E79FD56ADBF6DBF01BAF6453A81EBDCB38A5FC0FD0FF0646B3B0D199 +13E2E59A1B5CAB6DE5329BE389BA0E2A2AB55CA40B711ED746C24F1E48892E76 +6DACF7DA163CDC90CF076763008E7A899870CDED5A80758E6177BE6B93B07EB1 +5800A3BF7B9AAC3FA825CE594EF5B7546B181375FA8F37608DF17856D2F8EBD5 +6030A9E6F6BEAF224AD2AEF76D03B023E2FCB922CB8E3C6816AABB61FE6E4F83 +F21B4935102C860ECA03DBEFCA461F0E5B93E5A8D18440BCF7D1D6252A24CB6E +A64FDAC8B67C4888519AA368D9C4A8C08C7155DF5BACD75C5196C571C3C456C4 +7CE8D90215FA6EE8CDD72C48740F7F5930EC3632DB63A9C8D2DA125088C0F05A +9FC83D16B7F53163F4EB6FF372C6C3115F1E68EB35967D11126EDEDF0BF80817 +E68A698183B3EB0A207DB43786E1B9D289359D75AD5E465328CAA90E712C2962 +AE2A466173F2FF30EB535A6054BB0B875DC8552C16B49DF17CF84D98D35497BD +F55E273FCBB0C735899529A69990E09149FBD2DDE64B7FA8D50AE83925DF03C8 +0B63EA158FBABB12A028803DA4B9DD6C48C0FEC469C4E730729F4BB420D5B003 +1918B4AE9CF35CFD31E8E62A44C0484E3D00143BF1D330235E821E5CFEAB4D31 +7CB4604DB1F310457FCF9075A3527279644D908DE847CCD00B6F50DBDEF91D3E +38238CAF550FDCABA2C3A46237218DCC5A09AFAF69997E1EBDA7EFE6FC99ECC8 +5D4AFD5EE35FE2346BE79B499EC8EC436868154A947D13BC02C780EBA4B9E64F +3026F1BF5DC1F8D64FEA1281EA40B4BC355638A3A59BD9055BCBB232FA45EA0B +B405131B64F105814019BC55466EE78E9E9ABB62DB30EA452F7EFD7196C76A85 +15B2CFCD89922CADC0F392B0C54A231F3999AEFB53C24EB0C63B0C8A1A1ABB6B +AAB2F93E5ECC7AB90EADA320E918106BAAFC1F8C425C617639984629018BA674 +6FF4F338AC43E23BC3740542911C058D43A49A11CB3A0CC8E3088BB5BA6048D6 +CC2AD250DE956BFBE83BB24C945C20D9C22E7105983F284EF478F9B68BFB0322 +EEB7D62802CBAAEFF1C2332159DCC7243EA40CE15C734EA905E04C476B178B82 +A08ABCB0B86A7330C75E62EE7844C9E22DDB013ADDF20AFE08122EE1B930A81D +806A0F8CC584CB7FF5F56F9B35E5FF78FD93E7E4A40C64537464EAA275FE88F4 +461FC6A467C8A69B9A9FBC10D44AC1B753D313A8E7D97F5FAEB60F82855658D1 +4DCEE043C8FCDFD8A29DD091F3BA55874A458B2B8989F35055C72FC411382361 +9AADC717E602B48D7C9521D3971A6F7EB19D539445DDE9EFBC5B58FA9E5E426C +172C45CDA24985FC4632287FC3B15849DEB56F5A061993AB10A6BC59868534E6 +69888175053108B77E4978D971B4EC57224C0F93EEA4C15AE92254140A94704E +ED5666FC06C5341F643F779CC88A9E81891565C63B6F7F6286E664F4E0A48690 +356DC96F1B98026C563700772485B83BFA06435D4E0793EF822F423C93FBACA0 +E5D889D2B76771C6F0EE997A5DB43C2F6921132890406E3C33F6F159B14C5D78 +7C151BDFFDD02B697315F191B5490073EB418A4FF2A398C68D44F0CD1B87CF9C +B52F12728B72F94D752D23151196A256908135C87991E508B8906CE2539DCA8A +31F86809C8C6C18A09F6129BD7CDC6B37E76B648788056851F22BD3E3B5772FF +EC01D822B57FFDB3BAE624F05531292641FD6A7E3666152D18F6C653048DD7D7 +98A942C840C4A0FA662F260B21C64214152BB86F03662A330109C5AC0A5EBA30 +C6201F558858130703DF76AF4FBBEE069BDE45C0D9467077D85FFED4F9BA9C61 +AED87D67CDCA453A6528AC5BA153E1039D9CCC556CEA5CBB542265FF54A1B208 +E0E13740E7E7C26AA00AEE909F8F3ADC2726081A744D8EF6BB711BF5F611A900 +76F91C26A338DA13A7160A9F42410CCEB3190000D963D036FDA05A29F598EF40 +8FAE6F8E7E6F50C99C3304A573501C13A00023085F057DF331E3354CBE65D573 +CAE73BF15B3B96B502E0AAF2B4A86237E98A997AAEFFF4227D5A26E8972C48E7 +761F430733E6EF8AB2D903C17FAFBFA21C25F8A0AC157D397BF3CC1AE7598F0A +2BE4FB46B29443CE57F41FD5F91122E9D86F903E94D5B55E2BB95949C156D138 +89883BEFD634311F9280C7F028DCA6408D3A682DF5B55B9F7ABF08F019190F60 +D39E4F0E80F0594235B09A5320109638B938633A2C196E4ED2B43DCD8643C3CF +C6123B076B7F73352F906D96FDE0FBF50CCCA432712C574D5857838BAC30B485 +D25024EB254A7EFE57D1DF0892C275CDB3DF77602F0FED0FAEBC644BCACA04B8 +B424DB125E487794CAB36E01B5E1A26F5E1E97A739AA36D77A12F5B45338EB39 +AF36CEBDED55DCBFCF497FD475FC6BAB5530AD6153C6BD982564EE8712185F1F +D5EA7ADF4104661168A01994C1FD773A50C8AD6A3E4D332E4D59521BB8BBC6C3 +866EB4AC3EA4532477E6CBF6BBF0860031C3B916AA25E3492670EA67F55CF4FD +207C684A0DDB6F4AD21B2909CBA71BCE2E762012B0927BA72367A6AE0AF87F73 +756C9BC85E4EDE35317E2CCCD138C02C7A8013AFDC1A48C3A4BB8EF257BDEEA7 +60E012F54D12D31D18DC59D5E526F12567B8688B4B67E16B56713870300016BD +A3B9DA87FDC865246AF8E94316799110D86B1DDADB8A673402D4226C519C058A +1D1E5A5778584FC28AF12819B1924060BC4F54B1054EA6AB0149E04B8C4302D4 +A56D8A347EB5D3D2A0E12CF7E35059BDB53D9FF6BD25F6D9619BC4669CFC1048 +C6C9978B8751B840F27D82A69075832BE59F55C1737CBB1220FB8FF691FDBDF3 +03BD7D225A9372AC221C38245E48320E1CCF898D9EEDD678E5B8C65B7F588321 +1A3953EEB9B39EA9A8CB72DB08C3E9234DFFF5FDF9DF804C021D57E97DA7622B +97F4CB6E0EB640E0DC9EA15C5193F92A3A7565F4C7A4C9CC327F7CD2C44900AE +D9E76FFE62FC37FA376E77131B566AE67C3E09DA80F198BBB995EE8FA47EEDB8 +4B467C6C7DB8AEA745CF8C56B8BE56534E9C56FCB2B7006426DFE93D728FA4CF +94F131C549814E54ECE7C914C5FE8E4961D3437CE7475D03534B62650F551D97 +201C794AA877445DBEB11C85ADF6119B05360700F8CEDE4766E3A1D7A35CDDC7 +9ABF7C619E3868A39D1852DBE1EEAF5D7898C78323873AC005542B68C43C5000 +CC58F675EB595F87C879694751494676465891E8A897158B481F11A171CCBBD7 +29603F00210CFD7FF31FE3D273933ECC34AFBCC4108D9B76D9ECE63EA06CF939 +4799092A54A749DACB82C1424E9879672C8BC084C360014C9C1B6D5D65C68AED +66CE329C3AD712C0A36BE7EF03FDF339CAA2E0336D387A693B1DFAB5D5164E31 +14755A158168962C9B399F8F1DF3FF5060D7464D5071058C30C572A2BC7DEE53 +84BD7614A4BEC4C84E18CF7EC81C811724463BD46CECA5FB57B0F55EAE20CC74 +6AD815D1897B037C197D2456797B992C20C70B663BF99FE28C513B4E221C8E12 +49779F8C0AE8517048ADDF7CDF0D698E3EFE60071C4997B7F5EF12B6CB65390C +224F13FBB99FFC034C0710F05019899689B6D3350BBA65C7CE7C2AB03D81B9A5 +5F3D65E4D462DAB189006669F7390A78A1B8908A4C913B15DB8827DFF15BB9A4 +A6037DDB643103B937257A7DAB025F09D53FBBC2BCB6B0BCD8D56B2B2784E498 +1F6CF8470DCC892AD0CFE11578718948BABF9C1427084643B66BB9181094E29D +5FBE37708E1D8A6B7518A96876844CB66954227A7A6AF28DD075A462526DD5D6 +40EECC56FA366106E55C7068997B54B7F0D03AC1AD45D28C67C7ECA99DBEDB1C +E18A79C353113E2E05B837E703278B202112B1C69E42A69D64B62F0E7D8F7E5B +C1F93F0F99EC20EF312046F4B0CD7DAB31E422070B629A7FA96583CF3F1519CD +CF08806F40ACD7BB5C960F21E9DA7FB3C72CBA0801ADE83DF738A4EC94F2977D +2B95A166BA4AE28CAD1E37FBBF49D342CDB4DF615E2C5F3076313AC517C350DE +710F5D52DE31DF69864D29DABF14234DF13904BA4333B0D714EEA55CDD79DE45 +FF5D64259C877191547076B1C7684CD252C0337BD9DF66CDC5DBAA4F3102F2E8 +FE48385C55727B80D11F3BE0B7568AA9356FB2B180A6B1392D620DED02F0B736 +5F4399FB9D32DFBC8ED942AD311C82250DA8BFE98D65 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMSL9 +%!PS-AdobeFont-1.0: CMSL9 003.002 +%%Title: CMSL9 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMSL9. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMSL9 known{/CMSL9 findfont dup/UniqueID known{dup +/UniqueID get 5000797 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMSL9 def +/FontBBox {-61 -250 1150 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSL9.) readonly def +/FullName (CMSL9) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -9.46 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 110 /n put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE32340DC6F28AF40857E4451976E7 +5182433CF9F333A38BD841C0D4E68BF9E012EB32A8FFB76B5816306B5EDF7C99 +8B3A16D9B4BC056662E32C7CD0123DFAEB734C7532E64BBFBF5A60336E646716 +EFB852C877F440D329172C71F1E5D59CE9473C26B8AEF7AD68EF0727B6EC2E0C +02CE8D8B07183838330C0284BD419CBDAE42B141D3D4BE492473F240CEED931D +46E9F999C5CB3235E2C6DAAA2C0169E1991BEAEA0D704BF49CEA3E98E8C2361A +4B60D020D325E4C2450F3BCF59223103D20DB6943DE1BA6FC706FFBAD8F64C4B +4198909DF28702E889F2DFA1FB9AA175E65D5B8FD3EC28297FC91D644E95B337 +039276A8EF44BBF9AE8C27910AC03F70F9022CCBACD01DF6D2A5247F8050414D +20008C564BD55A841F12DDF816DBFC3D5CA2AAC9A64235CACF7F17A81AB28785 +F6C95B135A2B9A4B15795B114AFC7FBDEA4B5A49E61ABF7CF1CE129C2F4882A5 +4DECB2F07A9C7EEB2D3B896F5C5C77290881B0C903969A059671DBE2BBC2B72C +6ED6DF41413AD37609C430EA2BCB630D41BCA9439CBBAC12FECD18D1A7C7A123 +D7613A87CD73488E2EE66DBD78440949A0919E0EED78EBA35409DFF589EA71E4 +CB9C7669FBD96E7DEA501605AA8868B98243F09DF73C4DD85720F14DB4FF402C +B689D1131CAA96A50D26ED450D7D1E9D2D05885B63872B0906AB8429EE94B494 +DBD181BF2A622D5193FE630D1427270C6B456D2EF8A9C4045A90B4584BC95F58 +0FA668DE006C18595C16BD20CE73928B39A8CFCB9C58B38EB2E72BD69E2326E8 +951C60E3E55537FBB804363D3D608A3D7FD71A5CA0B37F2E7FD34C2524BD3A92 +8686BBEDBC07D7AE6D4ECC940EDB5ED234445D98A6BF7F92B23AB7B501D79148 +BDB9DE83AC86873C061F07A012168DC92B1C7C52AE2041696895D7200DB28B90 +2A6396CF1CD6B827E309CF79F68DCC92A12F4C0762671E025D60AE1F591C57C0 +580F521B41B8187F057C40C03EF9AB27DC90A3CA0434E7A4ECED9F83A32A37E9 +ECE1016828B54008F73DB0C48B407095D800DDFEBD044EE8AC9535B9092C3EBF +37135F79983DB2F3AF9509D57A11092EE30FDF9FD10599C4D18C926D2DB941F5 +E19D1B4CAFECE138CF9991DA0B109AA841106C89DC7E2872AF52937AB85DC1B7 +06BCFC4705747CAE32E061EDE0C1EDB35E7ED8A307C241F6E11EC14DCCF04745 +693C30DECFEC4087B692D0495AB3870D0D5F001CC29F0CE5C0FFEF417D3F89EA +3D4BF5398AB7DDBFF6AA1DA49B856654F9D529C29E67884A48119148CCDCFAD4 +09C7B4CD263DEB25029A0D2EF53EC59675A76DF70757D71BC30E82E94327DC96 +828162ADCC70CCF0FE0CA9DC088B0C1FAF498DEE93C7038403B742D393F882F7 +8F2C37565E266274E4033F4DD024DEA90D24B0E5FA96A0B6FCCCA0DB9F268E10 +646C4507F1BBE75F5D014C264AD9F50CE4892C9189F6A60C26012F5EC8B4839B +57BEE5B2F0F79AA8873BF61D8017AB3CEDA5006F838B436212C115DCCC1BD581 +EB86C4C67F97934C9B0BB46DF9A2BA09C06429F74490BBC6DE00898CDB1C83A4 +3EFF3810104D7B96E70F0BC9DAEB019BD56DC293CCB28EFE9FCD1E571B5D85C6 +55D79A0F4F26FF98AE764742D28B64DF642A9BEC15EE85929EEC9E662F74C8D3 +ED995C8BC3CEF54656E4E3CBD3E91C3323A4AE755C0A56DE2FDEB64FF2F8F5C5 +6600C9A94E6E8348E7E47181565B47180E8010A29F962A609C15689E75D53934 +44FFA7BB0763642336FDFBF8C45704A6BA10AE06C7CB62CF4FA17D50A99F180D +A936DABA5F2E625A45BFB670DC5D54045D83CF071531537896D2AF608FC6BC85 +70484384898B04B5E9F40F731468FF4FAC27206984BF54177F19BB899C758A66 +E8CC1B6324C99E5CAD172B3FCC901312307AF69D3D933A5041DA93BC8F65A816 +73073444397A754A4C6D1768B4F9BE952FC835E60D9412DFB62B0891943F00AB +002038C0E22D22599A13AECE302C3A5EEA58DC8B781B1E558B49948EBC949C06 +71D5C102B91B352CC3CD453A76742F8A9E244279E71838CD79E556AADC6D4A56 +A66FBA05A2C284F74B053F79445F1A9C0ADA5261942C15B0C20D8F9A9899999B +70620939956A7A011E9A9A53F7FDF15BA0174FA85221383B6EB2AB94AA55DC86 +637A0871674885F5F937AB1ECBF5149F3C469B9A454DE86E0949396DF314E6A8 +9E4044B3F11425647AF7D1EB89E42D8BDA43A1E6A7B991E9B6D5776B2A6BBE1C +573A4780B1486ADE26A9B12CCBB73DBC87A1F171AB0F013A5409A4945406C1AB +92C082211B597EC3AB4A56DEB6851336AC9E65F84C79E2466170EF9360A210DC +5D71686D5B88A0B3B789240D722438315E667DB5425554C9B2BED3C3FB5A6AEA +07DE5132A1732AA95FB309BB86A87003524F9FE1072307B2EE046921520699C8 +61DB4364F342F5A7D29F4B1D0EB04F86B259BC2ED0FA22F8E5A54A7E876A6327 +E01E22A5B40897CBB71F36F02BA648AA1D06662637C1CA48C469C80A6168EC23 +966863583673A6B291A18A56941AD768683B85FE2BA65EA4D0EDDAA2833443C5 +337C537671D74C30BD343EAFAA0A4F0B8DBB62E35E926782EAEBEE313F92538C +99E3E620CE7832FCFAFE3B051975E7E76BFB1085A9CD2194FC119E2AC91DD517 +5E17AB570B33A27CE5E2FEF0356A6B0E32D7584AE7B9041A452EC64CACB10799 +E694FEDB87CCB82C288FE809B0F4997FA9A6C1683B29CA03E15C017F3A301543 +5581AC58C6A9A0E34FF5E77A091A7ADB44B597A1EA5768B34F869521006A10D7 +67E462E70A2C20021683FBABC1DAEB1CE1DD7FAE43721306492770BEEFC96FD5 +8F69C60D81082136FD9F9A7FC0910E9D36E483131E95B1587F1725E2E80031C4 +730FD118482964289E153B9B91B91FF190C86B020AAA97CB7DE843C54827D4DB +365741D530D33F46CA483DD183480CB148E24C0039E44EAE0CD7433BBA81C8D0 +766EDBB15B4DE1A5AE8000881CF01BCC835FC20D1F8250E66BE78265D3B437F1 +FB7CB10A2CEDB6A6814AD48C365F51C1C55ACBFE2BF4BEAD06C6E86FD2FF4DB7 +CB7DCCC01CA2DEEAC1E8AE4D6546CE8B6D704A38E895C32CF7B644A04E1D2AE1 +A5C759FF1CA4A832A93060DC5570245A5D769988A86731B3137A5AB0688B2E7E +58189EC3A60C138DF4277831397B4EBE4F1B390182F2EAF332200C7F6A9FF312 +02D1A0451EA9DDA7B5BB217441ED2A88B2B63C7D27F2EE65EB4E6FD20348CA54 +75D79E0207093C987CB79C04708CA8500DA58A27F21FD95E2C9E02926710D013 +BC2F118CF2A43B2820C29758EFEB5DB30BAFB0E087D0BC0C42F36AFDF491B640 +4D01F38F9218CF25BEB38AB91D7E943E8EC9A9A9277F02EF057B51AB3989AEE6 +7945CA22634DB32DECC1E18D9901A37A05B3395F9E28E2BD394C86CE470CF465 +D9FAFCB4747C5E168C9EA017D8F1901989F076173D61AAB8D0ECA85ED04E2012 +DFA4B89525947FCB6B4A17FD9805E5EAA888326C3281B34CF76152D047ADA492 +1E1ABC03289F49D682133D46D304A02905E397F0678A469DCDC8CC516263AF58 +913BC2874DC4407E53FFE8CEE90056387A32B169ADEB0F7ABFA9AA5A6229C998 +5644C47AF6930AA016CAA265C7B05691604F04FBDFD43BA3D2F3FD36CA761BA2 +5BC7445B4F6380C06A40EFCB4A6A9D501B1ECA0AAD0CBA97C6D726F6DA2E076F +6CEBD3EB8096C9AFAAC641A3F87066A882064C2B0C21DA8926CEE57C9AEAF611 +31C99FE3E6D3B691BD55AB8D488CDAAA0E8C2A72B057CFF65C1EEF0EA031A2C9 +D9E38DF696C11600B8D9EE07DF6CFF3CB112342020771F124BED5059D8D97E56 +7E1A057552227D80D3CC51C011D736F8A19622D3E72E232CEACDDDB126E2CA6D +96A143BC63A0066505D5BCC353E086279229E01CD8F69EEF69E26823E4B7FFEF +589476CED8547DC0C3F7F1702A169FCAFA3D88EAC3ED08DF8043324B6D6BB481 +4FC534FF50FFEA0D3F8A93D9D40929FAD7202AB500C047B2F013BB351040B8E6 +BC513403629AF692145E59A5E518DE768B5210BED9D72CA2B8A36DEEF730C755 +5332F126F59EA348E5366FCCCB88E7AD4E1E2EC21F240F12867716FCE6907AFE +5F3F6EC4E155096E6418CB525E1BB0C61E23553A1AEF9268D81A76BE23A2D85D +8C72FCB6662EAFADE3C325A39BFA1A1EE05A1B8075AB66047A293976A626B5C9 +09F95D42CF9357E3522EEB028AD48174D14938C5E11E5B808FDF747B41C2D5BA +11FAF9F65E4F82EE60CACFC23CA860BB47FBEF3463B622BA9DB82CAF75640993 +F6339111A1303156DEBA684B5940BB59DDE383BF01CF444028F9FB60AEF34959 +38176F1EB5353F1CE8248098FC760ACC07B2139DDECA158DA9D69FE374E63E14 +418A2FB18595442E81D18CF85321316601DB24DE54DBBCE0E8CEF81F3A4EC5B7 +9D05894A70BDC5117AFA0B642974B4A826FA64D8334CD2D19D16DF9E617384FA +E42A517F62C0A5B34EAA7AB7772716E31261598E3BB2DC426E52EA2AC31B74C3 +39C33EBA019EC687B7FF694AF4E7DC3018B122C6B01985FBF7317B9C29E340D2 +EBAE10F30F8A0840753F4A73FE5917DF79EFB4A9DDEBDBF5A309472E5FC89571 +E0BF21A3CF13CD2FE84CC0A3313A6A2AFA92E750EA8E11DFE6EFB4BCD50B5FCF +EBDBCCAD8010D14C36C91F0629DFEFBD7EF7AA277BEA1170302E60C4FDECFACB +979C35A026B703DBBEAFDB89A50243A657ECCF9A16D0491EF3453F946AE188F1 +CD7AD2FCAC0A2ED2A868974D5D51371395D509B71925AAF535F3246AA9EE6899 +52A7C6CACAFEB437C5B31AA73F58CA48766DF6C4D806641CF424AEA5160998CB +C73E1D4869A5D7BB4662F4A73743BBFD8EFFB371A8DC5606B1A0C7F70C025FF4 +7E8B362860D6864E7B7F85D215C547543D7B039AA07F8135BD4441D393A86D21 +A73E30D863F36CF991BB022A8D74BEF4C88A19AF37BF8241E6C6827C328E13CE +410F2105A94702F1B5F575A2710A271BA244D1787DC15FFCCCD7D666E900E8F9 +1F5EDE7531043AA339CCF97481BE36E53409E4EE454F72B42C8DA78E6B241850 +060CE2C0933EFA45E4901952B819BF14C9ED7D15797506FF81065E7D46789EDA +34005123FF1CEDF111B2E3145E502612930E8E26408F6A8E2409BF62650FEBB1 +A15C98097CE83852D3782249D763092DE94C6C05A6912970B3A809578A69D8D0 +792BD8107C1ECA0954BB1709C73F2879EAE3994927EAC8BFA1BFF11AFB382F3F +8680EBE0DA5F5143C37C9EE4DF21A8EC23BB3D1ABACC474568FEC8E229641B9B +CC19408FC1CA59F56B1AA815C3AF151514045BB4E2634B60543CFF6AB61AAA9F +175C9630D68F336CE178ABA458EF07937EE412AC56EB8EAD8DEACEB5D5FCA45E +58A297DF1E7E9AB7105DDCA38557A7508416A159A10864809C853F0FEB49D79C +CA26EAE48112337D5F62A60A3EB9C86444A9DF4FFBE9F3763E683683CB429E14 +896C43487C3B9EFBC14CB09540F13B6140834F87027F5A31F166BD26DCF19BCA +C3EF4B6BD6A610C9D38C2ADEA1F63D5C9AB59A146FCD9473B2FEF9A0F37BF9C2 +C9A9176CF23425B2ADEF0399F608CC71FAAEBFA07185EE94EF4A7E3F8D43A31B +855C4ED42ABF17F10C5744F64FFE51D0784DA589EC2942CA9506128F5F951667 +CFDBF28184F69C38FD418D02F5E1F546E74A74549CE962F00423A86AC4BCCA5A +2383D83000B802CE258BC8BE22881518B4A485D8EE33C632F38041B8CA5D469A +75104DD5B7E7375023F6F8FDF4E348EFB00B1A55C10B394DCAAB87BE84D3142F +D172E17115A09F29319329E22E652967C67C621145C510B7617103DFF2970DCB +CF2EFC9B820F2C78FB902021E93E19E48A09F24C71D8E5181AE8C654D72F513B +A0452A4B5232F15926FCDFDCD8D8CF64F9BF15A5533033986E3C326A5C5504CA +560D50EF0EC5CC5409E928EC541EE0A931CC159C55C03ACDA7C177C05D72F0F2 +DAECFDD9476118467C0689C7F55AF0312F3F8680B6332B017194B74FE9034D35 +F2B42CFAB4497533786EBA218D3BA699DEEC1D3600822826BC34DC5002EC67E3 +6C5EA3AE332D4D4E995E1216D755B07417CCE2F0E0A8C50870CFA33A95A050EC +8A230B446E9C46DCC4FD1185500AD432AC3F41C61133A366AD8F23260136B72F +0AD4AC80AB5AE776A81D2D57E0C3AD28CD8A38065134E3A416FC75A3CA4BFC7F +1ED5DD3E0F890042FA257E06F3073E832475FF9D42FD462E1394961ADA8B71B8 +2E0BD527786511AF2A9F3058A619E78C01317DD19DD7D3B3D8D3F6E39CBD39F2 +5F60F1A5C6DB389EA554ED283B8C8AEF1013C917AF69950C5D1FFAD294DFEC71 +001ACB3870E1B541E2D892EF72F7E726E029973283E6218AE2660379B977014E +FD1B97E4D4341F9831D4F399DBDD11F6E717803BCA06C842EB23D668C89765BC +4F89F7C2C0919D983174D1DA69D4AA27AF05C43F513B856C15DE6B199F093EBF +2A46A47422A444FEEF7384ACC9CC0161582E336CCB0762CD88B7A21386C797CA +E6CF26EDF6133C0E4D6A3972556721AB5DCBE1F2EC8CB180A557601A8B86BDE5 +45A50319A3621DE010389CBD16A32C6F2BFE2F107F0FE17AF448D49DDF247E9E +C130F3D414B5F046AAC808607530239BCFB5C871899C24FAE159506652DAFA4C +F2F2B61CB88E9E320D85838E8343213CFED5A5354DF5CF0756908C5676A8C919 +74D26319709A29BB17C7590C405817EFD042D75A95BA4504C99161A4CDBF7AC2 +D1DDE99FDA9C04BA88D54B0741705BAE7EFA68EF7AF6B99F31AD9FC16B60E685 +79EE02CCEE2B5702DADE3EEE8A81C3EBF75D9D909621A2EE707EA0E2855F64C4 +B251718FDA71EDAF082C65647AAE6E7E5835CD5BEB23418066783DF21F9CEAB2 +A0BC38217D5BEE9F31AF8206693ECC93B3879D12A067A92CDFEA59A190ECA4F1 +039D4AB46180D368A71F1DCAF637E51EA61EDF0CD2D4378427258422A8F3B770 +33D6C0FDD0434525E105EB38284F189FAB7AE3C546379E200264E1711EE50B04 +B21CB5CF0DA936E5816392BE2A89A4D15F0F4A39DE5232BE9E00BC2B24B1BC2C +C355DACA7371CBA346313DD7C5655314AB9A098321B406208CAFD741E8833C49 +8328588853B1F2E38498DD13E948689B0FEEC5DDBEF9576C29DB283E22AE9376 +66D6B4B443AFBFE40E6F01D2699F28A28EFE45B108562244C2DE591147882E0C +2B776020075A39CDC9CA5D353D7DE2CAD3BFE5E76D7D81BAE3A7954A7E7096ED +8C92D4A787E0403D8469511A39E8AB2BAC7F9D098FE2D4E79416E0F3EBC990E9 +9B9C27467FE13DCEE8999D4430730A053AF37FB0988B9F02981C0666C336F163 +D4C810E2C19CBB865A1F18E5E1FF007825A7DCC19B445300AD85D72A15D58C14 +ECF0B0475EA6B10BA5073D0CF7511E072DC938B969D4196B1A94CD8E5F09B49D +94A4BE1C06A910D35A724596E0F862468FEE5373F69F7C9C4418F0B487393E01 +9CCA7B80E94FAA33F5100209C10240F00D9C2DC3035008AFFA5150A269CBECA4 +04CC805A1D6D590CC4FDFF6EAC2E81F770407A354C7B4AF0B07EA45B15F23EE7 +9B4B0F8C84156170A3B688A3E45B4F21E7B35B96BD6C371EF75F5D07408D5C37 +0225DBBB43DE22AE5D0A5FCEB5684FEB86C566FE98E712D2692B82A49F30059F +0463647E0C8FBEF6EE2C2DF00BC5D44086CB8BF2C8C06235659D485187975B49 +4E4179A596BD5A43F8408D849C05AD1B5FDAF83B330E9871F06C6A970F56CF5D +180F38F2D30C06AF91EE5FADB3952CDC2C512818687629130EE49177B25855D6 +3D888ED4F0EA504279AF45B4232877F40E32014DA3D8CAED305B081ABC08CC4D +BB16719F966E48CA12609401CE98EA9E96EAE15514C346482612685E241C5927 +0331DB08A5D8B5A8FB8D1D54A5B5F6FA72DABD6F0BE35D3BB7C8F2A54DFDE784 +B13C19BBBA2F94973EE4F7F6CB902A72B9B93CBF9D29631E96E2DAC881903407 +023C9720B78295A435E9CE18B233FFC1BB425B1D5F4CACEEA1762D3819379399 +929BD5F4B48C7D2832A3448D52A815CF28BD6F218735BBAF016A2EE24710CB45 +0ECC40D367E42DD13968CB56997A12C25A7CB7182527E7AAE5C474381DE815AB +3ED796B8189A3FD6A6A2F4C640AEBCBCB9E9FC8151B3E4FA582D436CD840101C +747A3560F26848856690059568E7152658606B53530B49E23DA393F395C517C2 +7182284DDB029F630959676DB16748FFAC3210A24B8F88AC3226991126CF6CCC +A1930FB79834C1A95F74F933AA791313646330ED4D7EA626E563ED03717A2985 +9B34F4BE716BC533AA939346AEA304A207CC59F3506FF0FB132EE026ABC86D74 +86020CF86E97802AC0DE49124FA4FB0A50E1768B1494712B35B3CFAA3466D18C +D413950CBE1D5B8E596DD141440A30D571B421AC87E6F7D2181C79C00E3B6F4C +E1B24485B9FD20E9BE97DAD36913A44642D0B19F0F9DCD951E41D7D1FABD5CB6 +0EA13F968B8F98B840DBE368D33A4E8EE55BA9406037645F3C85DE777D042CD7 +CD3BE01D749AC8C3671E885252D78F90692BBA06F306A3A4AFA26C59F6B734C0 +2C114F0129DB0BD2FA95451151DDE40243A54BB1DF9CF6DBBF33629B2F94 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMMI9 +%!PS-AdobeFont-1.0: CMMI9 003.002 +%%Title: CMMI9 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMMI9. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMMI9 known{/CMMI9 findfont dup/UniqueID known{dup +/UniqueID get 5087384 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMMI9 def +/FontBBox {-29 -250 1075 750 }readonly def +/PaintType 0 def +/FontInfo 10 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMMI9.) readonly def +/FullName (CMMI9) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +/ascent 750 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 58 /period put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3C05EF98F858322DCEA45E0874C5 +45D25FE192539D9CDA4BAA46D9C431465E6ABF4E4271F89EDED7F37BE4B31FB4 +7934F62D1F46E8671F6290D6FFF601D4937BF71C22D60FB800A15796421E3AA7 +72C500501D8B10C0093F6467C553250F7C27B2C3D893772614A846374A85BC4E +BEC0B0A89C4C161C3956ECE25274B962C854E535F418279FE26D8F83E38C5C89 +974E9A224B3CBEF90A9277AF10E0C7CAC8DC11C41DC18B814A7682E5F0248674 +11453BC81C443407AF41AF8A831A85A700CFC65E2181BCBFBD07FC5A8862A8DB +7E2B90C16137614CDAFB584A32E50C0935109679E31306B8BDD29F1756946A67 +7A7C2D9BA6FAB9B20A424AA0E6F4BA64C2801C2FB5A1156CBEED0ACB95F697B8 +BC2A6E6AA7EB1F9FD8E3C9B1A16697EE1F0E7400421A7765AB218FC837A49365 +82DC6B2C877A7DA84A81E6126EE96DB25C17A207D3020A045DCDAA064360DFFC +E3CD50E21ED239D2A6450D04F879A26443ADEB6A20ACC504989876476C7D1A74 +91564FEA1F4CC2C8C8FDF666DB537F315AE1886C73CB5B00E67E7B398A6C018E +540EAEE98BB8136C4F044EDD63C33431D2CF9740F051DF365A4045D9D8782112 +7BB5D494D9235BA98CF2F30CB119F5A904C32AD04C960C43FC1F5FD8DA7D90D8 +93AFB59F3FF4F796481AE2A7548F948FECFC6C127C4D3F159B08F206AE8C296D +EE470DB2F879EA79475E029D22D7A8535C09A18689DB0609CC233E5199C02756 +972CC9C94D9FCE264DEE5D75C8D651E4E2D1189AD9588CB815722BB5EE3C379A +6F31C2E6AE1AE4CCEB29766190AFA20EA937114978752189F1A9F42B39483149 +796FCFA123BA9CCD1D9BE28289660BCAE16C40B5B504058D55CFCBFB4F4E3D94 +DDBF39F157E63946534DA81C018B1C01B9F10DDB55E0A5C2B3985ED1977C039B +D6755EA42CD09E27751E159C30B93F376DBE61CD3AED34BA36A768F232EB3B80 +E3E6B77C4A48D408217818E398B83D995AB6BC871F20991DF57313D6EB0C793D +0F28088EBDB7F38DAF7E01AAB3476EC24D7BB38A9889A7D3038D930FF4289B83 +F54A7BE1E2D98A3822098D2E4D067A0D400C20C0B2B4BBD74C13ED1B827490F9 +ECF48F8C3994C1C5AAC9CF783BFA4F307528F51EAB55F961808A42ED53F00C97 +72A432EAEDCFCFB622389BDA707B6ACC9433B065CF29EBFE93AD14B8ECD5F47F +F073F11822C49B8BE924CDFA6348C3A75E9BB9BF3F31C41716B34794B28CDAC9 +4DB8B087E180A9B3B17680F73D9C12C8D86A922C948093629F5D7F542ED882A1 +692F4F6696865E53E3E2DD43B2D5E8C989CFAA5CA5C4C5999045E170BDE9921C +BACD6F2863F5553EAB2BA2D4A9034729EC0C4201DE90DA89B0A27C5A5C974109 +4E37BFB3F46B3A506169FB0C68E1CAFC844419A8D261A1FD86A3BB78E33D5FB1 +CFC687A5975987CE45155E5FDFAF0CC5FD5568CB1C26212F92E88255F0549F59 +41B33125946DE43436BEC00804063FBF03EC796E3361B1C852EC3038D107F80A +9198968265D5488B26D7670B22C2D75EDFFD1B7B4AAFA36DFD94640C9D0E2D20 +5BCA18683EFB91834A3939AB8EB60E2F09655BE003582634C52770DA9668C292 +2E02929D812EE2B0CC65F020064AD5BDAC5F5693B30508F40ED8E20E87149BD5 +8DD41AFF83FD1944804017DC5A04512E593549FFFAE501131CE2FDB65EFD0B8B +33809CBAEE411B3941C241550B9C30DD28088708F1C0CC3125CBEDCD985EAD28 +03313741F67DB5744A87B381147D5BA70AE1145C27F794854628D87D6C1ECCA1 +749E3465B950175D3C3F40E344297BD92D3190041A4392033A79BEAEAABB8DBE +CC14E39612F43721CFAE6F79074429221CA588AA2501DE520A464DE157A03AFE +3C082FAE7628FC0C57FFC61D0330AE6332D20FDBB09BF36848FE05E782D6379F +64F9C82C45402481B0A35989027F9756BF5A79DA2D96E10F39167ADB4305578F +90B509B6891338FA1D67DCFD61804AA6621526B2EE4769589A2646581712AC05 +DA6E98D16494F07D612743058F54FEE516BD89A8EC3E03F9D7F905175D3412C8 +F7329077FD6EB25213F3CAC94BA0C3363B759401B6EF7548C7D709F3241D030D +4EB46A1AE81863C412BDDAEA6084C37143A4C5E41BC646315B1CD09F934186CF +49D1D8239E363A435307030BD79536B50B723A39DD763DB539F24A10DDA12BD4 +E467339D2D6DB177D6FC539FA77D2DE4118EBAC161E928749F7C753ADEF86117 +58619F1155C563DF2E11ACA8347908B98113AED58FCD0394150EEC94B7F986EE +88BF7171D208D8F1774B1DD478F0C2958AE372D257E7EDF0F6B5D6059CC4D5D3 +B00FCBD2E9CBE79235B9A5A3E943CC27AABB58728C95C7DBD4F4A1F8A4DA99AE +7377B0CC0BFBD454794398AE0D5F7281771FFE87B25A819F36E692286A42D776 +01794A43CA9BB30FB8FFDAAF014F909A369E34C2F6C75B7D4EB9DB0580E33F46 +19654443AFF8384B95600B86FF8E41FEFD032355626D60C7507C058EF832DF41 +194B48A36F11082D1DCF4723E21401E0C7447AABFAB4639B26E3D2730E348F55 +53EBFF39CDD03E06E2FA5FB379603C879EDB7E1A10F89695C9C47DEEE52BE0A3 +F446F187AB9D7E93E6F9387F21129034F36DF40605D28FD526AF82CA9D232BE4 +412567F06B38ECCD496EF40A7B243E46C9FEBA4F1BF4B1ECA029C5EC239353D6 +C0B100BF7E7DB33BD1277DE104F15AA19F37340A777741AD1AD693BC76DA48CC +C6F83CD84591ECFEE375979972B0FAC4C10B625E4BFB261B9FFFA83C31DA0108 +4FFB6377466E9739E0EB64424BD9FC7239C7DD834EC6788A0F97FE714AF92831 +E1BA36A8A9E24739F1DC82DC26CC3CE28C210AA7C569B19E1784D663A0CA4E81 +AFF43E86D6F5F63778847700072CEB77A4EB946DC1F23DBC00BCE773203F76DF +00F0B085F31420672974DDC642D885E95BA6BBE43E1CA8ABF464D9881CDECC7A +E98E31B9754C9B72A8BD5CF6D4D214DBC3BA7A0CDF6635953F5AC1E7639C4A91 +C7AECE4C75CA3389C348F656FC2CC96C84C85A926237B6504DB51937C9CFCDAC +B75C31ED570D180757884E27757783DB2D5F35ECC48C496CDA342D49AA947BF8 +2FDAD2F19DFE8CD1C76A8FA08F33681F3E12E229D7DAB45BE3A3F258B5ED4980 +F15340CF20D965252843E026803E8AEE736EC41CCA82167401977AB719AA2F50 +0B791EEAA82027B3C712D2EB9D14BF8F94FBDE2227609BCAC41EC08DE2BAC023 +28352F913F7DF08D4E1C66E83F764578B22B4EB7191E852B91ADCCB1BCFDB1F4 +E63DFD152E86FA9DE9BC8908130EFDE29CC4401339C05B5B9764CF8EFF14951A +C6C13AF979546996BF22F2B96D3D585B90CD27DADEC78914DA48432C6ACBDD42 +20EF583FD41F2F6D6D10C3DF7DD077304B5940BB0462656E306CBD91EB9B756B +7014B1884A36201EC582FC9345C386043DD2818FC301EF78791C1D7854F8FACE +5DE9801DE9F59D5B4271E003AB897B2EF49501589D681D59CFFD9B03F722EEF4 +74ABD29997515DA3591496B62666744EA76DCA45504F8075C0652D6779DBEAE4 +90430C2945FBD60AD53B51DDBEFC7ED703C418B4B244C8FFA5A3C1B7600C5A55 +3EBDB93C16AC191C3A28EB2279BD3F0D67C826BC6A73D3C0AD02262368AB4621 +98A1605F2887BC5880E1AF2780330E0FD01D7CAACBB0F008A42C427F38236066 +54799594E515B289044BAC4DADF8B3686B4372C5110201221FDA923F131E07E7 +93C44BAD406838BA4D1C277EF74098B8C0EDC41EEDD58C195D7DFF5FEDBF96FC +19CEBC6C3006DD2CBF76916B4298BB915663C2F61AFD7747E03A03BD7280197A +9DA590E3D081C6F53DBF94E8D6FDDDD910A70AB18A0F6D48A590FFAB314D6CFD +E3FB20C1F3C91063F00726A2C13A3D48323F9854839405E5A29D66A43E6E2B84 +A8B3765F1D817071D4D6FF42BC785C2D11AB2B9452F141696CE19C6AFB9777DB +107D6E22D8CC6C26440BC48248AD8805C4329D46BF433741CB519B21663392DA +5DC7FC9BF37E5BC396BFADD7263D09F6B4D69594AB386B7BDFCF3BACB97A0E08 +22013E716E642592A20136CF9CFD61D4E515D80E06A4CB4FC9D9B916C93CEA95 +B83B98C48CF36C1D02291D4F5C0419338D64E33C90C90EDD2BA3B96D70FAFE0D +403A060CFF448D3E28A9B1E3916018465E86095BAAB4706CF7ED350D7C554789 +D7F4FE5F180767DE8739259E68CF142040BE1E2E8C6152DE3417C1FAEA7584B6 +20781DC4A9796431EE713DAC4E713C839D7A4FDC8AB6BFEFFE767AFD8B67FDA6 +943AD387E5D3BCB09039ADB64ECC2BE2620C6EC269E708DD06C311F450099E33 +AF46AEC644222E7DC4DBB9371EE12CFBC4F9B27AB46AD1DA96CE006E1DF8291F +A550A93026CBFFC1087B134EC6EA76F5E109CDA58FF47338A0039A786A575F70 +B8A03A4F9C8D07A4C856C77D9BCC8E3EAA740172D0C2D0A15BA35C9E5717D7FA +2691774DDE730BB9D7C70D7AE103DB8D35F3728470C76EBA0E670634E1A0BA84 +2FA102BAD7271DF2680D86A4CA6FC353869987700E5E3FD778165456033D624F +E9B3E80EBF431ACC934AA0357E824B8AD73E222B510DE8445C55C07C8E5DE46D +E478F832BDDECAF2EBB11941DCF84CCD887043FAED9AA90D12BC8CA9A0C8D94F +8D3BF1F80B14B6CAE6BB1C6AA405AA64BB94D5A82CFEA548BA070796A02F9642 +87326D066101435AB9EB40BA9EA9E61B363F5F5E3B924369796E8B78DE3414A4 +2B79C6A13ECB2F34E6299658D07D2B3DEF3D4383CE009A927F0EF5C196652842 +D96B857AB5E905201E7E8BA21A5EBED1FC6863BA9A1A6E5390407F75055E2EEC +512FBDB3E82CEA13663F1A1944DA072C765D8CED06AB461470C5723BDC1271D4 +4D1D049D3EB131743F1EC9A6ADDAA038ACA2C41D139DC6A84EC3C61AC7F1E559 +6155CC2F49171F6E07CF56D721D9728E87FC7DCBCAC46455A3694C765FE807E9 +9CBC2D304AF37E0F28CCB22F239541B53A4D24D09C662559267467EA487BD33A +0BEFD4899B581D20582930703A868655C31BE935364CA6A95FBCB22CB714C040 +9718824DFE97929D0482430726CCB5A5307957DD2432A9B6271E849148DEB76B +FAA290FF6D0B18DC5B76407852E81C105EC6CFAB0F620C6DC9DA555A33C167B1 +430A8BC338BFC7D75B7099CC906AD923FA107C74D3FBB719D77A4E5A685FF9D8 +56424EE4AA074434B809D894ED50F6A60A035C5223EA25DD8983B9B34210DABE +718D7B2BEB293FF1B63CFB1CBDAFC69552963D90F5E3FF533A3FDBB626E9FAA3 +F3C119E5E01C7BFF832A033C3515BF049E29558B1DAD652F2888E339E67D15AE +95F9BD14E3253DFE9072B24C0E7E85025B71096AF51C86AECB2921126A43156B +EC812B32B1164BD9B2B947D503C015616DBF2024F5C8CB3236C1DCA653D661FE +6B1C19A22D272A176B7F1B7F9E67AF40DB0EFD4940E58B2A050249CA4E55CAF7 +6ACFD84FB46FEF952D18552B3972D79D808B4C263B8C7E1BB647A2D03E102867 +630D5C3F2C917F765A4F6FB8106BA6A9D0093E27A4CB6049C2371287D94B5111 +6E7020776EBD744C6C920464BBBC0AC206033E8240017F8CCB112596ECD7CAFA +89950CF43FD87ACA750C03A778A37FBCE9C82C2F5ABB135BB02DA8E8C0D24475 +3BEA9D79372D0022FF1ABD378C151417DBC69FE5C9CA38D23A3900E34BF924A2 +90777ACDC37930B67DD44A2E76DDBD9B89598D5F626BFD325A978D277265DA47 +38CFAF16E7FF1946E15F41CA73F7B4B02E5AE8FC4C37B115BC567E4EEEFEFC34 +EC8974B1465AE57759EDDA28DD38A9210871D35D331AE1BE6097C3EC21C770C9 +B25D040B2ECCC3AEB1EA1BF99E0C2C0F192C13BB9152CFCF75332E03F9CEC376 +9B8C285A35F53655BE38713E09AE34BA2DA9C06FA42A6FD2D00CBF2AFD2BADB9 +1571629C65DA38A431710CF5B01FCA68E8B8569922FBC3F9B64A5509B6F677AF +1B97E91FFFEB6308AB68AC58F9BA43DB5E764021E75B56170EB44C2C0A7DB86C +62B8982256D3621EBE3DB3994DBF5C5A14CF34B4AF3BD5697F8E3203085DE9D5 +84B0598169760B925463E93DC87CE70AF4C2DF0F4287D2F2069847BCCF7A37A2 +AD451D5ACE4DBCCB2E14D5DF38B226952E7446BF87BEC736EF3D5AE793304618 +D66D3299AB9F9CA1D13F134FAEDF36750046E27706C7CBD8E0877BB6276E5196 +BC2A355D109C0253644918E1CC11B717DE6FBDA201E769812752888CD66268F6 +4ACF4A9449378F9F9923D584BA1B51F33663BE7A306887BC14A37E3C5A4654E6 +531D6EB63DE3946BD8BA95CFB037991174F36D61D842071E6625605CAA350A24 +FE551025D10871FE0E2599A63900C8520EF4911C53A03897C8BEE152451708E2 +43FCF4E700C583A5E8DBCC03BF9CAB864DBD19E1760945DEA0EC0BA38BEA8256 +D3A8D4F70F6685A99C6BD2BA8B412A26C002D76138CFCC7DF6802931E5D97BA6 +0151F6A4C572235B4196B22B7B2D14B32886DF0D2CA8A277ABAAC53B63F64CE4 +E4C088192AAB674497E8AF81961359C389B51F4A257373D907C615030BFBEF53 +DBD99058FD06E352450B658478C10454AC8FC0232B70D5CB916981978053E358 +99D322A07294748BA427FFD1E45C909171017B52B7C742FD77A8560852D819DD +8DD53211A14D7B2FD11E42941722FD3985D627FDAF87EB57326A0D290B5077D1 +8A4230BEB40523A8565F95E0D44F036A571DB698EDD9D94FEC9512369E5E5E73 +A3CA5C142617944F4F99C0697ED088ACAC007FCE06E5A6EDE7D0E03A3399DCE5 +362271BC31533866BA79FD1FB3F608B22CCD4111FFB1BA35D920A23AD157C6B3 +C3DAE11069D5E46DEDA7158C6478D8B8C0D9DC237CDF0CC6633911673C43FB79 +E4F9B7F27495201E5ADE66255BC2CBE9D9F237DECB62A19D62CB41A1C92432D2 +07F0629E913A71B3F1AAF8B8C5AC66D3C8605A48F8913E39C859E163DB1DBC8F +0ACFEE80A40B6172032E95A76B752B873FB4DF23CF3A655AF1A1B88C8DC156C6 +190DE72973950565454C0A188A33395FD3D529A88F2B578356DE8EBBC12F04C4 +5B899F667D9E6F3A4EC6DD8DE71FD4C2E2B6D56823EE4E0526679D71FF1B868D +F261489F06F97B010CCBE640E2F57BA3DC3332B329F7958394BA9777D833AB50 +005E8E9232547104065ACE33396772B0E0BD66D2C6CC54DEDD071E444D8C95F8 +6F88B31E20FDB80F77C83151B7E25BD3736B4F9BDC52EE78C41E9475E5A6D94C +D348AB42F5E36B4F167D29EBDFBD43B03F77EB296B06A36880FF17D412E77EA9 +F2E7C25FD05E16BEC6732681EA21AC3FF6893B93FC09316A370CDDB86D9E6087 +F6042C3F9ECD742778389170F5F041329782FB9F9702F7533E51F355F71825AE +2BF4F8FE50D413AC9A20C41B42537FDBE8DDC5A5C793D3760C1EE13716068752 +F0AF10812250BEDFB4D7133FD58F4587BACD572505C84A7D3802D27443175FE0 +0D89C3398B55176D8642AFBAB5CBCDFD6220C8488564B4306D74A58CD2921AAD +73CF803C754DAC2F30A5324886E273064FA51781D5BC596BFEDDCE3982EA1AA2 +62CA7BAA1B16C6EBB99B2AAC4E6C9CEFB3D10F19987045C4918DB239E6E63D79 +5F44B9D097118D081153AFF96E5EB39CBFBB99A3BE30909F614869031358EB98 +F07A97EA78AE50375941B2474DB46AF3305F2B208D45921F93743A6CB8AC584F +6BEBE25ECAADD5A789EF60C9F54446687E7B030DA3E5243189F02BA46BFD28B7 +DC14822E136AC7E40CE20458DDBF356488045C95907363864CD6943643BF0109 +EE027A3091C11EA392EA91320EBFEA3B857370AD8EB86D73F035A476F7058222 +E8CDE78CA1AA9EA69A8AA6EBFF3E67324C567B914134DE042D6F8F18A9373107 +536E8D90189917D343F5299024239E2EC1D2D177D82DC8E344A7CF2AC71AEC18 +36F139E7A4EB59A67192BCA9ED0EB25DE13032F6FEAFC3B1F4FC81BB0EDC41DF +B9EB92618667C59EA499B788CD26C2137D70F1B0AF793AF5AD0D0941F2E746E3 +F5A7F0288BC1EE11E982EAAE763CA422D72FBBC0D754AD58FBF92629DC8866A0 +431213513744DB48E52EFC89C83FEB082588E4F30D7DA77BB598E51CAE7E4900 +5CD570C914EFBA426BAFF7A56FC775ECF5BE13F2C42E51EF96784E5201C0B64C +074AC229FF0BFDF71E6D5E08D8755D2C12B770B6466A9C9C61C15582DCD2FF78 +E9E74DC2B1CAA344EC0339EBFF92CD2CC1D62E2FA8FF15E7459A83C6CFA58A77 +2F1A40BD276E76B675FD6834052B33BF9190F04DF6AA5FA3BB7D77A88DD5B600 +324C5E28216F47682EC29EABF35BA842BA2294A3D72B126EBB852AB741186C9F +FC84B12DC4A6CEC08F2D03EE61B65C845841EE17F1B765649A +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMBXSL10 +%!PS-AdobeFont-1.0: CMBXSL10 003.002 +%%Title: CMBXSL10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMBXSL10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMBXSL10 known{/CMBXSL10 findfont dup/UniqueID known{dup +/UniqueID get 5000770 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMBXSL10 def +/FontBBox {-75 -250 1278 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMBXSL10.) readonly def +/FullName (CMBXSL10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Bold) readonly def +/ItalicAngle -9.46 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 12 /fi put +dup 45 /hyphen put +dup 46 /period put +dup 73 /I put +dup 78 /N put +dup 83 /S put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE32340DC6F28AF40857E4451976E7 +5182433CF9F333A38BD841C0D4E68BF9E012EB32A8FFB76B5816306B5EDF7C99 +8B3A16D9B4BC056662E32C7CD0123DFAEB734C7532E64BBFBF5A60336E646716 +EFB852C877F440D329172C71F1E5D59CE9473C26B8AEF7AD68EF0727B6EC2E0C +02CE8D8B07183838330C0284BD419CBDAE42B141D3D4BE492473F240CEED931D +46E9F999C5CB3235E2C6DAAA2C0169E1991BEAEA0D704BF49CEA3E98E8C2361A +4B60D020D325E4C2450F3BCF59223103D20DB6943DE1BA619611FE47D989A127 +23FB8D3CE03AA31DE5B2AEA44CB0DBA4454FAA35FBF2CC78E7022A63E409C86F +82BBFDF42A3410D9F2C118CA6B8ED47BD5309A98237DBCCCCDBEF685978C7A4E +29096343C6B4B0A3EF314ED605DBA20120F7F91A600F218B048B1B45F9BF1787 +47B825D2ECA3EF8014A30C1F1AE2177B9D1C2C00589036A95A3A14D167B3BD80 +9B911E43B4BF9A5385C143465B5C29F98E8F72194A1805D0AE78C063493F1A61 +B275BB4014B301A6F2165DA0E9873B001D58CCBE9553DC9D39CBB83D14C5F30F +7727F68B99C5EE4900833AEE4A5993A0FC2CF162B5D297C40FAB4F1A1757CA20 +FEC9211AFA367CD1EA33E5F3A002FC752A820E72D0ECC92169D2CE3319BFF252 +6D6B6DC1B38076C0D1BF0653177BF356845D99A092B380A6BE59FAD5097437B4 +B2D77CA380BD52DA199B683F31344CF687BA469775C4D0505EAFABB09121C06A +0721D241F4C3B7B89E33AA7287D020AD5CF9DC48DBF61C3DB309779E2C012898 +067760688150EEFEED80DF165963A8A7F414ED95C9CA299D8DB1BF3AD81D3272 +96A04E03E47CAA94314F526F2639DBB65AB5B2E6E262101D62BE84A858A0E74D +4C9BE1073C6D026B05435D09090650452885D6A994574E9BFA7096A5C724BCF4 +DA65A7C993A8E606F990E5603A301B0B34C01EF5F75B24E4B1BE3565296E3C11 +01440E0F357D949E5F7746516FAF7D4A8154B8378E74E9B4A9D4AF724EE59167 +1FB5EAF72B4734150B6098C155EB2D004CB8E6B9D6B044E912BB002520952E5B +76652357ABA15C52B1EF1D0EA822F5AF2FC01332544D31C304B99A7EC07EB5B5 +A6734B6F394DC9FAB93957806E89C83607B6C5D99C7EC7D259545AC5B5B45998 +B1195203A9B57818BD94D27E435D22890EB9E98E94E9B4E85091B6D9A048AE56 +C79199A418D4A4B54A3B49E3715D13867BB80226DC475F2B9D453CE2803F317F +212BF8EADA6D9533C5ED69532EED1BA6E0265689DE59548EDD71E868A90D32B1 +6203C7A485E7395FCA25862CDC41FC95D2937902FB7B0E57F28514AA41812349 +4D46E5454E3D0F76F1F8799751C9D2A40619862491179B6EC48928A6CC7BF686 +4A6A352C5075199AD244C84B0CD88E0B3E3C06CF7F3E3FBB1652B20E86FD777C +0F5181A84E06C20699514A10399ED4C74EDC08DFFA4BA4AD034FE30242D7A13F +6B28038CBDEA1B237611941D4D74662358DC81C5F09E90B19B9BB90646A5CD84 +7CEE1A0498B4EF9E2981EC93BA22349D02D5515D6D522261FB1FD1F4AC54DDC5 +B3CE6AEEAD7FA3939606065D026065DEBE96A67D52BCEADA5FFC0105290F1E65 +E9F58249CE6A4D8B43F2750ED8FB171E5367A0ADA62D519E45FFEFF2F7C972AC +CE8EA90398A3CC0FDE8E1E6D61550969CEA4E098BACFC432C6586E260A8A7340 +A42AD4D48C268B00C537E0CDD1AAD0DAF25C0C1ECFD95D8AC93DF2DECE8B163A +970E969BD0D459A7FC0CE22EDCFCDEEEB2A6AB796BF4C6B3A3A1FA7F1CEAC940 +3770E3101DDCA2774CE6402F25736AA8594F3EF46A1C8641FC853094B8B6361A +B5DEC0C11A7CD0A9098BCD6757AE5C0BCABDF0A563516F54C844E9A8CAEB7E3A +1A857CCD94CAAD638A24AADBB6914B7A6777F03F38416DE2251A301939D0197B +710B71A954FEE67A337BD9FFD1E24C93BD05D135C91F655B13C0281EF1CABB88 +350856AF15671CA42F9CC2CEDBF44E16201158DD9591379F957B8B5E0619BF0A +2F1217E3CD6DBAC23EDDD083D3561778ADB6B3B41A5483F9B14AB9F1E842F3CA +FB07530D50EEA00D145E8DF3594306E6F3F15DAAE11160228A72C0212B0AB34A +5A023221E587663C5F57EE8C07E7C3856F18CB5068A99DEAAFF38F3219E66353 +CCF06B5B8C7BAB0DE9F6D34920ECD903B6F29F55E243FB03A9010A1EE0AAE80B +544CEB34E2CD33958763BD1AA4CA3FBC1A8E142AC1778C1FB5E1A0ADE4C85FC0 +577F95315BBF93AFDEEC87B6ACF04993BA0C6F4C2F41D3C275CA5301B9BBCD53 +6DF5F04D3D274E585AFA5DF0AB12275200C3243C68338DBC6D602D917691D5BA +66EA6E0935F983C17878C5BE7863E43ED5A6381E4497C232206A874988050530 +13582874DE50002AABA8F4668FEE41606A1F55951F1C73EB24CBAA10023A0594 +2B047FA36655C3419BB37D85E77DD7C20DE940B0F3CDF30ED7C673679423CBA4 +3DAAFC4007418D97EA06548F1C828FAB2EE4A82FEF9C134E1FE4529CB285FE76 +513F6CAAC29098175B3576B61FA11C0336C7C9124BD7EC4657C740B4E3B7699A +C3E34064F16A1CC95DEF76BF18E59C83275F7B3A9BC29C0D5A58030753CA9085 +2D80186F7A4297E9C8A247460BAB02AAE954C4F3BA93E9CB0331C01BB5F6233D +D7C16E466A9E47B9F885D90DA5902CF732798999032FD981B40DB8E0EF5003B6 +C65A1E7C582B1DD0371B4CA5B83085A8998987780DC5374F7EE2950241A1A949 +28723C54FF45FABBA03A96535C1418D435E21E037B512AF0230B43E7B08E9D4A +3880D36694D69E4ABDB743DFF2AC7E0BECCBA723F1BD97A7BD0F15F529A25F5A +EC4CB3BA061ECFFD5F3B24BF47C0E5EB6DD00C3719834B39139264B015956DD4 +065DA2C0083EAE5AC3266E43AAA9EC138303EDBE89047AC1C195B5D2BA2BD941 +79675752B9C38193AAC08D6A77FBE6AD78E30DF4FB0750411678A09CC4200DB2 +998EF9C1C0ED0DF84333F17D137A2EA91A6CA839E4424E16924120FA88FC3872 +D047D33C96C5E86C1AA3CF2C4E5A19DAF637CBAC603FBBE081AA75C450D0C046 +90BC2073BAF3F80FA5BC75899F816F10D4064F2EEF6F93A14376BB0B8DE9F1ED +35DAFFCEFEE32B6C5F2B5662DE55DA71C09913F807E56C7245D2CFB98905FF46 +FE06EC6F67875F0BF76FB657C1EBCF3B103461073C013CB1C542713051451686 +5552DEAE78E2AB2D755666DCFD303C99317FC15BAA0BC10F73275663D2F809ED +4DDB1B2411B04CDFA157D97CAD68A1E8B8E3CCB65A716C6FCB1058069D2A4DB2 +ED0C0DFB0D289F9C317AC3D26BAB2D27B63A2174375C925D07F545D72617746E +16075887DFDA21E607DD0B95F106A9D71AAC44C329A8ED819BA14531D1B1AEFD +1DAE19FD47166DC04CC43AD5860EDD0C1AECA5244421584C7C7B15062D18B72C +3346EB569B01712286C1CA7457E60F226CB76F1A84778E5330D1E655010EB1E4 +91DC41B7929C00FF8D6ABF9128CCCE14FEA601D7F38B5ADE44B54BFFE55DFA69 +1FDA161B827DCA1F776A70B0C261C9941411FF495E9C6763F36E5930209CF748 +3006886740734794F7C34916F5AA57AA52E695AD2B6E8F298DBFD1E6FC18B43B +D83EBCA758026B807835A38F67B7CA00F98C9DEDD806FB199384BB9C398564BB +FD96D5216D7DA3AAAAD9E4861197A8F5B845AF73107DF2B2BFB5995F5D37F315 +0F8D57F5B19F4808BDD5149D4BE130635CC1883B9386BDB72BBD4E443C0C58C6 +7198B76A1C3DA1F1EA89D2EC03E51A1062B02D759782BBF14DC2D3576D195B7E +7D3219497DB5157B9ACD5C2F679DBB1B78C5C4AE62AA0DF53D460EB26942666E +3E352E3979AB565D0FB7858AE92AD9EFEF93C1EE625A86B3DE0A6987C57584C4 +96C70AEC1F756AB06377C0670719F69E8E6F6049445FA455979A9DB932D8E3F9 +CF497FE6FEB2B11760E1E3C4EC413CD7AC258DE320395187E169983EE3D70ADB +3D537EE8DE003E82EBC1796B32F4EF3FE44F1A525A12EFB424306BA94C86CBD7 +C54625B34D2843367826C9442C4C3BFB2D0704ED0A2EF39E5239B69CCB634232 +0DC447796AA45B3EF93FDD1B01CCD4165D6445DB7FF83912E7658FDC2C94067E +14DBCEDA6BC17CB328EF6C6D14412B3247FF398A28D562B12C8CE9C2CC0A3CEE +EE82F5AEBAA2A5A9788A7D6989E168E0D09EECB9F600F76B8D8E3552106C521F +181DE503B54FF37EFD9DCF28AC8E78E910EE07388FF83134C1A1FD42E1A9B363 +55BFF2C2AF9E370952B83E851E61F1115A383B07B3CFCBA2179553C4D4CC39EC +34E794DD86C88309A73844F30766EF81ADF312E8635DE363FA6DA144BDC46ADB +5520643EABD269D11D855B6182B22322855654A96593E06569C2738FBED3D121 +A69637EA4D9B7CA7FBCCB602071757763960F553FEC7301CB8DFDCAAB337ED9A +28B87793420921CE113A6A7527575600948E79659B6C462F31F9E357DC9CD171 +604B019484607482111986F445D2F27FA7C5236F11B441115A612CF9D8CAA0B8 +FB5B55105D4508F04DFCC322FD1D757B85208D8E61A9BF129FC6C0A21F95D255 +B7BCA9B3D1EB5C8CE770E994ECDEF86B1BB748EDB28BBCA513D356F09B05B1C7 +4DC4AEF1C3195667D0CB049D9DB6021B37C71E17EF1AAECF7D363726AF7CE2CB +5A9EDAC73FAEEDD92245237B30A41713A3C4C529A0637444E1964D42DB1771C0 +C919AD6CF1F53CC676B875B5108EAF8DF7E1DCD276BF66E5A1FC86C20A98E416 +E76D9A1406329F4B87D98D0CD723AF857544EDADD685D5DAEE7E9ED34B2BEDE0 +412CD3F767784112E6FAA1D37E0DB11C8ADE8264C72AE2AFDA288B5F459F03E2 +E6E304B7F802F0CE74DF546E23FCDF5D2DEF6C71677A92DDB72E9EC147232DCD +74258408AD2C500BFED63C9C11C7BCFE269717108EF28632EAEB3C491FFF6FD4 +232C44B6D460AC5B98CDD11A803A60D5171D15EFDD5D6493B4310DE1658F63B8 +653C266367CF559737D1144A3B7FF678EFC2AE92F007041C84F3B83F06C419B3 +DE9A46CD81E79F58EDEEAEFEBE0B4286E16DB4220896313ADB393D108EB7A801 +F4C1AA72E692723894F8297E5F7F2C243A39C86A17141D49ABC74CCF39B5BB14 +521484D6650D966E07BA302DB3FACB3B3CDF0FB8E462133A100343D2BFDF0917 +089E15B3F816FE265305E7BC74E5C42880D07AC427FCDE3A97D9EA708B8CDC47 +E3273D36ADD09D918C67863636F7691AEE8124277370E2C978B28875B3331EB7 +3EC09FBAD0B580CCB0ECE516632AFCDDBEC0D5FB07C6A0FA8C9A575CE6A35F0C +D5909BDEBB85588F39872B83604384359C53F8834CF023C4E5D0369F7C750DA3 +6CA9A630C585983E6F34D0D5DD525C150435886CFD6EFA24E2E11743205D19FF +894ADEB319330567D4446F5A57A65E5CD1BFDE88B1607DCFD4434C4060177909 +D5B237182A9F5222C6E703E7466081109F174FCD114178AAC5ECDDE219E2CC51 +13BCD8346390B298214B0A71802051E1FB0D7D4FB99449091A543B2AFCCC221F +933480C39BAC30809A01BDE3BD8F5C807F2C04397EF137B2356E862D87FF9999 +6091AB1207AA093DB743E8B71AF23E4AA4A1667FCBACEC07CC0DC7F20CF37264 +BD54315960B5DF38077F91E483BE83A5F5A12B05439134AC7F67E0E1A1F2AFD1 +7564C21BD5F263CE9488D335A6F00B2806077327FEAAAA246F136E26FACF6DAB +78C542E0D16931870AF95D962153B335747B32E46C890C1327C8E01140005A30 +14D736D4338EAD5B3CE7760B0008C418C80508C44B9E5E8B58B6B770CFBD7AFF +85631CCA1EACB7836580F3D889D9055FF808F29CEF9EBFF7FF904F89D6655DD9 +A7097E2A27C19A0C47E710FE7143A2EE1E642DA6AF5606305C2ABCA4DB9AE966 +057C124757B094B5B1226702B1A7FA4F082F8F1BBF841ABBC29F760ED72E0474 +6EC76895D4D5D78D2E09B73E0B6CAD2CBF7B2583C1B6AED6B208DD582795177D +F4976908582A253CE329AF84DB80D2DDB23C02C659F99C0BD70849B40C4BEE2C +41C3118E5444CBE7DE1E57DA268C9C6E0DA8F2FC33D7193F0F4ECB83DFBB9BEC +8D0098C10134FC5C2700A90A9F0707AD75762FB063F620B691C478FF88F78B48 +6E7FA772C06E3F86B94555D981ED92FDF2AB8DF1B9C1F9ACA180098D876E0B5A +1F44D53A4341AD0C3C0837B8A595932EFBECEBA6BDEFFBEE967E474E173F9990 +71689C1A7E23255D793557A022726053B5BDBC9C333926D714FF8D6261E492DF +9C905DD66DD1B7E17E714A44C1E073DEADF6A250B765872BF96E047B297580C2 +7AD1714D8A2CE93346D0A972CBA8BAE026BC1646F8FED5C9A3366E73A2A65FE7 +FBED4A8447BA4CEF3F25E20EEC13F5448DAB2B1768BE14A2F1FE90117079DE58 +883A86E7759A3F8723901E70ED76DFDAB6DB2A2597F3CDED02E1418E33EF2FC5 +EB86072BA97DB0B4A87BF21354EB8FA680BD07FBAFCF8CB2FA44A9BAD1EC8D56 +92B12A0390E550E272449546A95AEA075538359DF87234050BF5B6FA86634E62 +8DCE90F5947772B834D3DCB5BBFEF9F5FACCAC5EA302813FA76A0C7E8D4A6904 +110E7D164FDDA1F2F9E867052945E5697F3E7B3F3E44A159FDBB940D942C4352 +0B6760DAD2D26E5568604EAF88278A7842315D062BC8B723D19B35D5913264C3 +313D68F88A1F063D0C1B5D51296C7C2878C5A016C6ADB672F6148EA484B43564 +7794900EFC313CA6FB90D3165695C194440F715875B1817B511A9255D75A7EC5 +343BAF3115503E2B7B7550688CAA306B175B35F1A17D821F4168E5F8CAA50058 +E5700ECA8751C8446A91C1EF58E6D8DE3DC3D7F89FACF39E5063C470F80C7D74 +0FC48D67A51EB34ADB4BF49F04166E3C8CC5EDBA32684D760CF5DE8E3B15FB7C +922BB6866719F75F5E4B35FE0BCFC50117E820A707A9D45377BCBB9B5057C58D +4D9ED248BECB7D749CEAA982166F4E8FB3617654D46DA66F2766FFD0404ADC34 +8BBE5CB78623985F7BFE0B05C802F028D9F4A944F3077E85EB1E953656F07BE4 +0F600F17273A582064E98C77B6ED4F49B086E2E83E8E7DBE8CD9DA174B491718 +22CA13ECD8ED6CADAD41E56BAE142C7EA81CE7041B17CE25ECC4E7B836A6D283 +1DA602B8E74347810EE746CFF2019AC296C137E34D2078D6CD89D12714FA8056 +C200294B7D43A678EEC4B09C0DFBEBC9899763B21F281A278D4A67701DB89D78 +6ACABDE84A78A9647F68CA1F1D96237BA5496E840C270C2DC9320668EB83864C +340DC520D9DE1F6C6035EFD0273406A14DBA72D0D484CF006F559C114020ACA0 +BC9E1822EFDFEC07866913956D0BF90C5B0F96B6C17799153E59603FB415CBAC +3AAD5512EDA753DE8EA7B4FFE9135A8C70416899F5B6D1765B03ACAC1F8F970B +F2D937AE6BCB694DBD3DF0DB2B53FCFDB8EEDFBC7BB80246F7173B3193C0FD9B +B5C1F2C3B3A9AA1B4EA166322660DD848C4922FA4FEE272BA1AE64BEEEB19CC8 +75B268712AFF8D4F245C2F081EDE4E619321F341B217198E7A7B6B39B5A13807 +CB970AD03277FDBDBF29235C600E20CCD4D4153A4601248829F857509717222C +2C9535E05DEBDEDE4DADE6DDCB343C2E715573B2182AF3875528120B42DFDA77 +3CED4E091F4E99FC1C8F33832569ADB8233C781B31FF37868723D053307300F1 +E113E908473FBE39ED75A931C290E7EFAF4C89D4CD22F63852EC30831D61D1DE +3815A6D18FBCD15F28EEA75AE50BD0B237E8CB0870CAC5DDC13DA58DBD060D31 +93FC92E6C4CEF3BCFD81CE6B3679BFC5855796CDFA8A26D63A659A2FF7A1A7E3 +18A7F76FF80E846A2D647D38E827FFAF54BD5A9221EEB416A475EABF4EF0409B +1CA55A851C245BF7207AA563AC26D4A6704EBCBE96D74CD377454EFEC21F1B21 +DAB103778EB687FE78363891EBE1950C13B31CB7B479C4A853CAD2A1D8712BC2 +B1B314822712AE69CBA9DC280B3C3FBAA0F80687D6383CA5789537FD7B85CE2F +E02D8A3FA89D5E2B938ED8DA31BAEEBE739FFA32545089856E54B3031EF5BA89 +90633918F5A211CC9414A94BE79E288460B4921D3608C16D646A7B27917D3DBF +F4EE78BA30853A9B90DDDF7AF372B76FE598D19AC35D7C05C65CCF78C7DDD293 +EB63D5E7C466E528CCAF3FD907BDCD78C5867AB1E7D01E3D35D5A085CB8653CF +6211D6F89B3F9D78E0A2FD3FA71C28EDFC157F6E4B9BB5CC61C9EB26AAF44545 +91BFE11940EFF64F610E0387E2694CA97578BD38F3DADCBD623C58374137C818 +9393336984A0495B5A0D718CEDE16D73B579C041D8B41E63A28E978DEBFFFF40 +694400CE3B5D2096968EB872DD5072FCA0361DD5DE63F9ECB0FB9E91BB992D36 +23BD32F494696A001357CBE2004B465F859A3472D2A03B84614E5343253FEB54 +B34E5E5817CA28B23B16678308DAFE22C9D15B022D3BAA85B991F9CFD6858633 +EE0DCABD173E1580183009B0828E8FF1FFF83FDB4A95D6A158B3E5D9FC01F185 +A5ABD1D76B2A8003A70D7A81DAFE2CE988AA2699371B95488CF47975FA4B5BC5 +E84FD3283873B79CF201FF0012FFBF6DADA98CDCA8E483C408D6725AC10C47A9 +9F1D4A268905CA667E0A786C37A8D1182DDE9E6A7CBBF05CE5335060ABA3F05D +42B73E6FA2E320A896E652D0DD4BB640A1EDE60772D9C3646666CCF4745F102D +019ADECF30CB26436B6BFAB2B6153E692648A9414DCF682E2DDA1D7624780839 +72F8A22F5C568BB27232D840C18E0B46723AB882E578478F9B50A1456E4AF0E5 +B347F30A9663CF6CFAAEEF268A7CF6BFC5BEF74ECEA7B594440161F1C72EE64C +5B25FE9BD22A2F25B07E600E7FE724E13ACCC9EB4515043C41804990807075E6 +7EB8AE1748D292EA0881CC22208276E2DAA2ED7A53F38F87E573A5A0D6284FAD +B6B5ABDA37F979B7DC4751399B2F5011C7D03E825030E75102395738420346A2 +000543B174992DB8D542BE6132F2FEF79A2EB9E98EC281B2C3887C10605D24A4 +C18BF42793BCD25A46802F9C81BA6317E686E03E0646820E8B18BF4F409FC76A +714F15734621D4900D67B38CFFE439100A546BA3C70D5EFE7C4DAC35E6384C4C +A3F8B00FE097D3037806AC2948090234A6955776B88CD128BCC4CFBF5028C143 +DA7F7FC5D70A3A64AE46AC6CD038F46FA85F62BB5D98BAF8E11CCD2AB520840A +34635EA134C54B4DFA64CDE0FCC613CC1EFE48C3797E71488544E0C0EF8C4E03 +5E34FB6BBE82E3EE1DBE74A7FDB4DA1380D407DFC8BAC020140D75ECF1CFBA5B +D08E9036C468EE1552BCDA18155DDC6BCD5E8D98A5012EC17D044C600621E6B3 +E026A951149C2E79C7A0CFB59C07D0447808B07867A2275B23A986E4DD5C0161 +0ACDE97925E9C97E925A95C086C25525AE0E2C1C3C93CBE00A715CC59039932F +BC255CCFADAA10007F3B047756CAE95214191D8D7B25706C16E4F3BAAE68D39C +BCACAC4DDA95901F452F6F4C2EA99E2089BFE05450CBCFEF754BF4F21710D28C +E5DA8668E556ED2C2E95398C0BE97B97308965C6F283BB81F4E064B5AA46C153 +88F5B5C883C18AA44D6F95958A50488721F1B2CAAF5EE592E99766494D30BB8D +7750655F4B447C839AE24ECE491F06613556A8001B0EEC248D1BABA839F6DE48 +BE9805152EEC267C23A54C49075F9810C30D277432929110152FF0799015C476 +D258E7C70ECF610C95C6AD5C3AED0B07C564B390773BB67910A9CFA50DE3D3B2 +0FE14C757F1B513AAF9F10B2CDB64CB711DED55DF29F1F041D368712C4B06111 +C53406BA25404604751B5A071D66A8CF00D98A58DBB1A04CA1B25B10173771CC +AF1C685AE00CD44944A74DA7A40FB522F70BC9C7A0FBE747E77EF1406508AD8D +9E6FB2EDA80AA90D86D80E5E524D0C83FEBF438CAE1FDABA4B5C00664A5BA5E1 +337FB49864419852232BF806F0FAEF860A11D0A77759B03AC0F6C4CAEFC51ED1 +2946C196E28A28804E623B9D977137B65D620EDE87C057BB0AA3B89C22DD1484 +F2A395163AB7A4EEA9E9A8665EC1CFADBE7185E4648D2FFF89768BB620792E4A +8C1BF96AF51EF3C198FF81A8C2C6157D242E04F46DC7DCDE287202D58879F59B +AA2C2B0AC0C88B696135FFFCB30F8C7D9A0E91BC60571087A0FD2C8149582F92 +F1CD88CAF92CD09CBFAE266A3B9EDF3E51127B4766DD00F0F23207EAA7B78781 +183B3111BEE47C11A2D72D59436648E533F1946E9653A1FF3C4E06665DB62563 +19C5385E933941256C69BB1A9558A17F0580A6FE87B45E906D8D0774FF944BAA +D928B2FD4E00B2BFFFD195360A85CD6F487196778E8F0CEF7B2983F034E190F9 +350465B06572CF2A9E270CE6BF6E7452A9A276CC1CFA7E26B1BDAD09BA697299 +3BF21DA93935213A573DEB70381AFE3A49AAC339380919CBF954214418DA6F99 +88BC1BC75696F762EED6AEBD5982F8BF0520361EB40182CD71A94EC435E1C64F +5532F9ACF4925A368DB63C7A430F412612C56EC74C52017CAC81690DDAE2F8A7 +3D623E51CF35A1881432D7F3B24842B868472F5F3E8E75843834A2D684CAB955 +344DBE9FF5EDC88C5B249C581655F8EF0D424829501B0CE72F550D003AB62F6F +2B11043004293ABC34DA864E48C379BE77731FB2231577ED282CDF16370B1171 +9EF79F899149B7CE954A34A237BBCCAF6C7363A70E524588EEB74546DF78BE92 +71403ADA0F00E2EE7315D8B6924962178AA6161AF3C0452DBD77D7A5A3930EEE +8ABE99F592FC2EEC4102EB8F4039752C779D0383CB28FAE81DD1A3EDC0F49761 +913CCCC27E6A324E36E302B0773A57A56EB549DF4AB0F974E93C7546CE843143 +58F538DE67FA58BEC66212A7BE13BB35EECDFA0D38574F94B1226BD21B098FEE +042892DD1414DE9BABCABAC32603003BEBB126658BDC68DA5614E480D3BA958C +AF8BD225F2B8476941433DCE2F15CB15FC247C4FD7F56B928F86B6A951B0D4F6 +83FCF0F69A12CC35D25948B936D6AB72FFD65E61A29B994C4DF7B36D145C1FE4 +3F6A0D840F9311C6AAAFCCE8F228199A2F0D663223394E0B9E6A2CDF604A1E52 +1A4B4B520379E6E84077F39FEA473944EB277157C5F26C6D02757915A4E4D493 +70B63D48A618686CEF97190CAAAFECB2F402578E251E67F87B504C4E4E4BD5CC +767CA044A80EFAE5858A8C61614C1E6E5DE2F1342058241B4F66A3711FD193B6 +20D2E4C587BB0448D87F333816C7FBD38747B4912F4E8DED0A73ABD78731E478 +DECB3246AB1A893BF2571112AB7520299E851534408FAC53EA7E0279A622F64A +40CAA2011AFB58D396453413B8AE53B3CB9A845ECBD4A78A409769B5ECCBAC36 +FA45D7142633904962340FB966F78278159F9E8063D646B68F8ECFC5FF8EC8EA +942885782811B66CE93F2D476129476B35E7C290DB5F1600855C2C8797B81B8A +049925996BFD098AAEEA778B6846F706164F94BC57345D787EB5ED3A3E248BE3 +966B82967D8A650FFC93C535FD2ADF8870CD96B9EEFCE608BC3D58EAF228C512 +AFEE8232441545B24D21044554447849A564D3311BB27735EC295012B094F9A5 +A2551A3B74E6D419C740C2E7431AFF16DB4CF2740DE96F4564DD39BB33055999 +6E77F3D59BCC55DC14178B61206A62451F734353C1755033FD8BB559B54B2633 +1501C4257518F5145AA5EDB3271F217D863F4B4AB9E35335115F303F16E9E6FE +EB223F1C070E5BE61783D5D6DB0AE319A37D3EC895094D2BCFDC6CA29D753185 +8967FAA748D26BC8CB8FA180002A86C0F6EE9E844AAD12F816FDDD07FB58A27E +A6B90A126A9393253B356377EA2FEE05830F0558E0C648EBF34ADFCF970580BE +CE3E2179351CC0B2913602BD05BB7049DC69D8843CFA724643E243D06849636A +F295327C764E1D4ADCF89688E0355E527D61B75D6E36848A8C401882C298D8A6 +927A802360D51F9B2DD3764BBB063DDB85202DEECC8CF7567B580C04CAE21D61 +AA60BBC5AE3241847E7756F1D084EED83896BC1000832F018BF6CCDC2F2E2E70 +60C689080CFAC3F1658FAD569F0B2263CBD57BCC8D48112D47829F7FC68B28F6 +9D6788002291BB5FA4FFE226174B878F5CB3DF446E87B10FC45D4FE01DEC9A35 +DCFC9E0A3322DB7DAAF168A534DF153CBF71550818217BF44A016D6D5160C396 +CEE74EE563A9A0DC648602DFFB488EBB29B2939059EA5B16611891DB0ED5ECC2 +5446A187D8BFFB122ADCC102DE61267189E9F77CE8BDAE8B426BB57EF5D76C04 +D7AAF522EBA524F933E077728F4C8E05358A8602AD8C2991EC116CFE9E23476F +340446988110D676E870E2306E1FED72CA76386E1D860BF9A454B6BA79A01699 +9BD2814D57A9EA5FF86EF714EBCD06DFEC2741D59B8836C91A91F06C3496B6E9 +F9E13371FEDF71325A44C74CC1F98971DAD7AAF8C8F59CDEC4F67F5513F691CD +C0E9A7F8FF181E21699AB8E7A620555EE2ADC9EF96E84285D88B482D0869A5C2 +1451F5FDA79B84D62FC7C0E21E98AAC0264B3FD4E0EC1CC6012744806F7D781D +2663CD9CB6261BA301043B497684B3908F94D2251DAB15EE40D97A1E9F554D45 +31E599A848AE8CDEFBC568C1869D19EDE309A6604C49D6F39100C866E12EDD12 +974B1C38AC6F0C01A80D50A5AEF8491739144835299F0811423805871E411170 +0C6CBFC768043511ACB5FCB07A68E6A5BEE9D2DB6CD55FE58C0F6BCC869DA036 +66A62E8A42287B863CAAAE8895D09017B6464EFF55098549D44BDD88C4CE234A +F9B4A8EDA8197165EB81DF2CD49C9FC0E6CEEBF7774F0341AC8400668FF23A14 +B09E7ED0E7FE7A502CE8536DA1ECDD842D963560AFCFC69FC719AE430BC63ED5 +4C9D7DE9A1935EAE40F226DEB87AB40C2E86EFB9D5F8A3DEEE39DDA64E77EC94 +014655AF410534A116840C069140B21D5BF3AEE9CCF9EEE161A7742F1A5DA36D +4743C2E07F5AD41A1EFC56CF49E16C1C1BEED692F35679436A8DEEF82034B07C +AA074F26B0A532893A86D0081BFF53E7C9DED945745597870D545E38865407ED +05DDD8F3BF4527DA9513502ECCBC13E4E6E8357BAFC2B7B2F5990A3F7C3440E5 +F746B6A0046AFEFBE7E711DF33F775D0ADC43433CE78B6E9BD96F3115FC8DE41 +4AFA0D0F9898C01A61302CE01ECBB92E3FE852BEBFD65A07AC061EA3219C4029 +B3E4F18D2B7611C124558FABB1B7B2591154D51E9FB46682B6FC368B1F6A2950 +99ABEE0C1C22667E4362F28B911F37B37B4F6687AFE146E1F13D801C553558E4 +08B32797E788B89BE01B199B835F029E38A98A02DC53B0C113E7EAAB115A940B +95BC297FB350151F18A2B7AAAFE23A5878263995ED04F71FA07949A4341933A5 +F6EAF32DDEFD511391E4D4A557FBB942DD29C067AD9DBA677B27861F1247D79C +E3C75688D2EC3F9E24A28EA0AF20C58EA668530BE32123DD266079AC351CEB33 +60212FB8C563BF8D35EDD113B4113E132F6F9FFF8F65FBDD768C3D637CD0A6D8 +C014BD65006FBF73019428DF942856F2077D866100B868B192999E64CC15D525 +5EA716BC7345999ACB15FAD541418EE57443D67C04CC5373A8BDA1126794B5EA +EB794F25F4435E1DFCF3D4C260057A6A692561D6608E03AF452F525AD82ABAA0 +CF0D8C2C4B73036E48764E07E3ADA4FEE899FD5A0ED4CDC78257247E1D7E1D42 +EBD74B2B5FDCB2A8461C7B7904DE9CDC4A971EDAC5DAE8C5E58A57D635AB32D4 +187615AAD0C04ACF08B0A3B162C70C9CEE5B2C3E7380AF786BF395CBEBBD2921 +2B424CA0BDE0C303EDFFD6D1BC651499C59454D14EF77E7349EDF35BD16A3B18 +5BBEBCA512448A2F88E0A4AEE2D1D558E3D04DE9FB68988A7BB2BF3B1DB48756 +35D41CC3E98B37F3603A59201C66309AFA22A841325F89B35331B39AE70D97B9 +9C97D3C63285536A87C3A8D506758BE23F1D543FBD5CFE653EDAF1DC6AA37081 +202527962AA2DBF33D707C437FCA2C6D0BDB6C3C8D261E7D11242A0542741288 +BBC0BACBD2827D9BFDAF39239B462E9F10AF5C0E0F55C6869123E0A71CC6EA21 +24F124742C14566E8D7D731215A5BAF842967CD28B2BB5C9375145AB8B718A53 +5C352DBC27A507CDE58231096555348C2B9B5D571D1382CF63E06449E580897B +1F9A3B89FE1AA78BA19A60D70E33C8D7F00C7B195334AC50C88A6A233FFF4A28 +6B63C58DACBD6F61F4DF90ACAD7B3AED7AEF8988A29CFF06CA1A0A843EA8CF02 +E7C270F41885D9525795D1737907BF3AAEFA71E17195C8A0351F0A25202A5C43 +B1B6FC95656ABE77FCC2D1879212FFDB5A4439F03D5DF48C62809CFE71B99F39 +79D191C74544F0CCF69DF9E07119665F52F5747C5E97839C2C761A624BA8B94C +F9109BC3F888EDC85454DC75D1114D748984E2DAD65DB0DDC35F22C1057C0628 +454440634B2466DCD378881D6858D04C25DF9CDF854FF82B4606E198E7A5988E +2665B8CD699369DDC582B75D9F76FDF680B191F066EF071F905333655652CAD3 +D3D815360B10EC3294A845D48FCFB6683BCD20BB5C73A6046D3D8B2D6D907AC0 +C4FE8FBCCFA3ECA95AAC1F3E5563899112E6298288601F1E2B0CC248510A8521 +792C3158E8DE36AA27049B701CAEB367E22A1F7B354C85C2F95A468ACE3F5845 +2D40C02F6033E18A13FAD73B5E5CE81223ABA27089B2DD476AAAB4C43D31D10C +8BEE8352E305C086897ADD7A4F5FF0FE9266735221F487B8BF1059662339D1E6 +CFB7275ED5890AD46805A8BD16665EAA367DBAC0FD66E1670F2EE9B9316E4754 +DEE9FFB246D64C23DA5E703BA2C0E077EB6F418D42302E6F615C56134595DB4D +9CD10F96709B21CC85F7F10A2537F0AC1A660E889DEB7C4DDF1E6BC07C56120F +405BB4CC05C381CD461ABAEC74C432D4EF99EF4D908A159FCE9A2C6DF7E755EC +84B294DEB9BA3C9C782C1A2DCFB5D364E28FB7E4FB400E0514AB41291D03D737 +908A49B5FF8BD840CF42E262790CD00D19CFEBF7C899277A846303B14FF50B14 +F64B81D17E6CCF6820971CF9F85C26360ECA8ED190F8DBC7167EDCC4CD1539AB +A71F22652DCA55585C8AABDCB166B1665FAB19EB277A7636D883C05DEDE41728 +271B6A58375A5B6723C40AF669814BF03A7C7F9A78A0F058EB0A895C84E7A8F9 +8838FFC484F30112FE6840441257E06FC3A4C1B7E47315676DB89B4C07647433 +595A405CD47F15535AA65CA09FB0B2C93EBA923590FB5D7730D153A05B100550 +F1B74EAB6B80A87E72CA48DAB3AEB92F8E8569A7B1B84B5829C461AB3A6920C6 +6E3A27F73355740272AB237721BDCFAD78574010319D2476DE3DA5782A971CD0 +A440BE4C9F007334FA119905A4A036333DFFBE344823E7A8033E96452676225F +0CEE0E7BC245469D64C7311FFE67A8E63744871C23F9619A65A0990ED9E09CC9 +4422FBFA7F662E8ABD6948BB673CCDCDCA1B536AA7F4857D7F45FF0D32A0309D +AA46E728088B4B6A2C56727356AD68E142270D328945B8D55CA38673C1A0E32D +C31001A80535F6C7506980DFC69E859757AAADD84CF61BFD151B6C0B58D5F365 +9ABA2F7DCBA670F0AAE7F6FC1A315276B03A42668BECEAFE1E46BB743424536F +29A914D40715AEAD5540298CE232A7C3D676C5284641D89797551C2B5CD472A3 +E8F4E9B794586A9CD11CBE73FE6E442D44B7B50E60D2A441AA072934968A085D +E2C8ADE8B71CD577A5E7D217EFD875540E6DFF444BE94A2DEBE10DB883D67489 +6FC65BCF055F1678EEBFDCD3F2B168741ECC4E932A226F2D6502E487F75AE667 +D4B5865BD41A41C2B5FFAD3660B0358C380924797EB0359C4065725F7A36C0F2 +9A3A5E121129C7F5984E0B72B6244A50FECC3AF5D7A3F27370069BA175B90E89 +A6BE9F0BEA7A7E25968DB6C275E4C90FFF164E4339399EDA03F74E37D4C4D67D +B304AD334877948E785A33F5D1F95F6F763C6618C9557FEEF62B264233405745 +2C6C2430799326D1958B40D565EA455AD1C2BB4AF77C8F18365752F3555E9351 +93C595DC5C7627551D97C89FC674A4FE6F2AAA6CEA232A2189E806989E7DBAE4 +0005C45BA977B82C3E6197C18457F53EF59AC7B5A8D05769FDF2871F38BBF1E5 +F2EB446FE889E03A64B089CFB51E1F890F4677DC691221C900272C0DD67F5F8A +E566C0391E00791E18B6E7A1D547A44D084248315DC7DD18496D92D9A9017B3C +31D1F98D62966DC47FED1B94ECA7BE286FCBC47DD196448BC27EEA81A9706A30 +A97BA8BD81047D0179518B7676EDF5D62F91C53BD054E23A8E0F45BCBD9746CD +C6EE844AB041C2ACA702675A5D6B00AB2986AD1B5E6DEB491B257045CFDEB4FB +217C8669C8BAD3C99B870B461EAC8E7B5B64D70975FAE88D0ACE5BD8E461B174 +E0A3A99449BBEE004AC29F3290B6B5519065D7431F7E3DC7811D126C0EB3E79F +3D2A38FF95EA1A744C576043C901058FA7C72DB752E315D4C16EA30ED5E64AED +46F01E59BA974C9781FC7276ECFD8BB9F1A9EB72939C730C36F335B337278131 +6E0CB304F4A4675D9FF2F69EB68409275C222C9238A80030753D60604FC66AB6 +CB17CD94B67B +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMBXTI10 +%!PS-AdobeFont-1.0: CMBXTI10 003.002 +%%Title: CMBXTI10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMBXTI10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMBXTI10 known{/CMBXTI10 findfont dup/UniqueID known{dup +/UniqueID get 5000771 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMBXTI10 def +/FontBBox {-29 -250 1274 754 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMBXTI10.) readonly def +/FullName (CMBXTI10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Bold) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 61 /equal put +dup 65 /A put +dup 70 /F put +dup 83 /S put +dup 91 /bracketleft put +dup 93 /bracketright put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 105 /i put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 113 /q put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE32340DC6F28AF40857E4451976E7 +5182433CF9F333A38BD841C0D4E68BF9E012EB32A8FFB76B5816306B5EDF7C99 +8B3A16D9B4BC056662E32C7CD0123DFAEB734C7532E64BBFBF5A60336E646716 +EFB852C877F440D329172C71F1E5D59CE9473C26B8AEF7AD68EF0727B6EC2E0C +02CE8D8B07183838330C0284BD419CBDAE42B141D3D4BE492473F240CEED931D +46E9F999C5CB3235E2C6DAAA2C0169E1991BEAEA0D704BF49CEA3E98E8C2361A +4B60D020D325E4C2450F3BCF59223103D20DB6943DE1BA61972029CF9B4E1F6A +FFF97E53D6378FFF9043566D67519B5C031015C0D52A7B292D219A2BEE49FA56 +820ED09A28447A71C5CC595AB286EE693EC741AEABDAB0688F7B46D9D584CB99 +DEB048F0C0723F0D7FB57C896218D2AA0AA4DE241ABD632E25F0B47243CB7DA2 +EE53CCAF1682D9B580006432DD7D53D06E90B3457FDBE18179DE415DACAF00EB +4E01CB49CE25429F8BD45069477DE90EDC87EAC15285D321569F8C19AB5100B1 +DF31636EF29DDEB4BFA2AD85B83CC7112220D70E69D5A39BC3558F067A93C6D8 +7A78976F7B93A589F0271A034D1A8BBBF082841719E2901720E89568E9376AEF +8D41ABE4BAF9E79809F5BCACF29858F8675E37804758D58F8909027A00CCCC32 +5441C72BCB031D09077BA9F778BDF52F172C2EE62F0B98EF852ACE037C6240B2 +671C0F01B7D4A9276A8F6DE3B6BFC2C34DC309E5888E249E398CD60549DDB61E +7E36890B1E37E26126485E49114B7CB938E2733D9A14288C3A763D326D7D9183 +46B970D455050FB97612BDB2EB29E7D71C909B10CA1D479176652712C112376B +085E9F99C9A488C8876954EFB7520CF97D08AD84341FB55764879C5CDF8EEFF7 +DD31DB564110A07119E52453B778531FE181D09D1A9799D7AF4773AAF77EFF2C +2091194E301CD88C97CCA29AAED2CD68ACCD8CCE44B9F24889A83048B7208BAA +84E136C58F9DAAF73815C6025DB64C45014BC472358DC014D243D189ECB1EEB3 +267345D1FF4B6A01246CCF5FA90BB355E3734A7C774DE68C01B5F356D645C4E0 +1D0B7734E05EA28AC6A9BB2123EF3C6E27F52982A7612A352213C6AE3E80A819 +2304A70DB8A2441DC5321ACE962C6480AF736920B64A2B433DCC3519EC8B577A +30B0819700A2281212CAC280A0DCC50E78295B98B2DF97A78BDA1879E6B70C10 +7BD15FE29C4EB1D5A33037F0AC9BF8CC1FE88C52CD114EB33F1C6F8ED88EF98F +DD0C3913DFB36147F581C91CE83CD73A0D012F3D0FFB162C0F4597ADC8D93911 +0DC6D68F9FE702FD0EAC5039D462756551C379C5F4DBFE05AD2D1BE0EB389AE2 +391E461DC4455E0D3C3E46F3FE9BEF488730D71ACAA63BEE72367C52C4F84766 +C24E13D1E63791B4838161AEF8D0134145BBFA4D848CFFF1DED6814A7215F4F3 +3E2D654C27F3279DBB22A568B7BD1D5A9D75C7778D36C36BDBE32C8FAE4A9209 +20AF8B705A77CFF4AA9ECCF6011F0A359556ADBEBDAF5BB706FE6FF4A745D841 +102279B66CE0C842DF8C2673ADAE354B2811C48DB05994388AE4053F4651A884 +48DBEBF20FD05DB617F8FECB667B748BB5741D6EB62DDDD0FC58537EAAD6FC22 +A11ED24D34827C3446C8FB81E4A0E904206A1053AA9E718B0405C6A7B8B893E9 +30E7A31B9AF8A56B5EFE72FB5AEEA79D56E19E037BB4ABCEE079ADB53CA546CF +D98F7B38973CE3A6DFB315E87DD1E60C34344656D76C16E1DDA43C2ED276458B +11D7F4CF3692525C0D8B6307A2993F400760275A8648A0048E0C406279D48045 +D77A92E99F9CB5C05E8202416EB6FF308C4C979895211450BCA82B19B33E7240 +CEC18204C09AB3D7F8025C0C909BC03A1851287ABDB975A32C3FD8A1C99DD90D +4B1CE2F5DDCF140D4D5A19F33241D27E8EBEF4ED569AAC255E47813F31B30109 +7075766D5BC1731B082531F3D132A937717EF67F496813139E8E263C088F62D3 +DE0EA4ADAF3C088F562B0BACDC184DA3BD0D5A8A4B8EB487D0B6F1B74A969942 +91CE8CC7A33670BBDB3F1E1D791F7F1D3A3F3183F2410DEF99EB932CA80FD931 +C62D09A0ECF271B5BA043C9A214CE631CF8239ED0640BD134737A3E31B851DBA +912B507F72B80DD9CDD23A697F91D66E59346FA3A75726C386827D910714C989 +5464B041E69F4B87290BAD381600AE0A976148CBEC8DADBFDF0CBD7148C3AAA1 +7AE2EB15686E1AF68B4C90130F795E86C9AB88556E429EC943147DF363029B81 +4C637900FBA19DD98792F4CC9888AEFBF9F7765B817ABE83494CA3FBDC79CA03 +86CB628F75612209DE9CA4D585565E9509D5DDB8C00A229F07918B062265AB29 +176657CBBF2382A219E573667B14687647DAA7E9203FEB4CC94B10B57F4B1143 +C4962B6A888D62093A1D49E2C7D65C29C500B61E810BFB94DC2DDBCCD8B6C61A +911C2643F55E9E2101B1DC7D7176F7743492AE7CB84D460E8C00E91E5486117B +D9ABA9E16D1606705A0F698EDED5AA877A2CE7EEF25ED1D97EB348115CE5BF26 +8A48BE961CDFC6F543BC89DAF665A681908ECD8CAD545D0A72C9C184CE67F6BD +7B51399925DE379BC59E9155A30C67D73D01BCBB1886F8276AAE58B2422DEBA8 +266CADC83429DAF4F80CB25E0BF455CD7863CFFEA9E318FD043908D427CC07DD +683F6D977680E9B4F6333D4BE7E729F4D15C07C917862B47F0DB2E31500ED372 +A556A8B617FADDA12A2F62DA2D9AB46479FFBE4FA42D9B8D597CCF4E6D04B418 +8A9B523F4678DB40E7F325F81C1EB345D71849E57B059653CAAC7D9D56CB2E3D +D4F532A2D674BDBDE970D9211A3EEEB005128BBB5E0C313B42554F058EA1D180 +BFBC9521FADB7DE03EAFE314CDA873C3532CDDB83EB0A6A7454EE85A4C36AF2E +895BE8309FEA168B73C6AEB2D454B234F1E2EB554C7406B79A859F6B303BE795 +B6B4DBF104E75838F3EFBCF85E0B865779B016AC38272F8BBACDEB13164EB282 +B59BFEB1E3392885916FEEF86A8A975DB9BFFF17B9E2173CD18264BB14CF5633 +FD4BA46D7692CF7CEAB7EAE80385566061315F8DB8A7F495E68D4008B09BAF99 +DF4275727F08C5FC58BE9A084B267D0BA62A907F22C466A3A79CEA6C207177AE +B1254F0810E6092DE5DB1BD3F238EF705DD4E806E0EB1988F2AC92EFB8843064 +3CC3CA506D9AAA0CA559AE7157603D34BEC19D6019F0566974BB835DA172FE37 +C15C0367C8FC164184648BAB678D37871F7F610EDAFE3F49289C6320F9CC113D +44775EDE28FEF4E14EB5B426C06058FD32AD12B42A2FFA0D9CF0C7BDFB6D7C4D +72F4FDB716D7C8E7DE84F614487ADF4DF5F304370043B25E07445F8C65109708 +EB771F62E01350B7C9B659D05305CC3E4D94378BFADFD8D94E5704FEB2BAF58A +5B874C7EBCED806F068E93D4DB888B325CE246D02D1220ABF55CE646DFB45F07 +CB8488F229A5562968B079C2CE2067B22B98904D977E3EAA82A6BD44135A6F07 +36E3252FDCE218EB5DB8773E2DAFFD1DAD53671EB3D83A275D011BF5D501A22D +407AE09257CD21297B617E0443FBDAA297D37F66AC436DB78B410E79A002233A +0D7DA619CCA9DA4714325A51CB0BBE9EB6CEA352BB1A0A2FF83610B2A17E1948 +0E9285E1570CFCB8EC7E1D691A72611D336DE5C6626A1D1D2DF363A1D781DBE6 +1235F1D1805CC2A8C670005F84FD468167F8640B12929CF347538B94EB37DA39 +904D4763D93E757AE2B4C775D98E23BA983E35992A292A04976544EC462CA656 +E5EC37EE8EE46BF1C3B0B4C912DF05AE1535CC654000B06BCDC95D9C6B5F36F8 +FD8A0EB31A02C2B863DEBF8FEDBC57D5F93D2604321FA66070D14FED60441E09 +999B90A5FB715347583A35314381554031BCE4E6E73AD3FCBB61ED0D4C015863 +119C1D945E981AF3F38C81EB3A350A70A63EB06119965C90D7EBA669359FCBDF +A87C4DB920F8F3D99C73A0DF7E10D3C410696D679CBFAE831E3E99FEF6C038F6 +69C58E1EB6F60FF587F5EC561629EF429734CB886AF914AC3E6BC04F21D73F18 +4CA12D7E033B301C181D15101A986BB95132DABEE082A617520CF95EC9069499 +A02F073D7DBE41726B51FC05A9348953495B4CDE8D0A8F8C04D07ABEB3BA0076 +3A80F2E3B5804947E690DB3A7B3BC6C48A67F5D45F5C658FECFF28790B709385 +D24D02FC3B0C9F9AB04E168BAC78F0837D9BD402C1ABFA84148FD815240108CD +511E50FB8E64F20058EE54E4ED45181AD9BB777DEE3303C4991EF8EC56B6C278 +CE63F6C2FF92308A25B9AFDB4585A808AB3F03D8A15A20FFE399DEE429C959F8 +B3DFDF81433C41CEAC874479A2C51F9FAEAAD5B7B23230B99523FB256896A85A +8C48C057A70DE745F753B4183AAA6F84B4ACAB090F33CC2C31186D1D8A0218A7 +4E1987D86B9C3602BA294CD29FEECE4187523CF511FD075692B1C080A5A22281 +BAAA4EA701D7573D083E2F6EDEA3D49FEAFF2CBF989703E83828E6C7E324558A +FB73E3388F0B0E6A97EDED5A9553DD33DBBBBAF2174A562AE2B8A4B6E7D13E90 +FF9B7D650231CBF9EE48DBDB00AEE2E0FEBF8D6778F19CBCB8766A0ACC9BCE26 +59771BFA97CE7BA811A3A6C8CBEE899839E525DA2ECDF66CD99FCED902AA102D +92CD9A279453BA74EF8C0CF32C11A412A05CFA2C187833F885F359DCEA34EE24 +E90F7F107A23D9EE269C15A647916F56C32543AD5F81D90C84B8305E5BFEF1F3 +B356CEEB5BAC54AA00DC9C6F03B4AFCF7AA4D31964377525A661FBB743D39964 +47AFBF76C8FA874BCBB374B02C538AC626004EC8E1E9030D60C4A097CDAFC143 +732FB7431008CF28ABEC4529F4689720D4EF580676CA855FFEDDC66B7C1DF07D +B89EE98C0DB6FAA5551ADE4D674B51E4E3FA4B24A3DB5196E01C6CA1DF5D669A +3C0FC57DC1F576C2BA14D5DE284614AF3276E3A1159CBF8D40426A60E8C5DD42 +6F1307222DAA8AA78BEE55C27E26013120FB5471CB33CA4FB642B1C386018EE3 +D4424CA411F49CD569CDACB51AB9BB5E66E1E13ED5F8BE0E912BC13C7B23E10C +042C33DA19656264D7473B4E0C3DABE14F9F94450D1113C88EEC18CFEE640A6D +9A40DA9CCED6EC5E2E9F1B357DA635C3A2C5A23874E496B868FD0260D30F1780 +878A900B90637A1237C63D83335A3FD4A664321C048BF2273F9C4AE3161E1F06 +E6EA5F3F15CFED43C622E0D7E245EDFB866398DFF2EC994674767B7F3DD853CA +356A3607C7BF8F9C6889EB9942ABE469EF88368742FB5C41D06125D2042EEA41 +4B344AC718FEAEB308302F5607C06852A30CF778D236EC90CA10934C629FD598 +90176264DBF9C1AEB33A6028B9EF09B06BCB182DA58ECCAA4E2E1FBB13868C98 +CEB61223E9658EBF003AC67493587A156EFBE73EC88CCDD55C9C10CDFC52F7A7 +B274D631DBB5D629F41AC8760741953A6B90C6E9E4D2C79702C59EECDC65D894 +8317D67808CFBD81953AD32837A42EBBE48F77D6B387E272855E54ACD32D3377 +E19724B3BB370A71C633C3A41A0523FC219EFD5310EB3CB5FC93F0F9E6BFB115 +17E2B901016CE8DD44BFA8590EDEA88F5229FFDB83E401034C826F038D58C19E +54704A4E2E36B7738FC6F80DF4D82A5285853C49F9689363392536C3BA25C00B +7885E7DC3951E9B5D22414C9E9A264954CCCFAF8BCE70CFFD4F726263EBEBB70 +D52A58B3D6BD029F555A630D687C7E7103C8B8F2B33EA41732D6FB7FA999CCA0 +185A13C8BD80A2762AB9919C3E9FC07556BA8C7149B4CC5B58DBE84297E3E8D2 +B34591D9FCAC659C0FE115F34ABA807DD94410AF8F532418382EF8F7980E1598 +A97A61926B809FD771B2795C69E6B1F15FF0EED329FB793FA3FAF0580ED07F51 +B0E1BC1401EA5026897990CF09F9750268AF812E89DA551EC14B457836CD38E5 +C07179A3EE0ABD3A85C693ACA829A5E492FD4F1BF12725544FBC81FAA2004784 +DB367184315C68BEE9FBB1D68F91C9D0901BAD3BDA4FFFC203C232276A495EF1 +B2B82F36FE36716733F0E993B19407744C067324BDD2D5641977B1A118DBB844 +104397F963CA2E01B7155CB84BB642FC315C028FE4502335F761A9DDBEF7ADE1 +ABE87D31AF848A5285BD8328ED3E8A2A608590DA11968AA8C0D8010329A9E172 +AAC2C7D0061B14EDAD1142FEBD3DDC0ED20023CF06BB146B3F58A6A197DDA1CB +2533B236FAF2825E8DFE70B79A0938D79664C1D26B4412FD10C76729CB22392E +8976960ABED0A03D5FDDC7C5C2C6221BA1FA08020B88FD9AA0CE8B5FD26D58A6 +79339A2AE6730746B8413B6E05361755FBF11FBFA4974CC1AF36136803DB8282 +A7F5429327B875D0FD222835C7AB82049CBDA6AD1731F6D06AD2A20027765CF6 +2F7E4BE9521465A7C3E968DBCF95F2C62EB3829CE6DFE845EE20E8EA89CA6C46 +BA14E5A920D8E28A4008C210F747622AE31F5F9036C70FA52BFFF08A4BAB3D5E +A2EF6E8656F89058F4A67933AF30E9A16467D563B2782268E2568868F677650A +74F415289CBAC0DECDF828485066AC07C011623DE9643DDE39840B1A739B33ED +3EC705C13DFB191472987059E5017002D278168B5280FA2E26C6D51CA663B384 +F5CFF4A6232F5F68E185231EEA239904319E180F91DA98A63B38E16E138D2DCB +CFEFA5F3E5AC6FE764A3A9F3EB622117662AFD26A124933CB1E04AAB53923AF5 +D9DD972536C4904A1602040545A9AD4904D867C1D0AB907D733EDC19EC093391 +3B0EE96E8578527FD3D1204A25982635CCA01A9B101A843F6C373AC4C8E39E39 +BB13AE6A0EA170B59987488481D38806D429E902801F9CE25EEDEB6012CC9EBA +0736820F82C640CD8C7D852D9EFFE6F769D7FDE1DD628861FF628BC0BA8EF127 +26F83D7FCE6ED8785DBCE502DD0571A76D88B7FAC1E2DB24DB97394937A1EA17 +031078EE07D00B554B9C892C68B624D3900266E8850287243BE44F11F86E95DC +00E89C5C47F573C0A7F1CD0CCD26498334C7D37A3AF4457CA805446A74344597 +8D8C3D25FBA2350A878E23DE65D49E9E5F819484DC1B85ED2BDFF923216C101F +D8F411C1443AD7BCF5E90FDD6BD29899C86EB3ECC82832FE75A59EB3FA696F26 +96A450E2504A473123A8D24956ABEF5ADAF5B3BB57FFA5364214AC0E9E245CCF +431DFB8A7A5104BD97D5E5104CA9A05774D0FCA9EC0458BD7289794FF19FD00E +2D05086336902514F5CF8141307C037E5D2E30B62D1C8A5A7682BC941A5445D8 +A17F5670554AD4AE24EB95524CEBF2599D5D00AEDEE2B5537F869A46BF093296 +C77F86ED5658C3DD3AB9C25850624A53F6573A51C7AD9F43EB8320DFA31F7F58 +E0FDFA9FF640DB5B55FB5C4E014A8C50E062F13D573C845231F98CDE7414BD44 +0AD4CE9E00FB39BC93C3D1C8F5FEC652FC28AD9EF814CD964DEFC5813828B0A3 +8AB0E0BE6E3CD60259B8A50F95CB02EB685DDE048D73DB0460985EB16DA749DE +3EE1625182EDC552F104E547D22E62501D9D4EABC09531E6457B7AB148FFBAC7 +927318F8BE99EAE5AC9E6AE81081E236187C2D384A92494DE6BD1FDCC5A79413 +609F865C6067EB60B83B1E0D49D2CABF88F252377787534037AEA74A842CF21A +5514F3A89A00EEA33793D63040EC2E1231C04026B8DFE67E0E0B460E3BC6E60F +71AB1C05F295F617829255BBBAD68D6D7E5AEE12DAD835A693A661AD9923BB65 +C781B9085640D3A5317C312DD3C6159C15D8DAA3A592C9F4B4AB648B160E4B3B +D2E3DD475573570F5EE110AE5BCA3C499513061F202DB76ECBB5316F21F04195 +4B9EFF754A628ECC2B68077CD6072C630CB99421BA3D0D1DA24CC09B8D42E8EC +B52EBAA0E16DE13F0F2E235292A0063ED390D9A8E685160134E931F924D150C3 +B1E315CCC86F2AC29D02D0D98DEB83DFC7531128E0AB55B5F7D161A44DE01547 +38DE065666440E46D94CC4AC21C42F362D222A5CEB4FE9FAC0892ABAA08F3A3A +B76A22CF73E343BADA5C89355A821C67A626C0FA6F8742178B9562543607FA64 +8F9FC0971734B99E476E36E9127419F27469DD3BA6A1D82680155B46073D42A8 +AAE4A6F8B0B2ED3A99469BCF9EBD004DB631F105D77CDF18A2EDA5801DE620C8 +987AF2A7C5BAB3F09769CB0CCA5B1CFA6A01DC0EDDAF693D168F9CD580D7AD66 +A2DE7D9CAFBA0562AB6D20C4F2D4F37A3B26398A1D5AD2F84F0E1339008A37D7 +6973B67E1EDE40002AA5F65AFD81A00CA4343ACD98C94B6D69CFF950270DC1AB +3B2964A1A9472237596E8DC4F671A68F8B02EF2EF44976FF68DF0865B18F403D +6A88CDF4E0C8D41C64B9B1DEB72F0E9058E479B457EA8FCE8009D30DFEB19A02 +D18CA44689E5D8C529CC5ED9063DF88E60ECE39B16BB1DC5670D0AFA76DB664A +C90B081062A258628F5357A01AE05B363D5D81799CE0AC2652496AB5216C1056 +3A49E606C88B30FC6EB350824BA11FE289406AEDBF4C62820D54C94ADE5220C5 +CFE7D6A51B5641AAC362D10C7E4B867BD72CB65FB76351A33757FD8DCEA2C82D +1C8753030D688E9E94B6488345D3CD9AEB41C852C0C84CAA0169E8D4F35B1A2C +633BFF44293BDC2F54B614745D2CABE90F1E988F4ABF11764D1DEA90BF39A7E3 +794DA0B4E6CCD8BF43A72EC1B7E051869B47C9D1F5449D19E78F48AE1F8AA487 +35AAEE3BFE98295D2C27443256CC6555DA1A22700A871D17C2B782C6F934253D +1584E0224CF7087BF6E2F03AA7191BFC52CE956D8D8488FA468A1A412D374C8E +ACE6808DFCA061E6A7B768076BEAC635460D277ED05B6A05617774D3E0CD8180 +B4DF56F7214BCA9CF05739F1E1EFF3DC00F311A2CA3C0D82FAC439E0FAD4407D +B654BA4F1D5B9CCAA27357AA2143EE05748D87B78BFECE60EB44758A3FCDFE2A +58996CD2EC5E04BE533984DBBB5E8FC03A0C16F7721F30034437D13C9DDD5DC1 +52A5E4ADA9BA5FA9D04B0FE29FEBC2FB36C963577CF1BF8F6AE6FA995DE61A98 +001C95E723CF77639349C64146DFB14542144100DB9244F5A4E3CCC922356073 +9995968DA12C7BA6298D386975E4BDC1C23480B11C3E92D85060703810D54224 +5C8CA76176EF03E8CED5E4CF67712236A523809FF502B2876EB4E17702B6662E +4ECBED9CF50A81EEA31A76AC26844AB9F6097CFB414C61DCF2BD5486D10FC596 +673C91EA47556A9904FB4B92753B0306AE4404D75B8EA49CCD5B930FFE4F671A +793C42DC7F1744D7EBE712CAA9DA28449F0681DB8BF7876C89EB9AD406D89DA4 +24619CFA6FCB66F243A85A8AAA17FC475DCE1F3D668EFD372FA8C88EE26F6FD9 +DD8CE099722433FCC27434566BA2501432B1755CB658DE405C665E111F92A23C +5B9B2670C72348E14C13C210E5FE82CB751F86917610F736F7293A3B0D73D16F +553C5339E48BF928CDA4FA733CB66326D94B42525BEF18AD26619E1EBB71D616 +BF57F4287F4E850126F82D2324BB9B83FB9B0D64D5A93D986A90ADE11ED3BF26 +23997E645570ED785D5F2CF414570FAAB2811C2EF4E3114F70B1DF1C13D3697A +761091E0CE4766DAC5220ED404E80B56B7614014AFD64FC2DA8709EC6BF80A82 +384DFD26F076FDBB7F01BC04193BFC329EB97EA88AE980409B4D23CFB03FB249 +21D76D35F6B9B1AFB7FD88B514F3C7F9F6FF9E02F0CEC82427BF2F3E51D0958B +A54E06CC421C99D8C7DBC206C06E887CEA9AD233393E60FF1D8F0557939D1CED +BD433DCD672A3E7F01219BA7FB5BF50A2D237E5C9C9278BCC6E91BF6EB86AD4C +9F549DFAC4DB086A57946CEB86AB30986DFEF4C2286C8C78BA165B77318971D7 +BCB5F3FBF89C212CE2FE76473F6F00E25CAAAABBD569EE866127C9ACB6A05D40 +67A3942F542D284B9691D63FA54515CA19BD34018B0315F03E172525841122C7 +36965B84019305C69FE9649095CF0970AFE5BAB3C1347E8D9ED65AA45E440E2F +52A9CDC315852151D3BF4BA765D6A67A48B1E66EF4FDDE1C3877469E1E2853D1 +5DE5FEE0F61DB250C0BAAA9CBE7D3C3023F76662852E4CC618E0D790C8821D66 +EC2DD46874AA3742EBB1556AED8EB2876F1C87756D1D1EB1FE5DB569E1125667 +E16E78A866B232AC4BC895963507AA8F23DC77E29F46CEEAB1B5EF1B6764039C +75F6784DF3D4BCCF3638857C2539204009A5EC7024157C7184A59AF0C879FCC4 +34ED2DEE1BBFDCA7729BD0C1D6992AB2C559AF317784186F483DBAF6BF62690B +03F6F8354944C93C9ED11130752971A7D0C2025E6153A68EA9426DA1A0F4441E +AF5A92410B9174881C430D9ABB9E5C20600CC01CEDB420B9E37807628D97FAC0 +58B8FF3742A06D5E52DBDB7E7A02B1719C111B53B9F1E38502FA70B0D1A3EBD0 +9CEE033829957788C1AC36D2F6A3A931511C21DB33BDA383C2C5146027BBF167 +8A160AB6FAEDA3831B8575668FC61C9DA553C2906CB57D91810892C8D89DF85C +F43F5A8034A4551EAD4E0FBF7A701B9D54FC11448FB37F843FC0462101343332 +B67E9B1929073C93EBF8AF8D27BC41E4C4286E7E94EB5FE9C333442D88553B24 +A0318FD22953BE3926EB07C900AB8448ECAFA063AC179E4B0300E597B6D38821 +B3D8888B74D05EAEE83D45EA12CB299DEEEAA71F5021ADAAC6E602DA48F5E2C4 +5D90397AFA4FAB7C62F406649EAB135AFE71F12EA63E8C4ECAB3CF6DAD5F588A +AD4D85255A3FA3586C3C83C5E0BC04744EAD5ED2E4767C8ED53EEA84DE8DCDDA +53A8E7A35F3CECC7EC3AF65AF81F9E7DA3999FC2DF98A819BBE2D6A770E40072 +C9E006B459D32170CCDAE55C0211E6326ACA70F87C0F2D266839FBBF47270998 +D06E699FF0D2AE1DA92A91888AD93416F2805826E4A5B5C3B7D715E2A03DAFC2 +31AC936929E78EB03A2438637206A7941CF01E139CB0DAEA480577D810887B64 +66F20492456922991760A1D18179EF8A78B47477470CDCBC8A0C490159701EA7 +8186308A2AA16B6F0F3C41B3E006CDDE225157237FE4C47ECFFC32A47F34308B +A76616B07CECCD93B4DEB850DFF693D897DE31C431EE1E4043C38B6C1EE1012D +6A8A173B8ABEFA6254FCB1426922AB1D2FF049A3C265C74A6EEDBD83A48A043F +BE0F850C5C09132A031550435A996AFC745357B46FE3BDEDCEFE1BD4903EE143 +F0FF843076EB572A3B7E37E263C7E30DDCE31BD9E6526019082E62A30D63CC56 +41E6B759E2925B0D92B97A572D3A7F7C25E9BC0235B5593BC8D5F837B42F43B3 +0E29106F54CE550E7FBC23ED70AE2E837D717B41D89FD168801B598E9A233568 +024CCD95C63C9D16C8E9BFF1E3752481180172FA79993E8A58B548F8791F7AD5 +4A0804A78DAC8F79D0A19B6A4A15241E8FFD158E4797D2933CE1AB0F56DB2930 +0015644AC05ECE1979E023706394AE106C46DB5A08801C802D5F1B46E913E0C6 +1A6C12FA686D2495AEDE1946EED1FFDE10DFEE9BFCE3362029FEDC0E021C8C9E +C0F568ADFBA2954CFD986A743793615324567E964EE55FB2CE49E34F10024001 +03F1B9796AF520E8EFBAE693EA3DA1F181E0AD4DC7F43536A052E30212D39C9E +825262F88BD8E7C0ACFA39D87D3A71448794E5E6F539C0F7DB5514B664960912 +70309109045CC5DDC40558C0138F6418C63DD8B2853A7F23717BFB8A25C5A370 +F629960154D3B7427B868F9C0C3D149C55C59671257AFE7FBC2CC84A65CDFCE1 +CCF7BA98DAE5CD28C56080C98229FDE7DA18A20AE3879238119B96A1F8A1D437 +C0CC88941ED7E6F12B5886DA4080534A28693C5BEB4793C5F1BA61B5165FED8F +D34310333128846E4DD8591F080E0069833A45342B060E0E2457AAB8F951AA08 +25CE5D4D5AF8312C4E8F05B34529C24087526F6FE1571C0434CDF8814FE4227D +67D56871473F11405648360A742988B40BE14FDB7902ABF683532BF45642BD5D +DC6A1B064F099B7946D0FE95B37F1D32AA4DCB7A3A530C6112395236FE412787 +45ED32211603666269B3512888E1F2E4AB97CABE59BC577CAB851A24F580AC42 +926DC6BDEB4796B0FB3EC68F9C8C5A5763025B4C7D86863CB972E27560AB3FD6 +1AA5ED035E240CDFF5A0442FFE1870446DF44E32EFA80FA286198E1828928421 +928836CF2023832E156B05E143AE513148CA1AEF0947E1FD3D01FA07A5265266 +86D6126DFD440C848234F62F5CCDE70C7E90152EA0970C373D125FFBEA8A33E8 +568DB7D3B123F3995B5DF14676815A082F2277B21956B4A9EBCD63227F7E92B7 +1A1FE741749F088A39A82F4D79E716DD87E8D3B63E0CB235FF13E66E1A8A0E27 +3E8C7D6724F8513278CD60683CF6F2477DF75186EC4B7C37902F3CD6315EB0D2 +A165D23C0A7664C16A0C31C3461EB0C8C1391CC587ABA8EDF3CA24451FEF33F5 +89143E3FF347FA0D1A1181E94C2F60B63F7E4D +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMTT12 +%!PS-AdobeFont-1.0: CMTT12 003.002 +%%Title: CMTT12 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMTT12. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMTT12 known{/CMTT12 findfont dup/UniqueID known{dup +/UniqueID get 5000833 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMTT12 def +/FontBBox {-1 -234 524 695 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMTT12.) readonly def +/FullName (CMTT12) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch true def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 43 /plus put +dup 45 /hyphen put +dup 47 /slash put +dup 65 /A put +dup 67 /C put +dup 68 /D put +dup 70 /F put +dup 72 /H put +dup 73 /I put +dup 79 /O put +dup 80 /P put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 95 /underscore put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE32340DC6F28AF40857E4451976E7 +5182433CF9F333A38BD841C0D4E68BF9E012EB32A8FFB76B5816306B5EDF7C99 +8B3A16D9B4BC056662E32C7CD0123DFAEB734C7532E64BBFBF5A60336E646716 +EFB852C877F440D329172C71F1E5D59CE9473C26B8AEF7AD68EF0727B6EC2E0C +02CE8D8B07183838330C0284BD419CBDAE42B141D3D4BE492473F240CEED931D +46E9F999C5CB3235E2C6DAAA2C0169E1991BEAEA0D704BF49CEA3E98E8C2361A +4B60D020D325E4C2450F3BCF59223103D20DB6943DE1B57D05DA0555DF933BB0 +7B42D264831116C06C79335D519461E7B0E870A6715E3D74A08D1BCF86E3BCC3 +A43FC6BAD1C68BD9D4AFCC06D845FD1F1E70D7A47F0BBCAECE8396E04591E5E3 +4797F646AFEEB7DB548183F0B74C9BB6BA2AA04E7F5950EC8AE97C741D4B2C5C +A8E7A8DF5A36A30B5A7592D95E1DBC63EF33C92FE459792CED29E2B8B6919251 +75EF62089BD7D44A6E1F9B62EC802FBE62B821DA1C3B2DDED45D27964AD29ED0 +9FB7868F3A8FEADA87A8E42D52C1EB7229D7C79B60BDA263F2BDB025AE14A507 +098FA274206BACFB4A0A7257D5998EE8F0FDCA79CB61DD1FC59DADD11E16BF02 +ECDFD706CDA1E72054D4EB55AF7BA9F19955886BC0BD6E0E3FE3769C94AF3581 +DFB2BCD67FE2892AF07E858A01280194D8DD7332B3D0A585C87FAB056C2EAA9B +5AD48D1C9F00CEF8EF0D1408DBE1C03D04B231D7B8D5D998FE0CD7EE19828EF2 +F988EBF6DDBFEE00F04A4A1F4E1A55DED7EF3AACEAB5005F1962C724A017C914 +2936E2E0DF26A55ACD7DD836C6035CBF07981C1BCE3615064F0540A1034C69B4 +E3908E76EF8925D486DF0B4A8E1F02D8AA99585A7C31847AB9382F83880C1C21 +C496AB2DF8E7BD4643B28B704B5F6B53429D3EE940A79135F5BF0396E5B46F23 +42AF406C26D12BEA7A41F332AEB75DF43C15334CF4651A99F602036946B1B91D +4BB0D2E51C20216D892C8173241AC8FD15A37C3CDD8AB4FB67D8565AFA61C068 +95E3D6E46D7C09BBD09428207D506AD43C693F3C3D787F6A5C39084AE45E81C9 +830900DB50DAD10A17E118FB5E9680B5194716A788FF7514A1167DD1A305FBE3 +FC1F39A39F5613D50934419B95A4A2FE1B6C18912CECB86726926F6B77B5C3AF +F38F85F974A2D2145BE010EBB4A390B842BC222AD4A0B7FDD882668C04C51F19 +13FF91E7CFA0A0F4E99A1944B272E0291BBF3F9ADFCF3F625B87377AFEBD9F11 +6385726E908BAB7D1357504048C0F5B26251A1FA52F08BAE1D64B9FC32A684AE +896F3DD0AAE9624050D4DFDA25E581FB2630E8840AC5322D38B92F3E77B55CE2 +91ACB8321BE53A2C7D274D63CF0C68AC833BAF4B22B26EFC197D4A893A5AE492 +660D995DA9294C16BED1113CBCC18AFCB5968175E80C2933E0819A4A08551900 +25B0DFBC2D9DF1A90608429E8B3099D91FD4D7A1205D9D7610C2595E5B089E1B +9A97FEF3E03191AC688AE6DD3081EF8B5ED16BDB4BB5A2DF3DBCA0A1E8C65A6C +64698927D6C6C1B404819E48BF00F1A7393FD6C0751A7D639E32C569264A6A91 +743A0907C329A0C3A6443795FAEC0EECC7A182BF5B61D4CFD11CB1A45974AAF7 +D96E1339E870A52661736E23FCEEB2667DCB46511CC8EFA223B4FB7B82B0FE55 +260761FD65EE42917D1A75254CC1B76D48E5482ECB6A404512C0D1712825C900 +E3BE134172F220E3D5FF79E0EF803BFD0F383080F7FBB719527DE06908E1C4EA +C52F3ED6F59A5AB6BC6C911B29E8B2EFB8E2803754885E1E7661B5DB7E22CC39 +6474B690FF22FD05C8FC76D9F1E401D38D7CAA87889D645EBAC777E74D67AC2A +F585234C9A178972FD22A53C30542A41DCAE9BE4EBBBC7D566AF47622B58D9A6 +747D50F92115F2F49073B029FF93228CE3F7247DF4E7965E0DCE73D00D068136 +89AA29884DD3E28645458A98279C9E40E2965048EF85AE8B996ED28E3F2D07D2 +AEBB17CB7F08B40D32AEE2AACD7332CF2BEF2B16F07879EE73A1F787D4A6AE9F +EE690C5A95CBCCC5F4F0154EB1CC2792B877C66A151919A78E1740C75964FE3E +BE44DD1E517344F7C1EFA681912AB3812DDC6307173911F1819D6778811F0E0E +C72393FAE86EC0E706F108F6383904E25738CFEFBCF08149F28EE7205B118D12 +A74E18BF57F52D7855C8F9BA7206C98FD30C2559E95DBBC2BC2156A6B3821D88 +40D4EEAD72FDABCA5DD02C72552BC343419E5CEEEBC3574D3CE1B7151411455F +5F91CA2409BDCCC061BC1825A962D95EECCCD811BD72B0E5482D46D001D38411 +26F4838631F65D1B43554F8E89A1A9681C149655560D2161EDD6551727D3D920 +2C1D066E165BF3304C8CEEB03EFC66F7FF50A50F401FD0612C0569CD3CF8650F +ED334831C5D5607F83B90817694CB55D8DB6AA399021452B433F646E861B47D3 +4159B39E89DD2A4679E2D492E32D137E10DD991AB139B81A47BAEE25FA1448A3 +539233D75A694210FF620A0E329DEE37A95182714C0DE91FB9908AA821ED5298 +1E58CDFE3BA3DAFB96FE7AA6003C7CAD8E12ECA7752E0477CCD579B881848B26 +A268A9D08F7B3BA3C6BBC1F9927794E928382AA025512A3018FA1E96954EC65A +76F6F6C1C4E1BBAAB3BB3CC016E3D87D28AE4A25E30FDFDE966F3C59C3A1CA92 +74F1730A5E60573CF6DA96A0860D32C03719F35AC5B15BD09F2B10A5C33C3E13 +6B8E5F0BF9AF326F201D889FE1A6781380E1DBE3C61FAE505ED209A3ECDF8ACA +D8E959DFCEB5178AED0E6510CA43DE8837DCB576439282789EC4060F59CAA676 +2ED058A98A901D8F3425E3950614F61FB047299933B5E3E15E9FB7E21C4E66B6 +9B8C895E643E7243924FF2603354092738338A343C207F89FFFD2EC3DB20C726 +B40FBD245567FC3C49F342FD2023EB8BBF81928CEDF5238C7393DD611F3CE69B +CA70928269A0B8657576645DC353A878B64269CF4899B707F8B38CACEF0D33D5 +266A8E40CD77A788F4D29F036545A6D2705159B8E05872B9FC9DFB7CB7183BF5 +E36EB22D212C3FF8C5C493F9C130524F9C6492AE915DDFE7F92AAC1802FB29A4 +3A2560D14901EEE20ED11A0EC9B37EDC3A26F82E5A311D6175987AA25D8EB6D3 +CF43D3808A85384B995EE42C83C81A59418DA55E930887B684F7D0D57210D618 +D9817BB2328E101B11201CC423CC64CDD1C9D5C2268F6743009993E2416A630E +36743267FD628955811D46F36F29A540CA318D0A9F699C94F817276A57E5DE54 +7738C2A5A0485815370D0E54AA6EF59295F619BEA77AE54EDBDF33D2839B7032 +B535E68560363AC55A312852770DAB7DF0FB6C827292809755E6DEFBA55B7DEB +5F15A8DB29A3CF7B9EF568554F4ED131B36B09F94A7BB56CE7210ED0EF05B93D +9246588BF9DABB020DB80DC2998B147D3416B8959BAAA5665E626FAB9E5D89E8 +3963F69D0BD25F14C28D0BAE6CCE6990D022B688E5CDF0E219258D72BEE010A2 +33049CD73BEF29E2AE90D510AAFCE1040F333065875A2016AC243372E24A090A +EA997CD36A8AF2D807716FFCCCEE22CE8452A086BE6D4F76D8B33B952EB8388A +EFC55AAF2DB60EED39C8C21745B1E6A7824EBFE02093327B5AF6C807AC91493A +093437C593AB125421C8112ED4766171529E0E1972EBF2BEFF8EFD2069B48374 +F7717D70F16D27C43F9A8B36464D5B3FCBA74E293C910ED4E3EEC877642AB87E +1213043E81FE72CA6D1FEF847516E4C133AD4392FA1F9D10472EFED198B7540B +69389362E4E2DDD7A3DE49228D40C70B5D5CD09D503351FA953C8197F0FA8613 +5F02055012A0CC1C2A4A1FC344FE2608541524BA207CEE37F635D0F81FBBC340 +8D0EC42FD8D53757C6B05CCB2ED736AB82C24BE95078B8231B81F0D430D55A91 +066BEE61F5F1AB6E4C43E7555D34031EE5EBB1DE13A51325A524D676161BBAF0 +F3D800435C23BB2DE410C0BE70115CF8DB63365F8E98B68A78A193632B956EB8 +79083806F9E9AF8A030B45FADCB026901B60DED50482EBC75716D40C3781D3CA +853C3D30A487AFDE854FEF17D6D7501EC1956BE366CC8A6225C423A1CB69A9D6 +8FAA6C1303884E475057B697A139A9CEA4998816072B532A5CCE0F0EE63C9CBF +125CF0C2F886EE502C4F153E55B1CA4E63FAD8A5D878C8947AFCFDB58CE92F45 +546444F77455C9FF9CAEA98912B5FAB430A362459352ADC09D6F33A4CCD5115C +EED05B17E419CC43B6E96EA3E8B8C2008E1E5B0B7F2897EF80C414ACD2FA1A63 +13FEB8086DD9B182B9E954C1602E2BA3DC67452A1447F8CBF2E602AF847CEAAD +3690C5D7F6D9C3A36E4E97E4238E9E957A9C048BE694814407476A47EA101CDF +CAF70948A4492B984EF31771AF6C09436277484854CB53528D18F8CA870EA327 +6BA4FEE2DDEE73477BD31F60A68E7D300F28AC56D1B99D973D051F50BD82B034 +B3CAABD38F8770918CCA3634F53FAC47D650688CD79C0D0FC90F46FBDD4FF03C +D32E1CCA3D6104A45E02F634648D34AB0961C3F8AFCBA6549512354AE0A23AE4 +1E5387863CD0A80EE891785422CFB03B5DAB5285F9A543181573DF2B1DC9D646 +3BBCAB63A69F2BEDAFCE9792B38ED5551E63D83817806E2D67AC2BBA3CAF4F27 +50217D4E8A7E2E5B8353918CD1120C3999773282F473A4B67F46CD58A4243357 +8CFDD2DDA8529016695EC69A53C800B6215468E7AABF7B644363B49F51001B83 +D4BF6E78558FE99F6806461F36C00F471915859716C961D525D1134D0F5F20DC +64095D4421980749AADBEDF2A2DBD3F45562EB6D6DDC808954E6F044B5A4248D +EF3D2784C8A796CD49474D8B934E63BCADB96319DB0446739FD80016BF6AE156 +21193769D28F49B95896B687E838B299CC6444219B169DCE9AAD90642C379111 +05E60D823C12AC1D0415E8113E970948DCEC9FADE51358D78DC2088AAD263602 +357ED1053A26CC55C3D43FDE5B09C61EFF727CE507833C8AF50F6CE925C0AFD5 +D99BA6A48D449DCCC20AEFB89643C9128E698784BEFBB03C4BE02CC6726ED901 +DD9F7ECDA95F4113EA796F8DF13EFACA434842C3B12E242381862FBC4C72B3DA +139F03A3093DB04366072D9EE7EA42314E7FC27DE0897C9097B4CB333A054B4B +C5703039796E724BC9A9A578B3BC555E88507E79695E18D618E0C9A86223B6DA +20963556C1B8F36A2AD954805BDD1E04A0E27E4EA9FF7984D5FDFBDA881C1808 +73281B73EE3C7CDFCCA30942715E19033F5935AB39093534E253F92184EA0596 +432D1BF1BEB2EE8F50817ECD001777B2DB1C34117315C88003A6B7EBD05E57C7 +ADB60C89FD2B50EFD6E68BBD0CF5D0F0A14A8A070ABBDC84C9526B3DBC521593 +CF83BF5395B66EB48751BA38ED3F4EBB41CCD6D0F6483FF47F79790C7795154C +DD3E3AC30F6388D48E82550481A593C9D2FAF77FFEC9861891F72B971D023529 +AF1B3402A9E636D72DF774600E7429726F604570591369BAF0B18E4616EE698D +CB6317A9B16D74B58EC252BC22248C03071345E77593B21046FA74671BF1DBFF +B803A1330FFE43CB883E1F948A6FAC7473252A75C80DAA33EA98A6577ED9F49C +663294DFAB013652D9338FF5E403DCAC17233F151A658CA4938304A8B1EDAC93 +A1E2BD08D3A33327DC5911171AB994ECEF7D0097812C4461C6FDF5003C6A7352 +3FD2AAF0DE7C6254E81E32A677ABC722F2B9FBF886816D42DA317EDDF7D71E64 +4CE37A79213CA18DC53C25B292AFA324C00B9DD1BC99C4C5C79B31EA88138491 +388DB54EE9B729576F1FD8293542C6F77DF630FEB758CE29FDDBD5CFC07764D0 +A34E4C935EA53F56BF265EDB4D063CD97832A1B56C63118A600F83AF3F8820FC +B93A318A3B4237E50DAF7979A3E29F515CD092A36465796AA766A9BB9F8C9556 +E4A04723E37B9343D45FBBF78236F393925D6E341FE8F0682EA660F94CF6A8F0 +818034CB18283370C21DC66F773185EDD1006A20564846F929B2E3C55E9F1701 +72AF310C2E6AECE2E3F43197C4902B83ADC1A5CB4D945BB44268E6E3F15DDCF5 +FF51B10BC1495EDC109FCA7F0BCEA15FC3CBB1E61418B4ADFF29318D834047E7 +A71EF44294DD0E355FD2E3A18ACAC4285DFEB063EB542AA9827E6EF3B42DC4CD +CF342DB6FCE53042C53B46DDFEE27C2CAC8E8A58273FA825CDAED680103E6715 +CBBEF8516BF2CCC0447669CD72E6C2717F9DD859C0800761A6A97459D1291E6F +D0CF2FCF36B092BB3E458ADE09271393D68216896D5A3AB597C8E6353CDEC22E +E52AEA31D2A7D83F5AD283CA222A9DECCC20EFEBB584606CCA21E82CFE553296 +3E9E5985A086E40A3BE7892BCE84447EE9FDB1B2CAB274CC6FEBEC581AE90DF0 +1979571030B8DCAAC750D2B545883F8EF2832B06AB727905E13168CAC487182D +3EFB72022A271CADF7735F588BA1208CA46BEAE3A1DC629C25769571B50DE693 +29018EF3A3DB8E52DA3BBE248D13600583E73602E5B3FB95445125CE8E0DC083 +CF3CAFD4F213EB7D7B4A0C6A9FBD44F72227CDB561DE8B822EE2124BFB2A971D +24A11F3888D9AE3487C85D6B0595F0B0E7B2C9F195C5034C459352F8149CF382 +1B9D38969CC6724437F5633DAC83376A3D2F8E7ED5991E783595FB8E3211B5BF +499083E8F5F63266C57D6708AAA2179D2D7DC0011D4907E7EF755A51CE594746 +45D30CCFA0E462473B8D9875AC17F7C6022792422572FACF98C6BDED9B64CFCD +9AB417BCA3B35EDE7C28C44E80CA72B22B01B88DF8C2A614311C55A25B50239D +64261483FD6E44B7B8BEDDC3E5BAB2A5A93DADA0FFEA367F53780BD612AB585F +A8033298213B1F5FCD4F0384BF967D55A07A16F6E217C2699C78BFAA8D12A215 +A0CBE9E2F7535E44A19D1F6C8DB10CF2719293DF85488F8C779C62E9660B2F21 +8379CF1EC103F5F6E23B5D18B57CF2ED9A5094386F3E359A889453730F860C72 +CA3926A45B8DC5B2133EA457DF0B2B6EC96D8D347F3724B3169FDD1B1117B24F +AC6DD538CE8A8AD3996B734293194C6BBD506463843A58630A679B4A8CDAC0A1 +FBCA04D0FC9512A0FFADBC0120CD61B561156A3BF89D89608011F9E44748F0B0 +0A9F9A38E42DF84EC560D23B3625B1EDDFA55E398827AD4687F409C431299959 +2BB044E2F074C42494B3B4B4D3DEC0DE0DE49BA4835CBEAE7ADEC59F05ACB84A +3B805E4EF25AD968C77955EDE53044811E7BAFE7A1DE3F9490357DF5A60B0E0E +D9C378208E2E94EB44C4FEA646D79762B34D9A9F85E21330CADA992918DF86C5 +B4B920F2AA64F8B1A9BF4AAAE41A55512039868A56CA91D1A82A6CCDC1204179 +0F203BFD20CA6660F74E4ADB872A3F24F1CC7BA9CC1AF421BA3F0CDC9F2FB7CA +FF03D95CE4E77D6B472272E6511BD0987BD1D79EB78791E359D0B1E9B5603AAB +6300C17BBEFCF3D8667430220C69134581BE78A0303A5851252C58A66AFDD021 +32BC1F847125021FCC6709D196FC5665271B9468FF6EDA5464F026B4C50EEB25 +44889452C2AECEE0B9D7C9621A52B5B5F26513D60DF0C57731F5A9F6E53DFEFB +E66C8B62E714163873A8039565EEE682ED6BFA713FC448D5158534EE24A7387F +8D4E6886CC32DAD5A1DB60F21A9C4DF2A09A93215D2C143A55B5117EDF492A38 +A0637A8356CF0DCD4DCD3941E2A71408E50E6C8B9AF962F2A076FCCECFFF69E4 +D37B24809B121F0CAE6E2D2A796A685E4C00FC798D168FDEA90D01D8CAA3A407 +A56EC022CB542283D1874328CA95169FE66DB457514A0BB5A1902C2658C06D45 +E63C9A870C0E137E733B4093631B76F2066DC299C17A85CA2EF179F635315419 +35444E8AC0A7869370CFEBFBF15831FEC5C1A317B14C78E6D67AFFDE2F8DECAE +1305B711A69292FC5F1FEAF2692CFF286096B0AF4FE9364F9E9E44C564242290 +44F23D1F3A4C07918008EA5FA57894BED508E5E1D8AB600832BF81135FEE4B58 +4B79801AA7E5573FE7A8B7F5960C4EF1074B2E6C3E98928C7221E86FAAD58997 +9211523D7C18789F6C202666B2134C30EDC7F9790872905C61984CCDB0170A11 +5BC1D2A370B27A6A48DBE8751398EAE7DC82A353BC05D061A3A4C8C5D6335A31 +91EB4A8128F6C4B05490C10BF86F41D417C0977DD62C1367FBF78E0C118F0A02 +18286759CC91FC289B010EAB2DB805C8761BC54880E8F3B5331B025A856FC35C +9486605130750E0037B62D65C1B6F9DA250BE4C900F04B16CD71D84FA31ECC5E +C2121398F09257636D6A92E93D04DAE611935C262CDBBBF6837F596F59165F46 +BBB0EBBE9105EB3A44693AB62C2BA9FF98CF9FD300B0B60EDED0F2B8AAD12D6A +65096E4A366056D52BD2F2246735C8FE3FCDC1ED26BC73840DCBE9AF6740C6D9 +9B5C54882A6E2F90E075CD32FA79D1F52FAD0AB9815F70404E7BA14C2ECFB8B3 +E62E9B31B64C9D437C0950C7C292EE756993ADBC4C742F7D37443A20E3A90C96 +D0731621A733AEF3F95C6AF2B1D2A3CCC38973687DA79842DF889CA53FEFDAFC +7CC2E40CA87C08DB1E13911553B31503D68751EEC6A254A8C3A114D6FB36BE8E +794E0AF2060978400B0FECE2D624A0A5EEF711EEEA5447F616770B87FC8DFBC1 +E636517C1B86E4C057B5DEBBE5D7E3DCA6A260CA1B9CD9F7845B43BF41805D1D +BFEE4F3B8CFC685C9E56CC0EC688B420E59970D7C218D8CF585E8086FC68064F +88CE8E32A954E45CC4F619EFB0732BF8709D15579D90C8B76AAE238F691E93E2 +D3176C3AAA6AA280ADEE4F18913C3086D933D8F5A689F0F04F532E76D6319CC8 +92B514094520B05AAD331620D75FDC88AC8769AEDC02EBB6B3E1FCA24B3D00E8 +B27F55596D07B471ADF26840D9E875D88D0162CB3ECA013F6FC0B2E586A15CB3 +D02940B0572CFB5DEFA7857F2924DC7F6A948A7AB500B38252B7E81C94EA1C40 +4AF8A6FB75DFB51799B02E6996FAD42F473FB9E335EF8EABF17171440A0EAD9D +A0B21149D9274B60E778CEADED256456F7ACBBE986973697B17E5A22DC6E08B3 +8961E97C2A61FA22F1CA39808DF13B3025CD8D202910CC01C552B6983A792C8B +99BED5E77E07C36E694D5BA37D732AA07AB0AFAA1A4E354B4A22AEFCB694557C +1212E24F4DFDC63B9E539FABA1EA6C0EB7E771957D3C939FA52015BCD632E1B2 +E1679804758449129ADEDBC2D8AEEA8A1751EB8D3F61A2162A3D2D4A0ED6E691 +1ACF802DB5644ECE9B0A29DDE0CE43273257E4EB193C5370A8C7537B6D65F02D +E8FCDA87BE43213456ADA7A455F3E900A334DB9B39614070899F2CEC919C75F5 +BBDBAE266D880ED1EA73C2655D3CE425C1502DC3E1EAE4A08F472F34182FB9B3 +BA9F93FDF48C2208AF3FC70817E03E37C4AB03ABC3CD3A585F143F037F016FC7 +81DCC46D88F25568EC3E0D42430FCF9776E855AA5F476885CDD3EF82834EA92D +53FCBF51D868043BF755FF40E98487E98AF362109FE3B4C116100BB426D1F62E +2FECF0ABBC07986C6B68FC80875314610F51DAFA53D7CE985DF3BBC478DDF2C1 +6BE508B6675995710E621ACE0823A4714FDDD4B1A12F5C9CC6D8B92A15E307F3 +735DA252E816736F352A9B6355A002EEF550989C6C6689C5B7D6 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMSLTT10 +%!PS-AdobeFont-1.0: CMSLTT10 003.002 +%%Title: CMSLTT10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMSLTT10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMSLTT10 known{/CMSLTT10 findfont dup/UniqueID known{dup +/UniqueID get 5000800 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMSLTT10 def +/FontBBox {-20 -233 617 696 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSLTT10.) readonly def +/FullName (CMSLTT10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -9.46 def +/isFixedPitch true def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 40 /parenleft put +dup 41 /parenright put +dup 45 /hyphen put +dup 46 /period put +dup 49 /one put +dup 50 /two put +dup 65 /A put +dup 69 /E put +dup 73 /I put +dup 77 /M put +dup 78 /N put +dup 83 /S put +dup 91 /bracketleft put +dup 93 /bracketright put +dup 95 /underscore put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE33C33655F6FF751F340A8D6C01E3 +2E02C24E186BA91B34A1F538959D4450CB683EAE5B034D030186901B458D3777 +6B3942BD2E07121385120248891AEC2EB33C4E3A0CF00828D0F130C31A918C18 +979FE94379C648EF21ABF659253E43CD1253866F157F1DF85AE7E8714F061B1E +ABA3AD094FE8D6293916FA82EE4F486C7E513A06D4C9BE44306A8287970B4ABF +B6D1F9274A5A0BB6ECF713ADBD1260D5D6C4420D357FD486470A74B2F0621B59 +A9373ABECDBF32FA68AABB66FAB0C970A3354A335FEDDA1C288245E6C890B8DA +3D0EB953283ABFE372221EEB1586B0167F634E3F29CADCAB484B81A243CE1E3F +D5106AD6BDB1AEC91123377F816711CB9D5140120FEA84B8205B79D1569509FC +6B671211985CEF51691C45A168740BD826464B2CB0ABC575E7D453161328F80F +3AF1C99EC219010EC6C95E0A8D1909719CF18BE424967E90DF67537220E60C3C +4345B154D08F9EA684710E659DFFB0BA1B7FDDCD519305900A5E1CDA219A6C90 +DF8BD712A3686DAB90344E8784C7A9AF3318550285039B701B9FA1D3A3C3B6C2 +753F1E794A3463A173C99A9EC0E2AB5737134CEC2C97CD6A37E38692ADB4B131 +54697B7BBBB23680C72CE96066D8007B90AF0FC5958232AB4F21826691E9874D +107F47DAC1026298D787989BD77CB43A09FC95F6997DB00D8483AE9C2716CBD3 +7CDF02DA34FDA2F0754ED0968270E118DDD8BAAAA65C41D699E2BCC2556AA231 +328187D2F50FD518CF458B0BA1F7DBAF4B231CFD61D5DC56335B53C3013BCCC9 +85690E19E992ACE55EEF2BA7A75DEE6DC33933C226FC1494269B7CA4CBAE987C +2C787386400172AE3F44AE47115F4117EED866713BDDCA4A7AF658C49F913CB7 +308635000043F63BA210410A66E192289592882C477B2EEA0B2A339F0E7CF450 +CA0EF79D3A6C28598825CA03FD688DA60C95EF707C6E67CB7E57DE7A80545195 +739ACBDF27069F34C9E0216C3D17CFE7A652B910FCC9B9AECC2E646809C22D93 +FAFAD465DE794755AFF5BEC17160C9563B5C51D07022E2D3A256FB5CACE131D6 +F4B30F591A0419D957D8F0DCAA0A8D65A8D83422AD7C2613FF13A302E152B312 +3F1ABB45E42084EAC894FE335C07324849C9736D00C872C4551997DB889AF17A +A52C5AA77DEB548B0103B77F65717F70B90C1BBAEA7BCB4959F32851A9882A3F +55673F24103D6BF7FB3AD3EC3CC50FD8FBB4A6B13C3D278174320713A7B327CC +A71F01E50840B33D0FC3F5F6A6F2B0F2D0E38494B1C73096A430510F927235FB +69E931DA8CE5415EE88D0248565E3347353621A48F7948AC9EAB5F5057541B50 +82BA955D90BBC82E582FD71904445A59186022FB928015235B60830DA59813D0 +8DA3FC306C43FF8BB2CB6772B1F7BA3C1AA4B2343E7DA7E065EA53A4E5E28DC8 +0790F2D5CFB203CB135A08DCC9702B59A63290444F202756E55B9FB053F773D6 +0F69C63E74DE593E49186FF4304E8FA76C3E3006358DE549E946DB69431981E8 +1261C9C9A884E4EC708F69E6AF5D22C5BAC49F2AE85903E3D48D03B7B97054F1 +D2937A0C685D912D6D20A75A77712164DCBF8FE4D5460DACE139C5A934EEA09F +B94DBF168A4BC03A9D689936D833018FF43837DF9519AD10F357F00BC068E737 +170FC9FC6715165F733A0B6FADB9ABB48B845167DBE6D771C916577FC2132863 +767DC6E3D460E779254194AA690983184D934F5E858C1176B3862B69B42EBE7D +EC9AC4E020085D474093F7694C8A8C2025D4B0163E29320C384D62A9F3FBCB1F +AB5A374EF3DBA48AC2147A207AEFE8B78BECEBC55C97B538F3A0FF4589D171E3 +826342C8A5186224FEE54E4C6AD5EB02BCB4088B132FA1A48362824BEF161235 +8E661DCFDFD8429C65CCEF63902D0E07C2FEC1DC2756D942F13FECCB7E8A8048 +345338F24B7808E46A04A915C111F939E2669A12FAC0BA4F74B832EAC83EABEE +67E2817C058E69C2010F2572FDD15194CD8DF0FE9F827D349C0444A18D1A86FD +802BC120A5114FA3523C221242C7E767B0AAF6AD15DA1561CE8EB18A2401D71E +20481FA5F1E247CB5288F47795A6A3A3BB186E89EAAC4A54AC91405427136127 +5B151203426830F7CADABDB3FF63B40CA29CF8E667E71615869978E99E6F3F07 +0170EACDE3DC62DC05681D7680E2E96C30002AE34A4E5EAEDF88577601A82C36 +22D625A03B0451D7BBAAAE0C396711500E94A482EA787495073F16A76D1657DC +4EA7C7B83BC30CE7F145B65B6E2ADC207D192CE3B5FEF7031F4BD64F57E1BEFF +CCFFE06F1E4ECA48B442DF413766A70DA626359183A9B24C70419487423C816B +4BCB067E661E47E172563090D6328BD738D2B0FE41A0C1D7A47576A79BAFC880 +0473229D134F998909898301CEF50A82B627A9A06DF59D0B9C530EC5D877F1E5 +220D3A1ABD2ACBFDF1933F92B3137B22B9F95A961D93B729307749A50D8A6403 +7AD0F9C40743E39B8D198CFCF7C033D99440D46D821D97545B930EF92E7AE005 +27F2FC766FDD4790FD1913C7A13328E73E587618ABD9008022C5C6C23935CEFE +B5ECA2CEBA1D25DD846B48423F7186E03B1F61C8F1D5AC95CE03C83B2F221300 +7A761D6CB5F7F9251D3F9A7F4B25B99EE7A1347ED3059A811A82A35A033E9B07 +A4FB2A95009576F48665605C478E5F6C1B135016FEB4AE6A6BE4B4359836E04D +45AA11366992162973FB6266547C2E570B8F56F6D992D2C0F63950A16839FE10 +F56E59D93A37573E3268C5892C9F3358753D1FAD6379E82BE740FA17236E96F7 +C53A2FF785FAB86AD17EB1DE8A6AA9C69B91C9D9B43B5188E51F6939FEC21B65 +AF17DCE95DD3BA4F1DD51F0BD5E5869A1ECA7398B6E664EB0D189181E9C23012 +DC1E54C146842A90909DBEC03B79B58909205F2CB2A7F83C66B437D7F7DB9781 +FF0C67F004E979C95B706D8D85255CCD827CF6196D847DB380B56980109E96CA +997157BE78A4F758CE59D78158A854EF2C20099438F74777D3B0298D45BA86D4 +3C0AC30C984718FD62ABA0567AF0A70C1DD41953E3E7212D5C562085177E650A +2ACD49940551E3F7619B4CC31DBF67AC15D938619B95DBF66E6D1300B1BB8605 +31C4011379FB5388CA49E4A9BD6C921560CB8D513F8716A0733D2A7D77E62D22 +A69B54E9048CA168D210816E613CF6357706EF6B118A1263B858B7E19AA98891 +43BD675B06C893579957BAB97199ACB82C080593ECB8B66A7334779CC16E4D0D +4AF365CA6AF9727AE29417B61A5FD52452873B1D666044F8E7C1F6C6AA3397B5 +94A5780F4005FB5E41698FADD1594B505A58253D68D2AE3320E22165D198050E +425820CC0A43FF1D61F168D87CDD30C14D387610B6CDB63BAA39B3EC9B3CA616 +FF1CC679227749DED3DDEA26B4D97C633090DCB8D8A6E5E07E3579E4A99BF1D5 +51E43D1D7F139C9CB1D76D8F693A3F23A74EFBE79F01E0B850BC6B6C7F62C2E9 +859469A144853434895D73DA6BD2B348A48BA80E79327ABD96539F2EA2209852 +E1BF6B0B819D7C68A9A1D0F6F39416E3EC4AC21DCD3C51D3B5B8D417EFAE165F +2A7E0B76E558AC9F685A76FEC7E3C73CD607D9025DE6113BE5D0401887A53910 +82A813B026A502B51D484797D9D7E79A25B6624940AEDB4A15F2C73CA1AF60FA +22D15BFBF268EB044FAE17822511AC6580D1D74DBA3C3335217780B29FEE792D +200B00B8CD888A8BFF15D938FC758BB5CD9B3E08E1AC6CD1669E663BE86711A5 +892684DFCAF70C11E803164994BDAD89128AAD6461D4558AC2ECA3E05EB56D32 +0290AB16A6DF7133DDCBDEAE89C6CD83552792E23CBF567D57E46548EEB0A140 +437492B53C14419B6FE7E64AC23923A9E85F56A9DF209DC4E6BCAF1E045F9CA3 +BB904BFA150F4083C18B0CB5580450CDB657EA768E71222C71DA911A722AB9D9 +E18B6847F417125C40EA8A0CA1F551A4548712D098209C78DF9C3F78605E5402 +DA2DBE2218E49B819296D5AC88D17DDBA982E171733D1E9E295B3157C9B90BF1 +CE68CB185947D1E3D7544155B741296D14B064BEFD3E6AF25C74006CF6800551 +80FCAAEE6FC9105E1674EDFE68C45617D8D3E2264CD395EE94EDD017EB85884F +FDF530EDF4F3F14750CA066F149E688FAF8EF4B5FE6AB515CD298E8D170346CA +9B32BAD1D86DC147BD12EBEDF6CE1E749C5B48314F512470A568C172C35CFA41 +031E34586A89404CB5372D7B2C7A6D96F420D4D7C2D4C08184F4AF86B4536A90 +9367598424112A7B05D7107B23695CBCD569002290599E0FF4EC5C852C31F5F3 +9BD56BB840DC17DEEA579E7A7A9F764788D4E3774BD523D21267869224D68891 +4523070E80A123B58F7B579866332FC38A41A5915EC06F2D14FBE4A6CAF59AEB +57E98D661637EBB885AA5D74AD429CCFF64E5149815E7350118E6385F4C74E0B +2EB474A6DED021D429F01C9B0634A09250C40E22B3BFE1B7246D18116D585F39 +0E06E9B5F27A6CB77C8E9462189CB900CFEF08F798CAE15FBD94587F33816EE9 +03FB2DA6826EB69D8C284AB9F7B00630D0420EB6E35E0E288BA25F5C2345C067 +22412633898AF99C2FB232D1469025BF262B567F29A05F4816FE8EEF5F02BD79 +06202F6A1E3E5D4B3C91BA8D5FF53D5136BF70E5FAEF441A7310CA83721711FC +39EE48BFB2FF287234B1A6102AF146B10A632A53AF97E11FFAC3A2A86BBAE3BD +E0459ECF0305366078066F2CC628A3918E775E4236651B3D817AF1684B07A163 +A0142D16F55D2FB5F2255A8813B8E54EF3E801E95A4A226AB8C0476AC5EDCAD6 +9258ACB6F7C0CBDD298A0B816560622A1871FBE2FAEBFE697A8216A0D8FE30C6 +B1BA6C3E975F78182743842E7F851064037394142AC91B2530FB1D511EB20F3F +79EDD8B7E1579D35F6E7B2883C47A46B6C1A458BECD6BE58AAFD834A7D82A553 +2FE4E66878E4699856DEDE964F454638F768AEDB595A883E380408F558015FB5 +8720954ECE2704AFAD4D62E8BB2657C4FA920D72248B3F762B2F12D125B796AA +1C4BD6B42D766EC1C9B2C7AA4B6A3474BF753742DE8AB76D0AB0DD9A20EE2DCA +0F34CB25995ED3183759CA83ABC32B8BDF0B06EF169252587971F7D37463BFA2 +BE36B2E45559DD73DE7CBE29DE92B9BE6B9F8093F934BA311D81E18A8DA92FC3 +312E3FAB43C53E803975981F0076EBB8F257C123908450661B6FA79E7ECE98F3 +B0A94E0DE3A4DCC8E0FEC106CDEDAA297A75BF1E40F3C2419BF72A644F452E2F +9A8793810319885EB3AB23B1E80E8B62A889311355C73722C18E62711A7E6A16 +A5B923408444B13F6522FECA9A60B067EE332B83E1A69CD835C9D69B5D8859D6 +91F9276863D2E2E8193641E4239F4ED15E2C482C735BF5434BAA454EC2830C1F +7CF766DAC9E924F17F03093132627673BA3D99DC2DBFC89E5BA032C16D3C1C8D +78B3C464081044DB53C7A29E925F4157EEEE928C8E28EDA5F0A4BB6E0042D8AC +7595C350645118172D04FBF06B2C9A9F3603A54B57999E2960C993724CCD6A09 +766BDF73F66E07FCA9BD09079CE8010E6CFECBE2E5DE1EA4E280AB78D5184C11 +016385007CB5AC0BC95955A1E88EA1A1D8EFEA886007708BA063F556D9284D4D +C764E75CECA51BEE3D35DFCEBF6175953D30FDAC00F23B1721A1DD577945B5E3 +8176A21A649D907B5F63C71718ECF32ECCF1B26BF15AF694F1045CF98FC75278 +E9782ACD3D83CBDBEE690D29B3176E745AAE436382D258CB22F3DEDD02E441FC +6A9931AC2F61156DE258DAAD5EDAD41E6C0DFC902173168BB4F51DFA7EA615C8 +B0F92FDB118378CBAC3D56B6B9BB0883C0C14EAA67396AAA7987222A132B7959 +44FC1E9D6DB6D549DFBEF8D2DD8C53DD3B66935FC239E74E2C440CCA13C068EB +C4A3B69F499F573D076E2C92E24F2C69B806591B0807CD903E078683854963EE +5125C3640860CEF37BE186DB781475554BFE6C528A9633AD5772BD53244E24AB +42CA2D1123AF45FA257940CE611D83014DF04E60220E9AF27CB2A2247BBB004A +F5722A5EF058FDC7DC2B6ED1406649DBAA58DF2ED3A91483D60F11C4A39BAF57 +CB1E320A987B790672CDD3E3BEF4A67032244DED2FF4588B2072CDABFEB36009 +9F4BCBEE16F811A44CEC77F8AE873C90C0F4C975E51014ECBD45A56A63F034C2 +82212977023A132E5C88AAA826D841FDE9CBCE7A01E4B6F0EBDDB9A69EFEBD72 +0B41EDA807CEDB791084047624BC11CE10B7A0A311272EFC9E013FA374D97EA5 +F7998FD908748CA72D8CABFD0F01220C2114D3B462B22FB71A23B284B1CBC7D9 +EA20BE71F8ACCED21F096009A14A7C7B51450BA51514707EB46B9FAAB31CFBEA +E1DDA6F5D9AF0B6E7D05A1EEEEECD606427B0F2363D1B882B50140466B9D3CBD +D00DB06DDD1BD4681E367DAA4B7C405C6281B67FFF794041738FC6A01D261CDD +F6E0A330985F2CA782CBCC02B6F4EE5993434F656B91A51CC03B1D73FFA6629F +14F6075EBFD83B702D8844A96CFB5C14051595BC7DB2218156A6DEDA5C98CAD8 +BEB5284D9D9F86406A8C1AE85857185991C360E5F44DEF352A1F301207BE94C2 +9A3A11BA468FACB3FA2D683419C44EFDD7C8F1079659F3ABD89D7F168B1591E5 +6105F9B3FA481BA953CD34CCFE73E427D3AFC46E5C58C2981198BA284DB8B37A +6647BEAA561799877DD6858FCA71CA6003F2961FAA529906673EA94D82D78116 +4DAC81011FD175DA707C1E15D4B6FF19F8720A4E05E6E103E2DE880FA9C192BE +C5ABE7C311C2ECCBCE8F9713DBA74AEC37A61C8F21F271B35F0F7C88B182525B +A4183377597ACDA9A6E2F181725D427795B975BC4168A408D292CAA484BD1B8C +9DC62E737ABC805C8FCB7E96454DA032B601345570EAE0379BDA84BB6D15D780 +42FA1E068A7D62F152B43B788513E13724666FAB4E2B4F04B0448194E46582CE +7389BAF0D1DD4435BAA6B82AC305C04686B89FD51197C721D941BD2893596024 +1598E6C2BD84527EDA6FAB782033E4BB4F964FBACD96CAEC3F3CF89CBABF6B4D +4D3AD14A03D4BE931632BB03BC2B92842FAD51A19A756892D5B978DB695D0540 +CC9D030C612E2B201D60D09F56332DD0BA1351EE62816C21A35C33DC11B37BE4 +D2F164ACD836A5CA1553CBC733E3B159860454B17064B4E22D3764FF6293BC81 +CFA3B2325C8E072857F6FF4ADAA8818247D431A28D3C5FDFBFB24A6CAA327AC1 +0B3630C84ED9F0D33B8255A3CAA9C5A0C79F7BF6BA3B9801C3BD0B30AEF7CCA9 +92F25E332EA97A7CC653C93D1497992D6B76363885B92ADE34C2A33E30A3B1A0 +57E9C16D8CEC189565808D3FAC92973C71CDE74DE9D8781CCAF88747758014C4 +5B62667D4D2CC5EBEBE77C5AD00C6A69D1819F5A786964501E077EB3BBEA52A4 +57729AEDF35253F7E1D31F2DD1587BC15CCFC1B0CA930DA83E2031B099A38158 +8D1849E7145AC74777A3C7136DEABB0C787E5A218309A65EC7D128147EDE3AE0 +C0AC039B56F767A22555CFCC12DCBC7F5A5A3B4E86EF5A69EEA93DF0BAF2A3F3 +7504F5C6A7A67388D2F9045BD755BEB7DFBC2EED679497EBEC808BE20FDCB5C7 +B586463BBB898DECCCF7249E9047DA943FAF0718A2050FCFDF8A4C2029FBA674 +EA64003AC03A847185936FC375CC67B3006EA681F61F640C3640A78D0C7FF521 +D477981E23E5956BAF42252463FDBEC49BB560A9428D248B0C5250CFA2A49CD9 +DBCEF73123C13BA382D3CF6A7B8A8CA3191D379A659F0E2C6E9CAFE9DA2AC074 +F622E397A2F7C73347364AE249B11AE2C34AA7F0D27B5F35D548D5AD1228597D +D16A478C901D3A34D870BA39F770885B7DE62298F0114752435050E99EA4E5E0 +56B965EA185E8DF96B9FE97EE23DD45AADBFE02B427222B9FC99DA94FB2648B8 +46BD30F881BAD3820DCA4D8093BA0FE70E03482CC063B751439125623FA7AE40 +52DB2A380D89D5E37BF264CC73DA9A1540031587F481A0F146C6ED6F3F2957FA +19477F075ACF608CD94CE466C1FC3EDAEA3ED25C96FE89A7CBFE528A33C4E84D +465FE6FB031B48D904C5120D428D6B51F3232847CB0B7521E5CEA887FFC56F02 +0882B3BB7F5B0B954E7078DE3E31D8AE65F9EA55F4C169DB7C35DB9645617AFE +078E03BF9A1BCE4E489AC9495A1E6CC7D1FFDCC03CEC1A32490186FE8B53B09B +DBA7F0E23C8F5E5270D039B409D504203A458EEF12C035039A8AA12C719C0339 +F766BE6275511D585F82E9D4AC9B5424312755C4B74383FD094BBB24817D6525 +EE62456392E5DCAD0A0157A4A033E440AA014D5682606312F72248E13C43EC3F +BBC9B4A2CF19A4AC6ED7F561EC37127BD0D3662E05BA4DE5509060B1D607170F +C8460BF557910870B904BFFD042752C0B839FF9E5E90361BBA35589BACDEAAFE +C68C5831BD0F19419A684DD99D772D60BFF26CF80783E4368C5C13299DD502FE +D5C4F8531E38EF4CDB97BC705E96485E6D35BC2603CD9EE98FCF9B0FDA17BB84 +3142E3FF4FFC6659855C63098409C680B968E62B3C844B47A888865DFA5ED6E4 +C1FA4A0FB50571B5D725646B993DEB64F9ABEE8A48BD11B9CBD9AE34F156E228 +23DAC3CB78C6A1E9232D4996EC0B3E354A8F91DF44706B8039AF6926089B2B25 +13319955BED0EBA7AAD416F6535C0E67D552DD835BF562A721CD611DC83CB870 +78B91C225D2D9257028A6740F41D53FFC9DF6A78C60273537F39C4B5C54C842C +13EF382CC1264E605BAF1A1B05F76691ECDDAF62075D2918AC24EBDCB511BDBB +0E2AACB54639B139B80694ED8C1DFB01107C7C02DB3AB07427648B23172EE2D3 +E6535D0BCA1A12479ABEAC1BD1069C741BD27558A9F66284C40A235BF964F52D +A771B568E46EFF531B6B97BC34944013A8AB6B5FEB974419727866916CBC12F1 +8A7BE66AFC5C360D1E3848C09837EA8239F8F259179D8EB0B619D648DF1D11CE +A849C3EFFFB5EBE2D73FA6ACF8B403795F3514497DA130E595B38D3D863B0BEE +D55DA19ABAF9C6BD350E43BDBDED9BDCF6B44A2552C20E9CEB05A298D998B774 +8476B250FB715B630DB854FC61132515E70254516FF4F53DA66933054518026C +5FAEB55E8B9076A9F7B9EFF133F747989AB682837AADA967879FCD83354EED2B +284C01A3D9563743D7ACA76618301059980E3492C6B98718DB19E18BAFE3E9E7 +2C4FFF814D0255EC6F4F964BE331971FB6094C6F8E3923115DAE3DBC55136E12 +84B72DDD7471BD6C8C4960A6DC0CFB3312E0CBB7F34D36D3EE822A639B1212FF +B7EADDFF3F4813BAE8FAB7587B69635234EC141D612D70AC6811BBBE3F0098D6 +F806084BB9DC19C1820C8987078D0DB4564C350DA70B451D20F253458D1E1047 +D655C5B24A155CC87375F3E6C1BD983E8ED2BDC9228B5333E5F9FCF661E09563 +DAE46BB56DEA5853CF550B43D7D944154C2AD57013AC16A488B866986BF721EE +47C207FBA2CDD3F5477B7C100C22C5A37087376D5E3CC30A7F4CE59EB8928739 +3BA0BC9D2F66A32CFCCEA46055F299289C85DD09EB37ACADDEF7A2A75F58A1CD +6AF20F4724BEED00E16ACD4644AED0A41716A931ECF342CD9414515292C6A4F4 +AA74D46CB2B3A57A7E797391A8E7A7F0A13D72E2C57F5B2E0B3E7B90F8641136 +BCF7D63EEEADA8138D22031843F08FE8F43F0E70C99D9D5C562DC5C04C537265 +9625A77870E60BC52EC75BFD72BAAE1A9CAAD6556CE58273851D451895DDFC5A +16757856062B113CA381205EB13D2C4AB7345F20B07E981C0A8BB67A94C20A45 +5A7C6B8A026C94857AC6D321808D028CEAF3CC1178288790674DCF90CD16CEE1 +E63FAC87379135D927F9F5654BDDF2DBF22C138FD4028EC3A72A2693E4953D0C +AA806FB69BF4B9A0A960A17AD6375E33B06477A14F6F80799ED1E9DDBEB58E31 +B20B75251C15BE4F143FFFD8626EF296876B1831CBEA3A90CF1B9112E5908DDE +75628C36D2B768B3311F82EE580A709FDA978F1C96058751E678BFA4FCB9246F +F4C01242FC57F38555D9FFE24F3AC97B27E4166BA8C0AF8CF3EEAC6D0743CD0B +C01D7F942C53C32615228DDBF3EA394AD76B81BD9830D3BEB991580936BE0D46 +0129D4896D6DD59373D597C77D74B38EB4FE3C66E2A45CFDA0FAB956B95E70A7 +2719FE90361417A6A1340F9C60B7C30AABD2B7B7C525884F038FFAC7FEFE6086 +73B27472CBB55C92A1EF1E882047E8FE40AB6275060737ADAF27066B111BE867 +AFEF4460587B0851D56FA282D9B9506914EAD6946D863FF4E7857292F369DE44 +B2A848D0982A23DEE389018B121D46DA634399D291C8C2D1CB4C7DD7F1E04810 +6156C0E43F04F5589F3C65E5AB798928701EBC852047F80B3597920BA6FB0789 +715CD59D491DAAD25CE8A4DAAC52459CEF1200230F6AFF966B499D95D6E27631 +B6C929E1557F5FFAA4491326884581E6169675434B4908945D27B2DE19A45E4A +165B12353FD16BC15B3C71C41C7DBEC0C17FFEEF01EB1E03901328D0ADF58327 +6C230129C1BBF9F812F8A2EC67AFD29780F9FBAE34A2093CB25E6AE8F971F12C +D5C7ACB53EF3CE8AFB6A500CCE717DC15EE257E77751B54946122EDA7F4170C2 +17840F2E180033022A09B437B9FA5375E14BFA5A032797ABAFBA197CF652248B +4468EE76D1049572EF6E1A12CC033B025186BB3FBFF48ABA0962A559B76355DC +2A1E467DE63BD1E2E735020BB467267BD10F0C0C9359D0A79E7751139B665005 +E55A2AE8E3A5F3736027D37488FA9486C0386E143E70FAC69487CAC13F6C44D1 +F5F85E49968D2D2E2B74502DA4D834362A63F8BA86587DD2EEB84787786B1B7D +1D404B8A7B1B9ED03F8966E23F4E3EE96AB4E71014861D09AB3FC066C819371D +154514D3104C475B45AE44395975B134DB27C959C04316F825A806609AF296E6 +00113C1050E299A387489C86AA2E1C3F8A8381D3C6C9A060EA66123322264111 +5DEFD7938B8AFF3F9521234CD01384678C3C49A5CF7A9CBD980836BAC99190ED +6ED29E1F879CC5CED40C39D21E3E8E543237DB5731FBAE92BAC586F9E3877A83 +C5250BD454334CFAF4EF43F7C78C5B5A0BC12A2995E68A4833A7000F81600841 +50A0AAA4F4C426290E7D3B6A4C1B978E5646C4C791ED648102056F1CB80420D3 +69AC63C6A0F628D2A7953881E037F5596E9DEF81A74BBEAE1DD8C7B82FED3AEE +93F8ABB60ED5703BDFA22E4C49A366DE4C791408FE97F6FB462BB7C83E00155B +0FDE1DB0D7C132C509E6E063C229F74199D60E0EDE1F6E678093C44B8874F416 +CD50E4C9D23E3B36AE4A2191FE823DD2773AE81D80FB4DF7D501591CD6FC5106 +E34CC73731C512D80B91A01568B3118FC6BEA17DB7F9A0471B12213FE62DDDE3 +EB4E74B90C6D38D3D06227D5265C51219E8B228435FA88157A5769E5A66DB6E5 +555C273EF5BE1A4158BDE1A3EDC1DDA96FB7A3329A2F692A4994B349CD09B28E +F509061397915CB94FB6B3DABC6748CBA47F93F02016786E4F42A5022FF9E6D9 +AE3CDC5441CA4EB69F886154AC8412DB779F09ABFF9472C2627C93855DAC68EC +6F46C39BDD1650CD480FA2DC7629DE84E72755BC93E954C7AAC0E09B83C7A79F +324C4546EBA46A36393DBDB92CEF308E1F36FE7285627E2B4581F0D2312B91FA +881548AE75A37684975181D855D8B92BE32D7B1631DD1EC85683CE199B6F94ED +1FD9BA9B31C06108D2DDF642BA2F648D241F80FC04C48DEDC45C4C4F5D8B4C1B +16E0DB9B7F7377BB3ED639FFB083B739E2F0B1CF6F596CE4EE298719A6400FB4 +3C260F25AC0C5AECCA446CACD6AA79C3BF6FB187112A82D2E2783CDE80497FA1 +8613C192805EF410965283A557A996D0EACE42E5C500F697A13A08BD42659968 +A9DC7DF175937F28671B5F52DFA37804414392692DCD5A8E62B2669674E3CDC9 +57CC36D6A3973A3710D79F0894932D4555702484339CC23A1B7288CC9EA46F3D +612125771AD4BBB05B103758C67FEED5D5F045BCC0AC408B08472C41EBC495B1 +05DDBBC7D784970BAA4A48DFEBBCF155DCCABE80E81E281822CA8CACBA58ABE6 +DF154189FB731D5182EB10B6C1A6D5250933CAFB2D617923CD5C3DB63BF9A4BB +175B5F4783AC666D1CED74EF145E767F01AB3D80483DB3A180EC4B8DDC1440D3 +6B176B57419369568B57BAA00E8EE1799A98DDED48E09423B817B233FA8F9530 +E97570FE725A136636E49F3397436FDC762C0837AF091FD302CD7DC2440151B4 +4CF03135C91B2CCFDE75D2CF834E45B944B22A6BF213839E96F1E34550FE1F93 +E93BAC489A8FC08BA99DCAB746DC16E215F9AD53C0FC4C8C7F220E13745F2296 +7EF5441D2B172653508BC86DE8E94619D33A51DF000618D0A8B8BE946434A72E +2C3C5B8CF1FB9C1DDF8844835D46FBFA0B3C45BB04D85E85650DBC73550AA3C5 +545C13219BDFE5D824F855D288F3EF9261C4D328A567E4F1F738698EA5FFE787 +387CA91D86A87329061F1A816375E5F5456738E49FC7A167F17F594D7E061053 +C80AB2B0CACB43E946F1D6FBD96D66BFD51FE8A4F9A979860749260D9FD56027 +A13CB1BF58151A09CA05655B54FDB196F800450DFD0B20B1857F95340EDC4171 +07B846D46D8F4209BD4D28ABFBA8A2D48670EAD9D31590F0B1ACA88177515494 +369C323C3FB95EE60E3A4117DC19D99FA9DE55AB6DBFCF9A8D8A35676AB731C0 +31C986C622336D6891B429E8E1CE0993EB580C254AFD7CDBA4ECEB4E55ABD3C9 +31C6BB8EDD2F1ACACDA87918CD99C3E28E733B4F058C991024DA275145EA9861 +E05DB59C6E6BA0177ADF45D2B82B402CDA46546996D516499E16827EBD492AE5 +5FC1B0D2EF6D85A925A1F944A5422F100725F4C75D3DAEA3FA3153816166C812 +DFC70ED798C8C31AFEF5906C4E670DEB1F7196857B93AB319CE62C4F4344209E +7E75A6E0263F8B6C4D537D22D47D98015DB6616B56BE9702B5C3116CDE88E42E +BFC6B27C709A6B9104FD20A452E38876793C34CBA110A5A96AF3A06149087ED3 +613790F48F0FD9AA5901DD508CD58CAB92CA9A71F8D8A89AE99DA8CDE7A466F8 +23A450BB524CA5AF7D1406F8740287F7E01F7F408B5122A36DFCA7E18A0F70FB +0DFCCD07D0EF1F8EA73E246B6DD73B3326991F40F77852E020AB366D9E129E24 +6BDC636BEB33577339D33AE3BA737B25CF6C699335173CD1750A3116BE541BED +D34292B2C996F215A33BAAB5C6E494EAC2E39903CB0A939FC76BCA004EF72927 +1B3E2922092752EA6C9250F8C3FF11780202C126A1B78B5A3A549C3FE2F8C087 +6D0E37264E00E9A3466754BC98FF45B478F943769E0632233C7EF859D18FE124 +0C85051E0670D705C6EF3EDA2CB4631B109311C2AAAC5816A12254FF417B749D +9B7CFBC5B9F2A922366A94B8695C4F616A27F16184FB60A80D6C0DA575A9BE99 +46B57D29B9AB35B9520416789831B0D712066987D3D28F23FE06905313A2D2B7 +BF10F098997808BEAE6B74865A45D3C82099216CA4A45930970CDAF7AE8445ED +A017F8D672F6D92C8EA6C5DC2389FC9F206E910C4FE2E0AB709C767431076CB5 +C1FC39BA356A210E0F914821907F123B2FA1EABC744E4B89EB952096EE045C00 +B2D220B301E7FDE29E5A55EAD0550D79E5E4E289E961211216EFED1EDE5455FF +D7766B317B33206CDF1E624B810A7016D6B3DA4AA53FFE9F9DC62E184D0F7EF6 +1CBD3D50A61FC07D91CED2E3715B962D46633328E4DA161E9B1FFDA051500AD5 +4C6245F6389992E51B91E9E7E2FEFF0D8A7BF68CE7AD485776C22A02FF6BDA14 +F56214F109B9AA5879BDBC1B043E06E82D12F09F09AFA5434EADE81002951E91 +FE31B49958A4DDDE739A231CBA8977817BAC0F45411C570A1441C93BB2327AD8 +4FBB3EA83BFF54FACABF774639C79BC9355BCF5FA8D36A033B339CEB8797B8A0 +46800B23E7687AF81400951627825E300A394A9E1DD2C08258D117C20A4BAA74 +06684A210F3A6A3BA6F0FE9810DD81F80D6A048E9C4DD30891AC9CDFCC4E2AEF +4FF9E423C8862DF5D6618C102D902E6C8247B497B490F31E4B4CDDA794E6ECB8 +78D61FF40484476A96131857648A506DD569EDC2C6E9FC9033E9F06930E0516C +7315A9E60F7378AA94A7F8906029166E0183790F63717BFE0AE27DA091F9D455 +32070F4526A22E921D41C247D10F0FEF3C945EF48A36DE9D31698D0739003C1D +8A04F3F21A095DBD46ED849083472F995403B63D6FFC407C82C2033C3EDC3911 +0B576D08EB7DCD82B4251EE886FC25B156CC7C4DD59F9E3380C8D066B92BB4E2 +F2FB8255B28286D05798EC34C792DC9703AB1342B97AD53D609F551BBD470750 +E5FF72B40F6BE56FF7D6E683FE3DF1C6FA05749426D6529E85736ABF68C93E28 +8B88B6D8A4846DFB334C94701220D52F068EF8BE935BD06B357E4FE1AC79819D +54D0AD91B53E239F022507EAE8ED96EF89BBAA1304C6DA975D7C7D826CC7AA12 +D092775B7716F9D7502791AB17084915B170B7C33B1EFE969C369C117F6015C2 +96181A2ACD802FD33D257BA1D02DF147D6D0B2EE72A5000FB4CD3D03E994BEDD +9AF4D7C5589A1ABBE772439B815AF6FC7A0C41BDA57B6A126FC4EE04F1ECF8F6 +3BB264A12CB2F9E3EB0A4F5236DC33B375D4F53FBFE22C28703329779F682B7A +8138A74A949807B907BC57B02B574692B4E5FF3A459319DA599AA5F0EEF9DF9E +9129E83B9857C6E24295C9E861A2162E22514AF3DA7346EFDE8BF3F770BD1246 +B9BF31B7F0A89F1C9077FEF49E693B565EA9FA9905C2C2FE3F7D879BDF57572D +5381D0CCBCBE05B8156C8D55A6625568BE3D2EC4EEECBDC98920D0BF25178F5A +948DA51DCA179C7DD444EA3F94170DF7F52C5BA6C2BDE18DA4D960D689845C62 +B6C197EAEC465757EE02E52637E3E43FD753BEFE8388FEDAD46835058A0943FB +13A2B382B1725C586F1B6FB31505F568E71314F44237C16A5635F8650EB36983 +4ADC522636D5B7FB6E1A57697EC6CF0406D6260E990513F82FB14334BE9DC2F9 +9C6687EE798662BF8DE93E70AC31BA02BFA9ADACBA9EDD72C3F2287991A25003 +9A6FA34E839DEB49A73B4C93E3C49F71BF00677A432BAD8844C046CE9BD4AC05 +5A43413BC60AA816393C401CAC6E13441E6706A1827EB6D1943E2A0BCEE1F1CC +8F6EF670F1511A102240147F1F067E4FFBB9FAEEC88BD41DBAA8F8DE600D7AD7 +C81F769BEF76B5ECC819400041C98218608971FCF86E050B3575AD28C03AECA5 +230B42E73C4342FA176D04942E2A4818F9A8B98982A73D803DEB0B5A98EBBBB7 +0F6A3A9576AE39BC6E98D5871F3AAD6C2752E56959371504847741E408072840 +243BEF3DD0132A9CAFF54A235344DD051860469773AA2DA7B9A5902E7B7239E5 +3BD878BD01359055FBC4D5BA3758BA0B2DCBC088F4C336870F347D53A502DA2D +7B0EBC7B396815CECCA181A83D58B5288307F73834DAF2EF24A48D0A3509CE93 +1435DAC75D33AD45284322350A04C5DDF9E903BC7861F075EF5582A3E2F9E7CB +984B6077E94FC56B022240F9757C34144785AB0227611BF204EE320D7BDF63CC +47FEC8B529E62AED421309C87348506C7688C161628CE45C538677F469C6352D +B3D8F62F47AD3AD7AD449ECE8A10F831F4BF1D2B577C381734E669134E561AF7 +E5F15C67DF0A4EA669C81A6AFF514C976049C0B45DA1AF6B1BC6625B9225596B +B3F51F7D7A89608F74CD86B93505A26B0E1256976F208BF9334D74E714E8F7D6 +5AB93C176D33E399F93F520426AAAA3C42704298B52F34C75CAF2D06357A29E7 +1B989E1D3716AC598199C8E1DBA03B8D18C9419A442B745A68D5F002B49BBBA9 +14A81AE724E46182215F61D066493B2B89E48FCDF8D590C69228CD12EB8848F2 +D28F4B6B17ECCC9B2C134CDC97F9C6EB02C17F4F8BABCB075560A29913DC97B8 +840DBA07B832A01384B92869CDED9E23B07E507096935A364CB6AE358802E768 +DC26898AC7335D3C36102F1CAF9D5AECAC77F88DCDC1708B2D2E9FB92A6217BA +7B6D599CDE73FEC9D0816914D705B36FC365FF544077CD2A00CB7FE5115A2EEF +7D9E87C8866F436A43B9C3CC68725D5883E3EBCDFFB3F4B9A476CB4DB222BAEF +4E34332B99BF94549B2C6617CF8CB2E4D90F172B4AA995908DCE151A4E37B7DC +E184DFBCFF5BB49D666F15666380404D0D080A4E8F30C5FBCCC7DF324142119A +8744AD777793781813135C8A84469FC5767EA03FE7151560E0F1E6446C0D3121 +965F6B09D1555176BEE33DCC36BCEBDA768F4DFA83181D23F6736496508827AA +1C91D4F7056E7E238D05F50C9F0982980353B002F7615D267B2A81C713665241 +40AD5ABF1EFAD9929DE587789D382F7C244B42280ADCCCD9782C72A06FD7DE53 +FD31DB6EFE80367AC7417E9F11B1F468190DBF9276698E291C45C6DD20D29EAE +F9AA8359DADAECC00FFE42F8EC0B2F4D50A5756097E8A916E7135F08B43DF400 +AD5D80381E696D906610BCA102AB81944B246EC0DD1C8FE103E5A6489F6E88 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMBX12 +%!PS-AdobeFont-1.0: CMBX12 003.002 +%%Title: CMBX12 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMBX12. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMBX12 known{/CMBX12 findfont dup/UniqueID known{dup +/UniqueID get 5000769 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMBX12 def +/FontBBox {-53 -251 1139 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMBX12.) readonly def +/FullName (CMBX12) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Bold) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 12 /fi put +dup 33 /exclam put +dup 38 /ampersand put +dup 39 /quoteright put +dup 40 /parenleft put +dup 41 /parenright put +dup 44 /comma put +dup 45 /hyphen put +dup 46 /period put +dup 47 /slash put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 53 /five put +dup 54 /six put +dup 55 /seven put +dup 56 /eight put +dup 57 /nine put +dup 63 /question put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 75 /K put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 81 /Q put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 86 /V put +dup 87 /W put +dup 88 /X put +dup 89 /Y put +dup 90 /Z put +dup 96 /quoteleft put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794D2D43A151FEE81296FBE +0CF37DF6A338C826464BA5198991445EC4BE80971DB687336AE8F74B516E333D +2D8AB74D362C559AAE6ACFAE49AEEF4F52E28C869222C1301D041E7A0BC1B608 +1BF728EF9E98F3A12EB2714E7F16B14E055FE1FA0EEFB058860ACADEDA9D0E4C +42E3C6F1E4869471BFAA3760175F3FBD842755A9D7847EBF605F18293B42F557 +FBE2715002669091BB033E1AAD657532F34F7C66E4F04D63ABB07E6CB9D9AEAE +78EDE8B79DD9BC87A1FF445EAA05B5572BB880E69F4DE1F82D7F0E9980AB0C18 +22C448B0B1722D3CC33C56FF287CECB80658B3AF5E7675BE82CEFF3DAD5942EE +A03C955FF979E41E54BCFB5316A9AB8945C403A73180D0961416EC9C92F49811 +4B91BC4C788392994587517718521E416D469F69952149FF7F9224377EBA1065 +4A727BF806A112A7B45B0A1BA1D5A23683960575368D9EAC8C04753BF7465AF7 +95F25C258C63E4FDFFD0B412FD381946AA38C0B961652BCEC30322C47BF4755D +9F91880688AF066E32FFB22E1A52DE741307AD3ED830D6BAA1D1F562919666DC +5E8FD9862AC8600B0AE0BC7FC779252AAC57248744ACC8A8AAFA836BCF09B0DF +9253DFBB1CB77EA8A59D42D1B18FF25E9AED72FA62FEC3F126F030F5D7DED9C3 +CF60FE890BA4A48E39E687BFFAEAB96AE542A6387F6624486037C8924002A511 +BEE5FBFD780AC1D4BEC3FBC47A930BAD0280D444259528B6C565DE11DE36BB65 +9BADC55C1EDA1A80458E98896D782DFB5C137897419602809F9BF8CA39F00C68 +EFB9E076FB324C2963F23CBFED28B9EF70EAA4E4B903225D1F199A7162AB239A +D92D71C18B1B682D04C6A48926275BCB16D413B2A0E953E1257E0B12D8B717CE +2EC84CFBC046A4338A69F454A469B12118E562B4F56C5FFB3CA5D357513E6FFE +947A564B229C7FD873057D5C7CDF03E958294A1003B37D8DF565A70A00A3734B +0138AE5277D383D10C2BD853EF806D3CCDC47739F0E374A3DF3B63638B949ED6 +4EC25869DC1C0B1F4DBDFFCC97382841D8F10F3635C792139A1EC462FDBA379C +BE0990CA2E70FE73137AFBBF30CA54954D7E7377CC50BDD780DDD4C7FDC77AD2 +F3EB1169F14A0041F18160F43C24FAF556DB5D621709FBC544CE55424F7446D4 +6AC07A51C8CD5161AB0AD5084A96FB35D77F1CA155147DEF8D7A590EA6939514 +D4A226588295CE0007BA8A550895511C8D80BBE5CDFB8A50D249C3BDCA974415 +F5557914A9B805782F399E4078DDB6264F1A49A9A5BA45E284A5196E9828EBA8 +481D357B8D9E6ECA631A6204439FDFACE7D7E6A2392726107CB7D2517CD19A24 +FBE592C119626DB221BBB635B6EB84845C16A9585282E34958B961F4A543AF9D +419B6A9105BF185FC767712D923437BE08A9C0EB92AB6792DBDC671029B6FCA6 +7F717FCE379C0F3B51C6CF042A762ED04898FBB4B0105C3C4ADDDC18C51BAA3B +70A93666669547081D9246732CFF74C83EE90DA17F5B4F8BAF47FE4D81590988 +2858C9B96071341FA0A0D23BDD4947FC9BC2297913CFBD4FD6CA4303AB3179AE +0203F1BD502065F90CE9BEA3B52DAFE4A29446082EA0E6B1D7AF1F31D0AD02CC +9A7FACE2CA86E5FE0F6A425B28A5940ECA306891CECDB3CFC7A5BBC76B5D9E8A +C754379ADE80B4D72CE493010317BF21A0CF4A0A55C1246218839DCA3F4D626D +1F4161D38F54AD5142C1CEE95C61D8BB10FAD4B772F4955777AFDE8AE5A837C2 +A2BBB11D0BF5DA2E63D0B75ED421DBA9C789B281B01846B65DC572BA69591969 +21265DB722AE86BD8CAA3D887C975A617ACEDDFB7AAB341F47532AC0F354A530 +7662C089DA3939588774FFA16FC4A52555DED6D6F51DE718BF5F345C23C90198 +17B77CB8B5D53A5CE7A79F3E286B6A59F3F6178AC8BF15C0A15C1A8A95D03B60 +30EBE53DE328CE085CD9A1D49C69AA299C5B58B24334A546F6E274C1B534DC8F +3289553F560C2F81E413ADB92FA0E7DD1C2F39D5FD268EBA97AB7335ECF28257 +96B4EADB7D0778706CB41C7E9C882760E7670936774A1088FFB2011115FDADB3 +B69EBD5108760762521C25C968C3E282DC3400001AC8FB1EA27FF643E3025950 +1D617BB8BB321281708E496277E11DD3AE0023DA9F25AD06B39C7CF527FED27B +57397E88D3DF70EE4FCCEFC8A0927D6B05517E571B3E70ECC99F3CBA32CCD4DE +B8BF22626B6C94FE65598A88AB90D238461EBD9A098DADEA4091AF1CDD7560EC +8E1B9BC2321686E1759E6B8A270C8CB4A254F7368039602EAEAB86ED21CDED91 +8F2DB9889F46981C494C7EAF5E819B91C129F0740B8002B510014985E5791F59 +B16879CC6521D8E9F1C4C1890AC85A78022BE614BEFF318AB2616F0C3F02405E +BB425D1555472A2642BA7686E431DC3FB8A1688B76660D9957C3FDE8D58109AC +21B1234C9DDF3F0FAF93BCF7B2F88A001F23162E1A13E5E9118D51B485B70A91 +D0CBC39CF44413FD8686D9030782DAB58064F5B987E0402AF5B264B17BD31BD4 +FDF63951BECD73ACA6138854EF35B062D01F33073850D9C09A818828C581241F +A625AB3638081DD0F00F946BE5450D38489CECEA4E66B4D85CC8AE0157E2AEE4 +A22A9313829F24D573101D84CC1784D1CED7DFAD5DD966601370C6CCBB723082 +A86BBAF0A5D867D0D2E3CA16E14E5109A29EF02649C47E12E88B3B397D65CACA +DEB9940B92100744D686066F8250FF30E5F13D81428EE238A2E4E07ACE0F5C38 +7D79D4A336D0D26AF9C2B84088ED8ECDF94A1E3FADB45AFDAB46CAD6FF950B0F +07AA2CDF82374DA76C56D29C80138841EB13F0D02ADD32F88B23E282ECC845F9 +BB9AAECE9CDC644AC2D49577A92307A83A99434F6493156DF25DBF0FCF2EC21E +8C50A312C3D19E0609C0038554CF4FEF3ACEB7A833FD54B06EF0D617C2971C89 +E4C06075B09B84A4F78A82152B9A9C540B1D881313C2C74F20ED064A9606EC2C +B56D7BB4797F1EEF4A9B13579CCF311FA4A4DFA62D80FDB7F535CC6526D1AAE5 +45C008EAF024B48C377522F74D939A475970533E645B1BFA81997549AFF26F67 +2AAE6C2EFA357DB3B525276EF330905688777057F4E4CBF584520A534A8587E5 +5A8360891E75A15205E8ADAC4A4E5A6E27D0C4A7D492216E4BC023AB027F37AF +A8DC7579BA50204D5F45A51460C5BD8A5A7F87668CA6451137F2F59E117BBE28 +5C40820882A5546FA76F0CF49F8A6EC445F0647CC3227C400F56E7E9B84A6975 +E85E243CC1666DBAFF4E07EEAF3AF71BDACB30DAEA792F2B8504CAB071544F01 +5D66243D529C479D276FE22F7E275D9E7FA9C6EECA18716B2F213916E32C1D94 +6E32397B41AC6779543218E506569E3544803BBF9B404A983EBA62A494187B30 +8D3DFA4E1237A2E5E08224A60492C09ADAD8775B7CDB830520829BA164209ACB +BCDEB2D574CEBFB7AE4BE72DF4EB1945FEF2458761AD8DCC0D378AEB7DA002C6 +9C14A665DAAA532B0ABA98D7BFB5A6151FF6703385AF7AE8FD315A492FCCDBCB +B825707F9566B3B4943A3C61C3DEFDC31A843A2D67AB06891F3E110DD8C73D3B +B5E4151B51D9F13905D7D94DB9ABBFCAF35F43B6EEE256B1A80ED6D1739D8D5E +8C767F6F0E8704C5345D028A2A6DAFD9BB7AA048B8B895FE9423A7ACE858BADD +595CB074A128DAFE08FDFFD6BDAC0114159A702FDCBF8013804B0CAEAD7AF38E +FAF086A3248AD4FCA1401A85AE2F72E3E6956DC0996FE8ADB18F89B14A208A15 +13F81AF73D0DB72F78C4DA634ADE3C73756CAE6AF2E149C26316DFD93370BE1A +FB4A79F77A67C07CB0A53C78367F21661D4AFE9E27328E077B522B50FD9AE2E3 +DA087BE481515B5DD7BF894A96A84A6C78874100505B7DDE1D22EFCE8D58B3AB +313AB5495F72E2CA4E6AE22C0CB854302B9990372F1661D9F0A517F90686F248 +C5643008B3D29F7296E5C8FD4049886662EFDD4106E17C879F5D41CE84F87E89 +F6A3117C968B95A35940CC29C43E1E0DEF51C1E46B676301F40D59615C3F73DD +DE37B72FF7105DB84227DA5241583272AB1C3CD97AE11C1EE98FFDB5E5F44844 +8FC41BEA5C54B26341AFF6830D9D0A5A2901B0653D8BD0746838194D240FF753 +E99750D3383373F453723D86BE97B571B8B84D8696089B5CFDD53E6C562A2197 +A8C4FB0CC690C27761A816B441029D3D306245052E0C41B53025D8CB7267CFE3 +C17FDFE348E765326F91AEB700CC49162DF748171214252CBC821493DD01AA20 +417D66DF47EBEFFF3E9BB2B0A2BE7D9B8C68BD570FC2EB0FA54CECC318F04C43 +19598BDE93F2F13DC7847354C99059AB20593EE51E94F9D4E9241869D605AAF4 +9D9B5FD88C3798A039A67993C5EC68B6326B132E647F67EACCA7F7AE7F718D85 +12666E90D7C73EF210E344964A38228B236679A2B18F5E081234CAA2458F8D83 +3F0CA308D19663CB12EB904076EF88E556407C33C9380A6A3D68A9EFE65387C1 +A1BCD2D26DFD2AC0881EC30E81C0A4E76C244A2BD822EE88C4A60B480D107E68 +90E419A1F512E865BA922A7830909BC2611A80931CB2E9344529586726614D94 +3AC5200FB9FF68AD9686506C5EFA8788C0AD0251AFE7F95E84683380CDB421C5 +B1A783B6D5F3A6BD1BC1C14B363DB01C87C0796DCDD5BECF41A1A9F43183CF6B +82C2AE49F0BFDC5DEF7729F2E638EE6EA9E4D059EB9BB1B992AD8C82D501A550 +1BF73CBBFE740179B54E193E84A55DCD61B343C1852780FFB44248FC9426AC94 +AA2B3FE20FBA30F6C4D1E0FF3EDCDD8C0F57CCB50CDB0EFE2E04A8927E239C1D +9B026C7929BB48461D4D695FFC766C8A0E545B1BCC2AA068D1865333108E7985 +2D93F9B00EA0A90939D0D3840D59B6CC0CE2C147B2E1A9A4F14270FE3ACF51D5 +99F7349106165AD627CBBB0ABA01ECC6D3A14C1DC1ED23A9DB9865BB4396C51A +31ECD001EAC94B33C34E29C5611148EF3E55DD61813470B8F3CE32564C749414 +3C93C77EA5A3538A0B5AE3FC4DA32813B06772E0E48E25BB39F3F6FDCC077E86 +F86FA50E18FD19EB2F37311CE87F18F3BC85CE7FD71CA92D5C3264E34E04A2E5 +70C79D99F54D6C6D9D527AE45EBB48411221134587D2253E7C8ED7658EDCA34E +5E768DD14E0200470F73C44D006CE8CB35DE1CA3EC10ADC668B0662A7774C891 +84EC95A31DD872F0728D9F65CA80940080E04630BE4DEC77A2C49E3913C39978 +BF145F8832AF2C4385EBCDB15F9D32C22CBA0CF950877717D6F1591D7C0B8047 +8C9BFCB16AF7124ED83137695F3D69228DB633053208C29E0ABA1B06A7FB3EE7 +5625CB44927E2DA6E038A6E62DEBDA2D96A03177982D8FA33BAAF4426E05F4B7 +9C1748B3FF7691F9888E7FF864A10B9DF761A41E6B5CFAD2BDD7E1C4924AC97B +F4B352705316DD1A58637CC12D71C18A5CA691AB2AA8F171590EC24582B1123E +94D4DC587D8F99E18A711776BF4013C96446BFECFEE4C809EA94B169088024DE +0CBD20199A915AA406F0BD5F3D63D1467C49B4691AEBBB35ED6624F2D7BB74BC +E80FD92B9FD04DD9C2BE9B6FD29EC7EC07FAB447511C61DD299C783BC09AE2A4 +7B3CBCA6A20C6631D06D0B2E2482A50612BB7C29B7E7D0A205EB0E8436702581 +596BC996ABD58CD8D5BAAE4B1478195CAFF98FE0141287296C4EFB8D2E7A8442 +F0A3AA9F9264329982532295A176BA1867EF732BBAC49AF485D9D0F7130F617E +7F7DEEF935874D55A22240F8EDE4F247D5F73481373A392D40A8076BD91079E1 +1CE5998BA13D48D56B49A92B4A18430E316405D2E2E391B496A1934671FF1785 +AF42BA3B2D14B8E04014437FD194455C50289DFBA61B5C377BCBDADA48E82DEE +4E70EF5E9DC03064907BCB8BE4D59DE069FB0C0CB140DA54708E630767313F9F +744594AD8A499CFEF733E640A11FD74E46A749F9C7D18D49251BF85C6EB4668D +67598C31A8F90922FEAEAD4B83B6E7184567DC798E4BA1C4C9B3461A478D63CA +054F13B502DACB674EB49D6BB935E5EC82BF99FDA7D47C581AD7F940DF4FC6FA +6C6D25D647033AC69505F0CAC58DE99087F365531A6283CB89CB644688963C3B +8B2203A94294E58739EF23C7803630A1F9121D62BE1977DE2F41687C8CAF87FE +CBD7AD3B98E0D95C8C6E1A7CCB0E09465AA874DC90A0F5DB2C5E7C130297FD39 +EFE63B0350B5139D09E6864D22C3F1150B29196E40EEF9723E71158B7ECFB8E4 +C426FEDCD439420B7F1C251FADA347C9A2C49738B5A17922E1EA93CA7B125B76 +57449EAA9C1D591CAD327D0E98EF2D44D614EE9ED49DD31ACAC0B956620B6BA5 +5BF6D08CA7541059D5ED2EF00AE2EE95488F5645BF6837D9241C0D3959B7580F +C9ECB2BCF3E65C07D52EC9CFB21C11CD4C883E44C173214C900C44D2E1E43DD1 +CE8DFE3DA93C38B548BC4EC46FF91F30CFB97525E1FD4E77686433B20BABF8D2 +848C1CDF1BCF185CFD7A81D2D4BB826E837E2AF35CFC4F419F698DB0C43E9F9C +B0FB628AC9A3CBE9B1FF4A067016E70333E78B32AB2D89C483834B31F5808FDB +77492E099F1504DABCA5722C7860CDCEDB2DDEB512FFCC7D287F4945FD711F28 +87BC3D36173566B81FC2C1290C717A09697DAC6072408E20926D39270121CE58 +3EF97CE12EDD7F87F2C8CFE36C3C0400869C0D813B71C425343EE0CDF717BDD8 +409D5297D0F8F7FDEB0257C0A391F5635E0DB1116058942FF3E7C94D5F2873A7 +A3B0ADAFC3835AF2BE474E6741319BC6695FB37F59AEE388F81F6E66F910000B +72E6BA7531B4378CEFEEDC79CCF4947BA1703823B5AB4F4AD73D9615C66C489D +99D68E49C9BF765B7FC547BAB9640D51D5A7A2396507AB5A4DFF3D14F52422CD +8FCFEAA06A56C6C7FFCD29C9A7A59DDD2A909A9363FE5F1E9629616D25ED38CB +E754C059E4379318CC491C3B1A90128693AC53F80F8210FAEA7EE638902A7D3C +82B95B3F5AE340EC1B648DBB9FB679D6E80B7F426D8671FE7136D97F51E2D2F3 +C9CE9183E4061CA40091A2A70DBB9ECBB19CE3F65ADD0FB346B54BAB182E2CD0 +EAF4C0F402C25573FB344EA771B297BEB615FCD0595172E84ED2A62FF8962634 +23C19076C2A9ECEED5135994EB397303A9619C76DC55E032DA83FBA441BD484A +59F70A5110A8927F6239A14D4E223E189A5462E4A92EAEFFA4B961A2A32B320F +C2B4E8C1821FA67A655B5042C15E4DE1FB3652B55078DB123573C4E986B19DB0 +1C5131F3DFAB271C30A5476B4A19D8FC922E31879C34BAED94C07A4841B8209C +403369FB8E842610D1EB4662B6171A4465FD0E819964F62EC5B0ADC92F08CF90 +1DE0B410FFBAD16F6D355E8AD72CCF67961EDB6CDA82398021007C2D0462E893 +75EB0710AE4A6CDD15077C9DEFC5774EF4A657734D703CE42174259B58E5277E +0DF26BF59AF8D1A3E7DC12E3C12AA4B67CF35B19962F6950C2020B698D971B35 +82FF84E72F72FBB0C54A112BADBAE6C4CAA358BDE6A705AB59332C3850CA3D25 +C7564499BC1319121CE0D93218210C68080AFF33420E3CB3A48BF9EB66BC07C8 +A79D8CD8E78C200FF7CFA3DAED0B9E87E6141C88B436D8FCBA50AC195FCBB9BC +9512B95FE3A37FFAAB39850FCEBD4D50A243EA416E73F53B4B00F3B6EAE0CA06 +0693AFFF8191C1AD2A5129C8A8DDDD492F8EC8B7B93CCD6D4F240785E515C128 +D7AC38F14C1FF204DB89A8805F8D737644DED6E8EC6A58365DFAC56200AA22A9 +8F20DE1C232DE4E818CB9D2D3330ADFD72C1B5146849142B447900FDB1DA01E5 +C1BD63FB69472D782C659F7862671FEDEEAED3617266DBD34AC593EF6F483D5D +AE56A502F9E66041D58C14FD6E83DEDA7DBA041726D78EFCF51152DE72B51F2B +B65060004FC8F67755EBA2F10A2D3E496FA3BC3B664ED03F496AC074B7425C21 +18FE971025F8553EDFEFBDA53A475B36DBAB73D08985749FD3B0F0C32108EF87 +BE0C8DA94598691F774407E4D36D336BC9883D0FBB46C8D8F786780BC5EACB9A +0875E368521C0D91FEFF40A3E10837B4D590E004A9E766ED62BB3DD2E2AF78CC +29F6C250577DF1B0AD91FFC3E1EA731CF4249F91143B7224DC344849D03139B1 +D53B4AD7FF13D2A79C2C38E0D09590B499936C87E9D0D71B2B06D74B7A1D388B +5A56C9FF8C4D4EC2F469549C5E2F62303BFFAC463C9C30FF7F2B77E7671C5CDF +EE067A2E64F5A763104D3EA3320E15C45999E0A4D002EE072875ADAC6F228DFE +893664E7C2CCD757F6DFB1ACAA9F5922492B573B6536B34F3B931B8C1C761E00 +BDEF6A0D88FB24D30FF643DE610795E1730133715D14FDCA813C62188C66D7D1 +2CE172CFC1203106790E648D9A19213A88589F54603BE7A45DD5AFD1BECB8C59 +A9F476D3D6856884E41B17FB36AA81CB3DE0F664F06B5C8BC3FD00F170165DF4 +889A551DAF6B144FCB5EC9D9A64C261A7BFFB3FF437B2C44E06EC1D1D83451AB +97BBD3AD1A2D1032BD4E945842F0C8A23866E08FF7DEC3675C07595EC2307447 +3CE67B718147E3D776CDFF0685A731C4F0BCA79545E43068CFCC09A82A5DCC8C +606574A06D7DF8359C48409FE7BE5CDE96693BF7C2E3D4639862BD3612E066A1 +E7DD5995A6B5C278DEB8830481EE006A0665E152198978ABC35805453F047D07 +92C26F6FDF1F85F53D93DAD407E6922EF30EEDB860B0642CF93AB926A88E0DEE +32A737D1F5311C9B7F833F9310591F1D0BE6149EB5190C11C8C18EC06274F938 +2A42C2B1799BBD8BDEFC45D98E7FD1C2FFC3FD255266851B3C7A63D84F3752AD +82EDC93D2948E49073D227D198734273D128A0A12BCDAA91E5D01A29B1A8D781 +0B988527AB0B508E4B963CE88D309892E2A9BF3A7EAD6F472F3E04724D4D4A96 +D2B4EE4E911A99CB73FC1DACCD3EE4FEB966FD2AAE3538690347F14E3CD1DE70 +9D1EB5183C7697095D418BE45D54B489B2686E18AC326796E14811F41A5708EC +D8511EEBB544D2DF73EDD7A2C9989A646D961D8D8F8BF1158FB64C7D1E28698C +37F1DF9AECE840DF37763F27E05141AC2B359264B3C107C6677050F68ED9EF82 +11DC13E6CDDF53EB762A2C21C4799DE276E420EF5DAAC04626D85E894880D414 +36478626DABAA37B10794497E8BBCDCB8DB86B41E52E9A02A13D622A41795775 +E1735F63CC8A90417E3144934862FE464F9893EAF4F152A1AC9CD3FF21ACE679 +40D0D4DA919145891A43C4DDAF1BC40FF88BD64EAC162007871C9FEEC8CE3ADA +CDE7A2870D65D3FAE3A7BF4376DDD98B027151AE330E3A04913E0D54A10959E1 +0354C64D0E7BCCB5F3594C437FD71C54056951441E332124ACE8F97AE3B06514 +EDB7C61B1A737F63FBFDBA7CBAEEA27A135C581B0E7F8996E75DD02A4A21AD2D +E746F12B7AC864DC740B5E92F7538732653FEFDFA7EC1E405D0FBEAD3264B373 +07E3F79ED28CDC17F37288ADAB10502675D4BA86A30E8457BBB45C5F3BEFC2E1 +EEF278E4D2E90BD650E73C2E078239B82B0CD5015DB0864747B5B3B3CC9CE515 +2D8122E87B1848A5C598FCBC89713814A7E38DB260F7FFB7A1045AB4E2154F71 +06366E2AA8AF61AF86EB140D8E2AF1D7550E5E7E67A42CB2FD1D4BE8A989267C +82A70DE3B8E5973DCA059064A56620BFCDD7F0C539C300FF0DB1E036E1A5466B +0CE24780821FA175999099EBDD6CC0823F052125FAFE0A6D131667F66B1EEDD7 +8A6E349CD2AA41AE4913210B39E63B8F5585E9C4C3AD0ADCEA673E5CF58161D2 +0BCB9CD67645EDD9D47D13303B126C82D1AD76B6EF34BF0D80EB14BCCD018735 +7742ED45D0849802032470BE69D0F29638855AD86ACDF9CF496B77EC71C98023 +494DCF8386390113BF944E378AA844309608A343F99A6B8EB324DAFE5B40BD46 +259290CCB55FDDFE03FDE645AA75AF70CE2B2D17346648FF5E2A0779F90744F3 +2B4C6E63E259AB8ACC8CA228AC024DFC6EDE5910FAD1161218CC2A26FBCE02ED +7114800131BFF1A471EDB6F75033EE982392B99862BB480865E119F9DC25B953 +676A4151DF7D5DB5AD77538460C62A894F08BC6D1CB491775DA0C7DAE67A2147 +2E695EFFD20A986768B0FEB519FB45AB4C9646FC12B7C24AC6420B720F705AD2 +FADF1CF61F699B6F877D5176D5A1ACD2DA07D8883593BAD8E11BDD892C31876A +1CFCE58D61061811714EEA4E1B297D1257B5DFC014FFAF290EC9F364311E8A4A +1CF70133065F98877948CA4CF92F1B6D651D3A3040DB261F700107EFD73E6696 +015389B08ADF2AF810E246BF84DBEBA67912F19EB02D56444D5AC54BD915405F +D1CA86A8D4E5BC9E80C98F52EFA769492DB35C8714F406CE705620C7A925D8DE +CD301EA6A0808C7578BD698FEEF34B659C870C16515C038A2A12F37ED374A506 +ADEBC4A5181DC9A7E353E233A79CF4DD98959D3058ED2F142968F0F754CB5804 +D3F5A480F1201026ECF1B65EA15F251292AC42D07617712643BB25BE7361AFCB +D6AF1346A63DBEC81AC30DD75D784A398C8A23432FA3B3FB9F453D4BCA6D0250 +8A7D76651D69F9C671B992634E15CCDD0B94E4B7898B1F1BF60F028DF27DB79E +18FE369A12ECB949FC1CB579F49978F1EEFDC575B41DE40FC80F89133283EAE7 +77D7E2BDC78240C2F13634FA7B629A2F4F08C464D175A1B13A0EA5EAFD6709DB +0589B5E0FCC791151DFB2B93568B2926D3012A5611D8BD2731B7E0A7B9F59E6A +4F34699AC9A81E865FBB09B460D0E68AEB62C049DA1275A0CB159752899BBE1B +9DA90164653F5BFC6AA899ABF74000377916DE5CB881D56F270E8C77059DD8A0 +AA459026D0162CEC5726F18C8DBF50E392BE5040709888251882CD643CEF6592 +CBD4A2507F2ABF43E472447814AA0CEB7BBB79DD7948DAE1D2D2BBF0F564A14A +724DCF78BF69F1569D5F26CCDF86B0545F9FED95FEA745BC8B5CCCB776DA6A1D +99CBFD6AD6BF7783AF1593A0CE325548A5A1BCA7BF08AA50FE72BC49D3A42CA8 +98DFE4666C91E47881E5802FBF22B9A518D132087207CE2AB116C5F0880B7713 +21231D5BAD399D6D1E0A128BBB5CD640FD7341A722ABD437914FFBFA90F34E60 +A8653C4669A8E6ED8CED960803ED32422558C79AE9D8C29B6FA68C8BB79C79DA +4B55BB7BE4E60C033CB0B5312170FE24004C1A60E9C09F561C107F4A6DC6ED32 +3FA525F10FA64BA967D9CD570744BA71CB37C2FC688DA603E70B9CE5717269C6 +26B6F70B9E3458202B6D53F5DE9D270C09A6B0BAB006BB77484674BC19A7E28D +7EE1CD477A89DC4D9AF4EC4E97F0B2C1A138F60E2C26E882D4FF6143BBF824F9 +DA8A8B8B5C461CEB83B15320D61E444A5B5F1559BE1D0C203EC7922346901C2A +3F2773824B7D3E0F5A7FFCC8ACAAC4DA47E47B38BECF963777EC093FF816B7F7 +D4E55F987DE03D69076D754736AB04558237FAB836C5CD42F5EFBD75C29479C7 +67FA9B03C1817130BF95EEDEFEEC39D8A3D2FCD470EA9A399D3046E4C37032B1 +AA722959C7EE34D6BCB3301CA9B795626F80790F7BC4FA803A0C93AF4C51A40E +B1C2AB064AAE20735A284247FCAB1A9DF196EAADA25601057E2D283C3A24A8A0 +B8C4A10F24623B7E96A8F125D328A790BCA086CDFF4A1499B507364D86A8283D +D794F16D4DC55C08068E9C1F53D560F0F72592D571ADA44C012FE3F480E646FB +EDB1F0D2C42CABC8BC5F9DB66A4680A741AB652DC11CC65D8506436DC3B2DC70 +ED408388621938E8047F4E0F35C1A75925C487E6B84F925F81FDA16055A0A883 +44F025D04C907023603D440D1EBA08BFD8BC7F2661AC6E397A75F4317DFF336A +93619D1D26DBF7032ABE5D26CD95F7025AA968FE67D54FB39388E49DDA07C6F3 +6239EAE5448E87EF2F4E18383309FDEF46018DA8602DD74B1C15DE210C10BE36 +9A0717FA02FB9DE0A39976987498B30D19EED5DB031ADD2D341617D276C5C840 +33D1DE8C093F46183665579513A5947BCD6AA712A70A118E59FECE45A486E8C9 +44CFCA95A1D12A54075170538EDECD9D335E8561D273D97922501D58FB070294 +B5158F3BF400049DFF30181D0C4EE55C31AC3820DA0ED3B8797D782127F95E28 +146FD2070C0EAFD170BE3DF83A7A366C50BA54C1F25443DD241FFD299307AB61 +9CB4188CE6B4F01F427485DD5FD5CB52DEC2AAAE364CAFF2EEC54D8A389F179A +2837EA5471B4C6FDA07EE5991E5EE77CCF044DA226D8CDD60A758532E17DAC7E +B594D8AB95DD5CC437500CAFC02A6FE90C2E836AC1070DD9AFA18D1F97DD2523 +64F16B8D30458CAD76873A8EE2DF8EBCC31B91EC1C8033BCCD624B4426EF1575 +55E485509F27C1FA5D20C9C7D68793B013481B8D0BABD90CD5812E6D25E19227 +58BE9C3462612FF2D63B85B4FB4402840E6F82C9B8195E649FB0575B289F043B +8B77501858195F376A74FDFEDB5B84730AC9B3A9E51F448D4E502B593104BB01 +F86678BA8C57DD7CF8A3881229D2ADB7FE87ED14B0E2890EEF4970846A8DC9AA +18FB9C4118F0BAD64B00B6B4CC33B96BC2EE3C8D8238ED3FE63EE98EF579F575 +C3D043E88706F02F74B4A49493C40392EA239F0DAE231AA144B33E2D681410F0 +4BFE691801AC48BBC8691FF4D8B64E747B4C6EE014C4A4193148B91D0DB1A4FD +79CCD3870338BA216737439EF9DF46167FA7BA73731580A82A98A20F94363E76 +A5EC5F4FDA6C53ABABC8C471ED3C35FEB8E33C40BFF82205BFDCF80180EE6DC7 +1CC3318349073DEA28DAF06D50A58E62EFEFA920967BEE38EC686D908FB1EB9A +A0FE7B183081D31DAFB64B4EE328964401A5F51CFBD45B75E13CBFE48D68ADCF +693B6E77F76D49E57EB690A61B8906CE8283F8C03D1D8B5EAE74AD91F1BEECA7 +22DB6A4BB56C1C8DB14D050EE0A9CC51BDDD01D4AB1AB2F73DB06ECB7B5D7D1C +59E7CC3173DE2FD707B9ED9C08419B4B19F3D15F6C72ACA4FDCACCCCEEB36E00 +386E48B088AEAE3F5B06F433CC3B9BEA425AEB7D999A2831C2918F65D93C8C6B +B0B74F2618A713A3D1904B3588AFA8C22B03C7D5322B9D22A0974CD71EA76499 +66D71A9F77D78F92D20851C244E7BDB33B64FD1B9D0C039078B6398BEE615C9B +2DEFDE4FA33952E9124C7FDCD03E65D29C987C89CB18770CFE33D954ABD40351 +4BD5AC8913B26A9779891217E396C11A1E01F6068DFA6F44BA53F4DDE9522D64 +BA41C2A2CF93AA67D616B93062E6D28D7DC40CEB6B7A89C02597FB343CA2B2C6 +4D9BC7507409E04772445358B54012CA4237C660297D142D4900CE95DC94E8A1 +86D80D8B6B85928E93F57926DA47106C9B4ACA822CD15D2ED1D90EC7A954BD9F +410AE34670504ACED29CE013D1638B6E0E3C393C3463E49DCD2F745CC17AF865 +71CF4687F70E7BF56F8AD2D29AC73F61D37E8102B7F122C0602FF48E2974A931 +ECB75D056DCFADD0594E06904FF1CDC5C944756DF651D83139B1147E8CD2B2C2 +A536FCAE2F37589A15C2C21A0716F90C92B140370DEFF1742015F9B9EE1F1EC1 +CD491EB6C9898CF96894453D61D2642CDB6B5639087DA35F4D40B8E4F7AC27E3 +D57DBD28962989CCACA2D727F48FD2D41DEFC7E9CA3C4DEE3B9C837B040DBE95 +8410B8F83BB55A818FBEED479BFC7D3E50BFE54FE57A855C4B1522EE827FCFA2 +ADFDAC521DE52BAAFFBE5672174790B8924BE188F9D862840DCA8031FD7B1B19 +1706B8A4927F2F2C7CAD88B29D2E65401F6552AB89D458DFC844D694F4383C57 +01AC437C3BFFC0050B3DB5D47E7E94D7B448551E3E1B1A60D9C5DE254BC26085 +19641215539EED6682138AE46BB635E18A1744EC662E976897DF72BABCE68DAC +47BA710027B642E42032984302EB1804F20D46B20F6382F66B23906D38FE78EE +1A985B58093352097A1E1635E73909A8493A16D1C0751DCCB0304E7922430B49 +7FA7729F527E7EF4DA1879CA920E720A5F462BDC22C8DC5FE3E463E35E86FA41 +848E009DD76F249747E2B963BB4C2FBFEBD208D0E9FEFC8FF7B91AB9C9DE1FEF +E511C85D8B794EF9FE03CDD2DFDB6F8A6B65FE3A5783D8ABFA2150F3FC9E20FE +B24DAF767F6529C49AE81C0DE7687EA08B7693B646A290FF27877BCCD13A3F7E +A61DFC1C0B11BE2DBB0FC4448C6811B5D92E4DA2F6363E2ABE6B08C189FFE74A +35E9DD6F7F215F65CC0400923C10BE696757F179606FD528165877079244B754 +EB22ADC684F2F6370AE1BB50042C71DCB9BF36948A5A08C64807ABE73FFD24E9 +6BBCC2E1CCDFD0C5DC915A754128EBD432F2D8F9818C181144EFD3217620DA55 +B484D0F3D1206B2A8AEE513A374A01659B1D8E56125D2C4370BA8414DB87E7CF +7AA30EEEFA43118A7652A2AD83E94D71840392EB75A5832C04A895770FC9E967 +7B98530E842C023E289FA396888052BF816B2652F13FDB77C03E9F606581EE20 +7A69D18623008DEF5560596885A0824F9E136C3152458EBE6F99BE7B40A522B9 +4E261C73FE921253460FF3D1C42EA040C5C0B6F6ACC1E8753B7E4694F0E30E38 +80C5864814C7E47F7601E09BC84BC148428F963F731EE927B6E1D9F9F01FA1FC +43DF9A0143E2EC57DBD6998C83993DB0A7C0B4173C5D65D2424C07B94E0227E4 +AD9DF96B930DD7757271B376AD5FE37EE31510CDE992E890F1FC78B7432CAA32 +775E10472ED267FC838B559DB03A3434705C52CB54013F9327A5633D7155EC61 +C4CB4903AE749D807C2C06DB959005024A58296D811D178707B0F334FC8397F9 +7A0B08F37C0D8D1FE0893CF6F67FDA177E81065FC0E9E65ADA6D42049469F06F +C653050F2E3405E46B2871B1094017CABB6B434079CD284554D0E2E0AFD30250 +102CF7EA153DAF872A53032C385303FC7DE433AE4D24D6F686B0FA5AC3BB2BDD +047374694DE5A362E96B59038BCF515CE71331D7A35B9166BC3D4C74ED1A7A76 +6020A3D0FA733BA61E068E0570AE7F7F45E4B1F7A45BE99D88E07D0E806CB7D1 +3B816FF7DF36BC14A4DE16BE30FDF83BFD438BE9D3B5B54597916454EF758EF6 +249984D62754ECEA96A17FEF4A0CD2AE4958909737579D6A775F48EDBFD418DB +DF948918C3A90378349C491082B975BA40A3CEFE71567B4AE8D1BB5068925312 +FAA5CE3AEF7B405703D418D5D189E29A1073791826535FED529CF64D4C49F73A +2EAA4A88EA27E0BC3507CC289FBC9C00C8A001F7FABFE565F3CC71110504338E +274D6F121652D139D813E3CD473C7988923951A6C8207C47DF996999F9FC9194 +95BB2ABCD743951245938534B36B644BF29F117F5C7BB7F7C0954BEA05563516 +7E0AE1B9E6991357DA0EE7BD51AC6E772718DB43B39671EB672D9D4D94AA3379 +146F9B0719DB0F1EC98D7244ADC71E4E513F440295A85991878683FA193B0129 +984C2A6C3978E025270594DB448F0686FEBFEF9AD64F16B93583F09E65A8E995 +05DA3980A733BDC7CECA95AAF98B6DF10D6BE094555DDE6BE55992DF8AF6D105 +99FCA4DC709354B9C9D2533EC1E1AA1248F309C91D15F606DC53C2F53319350B +7587411FAB8A0EDC2415DD190AC5536244E41F5245B5E5167D55B514E05AA8D4 +D6863FA30CCD8F8EE4A51E2A23CE37BAE08EC95DED642A56BCDA283A930D6D75 +12BBBBBD1EB184C3D98CADF1E924E67CFB2E9A77BD2E00821F8DCF5D12F4ADE4 +BD13F91E13CE5E7F7316512A57731ABF30ED4281C5072765D84E2F3A46E4E10C +4F7A9C298DE9EBD700645B8031785301FDCC4A8323BA1EF11FE979DCB815A960 +EDA4BF85C02C6CA6EAED5DA56194000CB323C8B410BD1EF3DCAB934E830007C0 +166B2121ED6639F927F7EDBA48813D605C76C41836BD120742F9F204197622DC +7F1D61A2D7F47758348DCD460E3E6FCE3F81DB21EF498FCE3B874B1D8707BC2C +95445D4AB29B3AF7C23157CFCBE00688B8650304FC2A6F6730D54CDFDA797B3B +710297C5039A4FE7CC2CDD6F1A695D5251F6CD371436BE01A9C8E5D2F37570D2 +8EAFF212D75F3524A80CA384F6ACE423148A019691EEDD21125EDFB9FE05FD54 +7B614070AC1681762F9F84C82D2BC76283C5836E80C844ADFACC90606582BA81 +3D91AE4F8372020FDEF361B674A588C9D2F0854BFCD985DFD1527EB54BC4AB36 +B9D3CFD9B1D30B170F850B587C64C45CABB4C4FC816D293BB6EBA068246F367E +8883E41CA44AE55AA48126046203638AC9C178360A1CEE26CFDFA0C1CE6A9E5A +9B2A6B3BD88DF8735806C1EDE45D52A0CB110A027F4A5BA45D741B89F4A98B7E +E314F3CBFAB61532DB817476169CA1F883864A3BD99F705FB63FBE643C185260 +77A53C567D14424D984F21226226B8102C751A7FEB05E3E7120F46A73E603224 +71CFE1432CB337B69D2180815348FDF14A2B3758BB1F5ED44B5BBF262478EB1E +06BC8ED967EB122C4465DC42E9FF04A360905CDCD702337A1F67775F17D4C76B +06D922AEA2117FECA4B208556EDE98EF55A562A79AE85E143EA087214EE43AAE +63F7C1E1C0E3ACA7327ABFDC224ADE4249CD4F6DD29CFE584C90E945153395AB +DC9BC59E692BF1FB1A5ECD924E092795C795CEEA8C2D325276E80A7DA6F2E5C1 +FD00CCB0220351ABCFD30D648BF30029914EF8A228551482F3DAAF2CC231D14A +A595DFFD62EC0511CF8DFD40FA3117AA650316B1A74ED6C9F3FDC1C542AD9363 +042701069A7BCD56FD354774418CBFDD70E10D7AFF01978EC3DEAD020C81FF45 +D9FF64C0A8959C2D66D9A2417DA8C13EEBEBA6BAB5711D0378A2142809127EFC +58F5F1D0270FBF7329AE923A63BD777DF591721CA4FB9CEE88A1D2305E3AAFA1 +FB979F2E065911230A17DA47304FCE167427A979A9EF25D5E3D6FBF6B752DFDD +39EB6B5D36DF372012A5FEC444F39AA0E50D8D65D832D84FB8FA08B76B5F9BB2 +B064EDC0485F274C418A3C7DF5B1EDCAAA36597EA69161FC4B62D766B257DB2E +8B54496A9C93D58940D845AF4A4C940BC7942373DC934839256E6EDECD810752 +A4B37563BF65380BC0EE38A14FB447F71ED3F9E632EF18019BC56C76ECEB8AD5 +FD51BD172B686860C0A695983FDA1496522D5363C712E38405AF7EFA310CBF10 +418269AEBBC209096D47761DCCF0B478ED7B1691F838CC8A6E246C193DB66709 +84A5EE70C1401C156BA2A21B5C32F91F24AC1970AA22777B9D51C9C885EBE85D +D8F20E3309B44D74D5C939413123E13525E29C5968786543F7492E3EF33A39DB +671E8E97FCA2FF42B86BDE0CD722C5AA77176E46EA0B18CB5A3D470D3DFE703D +C5CF58F145BD3167D9AC4A08FD88BB4B3F1DD65C1D378F17C64D02A50B0FDF55 +CCCC26C238C0AD8861FC65CEDFA0A9B467ED1C590A107EA029210C0154884266 +AC8686EC1930D65451ECF07AADB56C823252FF94D8E38A822DDE00CD8EFA1007 +9C901A657F5500480FAE0E6C7AFA5299DF5A5BDFE3675CA991726DDBB75BA067 +41F596DECC196EF804FE217DF9307D0EC75E704313D2BF805634B27385EAAB1C +FE8261D21B0EF45BAF83ADFFB6750C76069BDAFA4E6FC925E960355114357CB1 +68D06E40D76446EC38DED9963D7CD42C227135C2561793DAE12F4FFBA4D4C3C5 +629CE9608B75445BB664F35B1E069C2C08C6F32A9AF360A592640AD701B13A9A +50BAFC9D31F6DFF26FC95FD58307CD51C4D8AE11644E86B380A55E7CD2CD6724 +F29ED560432DF6303424A426BE264A7E80E51A51E8E40BE689C903AA1D890AAE +4B4E0489A2B0FB4155F7BA802FE26EDD9A685DEE6C47D89AE852F18DBD523A1D +60D95DA7E4E562B68AF0A6A4546B0F1CAD87DAFA109B7D76FDE7096B7B39FDA8 +D644A3FDFF859FBB858ECD611D5854FC3C795D3EEA91F63214013A7852088394 +4EBB1555F39791D314B88FBF04874D48127F8D8E91057E08D13A0288F059AB34 +20F6503057DAE612A48693D3A940CA57EB3CACB3553FCBDA818018273A09EC88 +8C7D570402D2D04B3AD6073350064A7A5D275582B549912E3D819F72A39F3F58 +5FA48CA5370D39AC431EE7B38D572664871BEA58347AE0317334590C4DC93DD4 +D467BAA7E66AEA2278AE204AE155E176C56A2DEB505DA944FDA9C451F1989B80 +3E4154AEB4589B5E3668944E5D6D5C7A756BC888354799DEC8B08813F32C44F7 +654CC63E6FA74DA815EB670EE85179B54567EFB90D604426C1FFDB57E5983C3E +A112881C86A63151736851F85BE19DC23AB256D48D28018CCE9CC44A3BE04AD3 +B8F532AE02E5B7186A5D37BA9D41F56DB5E82B49DF454C350B70F1A0AC2D0392 +B66B28B6AEBD215F93E55E2D2DB6BDA940F938CC9E96E942E6E1F92298F8179F +F4A585322917FD6AAE07D982F9D57C2E3464FCFE13D603D52F88573BEDCBD3AD +DCAE8A1403FBD708142A6542D9EBA6F112F5FDAD1136ADD3127854C86CCEE50A +6CE710F5AD0A153A855C1057CF67E04DCB4AE311C50B006C8B6D4927219D650E +3DFED3F6BF822FF4D35B5D43317D4414860E71C89E0DB61998C66A004576B9A5 +C4C85D6BBC8070F7A6980F29C8BA3F1A255E34B30A6BA28CA780749004B601BC +E3FF62937ABDEF6C86C3E086F8D97F66E4D20C122974B49CA76B7A9ECB249E9A +80A6DDD776D3B036701C263E5B113EF8B0ECDD93C4C1D52E624630681CC63ED2 +392B37C7416109CCEFEC324F781EC139EEBFD814FB9DE477BE861F58B227782B +F51ABF4D9B91335D76381053DD504747DA2E529BB89F8A676B6E689A8642B8BF +72769D84B0E514EB11B75D410D1F1E7AF509E647D7EC2E0A2CD0AC650C1401F1 +726ED87EF7B12798A5A9F6BB4D8C51FB0B3D7D068C730DDE8A8FE69A76EEE31D +201F9DA234D4117CBFE072028C5794AF125EF994E1E7205E2E261F900514FB0B +01C114F1DDBA6D09F575BDD7F01DB0D37CF6F0F3AD48AD48DDC89A71CBFBB808 +1957A547F8F6477533AAF177212184C29ACB62EC99D7F69E69C1D28C80FFBF5A +A6FD0E99266EAFB5A3DDF48D2533975B2446246FE37E718586439354BEB0DF5A +FFA82A460E8F0837F7BC3FC16CEB3641CDDA067F6188BA7EB6F906CFA799A193 +2A49161F1089334717417AE584546C7A59B8F35BF23D434DBF850223DD3F688D +B7A77D5B518B3571BE9C202C5BFEC09DC66B2E00A6AD88F8C2ED068D856534BA +E5EF47969E2D436D681739997265BC7E403A40574357B52247E109F1A89A714F +99BF346C7A804288B02490F09718696253DE335835989449FF0DCA69302671F9 +342D0CF58C4E585F44E59FAB522F45B7AFDA9C45483B4BF6AA3F5D91B418AE80 +E626E5815A6E04FA79D90D4674A0FC4197CB902A58E4F00D33D331D4CE43CE7E +BADF30A6B143F45B8B64E4B414521B1C5B2851B23F334463DB3E890AB1C71BCE +9F6473F4EF9CDF6BF164006A2C27833B59D464FAE796E61EECFA37FD82FAE0C5 +74F1EFD4DD9C270AADED73FEEB88F0B66508CA35006B358922A43683E8030F63 +B65BAEFA554D250471CD0B99EECFC46C196F293330537621080EC31470F2CE00 +54940E4D73E533D322C8A1092DAE200DC11770D5FD0CE298739C76300191885A +3E07555BFD8269FDB9EFF2F2846526CB8C071C30838AC6979FC9423B819A8716 +F883338A8424F5903C84F8809CA84C62080B2B7B2D3AE2BB77D19817BA632258 +599344D0D3A66695BFDB71BE0D16173652C333095D034810BC18F31566D2BF0D +3CE81C9E1F171CA5BD367AD983BC78D282B9090C220B52DDADC22F2A1BC5A6E4 +A73732E0C400ADFDB18A2B77B1847976F1B1FDE74FD569F5A7022756B980AE21 +0622F6504013EAAF9916181B22009E01226F19C184AEAA11DAC94EE10E91805B +A819970CCC0B03609C5CE80A93FEA61864BC388AB73B4D121C6A720C9313A7FA +9F21ABC701757BEE65B77E07B40F96DD390687F21AFF1A111C82110B8549EABA +085E3D43574ECE5BCC730BEB6ECEB57CD14FE86AB85627927198693CAC18B540 +4DC1FFCCB9B681FCF6D086DDC7171FAC77B9D61492DB0085FDF35A8ECC0427DB +FF4CCB36C662C7BB5E4BB0E7CEA464B9E27E898312CBBEBF96827DE131C5B41C +0B976300A045347CF81F18C1636D6B4D6D280BED855B37C4730307BC8B9A682B +BC3970B02FB9C84E5FB9A2F5E739005407AE254B445C4D64035847F118828A75 +1233505680CEC030C93BD833ED42CF7D241CDEBF8D1D6CF111E27D19BB8EF608 +0C79A4B6FC9F3B4F0F9C3C6BB808F47E3C598D3EBD701555865899115453EDFD +F7F5A9C141D641F8ADE5DC4AC1F13AC3B546F79DC1E2EC94092F7CAB85CBF872 +70BA6CD16AADB58A1D1A272724F59B94B56DE9A79894890B0CC7BF40A64A65AD +27891302FCDFB261FA3C8A3CAD261F54AE8E54777CC403B6D6A91155BA52A2E5 +68B853DBC40076CB80744FAC13B3B1323F00AD567382D9ADBBCE41AE3D57E2EA +11DDA0CB7CBB6C31534E27B9DEB545E46939E948887335DD4D55BC81D6257206 +A9B632D610C4C1F70B29BEBD1B0712C01AA0FB78594B5F3926CD47F8CD8500A1 +8BB7DDE8A2CB3931E0F1B2DEE9DEA833721C590A6603D0C79F5C0A5962A606B9 +3EE0C31BE07F1F722A01CAF198BE3649DDB02E0F9B6E36EB6354E99152446EA9 +2FFE9D50A898A2E711C05260A0ED20674DCE544895C0AED9DCECF2C24BA07CD5 +1F627DC3037683E13778352EFC07ED80F3C912F7B6736E5B66EC82E13B3A1E4F +7D4A0242ADBD70157874649D94B6B8492A81CC937C92740503BEA09462446346 +1463E4E73AA554CE233ABA775BCDDCA985F26E453FB589266D4F53590DA1E6EE +F04F39C38C7E883C5ED937CDAC7E24D9DFBFA0190725AD073FAF519A6A93F725 +190C5037FE1E8C27C1AE113EAF5CB9C945AB188EBD7EC5ED38F068A778F69F3F +5BD61A346E752877A6DA8897CBFADB12AA96D16B2007914347345CCBF496AF37 +0D1AB45E2B162BB39AF0E131C5123273C031B4A9E5C9EEF039800E91B2A7809B +6D6A2EE2B4DE73C2402DF80AE6DB9F37F56DD425133EB6AFDC4A77E34B2DC170 +7B7222AE1C93D619D7006CB160613E51C6A4AFFD5D22BF26BCFE7786AB9ED4B7 +56C2583A2958E2CE2906B547534E115EBA83F379CF4EC4B9D41C4A6A03DFB922 +FF0E579FCD369947BDEE3690EC15BA34E4C0709DAA033F27F965429C1A073613 +6DAFADA5B9A833088DFC3C56373BDEF5823E057A55A91ABB53978373B51F238F +07A5D627E21A253D2D25C668E2B8F1846F792222C45900B0B7829438CC33B014 +E86E138CA318462DF720C9A4AC9B32D0079F10DD525397053E9E4AD9FF03B54D +831C1474D29B4474EB59B5DFD51DEA01064407113530A9B0A2F97270CF2AA8EC +0E785328170C1E376712F4CE8278B4365A2C958EA1923A979A74702338B376BC +C7925C5790E31FADB224E6E8D709F27D72BB7493E581D4C8582C82A13E082A37 +E9534ED92BB053E4AD3D670A176A022629E99C020F99778DE2512E68011D1553 +FF7A6559EB277904B3D7A1CCCDE15B0670163DB50DFEA2330F06DE08F1EAD35A +24ADDCFC7F90FE967E29F366B0E306D547A968AC0577F8FFE78DE139726E58A2 +8B0B9104227821930081D349C487201E6B9AC58FDCD36C5840E3D477C12EDAD8 +2AFA6799BC1EBF1CB30009AA874E26D8C193F149A0CBBF73FA82475737EDB814 +8675A0D6DCC9A6BE18C4409CA8C456BE8F98F4154FDB773A7D9E97B7FA3D4E84 +E0BE4BCFACCAF51ABC470496E521901CE30CEE4B2E1BE357EBF82135BDC61728 +E71728296AC47595637FD8D378E20A283915A1F7283C0F8C263BCC6DFEEC5FAD +F1541B5E3D82839B168E8937E95F33F5119826171E45A64DE30A4E5F1771837E +41FA56129AE1D0A3CA45734BDD58CE444B50919FC0602A8F2659C6D4DB7D7F65 +5630ACA155E6980B99B56AAE43D080278D8F111DBFAA0E3E783D09F4BB99430D +7A2EF5B6052274FD8BA93307AF794C6D99BD3782C73D522D9B86F21862458523 +B7EAE8207DE381B9EBA40D7BF5A4F9DE80761DD3789482A057F4573C13317D7B +6D4541028323904B6F53750B29F9DF3E94EB5E7CF421D07822DF32231D02FB23 +DA1158227E6BEB8A5B836B79E6C23E758476C1B24D745473BEC0AC4C3C243DD2 +DB91EFBFC45B826C95BDD11063CA3672AAC2ED367EE2631A3BC2ADA463D68355 +D6E18ECE7455EDEA610D52B71918930C5965A9880525DA7F5E4A42D934B2F16A +22FBE81A21599200ADD90034643C64302803839C2CFC76F12AACE5D09D9EE7E7 +E6B3126A94B53CCA246F1F148885ACBD78E5D5E7563FFF359EC7BDAA03AD035A +5647A509A84C3E147EE0D5B270C463062D3DADED3251E9EB39852715A6B2472F +61EE3690C85E55DB5595B1395B2B76813A7AEE70A3DB66B0E54C8872B1FFF47C +FA5157A5F6D569BBF01BC9D2F670A4E5CD4F261DC6F0B9E7E6A06CFF4591883B +4C35B5088839B08B9BA1FC0CBFC9243CABF131FC4F71C8B0A312C5C9A48196E9 +DA7B05945A3C44BA0A645383630B6CF6DC16ACFCD32614479D2D3C09503CF485 +EC36262E337012B115D23E3E68E21612AF0A10C7D151B9272A3D322D31FC1E7A +E7DACC531E6F60143C1357BD6D6C036FE595A1609EE72E0E199A7ADD2BC05B02 +279DF5D1444B7E1343990F5B48305D5416EBB2552F644065FCF745AA286AC02F +6D7E776095855AAECC3AB55A0EA3464854056407B511AD419AC3BE6B36640313 +2DBAA5D48CA0AA8E4B319798E34A6178785E1402D61FB24D46C01BD4365863E0 +18866692A07FB49C4890D700CEF556B2278AAF1637A634E355A2A42FDCE3C59C +55D05D44BAF0F94E5606ACB5D6BE1A3C974C02708DC86BCFDD33C16B2327369B +4B0BA4F8A37E635837D5F144E3162D54C3B6AD0A547AD27CB4CB7296290C6EA5 +533D98C134A448224260B47AA36DF51ABF3DF5B59E0EDE3061FAEF76CB67674B +F0E8B16818F6466165A72D3ED4BCCD5CFE88837706E42E5C9E93791FDD745EB3 +B286AFA4AD2770B475135F73BE02493BF6FEF427C9B0E9957BFF6DAC3504238B +DC13B7DF63EB3385DAE107A31A398623668E3B43140146DBFC5F6EDC37106F33 +A3716DE7511FDD7831E1BDD527D4149AA558B772074B9435E0DB43386B8D1C13 +BF427D3AA473E76566F254A07E7E9E45198DDC9E8D821E977CB37BEBAD9615E1 +88FFA3CE13D967E6C63C0F3643519F4479FD6F04E58678D2213CA6DC3A6200FE +CCEB9CDDC576D0B6B234C800DEB59BFAF975AB06928C62E40E8FAC68ABEAB86E +4D18BBADE6B337DD2AE3290C3D50ECC6DDC0EF0ACC05AF046CAFC8C0CD6F3E8B +66381374652D4ECC1C6249A6E4F58A7A4CAC16EEF22A24DC1D6649A3851C3B6E +97C8D5893942D77FFE1C8C052B3E7C54178AFE9EA5D877B56F6FC99CDA8226D8 +B81E505EA652F9EDE06C95F785D1E7D076EF6CF7E5DCC7DB907170307B578994 +A932EA3B080BD9FDBDC930DFFEBB8544A3D9C39A96A95724136FB0C13B498F8F +495661C0A7EB992E347D2D98C811411BA808699CAACE2AFD0DC64B5A57DDAD10 +3AB05ACB3FAABE62A199C89D599BE191D79A5EF7AC92CED857B6B24646BD237F +F0EA46912A93FF9E2D5486F345AEC92682714CE019885CDF55E3DC8EE13D2618 +73C3021435DA0095D14FEA289139AC7BCE4724C7334ED9094148BB33DB83F7DB +B808F911F136A943FE232B6C7E26D595C3C82CA3794815ECEFA6D7C365C06C7A +EC7BD737B800FF0A77734A6D10515394157BC33611366EAF3914EEF47E0EEF3B +591E8EB9207D416F9D491A2737C197C24A192579D88BB29DFE693914DD3C2B1A +CE51D144872132A5DEB31099D6B746E60B054A576905EAACD10749FB4337B6EA +FE50176C6C6FAB93BF36F2D3F46D5DD755DD5D77A0D1C83005958336203B60D0 +E5EB63DACBBE3FEBD068D131C7F30218CFB314F5634586D16D6B35FF336870BE +8E9565D67960A15E1B55E0FA6FA5A6DBF73615AC3A1E8B082103E38B4DAA4E6E +5495DB7D0C0CC18D0E15D971670EBDEDDAE95F8AD6C58F2315D8C186325CD94B +F7F5657F936CAD5F5E1BEA31AA55F22169948EDF19ACA6A179F136D79F2A6AF2 +E8C9899071A0C89605C07B6B1E5521C6FF911AEB9ECD6BE357216475DD7103CE +32A29AC7F5146887844E93A3A648AD95C4C7275FBABBF42573F48A613A4CB978 +4C76E3F68623840C1527A9740B65C51DCB439988157D951C712368E0670C41EA +AF0F8BE942AB4D6AED1625F12392E2B0E40FBF55B52A0E8B47FC7B0F5BCF73E9 +5EF73227133242C46F1AC0CF941BB55963CE263286F9D5D8263CB587F15C88E7 +05C01C22D8A71F66D953C7507A895CE52B8B3DCC30F3A541F7618DF04C81F957 +2C1027D21854620432B266A48DACC327D1B0AB83C9DE60EAC7859252A40FB150 +BECE12386A134EDD8DEF3EBAC4B5C6696AA7BBC19D09EF1FD218A8EA05FABFC0 +4B0942FA695459DABCED26525036F33247BA2BA3368C6DD4C8CA1D5C01D9B3B5 +FD304E3F9DE3A710C5703C1DF5CE0D29E8D035BA52E72DB718809D2581384767 +C171E0D4E347A8C26AD87F3F999418F040DEABBB7C76C9E612A1060E01DA0686 +62F9FF662C5786FE89FFAF5C96C422CC89113843F099603578072BBB3A655AB9 +3315644BE81F4CB010F0F7C2382E7D2547C9B478C2FB5A5627B74D528D533F72 +A46ED4A78862E0A747E3706D1887936140E7CC36F03FFDCE8B869A83D384224F +12FF7A51511121E49EE3C26B066892BCF072F9B3C623CAC68349FF4F4E011C88 +7557E4E53D46D86CFE091E5763456D305179BA96D4C42B00DDD5D4D033BB37DB +FB1501302172F3558809031FE6CCC482B38986ABA5599B6997FEEF0E54F6017C +D1D1A714B08468E1D14B6D05D2BA752B39C3FEA00CF50BB3EB65797043D3259A +D2FF2A33512C1074AEA3774B38C0B1FF31C335202E89644BE3C40B2202309DD1 +AD6445D23839209C8D1F6BDB8718F13B9A3EC1E391E35833CB34C89B1A104017 +1EC030724C9F8696F139101A598A68DFE19B77270BE5CBBFCC32B0AF2295A0A6 +3330B787115155F10901229BE684BA334F344F25AEC27472A745F8B4ABDF16CC +2763F158E0B0F5120C237FEBFEF9D59CA060963F6CDB695DCF231A2E124759BA +AF86619805E8E3D760CBB61E69565221A4E7634039A646834CFF7BBB9610D5D5 +AAB87F9A7B59E254398AF2EDD0FFD5007F7DAB5B540377F87AEC0242D5A0CC31 +B6A2047EAC5C84CBBFC81F72AB47C22B4BB75B11B0B4675FE96854C68DE8D2F0 +152F7DD738FC06FFB771A214A26FF2C4E9AAD52FFB07FF8D7AE112DFB13810CA +1646C38BFF016C1D1102315D23441E265E44399F999B74CBC060CCB7474A76F2 +B238A1ADFD5F65A1AAF4AF9619D0BA728A84E09785BC5215136E470E900BA0FC +2C6DFBA0942172B67091BFA5D010936A7A0554429AFE914D8E8EA4FE75B50467 +202F9D9F0A0AF8B8068714B3716382F2AE1EF9F84DABDBC3B872D7BFE2B72556 +21217EC7F346799B1E14156E31F001E8ACDE478FB145ED361352A311101C069A +DFCA7E6B6F092186B1861A4D6842A8AC93FC38EB0CACCC2079F938191F245C88 +2842EAE3AB6477153697BB5969793E3DEAFDF2099A9D71121CDC99FD86A83C0F +AD7732EA87CF8A01F85CD5E10411736273BCA87DF75405D51C6FACF01EF31886 +6EC19677C49DC6C3805479862B68A3298BBC93B642589B20E2E3E0F2A70D1EC1 +D78A27C09572DAE66829CFD64CE427020122D12F5C2F00FC1A7A65F31455740D +D1409A921F130A2F008CF55C45F74A43ABF508F5181A8745D42A60EA68390C63 +2E56BA5F9098DF94F812C8AB6C527AF859A92373BEEC41C3B9D2FC85C4EC48F6 +F097F39A1D5B823B24D8EB2019B86A1CC0D4BD0DBAA106AA7961D16A1C84F9AA +0BE46AD3D95A403592D2D2F330CFA5B456F38E0A2CE542D7AA69E45E93E7D0DE +0AE5B2295A189E4943DF4431FD14857189DD0FF98325BE736D2FE98B63423C88 +7427EAE0556062EAB9CA75000686992F88974F2F6D56C6FF9052F8D385207FCB +CF4C9F7D58BBD08DC68A2F65C6E8D854B85A49C1F92A00C7799DF09B52D2DB68 +0C3F9620A71FE3A18C491FE7E32B7B6B3325E5F18FCC6F5688A357376D558212 +0B0D2E7EA1004E4E3EBE8A4F514D658A402EAF1B0A33C1A54130CF5E9E7134AA +223B2CE8D2D846253C1720D60D9D2C5039CEEAAEE40774A3B34AF9D04DEDCA6C +7F67BABF8A5A2B5C4EAFEA041339DBF8E1456F393F8FFEE22096F171EB2109CD +DEE0E9B18BD9500397221E6EAFC123146368E5D16469AE5E5A9557CDCD5E9641 +EBC95996E0EF421B80F6BC2D2C0FAFB0BB0FEAF328360457C051E9A7FA0186CB +FFBDD1C2C5817AD89399E5B127D646FA113ED7DCAF5C395B5E79B36922B7E811 +85AA224C22F856433A9E2C54B8930440DEB33138C324501123AED7451E78901F +643B963CD336D57078A9C6F25803171024B0781C1223CD72FA7545114CB65125 +309335776B4E33549FFDA2E774ACF692D104DB8B916D1ED3FF79E4702E76A5BD +5D4CACBD50F149C2EEBDC7FEF64310F731DEE7D567A6C9E717CBB6B4F0EA8F3A +1CE3EA370D8985CA1D03A5CC031E08219D87C258B510FCCAF0D891AEC87D20D9 +69066562A097 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMB10 +%!PS-AdobeFont-1.0: CMB10 003.002 +%%Title: CMB10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMB10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMB10 known{/CMB10 findfont dup/UniqueID known{dup +/UniqueID get 5000761 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMB10 def +/FontBBox {-62 -250 1011 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMB10.) readonly def +/FullName (CMB10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Bold) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 36 /dollar put +dup 50 /two put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 73 /I put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 86 /V put +dup 88 /X put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794D2D432E1428FB6D5BDAF +3F02C975AA4E0072BE5F8CC7D3D59BA3FD04709FC9E52189F55C7747056EDBF5 +F85CCBDB1DDE9F9163AC7158EE8DBFBE8D94A46510118ECE6A280C4872F448F2 +E6A6B36AE3224FA448DAF204D1C998D010C6BF52DDCC45831DF1EC22528B00C7 +70525CAC9F6BAD892E7D5C81295A2AEFA8A5E4B6BA2C4EF61FD3FECFA2A8551B +DC84DAC597222341E762620D3D3C1A4AFF2F6D68C4813004318FDBBDE23AE224 +617F7BC1F3846943E915624D6BBFC555E2EDD013F190492F03CB64E5F2403723 +7A2D4652BFFAD1FAA1DBA4538F2C3E608367BF95E09B853A2BBF9930D9B3BE46 +0BFBEF05DA75DF3D8E11A09D472A9E45C626428A1A599C111ADDEC7A4E70407A +014F792395A2A12303EF51698D487854EA15000AB08BCCA8B2E35A5018F5460C +9B223315D7B838BFEB224E8D1DC9A0C1077DA31F5FCE0D9D499EB0507B90E9A0 +1F92FB5FBB8D40568C1E8B8CD6E1DD27CAE6E107AEAC5696CFEB19091B40FD77 +7A4B4F0F261702BFF5E2320C62EB5C6E9DDE142E9FC7DEAB99D90297AE0F15A7 +04C0E3B39FBC85CB6B92BDA7917698230B5374D9159807ED1D07947D95802693 +A856C84812ABD3EBA336B88CC8F37288CAB59790B0882A4ED6815FF6D7A1BB35 +5C7B7437D2ED76E806813478007886ED1009A1E73CCE210FFA69A20D6E05A713 +F6EFAB133D146B0EBD547CD29FFE7870973C1E71854C1C643BADC69974BE360A +4CF84FAB098EA3DCD2DD8B2FAAD19429B0ACC7C312B03E6446F1C1D51E6AB45F +72F11FFA078DF3196EA970B24B1BE607571795A2FDC2EE7194E9422C483799EE +23E16A737951BB935EE2C2BF008B6190E0138D551E75C9E6D0EA48E64E9750C4 +BAAE32B894BE25D092CFAE894230430E43C585D0F06636C8D56BB80A4597A0AA +547FBCF12821C20F0E62369E1A9CD2343B8A8647B2FBB1F4C86CAB1F7A14669B +69DC857F9BC7538A864E523C2DF7C830315E0907CB17C8FB6E412A2A9E88317C +0026A6A402B36BDC433015AEBAD775835E5ADB4EE75FD8CA06C199E000CEDF93 +00692F29C5394DEE45DFF2D42872B1370C8D4A14E144FF36163C849F9339AB97 +EA87BD445733162A34E609BA1E92DC92F9AC892E7A0B39AB0FFE517856491695 +56155FF0C2B231EF1314CD4A146EDB1CA9AF7DD546CACDE1E6B49BF0D4ACBC09 +55C85E2D38DF84E0B779642F7E9C26CE19EDBF328104B9E803D1B03F3FC24C4C +9EF0D27C8E5AFA420A63981C000A0C1F0B3D3F853FF300EEC524C586376AF998 +DF4ED5AA16D8E298C159C2A3E33048D4EF192A11287F69B11BE24D49A033B334 +83CB8783383F92EFB9E3BE84CEF37796BA4211E534B0360970B9C57EA7CB54FB +F582789A83113ADD2415B3F84AC4ECA15DC70878A32559198DAE67B083B0EE6D +68A92511FA8FD6BA88A42769E3FBBBBDFDAD61F99A6C274B48CB044D16FD5953 +44F1503D8D1D6DBAC41C1246A71EBCEE5B1F0DCE3EE7E3A99792DD8FFBD94DD4 +3A5ED347A62D301B6739AD2BCCC7C57378C29FA5A83759E7AC6F1505DF6C0E16 +71587914F698608AD93ABEC43611DE709ABC3F1C0A1343CBED5F09DDB4FACE0A +8BBA9DE5B85FE9B4365358DFE877BBFD9AF08BC60BAD7C41433BBDBA17EA9A7B +92F76358612FE44F43A85588DAACCF7846ECF5C58B22F18120F895317609AFA1 +06E88CA1D73C4CD5098CF44093207C31F46977B6D22665AACAD5A169906640F6 +3DFFEB3937BD6CE1501C52783743F8F6110DF43ECF512D49A55379432CAB1C33 +7C38B7A38DDB91F0683A052378CBED8BDE4E6DC32FFF6D723A4D1469D32AEDA9 +FBF89B9604656DD0D44ADFAC39BA893808676E1E08444CE56F6CAFF3E93D8D41 +F164049193BA11AF94B43515BC79D6A538C00B08FB518EB67C27E73380A651DC +4B244E8A2E4ED405EA5C7EEDDB09D44C458A883C839B98D9D6A2209516E0310C +AD777536190ED06F47EB2ED61C53A2E0AD0CA4E4035324DE75F272B1CA6BC1FB +B912807B7331D932DADA30F1975A1C9A8B55604EEE8A0CB514C6CAEECAF9C46B +5D5563E8934B421EA1CCE3B96412D78DBEEABA59FC603CC6ECF65BDB5B66EAF9 +14B852CC04286EBEDD560713090BC417A10BB834944E007F45B61AD6E6150B9C +10A6FBA56C1B45EA5F9A5379B1A0788513DD4100B82BD61D89E6841A26B362B1 +D4762EAF4FF3BEABD882700BE9832115405728C5292BE942F871661EB0E6B29D +430CB271A090B6F5399184F21ED6728171B1783C982E61DB7C0BF90CBC1482CE +C6982B4F0AA39076B64CCA5A71BE73CA65F2CB60B89AFACA957EF8E6429F2182 +CA36220F80EEC5D01AD7061DF45CC5109D9F0B7E2B6DB9D6C6326A45DC6C05D1 +E81B636A82592D99C7B7ADA0E958A0D7570BFF1830017A6241AD62C53D4CB36C +583672FBA265142DCE545F4855CA3D9E528143AAC66EBC9527B76EE43B4F4E2B +B209BD265D6AEF18D168CA7BA2CEC40DF86FF352029597A5A3B2941D467DF229 +50C788D4276C5B400F360AB596E35983262A215047C9714912B2E69CABC0DBDF +BF6925E19EDF3A6638CF5794722C8B92C6DCF5853DF288B9DA52A2152F98227C +FC04D3C318E7D942E9D33582A490888F0C1CC1A8C4474091B4956222DE467632 +33CF5DB7DA165B59A648AC6945687B0ADB83EF5B286CC469B2C9E4AE92ACAE8E +86E4C62A092B8F6C05EB2ED346DAA7C573A03760ADB3CD55B6C794FF4463BAC4 +2F4A738F9C4237107C503A7EBF4F4BB4380DBB64F5F5C9B268111752FD2204CF +F25085683D071FB4149A64426859D407936A3D1E2C627652C126D8F9264E2919 +960ACB9DD61BDF973492CDB1FD20EA81E06BECF5E164A8ABAC12926DE1CBC0FC +6693737B4875F465B5623C899FE129B3A52A2BDF104F8B8429890AC870580C7D +B078A9E26C322D1A8AC1C6B2BF340813D989EE8D054882B965905D33EC3F4278 +DC41BE055E0E5F73B5A1F45E9E69718F5E155B4EA30B28BD28C52C6C322F2E84 +674CE600D699CEE1D2CFB7212BD8168B45824890273A0AAE4757D112980DF2DC +C3026300B4BBC9B081817AC7F4D48B309E66CC7455708C772A08EF6FAC829363 +E27AEBC3E7D0A91984C05935B16E102E81D6AAAC347E38EBA40125543263BCA6 +9C6F4AD6BF8C3A90279FCA4A99D9290C3B8E0DEBB4B2DF932F66FD47AAC3094B +7582FF8265CFF8BBC7F79C8C74B1FF94B26F3817A39B5FFC6BB562BF6DBF9CEC +31CC3BE4D7E431D41D55D96C4F020486F993781828E9E8850192F9F6BA350AAA +5E292210B0EFA4061EC8BD6EE15E3FAA4AB2F54110D17D29BA32C0D28559FF32 +D164DCC98EAC78822D6D6AC6F4871D47290A11C83670374F072A9DC723096C89 +EA584D43BBB13584D9B8B1820C415DA2E0DCA1B50655E81B47B9AC8343DD8FAF +95F4771ABF81361EBFA9259EE8901F31C21E95DD22FE04BDB77D23DA561FFCE5 +A7708647AAF65FBA2FD95E843D839E5734D4C08A215180C7244924E002A965D8 +AB29470A1B86065B4133A9A6EBA05EF1AC67DFB5ED8DD8C11450233D2624EFEF +3E6D3DCA7E23ADF174BC83AF25A1D7529E52D39C27DA86A2DF4BE4F8A96361CE +7025BC1954C75A765ABC95B4AFE0AF5474653E6808F85893BE6ECA1A37F8B666 +05A9E9FBAADB0DD86848D6FC48A1000FAB396F756513798E09D29ED6DBCC8466 +40181BB71C92CAAF8E240E16304DB9F4B0FB6880004A0F9AF6228E60646647D1 +669577DA709B4FDB8721B95B07B4599652A303FFCEBF858A41F08BF3B83EBD31 +74EFA947A8ABFC7467D6CC544B655A7BD4B6A4F5EA9BF11CFC9CDCE14FEEDEC5 +9116A3FEF962932F8B105BC4C51744916E8976815AC286B1E682D83091E9C533 +839223A68B9D977C41107F597E05C3D8C1C3E79542A990B0E8E22F34BBDD8E47 +B6C2CAF54B72E8F0E8A41DB343934FD2C33B6D77AF2E9061C4E76BF258CFD615 +30AEAECE9D04569D358541C346C922A01D017BCE85D4F083AA9B6939D85EEF29 +335D1BDCC9E6D5F7F58EC2BA2D8CE50CCB38AE6A2DE2F695B76831F8F591BEC4 +EC6391563D18E4169151F552B5E1601B1DDA6F93E5C8B5F4FE63F5E002AA3C15 +E0C8DE2C735EE00E9A2A01530FF37B7FEB0FB182A4E381CF1BBC80D743209814 +F99002980CEBCBE3E677005766CE1D0AF4DCC9F103499D1961771FFBF01B833F +1701EF6EB1A381A287F73E519C01084241335905661B2E8B86B398C88F39BBC5 +09FACC1344E15CC7685708BCB3F43EAD4E24A84AA0687FCE0A2178D9BA84EBB9 +68E8A727DAF9A0B28A7CA3B119798603F9BBC6728C5A6B4BFC84C95DC4F36839 +C2649E364CEA39A4EDBBA4C0E27C61648D38CA46B64E8CE797CA3464C80214EE +28A1E58B387AE0A663A39F04F57899ED62FB0E542EA108AC32490B4B2BC068F6 +2087BE9C9C3CBFDD80F2E632BC4C971A79A0A3C3A5607B997223A9F6373EE51F +C58EBEE7756A391C91758A1F6567F532A5EB762A2927F57CF9F0E845E4F66B3D +8100D1795B706FD32944CEF24A054650EC911A54A22F4F35E3034AC70F07C98B +8DD43BE9F7D68C50D6449791F5331A189706D9CD18417348B9F296D8D01368E3 +2523FCC0EF33B998FE925B4CC7BE329B32D6AF791BFFACB60E4874412C8C8676 +34914A453A592C7614AEE5001DF3E5E8D9335A155C65174B940E1AE61ACBCBD8 +A41D7E1C6FC0680E094ECF65C60CE714E6EB2A1897D8A3F39FF58D64EF7E9A41 +4CD8E55BE32CE8CA29239A9BE3FD6B1DD5CA5A035AB1FE57CAFACB8A39B6A877 +C853BE6BAAEF5714982FBFA414EC128B61326B60D83076E690FDCBE3D2AD256B +FA7A15B804402826684AAD933E94853CD0CDEA3CCA7DC833E486F431EC4764DB +F3FB244DB99FA0CA2FA14DFA75A326385B3AF92AF8E4C6D437DC3DCC07FAF25B +6C0F270333ED377B08E498BC3004C25C7A991DAC9A3E0D1FC43E2EB6996C7269 +7A864CEF35FE312DD8F87E37AC69490299CEF9B059EC7E7492D1D6E5640E0AC6 +35B97F7A629B6B7CDF3BF86D2B518EA807B03E4F79DEA59C84D98E4C94102EE3 +71A29649ED75F5ED02EFEED8064E2D54E8F9CA0C4284B987B81B7F41FD7DCAC4 +FB9C3ED70774F9FD09F3321CE1D0319C1129F5868DABBD183045984748C8A3E4 +53E085818729A1353B13C78E63E837DE483E9E2ABFDAD16534420BE4D7976D35 +F56B86EEB90F663E9778A6E0CD698E6324EC2D19901972B74EDAB8F4073E4F37 +89082F08735E8345BA167B2B76C77703C586CA5DAF41C0DD0E231184DECD8A9C +DE8FD239B6CC636507A5BE6EE5283C06A1D8D59E98A31AA76F4D358DBC641DE2 +ECE3D9F2D262FE2E878E909A950A7642A3F59995519D541B96D459F24F12682A +9AE61FC08CF436D9DF060DAAA90884A1281B370A2F824704B5347FEC65E14E7E +3D212E29723427BBB12C1CB91B28CA47D6FA8259A875EDAE4B49C33B2F73938A +784C1E7A7F21873CAD55A868A1451B070A3F259A983293289B131E07C903D7A6 +3CC66CEF8C4D2B6736282896A2683EEB944B67240CAC5FBD8A1392A875245A9E +2611B511909A041846063E465473D41958104E92519C0F86706AD640FC6CEA10 +620C9718C4589D9D562D8810CF6F461B776D5A1B040F8272D43C029C2A695D2E +86CF508C4AB11104E575E13C2EF56914E241279BE0558CD3D59D25BF13CE8212 +3D7AD1F25FA5A9155AA06306C7CD0F49E3498856318B0ADF279731E1769839EF +98657EE73CF07B0585EECB67F5FF609E0E3DA1B78F6A8FBE2F2E0C051237AB4B +1587DD72BBFD962E865EAE0CAF1A5C592F5019C7533BAF297C0F78F3287838D6 +CEBFC8B5969486A5134DA76B4961C8056E1EF1F2AD17F19D7998175D66B3149A +2CF21CCABA281EA0345EF50C1EBE7004ED495C6D03963B639A66638A43C049C6 +DCD311B5F86EBC814BE42D432EEC87B861FCBA9C8729FA5AE87E20C5B30B8E5A +BB41189A42B9853CA408BA01A559CAB722AAC3DA28E70AD79E1BBC8B6FCC937C +180B5C2E20B03D3FBAC60C83F765CDCDB3146FE5C0B02911F6E120D63EDFB0B0 +86CCF83C2AB62922450206D3701588B54A8B232126BE120432E6BB2E25C50B13 +708D742A44E20176C54FF89F4589B10D5396C94625AEA1914AC168899FE7AE9A +7D90DA67A5EF3DDA25CCBB18DBAC3AF4AB889528A381542185821B96CCFB4302 +987611DD5B5B8514FDD7F5148D1BAC9C34567F75EDAB317E0B8A7A76604A42F3 +1D46332C4791006DD1AB657308CDBBC7314592707EB163326E345C2C5EA05B33 +01FEA5B7A346E6B1B6EF58B692150C6116B149B6A26B493674337A9C1CB4F42B +A7A80AC587F9BBD7A487F407EBBF9978840A01B5E7E772DF7EF28481E7AD14F2 +424816AAA958320A0E6F318C757A474F7B05AC0F570094372CDE877B479AE3F4 +90C257A2B3F443DE43D8A58594BE8D4B5C7E5E075ACFB1AFAD4C06415266E168 +FB38C1CA256287953EDAB1D40537A3633CB52FECF3D35BEB8C2C6CBEECB54BBA +CD6E043EEF68A21D7639FAB8D1006B1119CF92350D9773502F7554B4B3036EA3 +D747596506FC674DC01ADEA9B45ADC43B9E6947235E9BA30FF462252038D91D1 +D908E9132A946FD03B86A08885AC44CEE72F0E27AA63A901F2DCCB86D87702D9 +A66F35F06D6640115B075B0260FB116E24E795E24DAE988CD48A95FFD3116E92 +63D02221D272531186E2AAB74496FB78A4064C9C9772608C49D46E40FE28088E +B5109171E7AF69599BD8BC1186C196EB11FB4132F5C9FC1395220392E17B66E2 +32215E54E9483196341D6DC691FCCEFBD00DFF4C095FA8AB36A374BD5E1F5082 +730A698AAB7B57A5399196ABCF7B7963E2970CCAC5E9A5EC552CDBE1E2EE1968 +B81CF5BDDFF9D385C9C1FFD726A0C52A4CB0C8121E77AEA16157C1EDCD1AEFF5 +5607E8F5C44072DC54332B95AF28417E2D45B4685F270821EB6C455AC147F938 +50CC9F7F2006D933D0664AADBF5D7E3E6DAD57527AB59DDD13BCA392B059FAD2 +E7833AD00F62EB89CD7BECA9DD479F7CD7C981859EF43CBB1EC1681081B58A39 +2CEC9FEC039082771E1BF48968431F72817C8156D0D6B65DD33D472BCC49496D +1F5FB1796892C6A45BCC65BECF41D8604B811824739647D87A7B28FDB3574478 +9807DA2557F411E0BA7479F31B9E3BBE6F3CAAA653883A9D2BEF2073F47F057A +CFD20BE1371F17F5B6F0A9520F2EFCC3C04A24EC272C43E1F587ACDAFEAD7076 +6139D04FD9A50F67301D7765109C76D6270D2DECC94017A877EF386AC7F625C0 +ABCA9A6D15D71AF7A5889403DDB83EDE87EF5A69EEA97995CC1601160B296750 +32AD8D65A456F5471AD4536F1AF41A4D370203F897686CAE7C89577D3A843E90 +9C08CF3E3D489625256DA5E0984BF971E0D8D251AE5B09C17883CE07750051DF +770B920AABB2E80A4944EF613891B4EC3F9E214339AEDFDD5DD15240933DC82C +D878BCB743ACBB562A41BBD86191E1129718826681FD12981D4159C7432DC3D9 +AD4C6C478EEEA0A34030BDD0B9122E8AE5F0B473AC5A48346D56C2DE42815D19 +FE378D252960D3F56654B31C58CBBBE0D634FF6EB81295809AF12222C58345C0 +459551E6B0D1C8B641C3DF17E4F255F0FF2ECE261A420B8AEDFA1491B0B34866 +FE02115A4112CD7C54DBA9F8C4743994B028B708C01494CF33A584A783A2696D +228555A71EC8AAA7D1B9A9D2DFEF198832EB46F464A6A07BCE44699387D975AB +4AADB1E2882A00FB05DEE27084854A1EB6343204139222A29A3A4117DD69219A +26CB0FE7CAC82BAD55AD174D38A317072BBBB3CFCB08EDC07A3A78A397E95820 +907D96BB4B92ED7DBAD6C2DC672BF913ED44A41A2D1A0B1D0386C7635309B468 +D87BCDD58149F0B2290AA93E62BD2A8CEDF96932D061B19D7AA8B61516F4B27F +185B4E0F7E975F0A6A6B82E17EBD5D7629F4D1A07CF828887B47657CD2BDCFF7 +6ACBF8E287610C88AF5F8C4CECF4B393F9380E840D897C76574F2A196BC52EAA +E1409464B9A39EEEFBCC9AE78C0FDC812991309B7CC5D8837D5C61442D7AE3D4 +9D5E76B648E4B617D1FCB40BD5F7F3294B6E56FA99164500A4FF96010A182BB7 +678E71AFB828441ABFBDB43191A456A9262FBEB2BB0CB22E14FFF5BBE1ADB11C +3CBF23EA23BA8B5633D693082F597CE9E9216487F4957C8E087DE742AE37B7E4 +8BDBC9713120CD357BD9EA7CA5BF35199C112392F13C60DEDCB86C9808BEB59A +B6D07A78E0B37684AEDA11B18E62CE1C1CC6BFB23E4B0B5A5D23CE7D4B8C3713 +95B6CBEBA34419E412ACB6B308EF9EC8523E5889C19AA33C1BF473EAA2875AFD +CFC2D9316366B5AD9E4059853B09DBB67BED93318AB0191A3B4B4EFD5FB284EB +BD6C118E86926E25AC33EA5F2DB721222010D3BBEF9C65224EB68A4982E0787D +75606832144E39DEBFF111E8C618A4253212D8D2E1FBD10C8CB698D73F9D89D4 +C61BD43C7779EC7ABC6B86A2A13D605301845BF98ADE49E61E63B5673A5B9715 +902F7E66A0DA5E3CB803A51844CA11EAC9A47618FD849520E7FDB6EE2927770B +3278A10A2662886E6450281B34D47DFDD2B0E3164C9C507F54F3E241871469B6 +153532B5718352E4CE45237012C6DC80144D6D39B11082FC686CAB1A1C43E60E +F8F69C76AAAA6B8EB45A70B7616BAE1148B5A073C984785E914A5E4C8A3839E7 +1DAE01CA4A9D52AF0B9419DE91A3A4625D67BD9939F599610DFD66BD56E6B40C +C44F7636E35396BC7B211570FB29D0051181E7B6CB1392BB799060AB63C6FDE3 +D5FAF2269503621044738D2269FF88CAEE9080DDF10F91C8A24CEC75ECAAD3E1 +242302D5160530BB2398687333FF951DE7EA92E6D5E3F31A8357053210AE0D8C +ECFC2E9D6C591AFF798908A4DD729CA6EDAC3A493156301A8EB727DEA06AA495 +568D6862C4CE9A960A32F08A2E218BD633DFFB159F8CA8988875878450645209 +F00721492A558C21580D1FEC3CD53BF52FC68D4D5610CE47917D88661C4DED20 +98777991D0C48B70F84369DEBF355AC1485CC1BC5BCDB040BB5AD58A6CC00597 +A84D5CBA51F7BB58B1B24CF800164EF70681A969EDFCB9D115D3375F4D587CE8 +5BB02ADDBCFC19FD803F361FE7CEEA92A4B3EC546ED4E31327D1D1D7200C4FB4 +DEB233B893F6909E9C67A0201E5E9C5E40F155CD7643CFE9F667DCAFB8FC61B2 +3F12408E28E29940C8562C247E78003757ED746F5626941FB1EF68B3A0ADA4B9 +29246BD445D617889EF7EC4169DA872E7D177F16CB702287053EB6F41DF338FE +2E3C63E8B13E4D77C2A80D870BD0FA1255552E787EB3A7F7C3CA8BE2B3E32A42 +0FC63C5E1097C7C5D25EE9D241E246AA9D379B31839DB9F37ECDBCD8945E501F +A15E6D6458BB7713540C8FC1F059F6194D4D8AAC0BA70FC4C4EC42A3D0B5EE01 +BBE4C21AA9B428730EB414AED91F3C83661FF87B5DFA44F55D0A956A66B224D0 +4EFBD62018E620CAAFCE329EBFEC6DD8463AAD5641AB760FD7EDCA1038FEA46B +3F9EDC07858B0392FB7EB4669BC01D3714142741AF170FEB86955408E3BCF2BA +3292ADEFA983E17FCF004E967B1E6F92CFC11449185727DDDEAD4EB9C69687F0 +743B7FDB0E85A2D9FEBE13435FD0F76317443098F811BA362643C83F14F006F0 +C781C5708A1A2895A261C5DEA9DDB8A62526EBDD3FEC7A79DA57D59E5E1A2677 +E3BAF4754B17203F051D46782049C00F6F90F1C70545C9DF7A1BF3137DED5D90 +65FFF5B11E91CA6DFB5C2C809D89A5CA1913F7C09B2D8100EACCE5E77E380469 +8A946B2EADE027BC7EDD1EB01BF316901632451F6E8D4197FA21667FC688BEC7 +798A11889D4F124E77077B91EFCC91757E93AE1F1882FB228A1EC4BC0CCEB165 +8C1F123C6165E4ECB848D9326985DC273B2450DB35D89F10B8397176DEFAEFB0 +CBA6DFF210B0686D07A7E53E144BEB3CAF40E066A44CA2FCB606131D558BDD78 +29B412158D4F08C8AA5D515D4B635D3328B5DC3154F1900B3E19513E002EB7CE +3FF4855B58ADBDE085A3430F2AACEDECB6209212919A74DE7BFCECCD5963CAC4 +BA81CF577493054DFB888D975FC5A08A4EA66366328C5D2D77582B3953568BA5 +5E58F59C374DC60B0847B88F4CF7259DB0C14E4C977FEA2AA7593A618964800C +9B860C81D8E9B88839399A9F6B25FE30BF4400559940841F7AC6545A00DC2616 +F8F7280760B223FB1F2A0D69F52ABDCB677065EC8D63FF3BF8CE6188F9485687 +B4D2F0B850693EC9036D77F85EE5C34CC6B22A2EA4A4B05C7B43841C90A61759 +56C54E38146B586A486D30961EA20770F7144F57D27F3D57402A7A2DCE25217E +2F8E38FF8981676AEF58AE9DEFCF02CA1C3869C5463870AF2D4F8AFCDC4002AB +906DEFFC4F2B5A2EB25C979B3F60B499923032F035ACD9894986293A55433354 +0D3F6111AABA5AADAD802051A76CBB4FA5CEC3E5A626C88DA9991C35E272DD32 +2362E9D64C19A374F65419B2F93F7CD52FE4C3A84B54901C2A3EC9BEABB06ED8 +332E1D08B7C9E05F5E6C2138D03B9F01EB8DD0543ACF4F0760F9C09EC5CE5507 +D614B3524A79E654AFD92A3438DB7722FEFEBB51CC054B99418C1A4DB77F78AE +57A98F094533C8423490AD0C8F5A4BBCC09FBEAF4F8B8604BF902A191206D99A +E0105D61F9DED26AD5C83245A5D5D38E1C9327C906CF8F3471A4F3E96FD5B3A9 +031433D8C13985D726271182C056842A9A136E33D5FBA96E48EBF36878AB791F +CE76813B07AE0785870FEA4DA7CBFDCC25A715BFB2EDADDA16E630EF75FA0E1C +87C1834CA0C263D65C5E844B928CAC964D7CC2E30597AAEEEC19BD06BF7104F4 +0C15125A8F576B8439775B5AE33D3E77D4369F6281D09250E200E6848B972EEA +2724ECD99142A80F59147184A97A341890667C9358E5EEFEFED9BCFD1145E828 +3BC97B539284C1439769066F323B234EF98312F10AED0A44595F2AA6484A7B03 +AA6DDAF68E2F83A4C21F5ED6DC2F0A01F9BFDC19C6B069752D5A239DC39D3BFA +9B7F91286B2AD8E8B936096BA0F1DBC2E5F979D68395F467E2CA21F2557F119C +CAA5CFB54382CE55BA29E93296931EB376FFC289741AB563FFF1083807002E52 +37275945E8423495ABC2E3F35CD3407D7F7C2A485F42566370118909E7E15B62 +7E07DAFA81946BB8A722B7EB73A34DE7A1DAEED306AF4459CE09DA1DBAA8F8DE +600D7AA34D3D96B7821B1F43E7F143AFED15225D1321D107139B3CDDE2FF7CF7 +B216FCC3715AB0800B63D065D1E4B6231CA19A4B9D8B4F8F92A9122FF0964D57 +8F88B6D96752DD60072A521C1A0A5954111F4070011EE188B00F7E31813213EC +342457D788A82185440942F60B00F8CC22D145B5EE1AEC95C2D0C5FFE36F4DFA +6A998DD2540EEAE0B7E9698CC553D68E3388593FD61E5A0DC9D8D44A332F17D5 +8546673D09BA62FF58182BF6ABCAD84B144CD55D9CFF5C1172C41C1BA70D2C61 +DFF2F4DCFC90064DBFBA4103335CD8F9E14AED55920D95B1D8901F622607BE17 +446737667C137705EF41FB62CD51B09A7A24F123AC2F2E79820EC315CE58FC68 +8AD86BBDC8672F595E8D80E51F9531B769C12859878CB39055681B02B78F4FEB +834471227FC57ADB89CD1EA7AD15ABDA0FDEBD84727BBBEDDF0053A322AB0334 +C93E7493D670A492E3ED941DFCD3F57F96CBCBCD0B6E9FAC1F407CEE741493D9 +F8484CE5DBF94690DE4165603D03DFDEF92CF232AE44685800FDB58B6917598D +867F7C9880B7E17E1FB9A89AB69229CA49EE164E9B814CC433367929443F1550 +9561FCDFF0379905C440286E63649863EE305812E4C9280737E24A291CA1EECA +5DBEF06289C092553436188B9EF4F6832F359775EE28617C88337BCF254F74C3 +47B2203433CD9064EE4E70F9C415B69380EFF37480AFC2DDBD0B37EFC3830B98 +AC07EF542A32030207A3A639D79AD1EE523192CB802D06B80DEEEFDA62442B48 +A2A4D1FE3D737097A2563B1892BADB84416081702E8DF58F8D990E6FE3C45F6C +5921F3B67F8C36F89B63809AF0EC3E1057B65DB92EF0B7C78EBA2BDDB87F4711 +21030102B43BA0EB147C7F9F2B9AB5014A50E78A22C3D815080118789921449A +AF9D2431D1C490EF0D5F0B576940BD144691C1CF43AD978AC33E199C45FE8EA2 +45C0F0665E3A7D3C9E1C7836751D520F7FFC19D2CBA570DAFD8AE8E37B771C52 +1886D30059BD0B2B6256497B4207C6D31798479567D3AD00B4987ED44F9837A5 +2910C9146E88155F8409D66EDCD9B50DFB0E5FC887504FC66738DCB4F7F387F5 +A0DD3576BDBC0899C7107D2E560DD1872688FC2EDC016C5257890524FC5F96C7 +4BA7A721A4E5C2BF67D9286766DC58636D4D7E115AECA23D8BAFEB03044A9AE1 +25D3F59D9092FC9DB77E40BF8CDB69450E171834DBF860EE6A6DD0D98C9E1BD5 +597F4DE6D9300042D3C88567AD949FD2B2E9DF963E373BCD4DDAB6A7D38D75C4 +A7581398BCF6777DA2829B2C5E2B68765FA98366168DD63468E3763A5350A1DE +6C0097EC1BC55241C0292CB88539378E94EE8D06C1FCF2BE88FF5B48971FB8DD +F037A006ECCA1E00056469DBFA668E645D6A45C288D71F98F8569002BD11CC87 +01A84B25FB5AE0E222E2C317D2581C11ED87C3E0385300C46EC11AEEBCDAB12D +FEE54947BE64962E4956234EC02B5973A5CA2CAD799E26996F508405689E7B5C +05C27E89C7AB57C86EF478EFEA00D9D0185EBF01A7BA7621E101EB3623DD912A +8CD17CD8F82DA4B445D38171E362CED10EB0C54E60CBE9C5AEB395A7667F9055 +3407C9378DD3C7283E7885EE6C9070FE422CA06DDE0216D3BE07B94794182BED +586179B3F36B8273678CE3DBB4A967B37BF338214ED5130EB0D253B6E6678F19 +2D6101EDAA3A067E0F7273081377D14CF0D242FA2F80B1271BAE89DAD9398F73 +750AD6D3E2D152BE902FA9740B61ABB5387ABB8B979A6BD4227A92327F76D23B +DF9017082AE9AAE268B1AB38A7F5AEA128D5289F186E5D3B1A8E0F87CAB05916 +DEE5D8CE5E72287C2CD934DDD6BDD182D579CD75CB640C0D2D01B9923216DD98 +83346D48B3CC369E6B98349BD21E4F8ED2F973B3C651B27939C8237FD7FD9B66 +C585049E8E3E764CBB077AB171CE61EB8EC939DEFDEE63FED7E748FFB2C331D1 +80B9C914B37911FBD20F0F8C9808F31CE7629B14562C114D5012AD06B483A25B +3DB247257D489A78A8245284167A316462C6B8077A36D392C338FEA07C027CC7 +2E3F214252BF10148250871B8313FDF664B8DF10140574A6007DB67D83A848F7 +D5F75A18F41E76C59098F8FFFA481A95552E8E0672D256FDA935DC6747451A6C +49088DEEB16D194C5EA1534ADCE131DD2D91F490A5D0B4DB46EFC1925D337A1D +C24376934AAC82F3D112DA6BFEFC20052C9B5DC529C625A72DB318D8EBEAC952 +96E8071979405D60D7FAF7E3D0D7D8336F998B379B066DCF40C1A2C5C45BF30A +6749AB7AF9EB9693E9777750F39AA1C46B1FC0E2FA21E36D911894A98527CDB2 +5EB4BD28C0D099088C49CF8913D238A72D09D314FE27BFBAB1EDC80F10E66CFE +645A3816E3BA6E1D3265BDFBDCD2170EA98FB8030C00A7C98F8737069509F978 +DB25D556A7B5AE6C6A5C9CEE26DEF479D1247220762EB41D8C727441A9F3EC60 +2ED96C5227060CDBB855BDEC32C78B49DE50BA6ADE3AD5145DF4C782E80992AC +A4B543508276A4053079EB88FCD0E45A360736C7776A26495A72D2E07E72B816 +E337CAA6FD52DC2B7EE3F54FEA6653EC47FDE9E4A52C3184E2A156B60FD079AE +14B6494E5E290B2C0BF5304D2FA210DE1DB9961DEFE5434D4BE0C3DD1D2CC5A9 +88C90C05A8B64220A2E61C48BD8C761583458A0ED1641B012649B91E7F8DC891 +94ECFCDF168DF7C9681F099BB6E35A9BF75D60C000DE0B078A016AB5ABA068EF +FCD143ECAE06B650053C57A8D7AB8281AE28D3437AAFFA097D6951BBCAFBDDCF +9E498A149CB2FC73EF2F1C2900D80AC6B1E41FA1ECD7192A0E1D054EA6D151AC +06DC6C5CBEDC2E3281B22A22DCF18259C267E4A5FD6AC7AB48BD68DFC144723F +5403453E3745BEFEB6C1E09697F6847081CC5A5E069021AAD9D8015F5791A53D +712942D16D23F4E09844CAA126E2AED0DA19A42DA3428A621F44ED4823D99BAE +AEA96787819B135365570D3BF8305ADA22BC96F952A2D5FA7BB69528F6210DA7 +9A8055313C72AC6336F11489A9AFC2805722C28B09B96E77F005D897D94425BB +816174C79F1B20DF4B5AB55603F58400944A07C45790122873E5B18EAA9CA6DD +6370082D7981EBF6E67974E65BFB7FC70547FF81BF0CD8CE8CC3B022A67A6B0A +A17FD6A6C0DBCEE188D73F115263AD392D35110CB271866F3D58068676C006C9 +B3E3701C7C65B1ECEE49C8D8CD253CE976768B167E9AF54270F3BDBC9B152AE6 +9BD35B1E52C1B4B0FCE2B1BA52B27FCE9D33E4964BD3417C3167002ACA1C42FD +BB88762DB64B32DB303594BCB4BE2350B3637E91557931BBB325C2524F091AD1 +03BEFEBB3B6C97E130D27ECC503F59F5FF5215A9FAAFC8475E0DD1312EB7CAF3 +11471DE45B8BB5905A586916FB9241630B5C3688D1C5AE3917F885127EAC04CC +B68C6F6EBD82BDD59B857C79E1D2523E3A1011FD1BAB993EA7E939DA259DA6CC +03E8D4FFF6972F9C7EB703D5639655047CE49FA33063751052BD38E9D188460C +82FB9D223C50123BE4FD903329511DC56EB26792BD81BC551D150EE7EF6D4F65 +3C9FFC06347DDC85116D54A3A2EDE65F55BD6760126A7986B7FB6F84B3E43B61 +76D4296225700B5B5E983046EDCCDF7CCCF0B5CEE63CC2D5CC11982C59E46D60 +BAB14FBFBC9FFB3E7845A73EB2841CC4AD982A01EB4F0294B226C30BEEEC6685 +2ADE8377F7DFB2CDD296D3FF458B6512A06A9555330AF840189ECA8B15D50AF3 +16B99E8EC8AA5A67885DAE6F728FBB08DC9C78410A8B73DAD7AD1754D00BD61E +3546FA1D88183A56C02ED41EBD674DA3A4C88C09C2CDC6E0242857286E269353 +990FDA1EFFACDB30634F534044CB042130F04E27AEFE4AA526BD39E4F4C6D10E +F401AA71A05FD8183323A147A0E22E36D4094943F28DCBDB34650C4CE56B3678 +FEE60124112F5F2848857C2C9EDCAF2FADD656D70B478699E2B285DD0618F356 +33D67317DF823138B51982F6B8BB4A8018E0F4CF6409865CC8CF29A8597D13CE +251766A081D26BB39980AA95302D06BCB0936FFC53B6CF1C4A940AFB16BD3110 +365C94061D5147BE972DAA8D73F39D33C0EC474E7CE6AF8E5C9AA395483F57C7 +2945B519E0A54EF5D55F13F0F63B343781C6BFF8ADE1256F38A59192B44E3722 +B6667C39C9CF9E29C215FD49A984B7EAEE1810341318C969F807EFA8C9389898 +1B2CC42B2B53A1DDB583751B6B9FA03FC043BC39D3B81B7E42C1831BAE782BD8 +07149775830F1A8899FEE941FC7512FD59696EDD228A805BE022768F865F17F4 +6435E84B15BF7781A14BB59ADEF331B218DAA2FFC6E2F8FF54F4914C1CA96DC4 +64FF3A505E84126E1BB149FC718A6138E97FD19BE25625BD0982613B732E0980 +697B8388D492DFA29FC9560172C44B0A3711632F2C591FB446614B6B189063A3 +D2739871A6DBFEC105CC00AF3971052DC66B6D01089154C982DA3B4D0EBF1117 +7772757A5E2480EA67360A79A36833844AA3B608C3F67D444D82F71D4587ECB7 +DD5669305AE938708BFB434150109CE7242986B2F97C45A1893532DA407FC9B6 +7C206AD054EC1D71967CD7C44E79889A96D0FE101594293CA7F8377BA2C153BC +AC36E8CB98B7E84FDE64887E6AA4AC907CC6188688FF1284071A4187ABBC2D5C +56BAED2400148CD610188C26866EDE8F3CBB6AE91C3D1C1150DE4FE26EF9E592 +EBB899825EECB2BA831C5EA6F2C1713A5D408480DF5B2B191ACA97ACC55AA53C +3A3AA40C54E02AA971065B5E218A87BF4C15C294798494464FC95C2B25ADEED9 +2E8BED31C8A4F01F59754B2E7BF23A4FC6A818B0E67CDF559EFD49C50E75A5F9 +1C686F430395E868C1EF47D38AC6959B122A930E991C5436C8B95A96086485BD +1899F58FCBBDC8F13991ABD51E0D142B8DEE60B22EF277ED8D71FDC7522C3AD0 +1F901617B3D251ADF218FA88EE4361B25B425AE66029788518614987E1387CB5 +F28413772F8E86BD296651F1610F49406649F8DBFD7951372C0EFD7EE09A72AD +67FE2BF88CEA10F0641AAE9BA7B1A6CF0A916B2CFBDB9E32843E2C72D4FB59F4 +990024AFDB73416CDF446702EAB53BE1472FCB1F02615E8E33BA0A81FA39E6F5 +09058CAC70155EE496AB64AB70E30CBF4BF7AC91D3077766914FCE0CD6C27650 +FA8E1633BB529B43CFEFBD5AB0F71FED4DE291535DC02E108E8DDDE44B543E02 +C8A34BEC9BF136EDD1AA819181663989FCE0340D07EAB456E2C1DD2E983EA5C6 +274757C04C1E821A80F784C0CF41D798603BDFD2B0FB35DF50396FAF8D276894 +07E10BD6A4C9B68EC252BC22248C0307134AE79EA5333CC488490A0EE5D474C9 +1C64238EDF9349A0EEE586E4BF17FF5DE7692EC7339A45D64DAF13A6F8E5FB6B +2EECB29F2D3CC14963117A1E007AEF17A018CEE82F8E574A788C1220553E1F03 +A4E00881190632AD2DBCC51375DE2DBF69522F7DB433530D17FE0FA9FAAAF059 +A48D273D089AEBDA9AFFDEAC24F85ED48A6887CEEE576D4181FA8A761A83797F +09D647063F7DEB5F26F9DAC9F993331F082D0FFC96470D90714327397AFA3200 +CEFC5B47C47A653F18112DD1BE45873FB10C0DBE9BC869CC62EAFA19CD9AF9B9 +7002E4ADD8075A204A5D72BBDCB6D5564C7990B39EA5FB340AFBEA88C847262A +684259F3CAEDA8E37A4E079661AB4E38C92ACF9971DACB89C71CF4E7F10E1E1C +56C21AD0C54E0D7AE4597C7F635CD2E81D0D710D7970DFA95490F064FE38551D +34643EBFAC54605650E72787180E36AC1835CDEAA2E2DDD0EB3FE15CDFCB93C0 +A6A0E41B463F6B0B61AD5A9E4A60061DA6B1387AE250D3E55BA156B7075B81C6 +76A00EEE4F88A2D73E8B0E3927A2EC44FB402BF162991569AC91FDA9DBDAE416 +0207804263DA45AFBBEEBC0964515507791392AED240CDD9E4E088FD22FB70A5 +70B25D7A8740AACCC08A8111AD8CC62646BF6254DEC81C8546B281F1036817F1 +A957F1244C6B5E423831702AB4563A892D8D9B8A30B500A94021F2F0BBF8FE1A +A67B1F7B6850AAB3E69A702181D5892FB8354806401FBCEDBE3DB9A105496242 +AA8C323262269B273E662776064E8739266B1BCE9908A78DDA1A2D3670B19D72 +7B0BA89D9F3B9442386ECDED1CF5CB320CBA6A728F0E34346909016FD231E9E9 +809781CC21425E343EFA770B3B7470768A2F8B2EC1242A8D5CA5EA96C73DF1D8 +8BDA8766770C84FA936CFE15298FB58DBB29EA9ACDCDFD5830A49CFD36F99410 +2CFBFA860BEDBD70A42E03CDCDCC461FCA1502DF250754EE0CC6D329D9D35C23 +9E60634036ED72727FA15A7BD41B9260D21128FB9BF61C94B11CAFD4AFDA373C +4CD0A2175F0B9518C505F1D080FD4F2B3B68C2121987E7D5A7E3896EF597CAD1 +E54FB5A0B0C6B4F60D6147A4205BEF37C9A78BD12C72947336647D109A405613 +63BD8F590AF30F050CDF851984E191D65E7A4BC01792EDE37AD8359B9088C30F +F0E44AE233BB9B3A568EF5615587C0D8D7F10C9B18BCC808FA1BE622A7687F4C +0BB70BF45E45837DE8BCBCB4D478D3E9363869F60002E4C6EDF77332AAF56994 +8EC5F1F5A71D12F852EED1C60B1D0452155DD02B30D575A07A5154BAC033C47B +290C6D30B27A1ED8732A6BABFD06B8240CA93F73B08F889AEC992B425E6D3C76 +949431521D090388879556546CFF6FA8BAF91A68E8D8EBA33AFE5DE2FD8755C3 +E55A470D8CCFDD2C8CE3D70C75C098B9DEA904CF4BFA87DC02C49310070758AB +3D4EA6801F8254FC80851D5D176D161A4198B1F002C5D4851EF3F88DA5D31A22 +C8B32B582B085E23FAE02D6D5D58A27419F31E5A942286CBBA82839DB0DEEA88 +F29EEF59D94D1051BE274B2A2095A7AA91C7C26ABA1D18031ABC759759DB26AE +E80455C7E5F8BA0DF98DFE1E1419B3C44396DF7EBACFCC4FDE67AD8528C3FD4E +EBD27F543B889D99A8B5EB4291CC55629A16E5796B248F51033C0094D6A9F6ED +013200BECFB63ACFB95B4882601F7FCE4785CA35E65B7F77886D56DB6405C312 +4C83CB05FCFBCD52658AA4BC12C09129D50BB55C6741DB9BD1026B39DB211214 +99119871CF94985837BF91C41A4FBD6F263111F2221B66346BF8E6665396428A +67B1950E5BA890E4F2BEA94CC87E470375F469B724E871EE9CB7508384CEF157 +602E49E91FD4CC89D01DE4F3D968C3921566E2F88B2DBF8E88B5D4E89B70762F +7B7719EC279BFA985C84CE1C999A07F80EBE9DDE3562252C134EAA079ABF560A +B0F42F07FEB72D886081C46A497BA02794B251F96E3F3E9C6C9AC10E89CC6D84 +56709E6D955F5C38871C39A2C79C68F779F21B74C439E3E0B8EF9A4C283C393C +F6513F2C01648A51555A2D4E1A1239EF6F992DC241B9B25EE96E4E8F0B56818B +5FDEC10DA7459212EAAA099F9D2095B952C9C874E24E1D1CCCA8AF77AB700D37 +C6DAEF7429F669936D98F8D97B6E6F6F7F6B079B90AB87E4466F6666A0D168C9 +37758133B47DFADF4A83054540AC383E4D898439D05F98DE1A8EB489C9980904 +28B677D05CEDA7FDAB5782C9A382CD622F9D48354A0148068BF9A7CC7C21EA45 +5BFBBE1B5CDE740FCC1C429304F8EBC0D87DEDC0A2AF4E0F9F87CA02D36DC21F +20AB81263AE25DCF0AE79806808157F9EAA0E0718DE23C424C87E4CDAAFD9883 +0AFD72C51670ED446B82FB83A4253770E8AE5CF57AD6734B1EE816FE4F9131B0 +456F28F8F963A38412272F954C70611005400A637FFA5E3B64F452CC04259AF1 +B95F1A978AAD80E7A9E2AAF1F3BAAD7051B00605BA0A2484F70A771692C5770A +BD6C7392A051ADB493ECF58A5E18375FAA647641656124C43D1D4717C7C7E97A +F0E9F78963557D93EDE7C134DECEE31AED58CA0ECA56F0C6D03B22B37FF44B1A +87110E210D7B041A8026761AFBBE21F29F390BCE0DEA14CFE2B7827EEA8279DC +B366DD637E773A46F632496A35E100B89C3ADBFCC45851B8212045E127A2AC15 +CA268B6C40CA3461CF4A8BD9D95911478828F13429676658218462ABEC668D4D +8CC8A36E04E3A66F90268F53253CF1E2475754F227371029C0144EBC4057 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMSL10 +%!PS-AdobeFont-1.0: CMSL10 003.002 +%%Title: CMSL10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMSL10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMSL10 known{/CMSL10 findfont dup/UniqueID known{dup +/UniqueID get 5000798 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMSL10 def +/FontBBox {-62 -250 1123 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSL10.) readonly def +/FullName (CMSL10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -9.46 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 12 /fi put +dup 45 /hyphen put +dup 46 /period put +dup 65 /A put +dup 70 /F put +dup 72 /H put +dup 73 /I put +dup 76 /L put +dup 78 /N put +dup 83 /S put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE32340DC6F28AF40857E4451976E7 +5182433CF9F333A38BD841C0D4E68BF9E012EB32A8FFB76B5816306B5EDF7C99 +8B3A16D9B4BC056662E32C7CD0123DFAEB734C7532E64BBFBF5A60336E646716 +EFB852C877F440D329172C71F1E5D59CE9473C26B8AEF7AD68EF0727B6EC2E0C +02CE8D8B07183838330C0284BD419CBDAE42B141D3D4BE492473F240CEED931D +46E9F999C5CB3235E2C6DAAA2C0169E1991BEAEA0D704BF49CEA3E98E8C2361A +4B60D020D325E4C2450F3BCF59223103D20DB6943DE1BA6FC8D4362C3CE32E0D +DCE118A7394CB72B56624142B74A3863C1D054C7CB14F89CBAFF08A4162FC384 +7FEDA760DD8E09028C461D7C8C765390E13667DD233EA2E20063634941F668C0 +C14657504A30C0C298F341B0EC9D1247E084CC760B7D4F27874744CDC5D76814 +25E2367955EA15B0B5CD2C4A0B21F3653FCC70D32D6AC6E28FB470EB246D6ED5 +7872201EF784EE43930DC4801FC99043C93D789F5ED9A09946EC104C430B5581 +299CB76590919D5538B16837F966CF6B213D6E40238F55B4E0F715DBD2A8B8B8 +80A4B633D128EB01BB783569E827F83AF61665C0510C7EA8E6FC89A30B0BC0EB +5A53E5E67EF62D8855F6606E421BD351916549C569C7368AAFB714E22A023584 +8B1D6B52FC6F635E44058690002C6BA02CEC21C54CC8875B408A8BB84F445894 +5D6B3E4841CA20AF852A660FE9C832F773691DC6F7197FF3DEAEE97418A5ED2F +F2AE65300416227CD3BB03C29003C770CD7D2A7A2E4C1DCA193651C2CDDBF93B +966938788694BFB562AB0010268955FC3555E5984CCAB0A9B7590C77C9BC713E +A29E5BD7193A4E971D1752DDD0F0AA4648E7E87BBCE66A1E836C715C408B07A5 +9EB56BEFD4596706CF839BA4CFA90CAD4038C1E006B51913279A2C31FBEE5BD4 +A7D74F9103CE6124F5B439CB860987DF44FE17EF88EF1BF62C67060D25696BCD +94ADF08F04E349CEBDF9D3389D870D94CC05E393B3F4362A13A6A672EE5E8F5A +DFE7046AFE3EBAEA58FFEBA4A47BF61F92E2003756DA643CCF2C9DFCCAB62669 +E3C2A18D690B64D907F50BCA155A85E47C3A6954C6FF7ACA36D8DFCE777B7929 +5F5D5F787B9C247ABF13D6D7B4A8F06BA25CCB342F8A5071325CDA86AD71BA23 +8A9695C7D1D50D0AAC267AB7CDBA7AAF46A264B7B081B7E79AD937FEE4969FD5 +155A99E652461EFFB4BD010E5885631E2B2497D6B8C43CE77D7D47FE201DD46E +4482FFDCE150A1183C22C004A0AF0E1F42AA6804E038E1DFC8B0A3CE26B52038 +44D2E7F759DA5C252489E5525963D68BC27C82247BEB18818C7D4CF0BC5CC97D +8C701034B8DF798DD4CE36C3F8B1FD40B2DA14EA75583852875031AF8C909EE0 +04495FDCD04B05A5EFEBA56A8CAC1F57F1B8AB91FB25C81CD51EE69D6E0F52CC +A0E12CF7E3187D67DF71A599FFD895FAA7BF80E2E6B96592BE77AE96905BAF0F +F547355A36C443797DDA7C414AA606CF9153E03450B77D1BA4088D739DF55F07 +111B9E11AF37F45B6EDE6D7AC126E05886A57C83886DA87761BE600DEECD1344 +8A82BD652BE7ABFE6A0F50ED7C6F4EE12CDFD80CA7A5518692F267C51C3FE76C +567BB8DDBE09A2AF901F79AD02B435287CB8057B3D5EE6655071F67B00438728 +C4C3EBD648BAF650993AFE5E2B29074A99ED0FB725D9B8CE8B0292B08A280214 +C3AF252BEEAD30C88F72E322FAC3E9D78A1038F5DFC41F7BF1AE3744A0677094 +51B77C2D630B67853FE5E975A395C06A4D4DA744040B272C2B88D8B7ED3A2C01 +66F503C9DFD3C7DDAC865900D2A4F2CDF517F449851DB1963468D0266D7A3E58 +9F6B2A1843E6444274F16A9930302DACD8D2BC4588765099A86BCCD8A31DF0E6 +2853114DFF2D19F812F19AE6C2E419D7AC1BC024D1195074FD0C6717BFB389A4 +4D5428E7BB2E4F9E9FDEDED7BDCBDD3460805AEA0B5F6460C2FDF19273CE5BA7 +5D3AAE0DB94C6AFA8339646191C23B0149E7CBF136FC4C844E025A38935DF256 +0A0A6466A45EE8B9B23B6A055856FB084F87C73BA28F1883E3B184CD813C72F9 +233B78CA4E125ABD26F29B92CD9DF39D6FDC2A217E2B6B45D9B0A4D536790A5D +BC0903069565A442FA7466414D948AC432C6B75D8D0E1DBB217CA3DC38A52DEF +62E9D5AE9E753956C13819D93148C7683BE4F71B80BC066D8C19FC807FB1C086 +B49215DCF56A91A42089F0D063B9981925691F7DDE3237403AC714F5CC3ACA88 +DB2F1DD205578C00472FD70C8BA4F752E3923ACF3164D442A6B639902ED060D0 +C5777BC20F9A3BDA60FA3BC986C38136FBD2E8F910E32EF36377C9CC187F4AFA +CCEC423DB925B378522B748BDF12D523804CABA83CB5A7ED69FAB9AAB75EE8FC +38D9866E3754C4E2F2B9AEFA804044D878DED0E114EA0E9682FCF38F6628E63D +FE1C1B5615E54FAE8684566EDC4B616F76EEFD6207E0386F06D3BFFA26425F24 +303CC7C8A8D7021E7D09B202616988287838C3DBCE3179B4FB5C726E603A47F2 +8248CB508F327D1291CF3F08F7C88298DC2D0F778D24304EFCF6E074182BF5B1 +8E6551811FD6991971692108E289B61053D6DCBA2925B3903E8916EBD09D97A2 +C6D08E89DE4C0CDF7185E1E00DF456B249F0BFC686E04FDAAD2772DC2C39DD53 +9C23A41471267F53A87E5C2B8CBCDB66CE0B9844BC506428E6150B48D2FA6363 +4FDB2CEDFBAE0B7DBCE4D83E29B2955F8966272CB865EDB360C8A8C19EC62A29 +03066483E4083524A1E8D80FE3867BC1AA91753C26ACBE8489AB0E3330206212 +93E07ED473DBF457EB8489E66FB4B8ED8A9EA8911CF9308CFE3E6D6F36810EE8 +91CCB11BD548617B2C683C354452B9229E7C9E68828BBEC324420DF7C188CCE0 +FBB514547553A7E9B38AC265783891F42DA472388569C8E7594F7E8810895A27 +06E456902A8D9F65CA808F1FD475D011C4572F8A654BA01D67942226A663D179 +95149FFF41A9F55AE84EEB9A6A39C017D7E4FD6EFEEE7FF3CE847CDB064A4954 +9DCD273B810E0F259501BA4003A3EC1ABA6E13D24C0B57FF82D6DF077833B6A2 +7EA54801BA81DB961C261689C0887FAD83771E55D3D137AFBB21779397E11972 +6C6CA922F45AFA5C0526863A5AD8B9C0775CCBA17FFD37A44CED4710884DBC31 +5C9D3F5441595B86CF7CA2EEE42AE87896E9E60EBF5F35C2B7FDBF9A9CDAE262 +3F48396F0F741E9DDF1D4FEF75E68AFB020D06CC29B3A7B2ED819D1AABC12B91 +CA2A65F1AFDDA2F3FB322E0268DBBA024663E49EFF076455338FE31A16B04EC1 +797EAB0B49AFFB906A0690A1E8E2F5314773E1CCFFF43E6FB3875AC907F0C5D0 +DCB9BCC127014D472463560CA0CB1C2CE614D94177C7A52A5B089316689C8112 +CA57E35D716D956DBF9013B1E5B9626456B1433C8C15FA906458F957133B9E19 +8D46DC3AC015F7602538C2AE3927C6DDBACF38E59220C2F5AF36B68DE9117C51 +04CF7DF32B1AF55B87D1D8A5F4BCFEC66F63B32B6548DEDA3AAB06C5310E4757 +78AFF947DA22809B360FE535506A554DDDE5A6F2411246653710ECE5CD3185BE +730520A766C47E1ED01890059882BE1432586864E1A86A7F586438C8DD35C00F +021A741ED47E0F16DB6070ED0C50038632CA4AC2975578A8372A080CC0447C79 +CEABDF2BCD5E78564247B0F0025F556DA8FB62125227849EACFB724A4AE3EF57 +90C07A5B27D2E59425F56BF8AD84C5F5310FEB1BC73D536339FC2E6A5BE2DAFD +97FC835E0D52F680F80ACA37DB498AACF152B9B44626CD89E3302C3EE1623EE0 +F998FA78305960AAB9F483F731F5F67A8C963C23DB8E48FB804EF8B86FAFE7F9 +4C09641915FA7E3930AC922682313408BC1607C76751CEEAFD660206A39CF394 +40ABE2A313AB7D5FD6444E219DC5C26734D322BA268D330AC17959A390D6C8E7 +3A155095BDD66516DAD5D65519A7FB871ECDA77061EFB21F359158B4470EF79B +362C35C06B85C9A9505C8361939C6AC013F2CFE8EEF46FD8CB4452AAB3EF1FA7 +DC066557BADC2ADDDF7DDC2A0E1DD4A357E27A2073427EACF9B9035DA5272136 +7DF37E26D96ED4B2ACD60596E039BCB15E259C72FEB3344E3EEE3D4F17DF4233 +04C1416BCADE80BD483DD8C9AF979E1C7D50C4CF015870703F88B92C4FE46AB8 +DE6717B55C460C805B391B84333097E116F4A51F631FAFAB34CFC925BEE8B72B +C9FD5F5A79D8F2295FBFAE649DC6AB47794AC7D73431FFE5BE992F2B5AC67049 +B5208251C0E442385A9FACF25E3A98D7F5D4C2A1ABDC600AABE84769CA83350F +9B87F71CEAD3600E02FF9AC03C1B5C21C84F911511A0CF0111BAC7605EE31229 +3C526A79D943D92E1CC3C38ABE82D560CFD4172F318030852A5FCC0534B8B3FE +D7365987C8B48A072907B26CDC2108130A33233E8E0BB5FDF14FB55098A10EA2 +B51AD9EFB119F82B08D256D396D3263FBD9DBF172D43A90ACD1A31F3E89E8571 +74BE98B9560E2CD661A2F93C69FEA3FF26B00772AE2C2C24B98D3D122EA2AA8A +44652CCDF4EF4F01CA7D62A976E23E8A86291F43BFAF38FD9C325E70F9C36CB5 +A181DAD30156E98339E6A0498D3420B7BB3B4E651A9090D4A17604AE386273A8 +3D4AE8CC18345E6E19DF06BA848F203F74B161D6A8882991CBA7385F308696A1 +BEEB0130D938A764B98A2001A38489B1334025EA848CA44A116D64926D460D64 +01159E77EA7ED9ECE7BA77635BE564A4ED89315BDFF54ACE6AA1A26591D13CD4 +6D6425CA7933769B842192858D10998509396829263290A3A7CFEBBDA3EE6CDD +DF1E492AECDFF7941B53573F01F623CA0A5ECC9D05A3D0954F7AE8CE94AC3B2A +CD4E27519B2E16F033EB732AA024BBAF74626DB55DC74B1FDDB07FAE98B4AC5C +683CFD8744F361838D343B657EBF52DEEE7AEA7565C5BEEFE455DDDBC4DCCA7D +87D6D769C5ECCF14118A14A85A86865777C8E28F953160D5E82844AE54D541DF +550D5F1519E183E0C42BE88F0458CE8087F2CD4B1B49A8E9E3D127C4A4CB74A6 +2E73BF4CC317781D03FF04BC36AC0E4AF99E2ACAD20F6F8029DE8A035DAB40DB +17D237850BCDD05931FF4B0FE2D0B79EC5A88FE0236271CCB075BD194AA25AFB +3FB93A5206F61A14602E4EB6F1C31C654527CE0C02D04314DF9AFD710D0EBB9E +F8721B97F5FB18E27507E1F800B5509A58A1A8296C72B7B73F99B6CFE42E9C2F +B63B3555475E562672645CD374BCDE937A9B05A157FB3E74C8297507253E957B +1A9DC421946734CEFA3D5EE357DAC7E9DE17A5BDDEF6B2D2A740BC58128FC514 +61154664412BA1C05209EC992A77B7CA45AB7C0EEBF590A5B5652866008CDEF7 +124A3003AE6A7CF9DF3C72750CBD281358CD2FF25B162B78CBB971DB3477F8D2 +ECA3EE9CBC90323B2C236E375337EA0848CD7CB5781A2B0A42DE7E4D99DB2746 +0B26796CEE129D23C76794B7CE21C13C7D4A998B752C8CF43A4821B736EBE246 +D2A2BD7BA3351FBCD1B0A501EC1EAABE60D06DA2FE39BE1F0AD629769FDDC933 +F9D02F9686EC8C2D7455C26AF4DD3F6860B2289E3A30E1C254AD17D731CB73B2 +BF4DFE90CAEECE3ED0CD3FB4C8F4C7BE1C056AB4E9B95781A8968E3CC1010003 +75DFBC4AB9F6B27C5A9AD88D94441A8ADF09EB275E5F0E5E6F3BFEA0FA8C308A +8593ABA0645ECA8FDC3F0E264B35D4B0DDB86B93CD8A047FC409E18196B501C3 +B003622999C47BAC04FD1ABD8AD359C977766E9643EF3BD6385306B08EE3E13E +7DA5A06AE33D17A3D574C6390DB6E9429754B210F0C349C359559C7EAA2350BD +F61D4D8A92B1AF697BC620FA0351E67E0D9F41A95A47EE0BF210C2C48691901F +F905F65693DCB85BE412F097480F6A7266AE0A928729DA0F691CBFFF3B276EA7 +322BCD2206D96E3DAFDFB992CA8F2955F0E8B882729DFF840569D12E4DA1775E +523AA734552AAB6F2F16B89B39F1A3FF0E07EA08D13E612F201716C67F327017 +6C041760DA30374434808273062C1FFA2C47B3FB578807BC26537F542040FF77 +66C995EF3E8B08B09FCD3EE89C30F157158A739606D2CEAA26694A4F1CEA6633 +B54933141CB85C60AB262E2D4E824A3B85C2BEF810DD774F296AB37D0BAE7182 +5648CD18556ACB124246A75474B232D712C2358908B5D9A76F82C626BFDE01A1 +093B8FA6AA0B32F2CDEF737B28BC0448FF816DDB5812131DA0DD5979D77C3838 +B978CC3F6778A4BFCE9A7087EFB19749285AE4C92B99A6649DA349A2E0889D72 +6D4FC664522F06C8C4D86D30BA43ED4E42211217D01636A4E17E2A132D26F394 +EC34EA12D84594AED9C6CDBBC0908860F39B240FA7D7B3003DB10322498691CF +A294C0FC7ACC0BAD1EED3E9D60AAE3F7429695892D1A21CEBF062C6129B33966 +8B2EF6E932F9891DE6028B81C5E9B23278D35B7F0D83989BCBA25E20E9D503DE +144DC485F09A4EFA1268AC5E4B551C5B2F1D51E9B9B9C0FEE585204F869D0BE0 +7287D7570A12940A47C1F51AC6134F03B415C30E147C49F89228855D093EE55F +172711F37776E97A99CC4B36E2F10713E36FB279FD3FA5A0EB9F3938F42E2BB9 +254EB8F0C0F30391735019E02BFDA21D9813C6A22279B898EAF01AA892B14DC6 +5912B9275167AB46EBC420836CC1A5F38A4EB47C039A7BCA62BC3FCE4199FC71 +011DD6E5FFA0F3D7F04AC02AF91B9249B9F993AE346572329DA852115BEF8460 +B94690E790003586F473F37EAB5AC2922F5F663EE2C3C0C336A8DB71650631AC +0A923A389AC911CB215EC2EC7D50CF8AEFD59EBFFA53A9F1FFB7E6215F17093E +3975F186FE23BB5FA5474C11408FABD223E1E6F62035B5A5C1AEFD8899F00FFB +E729C2D5FD551E80716CEA4E8281660286A802AAE8D5834F37F2EAC46297E57E +993B09251DD7789D3467417E393B7DEABD06676B96241B0E43ED1A1A9FC3B12E +0D34B2B0792B79AA648FE9450C3B209FB6D7D91F50C52A5DAB0BC81A8B698BD9 +18946EFF691912D7348D48FE68CD876FC6F71F81165D0C3272DA1A992308D9E0 +ED6D0A4DAD679AF495F62B78D462B463BD4A40931172290C615B3B3B6B47E45F +CEBB85E0A6AB6832067CA6D403C239530D07F199788AA4DD52553836851C5228 +1072406F6D7323A334E7A7FCA588897C4FBA6D4F7DEB65525EFB74E539C988C3 +A685A98752F7198E77E456A545F0D23A1BEF81EF58B02D289CF980A3F17BEC8A +6F83DD90C4A917EB0E5E2B444A608E2E9D2FF80620E16AC1D7775C0A10C1299B +BEE0E1AB24C50647E5CA1DA65CFF3B2C295F0644CA7826E1DC6FADEA93D66A20 +DE852F20AD224D28DB900519EB1569837139C833F24B799F7EBE3FDC14235323 +1D0BCD4991C861F38DF413A5A5588B73AEC3BBFDB885CE17BB3E97B4E6A79761 +93EC8418C2BC4725CD61B5E30C07352F647C3FD50083878C13CFAC241DDCB082 +E53703D182068727F9EB6FACEC25F6D901D7309ED7370867E34E267519E22D62 +4FC7093448BD0D6B1C43D318A3E14C92032325C132AE0FF7ED707E1FA4A955FB +F5224BE0045CB14ECC321D0F333FE24EEFCC504F7C756451D7693C3E6CA87526 +4912E1B6DB935BDE76FBFAFCA4ED473F1D2618812CFF25A6859C626A216603C1 +361BE3E071FCFEC2D4BF2FEBDE07DBD56A1BFF8303901168FA06488BA6B76F36 +95B0A90D7724E9ADB567C2ADC65CF3482CF47FD1D16F70AA19A97D0F9EFC611C +AEA5E1ACCDA7FB2DF05E9480936281484BC329F0B771775E73F7FD72FE3F45F0 +50ADBD03932B38F37A8F0A66B2F739EA3AC8811C8F514E68C5643E4AFF485C81 +88475A523D7FCCA5C8809BD49846C77795A38DC6406082000236A4D2628B5932 +AB7916D44EC2210CB941B1422DEB13896DD78CB7B7F400EA5A6CD639D9CC828F +52311A11F2A84E566DE98826F1E28D55FB08ED70950205DE52C207CF14238446 +084FB4DCE04C781858BB4E0744C023EB0B563769751AF1D807EED20E4AFFDC46 +3C1510C782FD92902761F7557FEF701AA67B20A9B019C760B2BBA8A048BA3681 +35DB440925CABA05B8A13B2D30D14FA875D3E200A018C78BE2E930457BC33AD2 +FE3610314A268E9A30EB41F7C771758410E7D1179567B22CFF76517901CB7805 +FA27AE1A2E9ACFC032BA907F1AF9F3739F063D8D05B59B2A9DF0298F4DDA361D +AB34185C68A03BAB8BE3D59EB3A023876736CBA133B1C24238BB910C11D2A802 +4C89FB5DC745489AA54CBF2A115403A2E98751715251D4CF99D8DB478D5DF8C3 +99B81268F3A0B7F1525935D612E451BA79C3718B5791AC67DF9ADFAE70D5E721 +38B593307B759B93438FB3E33D96A0580B31738D67E5C5AB1146586CECC08760 +14AB760C7C21AAEFABB7FFADFC6389E90076DBCF3BD5F74234755BE9293363B1 +F7EA844934135DE6DE4D26E7F2C99C7E1164A2E3654F90B813D1453D986E2405 +2EA180F0CEA444B4857A747EBCFC6DDB637486F5A5AE16148571E499D182BB81 +DEB49F6CFBC4D18746B5697D8AE1F5534FF6C09B5C5637A341FB1BB23FA18217 +77D26349A9AC48EB629DC410166EB663CF31E3093A55663BD38E4F04584FA60E +D7C7425FB71EDEC1C80BDE47B3E83DE0851C5106ABA8F35EC0188EFD92AA691F +AF721708D14F8CFA5AB6A1615308A033EB3CFDA0F370EB436A5AE5C44511AB17 +076BD3143DFE029C8EAD5D8A5543CF46DA7BF981B40FE4EBB9491A397F28C1D6 +247A3C4671AA2B7BE8CC6D33D8396AAF78EC4E706DDEA0667C6BE0F5F12C1FE5 +084B2B6C597CD2C063F3084A57065713A7022E38388AA2FCFC26EA5ED708339B +22BC369EC09120D4BD38332B233F979E5C488B20DF8DF204744381DACC167EA7 +5508FAD00D535763EDEBE25251DB37170511E101A84F8F7942EDA1155EDF9B10 +68A4AC9924F5457CD7A6EDA332A3A53C53E2F52C0DB7B9DC05696CA66332E95A +13C227FD6C61CB97FB562C26C291810D028160393DA609500F37F14F1AC48B0D +89A09B8F2DBBBF5670E9300283AE5AC540D4C45B3E3C63751B5F14AA05124BFB +787A0690AF15EAB81F9D94845CA695DA88703376A6B1D2A1026507A5109C1A1B +2A189F1537A35CD611AE034B1AA9CFF3F36CFAF9D74F8D0CABAFCC25003BD095 +D310D8646D8CD531A6B0565AD4961421EFE59555DA8386EED0FDA0CFA59A2E41 +7639F9386417BFA3B4A7FFDE3AD252804489B074A9FBBE07FE42B557B2334A12 +76591D9907007E9A07BE6D7F66F2B3B96A4EC3AE3752214CF74C1BED294FEFAD +A0610FE99D3910107572FB70A4BA0586077A61315ECAF56CCEF26C7C6D97C581 +01B71CA1AFCF5496195814C0429BF0CE653E901EAE38EB76557B37E65D53E05E +1BA563354764CCAA6D938C516AA8038787594291797303D2E8D8ECB5948EB632 +DA40ED0DEB1F00CBC50C48358D7AADDD364C96DEE7260832B9673CA921E6DD4D +F3A67CC937C2D4BB22668D131D79365CE9C060FC3AF0E91748E9B794A19817C6 +97596DEA5ABFC3C7487AB58C62AA9F3BCC70637A417AECE7A72667A918AC43E2 +0818846B93CD5FD08538BD6163B4B6F4C14AB9EAADB180176D9037898BEB18A6 +233F14130B020603DA4AB501D9896C070839A14124FD96F9AF09D7A81786E976 +F9609FA0B538BBE52DB0AD9421173210852F5548EC8701EF5D1AB5EF5E52E2EE +14067CE07244EE3A0CDDF811B66241F775B00994BC9FF19B86B5271507475DA7 +94F778D791D466329AFE809E4D674EAEDA78576DA618286F48144D1DD6035305 +95EB92DCEF4836638876793BD718A1370DBBAF742CEB117C70EC52EDC7AA6850 +CAB66A51919C3ADD670CD8F054EEFC739034C8EC408D1486D40DA29F2D571A5B +79423563A95D0748C158BFFFB2AC0AA4F168B466B12A52EAADB1800797A79CFF +D793F95CA2E49570681A16A807036294539198CCBADD85DED868C5A3D75C9545 +17523791838529514AA22D2163919884BEEFE8812A4E83C47C9F9661295B4FF1 +309EC57707BA268F7475F350368A93CAE64A9538953969C0E1D4508D3283A6A8 +475FB96BDD92C2E4665925ECE5B6215243CABA2726474161D8617708952B34C7 +090BF0203307E38B07DF33EAD31B6310D3D6E3B8577C66BB3B4582F17750CA0B +05B0B84F990822DECB3DF4CD67AFAE8898016EDAF6168364E038A952D8EE6065 +3589E36AA1F9908B6969429C3E4C9366A032613A6A12360C06648BD306D7CFB9 +1326C2CF718B38502828FEF7550DC7C34125C0BA247886B4F9045B0933D64D96 +96E09D7955D68F52E5DCD78650BAF14255BB291E5458A50DD3051E30B17941E3 +6CA9F933FC641646400D02423BC26FEC94CB17600E24CEA1AE03FFC757043849 +515F8FB8DE6E41F3395CEFC8F33259F6977A024B98DE7413C15732798A9CCB1C +BB369041FE4075D04CC2BD8F11F8EFCC9AAC2F21A04C38B93612C4E50369A649 +1CAC07D5362BC88E52038E11ED55FE68A1BABD253D61A9F5AB6BB0939CCDD8A6 +065FDC32BB6A3F4715FB0C204D3A89DBDFF23FE625AB852F889D5C150CD3D21B +5490A90FFA8BEE76D938D399267D8615ED94C15E78D8FF22462ABA8A9A8ED2FE +EF1E07245FC1D657AA227116FF79F744A84540BFD3E46F4C9D1E9C6203629726 +F52129A664140028CE71932143B164EDE92251CB958E2E275B1F92CCA30DA6D4 +282537E96B51177AE8E42E31C2E37FD9D46C54D8961A1D9324E787AD1F691B57 +D7B00FCF5F246CFDDE0909E4F27C8D498FE7A03694709F02AC582C44439DB228 +D261FFA0E8CD3A325273985FFDBA3713E988A24B0B0D9E0CD78C7C46DBDF9A6F +0EC10623D4469FEAC3955B6BBE60612B54A432682CBBD4460081EC60AD91CE41 +C78982297E8FFA539FCF5E6004481FB8BE804548EB9AC9FED4921A72BDF7D622 +84B63FF4A6B57E9BA917514B83352095761EF805DD50136719A178360DE95AF2 +D8B753FC58FE737A098A7AB374806CB866A051A355702D88C6C8BD1AD8A10A2E +298EB9EDBA604839099D34ED16168F9526A21B264BBB50B7885898C86DF6C561 +0D3FC16A727BAE7321E598C936DBCCC93088CBF0CF4D5D2911479E3B149F0E45 +031312B0D2D9278355C330F6501F70CEEDD232BB7C2AD7155DBBADA044FC9475 +B6927EF8AD337B2897A27FE59DC59C42F9EFB93C68A892913FE62F9592D88AFC +A5584446062FBF20D959819038F5F286B38431C2927EE914AA53FC262F5FECD2 +5C98B8D9BB25C3590C5BE08A73247A7B56C2DCD15155CB4D64DB83D6545C37B9 +7454DC342013A4FBA22033AD1FE40E3EB03544F985AFA427F7357C59667B806A +6AFD584340B5218DBCB76AC1CD195EB3F410225AC0F111A7AE786B832E730EF4 +49FB4AD55B3B7684889262C35AFA6DE85F8992B30FE514217BF48A45CD0424D8 +26BB690432605575AFABF729071B3B2FCA3BDB9E89C3FA92F6E53D3D9D4BF40A +74E19202D19625ACF34698A11A0AD8AB9663E44F32856EBD791EA8831DB449A1 +54BA004DD23167CA8A83A9038002D83B632A3AF8EF94702C96EA8159E408A08C +B2E287C5B602F1D6A1BECBD11F25D75DB60D965F5D260D9E2995415F4C96154D +160B9F7EC4E7276A2AA30D013006A4AFA052F5FD974B6082A015884EF6134C8B +04AB3A9348B597D9AB86A95949E3536502AC8EFC6AFFDF25E570018FFD41C026 +3C9798F8FA888CA4FBFD1DDF345218CE4D579A2D417BE36C5607C2534C828172 +A8097642C1D9EC06D67EAB4AD2E6C25FBA3C111DB923DC7CFC4E104A5A72EF28 +2035D339C9458B015BA99605E3BB9D69345C3AAD288119C4E5088C4BDFCD6ADD +9F3A0DD2D6DAE5C2E929F5D789879E2903CB8EB9DE86D5DA10130D005FD4EE69 +43EE1044194D2F8BF9C5D762A23A56B6DF8D9ADA8925A847F06E2D0603127172 +C776BB61063A2AAA4E817BF0AF87B2C106096E0CA57467B4913744BB8C222D79 +62A376AC13A7B257F85D5223B6B0748706E2043E8DBB52E3C10DA74116ADEC2C +B595AFC80AB39145C296606E1550AD9CA55C260D0DBC67D56120EA0C84392C56 +013F095E70EB4E72B1C47FB0AE04A1C376BF67F607F5F944B5491D52259BE39E +FAAED8474A5DEFB33D98D033EAD9FCD7DCB1FEF0DAB956FFD73C8D0B7E42AC99 +69BE895284B6868020BDF853B1B1861E8EB6DC4F58D0223E785BC022A3E653AC +ABF4F2ED813E15ABC1B3C73A391E6EA54BB1F75FAA15D70FCE08795F64EE8538 +C94956B41083F438950DAE03F0A7BB2F757DBD4602EF8142E251072240F2BE0D +2642BDDB51555BA53AC4586EA084447ADAE8966261EEC7BA502F6E795FCA21C9 +257FEED3842DD00B78CA1DB4673796FAB080467B3BD8489BA6A294729CE192A9 +63776F9420A69211538577BE81BE864B6377F2D10D57C18C3E0D42D357AE256B +B32BB476235A22C15A5E81E60B9AC6C362F1104F1004F72FC48EE8DF34F88064 +260366526985F953E883EA7F2EDA7685CC901A9D9D38B55FE3D97012D9879EC0 +1F58BEC344C5355AA1DA5695ED1FC3F694DFB862AE16760B6CF51D615E6082C7 +4174BF63C3E676A29810461781D6E564D4C2333E1C34FF1FEBF8C408D38DD6D5 +E691272CFBEE210BFAE8F5F752A36C017F248755FE3BFE7C0D8519B5E54F2C3C +4A0A7B10D01B9E1F085CC68AFE86C51DE7BD646488A8B253576B157D490CCB62 +F6AD2EDB1C8CFBA78F9ADA84BC10D20048C085718ACE6D357B610A707A6B47E2 +C0F702CC9EA532DED8A164303A0D3D1F2BFFB9857045CABEF3C0F588CB4A2943 +77CEECE9CF8E3CC5334A2A568DAA888C01F4E3DB32C186D05C0A9CEE85205815 +898D52102E42AFE02A22B2A6A3340F1AC41C70826CDD3CDC763253FB45401E67 +5FA13740848DF61F10C5FBB66E3B747FF222D45A9A51D740B3A9FCC5B4139D67 +0F095067B6E5B395859F9445A6784D1BB9644A3DF9EC65F5D2A67533C1DE70F4 +B0ED850678AA4B4AF5CEF0D470B7C3FF361CB5075F67F213CB0EE1A8573E6BB5 +7A27E3AB68E1E14E9FC007272B02E945A306E0353D9D2380D1C7FE7727D0F445 +6F052B9520AC661A47F9A04F987750DB3D244F9C93EA92C2A40CC751A9F531CA +3948B4572A19CA583B62D2FCC389ACB3FE434E2BE9755FC56DEE41BFEF4A7410 +D63679719D502054901F8C7920892239EC25C31C3921194034187F6105173BB8 +A3D90DF3AE26F0A08BC7FCEC23016879063AC946451DF0AE66A7E4EDE32D48CB +03174C819477EA02F100A05A17D9FC92C698D500FF43E2307D6DE5669238310E +3E238ED8CEC1144088B0A94D82C70CBE5052BC37C7DD988AD0CADE5D01A3217D +131F276240F1FD5370DB5115D333C1FC65DBA0663264DF19276C25109BBADF02 +2BB4CE8F31DD49B5F15559186214BCF32E458C56F69731393C52A64C05C8826A +C96C4BC76FED847B9C0CC9BF31394CAA0C420C4D94602AA143062D48B0C71CF0 +AC40B52AAEF7BEC6DA87EEBE1452F7B430C1C2A08737BEBB5BB6E9EE7F706C43 +4F2E286084BA675876D00DA1C27AE89B20230D36E8D1EC8EDC520C241AD505C4 +38CC5ABF4FD5F5B6BD5B1893CD5166E0BF04DC81FE35CEC4721E1F5F380C2F24 +9D05E37C9BF64CCA6A95A4533F68125965FE4D9069A751489B937BFA454253C0 +B6C13F04A360EDFB36B3B17DCE39E6A4A19D4869483A5B142C781072CFAF2D94 +159B84801AD08F23FEB80878FFF29AA2FD191559070831D3805B6DA9B18554A6 +45E6D7E57C5E9E29D4FADFC983411B39922660B825FDE0F71EE12429182E0FF7 +67418B836E8AE79430A6CB937C32B35B80BDEADB9D236570399E94850F5A18A2 +2075DECD24BAA8184EB9FEA0EC9F2E055A43760C8E0E62FA052BA6C3625C1819 +2A7E601C656CF7EA41DA678861D6D5A83C34E4D41A550BE9D614852C62BEC8B7 +625E510D16796451A79F4041BAF27F33DCB056DB0E70A29F28F0DBCEB869655E +CEF5717200A06922027A5A30C9295A1CFAAA22A2777B6DB6A196C092284540B5 +C1F82CCD7161ABC0ED164D1A6D1493B82912491C23196D994E807861ED28460C +5B9140D6F756A565719A8DBDD4A1E9D8CB40BA06285B3D3DCF79F180E5C45147 +B3193C49B03DB48340EF2D9046AE3957AAB282B2347ABB43E5E747DAEC5D8455 +401FBEF7AEE3D54ED6CBBFDDEFCB6642A2A230EE6A15318C44D7343F0230AEA7 +9D6BDCB7805CED3FDA57C3CD466B9014F89ED4B5A9000FB13B0F5DC9AB75AB52 +768255C4F17A3AAF05B341CE41C769FE8EC787C22133D3FD0C8BD0F353518865 +68A5781043A367B035CAC1BFE7A440A72085F5B782FA9FDD2EFCA376F9EEFF9B +B49BADF01746836C57B783C8228B393BD1EB97E75FD9A82F9A6A0E2FBE8D1F25 +AC5E23C43961AB9D446CF0D54CD926D1B30D025B2BEE45FBC2713BA92EF31419 +7FEE59A8548C344D31A3EEEF58FA66C9F1B639DA472AFA6D3EF7DD27263D4991 +54B73C122869C3EDB7229ACFC865F69B2654EDD7E36A036D9DECF0AF073A3DD6 +7FA20D79289BE45B07FC07663B3C5522E7189D21235C253C1B626B7B9D661496 +AF057D290B0F7D2E2D321F6942088273CEA890F53BC86F56A0476B5B0CF6963F +5FCD1373D9493326A4F4F7D874C882A359B74C8FD33D4659B92B4E3AEC418CF1 +6A7F014DE126300478E92A5A7571D1732A38A34C158A94DDD2D61DE9CC7ECDE4 +AD98258ECC73C5100D21C825A8BFB291A44772F405DFACE0C9D47DBB9E7697AB +248574E26F303FF92F95783B9BDBFC1167D1E44E3A81DA8DA7C119A9F74B794B +BA51AA8E2D24E00263AB7DD41165CB3C26A06A9FA32F636EEF59A6F1F4A3EE38 +936FC137DA37B82EF5F9C95318C27FC900659A48E0B98625B00ACD3EFFA6588C +B2D898AA32F3FC6D6115C04BD57FB4A132F5046D171E73D4B6352AD4D22EF591 +753D208AADD4623AD408F490DC41EB8FCD29AF0580DC95B6A7A254D94D1AFCF5 +F2DABCA2A407E66394079EC9616DA3084F74CDFF526EF8B5338337D5F7DD323F +E4474BE07CC66F03D008E99F00084714AFB764158ED48090F6B5FDB768805978 +3A2247278B0CDBCFFE1050D424A8E87893B466F526D2B496D683313BA6CBBD8E +C3A61177B575C70A084B5197A370FA21A5421D4F5735501B21C4B75186F1F753 +D9AA778CEA1BEA72A6897F5696C187C606B1C16011BEF3937CA935541BD97DDC +449E7BE42101F2128B0052D3BECDA392A8C619402C67696357E70B8E4A03C5E7 +22D6C67779CF54FC6E32174DCDFF354416D5A89B7E3CFA20495ADA8102130D4C +CB8C85334605E0AFBDFA13F14BD4DFF236FE72F48875DF249401F4D7254ED2FC +F87B8A5688F50EE4852EC4841D5F0C31987A06905FE4EFBB2F699B206AAC1877 +8645DBAD979736EF8486EA309351B6D5CD92CA41AAFD91A8C05C7CC6990B8DBE +2B1B3A222D53B1D4EFDBB9D9D8674C77539B6E852AD34F1A3971CE9CB379B381 +25EEE09E50AE97CD2638885FD3F8F25AD8081B298B206C30F4319C34FC91B532 +C93D03A19EA7EAB9A71D733CD2C7C2B623D58214B161282982855996F855A0D2 +B540549FBE2FE586E8447567C36BDA6D77EEAF286184572376A28A13E76A13A6 +6B012FB1D820520134F7E52C151EC2BD17002B83E4629C04F3E5DE30A3AE03F8 +FD54C49EA8C7588F8F8B22263BB663B0648D94CDD1E45B1A752CCA4A54A46EFA +A1A2EF7ED93A0CF0E9C42DB85FD4D24DB03D75B39E034F3C0AFADE00C025F63A +4175AA1573391D94C70AAE9B18AB8AFE9F3A7684BC6522CD63EDEC2BE31B1558 +ACA5F0E9A6EBF6DE7F932A925B3F0295DCF8F42DADC5B82F563417836180C501 +9CC86EBFD0165D3D5A36E5931FA09FD67B2AE7E160E1776893744406AFCC0D8D +88CB84A53826EBB677FC6B7E19EC14544E2AC2F71AE2AC1CC81F3EC30FA53060 +3F8376A7E97952D42A8207FDA96BA5B54F80FFD6FD7C510C15AD3F36B1B68871 +A3A29B73E59402DC9B0734AA48D45E01993F929B0536AE7B9EED7C8A1B8857C6 +34408F7634B67DEA1E1F0C7B3E69DD8C708B028A2B01174EBF0AB9599B08EB39 +1E237422046D9868361FDDF72E3F89059FFCFE7577F271B4FA51116FB2CEC639 +13AC8DEF722DF26BE4FC91665CBC6D4AB2B6DAD99FD2D3F177D42E1CC0978C8E +C2AE2C06F32BBD9DF765EAD1C4A9DDDC692BAAAE616523E29DDBBF12654191D0 +59B05FBC99C90D293EFE501F5849384854ED8306D5C078BDD453172527FA3DA3 +370C451B6CF832CBB6AC559F5BB6B39EB428FDE992B2CC3FB1EE31DA9E707000 +BD8FE099797698D46E085D6B51FD3E71BC80A691CDD9F7CD1E25EA3BFD7F14B2 +54365BDB8E03AA0A586807ACC892CA1BCCC8324A01BEC2383E671FB7F9E813CE +F2C47395CEB94573BB3F6C9A9AA983CD9DFF57D74B427660050FDE9ED1B316CF +D54347D28EBAB313C3D67C0021943AAA26008723C1353ED8638714AE6B2E9839 +CB96AADF278C4915DCB843E768A4B5D65241A0675B14B6B90AADE94D7B84D796 +891ECD7D1559B6C16E01A39FB7F421C74EBF305488891C99B514FE49F1992EB8 +5401795A7EDFC84652941A09AB5A195AC712326B68778610258184AC79DA20C5 +F57C812EBD28EEBB0472616FCA22FC9D25CC8ABAF3118F891BD2C39824A41C2C +239C4C7C68F9D407F24164BE5CDA92606BC7DB79B2808B22DD1C621AE54155E4 +E7083D57EAFB74221FC4FEBD9B20EBB88658368FD86485770E043333D711B877 +CE3BC7A8EE7E80D50CF48834A3D3B462AF969D04D6041B7BEF4BB80E56A04DD1 +81AEC1B19F0152D4143506782FE1AF64E5C5096728BE4695B5CBFCF8A8B5DF82 +A929C82E3E5C824DA55127163E668DFF9F1BC8D31AB95A3C474885E5754575A1 +7195D959CEFC2B0E5A82372EE5B315A27665A7BB489DBDE7EF653B2660DFE657 +E4FFB017376B62B88A00E2507A149D3683CD23E84248F318F26E9469772BBB9F +DDAB49478EB11FD0964A573116D94F8338EA686BB68017D89CE5911162AE5985 +C683935AC9446F72A92211E7E56C434AF230775D22E19A857EC8ED76D825754C +D8A0A5264C54761E49B6D4EAAD652E6D5E754B9A3B3DA4DF3E0A7FD06A2A04E1 +5AF7502C3FBEAD486B8B31B93EDAD55159D39119279761B18FE2AC4ABD9F97D1 +7F4AFAD6C60DDF0458F49D1A9F0E68278AA94C11D9A6A30D6938E734CB4FDD16 +36A8CA32612F995984F9B90EC9D22D0D4ABF8A9BD10F701EE8034F7DC40459FF +B0753DF686A7B5DB75BA4E70CD7BB8ECECB491B9A43A8E93FB4BF1BFA19FD039 +49A12905C976C28C1575F756A8CAF785059D9321EA37CF995CDD51E9246437E6 +07BB805FC4F7C5DD09A009674D3973F49EE8D48333F8F013F3BD82079EEC7D6C +8824C8E4015B43D67C55300E3BA1C9FFA4C02C994851EFD26468AF15655A7767 +09838F0AD3E0501EB516FB655847C1BA4FE8C2151F1018D91C8A61C477A965D0 +CFBEAF56C8F507727DF7A9EF2452D195BEC9F39A6CF8FF502FC723B70A36BEA3 +4040DD7A4DAC8074E19799FC4D70D4BAF0D7AA67E64BBD2B0D3473E1C30C3F85 +D7D598B7C66C58480D64FE7D0AB720D4103EBF355FF28A39C18B3F73DCB1A0D7 +A4913A802711853285F072230C0736E414BC3ED848986E0C0CCDB36324822CF1 +C8E8AF5FF4A95D25B3361F9E4BCC2BCBA75FFBB99090B92E766368CB7A5D664F +9B533541B3D31252B0C4D8EC2F94585A9496746EA801B8BE21D200B5EB53E801 +DEF4B0C077DABD6B3F1ACC79BC86CFEF776FBE58504314550FC5F0C62EE4BD3F +30C41B85B9FF225CE177B4F59312D2E147CFE4794B95958BB136F673B03D86DC +ECB4C3797FD01990D0F4F31365489C54D00E6A8431654C3EDA912B1DCA6B6046 +6CDD53B2C790A44DB3E78C7667375092605E2F346B02DD54C624DF0A1E515B5B +C01B0A007D124D01C06BF5D6CBE757E77188A3BCD1BDA52B1E6818490B27F0B4 +17B333200E2E230AF0218F32FEA43FF9AC871E1EAE4D3DE9DB566FBFF3FF83D0 +01FE6657253A734B5F0ED966A6B8E5BFCF0AF27958C1CA8950F5FF4D4EA4E6EB +20A8DEE161EF94070394E1D903F4EFCF72773519A9F03D4799B254BBE2440945 +6F23590D35B0B8EB1F74EF96BF0FD8651A2A9CC3FB7B12241003B6D679868ADA +0ACC5F19131220FB167F28909CE789213798D0D1087C4FE5E395A4E402134E50 +01BAB5D66ECFB2D0A9B08AC076EA28E08F9B23B6AAB48B81863033D28D51181A +559FAFB080780520A57AA7D880BCA67A66235971B4AC13F9EA518EA159AA79CF +D874CD6C92F75EFAD168943322B4C6CD760D23DD5725E39E39244E499353BE4C +0B5962697CE6B3F91836006E6DBF57FE202BCEEEF10C506FFF37280A98988485 +C10BFC0EA8EA01678085AA719A8B583BCFEA994585C6F202ADD0E1C9F95072EF +2E4B05806FE7EA5FE5958F7C302B900F62F8D04E3BC190F4BC7DFE51D8690574 +867FD00A589C9F3DDEDFC13418BB3F8B4E08DBFA36AFF3C71C6AF45924E48535 +27B6718772BA4A412BB698814C7507B037C628C3A41A99D4F1B4114A42E91B10 +E70D668B951C96F2392B5683F9AAB1F5349A30F73E4AFC3FF8E7F34D40B89074 +0C1F8FC10F3F73CAF36F38F2C074E7F41233D6451C2AA290DC869F461DE35803 +7A784DB838D6EF78B651E3CD7A5DEA6667962086D827507312998264C84AD9E1 +C39662E04CFF9DC5059F7FBEEA4678789944C078973E25214A7515485E7E086E +BE742EAC82565D42E20A9B93612D24A52EF1804A1CCE5A0EED89ED0CA21400C7 +D3867C05AB56B25C8ACD4BBAFEEF1CDDAC327F38FB3F8745471892E0CFB462F7 +783D404D97B81E3C830925B60DADAAF96E88CFDE8EB64E1E18830639DF6F6122 +2F4336C16A134E941E86C57CEFFCC3FE1856BE6292257080855AE7942E450561 +ABE545D68CA8C58554FE4943BA31E95BE3B422954471703ECD34D3280116EA5E +C8DC1409B67475A2DC4190456ECDE536073315B301A723EE59734A1849968249 +6A07FEB36DBFB14C182D9527B083FFB800A2857B6E3D54A14D65B8FCCB3893C7 +60095B2D100D88A8E56D21CB18DDCC32CC7C375FE16F243F803990CEB8A9B1E8 +2C4E96016325D46052AFB7662A72C0A6962B72ED268AE77D1CFCB44D89240565 +1286D8CB73EB596D5A745D2753A949C9033575C1DFD48006099AE09D4F00C5BD +7994228D24ED46E25230B81EF53D05E2BBF1C4BF75A6E18AB871476DB304E42B +CF24FB70CEA5386C26636AB9362A458DC1C2E3FE99 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMTT10 +%!PS-AdobeFont-1.0: CMTT10 003.002 +%%Title: CMTT10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMTT10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMTT10 known{/CMTT10 findfont dup/UniqueID known{dup +/UniqueID get 5000832 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMTT10 def +/FontBBox {-4 -233 537 696 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMTT10.) readonly def +/FullName (CMTT10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch true def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 33 /exclam put +dup 34 /quotedbl put +dup 35 /numbersign put +dup 36 /dollar put +dup 37 /percent put +dup 38 /ampersand put +dup 39 /quoteright put +dup 40 /parenleft put +dup 41 /parenright put +dup 42 /asterisk put +dup 43 /plus put +dup 44 /comma put +dup 45 /hyphen put +dup 46 /period put +dup 47 /slash put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 53 /five put +dup 54 /six put +dup 55 /seven put +dup 56 /eight put +dup 57 /nine put +dup 58 /colon put +dup 59 /semicolon put +dup 60 /less put +dup 61 /equal put +dup 62 /greater put +dup 64 /at put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 74 /J put +dup 75 /K put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 81 /Q put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 86 /V put +dup 87 /W put +dup 88 /X put +dup 89 /Y put +dup 90 /Z put +dup 91 /bracketleft put +dup 92 /backslash put +dup 93 /bracketright put +dup 94 /asciicircum put +dup 95 /underscore put +dup 96 /quoteleft put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +dup 123 /braceleft put +dup 124 /bar put +dup 125 /braceright put +dup 126 /asciitilde put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794DDF2E5ECEBA191DB82B3 +7A69521B0C4D40495B5D9CE7A3AF33D17EE69979B82B715BAD8A5904C5DE0260 +6C15950CCF6E188A0CDF841EB68E5A2F88253E382140F87C87E55C9EA93B8C89 +14A36CDF630D6BE7CD36DBDCE22B21778E8648B97B7EC6742EB5114BDF0454B0 +0EA7B1FE236C84C0E5308C871F67B973892890557AA12E00B2C20C71F516C397 +3F3BBD14A1D0149CA064391056E45E9470FC7F6F556ABC82653B3C8049AB5CF4 +BA83C8F2158C236B2FFD4208846013BAF4165E8BB8D334C8FF2E8D74AF5DAB2F +D44788869B08399421AAA900ECC6A2D594641C121660D4B5F512938994C18DD0 +FCD9B008F68F0351D21ED735B2740CB1E0C1CCD25EB548C35B844601D98828DB +556F71D07E081A593FF12DAF83676492A0FFE16E95717A07082B43A966C1EE8F +8A59E1255E1705C43A23CF29A5E4A6547C93F1680A870EE7BAD8CF74D838CD5E +F806911D8FE4262ED8E7F5BC58B92C9C6D74F8AD45FBB021EC7E97393018B9DB +B1B84E7B243ADB05ADD3F1DB3692ADC5D47FEC7DF93080669E63281F1576B673 +125EDF08016664BE73364F65389F7C3B66623AD1754ECBEF9E5CE6948D933787 +A5674279ACB2EBECD3B4E6361419AB32028A27670C9F3E18B746A10B00AF6D77 +4EC00E3BE521C02A99AE5BAA98F793EB1228952BE67934B91472E01AF7B816BC +56D7F19F631A1927846D800C107B1E9CBFF9D2DD513B4A8CE2E0DFD77B1ED178 +E43FA7052765E9FAF89989D490D8FEF6C536EC0D4AE27A74F474B98DA9E6B92F +15E063DB260571979A5DE2423920CE1F59F56EB11E00E3BB9D466A8263E1E385 +2014BEFDA8D1EA3EDA04BE32AEE6CD15C5C010A1DF7F705A2C0C18E87C8DCCE9 +05D9163181CBA56C0FAC8C06A2990554C8E759D076B01BBEADE3B5FB8B551390 +6C8E4A2A1C6E7D9C708614626F3770C0AB7DD2027469C77975C27576065862AD +04E5E50CEBE907E3E991FA0C627302C0E207B4D5992BEBAB5853AD1C0D271728 +C76F40A79392ACCA7358F948AC65DC823CFDA59E1FF69CEBB6B7EC3CF21669E4 +70D999508F9C49E2D9F8818CA53C977D93E15FBBBAF75B1E84F0BA62BCC4BAFA +4EEC82D804C8A8C0210F3E5E258BB1F6921AF02BA9861BAD5C3D5FC8CEFABA8A +A607E547B802096F7AEB09FBA99C83C9A494B94408DD607CA6561A6E6660C473 +62CF8D35F31D052F6C6C8138A8E1430CBA7EA6973D6D510C1A06B3FBD79D9364 +240C1A00272DA44B89A9FE8D5BF36DC1B5EBB4A78ADBE9C5EDB485F093D9517D +69E1AC9A8E6C9D7C324E3797CFEAD9A18E82E03F69B2CED7D5DDCD1A218BF2E2 +ED2293AE999FE2A4B5213A10083EE0407BCF8007670B8C737EAB30311C868D84 +121149ACB4A27F3ED6C0C181C98AAAF51B105F264B5672D7F745131ABAB5BEA4 +0C9B43C0DD9116D6DC61F90BE72018F290D26D5E9D341055CAF09C9F45333CDB +D45B7954271767F638EEC499F7B53C2CC5774EA7A7F024C4CABFB93D9CB1856A +0C671A4ECA7C62EA5242648A84E7F3AFB9547A0AFC29593CFCE6D8B873A78157 +D337CABD291431C0A2CE1F37E0CD7340567AC206FF98E4B5A6410F70F750451C +550EFB54AA259A1B236CA9CB730D2CEF125EC65D959441F7CC9768F777B44844 +CC9842A307C72B740680ACBBF6AA35FA7A94825069BF7696ED81A371A9E5475A +9D997F2DFAD339AADF797F7E03E654234455AC3D17702A420EE0A597BA31BDE4 +FEB8DBA7C61D311CC90441A620164DC22DC2D373973EF84CC553453AB1B3337F +7B39983B8DFFB3A9425F119B45C1CD37A76F905777B3154CA6200792F1759D06 +E017890F4041A385F2238E3C48B6C8EE6F5258463FDBFF7AC762F6C4363926D6 +50F004D473B7B7F73CA686B559C2885F1AA761653C727A77D73431E9D110E76A +2E55C68CD50F43997C9B2FC4710F8C8540909829E215678E63BB8363C4B8AF05 +9986102BB36580D9CA95CD216B7C321822CB41B2E0422CD077F3B55E0246FDB2 +44D5976F67296B5B0BE4B06F6E43535C21164E6C5089C3E9BA2D6B30888C57DE +49DC8D9D46C0D5EDC47ACF2C03B72DE3B69512508539019B759280BABEA12BC9 +385308A0395C4CD33182A10A5A229743379C2075D82D8BFCE4A66E1AA087A091 +8F5372684FA5037D1B92D50CD9CB4F50AD4F8EE7D51F1C9E63C721CB5B9BD011 +6F0A8DD4FDCD2B008F223A1036D90F0F3B252487DE7898F9AFBB3A9D9CD49E0C +EF4ADAD5155A98D2125ED5A3D3907F67301649519419F33CD942E8DDEAC1BDA0 +E90C431B198F646766A8FA9F8D1561B57E126EF604838C0C1966655CF31FB7EB +C8CCC434FC1C96046D38203E1791EC824A3D7AED85C029288D4608CA7668A2BE +484C99639F121845B22EEFCE0A3B808261921AA042AE19E641769E91277BEC29 +4594082CCB3058F90FAC4A700A8A827ACA00FCF574ABC8EB7DBCECD97F2B22C0 +0AA19E8739B81AF8C6F621D69B8E6F29BAE233FBA655A0AF5BDFD7F5C6B9167C +6BC7AB693D45EF2AD999F5DA3CEFA39BA48A17EE6D9F2C4DAB91AE3F0044DC3F +5D5506CE4675AA928B0092D6F173644F91295216D8BBB14CDDE0AD524A4D545C +1B5E284A3BF0396664081CFB4F186A84A0D24D61E82F4767C1E55A0642720CF3 +909FA1AB8EAB78030B59BEA067DEDBD2F1D0340E790AB2777DB18248521934A8 +BB38A58B7F633DEA4291B0D5D13E9A882C974697CC6D3B49E030C94EA29B5506 +CC29C44D01B4751B453A46A9F6BF3BF135AE87A4CE232AF57B66578310DE41E0 +2A6AC422117F1963C4D7CC306BD25A6E724E51921779F22F029733122E23E2F0 +CB340008813ABB104380C80A492B3FC6D0BB07CB8D8409E9576891EF6E5C9D08 +EB8320DFA31BAFFBD336D0C2BBC3D3B2D30368B9860768FC080D30569C7F7811 +0EBEDA2962476113625EEB555490B8CE4C5F99D74ED10F738C61854CFF8B41C6 +9402E56BE8856144A1A05D0B05F4CB7EF728B2F4F5A439F18C3B68CEFA41E59A +D8308ADC92EC1289DC84CF48D2CDEFF509A145BF945E1E00D552D329EBD2A7C4 +21D58082CC8FA790E981F4AC8EAB99950678FD3A7DA3DF13778681B208DD71A0 +7C3CBD0664B37C9EDC6B601D79A2C51FB54DAEE849F93209793849104E722D3F +52DFAF7047EEEDDFE744787A5801E4AC2C3D58EC5DDC15FCEE03990C53B0C57A +FC54F125A04C8E4A0ADAA725808C587E7DAFB9F784FA2875689979D316DC22BD +AA36B306A1ABCF907B63C6476737B746099973CAEA8C1E2C5C41F27E0F7DE8D7 +F0D942E34E92F43FE902653D4D2EBB6F3B9F7928B1550A82AF234D45D028F429 +067652BD3D391BF423AE72B9CB1E8D91E898161BE3A7849D456A861A2046711E +E934DC59442AE7D81661CE8EF727D8D7DDC0270E937E40F896AEAE6171661431 +C1025C53172F9D366834BA0054FBFD84503FBAE328B6FDEA180F8EA35B1DA937 +5CC3B8F00C206908C2FFFFA6A7AC6915D15EA44BDCF29E2BFCFD4A849535F19B +0D307C696BE8205C7D84B9C77F02EF27D911056EDBB4080E4D3ED72788666CAD +CD91B0ECE27A177DB23320A7FA9C31408B4D02D2A4B1CC6DDE1A6CAC3D8EC1EC +2226EC98E51046D1EC26FA20EE62D24747D83CF4941DCE5CCEEC0DBE387149CD +E05B19FFCAFC0D117F9A3E60DCD4C815228D98EF95EB559AD0ACC0D50FFDF714 +56C3C812EA5ADBB013BBD956A7C4CC0ED7D3E25D5C9AF5E626F18297F75D4957 +F5B0B33379114B903FE98BCF35C3FF76FEE1D9AEB711F2962276531F7380EE3F +E368720E0292A170A15C5539B1FC7BB954EE2624B504CB8C805B8D31AC38307F +0513606F09211AE64DAC447693B2A0AD15E9A64C34F5A911ECD0ABCA90E9791D +67C6BD202B0858EF96E7722305B8AC02B01AB1706CC6AE875A8DDD15EE349046 +EAA65005E7866B506EDFB7A5A2AFD5C9E9DCC821A79EE9C1EA2C7BBA32A40BC7 +CEC26DB1AC473C8C3960ACEC581B37D6569E8C8C42950BAB7930B65E1570E3F8 +9A7FA719F1DCFDA45A3BF2AAB32C9A93BA3552608A61C623DE59BCB346E87EF5 +9CF025A87803161221C5C1C6F6B3403712C76E9D755C7BD68D7F2DC03C14CDF0 +C1BBED1D648B905B4B17037B7263C1EA7A7F06FAAC4E09E08483A8D714C19861 +327CD9C32DDF850302DD6DDE24912D00C22ECDF3CDFB18FA831A41A7488EC203 +F564CFE30D506F0829A96D35A7E09C3DCD107D589B627A15B55C5D6649126BEC +60B88C55ECCBB4E680265D9EAB4CE22965D3B1AF759B01ACB0D0E6C92B6B4EFD +A81E6A648708979487FC591CF09631310D46891423F4EC159A73E30D8DD147A4 +B0EACF6D45D18CD16CEB8176F03ABCB41F2234747B9733C8FAF34AE5D43D3BA5 +0CE0FACFC9B087F84FB6C68678BC6E76022B1526D6E5B3A48EC1A110BD75F45F +1C4DC6D39F254976453F57DF873B7D635C80C42026DE020E5BAFE0DA0D54D1E1 +DC634D2621BA184347E5252F645A6A1DB7657C48124186F0E4C644077457C24D +55753C651A9A7B6349867641464B515B821349C795A645420508673B93750D0C +7A3B33EB1F09782033742AE8F3A23FC02284E6C03818FADD1731361542E3FA3E +75B8D52B668C3E18A4AE967D0FC3157083D952AFB8144D549E69EAAC51C279C5 +E5D88A0D9D53013DFFB4352A1598FF84DCDE6FA32FC377306B9B92C0F96EE149 +8CD55E7B2445B86CCA7A547FA732D52D59025129FD8C6333AC0DF4F0CFF6287E +F2036D5DBBB3B91B92F12FEBE0B61A313A4DB5A9CF0BB3DDB781A56FEBFFACCB +8CB9D1D3DBDBC4CB6AAE6769E470582403CB920630221B68BCB625CD4605FA8F +D3D5B7A1A28D15E44B38E92E906C138E72C15B86F64C38E23BF0440052A8C914 +54397F49DBED99D0AF7CEA3B0A05FF37C2D7EAE1412567E6776333237C31E3C0 +49949EC8BFD6E0F6446CE2D4DCD2C1524A288818CC5D159BF8463A847AE4A2B9 +CC8C58F822804B81B13BF4F2DEB6229C4F51F093075581791D02C36A13B855A0 +34900AA7CD4F1A797652656FE3A8425A38F421C4CC0ACA1CDD44FA6B31219276 +1CDE1CD63D6A58CE705CB56CCA1260F9B86E989019071563A9B4C274A87558CA +6EF1660D574EDA276801F0057740E2C3B80D253D697736484D892CE1AB128B8A +DECD69712F5E70E895FBAA927E8194D792A04AB6CE205E04E38A433BBB793FB4 +E8BBC4279D58A223C6673D909D6AFECD246E66A52F4CB35E5931D24C828489BD +4ECAF621A220D8ECF702BEB01C4FC7510197D3F6D15321EC87175ADBA6434ECD +2B5A306E91375CAD22CD94301763E4A8B981472890422C5488FCD523C9CB17DC +ED22FBF12D5F7525D0D6BCFE8CE85B0DFB1D6F989C267FFBA0A996D309E4A934 +3DB54A9D29C88B9D55D7300DA3D46419256C5A07A2A529A8DE8BD1727281F5FE +97033D861E0531B14E811378EC1AF1CC7EE9BA2B07D935843D3053F673979F8C +FAFD59D555B56CE338F606747238B22BD62C42BB7238FEA335678D474A643570 +A9E7B4970E8C541CE9DBC7BF70ED7BA33639D6744A18379455029E934C95E2EF +639C4848CE9A0879B51649FAB023A71782444B451F92A34CB8A124270CCF86D4 +D18EEF5C1D2B2A29012613851C49F50702D63BACF95EE2AB4D72B375E0A62615 +E0991E130A67ECBA9E05329B740708F1CB148724C3A6E5E3AEC1F88EBCA398D2 +1CA8827C977D72734310233176D1AE26C55CF2CEACA62223315C28FCF6305C7E +A22414D4739A059F552F1F9372CCCA5FED4F9AC987942848EB498900269511F3 +F408CBEA0659B954F5F1B18AE4FB270213646F9B28AE4439D2BA2D3E0AAAA780 +5E530E4EFC8A060EB979E12191044509DA0C14397AFF949E12DC970658D5EAF5 +4EA963F5BC1407A32F3837CA6A24B7F3D60EB8E6222B702E25ED903F9D21AE50 +664A095009BDEAF4B78DAF94E5A55D48366CABF07791A1684B2F54EA69070844 +4F031AF8DF416C2D3679F8BA038B0DC9DD0400CA6B34667BCBBC07E62C1668A8 +35A8C57C9048A7227E672E89681B54D662079A189A9E96A3CA96D8DD10189B04 +1DA49BA2729F1CA585B1BD5C467295285D52E47CA904235A1A3E48EFAE9EB6F6 +01374125CE89D53C276858668CF45D2F092DDCAA52418E0BB94C2B8266B4D88A +5D911507BB1DDA3D8F6E7C14A91CA11AE799EC42E993098E18CADA70BD2A1D82 +2C39326C6E3F9E84CD9758B9AE43D79BF99E6A0CD713E95B3D9B7DB90D127DE0 +DAFEBF850CAAACBD860B5DEF2082F1ADA64B44B193C4A1417BE221FDCA36456C +BE5934C8CE3ED55AE3A11697C2D682B7D0F72D48976451D205783BE25DBD2507 +39C14FFB4BB828DFD187104F38A7F11D5F0698C11E8C1D4F107CACE573FDC4B1 +C56FDAE47024D6FD16A2FEABB434CA320300FC4B6C1B6CA08F76C60B7C08A665 +99F404DBA8A2A1EB18EF6750E4EC186E31561A3F080BA6562967546715859481 +7BA782940F5C5D06626D6F6A412CA7C13820EC7C1DF23E15E5829F698CF617BE +D940523E4EE4ADECEC48C24297DBAD528BA1DCE7AC335A1D15D55415B108EFC8 +6D45030D27B3EA63B2B4CD771DBE66AE0218ABB1153D4B7482289D1313CEF184 +5C960B1E3C3C953912CC6F4521D1E15636C1545EEE457EFB87B88C9E43CC2F38 +6BC4BC96969F4FF28ABB06F4454C01CEF1B6DC538F1E832FC1666D977E5A881B +F72F1B4C7DD4BE167A5535F1163A0706F9A0B26400178DF8A128FB5EBE6A7B81 +E478AD183EC06622B591337B9F1872AAEA356F4FC67EE767B34CB5A4D90702D9 +39FB846947F4096FB3DCF16EC81455164783BA0B5D723060DAFF411B68307E81 +7BEA1D9A47A5AA3D648E618C83C60F060029E6EC4D46B045FA7415BAB2AD0AA5 +ED9C729C24136F6AF61E6409C0B5CA760B16225641E268A68CFB8260BBEAFC77 +6626EBD97195E77CAB425CFB0096D805D9EE699E41680D095AE9FA10122A7882 +2F00F495C9EB2102DF0D3E61833BC0A2E468C5CF7AB430FDB7C0BE3DF2C0D230 +1580BAA25D65F599378D873165482A1FBB224AEA89C6BCCFBDBA42AE1C5DCF41 +06969F585CD3B737D1388D6359F5468D88FCD2279BDB270F6A858FB7D2ABDEFE +5EE8FB79FA437F8F50237B92C307B73B0DCB808D07A9C3255CB9B3B17039CE5A +288103D05D132863FB522A02CEE3839EF9AF7F07D99732F0B8B384745369FB3E +7901166478F4A16076A1504C5E98D17408494E270BBF4470ED12B4332422679F +759F1D93984D7E506D16950DB6C2682FE1379EFFA6F6C95DD71F6E55BE3EF6AF +E0CB25388EEB436E6527806FC75484133F6E561DEB979D5C1FFEFDAF2A6D964E +03BAE0BD593C2992AD84569C81050F7A793C5263E50C2F50B98C4CC703EAE17A +6AEDAACE312DAFAF5278D125B6EFC5587484F61DAFF46B87B7C9B1EEDECA4859 +314A9A9E2248467DE1E54D90DD671660B9040B3E0DD982260822177EFD757266 +74A16C83A7FB168016A320D3DF3BD7726F1F4EC90EE5DFE810C96B099FD4368D +906AE4699049EFD37E8EF058D4B97BF71106445AADD4FC6E90615A0066823A36 +673B8DE32322BBE861AE251226B4385AB28702831270DBD25D666FBB0AD7B96E +A44E891EA1EAF0F87013AFC982E33D67A28E96E0C9CB99B9E4192536830D9901 +931A8CAFA41289633B20BA3BD7AA3414B6DA8D57CCF2FBE39920CC06361F075B +CC40335DB9A0071CFF77F6B7BB47F3100DBDC9C4A58C2B81EC99E8E966AF3390 +E3FBCC28BA1D79961C8A1584266454DF772FBA99664D74D4A89FC82FFEDFCFE1 +4C9E4A04291E803D142E37E7ACA66AB279378F2F192FFB2B5BBAD18B95F03136 +2CB594A3D6D3F8576B90A6C4DAD6D6C8EE07AF682F925F01D0B26CBA347C03BE +F3B0585CF4539FDC66915E22117078CC94D621F31DCB3E021998A5D6EE94CA4B +E214D07517283D56973D8E4367392BF6C1150DEBF459D141AE0941C1C8C5CFBE +E735D796E365A1B0F60BB4CF2801EAFE4889EE5F338D3C4885368281B3C95CCE +251C28A90D318A8A0384439B38D63B94757252062EA44E88509FDD2E75FAAB71 +7329622828B2785C1A8B26351BC74237A6BF99216652ACBD4CCF54CFC8AC72A6 +46342F1E32D4318E7E27C7B2DAC943B3E72C472FC6F1DDA8684AA922516A672C +E969C047E318B5E3B1270C1BEB1C4071A15BC81B29B268C679B41FC5E381BE33 +DD95F0D68118CBB60C521E5CB2BA46A10E50E9238163713290DF6DD8A27D3813 +F871C07E725D4518013D9A84CEC96782541E5580E33C2EBCDB18F08EB4655A46 +507A8526DB26C854928B81FD502B0CCE4A68943C12078F57C10F4E85FBEE1025 +46D925B8B3B447D4920410FEEB9844FABE985F9228FDD9F58392F2F3BD650E49 +2E3AD5A14984874DF4572816931885CE8A448EC95BBF40DDF4F85653AD90A88C +C4A879C0C7596E61997B972E8A55E57B17F802C738E5C7A8FBF6424F8B131B23 +CEE3EA3747DB066246C250EAD335A76FA166ABF75120CECB59076AB31A51F176 +57176CBE8C802A97B0542A5CFD6D5E6D7EC848B923012E45D9F065BFFA0D03E6 +788B68BA4DE51DA37994948F859D41C28BA939C3A82BFDB44DA585AE80B8CD7B +A6EEA79B70BFB4864E06F06A9751BD2D2A209D150D7135E0A25D67263EDD2A7C +C63B5B76ADB05D44BD5BC0BB3EBCE2E74E1AE5F7DE07A59D90C932DAA2553505 +27F2AFC05F7CEB39E1C7E54F69FB0BBB069959F2FBD11709F8E81F6E7CA06DBA +1CBDD8E7A78487462596DA288B50B295E46F4C3D9BA862688C68859734B232A7 +4B371D2BD786924F186524765E789EEAA30B20C069322D42C893A30BF1BD2C46 +F8F3732DDFE80B8FC1789239345944D8B457824FD80D11184E73FBA30EB80A9F +2FD466826D4E666E3A835B98A1D4AE5D17053A6A648E26E77BD08F9A3E02956A +AE82C4929E9666F539079846527D0E326FE7CBBF86E3722BA3E53F8A5121080B +ACF8D3C67A2A1DF624B9DB92105D3C833F5A6ECEC108E026E1D3D968967A1447 +15CEFDD09123D56606134BC3449404ADAB1330C9238DE48F3CDFBC91EB86D7B3 +8B85B5BA97376A0673E434DBFF19798EA90BFBD94493E2D21976F8106FC0C276 +C81C9B9885F7A063D99B451BFD666E82909A1D8257272FE1D422DC5B6D2629ED +8A93225B7A50361D743D9CAFC3B054F4DB65684D6CD4AEA47C3FA13A6E7805CF +AA4A0794AC016409EBD90B0E23678322EBA23081CB878B4619BE05CF8B9128DD +71CD833ED502C5E084783A5B4E64B9536C3ECCADDC8A013BEBF58058F65CF340 +E43A7EA1495801B2A653FF57A78F54FEB6EF07418184B93D084429BBC6703546 +24C31C68A7AE969455F4F303CB1D43978B1B064CA979CD7BB29C37D0E9262BBB +55C96AC1596DFCD5940FB75B0BFB3A2D301EF97A217A1CBE5F047EE68288BFBD +0F115453084448547D85FF2FDFD5E35764D09E1995B982450EEF4D1102CA1D44 +6D95674836F18A3A1CB8A85877A99E2E7B0F7E6FBCDFA20A253F0C369CAEE40E +EDF6588A320C483D7F115E637AA56E4BE0FF069DD38912A98A634190E9BDF3F0 +0159C0AECD0B0C93B6508CF9AFA3BC3CDCB01B1CDC99FD86A83C0FB059C1AC93 +5B62E9E58477426945F4383020829462604E0C0F4AA22629FC1A003859F382E1 +89BCA593C95F42C6CCAA8281D85408835CA33861E640A1BFB8817CEBB6072BA8 +57413323BC8250901DE5A87CB9C42D6B6CBC2426D341BF6984D90593170598C4 +E94B5A824F39C7893D07EE7D9EBB4B412140835472E69F598D00F410A7E6E2EE +83A718BFC83445EC95D6B59D20D56A1AF89782A6B454893AC1860D8C9613AFDF +E10B3B1DF0DCC3424389D10F8008633BCACB1FF8C62185471D220AA648F5E0E4 +31F5745C5BCFE6571958DCAABB93524A33AB072B17C975B875A2AAE505935906 +A3F382ACA7B4667704107304FD0A456ABFCF03293409601BAE9048AC2E1265B5 +B05C531CB96F1D8A2CEA2111F06336C394289E4763F61FD0CAE9DDB70662BB91 +45402C3D4184CFE66E4C75F90B9F4A9E56F33F5224C40CD458FFCE01B00377E7 +A2C132EBA267362CC9FA700CAD34E125F582D350773E040312AA0240DAE7E9DC +7566DF1E02BF6E5037F37D757AB27636723A3D319225C3C8EE4E5270E29D66E6 +01908A101027FD08EC9C500F754F00ECA9A4693DF0370A9804AE51C1EB36BDB7 +62C7896AC6646AD3B2930BFB1D34B257F666D26BA31AEDED9A2A1841400C3A12 +E720D8078517696443853A97912E7A58D1CC858BC7B4D76940D49B2C7FD9A30D +9E8FFA6DEE15F14583074C4AD29962F8203CA2590BF80484EFBF74859197831E +CF5056018D10C6698B028783A0CDD8728C0C717C1F9D25C94AAB1F71EDB16B1E +C17403B22A37A1896B97443C692249430BFCBD229B02BA38D99F9A0A3B3FE662 +D6408C006F302CB1578B0EDD5DEC1169F6528EE862FF17A34790A7867FC5903B +C35C08E4CB031695DDDD28D8ECB34302DF9C9D4CF6632404047C91637E104E6E +8E228854A2A9530A29786616C618A04CEC0F3A909C9E8EC4F2F371E86206D78D +05B29615AA6A0FB93AA2A62E556433EA3ED527C12EBA31479C7175C0A7E0AC89 +7AE05761B5334EC76474E2637C297111BAF676A32C9FEC87113CCE04F91B54A0 +6D57CA54137F685ECBC86A5ECF1706A74143A283F5DE4895846D034082F1A84C +CD34430F91B297578C0D126509EBA53AA70B901CD5D2C491C47500A260116A76 +3E959E889718509A171F8B340312939F66900A73028F25132450F9540D78D510 +FEEBA8792AD3C87BC779081577CE1ABE416B7B9BE2DAF7E2B66EE0D1D8FE5639 +2710BFC35873FB0E18AFC68372B75AF9B3BCF9275F027D92A0AFDDC4852663D5 +6BAE0BF64D386BBFE01AD0CA8F7C209BBB365B9C04596C8FED28F07755AFBEC9 +2B04F359CB44732509954BE1911E4DE05E1E31B4B71D32404CFAF40EDA07278D +A541BF3B7F6FA3E714F7C2A423A60D129B57DC384054531198CDAA0EB710EBEC +CEC5B24B93A548AE01286E113EBA77A94CC7B6954F8C2AD72FE19B58A407F8FB +A824540B79150E4DAA8577F11448F2DA3B490834E748CABD1F60C993BD3E5C78 +F498344F548FC4E0A0969C7C2AC9B7020950DA860CB7E995D3321EFFF29C95F9 +0E0F8ADA806335BB75117D3AA2A55A628F17C6D459F87F93CF5E6968FE8EC83D +BE0891D0F79B15142FCED17909357DFB4C6FB6E533F65D5ECA55CD7080503A74 +E135F76095326A224EB3222AF00C61D63D795DB260B31BA213A6B00F1B6E275C +FF6F6278FA5F8D1B7E4C7BDA1A1CF019F968856AFFBF6CB7E33875B819AE10ED +5199A36EA784FDF788C4E3ECC35EAC412AA0243999753B32C296861695FC8066 +AC43C26ADA353026B4574519606AEF2CE201857628D85AD110130264EFF560D9 +8EC1E542418C245C1CDACAF0517858C28A24F9341B5F50FE65755150ABFC0F29 +F4D82ED9B8ABF08745181279AF82D0D732AE2F23B6FBBBCDBDD6EBD8F02BE39E +92A423EA8BF7AE91239DA0EADCCFC57F7C00D39011BBBCF110D15D7F35242569 +39E494DF1E2AA5FBDF9F4A3BA797E65DC2E7EEE6D14EBFB6B2448424F212AEF7 +10C921B4329C22F56A13B059F2DDB73B72A145C4B0D41098ECCF1F6450D2CC0B +32189CA52718E953418CDBA396A7A06481A7E22B0EE77D611F59792A252CD800 +34924684C5735FA4E2473725C4EE3FD9AF818348723DAF4A7688786BDF298805 +36C3B0ECE37D00D77C0F62EED0CF9F5F9F1FFEBC01340AF279010E95FF2AC53D +90AB7A4E1472CE40D056CC47EEC75C475C2C89F1DBE1621EAEC0DC90DC52F0A8 +4A1C49A3B4290D46033ACB3994160E93E807C260699EE69811AF383A5490B39A +AC4C4520861867854CF3BC60CCC5CECD5CA0C16D73ED264F76D900EE843BD07D +D6576EE4C6D49C8FE8B0BF9BA116287FEE674AE190DB9D11843EF39D58E0C195 +BDA6F2CF8DE90275C97946296541C63216B760A2E5FFC6038CC8386CE8C1F5BF +F453FE60FAC91CAA0EAEB90E58910E73F23E02048EB7FA663CDE4EBF960DC15B +EC09058D9A57D4D110AB32C1F04AB9C16F35875BE9D8619E21731534B2F14CBA +75E3516CECC0682313C7965BFC5BF94AEB885BF01F4AEFA5C6F6B76F8F27CF95 +CA685A98AECF62239E12B7026292661644EDCE78C7A92709F6B2E162BF9F9CB2 +68124C3135A5F67E54249E614C6D3FC49CC9D954C1DB03274BF53775B297DF6B +8AEB8DFC68B6CFBEE88FD2F00069DE5AA0ED79D7E75AD745A433400E5865EDD3 +EFCA4969C76BB538F35757D0E287734011268DF8CA935FB281F227C742311F74 +5325FF863E1BD3A54DD33C66E766E953BB3FB8BFF2E5E537BB5CB21D29C07FFE +453AECADED166976C10CA97486186A0856F9514D8FDB95AECC7239EFFE992A0B +2CA0C5515764EF3CD00F6DA21FD9DC409A0CAE31DF767AE3799229595412820F +E3FA2ED1839BE4282EA7FDF913ABD8BC148137039E30B0E19FDB1FAB5ECCA606 +308EA5C99EB7E28906575A5257D86AA2CF73AF3591344FE782D0D5DBBA43D7F2 +041CEA34575A60597058488A27B5850716F6A99B8E0CF909A41F64C2B17B4AA4 +6EF7B5453A6246C5846827E7BD5AE5E0A5E134067039260AB19F4375943D24D9 +EDA6E7C2CB7D913AC82D6F79EAED68075D9E29E44DAC112EFD3E84508C417BCC +CC9D5D5575ACF54DF3498A92AE8E153663E745838A78EF695EF784AA3BBB94E7 +BBFDE748742673C02DF11060FD43DB91BF6CF98AB8D8E7885BB9EFBA5DF5FC2E +AB4C701B70F69E0D9CF0675399332D872EE6EB4405313880B59D511BBEFB6B1F +1AC7E2194CB058B35BD803138071DF09F3B2220A491BD3563110110B011C3AC6 +C390EAAD23773862531142C99BA19CF76F3F8965107BC91AD7C1FB8DF24EE796 +924B4E295352F54CBA557D27142F3885FAAB818FCA2B3406F40B952C3EACCCD3 +6B25528E887CE4B4EA068FF0AD7218E6303B218FA073B6D787ABEA2DFAF028F5 +E5F77BA6F70B77F1B58143D101DAADD59E77D6179A9888BE7B5B4046890AFEB3 +7ABE1E724E44D24E32A4904250FB6897CAC9233D9373B476CCECCD4979A159A5 +06411F31B15D3347C0403E5E30904DD5FABCE69808D1C4E7D9E3CD487221446A +E6941405B43EAF023212FB61BF86041304E3FEC90B98BD8F685CD731E8689B8A +2F299C8702AFFE85EB8AA054B75054E8D93BB6AA50D5909E30CDA237967E51A7 +35DA63B3F2BD3D55AE514ACC4426CD14600A98CDF16A170099FCC6BF73FF3A22 +3673EA40339C2037CF6834EBBE5C85E227B29272AD282C52305239A7C1B7B86C +3898D08FB6A072EA7470328D81862548F2B1C39150C329B9AA4CBFB0A3A6813C +D906A053330EBBBB0E554C20053B3B87B5E7D3572821AA9E49F77B4DCAEA695D +F622DEE2356B941FD55308E0CC731780FD83449629E9B2BB5076FB5B97D3AB65 +FBCAA97D631DA060AD38073C7433008FE41DB1021E53DA488734C1CCC875210B +B65128FF5E5169262F4C55B40C39B829ABC5E536E99E3106E882AB722CAA1BCC +9A8836EE6407D6EBABD029035949EDF3DF3440CE8EC1F099A6BBCF1CD85393D2 +0BB1F700BB28AF31EAB192564F286FCA7766A31ACA961672A8DA17739E44276A +7D1ACB7BA45BE8731A9DA00E72B5DB53FC5BEA289CACCEA6E52A5903CC10B34F +243B66C7B759F4992DA36AFB3B60A2CEEBE39F78FF4C3AD200C6C40130EA222F +37A9758162328979CD3E082EC4BE3C44FF294A941DA73AA7C7AEFA419B3BADE6 +B8F0AF8B0292DA42D92F177AA1BD6EABFE925F7C07E9B105FBEC223BB2618F94 +C921F3AE2113AA0DBE0E49AE59430DF0B9D5A264FA1D1614C56AA9B713413DFE +EB239A4938729BF4B100C3931EED4C08C7C6BE8247A8AFE2FBEBA74AC1FAEBCE +5C1889AEC856C57F216213DD4E231E4727A24FA00099C6DB01F7A330E361DF51 +E1FAE2D33B21BA9195EE55AD58CB025CAB0630425210622E611D1498D2FC4219 +8ECC337E8373327BC090067E4C5E541561780E682791EEA93370448F208E8CC7 +6D84FDE2DFDDE2DA7073B2A40D6704729DD604101218D413ACD557CC623DA0D3 +70A518A70EBB904E6C9FB043578FCA83C2A50C5612A2F3040D6FD165139228B4 +691E8B3D7788700BCD1433469C9117F4BDB727A5A7F3FEF02C3F1C7788D9C6FD +16655A99A925E6D736C9B933DFF991C2F50742F29B5F7488D6C1C76A3ED6C7F3 +11CCDD8ED7D9A915141616E01A13A719F40E82796BE972F3F494398B881F18F7 +FD9AB21771D7ACD9CB900E981B256C4295A22307FF5DE3053FC4683E7EDBF1CE +1665E3FFD09C78FF0847BED7F900BFD9D06A2C625BC044C8FA4988FED7AE960A +DEFBCB2A6841E571E7D541AA9FBFDDEF1FB9B473267BB1225594B55487C029EB +033612A0E79D28C961A88A4E12339CF3E140074E364B043B2C3782C01D041B7E +1849A3D07C921FD53FA26069B1717FE1C8EC1C0850166426A14731A029D74C00 +7CA68E74F0423E4424CE34FED0753BD1F96891BC8EEE12B2259525D348D49E2D +3C861A9352352C2214C5A2808D4292931CD297726C01EA80CC891FADA7CB3869 +FB09FDCE3650D9394CBF8BEC6FE62AC50209EFE3CFA27BD8C74469979568FABC +06C5D639C78C5CA7804C62B02BCCA55772AF6C581F25DE83EA23F2BB1D6627E9 +BC18DA3A2BBF8DD805930717154EDDFF832CD1E6F8C24DC408618C3FA547BD6F +3362071D28342C55CF633B0A26BF5ACB5ACA7038503A5D61F440DAB7F6B0BE58 +5DAC00008FDCE3ACFDCA052F7BFF4B0ADE54E08C08C2D583C6DB6CCE91BC646C +0919C9FFB4AE4BE22BDBFA3B431E3BF75B2BC9AF9E1B63CD699CB744A2856298 +206492331E4883CC234F048355ABE94110746161599E57D0E652F3E87AD76C55 +D283E04DAD02383684FEBA3017123428FCFFB1380547AC072A47483836156CFA +A12092C28A56EE534BFC7AE7542F47B2DB8617327F7BFA92BEE039C624FDAC83 +CB8363A9788D2334B9E291EDB859A9F9A257A3DAC24376F0AF1F93B0B84939BD +09B9C5EE2FCCF0173B8ED93643F493E746F45A8DF148686FDD346661BF78B982 +6BBEEED5D971EC6DAC2A752F26F9C40BC4226342FC5AC58E518E5A702EA89849 +DEC81F38597BB4643296AE291F25F717481CCBED899213CED60F4396A5267A6B +8EAB79792271AFE12A8133B51E3C53CA56BCA790447380792A056937ED9501FD +BCA3500A9B303FE4C590E84BE744DCC09D3FEDB3BF355FFE11B5C1EED7E6569C +60FF031C6D6371C7CBBB9E411060C37C1BA6B3714B36CC4D9C767605C428B0A7 +CEF7ADB13C24E9D22B532047CCC8E60EFC65110373123B069EDB85D094CF809E +D2758F797E2A61F125BD8CE97173714AF8FF4FC0FEE6C48097A45CA579C1B8B5 +7617C29D3BDD3F6ABB9522935865D88A7238D5661F30B1639BF91CBBBC5E1491 +2D8678550144AF357A32CD7A26698158F4AA70732B731063B4F40E437265B547 +B7918FAF9786B5ED65D7E03E69B7CFE755E95533968E072BEFD4B833EED07731 +25EB63CB5279C3DD19FD50B121C1D3BD7AD68FCA07E0BD19DED3E04DFDBAA7A8 +412569BE55D421327C0F11083AC12D67DD8FC4CCB86C8990165430F0460542BE +26636B6A0264FF134461E0928F7AA771C4206640C6FC6453406CEE1E19512411 +EB825336538366A3A68CC32948ED52CFEFBE3F8AB66FEEA8D52C25A0F6D8AF44 +6CEF4219205E80836F2226FB0505BFD9890202CECB8240EF954B8BDD2A513E89 +0CC826DCE35040CA09B4EB766A62802A51797C37B3864E8EB2DA4FEDCBAF082F +A0E77AC9A649E1AEACA1D00CE5E9DC205C3D374B28B3D166F220FC45DCF7D224 +098815C60F8D63874E2C5242ADF1E6664136BB94A06AA8448ED8795F3D1DE2BA +59C717A62D2740C47CCC29872A0BCEE82C5B9378F6D379D569DC318C4A7A1870 +8A41B051F3A6AD8D79B2DA8C56140835D8CDC8421E027CEE9EB32C78F069C07C +352E8D82FB6135A8B606653BDE6BEAE5E27425B9C7DB47F94B4DC0C82D8065AD +BF66CA609C7527B1E0B0CF243C937B993821492B775C5089115BA1DD898EDF08 +38B547DD2FB5377BA5A6DC4BF6409A71FBA21648F3E80D344B5FC1744FC8B867 +43B0D411671EBF5C63FBC5E279D498394FA89D56F82743E37F856230ED8065E6 +2E00097F420DA1339A084D965D9D704AF2920423896552F6800C95176BFCA4E9 +83A4821F4E99F2C00BFFAC884B24C541A768B856493518875CA63DA61D118A1A +863F20CCC615B4757C0B6B174F6B48BE19AC7F51E747BC2E198E1929741E290D +9E1774A095941F53CDFA5D4316A9F0DB2E9A78628FD2404763B0D6ECE8D14FB3 +0FBB08C725B1BCB9588F83B0DAAEE23064A6799DE66A8A1AC5EF654CADD451D9 +0A5403AF7B61B9E7BE42403FFAF67DF9181A1B834FA2093027EDAB10835FF59D +0F85A2BAFAF96CD48A69EC462757D85DDA0B0BB864E4512443423A86B21FE3BA +1545AD48EB405A5A8928017AC7A0075D8AA6323273018D307D906B0C5B7C8216 +2ADB2122FB8822F3A8336D869144206ECB6AE78F2E6FAB1CED436628D159A5A5 +D19BDA2330BD40198F8594B4B68F8A5840D18528EF01CDE6AA1FFE65DCCA47FB +B3EFF709FB1E001D532D41DE84069B3C502DEFD2A725DF3BCCA1AB09357CA1FF +66E5A2EFEB04DFFDCB943F4FE6CA2DB7F82746CD7F7AEE80B90E63A68AF586AC +8F81F2D90CB4C3503B1F561BED39DC6D4F4CA355EC79E5481C2D6CA61A50EA7C +8AAAF8900E8D4F9BC868C99E511C6FBDF8DA9C77800AFBB443B92EDF0E31F3B1 +6C6C46DFB589B822615B6D2C0C481EE7196CFBA31126BE4594784D4DDE609569 +C0A034395B6E66FCCCA244B8E4174904F8F481B4A299D4A236D7A155497B8FC4 +51BCDBF24D268A711BB9382FA048BF2BDA73E304505786E31DF2AA3BEBB3FC46 +76BC5D15E541ADDE63A0EA795BE152DDD3AEA6DC8BF6C43BFCB01B009FA6C88F +A0467DD32334D0023544EAC78F49D90D8D84447CC191EEE735CCED9A83B51D51 +11091F5482F78154FF987A106D05EDBE5790E330F420F26B40051E4F08FDAC63 +C43742A91F5AE7F04CEE6DA65EA33D1C8891623F6D26E2BB04A28ADF23C8AF5B +6ECEC27EBE562741392BE8A6DF6338417F020E8B958BA87146EAB2370FBE5A97 +F0B16FBF72B4C9037C2BA310AFFA57355AA0DDCF8F56B576D461B675CBB16E1B +DC42A698B67B2AEED2529B90E7D689663088DC85FE92D3E906DF8F724EE61816 +7821EFDECE7FBEA710D069B47CB6DFB776614E494D1EBB3D51397F839632C8C4 +F0D8787BD5CD7D7CE32D7DA3CF7BCBE3AB2BE336EDB0D36564E71CADFD54CD0C +347B062EEF7CFE18366DE57B355CD7846996C107D7118C1C17348839166F5810 +AC53393B69E6ABB2E95F90AB81AF80BDEA1D4488394B8BE7E2A7D96F6C7CF4F2 +D1C99DB03445398A8C83CE1F2003927E387FA082F24DA435C30FF690610927C4 +4EA49E5C8A8009D114BE98DF6B9C133AB3E1F245AC7FDDE3E09AE6D495A2A8D6 +33BC5F9BEBF2D5FA3524EB28CFBF9ABF95B0A0D9054AA8FAB3594D765542B28C +D40ADF8729048D1B4AA3163E4383623C6FA70E94F774078BEC093385A1665A59 +1801B5F2B74CE0D480F53F10EA706917052C6C9BDA2E3F3ACF061CDD8F764545 +045B29669C6F9613FB5334CE87889DD5BEB65D31AA05B755B25361C40EADE414 +A571350147CDF334FA2E98DC7B3F597597D5A992BAA17E4C870E6BAA1BD5D9E1 +A9A9AA469EF6E86E8BC63C23A450B304441F318E901127ECFB29693F3AA0213A +9D13235991968AFFB705BE513250BC865010E4BEB26E32F92FC49DBF4B87B48F +705A428FFB933D4B4149BE87B501787053F7CB859CBE5805DC8698418D332ED6 +83998C7F8DA3C4B4467275ECFC47B79C9054BA42C7F29205B00FE79D7F3B54E0 +32D591BE681B9F2CF1C222234E4ADFD31990DCAD5BC28A24DD2707B1CCC67D96 +CD3C431409BA63FE2E361DD17955C9F10DB4E0A7A8185E98EFFA201A08263B21 +4A49531FA21D2630647720CDEC1BA122DF501123A0C44FF166A67723CFC0760F +4DCA4DE99A1A5641DE07966C117FFB47D03655553E1DD0374872A48352AAEA01 +F53994F30DD1C231674AFCFECE0DF0E4C53A652F0D5264A15B6C314F2E3A2B36 +C0ECAAC06102DC4239C3A1BC5EBB9D4845EAF0F6D34B7F1AB84A9EA4B7C4250D +6D549094213B93F0B45A0D0DE71DF74FF715E81E27749B8C2C1F8475514DDD75 +3D56A87D56CD784B5F678ECE7DA4C5872DCECFBB507AF499BDCCFECC3BB07CD3 +E086FC4ACE46D4797942184E1D9F93B9435A3B4E724AFF831D72F35572FEBE93 +0F858B54D2070B5F38891BD20A5D6DAEAFE9D4FF8A8CFB835B5C899CEE9816A4 +8C543E1B1D3B79CC12A1298963C816E0373FBFEEA9B3D297EE6F54C66A5F624B +45C164E0B46BB0F7B6FB41C46FEC03A6DBF0671ADF9C846E6515FB907FDD275D +FB15E502C2309D70782B4185B314022940FE3510049E054FC29A810836ACBDEA +5822DCDFAA9AD46F104488AA5A2C6405A03BF96D08E6E308D78E3DB926008844 +389D308DCED07C82BAF8811292B637A1E2BC052602C05D623845F586BFB542B2 +2944A9C344B62F50924F12766C395299EB9AA150E24504C44D399DDE16F52494 +9238D6D23213E2388E6E6095970CC0EE5977B1C4D98517F785FC4957A1E173B9 +B86E9AF5D47B0A81956F1E5173D41CE8604E725BABF0219AF63597C137F20B1B +5BC52155B8450D15F8B7F3E805846DB55CAD3D3E8E9B285B00EFDA4F4AA8570A +769173E85B756964C2BCEAE336FDE5A391043F232322F0F2F4F5DD64B9EB4A5E +B68E7063D774894508D60678FC7C82473A19BFADA70D10108DB51D78478A8674 +E636BCA65E2DEB154410590F55129ED2404DA190EA6C72F348E85ACB150793B5 +D8DCD8C0B56C07D35FA3B60DF0508E39FAA3E9B412B30F2BE01FDFC76B281396 +F8C8A74BEE192E86E605512D27C531B35F9AC5A7062DBFF32BB47DF9273E44D6 +3F547105C88ECC7257A2A565853035741218D83D4F87DEB9677356F410A24AF6 +FD2000489676E2B4DA9510412055317593DC4DFE03595BBF8662301F9A1A02D6 +FDF7DA61A6CC089FDF210A5EA523F0E301B52E3BCB20D33A85BD1E9D94947CA8 +9597D209AEA2A6823DA12BF7717D96E0319BBCC82AA84FAC84755D1B4846F73F +6B7369760D1C22787DCA9419A174E413776463948ED4A65B374EE14A643DE3FD +BF045EDC3D4ABE71D957BC893715868973B2FBBFCDB9FEFCCD6C59343EC096F3 +E69CBE8EB6B338EC075111C5710B111074AF3DDC0AAF6EB5A78B6E2555C05BCB +A4B7C95070667B57D148245F57ECB93E089BE54353574AE5CA4049EAE8891B60 +47D2B971004C2C2D3E3F4BA197EEDAAF22F5BBD2E7AF4848221BFE136AED09D7 +F04BC4C3E221A96C40F1C16E5E36D75D18D7010B84AF7706FC4F6EC6502DCDFF +E1A494CB342A601AC23E1C4DF5926251495EC97C73D1488055B0DDA236E63563 +5A71599C7EDC8DAAB618F22A7E40FFF9BEDB9BFAB4CE45C551926B5DA233A8CF +2F806FB1C3B2CD9889E2F08661F5658686B5D6C32645C5E0AAC87B60AAF8FAA2 +8732FCA58DE655570BC55943998251112452C18F8D5CDB4B908F5B5FBEEC07DE +103414AEDB31BC5E1DBDE51D5100F941C71EA6CAC36E44801FEA380C9D07C176 +9DE2B0F179D18E39CF19D961C1548A8C38B51B27D4B5D56A9FCD7416180F7D33 +354DA4BD1964FACBE04CF30C55C1FA3E9BC67DF3DAF88A9A42AEBC949688B30F +0B4F3F44E9AFAD3F6B081A3A343ED355641232E267019A824C65409ED0008B59 +3294D9AE2FC18B826226E78D94321C73185F4DB401FD9393666A9F523C4763E0 +64CF3581629B01D611BD36013F58ED8122861AEACC63B262826C425292B6FA09 +61D160EB63A0945228A1002D4639ED6AD2C8E7AA2514F26A311A2D898E10DF7D +07B2948D95F75FB9D0FAEEA2391DC08E1930AAA57772C07C6B315D28E99C6364 +B821C9764D6EC04592679B7F65FBECE4B03564568EA9F20871D2BC6D57C02606 +C842A4D5DF1451CB00F7DB08E3A73E0C27E1A4EEDE47EC14C772EDACB4AAF11C +75BCF47618F669DA60ADE2E29A45118C7781E2ACD7CBDC3AA300088CFDECC260 +535C64DB399BD240198621375DDA54E4DB6F865834ECA58C8CBC735CD9191BB5 +2CB51AC6977959F5D440B461B79FD9D3299A5567B973C0118FDB1FD3DF0B7473 +11AC06915467FD976C44C44F917BE8096D13FAA7D84C63AA2A08EBB83D28432F +F62EB307173A8FC920F49507DED6FD64639A3E2F39FF5646CA13495468FE0EAF +5C48BECACA52B02D6DB38AEB1E41897C69CF19B9034542F37A5AD0220A007D4C +16EE437AA46E2E4CC1B3EFDA641F1A12A5336EAD5AA05B63914EE34BBF2B151E +7623989D0E44CFE4E664385513E7921EFF420CB230E4D6CD9C570E811CCBC458 +9A4073750F29672398C57967B00202148C5151933115844EAEC020BC5C33AC52 +1DA5687E4C25E18CDDF393D1D28286127D6256B9C6765528F650E62C8EDCDDB6 +52B5BB118B252338BADA1C5A69705B38426A997C6F0110C47E20118093201DD3 +6642B5A8BAD879AB8B71F0CAE1324F0F2F4DAAEAEC1ECF83CDC4B1E5FA6855D2 +A1DFE1B61525610A78AF9C123F06BDC6670CBA627EC010186834C1275245F84D +69DCFFA06B6D92E5E5667432FC458AD0ADC75FCD7F9E13AE880F4B8D21175BF5 +70B8336F297252DC49A6A61F8916312E184B9A9E9DE3F9036AEE3EAB34EF2162 +73BCD6CD00C227F789E7EBE6DFBA263761FEBEC63C903B1C3C338553A177F1C8 +DAA799A8511EE2B9444085AC8213DA405F5F7E06FA8B25B14267A70BB57CD9B6 +51AE2BDC6965F5AD36C14E263C15078FCBC55BA29D6D250893B405CCC203E2CE +344A8286576A0CF8B3A9F156B5F85731B86D80390AC0E876E1D7C2066C654CBA +E9908AE87675F3EE6BED53475B14A126FD035CB487708FFCD035D956B1CF60EF +3F30A533DBF9557067AEB4426CBD4C00DC063A22D91D7DAEBDFAE8038F038265 +8DA1C6DB48F512016ADEC0B2B811C7796609239A50C4834B695DC12205BCEEFC +65BB986DEE40CE3F08D90C6D61AA0287F2FF41AC8099C1A8BEC9C47EC396B9C0 +C974185A75B4E2F93105BC030E13748975C040CF58D08064DA893A1A7381083E +B42AA28EA11FE68D6A841C8FB89EF8B7DF49962183E738553A6C126F02726662 +D5D5A485E1F08EE23DBE12037461267FFEBD1522A824A6AC3B37445C1C880FB0 +D5E72E922B2D03455071709B65B12C87EE3C6C7BECA4ACDBA5DC48138CDD23F9 +F3C7393B49AB2ED52C0C1B9A0B0BC33C874EFA21CB7BF280FEA698AD5AA608A2 +0FC764E7EEBAB16F0749BE4058105A3CF64B0D86F7A73EBF5CFCFF6AD0913760 +7447C4266120B1560B30D6CB3742DA793A8F21C740477977CE1330009C7D8D62 +1BDD10A2979E54840331031ED61382403DA99DFCB535B40CD4F9527AC45FE687 +5589D00B0DBBD193B3ADC51E3EECCE0679A1DEC3DA0BEF731C934AE6FB461A6D +F8BF0811FFB58560A6A69CD6F9BF43FF38679E200D1A9AF3E63280C57B69E409 +96D8A5451711BCF1030589FEA4FAF6DF333B6CB89AAAEF76CE73B290BA3AF9E0 +4B1A2C7C3E11CAD5251D63CBDAE20EB210AB7850784C03DFB62EEB236B43A5BA +AB7D8893B39ED6CCB179508DBAC4A0A0B5781DD6AE74CBB3EC4B0E1E65CF9ADF +BF3482405A40C60AAE2C46C3C8EE96C2B7F5B591422861DB42F013A8D2D96AB4 +32950BA2906B425FE412C36AC87B76018BE9943CBD3428F92270EBF6448D81EC +0C5534F1102E33F822804B5D1505F0F15ABBD7522482B4FE50560645DE5A6AC6 +604E12DA1785D63B20F2CE08A488A93D58D8C53633F2C7CDB26E3996A2B3843C +AD5E38EA29CD5126F9AA8DA46ACF8A0A8ADE7D6314291B350184BAF524691661 +F020AC43AC01DB8B4B85D028639BCAACC41F762476A14224B76AC5CD27468418 +0ACF31F6FBC7377AD4214CE763E654CA10AA3F0D54BF826CCA3A0FAEB0EBF19D +FEC106EA5185AB36E0C37075D7ED8B44834671228268F3C779613E450E5BF846 +4101E658B689D9ABA56BEE2179EA32824F5A352F14F387707C57A8E0D2DDB6C5 +6809FEC11FD39200E23D6A6DBB8FE9EADF6B87210F9BA67FB7F6E22B695E0E5A +3C29CEA33CE31566F67842C329B4257C136F69D5EBC3037AC1B840504962C776 +A54347B0D0D9E6F953F447D44E968A8B844BF9467AF7CAF10F87F63DCC746CE0 +3DF9AE63BE98859CE2242E85655A7B893D9DFA23FB483FB73131FA817BF53FDD +DF53A912B8AFCA72E3BB6DEA6D1C50D5941CED20977C8972E3A0B9628CE21C93 +152B5F81708D9841BC57FF248373385548127559FA980BE970F2F050C78BC044 +3BB79E5CFB7A251707F60EB67569AE3D3D19F5C4AB579F555B306A1B3C84046E +42B0A86FDFEB8634CBC6E49BD3E1F26CF72B5D3FD84E7367A7037F3410F94B7F +8461AB4EAB13754E347EA08015E69C81062277142E582F3E9DA3623EC2E0787A +9A90919FAED35E0BEACCE6B4EE36781229D28C28DB250623FA4C8A74615CECB5 +EADF596B9C27FB18E56186F0B2BEE42ECE322CCEB1D6888608F08D7D49FBFCBF +C06812B19B58F1DD9515B0F721687D11D51B259764470DEF325BD9EE970A2FA1 +D96384B9929BBC81B47A199DD0AA5A36AC4D8D77F2F012FD7EEF0DD0B0551749 +E5B6792C208BBE172DD6AE7C5EF72FE436513317EDAEDA2ADAD2BD3F597D2C5A +3C945219F4FE910C4857B04BCC7DB78788D390CA7592D59057F04DA2B8C3A294 +1630A8EE7F290A7EDE6DFF2C4A6C1DBF7E902976B64E70A90D6DC0BAF4BDB422 +FADBA84EF6ED537967AB822B841E1006A56F0C3D8D543EAB2D5A580B46F2E373 +E893C53E1E97FFFF27136444077D66011DE2AEB2CE3BF39DD3F1E6A3EF16D4FE +6A629E3D95C3590A107D47B61DF03349E2FFCBAD3A595820BA17469780CDCD4B +F6D41D51755D03E5C34920442A2C74BD1D734B0C61F7DF0C9419211270ABDD3F +D77A41883A2469D750AA735D03CA8787F542FB41998D1AE274A76CEE67C96C32 +DDC8B904B3B91F97860BCA69C0BE9ABEBC87D4A74288A49CA23BA8856EE744C8 +3132FC637B88079533C9CACAB512F65EFE97D8A800499360063D36CA2B699F60 +1A980FAE4BE6484C4BA3418A5E791BB50C91B0AB123A3AC16454A7349AB29F07 +03FC6CC0EEE58B1310211F6B6CB9119E2FD5DB577ED40D52EAC8E67923D76CA2 +8B5ED4B7728A70056022356D073736B0649392D312DFB3730F67480D7BBCC17E +4972D88CBFF39ADC3E811D2B5843DE74FB7A46299A941F7BD55DDBEB7FF57900 +FED0225A186BF7599CA07F9089CC1BCC87C7AD1E9D122D3C5D504F35D4CE37E2 +F63D1B34FBD622C8786D62C6F9A488A50032DFC18AD7C31FCF7B8B45833100DB +4BBBD9532AFC311DBBEB50C4068A1DDDC3EDD15327E6B133D94F244D85E87B90 +5F75D81AE3561CD61BFCCD0E3E74865BFBA80E3480A900C69C607691CFA8BA35 +6030E4AC4E1C8751430B673B907DABAB46B382388B1FF6A03A21AFA5ED42166C +1B312E8C2002A0DDDB86175E89648CD90FC7CBFF906AEB986993A0D1FDFCA3A3 +2B35ECD0A3A49BBC41998B55732ACDBB8300E35410833D007863C2594DBDAED8 +CD82BACE490669A5DB02C6281512B13F737787DC5A3F1364FDB8A786FC758125 +BD77172E23B7217810285CFAD044ABC38F1BAFC7EC4C423E4B7793F11117638C +C4892C0920407E1BDDB72734168EDB12C60A413131AA66DDE6E6A57DDF0BC2AA +08330B9FC2E27EF6788A864938F2C03FA776BA143C75A4CDC519170048E45D7F +BDB40D0B6B15571E36D0230C2F7699A97FC368A4B1FB50063DD8624ECE60CA18 +4CFC21D0C2DB8DCCCE68E458706A8C0B400F41BDBF14632C2CDC21721DD565DC +2795F854D7BC26B4B9BDDA5D852BAAE580B4DF695DA5023CDFD91F5A13455D74 +F3701493728390E8F9CE9BA8A936D6EA2C449D7872F6B6A8C33366E5FDBB3649 +CF5FFC12A94D287DD6F3DA4DFDD56854F232E0936B6B9C198B08EB1CF6CA130F +B25808AC3B2BDA7739C7A4D04BC913D6F08709787B5A4E0EE8FEDF6458828A6E +9F07124B3287B132D9937590DFFDC46187E546C6E433A5C51D758E8552632325 +FBD427388B0B32FF0096EDB9C6EB25AEE5D89B3BC564D2F52E0EC012F1BF9DD9 +62531273AF89AE5C542CC1413F98C5ABAE0235E6059E771D58CF565EE30C1E04 +8C6C5E5B4C737C05FAEC0D8CB73F992F81C0F3D41D7B7C3CAF954E859E2596B6 +EA7FC07624AF5713476E90CF9225C6A6B94377D11DBAFEA260B384C50C1AEC60 +92221E71E98498DCF8124600BE535E1F4725AA6266083C7DBE4016F728B3444D +7DA2F341AF7344CFA948E069BB8F5A671E0AE00E4707952ED2567E8D6F16EA89 +DE827B022005199F96A710E8221983A26AD73F93CD92282BA0EA2E6D8CFECAD2 +08960D4828EB13C37032B1AA7260B90561406B8CE651196D083A713F93F1818E +5C184FB90C89320861B463EEE020D20D275C5BF28F87D1B0BF3D8F62F3B55B38 +D48A7CA48732252E783405BDCDBE41F69B0F5B91023DF4AF0CD5EF372CFE8691 +A88509183ABE61AA3DC692CAAC909570022C8D012C994056FE39DE91472884E9 +ADCB12E81D46C8B2EB036BEB475C15B474FA0782F31392047E90691CD1E265DB +2F529884FEA366643399548CCB5C9608DF45EAD3496783E106B4032F0ACDCD62 +8FCA1DD7932D390F0BA94FE1E1BF77C39933373011F57CB8F2EF9D524A4CB045 +EF9268A3B0473CFD6EFBB1C8C2B8906925338A3549BFCA8E4DBB253A7F2B177B +E75FEA577606E0B3766D2BEDDB6A8C1A7F8FC1475BEC6FD536250594F345EC72 +A777768A65E60BDAAA60F63A910A3DAAA2B1C3C757C1C2514EF56000A0AF550A +874F9082F4F517872A1FED8CA1F9BB904F911054C61B367ECA111A2030B3D0E0 +06686F876BBC266158E4958DFA3A69C4040879153FD1FCECBC465EA7A4842835 +62C897778E700B2EABB4AF731D19B47E7C2FE3FCAE9354AF7622E0FB6B919985 +47B934F9737251F0F4B7697DFE50334BD0415CD4AACAAB291A93D510EF08D45C +BE288F4D100A299AF55C538A40F5AED258242E23209297340180079AA8BBD084 +F61520D74D6D4697DF149D82B6CDAC535DC15D6696B6337106B853EC27F2B678 +5ACF30289F2FB8D04A23054ADA546548DDBD1A1F3BBA5B1FF0A363C6F51F9B86 +B493853AC7B461E0FB63D7131362A1E936184DD672AC448C6A42D28F4F46EF10 +A977FE1DF50D3F1D2778E0B8064E1DB19FF9802B47C8831A15675CF8A3192922 +D7748FAB36EFE9FA6C481AF87ED4D60F56196BA85702DCF489B585F5B2CB6A0B +4B8836AAA718843B8D5372304F232A53C6D22BB038CC13D167BECBB79C153113 +F1ED881FF9F0836AA6C8DCE7AB3F731ABECAB9FF68EDA58EAEEAF81C8F00C613 +51B18BEEE99A6D36E39847D375CAB2D56140FF111CCECEC6364C4FB15C73E6F7 +16BC96B72C0F2332A05D46A3681DDFD7225ACB2F6BB2C17538950182E8018ABA +A3ACA87D6BC2EC0933432FD2173C0D0517996307BEA8DCBF7CB50C3C2A75D382 +C7F7F8A9D10A7BAF9522E477C60147D12493AB1518174506F4E7D6E4536B6F17 +82566E0292885EF9A5834478E7E80562F222BA1545559FF812510EF65D25ECC4 +B11CF424A0EA4D5607B98AC1EF8D2596D9D8D613EDEEC871D86F6321DF5D4131 +D3692F2DA027E353612594F820B61E44659E6BA28CA337295D79D33CF660B6AC +3345FD488B065CB9B96FC6421DB9BD54D8408D9100C535651FE13415888BB95F +769877EEE6354404E181467B7BF7B9B7389AB7E2BE28258C49AB23B14B7B5F37 +CA3E05A9DF28AA94820855921298B1728382C716DA03B26C91AF9A0D3AECE0D3 +874D825FD47952C284EA06EEF30DF56B1E5B8475FC5F0E023611D4DCF1FC0712 +797D26412A999E071C1AD07EDFA87737F60DAD36824217A1FA558F7323326AB0 +41906CC81B1301822B548450B3D2FB363C28899B2057AA1B2EDA6A86FA56BAE8 +F528863554BB3ED80E9A050BF41A4D5BB4E9A456851F3C366217BBD9CCC809D1 +FB176299513FFF877F08E59EF81B3EAA22128C1BC99F8C645DE8B0E7EEC1C390 +4E3A46A9DB2EE38178791E433646156EF4B5DC09EAF4F9AE6333B3C86A79447B +5B0F8B1F434E3FF24D0318CF94E1BB032C2E7C89B331E89C30077DDFE482E9E5 +CF95C99881248CF39DE5C007802CDCA0F61D568B86C61199DACA1435FBB91906 +0C12873D667F5AE3EE933BA26ADB7DB635CBFBCE4E242519B350E2F1FD4679E5 +B040CE69A0468D5C98B4E9C903019FAE112BE2D2A1147258543BB5323EDEEFB1 +EE0A0088C46BA82FEB4F9253C67B3AADAF6B729858361F78FED6CC62E864A463 +1EE052C054033EEF351217036719DD3160961AED07D70FE180F3980492F12F45 +FAA8070FFDDE2A45F7326476BFC282876A5322393BFF764BE7CA4AF926581B9F +629BA4B52B8E5F6DEEA4715F50C0CC1C0B40C0F55EB174773B9F293422C2674F +61EB7EE6C9688912F25CB7EE73818EE1E0BB2EF2531534DCBD479AA483509E16 +5E80D3CB0CB9DF68F49AA4E06B3B2BBE2FC4EE900CE4C893A9F8C372DC6C5F23 +09CD41F346D77C4CC6989D9DBF343366C7B80A94FCB4B14BABD9609786B22E41 +3BF9DD28D00400E1F19E9D848E22F633441968A4504DAA20CD19886D6B2B42BF +FA85825701C0B19A8D226C491581A952D49398470BD11862DA3CE743A7D14DBD +03067A04FFF2038EA2713458577C8B278ED680E074DF0F5EF16772BA04A27DEF +B2A085E2813AAEB5DCABD32D91B2FE8FCBA6BAFADB2CB4A53BB0F41F6C2728C4 +D050386186DA75AC29747EA59E5DCC595125912F128CF5DBF16FC6FB608AFF3E +5C4DECCFE55B6777BD6E451403DA8E5B06659EBA3C3856A804D2B3675C293BAF +ABC3858835462C198ADC14E9AB961E129D7CCD224ABC8B6B0EE3AF0529F0F0C4 +B258785229065E03EF206620273A25A5615E712E148C6CB2B595146EE5E82027 +F5045833F849E3C7B72F9A692F31A00131B258A1548A7D769257EA1C0A21D337 +6D46CB39DBD9B1F472CE291584046B5F9E17F26FD5200C04AC60FD24F014F723 +26C3F650CF7B43980516A84874D237065AF8571BB09F2C183D3EAD2ED132E6CC +90FBDE25E191E00A6A91FD86366E84C0071E3F18FBE1097030066A03B5647CF9 +29D5428E901D489B11400A8062329ADB0366FD30ACD5CC128008EE92BA7AD4A4 +F08AF21143FDCFD86A1F35882F8E78B40F08F62FE34B3631F4E50C1CD2D967EB +9B7F6B38020FFB0EB815F6C6ABAB90302517BF26B0470D8251434EF391BE8DE5 +0583CF1238B02B71A7B0E73EA0E442E4AFB2A9361BCCD36D49128E5FBBAEF4C9 +F6C507EC9A3C855A3A8782E41D69C7FB2044CAE54FD9F34EEF1C0D1A73A058D6 +4CE8D4A159F1F8E7BEEB017DD998632D63E866D10E85BCCC74F09069587F4973 +98D5059866AC7266BF2F98B6E0860A7E775A75D24341D22A8879885A06536F0F +25FEDBD08F501E27D183790D585B7105CDE640217497A2BD3B6FC74AC021DD77 +30F3670A901529CC185932798AFB945D732892BB6A3F7F9394A724D3CC67F397 +BB5C326477A9B9A0B6AC88739225726024AEE7DE582BDAA642C620045D0DCCCF +CF627709E043BCAE567C6AD6CF380211636891A1EC49299B2DCE5CAF30D6E640 +209EF3ADC91832156D08571A415F1D9A176DAE1807E058B8E5BE718B8A2F6C39 +30E68BCDA20C3453D11A19159773794003C0A18A1E44B3E0E436962A82F25B94 +BDBFBC27D7852E2A585F8460525CAE7D4F59412406E55A1983655E68EC80C0AB +D011D9942F3705795BEF6359FEA2CC03C3A17945FE3E404698834BA2C2F4E80E +C581038F866EB3CD0720FE71C8EE9E5BA48C1AB81741FA70BCA3EDFC2C15C798 +20B5742E1EBB69820D0744AEDC25B108592CE9FB5E99D98BB9ACC5290204DA46 +E58D5399E4F3BB3454FB6B3D747E87C2BAAE0560DC3404D45109FE0871A653EA +53A851622357DBE2D2F57EA86C6391F98B0A46B4B8298B80F2BAB62C375C7616 +3BC47B2833C33637FA08BF8A4E8FEAE96EDD8BFF0EA81669355B55C16F314DB9 +82C83C9C18EC983FEC9C9575FADD248B0D780996C9F4056F121E9C9B15DE33E6 +7B25DA90604090B85D2C7EFFBEF1302A23A3A843273959B069F91E9A29960DBF +BDCC2A80CF498C9649B741217F3AD9DF46EF0595B9E05625DFC433462EDC7EF9 +4C7EB6BF4F91734CCDDB803A126B3F1975FE2074551C45EF0AE6097BF35E3717 +AACB2D15FB3817F7E35619009606864B00AF7AA9870F7A28A9D4FD228368CE66 +043FA9FD8558E816E7E80537395F8534D31516ED689B815679465BF314492308 +1165547F82F63EDE8F5FDE80D25256FE02BA5B0EC132F4FE6149AF9A9C9CDF83 +36AED12D7B0B7FD7EB1B384425667B95B66594805CCA6E9B8571CE3714EEBE97 +8DA11BE2EFC617574327670A8141C446077073F3A5A0A0F0BDEBB051B4E24E21 +4801080C02BDDED62D2BB66D795F48A73D45F78E66CBE58C05EE49D8FF2A5716 +8FB6C1E76BAFB1FFE19CB832C5DB38E63932130435B01E7E88BAF1F2011231CA +EBA78412421D76A03B90C84E03568770BAB5D0DCCB8E8BC60FC31728CB272DAF +DE1AA58EDC98AA73CF7229DB2CA1752683398337820505C30B675D0EA12781CD +ECF91E7ADBF5C8B8ACFBFE6F6753BAC056E6E201F5433BBD6D84B3C1964C8A7E +A29A4EF641B52F17379CAEDA5E6B8078E6F859CCE59D700DB8D999C5A362C31A +7991E1DD6AEF84CDFF3A847598F648FD82BBA30501CFC704128747515DFD8254 +257950A56C1AAF908E232B929D4A8026953385CA09BBBAAECFEE884070FE292B +C1747F586DB3AC08F30B5158241D79A5C4B6203DA7679991AF5ABE0BD6F3AB7D +037E509C929061C9B102181B37AC7E27045D2ABA52195EE922DD553F18BB2774 +8D4BB1EAFF084D308D6C1A1C93C43C0E9239D073D1BD0CEABCA2F4F1E62D167F +9424742E3035EB356DDFFEEABF866B87C4852775264179BD528C02AAF2FE09D1 +B275FE0C37B35428748F17DA26012B6A5537F5903FB590DB720B017DDFAE49A4 +BF43B50E60AFE37C09F6950D0F7CDCF8DB0F5C4CBA738C75FAEB67DBFD7B67A7 +3A96A529D4C9114006FFFDF09FB9C7EBA0376E3FC18007FE709F6B92C0503235 +AD86D787D7D436F12863E785C196F386DA62F2460F29FAE5281536F72343AB6C +A673A917CC5324F8B0968A88A22EFA9E5D8701CD104639EC88369485708FA2CB +1A2118350D506E790C7EC602AA62AC2EC52CC745C75C24AC46666D134F586F49 +93B0F607D6A7B12CB6DFD19E58A2E466EEF67B4302825FE9B31441C462CA18B9 +FC915E336AFCF0A3708A46F313412827F7345C6762A286F11EA66932713E33CE +94A8CC55AF1865B2DB7B3552290202D8BBB1C25000AB35 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMTT9 +%!PS-AdobeFont-1.0: CMTT9 003.002 +%%Title: CMTT9 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMTT9. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMTT9 known{/CMTT9 findfont dup/UniqueID known{dup +/UniqueID get 5000831 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMTT9 def +/FontBBox {-6 -233 542 698 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMTT9.) readonly def +/FullName (CMTT9) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch true def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 43 /plus put +dup 45 /hyphen put +dup 46 /period put +dup 47 /slash put +dup 50 /two put +dup 52 /four put +dup 58 /colon put +dup 72 /H put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 119 /w put +dup 120 /x put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794DDF2E6BABDA4215500A0 +42D1A3D0D02C0C98BB1D6ED0B7791274C38B038FC7921FF1FB8FAE7258C09259 +4B8E1BD9EDCEDE9ADAD9BD9598EEA9691589649A9A21539161E374075BEE3457 +689F308A4A7AC9F2FE4B301A6C36B0442FB92E3B002623493DC087800B5A0521 +0DB96A23175AC584DE166F59142779F26FEE9783E28DE49FC3A8D6583EE63FBA +610DA773CA18ACE6F64A4867A1A7817120ABF9DE4D17782866E6CB6B65A9F6D8 +3667C8D3E61E5356E35343FDD4C6436DF73934470916CB5F0ECEA6BFF092E735 +C7C355B56189D1DD5715EC97E50145FFC17BB1497315A9585D713A7A6DFC7933 +995468EFD0F59E3C15865B87925A3F2930E20D5A35970E2C44F1629FA16E00EE +EE21EFC50D49F5BC02300D0A7BB85E649CB4E2E828C8B1C5469463013E71D723 +2CB11BCBAC191AC751A2AF7FC228395CE9472DC1809052012AEC2CD66695DAF0 +4CA04234F0187F4116C93F59A7F1F8123DE87F111853B785A20CA8B49B3B0CEC +B11AD345E1A11578D2EFEB0536D125237086CC8CD9F34A5137AC5DDFD8746014 +D74AAE8239B81ACF65F379CF2153B06A238A2D767F294CAE0D79228F0B7D45CE +510AC9657A1776202FEF42F96D476E7DF407786AEA12DEA0013D3B4C5D0640F5 +BC5BB72C34066270399CE595827175B23B25072723BD24E07F6BCD9EF0175DEF +93714BAA53960F81103CFB731CED4A267B53727BCA3C97B0BA5004055D4EF0EC +F725658E53AC86E4061B489AD4154915C3981B3B703E1E2A8D390CCECCA99385 +45EBE35441B062D7D12DAB2B31569387187D74A4043FD71F1C6D352EAE0F6757 +4345FBFB6DB15CAE47CAC4BAE47AECAE5FF5EC19057DCEFA1B23F47364ABDF47 +088A7C6A2AE26B10459B6D41CB69182FD1472F326CE3A15B59255D1DE3B616D8 +9D1F12561038839781E657C896B8C58A32DF5AEA23732A0966D96C68C988ED7A +09B7E2C8F9F3D0D56879764781566299A4EDD3588BDF70E3D924D25074F30988 +E35BDD827AE4D0B4A06F55A9976BF0DB3C0B1D09CD08E8CB168B50617691638C +0EC1A791C228177D4FFB021EC3DF5082CA3487AD2EFC8DE9466A690ADDB4C52A +FE2A6DB4CC275CD33D9136E735279FBB2008D59E667905EBB04326EC33C98B2C +94744B7F540D86E90DED64572ECF1EAD3A58EC101642B245A9C7232DC8FB8741 +03F97883BB32FB955C22F878FA0FD114451A3B3859B0B5537AFAB73AEC7DB2BF +409E1FB41D473714F6BEA73CB085139879FA31710E01915C2938C37BAD6D7D71 +45B897E00857D3931A489EAC7B42BCE4E65F73F67FE027CE482DC47598ABCB95 +39E98DA8ECA3E23F0799D5963ABA6E2984DEACBE7B46B40ADC6213E0F4D08971 +58F68C946C748E4B4217CBA2391BE2086C9758F4E32C9B6413E48D84D33A6E85 +84747029C0A9C9B92841D217A902BA8EB333999D62FDA9F82BFC8ED11F67988A +0CAE42182E414A9766AFFF4B046A09D476F8E3F15A8C7829BEE982D8350BDF5F +F215F2BBBF68D4B567BAB798B9604C79306C475926E9FEC0F07A99F43473C6FD +B15AC29C3D07FEBAD1BAFF75AAF2FBE94F104F1DBF838044FAD94B661B06AECD +D9AEBD02B60CA4546DD6B5B5C1A3833ED07845671CEFCA8955CE0DE5DB8FC93B +3306683CBFB8E5B79A863DE78D455DE9D592043C2686F88A43140F8B9F3B553B +7047420E93E753829F8D47AC7621CFE3626F271E31F0019CC02D0B57F67BB47D +8CFB63E902EA3231C00EC66EEC0D30FE8394558BD3535C888C4CEFC6EB72E737 +712ADC6300162D5D79BEE0CA1F6E4127A0BC90656C01692F6D82C85550AFC97E +C2693E379160FDB9636FA41AE9C75B7F6643B05971C6D67CE30971D590FC07B3 +E0B36B4D1C7F25110B5DA2130D574FA292B47322975A2BADBDB39AAE69BDDBDA +A880F9AAB580117708C79204DFFDC08BF4A48919B5C22228845CE8C3109E93AC +2479E523B8A1C12A6E541118F121DC6B4EAED83491A03192D5C3A2A45D1A2467 +757E7B377C635CF5CAE11A7CB49D49F3A1BB2286090B5F0E4F89869D1771D50C +54B5C5E091E3048A2C194F0ED00DD64FB95BAC6FA9D61ECD093ED416DA3A4981 +DB07CFF17C4F55C62DF628EBFF06FAC3F3D3F91C30EBB34052BE1A08F5EDA4B9 +08977197950A282B84E21D43C64BE3AE4BCE22C70E7D392DE09D89B7F23351AD +6AD37225C12BA79EC9951F5DA1E505DB26200190ADE0E549305B7530CB86EFD2 +A896F13A97E51754F70B609CB4511CEFC38BA579C071E9510A49982389980DC5 +336D6C4A2DB100DFEC4055C7AA9C55880F94FBEA9EB280BEF66CB8E1E38A359D +E5AFB12B540CD599085ADDA7FC2C72E7C873015773FFEECA2C596B75BC39A3EB +3C43FA2E53C0D7993042F3D652BCC483E48B7F6C94C3FF6D38E276086A6AE67A +E5A571B9C72E0D7824E0BC2ADF51A393B9E334649F786EC1923C854382B89627 +1B9E701AE5A6C42E672B2C6A33C8BBCA8F69B9061E787D6B92183F20CF4C3903 +FF5417427B84798C82BE28D2C81624E3920CA61EC9EADB364B5A6E50E49A1A72 +A9A090A1FCD84814B8B2708AD787D2B5015DA1305874F58C5EB62F843685FCB6 +465FCA80176CAB2B2FE65E0A270BCE1E3DB97564BEDFAE5CA44395A8DF4505C0 +3E103CC3B914359B2870DA6CD30382EAE8949131CFE31E9E75C3E47A3834BB32 +CF183D4A8B9001710D0A11390C9DAD116196568591D38C2AF4ADD852F31494EF +573462759A35415900360882739789D6B89ACEFA251C5ED90ED704DD7C3C80CA +9F6CDED69537D201D520C99E69EEAD5D3C0EB84C166660B3C190166D93EDFE6D +15BCB6DC5CDCA825E48D33845CC2FB15291AAB823F25CF8BB0A1EAED8BEC524D +D9CA016027141FAC9D35B64FB9C224552F29EF6B32497254E319090E698FD8A5 +15491CDFE1B988C79A0E3B9D01E12FF084E9FA86CCAE02A3EE6F2917B61A2CC1 +64B8CAF309D1AB48A34227A7729DFF99CB6EC282E3FAEDD2673779AA7E4C1789 +D93FDC37FE95F087C5F88F53D30A2DA9C913BF205FC6BDD060A40184F4AAEB3C +D080D63B89CA3DEFF310D09EF0A83F3914BD5B7932980ECE139EF0313C20B4C8 +576EE0FE3F28FAF4D3CE7CD0890BC824A85B8EF4636BDF1EF1BB519F93D36540 +ED09FAF93FD71992CA2CE2E83F5355162ECEB32AD218092F45D5A61A44E67135 +EF0453589CECDC6962D0E8DA7E7567603BAF50B2C8F1CA65EA5320984E7D69AC +9A7D3D7F92565D79E8C9DD2D92CCA7DE9CD058545E9F98AA47904D70E1897099 +3C4C852B3BA131DDD348433C336BDF5FBDFB62120DDEAEB3255E3207B0C84A0A +1ECF9EC869DB9BFA3693B03FCB27C5A5D3CDD62630DEDE91B4DD5B9784BF0BDD +FC6EEC3FA7ACA9E15FAE47CDD9B7FCD2BF0EFA10716F08C0AF25FF67CB6F9598 +C607D2FCA452417D2C69DC808A9441A66492394C3450BD30632AE739EAD654BA +4343459CA36B6D5B2C12C39495952F2EF93D82C73E33236785A79609E260C4E0 +CF3A3C950DE71DDC3939D42DB1CB1CA917CEAD56979A70F8F3B207C805319FA7 +3C000AE2B21D711A6D78C7BFB901334DC06F59EAB6D94B507734C27971F8458D +D00193645AB92FB8FE163D5C51AE4F40BDB4F2C51691E76EE0636F071F37AAA9 +BA78BD12459CA499210EB0CE2F8BD317387797C33F5933AE7A6264DA06B4A6A6 +1188326147A16B205D1F965872DED7D8EDB3294FAD2FCDF0D423329E9CCF879D +4E0B966D509F45527F7609DD09694D286F6FF7535EF8971B7DFBAF608A19D442 +C133207EB1152ABBD11C455D0977F66A9B73E51381D1CA4B66E87C0C7175A63D +80C699A052F00C41DAEF42E7A40E07B1B14107AB0787E24E17C1462960E3C54C +AE73BE4924464FB177EC62F116B2822842541543EFF7ABDDEE197D6BD8F8D4E6 +59175D8C5957550B70BE775AD52FFF6E7C00DA7CDC16E1DF7446BB5D8FD82647 +3E9F87D5EA365C82A2D991321ECB14A9E3AEADC5A56665DF7072D6DAE402BCB6 +14D92B17F9E063E4E9D8D239C91F5C7C0BCD2FBD936C9D4A0B57659420343B59 +B395BBD1AB5B6003F653699D57E7581F9813CC98D4F072FB78899D6DECC42D34 +F2787EDEA64058B46C4BFAA2BB96E9BE5CACE8D91E4C080ADFC0FA0D4A29C6B8 +54FEA9E11DBCF53D9CA40A21AE5076451EDAB3593E56B6D453DC8EAB8C78B588 +34D4C4F36861B5649BC1E9F3091E704BDA7613ED45C911DFECA74EEA05165191 +825F95A947CAF382FBAF01F3B8B041ACCDF39718D7DC5BA6CA12BB20EEE96439 +BF2E2628AA3BD2C91998E6247A690FCB0CC95F286F427345CC4F1115BA3A6E54 +4743355F2CC991CBDFF5725902C1F5A6DEFDC8638A26EA456C33C27773D6214F +66536CD2E44FD253531732D5A8C44B336B1BB47B0477350EB8CF74889B93402E +2356A9CAAFCA562315D8E0B3F42F08932CB87BA2499A875AFA08D11DA73B38AF +F46D03B7F639A8D7BF88CF07FFF4E91716DCCE6E2CCAB60A64D5E40EFD8B336A +1BFCC4CB04F49DE1FBDE7AA5B2092A6EDBD913D161A3271AB6411622D0E14416 +37F81E0102F5B0F2F9A2B27819E4BACD7C50E29D6291AE5B0973C657761545A6 +741729620EF2BF1046B3913399C10982EE5F4142CF461EA31042E432CC79A1A1 +39C607D22E45A6DEC008CB4BF6007CDE9DD5802B49A62C8E02A6D448B64177CC +887AD71D171B99E7ABE2085B37D90B3BD8513995D9A57F53184DA474F6DB5E49 +B73E04CC214EA5398DF7D7541F94E623E8687B511640457A48A68E9D9D6584CD +15B57CC044D8091C771D175F2EEDD411099BC8F7B4317DC503BB5E405AEEB526 +5E6E1B1F2705275D274E012A98F66075CEB90AFC648B964DDC0E9C4AE7B24CE1 +80B051022E5781A533A21DCFB97893847D685137EAD85BA708A7E118C72FA839 +A9E460B5D17365A0AF1F53A98319FB64A5819B087F554BC056C4BE44113A5404 +BEF759F890C1CA5E7AE156F4F8106FDB4F8DFCCC640976983EADB30976344048 +2A86D7B2AF4A01CA736B98D52ACE392AD4BECE7E61C710B08B66F01857CA460B +B8376E257113E10F6DEDF14CE2A4E6A99ECBCD302C36CADB713D849EAE9EB598 +F29DC98531D793B79F83091F9B136809E006F34E423D528CC4309AFFB3EEB47B +9A9DE4D5B25CE953345C326BCBE2B4912641780637783084D3D12693F8135483 +CBB0AC4EE0B5610D7CEB7DF205830BDB9BB404DC1B28FB0824CC187B26C19A91 +DA0025EC739BF3993700101D042DED86D67F5FB87912CFC51AA7DF53F2162D62 +6314A2CE13810D0B8D81F45771391A236422CFA0F35F7A0CDF14ACB2724AA57B +7C2C28D53029B1146558610E0CFBBF72A85AB9BA308F846228F299F13F68E8F7 +D963B2EE9EF7D4C21690632B640BDDAD0556EFA4EFBF035F13377ABB5CBC280B +9E0C12AACB153C93351E5BA95A7D149010E204950A59C7FC6581D9703468C1E9 +EFAE37E7E6ACB892B3F8D1248D9A4A72F642FECC5E0B25C15EEB921EDDE84D12 +0E524FE6133C4921FF4921242392C12FBE69744D53739F7E849C1B96C4020AB2 +1FF10DEA608F111749E2FBD8DBCB17F353DCB3075B4F4B8186963EFE95A76A10 +85AA5BB6DB4095291974221829A8E436680F4860E01C3843BE5BB3101D0869C0 +EFCE08D187BC04F58C7A450A59093680A0F09E8E3F12DF5223E7EAFEFA01978F +D8354753A68022CC92C71F2CA732DADAA8A466D4AAE5999B0DC077715671F518 +E6277741F44AE798EE50DF44CCF71FCF8BC71F76374005FEBC4883C6EDA854B0 +88C0C2B476709AA809ECE41AE786DB1A32B3FBBCC14921673578D3514C8CA842 +E1FF90BE33F7B93ADF6BFB8B1AFBBD080783BEF056A6BFAEF676F7BF9F2DFCC8 +01D255A9F0391951210D60D4D4DCA93AA858B38C0D7B8FD740D5FC6F277C2A68 +54CC2DE1F40B6347201FCA2A0A91822708D820CE645C3E4E5A09FE25721AB33A +97871ED448F38FC5A349D81F402B34461D840D5768BFC6849439AB6115104F78 +B87115B1DAE12542EA898F86ACE247709817850B067F537E6137196101D46DD2 +D842EA03EF4501E34074E8458E638ACC4EB349A7430AB035BEF2DD4CE00554F9 +18F9FE32A55AC1E7E50D64AAFDA278D77A7149C59DC5B1E3064A4B281A54C9CE +A5EA94ABEAE4C6D5674C208ABC72563976487136AF2E21F835BEFD232D7F0D13 +1D19932367F51D5379934DA7F1635AC51EE5CEBFA63D4D32F018DEF13624EE62 +31DAE68A08DBE3B4FDAAFC75291C8C6CC7A657E3C7453C7D1461A36E88E633D5 +408253B673AD87A9FB2D0F56DF1305916D14D5DD62051E27BCE09CEE9A1F14AF +1D7164BA5FB6E6EC8D38750F7E28BE330909F303ECDEE692E347DE13C8C2F82E +29C8BE6EFD76546F362A12A1C2DC12389EA95ACB4DCBE95620F0C193EAD91B33 +BAAC5801AE827B9AB3FCE5D11D1D7854F8FA8A31670119CC0CA98628F801838B +AAC7EF90AC5466BE69CE3E3CD9951A5EB9AC08014285422F6DA6F6E221BB30F8 +0042A11F2E4B765BB0D142AD52F4D85785EA71B2E1CE20728B9E9306CE93268D +99B822A5AB5232EC7E26EE1160850AD3905864A01357F22722B6A54D4EBE58CE +480EAD9FBF068EE965AC4B5FD2FA8CCB91ECFC6E90B9C49268CA0B0FDAD23ADC +D5A74B41149BB08454054C451AD0DA4CCF8B60F2EBD061AA03A011D548B6B481 +FAB00AF9225BB5463F27FD67333FB51F8664536267E95CFAA0BE3BC1B8F889CB +587A3A4FA2B45864F07E11372C9507A625C0030EF7030A0B4D931BCC48F6DD51 +A4D1F63FDC4B59C1CB18E6242E9F4B4B8AD9755B870FE60D640181FB7EB8120C +C56F51DC8C47FCC6318C2145EDCBEFA7BC4253315BA67FD2B3D4AF6A9F3F229C +AB75B592EADE15B1FB5FDBA1C0F786BD21A51506B7A2E42C2D086BA6F84D1B3D +AC7531545F0B01346831FF36A52CAC1E390F99AEDC265B44B0FC9C581BBA6BE4 +48B723811EBCAEA5FEFAEA7E5B987F2C7B3E9A65D2D14A7B74F099401C57E367 +385352D0776D2A908F7A5A2E4D4160946C5591397877025C8C387CA413EFED56 +8B142E8341E349DB4DBA422A4FEE56A573972A0C66590175158E48850A9F7F38 +4B95726787B8F969FDBC97491CC81CABC976CD00A27D1DFCA7CF467A956C1C6C +839817AEF8794B6151FAE9261119DD5DB787DC9D3B420FD325ED6599FACADE0C +320D54C2E0D296537E22C1783670A9D9BECAEC63853EC2F05A990260DC189D63 +7CCC0BDDF2CF7585071ABAC14630666737041194D0777EA4292AE60BD7F7100E +DB568C90F0D899EA006CA423CFFD6EC70A5D3D8AC43C747DBAD3B02219E47D8D +DE030631F4678C357A58ECC52782B31B50CFD44EC33F41585E51B27E3997D33F +461BEF897220AEC80007F13C5A1EE3A0430CA899047DF944831F8B010A7DE74A +BFD26001472DC00CDC9F17CC435F61ADAD4E9AE062ED477FC621FDDF9242C449 +1BB3F77FDD1519A251B663A693D84B42BF0962F537757F38CE5C5D56B98AB10A +3B70C8AE8D52DCAFCEC22E7B09D3C4EFDA1841C74CA975E4F8294F7BDC796500 +0ABE197ED3737A65F7BAE601C91DB3983EAE11DA3EA18ABBBA3650DC361C2E77 +EF9F97618B0C337A906FF39926D2B0B7883ABBA650816C4C6B34EEA836994EEA +AFEDDE56E0099D0E09EB88EB093544B9BF4871200746A0409C475FC4232A38D8 +F3105B0FF44E4F132378DD12D9E796412FD0F9478322215E9F59E69396C35AC4 +097C4995B60BF4D8B3AFD0A002B3A6E4FA114131410D5658999B86DFDD3005F3 +AED1FA8F077AD1F27EA249221585703F20FB70E37A26C6C3F2E101693C94612B +65BF89F37AA3C10A40EE8E49915F1A1B95D2193D8003DECEF9D76FDAA33B1AA9 +CEDCB21C2A3B05747FB3ABDBD904B66EEC60CED2867442F5FE445587EB8C6D14 +87A6B1B4871A8371A7ECA6A159EAB295B167CC35ADEB8512FD0C237421773BE8 +A081FB687F9C5D676F2944DE6E6B639C37E8E49BD4A6F0903E0C31EAFC4C7ED2 +C3C67E71D8BE2B8D5784E8A6F19A9A8929DF9833440E160945274682F435DFAC +575048CC768BB8F13AA21C6B125E6073611BE138AE06D13E62E7EDE3D0239474 +E040B3E446165FFE60E20B75D2A5F9EE021B22256621C290A8F3342F0347B8EC +CFA6AD68D47C05268EE3AC8683F4840D736EAB585C6284018DC94FC103B4A882 +ADAEFB625EA966F3877B3FFEA518B809A4BD1F2A077DA3E014EFD2B3B7890A4D +88902203E738EFC609870FEE77380CBBE92862923F31386030961DC2EBB7365C +157E25C217D24EFAD750F6EA9BB432CAC3C0373174203457BAB296A37F3F8309 +8B11746D4FC646E6AF560806020F7CA985FC18FDDC2F050B34597C80A43EFBDC +DFF07146BA76FF45289A06BBF4087B01C846F120E32B00C8E4C0673ED6E70AE9 +CDF202C4CD1B6D099389B82A161ECFAE5CE71E9B09D0DA43B3B6D093D82C37A5 +74533362E3EFB03A550A8E6F8E327257BF8C8DBF57D42F577A996932A38DBC0A +878608407B929B4632DBA4BA4C5D74D348D57ED2BED979F9F648B5B302C531FD +18906C4B4ABE9A66AC6207D5DDD920A4DD501C8785F4F0B5841E562C443B127B +210C4931F3545B81125AE95F3C20CBEC74D0790FB53BCDE8AE6B2C57E1CDA4E3 +2899A6C0FD56BBAE7657145F95F8A55BF485720DC928F99A987F077FAF6C3C46 +81ABA54CF2FEFF5CE700037699E6A4C6A11F54E84C3A14387410A1373D421FB2 +0765D93B48197F48C10EC01E898E4B00907A1F24796F2C6F6CF8DB2890A87BFA +433E5C1B240A4C00F5F33FE0148E6B7BA0FC92FB77CE1AF6BD656DA6340666D4 +49081F1971567AE9CC3FCBADF356E28B6E431F1A8C3A0BD2CF711EAE05B54F25 +21CEF148123CD037AB1F872BEDDEAA3E177C51E29238689253654D8D620818F9 +5FBED7C4AE1A5B170CF07D69973F5F97FE9CB25312E3647BD136FFD2E8DE0ACE +55B9EBD67FCF20B9B61F3FEA3A195CD675C001CE34619A2D4BA27340E371FB72 +D665ACC3F17B7822DCC979A4BDF2DE69781A555E748A20B9BC9D80A44DA0C7D0 +07CF01179C20E46F463B875FD368D3CACC709E556E59FD44D5A10061945D4F79 +50DCE87D6DF8B97BA224E6592D9DCDF2DBF597FC075B70B7D2EE66B7FA24CD68 +D33A0F7B0459E7E046E29182F066739630324FBB523F5B071D64A9061E2ADB6A +4177374948BFA1BF909256E1242861C86E25F47FBE3F244C0C1AB4D86A66C045 +F77D28426B1E7A28D28F71C4C1B8E991D361DCFED4FF1693EE98D2A97E0BFCB8 +D71A03D435ECA0A698C00D57FD34DBBD8E2BCAD43AE6923B4B4F5B216EF77C6F +56C01FA4A88F21E1EC498F4DCB9B5DA6E206F329797885545DD07E812F7C5A27 +6323C47CAEFFB89FCEEBA1C617E1056C0F0D11F896E3688E6A0EC0E65F9BB5CB +DCED9FC786C41A3F0405188613DA99A0FFE74CF67EC6AF394ED19AB929968955 +6B906B5AD41182837FB3BC4E3E015BFD30F8FCB9C9F9E433FF5419212D780BF7 +5F1163CD79420E8EE929FD12F0A7EEFF3BDEAA637C21768539304F64E5029407 +B7C62F18D34DF23EFAA8D27AECB70DE226D81006B157DD8F7242A1A47AAE6B2F +E871C18B9453252B6B821A1A823375C639164B65A06C6F60B753510C9A5A1408 +AB9C3AD66CDC76881CC821294E26EE64022BB4634CB2493D9F232EAD6BC10701 +9017167FEBFBF968B68B13CC8DB160DE891A856AE79C1ECE08773BD25709815F +D15F5FB61DEF5F780564BF5D3E85F177EB030A22CC5D6BBFE61BC560A79A7AAB +A943677452F9260200152676DA8DF3A8BF6DA8F9A5A50BA42706039DB6C9379D +8462A60D13B6E8151D0A29E0445E66CD64A643456F812E9A3E82CAD3852621B6 +BAF5EFC4C97B486CF2A39B9F64194DBC22833840BA1659C306D72E47F64F03C7 +0A7BE5122ED2B9F8183FF0A9AFBCA7B8ED81A4ABFDBB4E9772C925BA524EA050 +1EAEC5D2B0A4CE686D8CF53C3678BD1FE0709D86004CFF763D8BE4F8581D2AE5 +E07BBF243E785E5D3B59988544D2E046A28B61061D00A314D731AF271BB395D1 +D655F9AC66DFF67874B13F1B61DF813B4F8E3D347AA711F2C630AE8098C02BE2 +7675F225C2B835BDE2CA80B386401A66F1A98C82B15467912C197E87B1FE4DB6 +690DF25568EEE4F0AB452F2FF1F62874208B9C24C053F2EA216DD34E493984CC +AB84BAA291B7969FF6C1E0103CA69E6CD8A8EB7DD1C6E47C3A48D6A6E927AA0B +1C73991D37EBC9D402960D8475F8D14B533FDAB271EFA592FC95B25801C3D169 +7BBDA90D446DD7C752DC08B55AFC2ADBDE329387E30B3C3A772C845DFF439A1A +D71830C2AE0C64EB9EAC541EB80D21A20CB5993FD35AC2E7C5E095DC13B4E8C8 +DD832011A2AD0DFBAB2F6E28A0708F3FF6C6127E54A3344EE3AF951CEEF4C06B +8537347E84CD95CA672EC7373CB228D8224371C69C339E9187D97515A7D92741 +779148DAF7BD3D3F2F5D89CF52C785317A8E5F46123E7D77A2B4C4178C09D132 +DEE2105FFE6B55BA7EF49F62F2A89E84964B2BCBDD8755B3E657B6D21D074460 +7BCA98CA38C00718F2221D2230BEB5F1B6D4555FBF3B1D0F45C48A3F4B159F05 +85E9E2BAEF2B23A4C77B8BB6A22D51AC726B4DD19E3E079F71023EBDC6C82974 +EF51C3E22434F25A4E9F7DEB7DB8EA42C72BF808C6773677C1CB475A1103E5A6 +A0C17D3162D1EAB2412E3B41A0F2883B6A23496DE1FF271B3F33B79435F47622 +9E0E2ACA49384141DA4DF4E5F75B60B83292EBB39EE1A17E625F14394E752041 +FF0F46FF9EA12B6BF8A34A86A5560CAAC6874101E8EC6FA96CD81F3AE9C8F66B +0C36699BDDC63E8D6B795A04F4BFF99517E2BD7E8CB7C7D658BD026515A553C0 +76EC42F6A62EA64220371C1A0EA40DDBEA6590FFC767EFD6E0F2165CEFEAE159 +EAB4F3CC8AC717335240D5124F07D9BE31F11BB310E60177DAD0451A7B2A7099 +1017DEFBEA412A84EDE7952C06D6C463F3D7A86D254160DE67A5CDF62613CB39 +7CF52E2942DD722A5E243AA649B77F859BFFE0820019C1CAEC19A66BDE515A30 +FB4323EED61C8646C58F823C8040D430555E675D2CAD6F04AFB27EADBB293B26 +1B27D1134F923B73C3CA1E7028B71031B9E56DE70521DFAEF4743471C6240043 +658E5F18880833E1D776FC60016565DB86790DEA5701C69613F339CF85F81D92 +DB2C1D3797D9C521E505B8537275CCA539C2B72E7BCB7262E8BFCAE189162672 +E3C0F8EDCAA3578E8E2B798CDDFDA6C9773CFE4FB919FE08AD2947E9D7A44783 +6F810773A659E8BBD0CFB0817862B767232833D61610811DECFDA557E60CFFBD +8DCF4CEA508FDA1A99AB90405FA0C7EAFF3C33C8B687564FE434EBC2FBE2A298 +69FAFB680B2BA09E81F799071BBAB68D0A1D43B61FD42B2F39DD829AEA4A1F1E +25D74C007CA68E74F0421F47F8ED17FA23D11A496F7E44864D44BD8B8E3C7F47 +09EA5BD50ADC04CA13F44C0CEFBC9A56815FE1E7ED2C901A6DD506D5FF083506 +60F3F0C61A1D811320607CAA3D61EABB8307942DCC1534705329B6A9088FAAD7 +2EE7AF80F85B3B879D8947809A2CC73FB1EA19BB410285D4441E6AB8A6F4B0C2 +77E29D12EC0199D0D62401238E39EAA8C3DD7039C59720EB0B90DCF115A5E167 +4E05168352A67B69B12239072BB6F5AD3ECB1287237CA9179FF7EF8EF003FC74 +B7DC4681EE50AACACCD055957CDEF0C8B7A8E09641E6F84779CAC7787D0B90E8 +50474050CA95515E219CD13BAD6F11DD995BB3874DE27C8770ABD35D016F8D37 +8C4A5B923A59F7942BD75F3D831A9CEE6CA13CF0CAB4134B03AF741BD63EB859 +830B500DE92CB04575B81F0189286BE51D060E1D5F15F7616DF91C7F551D1D78 +752D32DF8EA71D7521F9C0E61C1395041834425E9928B0F2C036550F65ACE3AE +EFDEA29962C5AAE41D635F8A781E5026621031C7538BFF99F297C671C041D943 +FACA5E4EFBF3915C2814C452C49CC7577477BFFF7C322A82CE82562B88D013E9 +64BAFDCDD8CBC6BB50F318BDEBF776F4ABE16711C02F8C9419F9B869FFA731D0 +67486944AEC2F3A087F4BE21A90D716CBE3ED1D362B6374C21A27FA3977A5B1F +5776F219A11363463CEDE97A9ECF00A4A246BA5FE649D04A37D8FCF50AC35C4D +BFF140368CEF5D86B2ADE30DDD76B81A0F946BD09ACDDEF5B0F10839EB943226 +6A0E82B65CAE3F4F084035EE3791A29F817146577EBC05BFC6C7011D76C7656B +BA813076CC2C5DB90A0099D1D796BA93C5D29370D494EDC8273F61F89C86DE2F +F824CCAC8ECAECA01EA3ECF54FA58E5B8FD867D30D3DD5FFA8BC354617457B26 +107F9F0AD513975EF7BBAC65C545E033640EED82498C897B54E734C6A6C82C49 +B483CA57E9B9FC5D837FF5BC66BA69AD5AD74A8A90FAC5D0EF0DF3B9E77AA94B +71B70FA7D517968FBC2DD1BA903B0688B31DA472651FF1DD22971FD60560F1B6 +D6B605FE6767B6A8F7F615EF1E7DDFF52039D30A9C2BE86C9D9F8FC34F98DD82 +3ECC12CA4DBC19960D5F0871FB1B4384FB5BC2FA567CE8A0CADB22189E9B9135 +6BE215BAB458DC81D6F469F967CC8299D63FDE438B44833CF1D195A29B28115E +53AE30ED16E9ECC0517DCCA96F8FD1E835FF3C062B8F44C5C51055A78D49ACE7 +EC96330E2F9F895F1C35374E8148D3B3BD4BCDEFE29651002A3B2261DBA460B3 +E77F4FAEAE66DF38FDDB507064732D7104AB35337AF409899DF7FE9DA326F363 +29F77844B5F8498D01DBBF176191B10EBA5580A16CA6DE02B22AF2A316937AEF +6676975117C5EB36EF7B2655BDACC40E16410302A686BB828F52A10D9C044238 +D271CAF52C68E16FB87F1F1E4BD41F4AD20F7D320B0FFD1D6EE9729326D33ECD +B79F6DFBB7B12C97792B0AE0CF24295647BF42AD5FB4641BC15FCEFA20DE0806 +DC617554C5ADDEBD825762A48A6EFA4F853BB903DC8A0EF11DDA4E6543825973 +4A6CFF8DE8352CA098C1D4B93B9E00F1E37A4CAFB9B3DC3920C76A80A124F27D +1F9222F4C3379AFB3A54FC7680A3B848DA9BFA7CF6A3D8C4CAAA91CE3A163256 +433BC31F29C254401364166DB45F22A12688E3D0B1E1D898D1E4780A2B019AB1 +E8AA721571F2EF7CB4C774981661A1095F91B69A723AD4A73A6F308615093283 +F5EA4DF16AAE0558C55A940E0CF129D9505F947A3621362B2763058398BFD936 +9D09A349689A836CEE1AC9F593503D44D80585C0AB2F5ACE79B7E14715311E1A +32F0C09D3B0799F570905F98C3C743B52C6274ECD4EABBD7ADE6B41A4FF6B0F6 +B1C914982F79806AF01B8161213F83783EA39A942758FF303FB4D99128CD6B44 +EFB1F10748F9D25AB065996FE0389CD57FBBCEFC4C47A864DCAE46F20B50ECA3 +184D5A0FADC348924F010A01A7A4A58AF3B02E5C00C2A4FCCC29386254DEC91B +4ACB1F9F2A5C4220454715885B10574C818F14F78E288289E2A905A4C38B1B31 +9A98FE90E8FF5D875C181A62E8DF61B341BC3F9EDEAC5A37568390CE67AC7A61 +DA174B944A3EB4CFD7583AEE63B62802A72F99539EB5346A499A796811CDE007 +F683328F4373C4EF3E803F235435D79153C80D5DC6C9826383A06563D8A49768 +D64CB2FE699912518B305A638CAF73A9DBE80EF002AC22199E14C30BC308C836 +5C513BFD57C8C9E678B7171B945C5AED484D22695BE9EF9832F855DEEED72B87 +271DB00629B68C0C9E3D18495F240D50976CAEF7CF70588965753FC8778DFB99 +5372B4DAF74949C9DAFCBEAB21A33921C34B92D5248783CC35F04D8FC26E9BAD +3AAF7A334527155BAA0E5F9313F6022539A17C9BD9CCF04F2377D1317F6280DB +6321EB063861D31893F9CF447D9863E691ED945840A9C428FE240E38FF7CE928 +A178D8FFDCA86B7617AC6EBE313E857ABF1968A0E46CA59ABBCF9415D2271E67 +EC1E0A72FFA85D46666BE6CD13B7ADE6D3A16F141B99F61B9E1661682AE7C336 +06131936E3C553A39E7DA2BBEFA2CDF3D01006FAB1B484E5E5C094A3396407CE + +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMR9 +%!PS-AdobeFont-1.0: CMR9 003.002 +%%Title: CMR9 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMR9. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMR9 known{/CMR9 findfont dup/UniqueID known{dup +/UniqueID get 5000792 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMR9 def +/FontBBox {-39 -250 1036 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMR9.) readonly def +/FullName (CMR9) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 11 /ff put +dup 12 /fi put +dup 13 /fl put +dup 33 /exclam put +dup 39 /quoteright put +dup 40 /parenleft put +dup 41 /parenright put +dup 44 /comma put +dup 45 /hyphen put +dup 46 /period put +dup 47 /slash put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 53 /five put +dup 54 /six put +dup 55 /seven put +dup 56 /eight put +dup 57 /nine put +dup 59 /semicolon put +dup 61 /equal put +dup 63 /question put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 75 /K put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 81 /Q put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 86 /V put +dup 87 /W put +dup 88 /X put +dup 89 /Y put +dup 96 /quoteleft put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +dup 124 /emdash put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794D2DB9AF72336CC4AD340 +15A449513D5F74BFB9A68ABC471020464E3E6E33008238B123DEDE18557D712E +ED5223722892A4DAC477120B8C9F3FE3FD334EACD3E8AABDC3C967C61FF003B4 +B10C56D6A490CE9594D57A2D431B9E5E10FE3D8832E227A7087611431ABCD029 +85F4865E17E17F8CFBD2CADC97E0A8820E3ACEC873F31464466A9545E967E53C +DBDDB8478E69063FBB891566BAF88B7660A4405B16834761F041CCF7650AF955 +F9E853AA9F5F4382E1FE7D0C5BB4023818A2383F91249D48CE021250EC9EEB1D +2835E18FB73026250B32A8849067D5E2258797C917F998F2D4121D96560C5FB5 +B5D3471216639A8671B6DFAC5E3554EC36D9A72518525A795590C74DD70DA3A7 +78BFC43E51D6F2BA52F17D4DD00D389D3983EC54912AFF73684A8A7E345537B7 +E62361C04A47859DA084BC72EA53512DC54132EB2EE671793603015652EAFDE3 +41C4B6B679BD60AEC5153EA0D2200CB1D097DAD770F5F31E6FC475A225995277 +B867B731D5401E2D02B85BA85158C80FF7E2BBCC42B98AC867E67D25DB656072 +55A0D32AB7AA483A5A9686CEA4E2B3031D90D84DB3E2DEE7706C91BA81CB8DAA +700E5F61E07D6998C9552C81B66FD10A10033D49EF3BCB0FF22ED0A3737523C9 +8F851C61C4BF8A213BF6EC70C956AE48B5BD276CC0437C72BF6515B10739919A +F00F6ADD2798CB211668842349171A5AEB0664D2C44397E55A4A9EBDF54A3EF4 +FBBCDAD9DAEF4B0CAEF7112FA828F2F8D9F633D37E5516AB5ECEA87342EF8DC4 +3A50548490F5BC9A8A1F98AC7AEAD9D913BFA10CA86D73AEB5BACC1FEEFDCC15 +B3655522CCA2C772E902FAB2A6FC153597D52763EB44AB7489FF061F7F58E8F2 +AEAAF4D17F36CBFC00D3C653F335D14240C87DB4339DA9D30A5BD1F502BC9013 +461B9DB2FBEEC01BB18990439A0E9CA6576BC9CF6B1A3DB9386C4A5D4AA6A5DC +CFA45FB75F22E10ECB72565DB441A194902C91427B4F676E531C661F7A2C3C85 +CD534D1C89B6779B2EDC8E44667B992C20C70B663BFBF680A6CF4383EB7CA26C +4D1F06B5EF4025BBE65795F1EDB5CCB97050872D6C07BC2974F905ACDB7A765F +291365D6C8152153E7F017A25FB4476C60FD9EAF9A121633DBEAC32F62850223 +D6418566AB350F90F4B35F19598478F76B63E347D4C61E203D4DB8ECB9889181 +C387F4B663A502C638761D2782BB96EAC81A0108D7BD6938F67FEBB69218D115 +D8E89CFABCE15C6ACC7FEB983332A51A6A73CF4E341574F366713D7FB29956D9 +9BF238A87483D37E526A2EA2F101EDD34E34CB92730DCA7235AA0027189BE405 +2DAB4AA021A30C28B26C50808E1E965C02F6212EC7C72F5683339425A7739380 +A422E6191ED8453AF0CAAA424AE44DFA7CC5C2F6EAA8D73A5101D8E9517DBCFB +2858D0E8ECB7DC430EF23A9E4428CB7DED8D035D6050251AC101A2D0E884721E +2F21E573F948048BB8FF888911C508CC198BD750083B339500C426AFCD5634A6 +AAAC1C7E91249667B231BBFC64B4317192FE07FE9DA0DDB5E517D097AAE46577 +9555F29D45C67CDE9812CAD03F220B20519F2FF32DCA56A554D4296FE2D1F3FB +B209B5270E0E695EA5A0EF1144957CE045881AEB8D05D72CE57F4D34617AED67 +0D3AF0472CD8D60933651626550366E300E72A9C89ACD475C2E2ED9BD44B472D +9DAFE943F8E02A6DC38E447EED964624C37C3130E48211CA279BB6A0BD59466B +42F3D89B5746F29E084E22CF58395AF0F29E55113F3A3F2F52CB3A6DF3D026D0 +C81754B8E2E4A15F6943BE9D0087D5166060734FD07C4C57D7C7D90E8C9C1F35 +623CEEE3ABAE75E1A18A1E3B50B7266BD2D8E812CFEB4A46B856885B185640D6 +B9C22179551002B94282F57FB433B7FF157D2F0D240836B72AF4A331668AE5D4 +E6B85415F4E8B9D2F9AF90FAFAA0A3866DF417CA5A31348CF9B41B8F5F4D2F97 +CCF7ADE851B5E2E2F6E319AAF5792EBB9DA2C6AA8B73D889F3CDAA42932CDA7D +07A7E59183CD89520DDFC36E5D513BFD8AD0886046585F29B4D7F42CC0C27AA7 +53915AB1167D292FE91957E94A57FEE2D49C20C9070ECD736BDEE0F046E60350 +EA539DC298156A4E0D019E7D481FDDA6861E20678516AB80ABEC1F09B126BCB9 +52E8272A06BB6DD87ACFC423B4A4FC9A3DC8DCAEBB807C5F748F1FF8B17B8B88 +F426206BF1B7B7D239D26BC3CF0776C467A98CFBBCA5FB6145D5900137ED19DC +D002F10704AA680EC753C22E29AAB15712EF22AF73D80820A1EEE953463D4EA3 +81FAF99518D4FD0F862A324FC44C4B9542A92C5B60CC983CC8F647CE5BDB4D6D +B92B380E0E5F7208A9CD91FA9A469548162C761C1BA05AC9D60B766764D821B6 +B4E17F56CE455F06EA1EE2D38FE47581746C4C5FBA63AEE2B58E877D1A8FA83A +31C972D53B64E92EEEA147426A92CFBF76FC614119C6E9C6476FD6A069C803BF +E949FBE50B5AB1F1463F9747E8D353F7BBD991C4F90F920BC9407D8E24720293 +846D052214E60390C3CB926D38C83AF697425D80C2B4FC4706615B905516B733 +46ACA325CEA68FB21B2D17CF0B68BA4DF249368625CF83441EDBF2B86C957C1E +44CD722BD2537CE84FBA07EC7AE15C840041B9F7F3040072E6084CD55B301C08 +A64A53BD4D3DC30DCAC6C152F316ABC59B8EE978793EBD568849DCC2A75A495A +BC83470D503F8E389F54B4A4A31624E83C601B43AC1E52CB811FAA7CA6B644A5 +1AE0BFD4FC774C9C9DFC2769ABFA9C83F900BE2DD4010416053A1D4874E6ECF4 +D86E44B4CAB15D53E5630C144B0C15B58DAAD785BA298B1893D1B09BA5D40344 +6678FD2D17FF6674433C976D6DAC659175CED26139967C9B2B9CFFD78FC2570A +E5142141C2888DBF2DC8503F9137CE7CB21A1EBC2D65BF33FCEFBC85C9CB736E +24E8595CE934AB032CC70BD6A3B0F3BDBFBBE185512FDB7BE3D4A6620478453E +75D044BF770B44C9741E31985E6DAF5A318D7BED12B02A4BCFE60D25EF12843D +EFC9BAE2A3F2EFAD66D7858E83EB46BB09D2FF8AE9C43844A7001C86ED97AF51 +C511E3A89A1BE349FF5215D1A57843EF51456B9838133846F19BE79AAA5C1AB0 +5F400E5E8E7B0BF96EFCA3B8F0894BE589F2C9FB6C97BD16D38F0A237CD4F034 +099C41F85C7E2C7BEC8E02C4F327306A53B4B48B26A8926670CEEF96F6DF2281 +7C2DAD99EF8B81BBB777227C2475AE7400DC393D9C0445E925DB1E955950F7AE +53E9AC4306794239346A419F7B5DF4168382EF5956B81F83BD4BB7635B3BCC84 +7D84D05AEDC02D14675D777CD19B08124001A4F4EA96990D96000C082A12F00F +7FEF793A7FA69D56D3A38D012168C5458B667190AFE80E02C816CAFF0A71953C +D80B085CD286027E2FDBB05452AA762FD7C813B2E19A79C74190E04E746C4933 +CE1E300CAF5DD53B08110509BDA404EF07FA1BC5224BF1205DE8E0C3276A13DD +866675103B960C5F36644F96B4FAC16F5D6E91F74629B318FCCC8E8CB13EB76B +B0B7B90718D913A52A04732EA3667674994A325A7973C601A7DDD50F658E0826 +ACB8E53D4914B0274AED98D7BC3B2B7F9D48A7ECC2F8ABEE05CF2C4F2B90360B +B7DF779EAF3E103D1D83EDBE32DDA873768D8C37DC10A5354A94B4153049AD64 +FF3E0BB51AB91D7C0B4134D8731CD0270DAAF19BED9EAD800A14B65B68EEE89B +40DD624111670DDC7C030DEFE0D1B96420E249332445C155BA96231C88E70643 +D526BDF3CA1E05FEE72CE2B881CFC01ED780C10E89F0828AD55FE29043BC56E8 +2750A6DD15AADD54492F6092618F4CC6A31766B17FC60766D18C307EFC9BB787 +39047DAD6B38419EFBA46B4E2C932F97451FE78AD75FA90DE409FC6DD46585D2 +1941F5ED47A8FBAEF5A917A240959E8D9F9917DEA3247D9CAE6BF7A88DB4C4A4 +F9F5A6DCE542420A032FF3392FE0F3357B51F884D6181583A554F75B1DF192E9 +253CC828FF06B0D992D5316435980B044BB191508C7C45CD90F797F88856424B +14A5707459C50EDCF3E3D8D1667AAA83015405354CE744C66D9A5728F29E0085 +6DBF740717FA0799E3BCC4ED7841588B496A5E549B953A7FD288B4A045DB611E +E3B2F35963FF18ACCB1C968BEEA2CBF52B3999AAF89A05320BB2E97F52CFE06B +9F10E3A79865A3059A957F97972D80ADF678A36E2B586C101FC6AFA4D137C13E +EE7102C9B8EF78CB057F8B7476F146E8FF5C897FD5503DD198128CFF7B5FB339 +FAD0AF0EA967F77B07B367A4AC9F668F8BED99B98E87FAC750EE045602D76C3F +289FC9D97694C96AAC0AD1BD3FA94DF2CBCEA24B40F47B9B59E54EECEE7AC4C3 +A3F5D19160E4C1EA830D57FBE10D8D46AC5CA0260F22FAA45236F0F542BEA9C5 +5A88F878F68B36114E0573900C65E305462B22A3429A17C7A567694414DDDA46 +5F30542B8FD4F00F6C295B2E8D3A986B953D96822DB2ECD48E8BB1763434E652 +152EF3717F5E7FA10FF0B01D9F64E22C5DBD7254629658887BACEC0ABDE972EE +67299FB84A05B3EFE22B6976DB4CCA384232DDAE38C31623A4E39EA2E82C1EA3 +BBB68F1A7DBF405DEC37CB7203A895C36A44BD2D63F45B3888AF91D37B510A59 +3C921BB44DA620892AD87B665F69F6FA510B071ECC403CB2BE2F54B3969C9E88 +713244BC97C1466DA8216DA7600C221E7E7EF5C789D2E12B36422023A03E11BF +2790FD6062FE6BF62F5010A92F0A104B76E255A0975E04F6F20F760881BDA7F5 +D834D1D328B6EC19AA7D5E5678A84C74C82553DBE8BB5765E84F5A8789032143 +6020940B4B8D45FC3433D356E28C25F42D0C19F911213D85951B2B00D01B77BB +A4C72E964F9D95422BEDE582A05CD52E03D28A996E6CC8FCD910CBAB728073F9 +F9FAEED5470FFA55930447C5BA816F826F983D53EC9941EC8364B3060FD74C95 +26D4F5CA753B574FD2FA4D1D333785241D8741B79E628BC852FDC35478C5ED9A +C1BE88C5EE7302816E65C12B58EA16FEDD4672EB3E24B6EDAD5DCE263BA8A970 +350B651E5A9F3C281D85BC3F44EADD0D93402E36489BA5185E7D388974B0B700 +70575188BB610CCA20F081E2CBDA13DCC6F72567962ADB342E02C1E763B673C5 +F7384E24C6E1730A3A790D690A2103AEF88E0C1D4480DC9B25E5C8C9E1919C95 +F83320179B4C7C4A26D559BFB24D7D596FB73758C9990C451E77FCDDD17763B8 +9C30A9534E3CB6680D3D419D4B70B0B0A0D160FCCDE169714E373F65B7144CC2 +DB9A44E041211E1517D3148E65A2486CBE5E74E625261CCF65392FB4F3091473 +F9E8DF327D59A58558E5C9F7190DB577D5DC658F5E36258291C708B3D224653D +064BB6079F91293FC733710893AD1C96169B30CBFE4E9D52E7EFAE4AFEE68FEF +1AFD5E7E9DFCE8DE332B0FDC0514F9B3090AC85BBFB527FD8034DD33E9576325 +A8769AE09AF1BA792447DDD932B98FC9486B39E0B04DDB3EFB7A30DA0940B33E +E27490E0E841E87B1C90E5248A91742ABEDC10F43A8AF0F9C5B4A4930B1AADAF +01874B9AC3B8D0DBECCDA6CD7E96471FAA15CB7F8A599C5746327CE392224C3C +40BD60AF97BCA6FF6FCAB2FEA114D7300B89E91C3BC92D5B3E2C83BB37992D8C +72F661EFD0AA034C738C019DFB79BF40651A1A34BC1EB9F5AAF58F8B3DA32645 +24AFF8636486F08BC21533B5FF7391B0679A78DFDCB03DAF6BB7475A1D51DAC1 +EE4BE9B986655D1FDB6936445EF99B58B303FE79F11275EEA96A9F6808EA8775 +D873D1052FAC93769789C700F20EB2ED6D15676F6E563A769CA9298E463FC311 +83281483B1C953370D196727A6A0E66D32D9480AB1B6DCA77868C1A2D5DB6483 +5F31EB6B18EEFEF1CDC31533E69B0AFC6B30FC9912DC89BAAEEADC30BE14F448 +1A6B70D36A5D9B01799BEEA686066114910842D022EB464A9A1E8F0A5628BA69 +AA9A1925CCADD44703BC67A89F3B48E4680726DC4360274185CF3C8AB747A8FC +4B928AD62B092EFE48B01E33ED756DB696171FDB775396BBA138E056F71EDAE3 +7A1E4CC272B8418114B0E81DE0BC43DB3C133167344488820A92DF10FFA26FB9 +65FCA2C87D302E956DE6B4FE145145440C83DB43A68F8B29A592B127BDF49063 +B7F11E155CD4CAE305525BEA56B7C412A6260426407BD892A3F2B444AC3421E6 +FB6E6425EB5C3053C5644666B80405530FA0012B54557327C98E0F4F064099A6 +4ACAAFC1870359C1B6FBE7606BB8A26026AE20C212210449905E628AF1B20490 +8CE908B7EF3E3DB551C85AEB0F7FEB6A8D215B97998E5DD9C7CCFB2A9402B8B6 +1770D4023777D4B45A73F471355353412C51D4CE71FAD1E0AFBD87B5F86307F3 +10D0B94F1194EFFB64AD5DA54A4200490F609CA8B912E149F8217ABB1E9EBB3B +C4470E7365CF5E1E761AA1945044B225BD53D142F6588C50E0644740F7DD55E4 +8F73201E5354A8BC78339211AFC4935F44701FBA043AAC4BA4698E9D7700029A +C79F992F62627C91EB855F64C4B251718FDA71EDAF082A0C7B00550949D617A0 +7071FB14F05620CCF2180941341D8E60FC88823438FD728A4042AFA8B853107F +852F631518B61B234565291B5D5B89DA818DEE3AE3B68A2869DFA63255CC882C +3B16BBA08FCE3632E57FF7A07F857A1F0FDCADAB39D77960BD827CCC8661A997 +648BF5BEBC0FD2286C2A112A8DEB9CCB6330A049170D5D68EEEEA011D3EF3EBD +855236B9380087CBBB6BE24191F728B7EAC5B50F7A547AA0989B7C7D3437DBCE +1669341264E290646F2C8C5A3ACAAC7CB63DC692FAAE13E9B40E8BD39FE16A0C +1660CE66872D061056C04DDDC265C024BEF8B7E3C3AEE76FE5C9702002C28BE0 +B180295EE00E567FA2E5CD1638226D24A7C732E1BD8103B476EF5702768689C7 +D4FCD47F2AB94A2B1FBAE6ABF87B09E7713C773FB65CA83F7318035B332B9F99 +24A2C8897527021321D003AAD7C273E4BFA2710B9BB26C2CFD3D9A5D7ED1096C +552D50028AE2476FCD6D12A5D0A897521313ED1A3A8456A70C16EAA50A3E6733 +6DC89FEC56AB54A579EF264377A103939D5EE00A90B4F2206D0023AF9491FBE0 +800C6540FC945199E20E945F46CEEA2E885F6800B9DF042BCEF4291A4B1A62C8 +6A7ACFF872B25FA3AE69E0093F3D0FF13A3313430C06F1AF94D500431566F659 +E8C859A5F80F5BD2E85C8E32603D3745628E8FE6FBC50FA68F9C3811A2BEFEA4 +5852CAE2AE5AAD3230ED050593BAD0A9581EB7B327C6916B8FC348F4C23E6FA2 +00FA28AAACCB3091C1D83F7BB88672A53A2EA3B8C7C24374E400C57F0F01019F +E52D5C47F389D4C9AF126F4080F9AB8D1C8F470932BBECCEC72A9796F6E965A4 +82057DDB43D68298A00880D4C2E2496F26F015FD83C5549215753459310339B7 +6B2961EEEE74DA31FEC8E2BDDA42D4080A32372AC372524BDDA580EF6634ACE3 +128C69D04D890DCA337212B109585C665AA83EFE47D5BABC2627A86EAD11BF7D +744176652C7F9497785A7A06A994ED8414BBE8B26E74D48CB83FA24AAFBDD507 +84A90195EA3D77BCE8C2BEDDD1DC52E8164DF15D65B916EBDF3A8A76849653DF +AE3CAF9561AF3B705F75B9E5DFD6758DB65A2FD54683759912E0D0035CFBCD86 +5D22CE175F9E50FA2301ADBCFAAB2B89B8917307766C4D228198F718DBA1B2E4 +BBB59748043483206B2C87D3A6A95880E47C868308F390EBB8A2F7925D14E782 +6F40A532E02978A494F370A732947755C8CC6FDD9F7092778849B9887820EF5F +67871FAD992447F76CF16F85D0A04140B7A29CE125D733D197D58FD4186D335B +DBD88456EC1A698AFBEE2418D715F0A4CFADC0E9D88F83AF8B6CA0AF8A510C59 +E63798EB43CAD793E287BF3CAD7E8CAE1E9BB5F52171A78D4463B995CF637964 +5825941C8B7E1B1408619FCA686B5792D720974ED9249ECE9FE8FCC567D66582 +903C00361D3E72B158C3AD92707D0FA8D6ACE4E66AFD3916267CE37DAD4D1373 +D818CE3F6952EAB0E1C9F7328D9A2C4EC787117853336A14E258D14211E2100A +636C28C34EF07F0E59BABCD25E48D57FC896D57DFFCF445C5F8015B05CBC1E06 +3BBCEB0ED5F63317937B6E3D5ED2A177CAAC366A85E33B1D60649626A1EAC051 +CAF959945AC0B31D21C930C20A2C4EB6B7D7B2A078E2140075279B962D6D0A0E +E253AC638B9D0E758FCD57D9685EE33312C1A0A5CF1762F57C0C7236EF014B54 +7DB1B8C3CE37A262AD69A31F5A1E4C2BCF7C4310523B30CCA645B8DA15419438 +C2D541657DC32658E7F14C18F6048F3DFBBE365542B2411B2B72CF35172C6264 +534AC64D3DEB13D303AF97D51A071EC797D611DC571CD4A5E4B308CFF0F78CF2 +8A475ED04DCCE94CB6A54B5D27A8719A0B094E42D3B5FA1D967E96405E690437 +6F9F1F155B7FA0873D8AF3D270825B0EF286176436B0B820176667500E587821 +56ED77373459669911695E73E63BF4D510C4E7701979B23EF39FD99184A9408D +68E3D41F7F57F05CEF384408644F205FF751E5D6FBE61E3F311D919EECDB4F31 +F756461AD5DA5910521533282982BFCF345E03E778E246B3B724F052F2CA575F +D9D3E3D30AC17A26B475E05C704BD74D1D01F18E577035FF3493BD361587071A +62AE7E7856AB6CE1CD62027F264003D6D0D8CF0A0E9A67B967631C38774FB945 +4F35D4CE5740A20005104FBD57BC27C9B28224B9F789380FF871E93EE227D21B +DCCED5A4D2401A80CE2039C330B944E16C267512E5FC8BF69E20EAC84CF9F3EB +D2A418A308FB565EB37574A94AA0157967D94B4FE179C3E93DD73B6963AB8C83 +75E2F6F888A597A15E15532D8937C7984B649081CF715E63468CBDB9952CCD0A +CEEA511B20D45B45113A2E5082DF602CB867B7C7E9DB51A552E0F9CE684A2652 +C19C8D31C9300F072F8D71719570AFBA639D1147E1A3B46543835C4DCBDF7DDA +FA75120048E1367FA203AA6E4831D3A3DC42C9107CA031420E8DF65638A7D125 +34AA2B79D24A7E25421A64637FCCC45EFF6D04D76978B921AAF1655BBE955588 +9640D412B13C7EB74C45961043BD8C7908E99EE8F3037AD9069C323AD2E125A0 +C17B009F8F8DB00AC086FE44E509A5DC24D41FDD14A825A1F4ECF45A6CEC4624 +68AD8967FFD38FC8A07B02F98A4DFC922DB32E7198E73357DD97C145DCE68EC9 +9F57AD5A160126361C13C06F62B14633CC36D69F10C4B2044F899A2BED950A3A +5BEB5E7E07F01202FCB8C40051AC9164AC8D954DEAA0442B8BE35BBC5C643E53 +E9B1AF632927D846EDE3A9BF589E24299F2301B6CE330ADFA834DE6C2AD36777 +339DC7C736FFABE2F5FF571BBD073076A6CF4D381DA932CBD3B1529F2BA54DE7 +5318035ED2A2B09FD39AAEF2D7B20C8D384D01E56DC80159C4BE7DA471A403B0 +42E5248E72FABDF76070C5CD62D4B1FF8BCE405D59DCB1FFBD0AD41ADC94580B +A90462277B0301738DFF45F036DC9F77752A8927CDB49129507B72F9A0D00463 +1192A0049DFD674C2F061C6A4784D911FBD832005A82335648F6C91723788C3E +0C322EFE02904D82B43C8C46CF4CFEC637F4C37E87EDDF17841268988151A630 +A914A4FCF918B0D589B3F75137A34062145027DB020897E28D2FA5B948AD22F7 +58F1159EA22572E7FF0CF648981BB0F88D34689739E8B6F1A3C9DA8C4C2BB126 +16D47962B8E11C2723B9E38AA1A50D1D6D582C7A94DFE4E6AC501CFB942952C5 +F2D2A7573C801E2D7291DDCA1442DF3AC58F66632695B5C8D55531EE1919B016 +7E8FC73068422A68FB75C4ACD70BB2C1CA74B90B7D317932882AE82292FA3D13 +C1A2F418EF47ACD12550E39E435E3795C7FA7DA34920FDB29E73D10DA44A7CD2 +DA1A584529DB4BD7D1EEB8100D89C6572096263B3CA1714E766617162BC80F73 +6AD316123626A4A71A91B1655E53AB42EBE44E0E3B0BCE82E88055AA369CFEBD +34B6934E988A2EB41DB5D64C69F0AC2375F42536B540B88E551DC4A3348F9E29 +73D3AB9DD006BC0ACBF3400DB12EF6F04FCBF9E5E6A3CE6F947299953B8BB51E +36BD9CA66743BF03069A03EE43E4C93F79EE76B68F6328A6F2B316FB29634CAD +38F0B9C8B1F4A73AB259EEE0DFB88088BC958D3986BF189636A149E5982DDBC4 +2030BCF24415368AD3B90413CBB3CD307D4A5F24E61DD2C25E40726C736602AF +9D374A8DD159E7DA62264EF8FC01A1575337185C57AD8385A94A66466F6CD071 +7210190DFBAF701EB977A746E220B0AE0C48C77D665363FA8156E2F3298B3006 +3C8F2E8A74B365795F72741BEF1C215BB3F41BDACF4B2D094D0B4149A5E09E72 +04ECCFD4FD2A2EE813B63DA42D9B952E5B496442714EF0EE4F9F1687F434B00E +267CFF0651F978A098A3B251194F5651AEC589B7FA3A939A0EC79722683BB28E +20AE7ECB82DE00088F893875207E935CF4233C26B6B0AA3CE75C62F0629A2930 +ADDD62094F9179A64528ECD6892BFD2B0D73AF178529675BA045A8D89AC58BDA +F657E52E14FA08397ACDAAAE8D21A2923BE8435D26789DB9E0C386293108AE35 +794B7EEC017AC15ACE8DDBC115620F3E3C4F8A6AE71021241BA8098C99C47966 +FD5976C58562D08E81180B1107340038AE071F4FCF20A955B1DC7746BA6E12F4 +EEB596F401495CE1A7E44591E081ADFB75569F5E80E03809D0363830510D33E2 +757948A533569D8E26999D370740A748F4FC18BCBA068222811FF163FA9C0442 +CAD33203255F1597F7741FDD778D5D1C8A9C153878D5671850AF448F5E63BABC +65EEF81A2E93B1A35F160808F7ACF3F6E6CE90013EF086D26FAE63C667F1C19F +2ED79E9C6D1093F98289269F3C51DE78D1370DE3C5F973460615F341C27544E2 +32FAC652EF784EEC32464FA4F74292CD4D2D28F853D4E7ADE69EF890752695AE +CBD6C8D745487DC6976A14A952D82019F860CF2AFFD4CEA9ABF26C9674112AC6 +FB073B3079F759634342C127853C0E3E81DDD0956A212BD02EF665FB7DB96C8E +676D75A1256862C47DED4993E3A1141C56D1B9D3C89F047EA0E7BB7E1ED29E12 +3654A1B3AA65FAD7969FA70D6EED7A10C7421D6052980740ED1C36E9F199A6C3 +6DEF05E2305FA52FDFE3BC00AA2D6D78472310A2977F947621182486AFA66185 +01C3ABB8E2B49B9AFD83D39661EBE3843E429975B0542C5972A9F7647A870284 +1AFC43251B67C13175E295EB7BC8F4686D9811D89652FACD233AC90FC33390FF +B09FCC13468683EFD9B2E50BC875E5665D4F88EDCD6AB177A04AC21A4CC0BADB +CDED4B75125913DC0561D305B0F5B5DE7DF30557768F365E71F000524A20121C +5446890A3A586EBCB1460A8A2C42C5DE57678638120767E1E3E4D4AD6331FFA4 +BDB9ADE62B9CB732259FDB1B4EABB31336DB81DB6CEAFFBF5EA464C9E3D1AE8E +F18622E52234F1B639FF005A911941987F1049497BA4A43919F9FB0D6E367E1F +7A05FD68EDEE7F507D020EB1204890CAD2620FA15B1A413BCA574B0E643A0564 +3E8A2FB919768DEAEAECBF5B4C66358B12C3D604F3D950304B5B4393240ABF41 +16E296D6D31DCC8C6DDBA47BEE225E5A5B017050BE6DE7EFEE5755DEA5C4ADD3 +719350A2715B28CDE94DA52D58E09556ED5AA6F25A4FB9D59B783167B046464D +0F7536BF50B2646F55FF45D8A7372157D7E67318E71A713B26B995493CEB1B2F +2368B796A0EFD033CDCDF7708FF9118E4076967D9BCB7512079162365078C7DF +762C8FD66F58578D5488CBDE77D23B36F1D19CD6C6962EF49F1B5D86E7231A37 +481332413CEB73BC08C76B6C5184922F581C129EEC70E89A7B240328545BD9E2 +B8E6DC18CF332CB0F9F03670A7F0B5CA0E2987EA33BA63167695C3712441E10C +93CE0C6243FCE13402CAC4BCD683027DA17A2C7E478DB36459A8000412832B87 +9446B72CA56CA42AA5CD0DA39888122A244A44A80EEC20448DD1F1E28655C6A8 +106ECF5B79BA40B8F59BA78CBE5B4EC54E88680127F3BE462CE0FD1EDE53A79E +A6C4A94926DA195ABB311B085E210790FB64108675DACB73CC581F8886C6E8D3 +0F10429B0A8E217CC6DC8B5AC0DF4B93EFE88EDACD27B06236106A8103D759D2 +13C0295288CB71D7FDC3DF0BB36D72618D68364764543B074D5CBBD21685F263 +B2E24E7AA4C5F88400DFE963E800DE38094EF07F4920F5577A205860814AC32F +028980AA50C142D1C7684C9B612C4E2F795BF23DA6258B6CFB57FC0114165A01 +154678F65A3693AD0D1F47143DA383B67E7DAFFBB56F107A21398827E4743FC5 +26DFEC46C7554777F6C2A09F57CE3D816CE6B29E56C421B77D8D1E27A7023315 +82A8DA072C3CD14593A260B9A1DB46B32ABA37096EA207EF7BD4586C793B4E79 +ECA64A1910237B1DE8CCB35BEE7CF4D90429933F9AEDD6975705E0B6E7076B5C +68DDFB3DCAF5D1D5D03A357E634529669318DD9C6246D25AF11B3C9BE89F51BA +98A554682B3D14EA132BACB567EA7014998398FEB89FDFB15C0F3F9354BE18AF +E8C724524107F9A2A50F68F9CA089D92A583ABCB2C6145CB69492BE91D3E606E +4A6B95DEAE46C78ED5002872F45E47502F6C5BCBFA9793BC983469B7A269F976 +E57866B1F040B428497427D9102EB029DB3CBBEF9666CD4EA4B90E4308F5C0BC +8CD70779EE732E658E1CDF15F93D23000A8B5931B3A374A4446D7355A09F0705 +3B304576E513E9798BC26169E47849BAADF5F29D659AD46767E2F9CBBF7CBBE4 +7466B8268B3C79695F5B1DA26BAC05AEBE42ECE4448248B3C587DA07A7666977 +449DA221BE24C1FC96B9DFD899B407231485FAAE2CBFC4386D430A5F51C2ABA0 +4D72065E2968A391A93082C16A9284F2D46C2914FB4062796AFBDB1AA37CCA25 +AFDB4634F657B05585D27F26BD0C1E15D28CD2CBB3E50D170A32426AF5081458 +5BB9849DF9DE5A97B9FAEA704FB86F94FA65583379AA95BC9CD480BA8B231559 +DBD1FB713E850B48A46F3FE9438B776665C92EA6F8829C6682312EAF98F54129 +500974CCC88A669AE28B4B151E4BDD88981EA69F62045AA359F37F3C30197F50 +EEA5C9166F0145C7A20F2751558311A533179C319B77E01BE805304D55262718 +D0B02F8270B1827AB31A31F956E14EB1DBD1274C96BF0ABE832105C345C60B70 +148474D02C650DF8E5365B9696BBCCC51D91550FDF48622B7CAE247D03050E29 +CBBE3F0E5464C066CC52C14C8C7AFD45C0E71B9DD48526304687487E42F381AD +4DF6DA9F9E0C0C52A3941E32431D19C15F06077978C0D106D8E740E16FE97FAD +A21F33D75151DA69136F54C0DDFE0BDB5A8A73C4EC216A4DF973CEF7DBF6F2F4 +C33DE0DF6B2794204FB0AFC4C0093CDC803BF0CF63095D5433BB06F9A2E0E70B +5F07CA323FB85C7D7241546C0ACDB08863F7E5B4A18195C2FD530C557A228386 +EE17FB880110022CBC6F29A46C554E9580E9823D5FE9DE56038B20C30F07D9A0 +2E5FE7819AEEAD56B533F1C8A42993CF8F47211D83BD2FB3DDD80C7BAF2CE90A +D1D60C739190E851D6F1C4FACAD0AAA648EF6A9E62871C6A26FB18FA9FAA8662 +742347E800BEB927A2B37CA7D9BA3B8EBE446AA12EB5D1E63FDFDC427B660E4E +3686C40CDCC67FDA475E1387315DCF4B6C30A73D1A984F0137DC84B0B517A0F1 +7A1A514DBDD5DC14428D77A09CE815E7D00E0430248718DE73A87494238EE897 +9AB2090094C298D9057392D917F151EE5865E890114D14A76735A9F87A4807C7 +10A5FE49F54B8694947D0272352A273FED6BDC7920CD37C4764FF17197AF921D +FF1495830C7AF3CD27F0FC26858BA2D78556D8434B0AE4799830A98D5F395ABF +21E88B041876553F04AB5E6CE220696BFD075265911026B195849C121DDA4F05 +450F7E244AF77F0459753BE61D229A0157EB92BFA16080AF62BC38B58F2CD61E +CD3111CCDD4AEB64F32DD7C8F5F8E5F7ED4A792147F68989B26D5DB6DDA375E1 +8505E0DAD440246AB8C04EB1315F77F7B0921914FFC2F33202A96CEA7A903445 +B383423F6CC85BDE2C3B4C4DB1FEF6C1D20C28633384310D8846F5058B45C3FD +A8377B461030BF959BB4A7D3832E74329F87B2E311CE9F107F61DE38613D7675 +432096085FFA6168B74E2261A1B0C94C49C4CF36C39D97AF4059A720BD1A5047 +B5E731734DC2BC812500804CBD7A410543CF58BDC34C9D30550609773EE0125A +A84AA3F8CA75A9858B30DD4F6B023AD023BCBD699215789948DE8B861D9A6A21 +854AB7AE6B1176A61252BE548C3ADA089E228A4F1EE240BF9410802A8AA21B73 +36529F84FA1DF1DEBBDA375D6D5307B694006C84154E822F89271B163A190217 +73CD07ADDD4317892433C70179055585198D78ADE49A8ACA8D973C0CBEDD2717 +47639EF4EC240A39914283F51302CFE83829E13DA229F24B2CCC9D4C2FF92D4D +241FE21DCFEB6A56D3464425758DD9F45E6C16B07151AF42246FC72447F389CE +D60B44BD9D50ED42483DA33A245E25DA5E3450E8EB4824B148C1B3E3174A34D8 +E2341137095F2D8C0D199485E7F182DE3E4310B29A262C084BDF94BBF278000D +2A7392F34AC33B60B2902BAD7D533FF7CFA6B78DE48665D2A7B6E495C1491B44 +CF1614A4F876F8B89D3E069D7EE33CF3411142567E81A69DDD1197E0DC521013 +4B4FCC896DD9D84613CB6B1F59B369E634AA311D2B9D25C139F265442C2D6F1B +58BF9987EA3BFCC3B342ECCA3474999ABD581FE83119B40D4089828F94F9B0B2 +456952459F78AA4317E721CA77F064E119409DB1B0730BCBCB20E29070F989CC +B7BA009E19D64B093D670CE7A1CD1DFC2C8D5E6978B22A4D28C91B4804B4CAAF +655D80E3004B7A8554EF7C21A3D3E30CD883A30ADD3F487C22832EDA94953421 +54DDFF742DE42C61E5667EC1894954AF780BC02427D45BA584C67E708E60FBD8 +99B9088C59BF47B02EBC2035910111AFBAFE8AD9BB2208E02D4DA3D157EAAF3B +631C42415FF4D0A09307DA4619514035B2EA4BBFBBFB5089858C19A67BF150CA +064ECD6E129C444C8E138D731A0E2CCCCE78DC1E2EEF56324131502D7EB7B5BC +9EEEE7B01E8456EB2E790605913E923EBE60F9036AE25B767F8F331B3F739FE4 +BF0B93A446F7B2D03CD6D466C973220EB3F803B0DDAA16A9DAD8DF08E0EDA066 +9BBC9E22725A8FBE8D6250D70C0DDAB7D0D0C4BA5229CC0CC11098EEEAEA64C4 +A01EE78EFB12431445408AF72B06CE98921A02496C99ABFC097FB7C8F5D8747D +820EB65FBBA1FF651E6A1B74F20C1F14F5CBE2DDF269056030F39BF61969F3B0 +84ED2E344E625F717A17292A4A4EEEC69554073867EAC505F80549A49BE231E6 +D6775C473D6BA72688CB3F480339EF5352745A37CE49947C9C828E2DAF8174B2 +FF234A4C87569C2FDF34026F718F85A454E6CA74F14666327D7F1C3390B50B04 +C9DB389CCEF5155E16E6CB82A1A4190588B419E0177E1254FB27305A85865E4E +8E5E5C334A08F74DC71B56B74D21CBABDCE47F80C492D459AA79CDB1974DF930 +295C89555D51981434454CAFA92C13D172560BE6C9512F23F647E9F04DB7C4BB +09A5B78014AB270742565265F4143D245726F0E9A43E78F0F3FD1B27A7CC78E4 +B9EA64918AD641AE25F193DE29D120B878F98444ACD8B25EFC64147ECE439AEA +10C99DFD417D29B740C1EF0370679557A8F57145D990AEBE8084F765824613C3 +64A27662EF99A4C2DE00AF5D900878B2BAF94EA6E652708316059E6A8310DA80 +B5F96E6786AFF1EC107D69D5A98438741C2E9E2936E77AA20ACD49568080E584 +29AD3A3508F7570D76D01209F22FF2C768C0B671CE188430CE516783195EF9A7 +F3E496D706FAE419EA39FC3DF562E59EE2EABEDDE11348E36C8BA5FAEB1761D9 +D2D6666EDB812B85C0465B047DF52F9DCE952A29B4CFDB24761B30518E658211 +9DB2FFA80AE409444CA15601983764B24D8637262BAE7539D3D3697928B1C81E +FD463A064007D1EA34C3A64D28461578439DE0C4A907A0CDFC782280B88CF853 +3C62FE17119829AF7BDE0A33DBDAF65DE1ADE3F20238DFB290AC8F2C46DC2869 +45FB0CC37FD63BB83EB4FD787E52BBCB5F681A21B2A80F1119C3468F52FAD494 +31DE770D3D6D6A7618B346AAE4905E5812A237C25773568E0AF20BC74A2643B9 +FD460FDF6A7DD9782DA65E36B4D7B4B0D5E90CF51AC7BAA965724F8B99DBCC40 +E3124864A7E0A2EB58822AA2F2C52E1D2D3E233F491FDA3468D97E2F03524929 +4BFA053BD1B3C89B9CE560E0E28E0BE77A41CC5AB12F6C356F0DCFE4A72B482C +61ED93B6D779849717C93BAE725E24A1DA3C9E4D806CF0D3A9FB592B6E56F5CF +233D000659A4F941E28162BB098CEF972D070D7E902F33D617C21093F3B3CFEF +1CB5E5F4B2D38AEC8D47F3F95FA02267E55B1C0FA37806B1AF5E1A8E7C3B6A31 +8B5DA830A2294B381C92DBA3EE9DAF149EC699130CF226A86970E8D3966C6173 +644627C954FF5A7F07A9C23EC67D50B3A1A53B4E8598B82596F9992D79F60C6E +0AEB8099641EE685997E495B8A9CD65755E82FB0F4B684E5CA386C98ADD39497 +84D3963E91834007AA952BA45295DF7341C0EF8A9C30D49295C90DA72B5F496E +54A4BE33DD48A624431BC08DC2D372CA15E93D1258F5D84EF8E807D9E1ED24DF +19FEF593A79C4EC444BA9D981E42B325BB458CEEF30ABF8B66E14FECD147B535 +8F083045E43FA145C8E6E2E4CB1B7B391F73C15DB0CA09A813A52A6643FA99C8 +5CEA37B29E0DACCB155065C9ED3A44E12E74984002CF7F5915DFB5CA5E48D364 +6E908F19170EF76F8EFD0219B5DFD6CEC0F83EF6B7F76A8A0D160023AF2C8BF4 +62E4176C1AC70BA6F0173EF1350FBBA75A47EAB30B89AE8ADFD6E59EF5538C24 +721F92775E38A224977F5E93570FC01ACF54EBDC5CFEF5EBDA8594D8A4BC5806 +4F774EA925E1A8ED2AC6E33E28E626BF7A2A7F0C3DFD704ED2810A83ED0657BE +CF1033BA112B13A3AA0940359B307A92BE8035EEFF50AFF1982080D31B79116F +AB21B655775DFC9F73932A919935869307067E518D06CF14B2ABB6D2755620A9 +5B310A4FDF879914A0EE815F5AE1B20BCD52A3A47FC4962337206E5277BF694F +874A1FC314238457988ACD648EF253E1991B7E1794487131F8628EFE85FAC00B +B53DC040BD8D1F48F126A5CF9991A55384D63CDE346A048719B0AB2288C2FCA5 +732F736738A42664E351D775BC498A0F959C580070A69223F75C8B6BFFE627DC +6E0EEF078FB42FA840073DD76474D4DF3B46908ED2469480DBA7C4FF93BE2C43 +7315DDD749AFC7C2C1BE9F74637907D8E6E9361742F30724788EA19D0AA98A68 +60072BEE795E5FD908535522D6301E98F651022353D24DAEA3B17FA928B0100E +EE1BC3D43E81C0CD23F4D66860198418A5B98D7C4E571C67E0F79F1AB0461B80 +0AB65A6D5E39710CA081E0F11D3E6BAAE9DF4DCC69E0881FB2CBB31F26CF65C9 +99EA28BBBFF2021EA9BC6B9606D18DE7DB95F6004D007EA1C482BC4C8236A4E5 +BB4786741CAAB55B54EDF70D11A56595F45EED2272DD5520248B20021B56426A +8BF5F619EECB12DAA7D5937E78D35716E103DE39E43497A0806FB91AFC16D82D +EC70C1627A4ED4AE6A1EB701D18335E9409E848298F0D78ECC0335BD61D443DE +69F21A137FDBDA37E4E902781747F6C1184DF0BF1211321CC7AF7BBF13C028F9 +EA1D7EF42077BE41F7FD4D78D04852A57BCCD67DA86D3DCAB7FFCCB499D117AE +48B8C8F0F6A4B0D39295690268868696905E6FD5A51FA4C268189B01E7FDD40A +D70FACCC133E8EA6B25C224A6F00B1AA28C26497DC8B637821123111D450C1C0 +CF9258FAE9F7BA325989B407EADA1E0D20CB5A9E7B5505C82E3CDACC296B5BA4 +188F9BA68506AE3EC03904F940CD96B2A87454FF03586F8653A1EBDDC9A79491 +FF26BA421F33A17677A08662178446C69D8866C889C7CC962CAFD6F622FC0F4C +FB5F636094385E4886069C88CDC290C9D0A63175E9634CB25C6841E598F8506F +E906CD57DFE62EE59FD7565339AF6DB6A5B3472D1F721820A603F4A3AF4F6407 +DA96084FFC8F5A6F801FF317ADA012BA98D8FE5ADCB424239CDDAE6D339EBAF6 +ABD506B70A486B7630DD035A461CD1A95F903749BA088B32C3B207241F1BEE44 +F9D38AC9B04EFBA694AFE9B4F8851243A4BAAC4D293840C679809C1AE56CDDFF +700ED971E8B86E24F82A2457D37A4EE4B485458AAFBF1AE3E092EE0D01DDE885 +AB06C6FEB2F09CA4CD40D67C514F6297A08C32CB49C8B80904B7A3A4117BD314 +A020C7A4F8467C84318F95711B6E9CEFC51AA36295E71293698D1A5947918406 +C601AFDFB9A8463E97C9A5C84C41BAF7EB4F85633A36F231E0ABF2ADBEFCD245 +09EB85590D76D20FAC8CB39322EA3B4254CD7EAF65690012AF929E299591A0EE +15C091E5C38FCC422F42365F5891F12542C74F9F2C44DCA23AA3CFB7BEB8671E +FF6AB6CABC10D8B5DB7467ED20FFEBB0380CE41C50831D822EFA66A75E01A63A +EB69D6CA8D1CE7C3B7E71E3B0C3B50BC23D908FE8B41655F2FAE0E14F6BB1440 +746ABEFFC07A4E45B0AAFB8E06F24CA19F6C9AADA256BE66C6930509D2E5456F +820742F58159D1C07C894E1845C23AF3EE398107C847141A8E79842B05672C06 +94DD549DC713303CD56D34D7ECF3F742E90A5768624010CB182C5627046232FC +EAB2B1FC6D350505B31416727CBF643FD96BA36F11236AF6AA50E01D95172279 +9207ED11AB16A959374693CB7550ECD890D47DBB9B6490EC3652A57B01D6AF59 +5146E651C8582DEB6B1A2CAD424BE721245131C56619E533F2DDD870F5BCF33F +7423B82987F2BE494353511098A79E877F399CCEF8F364260A75824FEB6CF2B3 +3C050C9347502B1422280726A4557429E6800BB44783058864F1ABE1B47C06D6 +55A5BB4AF3E2A92EB24983F29FFE0859D7E59AB44D075936EC4BD1D7B099D9D8 +47BED57148F1F0943AF7860B9A97DB1DF736519408FBD8B55D17A82F3616CFA8 +81BC9F0C858D260412D329EEFBC78990D620358C0CBBFA69833A4310C8EB248C +945CB78DF160FBB5F0DCAE4F361A266591B28B0FF7A7A37A7966080FEA5DC74D +005269115A6655C18657CA6016962B20E312ED609B98FACD79E915BD142EDBC3 +F3F3CC8C5E5189F806B9653E4A29C624EF94DF96CF6E7724106E98BEB854771D +3CFBE6938E6B883FB408656B2BF7CB89A3FCDA22157ED830223B5F409BB1DA74 +9DA9D8F251CC3A96D8FE81D808C853E5B7B633842DF8107B9084AA99A40C61DC +61AF68DD72A265BFA791BF6C58F9DAC4560CE3F7D524C90030EB59677BA65F9B +2E9FA38FAA614F69AB6110549C0605F74D386D8D1CF69DB27BD3E7FF4CBD07E7 +041C2A5512B68743EB93656F8E16F199E50539638A82630BE12DF63B4F1B9031 +C82BBDBC33E5E18491B8E4BCDA93434D390B204432BAE3EA6F6FB1F8797CEEE3 +9B4D7C30610F3722697F4C983CDAE23FC93E1BBB420D9B0833FD671DE5913EEF +DD3B39B252FDC2EBB6941540918C3D91AA01BD30B773CE6999851E1F2BD1C5A5 +496EBE9ECDABBAA6C60B59DE94F534DED5808B9B489D7DBE9996571B25D1524C +254730899509F971AC50936882D8BD2C70B10682EEF59C5C827122E08E8691BB +705AF47C1493A8CAE717C08501F359051C3EE46EC9F85ABF1C9E0C0842D33192 +CEB81005F58237A5FB85EE2FF0B2FF1BA4636185418D6B5E472AE3AC11840525 +86A3BB294017A337B8CA9FAC65FAC81556BAFFD45000E5A1F6C8541A872B61AA +2BA74B7B933C743D25DA50E2A3C54CC609E349117A823BD363BEC4E26FD16B13 +3DAA59766A417CA1F1CBBD9C14562A3D57674AE504FF0F0DDF982E1648073DCE +D2512EB6F530445B97BB65B751F59B9B9F09535B947869D0C3B326730441C68C +D5F51B10AA63CC35ACF82A736F1B96171336BA630CA702A8FAD6C45FF806AA85 +68B49917A090B906995D02799BAF9CE0EC66423CE4A0E1727207F3715CBFB63C +41AFBE792539887FD2F155580F00C55597F9FF6BC9E9DD870A8EE87EC14450F4 +B177AC59FFC226C5E14F3ADC7FAAB3C7623668AFEC8336DEB2CA3A21585D5A68 +715D1252924F085B16271486E04503ED44637613F87FCB51B19D6EFEC116679A +9A84B3445B02E27AC2A2311C3275A91EB8C48B461B7E0F9EA0A01B4B5A0C8F50 +97796C4ED047515F8C9CB560DBD2D6FCEAC677C52158BC657E385B9798B1B9BE +87EAA9FF2E4EF5F80D54C55AB03A5B804A3F7A0E07BA8904374CCF5FE7BE46CA +81C2E3AC8B4469D3052528419A55912BFC2FF9E7DE1CC078443ABE919395C896 +7A6FF94A49A808AA657A93307671A8832AFF38D10271114EB1FAAE2D8710DCA5 +AD0C20B3FCB95707EBC45D0F57A1E4313FA5ECCD956DEB34A7F59065CAD4B034 +E2742782183D9D3EB8782A0DDFD14CCDAF1AB45AF4F6E41B746F9C9361F20AA1 +1177ECBE62D49C11D7388F8DAC931162D3D91D9905BEDAA5DB7BDA13F2AB972D +9F06A9D9672A0B41748CC4B3944E2DE8D1A9C083BDE487A33D7D5EC7CE8C61F8 +2C357544A00114B2B79807D684F465965613F83E9AC9034913D78197BC9FA434 +0F594A50CD333AFC3C24AA7C7D9FCCBD7BC097ED98820EB9B60538183C60F786 +6AF56DD6E52E4359A147EB598B2F640058701C065062BAAD55D7C37424315A2F +BEC4089D750EB85400A1B90902EFE6C3E6C9862220B55896036C24453DCC28AF +BD4C3F08CAA3F552F87CB55064F8B556C10FD019BD1007FF338ACA4CA648AB3E +2AAF6DBA283DE2E55616D59052D4A02DE6924C0A88E013E153A6EE63312FF334 +04C16147A0F111274F0B068CC6A8ECE8B467744CD203D61B19E186BBCF333A0A +CD686089E36C6BB25DF4C067B24EF8C16BD2DB772A14943C84DBDBF6C2A990E9 +4580FCAAC95482714A0AC90609CE52EC95FEB762CED548A6A7BD2B5AFCB39087 +0B7C282E6CC5156328B80389506F058FB16FD06B69192A21D24775249754EB41 +5001B0D7AA2F87BFC457D68183C69F789B190770E91B77EEA53AD47BC6031A77 +C95EDB1D8CF87406CFA242BB3F13D2E7D8330917B9E41AA75BFF8F9CA5B991AD +07B90F7AC69444F6C46CF46AA8DAECF0C89146478215F17F2EA4959D7CC7D832 +C54952E9D79B62BD04892D189FCB7D0C92EE0843600D925E12D7558B7A84898F +4B01A41A7B499338E2A6C265E116DEC3782D1E6C41C5DE81063EABAB8BBD9530 +7647DA601E9F9325EF0C6711DB935D6BF0B7E9BBE2440945403D3BA0637925D7 +41D0F7B813883308C98C415DA2D653F72DB19E74C17BD35EA49C84346A9288A7 +BB0FA7D2A9B823326551321FB3A33A0CB7DDA9448EA006BE1B5D7EE96F5371A3 +9A9442D7ADC9E5B52C5C2174570B5AD07095CC1D0F944B83DE8C4B2062CD5799 +BDDB662AF9FD2354C432B436A5F2B41104362BC5351EFA99C6021FB18D4122B0 +5D09F3C1E1D9C4359D37764674037ED70A70971E513130B9EA286BE8F30E3999 +5F32F64A96C6910C0B7CFF9EF90C676E0D1DFA0D2D7E499A141A8E56A15F9A58 +DBC552BF95F9331ABD9EB85732CF8ABE8E20701FB68AA2D22BE6FAF9F8722316 +6680E21150E27426BEF5E88F6E80AA7D1AA49AFF1B926BD9D589C13A5064A65C +988190EAE178122C65F7A8015C4292D04EDFBAD8F9DC08A23B1D07FA8CED98C7 +A87B8CE93E94CCE6C831765EC7FF25748F9D9DF66FB5698FE3DF33E426E4E5D3 +09221F1221A25BF840AC12AB8C152CE44BA21F8AC87101CAC0907A57DB4368A6 +B1DEAAD630900665AC251CACCA23E35EF6C6BE86AEC635C113C8086EADEB1D67 +751D2824330828323CD28F5CB4EF3A0E0BD6099D4A9EF125CD79D4891EA72C2F +78A520A4210310F0E96A62726CEE5E35C0F8DE0550D20B113A72231B5CDB0785 +50AB127ACE1939F5E56A3988C2D65562CE1DBC25DB6A92A062F0E1EDF4AAACD0 +2AAE39A3841B7FC7D276E7ACA710F09BB8D5D66DE94C87746E8BB498E80AA8CC +649F7840E5E0E2A2621EF82C751F8D51DFB47755D017564DB5BB79C5EAEFE898 +0D17D1EC33329487E695D7BC7D2D179BA88BABF904D9B220F34971BE385EB9EA +EEADE95619E1A9C2E1C0C196D24065FC2EB344F837FAED594614BE8226C3B2D3 +1D270F8DDBF81DD6BB83DB6C65726FE0571AB04207F2E8AFE21BE8BAB946E113 +71B8854BBD3E635C373F46C64F2D6A037D7C7C50F0CBCA927726B2A7542AEF3D +F951B9123DA0DA1143CA09795EB2D9064AFEB000F236A6741C3EEC1E4DB695ED +D526A0DBC55DD6553EF1136010FD4497597F81413D26FAB9B0F946D624E24BE4 +1A4FD6D6EDF4BCD1D4CC549ADA159086AB7E6B0161CD2906D0217F42D63F5975 +CE7DD84DBDA69FFB535353F3974F672B90C0A87C00D544CC50284788E32C62B6 +F6E5FCF7893B1FC47B229667B762340F9D7EFFC8368CB5D1322F78370EC543DE +05CCDF13CB82B8910501098309309BDA192AAA1AC85FC11A044C5CCDCE1E1BDA +49621B4D8386293CC082B075D707AF1C3ACC5C47643662EF76A24774F31ED87F +74BEB03DD7EC896C53A7BD9FBC86C69099941439338FFC1CD1D23AD17291AA20 +28C89CF4D59302B8B27CA61C6C9B9732C4AF8647BB544864360E52E90177E6ED +95A8823936434E9638F76A21C35E4B898C2C83CFE4ADB511A630E8148A517CFE +D43900F5E57A5C52D277A0123057E43B114895AC77ABB3B19D986BE5DA8428C2 +163C8B33767D0724AC621166F63B6E8E37BC05AB9D835A8F082A8ECCB3285E58 +EF87CA67F7F1D89010F5207CD9B5F37CF8340BC2816E1893FF06D5A881ADFD62 +BC1AFB066402F31689DD8E7254529E2C5C88A6B75B84970EE22F372B7FDE447E +911F47FB4A205466DBFE4AE01B38D35B245736B5BE0919399F2D2167ADE22B57 +28F55B2DCA988DDD32B433C3111EC9019609D2FCF2F12AA892CD5D42808F6DAB +E604EB54F50C80E0B6C657C4FD4181E62CCC824861232EAEFCC28CDFC156C04C +32136083FDF384E8D3860D93188A2D8D27C6872606275EAF345E428E7F058F8A +CE2D4983AF95BB49FEE80C5D4F23A71A29D44001C0C280740545C02345B09081 +33252932B69F972CE14B88C9EEEB2DB80DEB4F59E5A5B58DAB46CDFC3C5076DC +607676E23BADB17AB1D923640C20E23F3F1E866DAE7FE51CE93FEF101CCE12BE +3C48044FA8BAA5011181ED9D4C643E1D027D0C78D586EABBDF04E60925265353 +59CEB8F413C85BFA6F848A2E45F4A0A975057885F17EA6DC094CB396C36EAF5A +5B12CDC788771355053BD828F6ADEAD24286569DEAEA5756197C90EFB73FC71F +5A6581B1BCB560EE7D6697BF80D963B712131DC44EDBD9AA27A936C9711BE2FE +DCA11B986431FC21C9DEF655265A3AC996A08374D0D387B868FF015085237261 +B4803330FF1C851DC90885A1AA053FCC8FA01D1EF106FA0D8B01D1E9A9C36F87 +289C7CBB94BCE8A149AD79D1388D9473101457623CC77CDF65B90F9FE9932B9D +D9529CD003AD4EAB1FAB9B1394D86106F72B9B10EC7F86F56272E97DFFA30E1C +C86F677A3AFA416A60C1BB594169409D7080FA8521BA50F9760B64DE56B5DBD7 +8873CCF5798B1FC3BDB06A7F5175D995192A40A680EF2D2FDDC19578F7D4670F +DE8CACCA984AC883CBDBCE1C560BC3F19374CBDCB48EFB75E1A7347DBD7B109A +E02A12B3A0DFAE6BB742EC39801443EEF8899285F6BDEB86FF2CF309C3C7DF54 +1C351D5CE921879B36C05926759325220C92C91955640F7C87120B2EFFFE8879 +DFA18FA1C7970926D042388C2B74B9B24DB23310092409524ABB748EE2424DAB +52688E625EA110659F093B5ECEC56B502B471C597D9B78825BAC7457EFCFCFDE +6FC06D72E6B459A58F54245CC6F5801E1A3F81DFA04DB5EEB8BE28FB1135649F +274CFC4511B35E9B6BCA814B27E61664C83BEE03D5EEB8E5E381E6A3777284B9 +8B1D1A647544EA553526041AFFFA6AEF8E6053A14B10FEA4651E2C6C97659781 +F6AF4A23B3E3530FAE95696758CC3087A71244AF584624A6F14288F14C9A233C +BC76337B32ABA1DB0A4AF7F0F145F13B0F4E6BF41CCD344B56E57EE4173B87BF +BDBB4089DE7BCD7FB127CA30F093C7C6DA3F42A6E593347F0E7404C07C47A965 +C3489CB69AB86D9226437B896209DC5D0AD175FB195EDCB66285BEE1D8CC09F3 +8BD7E4B01AF606BA797AD8552E01B077E749E69A7074F03846EBA4D7E54AC504 +0129C40DFA0C3215CA7BE86FB02751BC1BC0A19B07BAA5F8415AB7C5F76D6AD0 +BCDFE4604159BD92C6EDA22290B3DC8113DBBEBE6F9C75993BFAA6B5B83EA281 +D5330AF5F758B2D45013EA4234BCFA93E1D777E5077DD0EC96603AAFE58B817D +EACCD5C941015E695A531136CD24897F3E5D212120DF91CA0FAB76D406C2C640 +1FE2DF13FE8219DC1D0055C616700CCEC00370A8788B6E66D80CCEEDC72647AE +FF05877EDE1C9AB22C948CAE248470474260AB3E927B9BEE44AB04482CED59E9 +E754D40499CCC17B229A83FA8347684A88D109C5BFA69C79A8A9C9DDD841B181 +CE9270799018ABA2920B121313411900148FED4A106780FBF88A00FDA3C714C2 +90C9E656B8F53C3A0F3177B83C5CC17DD2B5B37E7DEB61ACBB3B1F3C0337B557 +2D41C42D3637F450082078F3C37D884A5D726E2ABC00634F5A56E39A53FDABFD +010569688AEE4F52091C5ADF26E9CB85A2438D89DD0CF1D291990AE37BE87527 +17073D25CC52FF8A022105A02155C74048DDCE5DDB39610A6997BCACD25066BD +D19ADBE46D2D9F1C4D3DF0FEE5F90D5AA9E80D5D71A6D32F1193356C3F4DA140 +FFE101FFDA2E9C8D8ED2C5E4B9FD359A2E61AECCAA2F4D3DC9323D0D03B38ED3 +2C8554458D8F1382B65B890E271578FC041D208BB9405E5D791A7355F2E5EFB6 +29B15A5C6A408B430B643B6ED36DCA0253EED99B21269B1B8071C3508130AECD +0AFBE9DB22F138EA1FE3741F052CC2D02EC806A1F67FBDFA171CE59DE98D4346 +C335E7594F746BB117B7E86DDB51DF9F19BBAA0B6380734CED50DD8A86C800C6 +13F43984D2D02DC389CE737A42D2979E55EE4F4EE0AE483476372DC40BF9020B +D071ED61882D52904FAB83E305BCA99BAD33244BBC61E95A9C8B21F4FE65C716 +24F923923E76DBF04BE37B8CA7DC5E3B9D163ACF4432C7D1724AFC3B64A2AB5A +F3713D0E3603175C78907716EAC3C6E26CA07A902C0C9A8591CF72BE7D3B3F20 +D196276331F3592FF6A3054CFBF999588B198B1B809FB49A1C8114D012940D14 +07BDA35DA17AA4325319FD1FA81FF5B337DA096F80B49CA3444C5555134A8D9F +076897646EC73AFB6B435ADAAF22A57F8C321B44620A12173F5513194DD1DA71 +BADF676BA6E1897E3042FA3576FFD6FE39892AC2062A51B69D6699809EC4FD51 +9CB934575A2B4FA6A1F9075481F132BEF726530A0C188BD9708A4882023C50C2 +535FEB4BE079BFF6440B11483C786C1E950925CC709FE67C81C5D8B6B33D510A +28DCC16DA96C890B0CB870657FDB8ECD41F2575AD993CA98F3EFC8540866FBA7 +21C3F5B87C4AE77413AC72FFE5BEADF922681FF80E884707290BCEC4472E41DC +C6E085A0677CBEE515BABFCA7B034561BA812AD2BB799627C6D0CAB63FD774A4 +D5EA8545C538841C5932AF47BC56DDBD6363E3364B9B0DEC9D4EF00A258C9DBD +B990D37F8659CEBC5E8DB642A38C3354D01B14BD4CA53C4B01019BFCE27B1DD0 +9CBDDBE6673D1568EE01EBCC07EFEB92274D8C221A3C8FA0E4055421EBB92B1E +8EEFA4ECDC2363EBFB5819CAC8204CDAD3262A90D6AC4288A6CA21E0AF7BA8D8 +C175F5D44338B2222921B0C38A58EE2476BC60B3A3A803F0BFB401979D7F5E8F +36EA3B7001257D88551979C203C6D210C162948C3012C7960ADF0458C8ECA548 +48FD70FD99A634C4937688963484C342B79C2C93BF9A9AAE55E4F55E1CE91721 +B21849DB842C69839DD59B2AB1DB3A1F22F34F17143CADD0022DEAE07BCE5987 +107DF4FC609BE213A562DC6884CE7F9DCD64D77A80EF3E137156A4B2E2EAFB85 +E02C9DB3DDF9C4A62B7CBDA34C757F85A6EA31D9BFE6B278CE3BF227EF8FED51 +D597C3FE312B0B25B856B22089DF727D14F676F05D083C8A37B50A6C98EA8E1F +35EF883340204BF93B4A63ADB4B386449416F05EF04A3AA3870496EE3175F254 +1B3E4AE819DEF164C91D222968CD21B4031AD28892A9BDC4AC6CB4BE1DB8BF06 +799DF3AFAC29A64254762EE6927D89E2513AA0B0002A4323361BD4B5A17DF785 +43655A37D1E3CC209A7F492A9C6A2F5695267433B8AA602DF500B988C62F9E34 +A5B7C58F7ABAAC501567BF6CD5098C20D1E3B5C77EC92B1511CDC61B5EAB7D9A +FC4F8B8906C6A7E39ED17D46ED9E26F18929B7C06BD1808B3F898ACFB8E49FA6 +85B91092599150F994B0A5134D70525D08D11A5087DBBD00533313A1D3C1E64B +600CD75B8600E9C60BA20A5045FCE8F438FCBECEBF02E5D5588A648F6C0DF89A +88B625474962E115747A6700F1F506FE3A51D4A79033572089C0989FFF264039 +38E298D0E86CA2F07C0D0B1F8B4B9599CA17EC6E8CCD0C235DFCBE138EA2B990 +993003AEC8C49ECD2DA5D88D5D715F0BCC13496C41DD9C776555C2B26F73DFDD +ABBDD08C82096FA9A29671ECBDA5FCE73D1CF9987F7E1BBBC447702C6500E57A +8F7F5FD17131BCA56B736895130BA374F2957485B51C77AFE0451393FB8501AA +AF0878250D0E8E7B46D01AAF81E6DAA5F80BCDF364BBDCBBA488782751BE22D2 +8EEBEEF84584F5DC407D9741DB4DB6C7951F0FA959F7E961C7EA92387F3488D6 +A51236102B42A97C89D1ED4A6D0C4168D2F6A8D8E7F80A7C8251D1A57A44E235 +F7FCEF80ACA698BB223BC433F7A6A10BEBECB3FA01ADB89DF04C65DC09E5A468 +72367C6A3020D04AA4ACC86B3109394EBF3A01694E32F9BE212AE03332987C36 +6C87C689219DA1410F58DA673F303F69211BEA57E1C025853669EFDA4A6B96D5 +F4B0FBA178EA4DFF0B6F315CECFD7D5C6C4FDF7AB2EF1700A83009081D071C94 +439B5B50FC9332CF723A3E64A42404294BADF4200E2B3360BC8B600FFBCFA5C1 +90AD5D06E1EF2282DF643D29BCEF7D20F203C173C3FFEB6E703FEF71D562DD03 +0F42AAE7863E5D45B40B63986759CAB959D3FC92AC35862F76133FA74260C872 +B6ED2C5C2E9746627AF8B278F6C443204DE6FBE2BCBF494A8389241E70B6DED4 +37E0CAD456109EF08DC8B98D5F21767212C0652E12B0E7F2B2702414DD0A8FC5 +B0CBEAA00F9C76F655D264054F7CFC1F77DCC5A687AFC58C85DE90CD20450DE8 +65CA62B6B3C92553AFE8058D773AA096B46C250F60B7E12EEE40066A2E3E604E +C24A9B6779532AC72A46D84014B8887FC2D955217EDF55ED1431397C2A7BA609 +8E5D61BFDFF0850AD46A77D6A92BC4CFFF9CBB24F3B05FF7FD14C6368BE60B7D +8E9D5D7DB7032D2E82201CAC96725E50CB6E16AB3BDCA10D9AB4F2F8F7000745 +B4B88B16B366279E0EDF98B1134B927467A32C20099E2C78F185AA95786B7F02 +9FDCC6E5C37302AC438FA9C5E14834235AEEB2A24B84426B582408C0DD2F8E52 +21080B7EE802D7DFF8524D8C0D6EDAC2FA8D632E43871D5866F5766C6AC92D92 +771073C834B756DB3C121C6ABCAAB2BA7C168F745BDFE3EA5B3A22CD40269F33 +8D8B04A7270E25056DC36E37A1EBD74613C3438B1CFED55049152F288D0CF69B +3FBDF5CDA5906945069B1D44B19BB35227904A980FF331B0FEC3468601F673FA +96950C5D4BC05748D75EE1C28FA46771DC13F172AC1834850CADD86EF4AA44D4 +35370B83AF5EC9A66B3937F41249B7A7069D546666BAA30090BB902DAB369A90 +57B7704549F4E39C1F534ADA662F11F08389F12C394F0765AD2CC3B2C68B2150 +20BD702BF62EACBF28AE1EC306C29B76E3A08CD2DD1ED7A348F9C36BB475431A +2E0FD73DC744252AF0E40D5A3A2E5B7A6269C8C66B2BAD3CE3CB13CD187D848A +D423796748D786586FD073D5FF5A3EB6C003C9511F3A3D38039D631D2BCEE92A +0F6C9C2DDAB08229B62A3269460B3B6AF96AFEFE787B7CBF3CF24DC5187E5C2B +70AA54A75920AA04B8E211CEB35D43FF44A3120BBE5107F3EA114A0D138F8230 +1C81ADAD29304DDF3738C3CC9DC0576B6988B1459F1D6B75B3D6E2825D371A66 +AE07D70AB744DCD52F67A6E0B78CA14C55AD127CD48E969E074A5C93D5AEC520 +ED28AE953322743C180333759379477D8C0DCA763EA0FC0986C8E17D512420B1 +7D0561A7E06A45C312966ADA5582CE48B4F129A4AD3E9CB93764B806359EDB9F +EDF397BC1B77442CC6312D346906F332F465CC758637BA215998CBA05AAD71EE +768A83DD73559EAEEC9ACC73E857E38366638CA298B5DFE75C2586EECEEB715F +8B84A62A0D2D3A7BB06509A03F9AE26AF1BD50219B5D6D75DD5451AE31F158D7 +5FFECFCEEA0D6D9AC24B15E54999A8F1B88D4A68F9905F964EB2E4135EFB9BCF +E4DB1B5EC68D394B19B8680D09DBAB45BB3588D181307566BDBA31AFF62CB911 +38CD930D2EC1EC0C268CADC889BAB3078FA6735BCDCC07D148A27853ACFDA3EF +94725D55BFF213558DF732A06003F55AB4DC1CD388B2D250A0A5F5F3F49F4948 +1CFF31BFD280E00C4DF1731E83868654AD753C4CE3A30CD53CFF3BE16E790042 +D329A4E56A05E06FD6252B6502D450E6AB03D0993BC3FB73B912E0BC7B89B4B9 +C8AE2C8016F89FDB41B9C4E87876BD680900A8D7A2D222CC937E7DCCC6C4185D +5F2CF10BE54D8403D63F6DEAACA220C6E80BE983D3F626E5E07C35F3625C0B91 +56D2827BD817F823B58577F779E27E6E72EA5883D78D536080636F22EBAA6E48 +78DC727104FB3FD7621805313B2DEEBBB46EC7934DA908741CD585B0B2AF8ADB +D27B2BE500746840DD148024FB219A9FDAFED897EF8F7B3DBFB268EB6099C9EC +425B3EE33FFAD9E84452D54B99550B6564A2434D72C3E37956BF6EABF2184445 +6924CB47EABC13AFA824737676E6E3EDC65412D68B9835432EA41096C0D27021 +A6B73685F20E93CA040AAC203D0BEFFCFB0B95304B18A262167EB2773B689B9D +7A83F5639AE2F58F5B49AEDE8E72A2884FE350C2EE346E8456FC6B40D6C68FCB +EBBE412108AF0C38ECC584355DD689CC598A47C3AA1B5C47D1A6B62688A6FC19 +F735012B7F75B2C0A1617F5382E878DA86C5661B8227163D6795F209DCDEFCF0 +F7C8124563072CF02E986489AE235D12A460A8E9E75B24698F6B41DC1B755196 +FE93836C7853656C7E2431E05C3939A294932B7B1FCC614AEF5C20AD2C0A6647 +4A1EA7F279EF7FA87A6224C56AC0561EBBD6C006AFB41F907623326595F19A98 +94D772DFB309760F1785BC5432261A271F276ACAF3331E0F98524D6EB5116760 +BC94623CF11FF84A669DAE11A355F36DDF7FC5EBB6A398DCA90AD9689E98767F +CDE5CE420E11545590C2D6CDCCDF23F0192A3407423985386551FBD1F3DAE331 +A24DBBB20BDFEEC45AFDC82F97164A29872AED316B3C5810765C233D4C4BE52F +4D5143078625A3EFE4747FE0736CD7E06C606D49E35E4B8EC68A4C82F3939BC3 +127C7B1A9706D3A6C9 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMR7 +%!PS-AdobeFont-1.0: CMR7 003.002 +%%Title: CMR7 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMR7. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMR7 known{/CMR7 findfont dup/UniqueID known{dup +/UniqueID get 5000790 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMR7 def +/FontBBox {-27 -250 1122 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMR7.) readonly def +/FullName (CMR7) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 49 /one put +dup 50 /two put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794D2DB981ABA2ACC9A23A5 +3E152596AF52983541F86D859FC064A0E3D5FC6647C3CAB83AD4F31DDA35019C +CDB9E3DD3FEBD4C2B36BA3CF6E6C7DA85E25D8A31A9BAD39BDF31FD0D1790707 +9DE6A078E8A409D8295F642DF492AC4F86AC84383B0F4C6BAA7C22AD5A898A71 +D6CB34D2CD12266C486B75E75A69C14819DD9BB8159088E04D4717E576B8482D +BDA52110AC8B8A80E4E9D58F470EEBD3CF44A1E1EE8DA318FFF3611B02534FC9 +F4018C7C57E80570D2F634D98BE5D5EC6D95051157F0EA94A3D12BE0B4B79939 +F82F8D73136D3337C44E314B0B16CB030D9A12E01FB667105F334C3EE965E5A3 +D410D2F1531547A4497C355AEEB295CD3C5334BEE5232992960B757594B89F3E +52095042DBE6B4DA3C3AD50CA95EA9EBADA10630B500CF1FCCA7D60306743681 +7E428D33B7F7C40B425CD58E4CD8AB474BCE6A307BC6C6EBC15A8A96E0E2977E +A33389154536F5C5D8CF036D07F24094E779E5ACBE5502C92892F10F4C6DB627 +C7EC4C7BF20B39418A8A85D7FD9B0EAAFD871DDD41F93BDE5FE619AFB8711824 +DE890E62C1969A6FE28DD3578AF43D58A728FAFF0B9FAA640962C8F35A26F76C +67F3548D6DB54A25CEB368B47F97EA2B0C4D7C0E7894A4F0C823C6C1922CF9DC +10E05600556F1C7C9AFB33A2DB6F8730F70D6BF94B1FB0887451F2FFEEF3584F +DFADCFA9A2D4846B8F0E51620E1327D994CDF973B837D10C90FF76DE22B47CD5 +EE3183898D156861AB4DFAD34A1E3FA260B8164E6680BF58413A553E88F6100B +C4F4E8E972C81A5F88A7DBCDC308B4C3581BCDE13877B976B1F84330839FE5CF +C78551620EB803DF94A5C921F8EE24F7EF8FC4C3E1653514212631F54F90E3DC +E9EAF96E998F340C4F729ECF7AB430FDB7C0BE3DF2C0D23015820E28B743CAD7 +7F0AE95413C3EEABBC69E852F53EE1DC260D7F1E712BECEF2F18437DB23D8E74 +2902AAFBC733AC5BAA452DD6F3671859AD836C8564E99CDC4183D8495AFD99D6 +1F0D65B6588CE7546717911E25BDCA6C2649E3A7466A3E2DA7C7994A30AB4449 +672EFD00632EFA8629C1AFB7D53D801028F77C864869FE636213A69173003EA6 +BE1ABA95EB07B13D1594BEFCC95ECB0A9CFA9892EE0677D6B6C250855762B7A7 +8E4E022640F93169DFA0303A0D5E73BF3E0F4D4AAD10FD7E4EB20532BA30371F +E9F480F9513432946F9828AFB5D4AEAFA5829B2CB544E5EB634C4537EF7DF08A +A1CFD94A52DCF0E7CE4C5EFFB01E6D50558B75DB4C8D5512B06080F27BE62E01 +2EEA6A0357441401458C842D3DD4C35B8F561D816B336216CE0C14BF77648AF5 +E33912CF95872A1E1AB9A18980A0B29A881D13397C15E1CBA5D3E0B27943EBE2 +F3003D15EB446BCFC1C231832475D5B7AA19E4CFDE119D6CD62D053C6D29C333 +5F729791D17B3F7108074EEF4D1BD101CB33E01004532CB0D716D2E54D169C6E +80163E70C0E9081F31A1ECBAE079D2A518B790B0CB2CD03DFD034A0F4788E800 +B0CD2DC1FAFDD487C2F381EBAB2A2F3F3AF82021B211DC9CD2FBA6A1BB3D4AEA +4C7F3D9A5C21DFF284CCB827D205A69638E98D5DD8E36AFC1A4481B5CB2A2E8F +D6C838DA6F81990F5ED928DC7457501B5C979FF4CD20A830896A460C5DB13D56 +A3B2B5D9B292374A9BF392894DD99FCD6A1E655AB395E839F074D1596488700C +4E2891C8AEEF66568E82A8B826F9A28FF84D4D9BDA21F638EAF96880B4EBE0D8 +081982F34831A03BEE81FC177700C2360D2A48915EC40D5FE85B400E175D5AF1 +067FA0097904FB647757BB44B4042D30D1557BD0F7922D731142FD682139CEB7 +58CA4C8C240A0B86B1888CACC507E24E04020BF1882BD9B4CAECFA97DB24D7F5 +AD64C69454027F198BA35881B94EE9159A2D73E450C3BDAED66B886D6DEBC84B +653E165176228F88993F12A170775A8D7038BDF2FE8DC1F7B98BDC02D1E6686E +9B834F6C0AD90780B17DFE25F0A4E470CBA84E73F2D22BEE09A040F14CFA2C14 +0FDA5A5149B5FAFFE49F55EEFC43831BC43A8326FEE9C7F469C0FC3B000884FA +41DA7318EB57262CB96FC4EC7F16CA07FE1C3BE8C2DBC8A8135953D6DDF20BDF +75A2B6D26074FCE752BD32FB9F5CA797775E8DB9BB9786B469A3CD65A0D9DDDA +C2A166E454A94860EEF5B5C12172DDFC576A03F6E6F8A735FF21A3E9CCB4CAA1 +3064893487697986A42CB5888B2B0A79FA3C74E8187BDDF7BEAB884B70B8D4AA +AC6615745AEB906E08BF831CFDE222F58D02B428D55E9D5A3CDE74E42D8A2CB7 +E1A3A9439B678AD438793ABBEB72B21C58981DAF3EDCE4BB93D95F4A1E943BBC +B3A012DE92FED4F232A3A7D60CE60B605151F9C7C18A5C653E5D6D15E5B49A63 +73E7A339504D0ACC74B8B116EA88C3EBA2CC631AAB29F761E5F062966AD2FD28 +7FFE52FA8A115DBE23E471094FFB3CBAFBDF11B7E9058313F2D069B2CE98A962 +64645738F02A31E2F2AC11628724034ADBCEE012721EBF0A567893411F950410 +B20754A7510D041FFA6144AC9CC46D846B82581F20BBD001D34D9764010824BE +61C30D05E5C5D100A24F1917F01799CF5BC4E50FCECFEA732CB50196825F0E08 +8A1EC868C6D4357857EE2957E081A0E4372E31A8ABEF23C3F2EA0FEE57DE4D08 +61C570175C41AA0C7A3A579ADF593F18B4AE3782D2552E4E0759C32E059EE741 +2D8191E381731769F6648B3581CAF11DAE46471896666F18F02918B0860BDA3C +BD5DE777672447C23C62ACFC2611ED5239D6A266FDA6031EBC5A530C1A2FF7A6 +B4380B9A4C877267854AD1F1677CB5433F28894ADF93D39EAB94541A8D232E08 +22D082D0951A60F62B87DC028714EC74133A4D65F7D0D1296C0E189C4A42AA98 +28E8AE7ECBB9FC8DFABCC6EEB1E9FB06227F90808EF31331CCC5D4C9A6182181 +047902DC9FD0444FB94B60FC74F3B677758088CE6A159D940C5CF682335E756A +8BACF06AD7225D49B0002392C889B0FE2C71311D2596F4903D12FA20BA2FFE25 +A0804B4BC282929BE31E0F46B34532CB5795A65218CFAE21F390792DA67775C7 +B91A2BF4C16DE4F6551DAE3A5827F616BE9040EE6B1008DA2F99A01EF66D697A +6CD1A44E0A15D1F39EA8025E886A68A1E9C334327C7703EE721E497CA924AC90 +7723106D913C5ED4BA4FC743CEA8D0F5172526107DA65775C0B1B77179D336C2 +9B09B608D80B1A1E87CA1A84A833A00D980D919BFF56F6390E9D5B45E9935CF5 +E69D003564462F750F7DCE02DC23CC215A0696B74D8BD3156A392A94F557655E +00BFAA035647568ED66157FACC585E411F7F428569C147DC43F6E4FDE693D0F3 +9917BEFEDF61FB980B85515FF6424824E2D995B05CA1E5D3E8BD8D3281DB7CE4 +E54923E84058FFC0A8A2C491327D0F87CE4C352B724167CEE224DABA3B95757E +4A419594BE4F92E78BA6D35D4C93D31ECC3134B24A45DC32445725BB044F09A3 +AA8C31EFC0A2944ACE2F2CE054CF24DB350FB3C71115518C24BDC0F7E54250AF +9D3378D38480E1CB9029F31570C619A28F065CA4FED5665EDB96712ABEB33B9B +4232C00C1B0215F08D53F7E430887035AC25BEAF06942FD1B6C442253C887AB7 +D694C1A6115C8990B4CAF1E81DD1FDDD6B03C00055BE956BE7FD8A4E1049AE69 +EDA8593CBA8C4A41E046C689FBBF9F1B64E5856A7FB1C61EC815A56DE2A8ED33 +41F370B8203D4E5B19C63AE9E6E0D26F4F3814B5AF48AD30EC9B8402C941FDD9 +722FCAFC638FBB835F83DC77F93D367266FA7DFFFCB567EF82B1695AB4D94D09 +B18AC041811027229DF431F5CB2BBF6ACCE9D500C8F075A74590641C1A607C56 +D2B8624797BCD9C91C3177818691FBB4744EDB6056464A0B95B8D63F7C22309B +82D6126E2057BCC9FE5566D96B7A9B201A09B0D3252A5494C8CA2C8BA8A13C29 +37EF2A882D61DA708C279F663D88A8E2999A0F3B6F98C49901A7631BF7708B67 +54D0B4C52BF4BE0DA0439E6763A7C9D639AD4092E77B13D3510DAE1475C978AC +796F9B2AAD3BFF35C5A3E19B5E2BF704B3BBDF68CE48BA4FA2496D60E58888EA +28AE12D00E9F0816FAC190590A865BB58569A91BF0345D01230ABA361442006D +BA2C90EC2036BBAB79EBAFC3F217DBD5854C519235F9627A1C3C71D21ED38AEF +0BB40F3B86BB9F09A3F309473D8757AB7E638DC1C59A7F9BCD49DE4107A2E54F +422767FB94048987847205584309397F554744690ACFFDF5902FE5DB355930B8 +71863217830DD7A563B0B3A4025ACE75B0E777B4414B62A13B50C54E0E6D47E9 +D43BF769B9411B74E1069BF71BA873B4B8973EC9BA492A5DEA58D267872BB246 +10AA67B143D0E2223FFB4991E583E629413CC894C3FA4869B72D19CE1A0CEC8C +0FF5E5A3EC1FCB7D3C4289813F0D249A11B55104BD60B2A89BEF44CC77CCDA9A +065B8B83B4F4253AA1D535290DCFAA4773452D110D2B3370F9E2FE5432B54A9E +644EB3BA9BFF62347F376839024CD5EF3C5DFD30F412DD5474B7933E6A1AB63B +4B12F2417C72D0543C26A263AEA53E5BAEBD67E23553A72E949DEC556BEB5D09 +C4D7A89B14FE4EC68D0E3E9D65A64B285E53590F418EDA8175113CA375A29930 +DDCF4C71ABB26CEB800C2C2B253AC1F53651C88A56ABE5A74F3B54CB4FFDDB92 +60AD7272BA25EC2F6FB759AA6E1E7964FB55AD09F4EB25DE45FD01833947BD05 +6266AA8ABB7DD792941C7A070FCF3A4636FBF8921C70298D42FE92F079DBA2AD +6149D9CF9EF7264DE6DFCD4429949B15EA90B596340713BD61926DDB2BB23BE8 +F9DE38A31620A817420A245946E551463960A8C5C7295E3B3D6A59BCDF5E472A +40B7A2CDDAA43CD8AAFC411D037142579D11054A903E102DF0D0C7B5BB854DBA +F3F086AF991F7F5D5C730F8F9AF213F25786F3EC0E54530FF912F4876FDE16B6 +A07D0DC4FC46EC6363BCB68B83ACC448B801EC43FDD2F8BE0E93D809FF81E38E +176AE17C67C85FEA58EC95435434C49A950AA955D8B20989C550AB1F1C31B7FF +99422E1F48FB7D6F327C6DBC4695A03903DB275B94CB39386E46579271870A25 +21823E75C377E9D5B46655E8CD8F986372CF8BA846423E26582315A9D19E0BF5 +305C32B2A0EAC3ECB275B1D8BE11A37ADF524944219D94EA2C5DBDA768828B6D +775DA8CDB09E0570E4ADDF462EFD8D3FA3F86B1DEECDFFB699AF6507257C1879 +16FC615868C2D51F03CD57BA38D42995D9164B257441210084DC409B6EE4C119 +0B2E17B0A8D5326DD0010E4A325D5F77BF935693BC90A00A28C7B5F74817DA39 +F47A41E32F4F92AA04D30D810F7B1484EB53AD8CFC8CE8928B570314E0F713F8 +AF127227190F9C16BB73D2A217FF801C391A29095DA5E4974D137A0CAA7DE702 +E20DD4755B1D78739756A5E7EC3542B96AD6844199FFA2F5F2E9C64E2DA4FB2A +ED79869F745C59D235438251BC2E6D26112AAED20E06021D1AB896EE1F1DD2EB +437FBD4A25E42245C5A647493FCC9922E6DD7AF57D5D482921D1CBD6F0F02949 +C27777144751C1E72F4EE2BC343D4AE7A8A8758123B54FB1A026144C643651EF +0907A376945E19A8FC7F98A034832A5820A481B0823F980F59623E0511593FEA +BDE6EFBCC0383242CBD4954027B075B21F10472059A480D6E5ED01C3B07461CE +9810251A5C5643EC7403130C2246E8616CEA25EAC7A0076731FEA8CC43BCE3BE +933FCE61067F5FD402E67E2B9DAD954AA77C5BC86BC5E4BCE2ED676D8D8EC7D0 +ABC5C86D82180B9D5D7451C71B5149B6B67883578DE9909317928C0A92E3205E +F23015400A1763A6FBF67FDE3318AD2696685A1832FC31CF38589EBC7CA1C818 +60D2B2211E04EFCCEA88D9A9082E82951EEB123924A267CB03C48889032F2892 +4227E217FA28F87E01CBF27BF1EA60641A4238258CB7AA355908FE36D90F5CAD +FE992D03A33E47CA9AEBEFDA57793F39DC6A9E85D5B289F6B862B35DBCF82E43 +5CD6A862F6FFAC36478C384C3BDB0148CB1FEDF55969C776E77917635B5A65EB +F2AD351D21CD3822D43289FE8EB0FED58182997097C7E9F4373553AE1CA92083 +EDE3BBE6C3BC7009D15AB5FEC6A59E9FD1BCC7B2099CA15FEF083B9CBF7B890E +CDDDE6BA0AFF306C76500C945DC91BD533FF9A585CEEDEF79238C54E6168001E +26FEB29E523EE501BFA4F60B782B1499B07084C35A2434B4D29D3D8E2C8F945F +A9922443B68D07DF7EAA1F4CDEFFC438B597D8943E231B5216808A85F30EDC81 +9DF5DD22F54A45335B4C2203887475F39D247F0E7347BACFEAF220ED82F9263A +6488E73C1910023E505FDEB143006C1A351D441AC57F9D52D2C6D63D78C75605 +999885676BBBAD56074298E0BFDACBA1830BA58E87F436CC670EE8EB1870154D +72DDBBF3794F8CAAA3F1E11DE29752DD99EAC695838A19BB67A1FA3829B6E0BC +5301610A0351AAA749F456AE31ADD87D6ABADCDD1FB3CE81C3713F48780DF407 +530CB284B2AC709F52EE7AD647DEF9FA4D2A867CCEF728F3D40CF34C28D21527 +10160B3DAFB5FE16AFC9D36C6EC4021FC189005862082BEA60AC72B63AD27D72 +FAF3C2D89DA2648FC4C65104A069212D87144E8533CD86A6D73DC7CD9DBA25CE +7DA53B000266F3871B24663C77723703315C5E4A89DFCDBAB384AE7EB2F455AE +AB191FED406F7F6EC9E5B8276EF5C4CBA041AC7E8BCEC7CAE840154BDCA3232F +15711ABD1E867A434E9787CA0A6D1F197597DA27ED2402CB2D84ED082E8D3A39 +81E6EB270DCA4E7A90E2BEBD3CBB3A2BE3CAB926192D7292CC16845B6399A543 +BCFD224BB52F21352732DB5154FA3442733066CDC3E186D8AA97CD801DFBE43A +116C86889BE198DA88CA978B8C40ACB67E8F7BA499DE68A6FF0DC72C3D00BA1A +B378B39610F15CA026F95ED8155CE3FFFFA2E2FEB352DBE14CEE1669F2387B70 +55B91185FBBED764266215D518716EDA3DFC9E5DB6B148A553E75AE5E38E1CFC +6EF47B314D54CF24BC13856F4F7C976BB91D143DE32FF49BFFC87E17885A1893 +BA1B8E441B08EFC04F7D103C1FFBB665194B3D0920473740C55FB1C50EBCF717 +A2359B687FCEAD65616EE89A68F8D91AFACAA0B238EE4AF0279AF5BE5294C3DE +A7E1F5E6248C0210E7D40683F04B12A933C746ECB517CF94BBCC6E4CF49AC715 +D8005AFECBDFB7A6B417DB8A28F8E9EAF39CEC1CA64DF37A5E66A76C26F721F8 +A63B003A040A62F87DCF61B298F960D510BEFA453F118E59E7DE8CA3DD002EF0 +127EAF733D5C61B5132348D280F84D159809CC71A3C6F7373BBFD8D6EF715D34 +0016DEFF14AA5F960BF1BB9AC304A1823722843547BB4CA5EA4C41C6C2701C8F +7BDC810443F9DF34BA469A3260009B799871BAF8523C8763544DCD0B382D44C5 +F75046AFF85F0B5A3188C2EE786CEEE5496A5AF4BCB0B429CAFC403FB983EFE3 +61FD9F52ADFC38E07A0FD7BACBA530D2E4DAB2592AA9564843E7E2305047F060 +C5FE4243FA8FDF1B5D4F61ACA7850A604FBC6D6970959752695C90F78961B4E2 +C8CFA41082B1A37405AABCEE5BA3DC2B9EA76F486117B84728EC6D8AE6379CCB +402C2AA89078EC992C00D53151E9D82C65643F549A572A20F05107A41BE5AC57 +8EDE92AE20B05E2D0C98151CC92D5389A675DFE39DF546A33A84A4C534337ADE +B17C34E09145B37CE1EB1D10D42CC8D6E6B127A3809F7202381FDB88D42084CD +0AEAEB8A8288CB56870EA2BE9D0B9DC8291021CA561E2BA388DA3494E433E0EE +5E69DA51D0AC505C9F71562D3E9750F23CF14D2C8ECF0692FBBCB4A92B48B4B0 +AA2163A516AD96B9354BCDBEBB351B643BF3CB00446AFFC4A137CB928E99D626 +4824385F1E9CEAE6E317451B4ED21EF01ACC5ABA985FB14EE70247FA3B66ECEE +431352ED45182614EA3D57BDC22E5A04D5AAB27C8ADCD7BC07BBAB21A1901F39 +4C9C008D353F0EED437BC00D2E65A3652361D50E16C785B66DC1D551961F641B +032E133A31A61A335EA302469363987224158BBCAC91357E79DC8F409A928EB1 +8E1FFCDC81E7B443ECF0A6D728FAB96395460B33F57CA9B88C746B9B7B453D4C +0755B802DD31E854C52DA0804B611B6014BDF91BF76B6E491F4BD5C46574FDCE +673B03F3D6FD5F8B860A2556FCE98FDCAFA81B35DAA07BEDB39ADAA041BE5ED0 +02EE5663F1C139979D11BBB51693C13514CF00CC7F9E9AA38726D6B1AEDAAA46 +FEFE290831071E035F68E9FB2AB771DFD9E7EB3E255BD3FD51F325AF0AAB03F3 +C001351BCC357E49F8A94A7481991B6239C7D48C5D55D3FED290DF6AFB2E23EF +1FB63022D8230A40B34546705D09709C2A02F219434E951DFA82A1339C095723 +10190C4CA5F9B9F98179382216FE74381A001AB228066DC706493D1267F2263B + +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMTI10 +%!PS-AdobeFont-1.0: CMTI10 003.002 +%%Title: CMTI10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMTI10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMTI10 known{/CMTI10 findfont dup/UniqueID known{dup +/UniqueID get 5000828 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMTI10 def +/FontBBox {-35 -250 1124 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMTI10.) readonly def +/FullName (CMTI10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 12 /fi put +dup 40 /parenleft put +dup 41 /parenright put +dup 45 /hyphen put +dup 46 /period put +dup 47 /slash put +dup 49 /one put +dup 61 /equal put +dup 65 /A put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 80 /P put +dup 82 /R put +dup 83 /S put +dup 87 /W put +dup 91 /bracketleft put +dup 93 /bracketright put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE32340DC6F28AF40857E4451976E7 +5182433CF9F333A38BD841C0D4E68BF9E012EB32A8FFB76B5816306B5EDF7C99 +8B3A16D9B4BC056662E32C7CD0123DFAEB734C7532E64BBFBF5A60336E646716 +EFB852C877F440D329172C71F1E5D59CE9473C26B8AEF7AD68EF0727B6EC2E0C +02CE8D8B07183838330C0284BD419CBDAE42B141D3D4BE492473F240CEED931D +46E9F999C5CB3235E2C6DAAA2C0169E1991BEAEA0D704BF49CEA3E98E8C2361A +4B60D020D325E4C2450F3BCF59223103D20DB6943DE1B57C5FD29DA32D34C95E +2AB2ADB3F60EEB0600C8ADE15A2380DE10AC5AAD585FBD13097B1A7E8E210D4A +EE96785449E07F0C8EBC2EC5EFBFD0897DFDC15E5BFAC9584D8DE95C5AB288CD +8AD8B9BEF0B8E5F887B3B0B331542FC8184DCCB753DB6ACEEF98B85756B988DF +CAF1AE0DBE7D37D5F44A2E760AAE3A5197C27B15E32275A64946C3E4D0476FD2 +7FDE148C788DD2106F7C825E270588AC05B57E625AB17BDD02306F9E5FC851DC +32A5A6EDC43C770A71419B2C0C8074EF3F222C8A2097CD81A91F333A521B3A09 +482A4FE1CB231CE344AD126AA284C3280AAC3AD162CF0EE241BFB4C8F20502FF +118507F5D1B5FD898571015E73E5CF2281085072E00D401F6F59761EEC3E8381 +1F26F75DB66C504AB6BABA87D121B1E7040A07AA2FE01F80DBC246CC03C4B2DC +C2A715980C52B7F96BC1A78FCC7F4F52EEED5F705E08FC1E5BBFCAD121FA88AA +8EBE58172C162AF409DBB0728F14923ED02A65EA24E5D52B6AD07777455A70A4 +61833D3789C719BA92E901232599767E423D5AD9C807670BE0E7B5CFF8256A20 +C7BF7214FFE0342809570F5966A2C43E784F35015D9040BA34FEAB6A6F089504 +3A40A9E9D711A2721D3F4998371430FB3C94BFC619559B97D49627BB630F4B70 +9D0A8FE4E916235335C3962F3CFDB04C4A3CF714DB5E260F4E66FFF2F27CEF2A +D4AA26BBCAED23B8BDC98F8F453BA27AD7758537561E766B82DC3032E92A9EB0 +125D98A22C5466AF069BF72A9BFA052A8628FEC6A6AD0B711DFFEDE3AA2D7CE8 +34EA487038EF50F953B8B4471CBA6FC3C53877EC1BC94582B1123EDF44B4056A +30F49394BDE22CDAD7F01951C7013D26979277D18EFA594E8F4F2B5E615187D9 +39E842EC28461B9ABA52020A127D2CB9002A673A435B13C10602EEFDBBA6BD49 +9DDEAB9E68D655443A5C2492BA061C1391A51592BA8C353A6F6A0708E8860184 +2B5D031D2CAB87D618E9F6F7A0BF3F66B3FD5A25BB91F7F1F5F99CFF56EFF4FF +0A35C55658001ED2E97B26C869292F6274D433A5443179DBB8EE987196306348 +3F9E87C6422AFFDD30080C9AC4EE7FE5E2DCBFEE4974331F4AAE479FD8806D4D +9C2B85FC69EB0453AD827A1E767E5C484BDFBF5C8D6E2B3C96298B390F22D757 +802643A79D5E29CF3AEDF0E12CFBECA4663444FC87F2027571DBA9ECF688BF28 +FF0DDB3AEDBA0FB28447CB4B5D5205F40C1E7A525FD7373392EEFFD910AC82D0 +98E71660A1B3227C4A2592F3E853CA4CDF64DF19A52582E167234F4036FAAAB9 +5446BE102DE2BF43E82F0112C2A20F15A3F92C6571AC761665A905362C4F8BDF +AC8705519C99862CD9C0D75113C4AB5FBB83C880E46B82715B5628890D9103AD +A2329638B95D93C4DECDC5E6C588C9D5183EE6FC28FAF9825F02DCA567306D93 +5440987A81B51EE7291107A08F201C609FEF91A8F0587E8B13D4BAF74A5A6815 +DE9E4441F46AF8E1DDDFA2D611C889614040B144A5EC064DEE4638C04EAB2E37 +4CA8F50FB8C4D65BB296DCCCD39F1F554CFBED96670A91F515CA10EF896874BC +8EF48C6447752C70FF5A06F928DB55586354076773BFF7E94C4C3A7A1C1F421B +A9B4E3936EC26E0C19BBBFC90F021E877F54B62108F6DD1C7F6D5B8E64FC9362 +E173F01BF2904B7E5A08B3543611562C2714099DE7D4FA330DB148B560A9601F +42A84452811CE213DCE782A0D7809CFD954D6BC1EBF2BA4D1B18F50FA8174C96 +3E0120E266AD5DDB40B3F6798AC28CDC5C3C4BC34583528F5B5DC8A222B80B59 +A3A93DC715D061EC6915E6E6E21A25425C25E8747C60F170D61047108826F96F +7830E220C108B441B6EA3198E33C49BAD8D43086E49F5A2BC7958A1A8CD011C4 +49045193394696EC3DDD0BE084E8F2E9F0B9496F035C0DEC1CE11409DF566428 +D50043CFF5CDD1092F6E0807E660B68163BCA738E8D98FC6EE3F713164CD204C +0BA84FFF4F33F47BC31750B448603D7ADB9AE92FA91AEBBBEC0DCD66980E6955 +CEB425ED07115B24E40F53B29B9D840842EAC691B4F591F866DF27556474B485 +1C6F53DD72499847109B16C7093984A6B8487D4F3870DD517945CD90E648C1BB +8A6861E540FCF9D75B984B5009B5CC760CBE297042C240DD624111670B703388 +6FE6FC0E89C6B4C88F51DFF3913D0CC1FB4770C8CBEADD4B86393605C0B6C468 +83CA5594754411B6FC331EF56D7CD6D247FAE42E966583C29239A8F862348D29 +60B177984B6B957E733DB4D275015691D91443BBB13C2DA96097A29733CDB284 +42F89C85A7A743338C9DD3BBC4EE53F695E5163E6E1ABE5791ABF100B198B9B2 +1C21E2FA2FB4AFE7F9BB2D381260CDD3A2CC05BF513AA1E80ED69FA27BC5ED5A +21445BF00BC2F997B356D94AF13736C6D3B0613EB6F4CD96A685FEB672661DCA +206105EDC3CA07900676EB2FAB37F48D2E8207BDE1463894DA3C5B1488AC1EE9 +D39DAF691648048F5D7A384B8927F8DA2BE3602669F71D80686E427F395134E7 +7ADCC611BA91AD4B7A0237213C60CF2C905359C90795230344FC3C50A22BD44B +55B2044792509F50F5C21F53D9F9E9F063ADBED3AB99E2613B23334FE8DF70B4 +6120F2EDF69F50BE793EE145B9FF9C73179DE640FC2ACEB5C6617F918CEEB762 +4CD81E665B2E544864D13230B058717B207D3CC5D6647D5343DB4D0356082392 +871EFFA896631A7E0D6477942B632074A9A4EF7B09D4701B1639BAAB4E03A40E +9B54A7A4F845CD63F88831EBFA4FB847847CB98F3455CB5957F2E0A0F5623645 +DBB5C5564C7F8B117D6E27E65C0F3EA81AE67B4AE4B201E7C4FB0A8364FE53F5 +41A7CE8F834C2C4B322809B353A5E63BBA7BF3B7DC1A85EA700BD287C2BD3FC8 +2832B0BB4695FC937FF5EF06FCD87DCE6DE793C2B1EE10E6450352C17726155F +220D550B1759E15AB2C1D5968E52C8080CD280E99D3CCC0E80C2EF8BBFD96001 +A226FEED7311EFB4B67F424B557A877379A15BCA54780F0CD2CCA00400B9B39D +981C6B552AFD2506D1B23618FA9AE6D8143CD7198A8482CB416CCE62B992347F +337D505A4078713BBD91E5535BD58EF0351EBDCD749CC24D4AD39F8CECD7D6C8 +139756680A4C03A58B3374CEC658D30160AE4863A3938A891BB59CBE02BB451B +1BA4B2B6E68AB61DEB85F95E3C909B8B66E220B9F18280161C279F10F7093CDC +100A53D542F071CC0A5AF834DC1D18738F5DD62A5573E884E1FFD22BD810828A +1EA47F8218C15A2E97CBC609927DA3CC2B802EA4A0D7EB57627C135E3B065905 +F97597D818A2C5CC6F328AD25AD11FA50F1E4FE637980B7474D6F85A521892FB +72989AABEBE02A2D0EFE88A6F67AC29F5D8DDFEDAAF465C439983C6B84389FF7 +A6434462BEB7B07DBE4BBA61ACD4A60C55B5C0AAE527DE381DFECA2E6BAFDC8D +310364ECB42CAFF72BA93C067B2F02D1CA7C34AE7CDC46787A0E234C8BE8A928 +7A6F3DDE0338FAD532A9886E8E3525B85DD39364AB03EC4C0DD25DC179CC1989 +1BE232E387E857C78332D834679195E10F1E7B87B7966DA3B2238F53D1E13FE2 +8F55ED6A92A750C7250C9B91E29796621E7E9520373214D7DA81B2875A986D33 +80382AFF6DE1F829F048E57664D9C4ACE91E4684A51023943A4964AB5657D610 +3A5405EFD4CFD1EBA684243E15093C9667797BB47617B66054EE02C41FFEC45C +C1BAE8AD56B00D323FCB1D2744F061FA16E161988741A319B1564E04BA210996 +4F9F02A3268CABE450D166A763F5284954564A1C86B76544C5F5ACDFE0D758DB +865A1CFCF9FE8CD5F9C3B2998C56468FD52DF8EE60C6935A3D221EAEC7714E3B +301371C7DDA0B03A2416238F2B47BAD3A2C5021C886DF51C695AF9C87A864B48 +3BB3FE0B355EED5454B59B25A0D8A1B8CBD356C24F64D9B55E16C30C011365C9 +1E0380753BA3EDC0868788D5F50B9353D0227BCEE1BE36998B2622C0759BD66B +E4444250589F9CEDE766D8B940770CB6B89503E925B35C00CBEC2873D2DC4A29 +0823FB7A3717B69A7DEDBAAECC067949932728E89BEECAA91DE3AF9BF070B9C0 +30EEFA8C0A55C8388CAA2F0515915C98E67FA095BB98967D14B0DCAFA9622E4E +2E0EBFC768D80585ACDF28D8A5C2B6EE2FE7AAF62FFB90F569F84A0903996DF0 +C1D5723366C436E4088F3E2BB9B47F9789052A71CF5C49908CDC1DDA194BFB89 +14D7E3D7D4D72A150FD6FFD8303E9DE5A97A71B808B8BDF2AE466F31BF5D7A4A +44F81230BBE2B456A221E2F72A8B59F8FEA8D31F8A005A5BD93B9F49CFDC3DCC +CE2B67090460F632271C7157BDC2F05BC2749FD562FC28682A616A52D1B67654 +DF78B7843A9EC26A7DE2EB168F874904C2915B97534B2D4D9F74A9573A771D34 +9F7BC855E8F794621BF6AD471BCC347E2DF5F620F5C209E33A4CBF1EA85AEA87 +4492A77342DD33EF615FF34037D660B713C908786D9022051B825226545827A3 +2AD1B05D654DB6E6D261B4E8AF0933AD1F0FCFC7201E1A7C1B4199F160C38676 +21ABA2DDF1CEB655B3EC3226E0B122976EEA998F7A5241F062E54AD1DFD6ED26 +47C99A439E0AE95415059179867CDD3F0FF751F3141309F40E00A6C7C28433E4 +F649BCD5DAA64177580E05C495EE7BCBCC5FBF104DAF360CC2711386655B26F9 +D349D887EEB32ADE595241560FD5924A1745A22E6A01DB9C285EF14596EBFF0F +03F36EB2E0A7C3864F819EF7B0855121292D49482F046A55CD7271FE03F02EA5 +886864D9D8EC22A68C23089EAEFFF03DED6484D8C341861EF8B6FD3C5BDF5AC8 +352DA4E13A1E30D0CB71E090E9CFB9AB2CAFD0CA7C34AE7D8E3B2EB4666834BD +9CCD1AC2108348AFEF6071796F4BB2FFA4A67ED917E76A109FA2DC2A30D744A0 +9AE653A748C1D18FB52595D84E87F1C1FB6B2F32667FE203262C66627AEFFED3 +92B23861E5EB238BB4EDCE09DAE1C65BAFC198CDD1B45D42CDF93E16BB82D35F +821E9E49067E966AFAB2AB52928F8DD6359984071FC37AA652FB834A09E5BD93 +3AFAE161140E74C6531E413E8FBBFC42BFE8A464B71EB1D8CAA93B33D7BCC3B0 +47C7EEFCD3E9FCF26FF9441DD9BDE68D77AD7251C06BBB9A2103049E8827CAF0 +F26BEF33F656A690235DEEC623CC519AFA82DE2AE16FB99F780FD7D8290DA40B +9B604AEF36B529FD184239E7D50561A07428D28E51B55546590A1AEAD4B7F2B1 +AB8C5B9022C1FA03E33F8F409B24911AB8BFCF6EF4A8E415263C789F89063E71 +C0910DC20347469380B7FC1EEB87D4CED7F4A361E58B61C91AFCABA35C03F978 +B9FB5257C31657EE48504C355CE893FE3C553274C641DBC4004F5D5B879CC5ED +D3F21F867F6DF054127067DE86189F0B59A1B90FDABCDFEE61423609D888EEFD +F4A1367129962110C651D9481CEDDB8C5C2576A59AED64E95F7ED042AEAE2F7E +81AC0C408E593DC30DCAC334EDE9EE27D932B98F040DDCD195D6155607DD2038 +970EB78221A94C52BD4F0EAC65F1FC10E5DAA93C17266F351669CAE56F42B68C +6D01E1EA03AE554D63CE76D800FDD9CFD89F80A241EAEFF7EDFA41794EA25CE7 +97BD5028464D2CD45B53834B4AEF8BF0B9E7C6ECDEACEC887E8790A47A93F668 +A9095E5FA1116A122C0E5B74E2226C654D3187C6CFD8807917820423DA3EC1DE +AA020EEEF2280C44A15209EE2F3FC1776875308CEAD38571E7BF889F287E4594 +971A83605E0B4169D4A23EE790515223DF8724054EDAD905F57918FC0BC64F96 +514B4BF7DC9BA79E763C22C977FB6146B10D26FEA1BAA7BAF21312F78D1625A7 +8E242D743471DB5821408AB786E4A7EA9D35E30E85533C617689F95758FB2C7C +392E759C299DCCE36689686DE0C4DCE32649493650BA194A6208C5EAB670B170 +3F2C70BF0EF0E3BE2FB0A79224FF4ECECD6BB3388C6D06867A0E5E3DB93C1B2F +464C23E44D3132E7D4086E3B59B1D13F49EB4772DEDF8EDC4F603217233FB7BE +C13C28648E9AA51D53F11FB896839F97AEDD8834BCA53CB0021AE91FD8E95E2E +F8A094093AF556B9639F508A401542B06821FF9DE1A745FE9AC5CACD5E8E1053 +911442FC15CA5333751ABFE2C617D38FA1DC332BFEF44AE569DC631C93EC54D6 +261583A695F5A392867A57F59B741EFCD2DCFECBC55D1EA5F2317601C9DFE9ED +D1EA466210FFA905A8F85BD58B98991BEA58DFD1CDED5C9B086D42CCE632DADA +147941917B879139E016B0DDEB8446BA017FC8EE5A354533D667B0835F5D027D +C2D580C16B80B3D05CC92C0465CAE077729F0A15B2DAFC89DCD349B3F81D0516 +C65526EB5C10E45A8A85D716EE35FB9AB201FD7C89ADE5AD925A174169DA20FB +61E96C73A143DF964C20589EF24A0FCFE6195317F2FA0D2249C0D8E649C3D9AD +FF13332EA2E4C9CD36D8443EC8F027B61CEF92C6A6B72DD4ACBACC16E429A9A3 +F5F29C1631360E32F8C1C93ACB22F810B86D2969A7480F486F62F8488BEEC74C +2C1AF13BB92BC578E8CD30BEA6BC8CB68ED730F54CED0167605FA76AD7B7E88C +7AE7688E598F91C471BD65A542E96D64B1EAF19FB4F1234308C48C2DC86E2193 +11ABDB4C6189C6F201627C693691A86DD07FF55C30FDB3F72381E09C6080FD7C +9182762E5001E30F52A216E0B71E4D2D4E2F3B20F95DF3A11FDB2D2B5B5FAA66 +C46226D5E0C77066349770514E5675550FAC9394FB27CD2C2F974F1FD58C04A3 +1EF53A8AB3B2202CCA1CEFA66228E1480A0709436C44BD3319C40CF888AE4692 +5DBBB52B15CF3A518F627F672135A24D5DB9B2EBEF04C860AECF231EBB5A3BF5 +6DCCD5E72FE4B6DD29E896691868A7DE4120AD06AC573F5608B8449B38E71CA0 +EB5CDA3F942482EA7973661170F81DC88D54DD5B92323F46F833DFA757107E9E +F62A47CC50FAA1B68ED535C3E0E1073532A05ED339C8D70B3B9864808ABACD23 +AA95E9FDA43D54C66A675FA074E0A5B8777D3C07850A09087F36852B5351F35D +8BC4DDFCA35CF29CD5E3DE118A741FAC4DED36847F2E2C6CFE08669301722D94 +376F540982958074E7F1383C409652F6C99DA39FE90B38221E75BC1ECB93ABF6 +B00F410A0C5651DB418566AB350FDA1789AFD88286AF3BCB42B98386F7BC144B +02DEB8940D20A6B3062F0C4244EABC50923390064F1D027A8BACC3DE45156E56 +4A942D1B87F1C4A76B0D4D6801AE792CCAE3009BF25368B31B6AD5476FBD3BFF +9759EF463EF5E78E10B7BF64005B2ABE0E8813950A08A1808587A98E0021D0DD +751AD515E8278F1A0759E85D8A084490BBB0F8206484AA36388B1013643D3198 +3509078847BDAE08E76FA5BF3E3A73C323CE093DCC148E3C02C2DE1E26C94D5A +40EC8308ECB02FF7DD04EC1005A2A0DC74D4E587F10A3EF349E828F69FD38962 +2F0C74D5DAB3ED6CC9F97008ACCE74C086A503948DEF1AAF58FC8BEC703CD360 +D32098A56AC776B1BD08442052A2A4EF6C8798F7CDC102AF1A2009657254762A +0793F79A39DCD6ADBAA5EC84A7ED6018BBE727E5D477893D84F157074B24C13E +8D4881C7DF8ADC13EBA0D89745EF93B7616EC5355600BB0D2B630AABA3CF2946 +AFFD0B2B724EF0F28393F2034B2E69DA5061426805353EB4D80E20739BC4C510 +6C45275B8261DCBA10DE1D104B12F46ACD230977EE7D7D1D35D2814139E38C4B +CA6937CCFA653349B1EF64A98457F7B4B5D8F2978F16ECCEF7054905863AA46E +DD524CB33459220C71E9EFA7845A3A760A507B3D3ABC525B35930B613710A13D +098832C58EBBC8B0CA6AD516E6385792C59220331D0922A1F6F838A8DE13C337 +900462F952EABBDC2EB1FBF94A66186C177501453CD3FE3582073DD86F04406B +41B6AEB440DA475E13240445D46726A6D45185D56BAB8807CEC8A8F7CE1AD149 +7CE2E1BB5DE4E5B9592241DD136479A65905FD0062C91DFF7349874BFEA5D9EA +2F610ADB9AE7757B2307A1BB9D6797D9F9C4844A59841C7C7682105E23A374BC +A91885E7410F56F60C29AB8B417E2D6092F8BB70A2DD5DEDD4BA1077D7CC62FD +EA43428C6F79C332342E15F75B08A1ED360B3511F823E75AD49BA7AE63B19238 +2AFE8FAC2715E2FDC895E95036D23127557837506A3B542B0E4651CE2B89C252 +31EE8ADC26E2C04E8E30A9CA12F066CE01953BE7867171FF6C7E834742C36C3B +58E74E4B482CB85FD4D24DB03D753F260A585D552CDC9E1941446F2F5B45FF24 +2DA4932B973139F328E7E92828B900BFD398B6F41DAA0D6861C66AA7F5E3299C +87A5925CE4CDE2C7694669121D56DFF4EC92C1FBE60373DD5B9B737C0BB8A578 +4518676E1133343D9FE749AB039FA291993DF287BE65C129D7EE25EA00FE217B +E0B436583B1E4796C4587DF29768E6F31E94A1C96D41BCA87F4237BFA623061C +6A4784D911FB585269B20E630978C45EE33E8DF3662840E32409951CADA934F8 +896AA60373B50E7066DE7A307BF33C3021A3C3D207F5AE931B852FECCE5E9CC4 +B52E97089790D08FFEEA7D143DCC7F91911D746C4C8EBC0A4E6AC3CF08AC8654 +8A8FD6D788751B41F348377A602A2D5CEE4A409E83188D1E6C3EA3AE935126E7 +2E876B043B371F75F8E4BC40BA7DA261FA62DFB90DA95B5899C975CDE5490EF2 +F576462865F240BF4F32B0CED5E681E7D26B42AD5AE0C89A0DF5B059DF6A74C4 +0DB09A618244F766C0C4A50ED8374E602D71EEF218C643CDE238637CC8580098 +961C26654E803941A524482DC34549417EE3654551A4CDA36CC832791E3977BD +CB2A5C1D499A9EB93CA7EF20C63A44A49E85FC7776011BFAA8CD96CF4D3B0B2C +A52A8B48F33D055173A9D2048CEC24861DDB33964D52FE657D1866580BE21248 +5E606CE3A72385C65246A71EE837267048643EB234EA2AC527C56B567F8A37A5 +6425BC75F9D0D8FDAA784F36F0573D00544F9FD2AF5EE41814285EDEC18B272C +7113B1118FD1A281E49F613CFABAB1BAC778774020E88A93AE4E6C759C635AB6 +3EEDEE81F75D8B5CEBABA3F0A82BCA994539B138B2DA3A9C71F38F213C2BD714 +3FEB9090CCFA94F786F228FEDC4AEA160F30F0066A8CB5D02A474E76AE513714 +392BA8EB3203167CA262478D768046E0B65CBD4ADC7C04638D44322502D57808 +2EA11C9E44FED238FD2987BCA6781201BAAE39E48A51297A1E2DA99EB13C1D43 +69BC5BD47C3240B0D4A30AC8AB541BB4E4A6D17CCC27BD6E9EFBCBAD94F5C832 +F4DB9037249EDE4DCE4033DE9535C58B915E7A0F7CBF0C84EA4C5D588BADEA33 +8864B00DDE2CBF21C9A588368592395642A3444EDEF07CC1CB0DFD71613279E9 +4D3B027BA5CC38962B881D5297CE70C6DE113221DB89E3E9167C20AC3098D56C +86334FA4907B766C764304E13A1028EA4D46E87BF6228EEECEE0C6C8D06F923D +93FEEB380E5EC84CCD6F18F660392840CBA6254D5EC3D10E65330FF13B7DFA16 +B891F0C7786819BBA5C4C7B1AD1EBF980096EC4AF841E416430F8B4405B44ACC +F825FE6D72CA54E0ED3AF9CECFD3F6B4CB69C2BCFC0096D1AB863C95186293B6 +6A13579D06F9DC0544F6F52C2ED2C7799D8B58E671DB2B03727B4DBB2660BE25 +ED68737259F2DC1C65CCFBDEAED491A64636BDEE7FC733A6E5D42CAB2CD201E4 +D12D26A5F66F9082806066E40AC38CFC0E116458FF9A722327A7A7082CE7C3D8 +0A0B26AB9BB8BF1CDE1E8C0AC9B9CF49F1E30D8B2F290EBBC3B35D92E472849B +D10612A89E2416964FB174E3C63454AFB214A8944B2299D75F55E0464CE58A68 +E505C79C9D23A90F394AF9386AFA7ABA4735858B1D8BB2CE28B40D1D7077AD01 +57A99D63C2FDBACECDD9132B6AD648ED939F60C14754E46656F81E403BB83411 +7433A87CF510BFEB8265F105FDD80745B06A5D8824138860F2CCA4D8CE239CCD +799C77C622E7070915B6B6722313742AA5B448728590D83709A906BA60610EF6 +6BFC081B63CF41FED39B9F10988BE7D061F540BC39E8A89A8694343D16BD0814 +738B16958633C831D7269859D7DD7BCEF8263F8D79870E1F7B13A052586B752E +80F9C0A541B0EE151D55D12AFF4E5E538A1793B2CED15A95E208936E3C164881 +7802D8B672959DEDD82892CBB9BFFABE9C4FE82827DB02E829A1CB209D074FE5 +CD1456EC6AEBE1BE8B14E43A5030CEC01BCAA788425DAD1E765A6126A3204008 +7DDCFDA9E4303714FB0456F4E6BDF6104293B3165DE23A0AFE82746D9D4DC6DF +6C702FB74024115A1A1C4C570FC316B7013ABAA951FA8FB420D9F28377D523E4 +C466D6CE26330E33BD9CC8542065F4B90D97B797BE3F9C2DB45BC1052BD25521 +9F40BA6C5335566D34707973CD752AEB60E5F3D33A1CFCF0F13E77B2F29BE486 +23E0DCA16B183E4CFCEE63E784ADF378AEB696E2ED79F39EF4099F7B0CB83C77 +4078BA518CDBAC643CFB2DC9F027E3024A7D2B26E7A0F2E23D6A32B7DB867696 +5B99D1D6AFEA28639DC58FAE484655AFCFE3BE29B731825142A170A048E03759 +7A5222B815D151305D06DF62507A03C8CC24DEA6D4AECA6D2D295D561219AFBF +ABAE4AF384BBD4491AF155C0732E1678EC1BEA97CAFFD3D5873E97E90FB8BA98 +B096196F9EF10BAAABDFAB15881C23A845D86D647FED874F200D7AF03E8FF7C8 +2D935996CC61CA174D909F303F644EB7EAC69CFEF3094684F54D8E3F2B2F2E94 +C0E57BC2F9E7D0E7D3B31313A085FCC94694907EFA919FFB035784EC1C244B2D +0ACE08BA9C0D79B5D0B0F246953CF86F9B02C4B4AC6576100D9837907A507B58 +0C04CAE21D61E7C84AD1305659513FDA636875B296E676B3565C0C7C21B73866 +8BE2BCE37C700FA4B723142BB07448E94484CC7720CBC954B8AE4D2E857EC306 +6548CAF4B2D5E376BBF13F2B7BF1104F55B61D47BBA718C835A55CE439B9C0E4 +6341D8987899B5868AE6621CE686DC7C8015C3BEDE1F5BDFC308FC7894056D90 +F65DF04C25E7533416E220A43B842E408E93F96F84AC4A41FE2065E9E42F6810 +8010D8B6F1695BA3F0F17B47943D9AE4397FAD414340BABDBB406DFC66A98CD3 +19966A2E0678E945BB7DC1A7AB9D7A939A6796A9EF6011A37DE915601793CB43 +2E42A37B509DA40FF4F3588C0B07C70933B4460D2CCF78ADDD53E9F2360B622C +7E2A7C62FC08D44C4298BEC852B589E7A743FBAB7AE1FA4E22F78AEE38705CC2 +5B0507264475EF01948C33B1107DD0A92D85891A147594BF51E3F40487D51DC2 +4E7DBFC46B0EDEB8D0698FCC4AB7153DDD2E2299012D1F8F686B4E63E117C797 +10C9D6281A746580D5975022825F24E603FB619F5C8FA8919C38C81B6456045C +7936A465F8F8CE24AEB65AF50F530676B3BE7CF1465D8DFA46EAE6ABE8AE04CC +70C32DA13B7FDDC0D4E82D0E147E2CE841C6CEFF34D37B2FD5FF547653615819 +562E4B8FDF0F742E8344DC215505D9C6CC8C1D9475EF874F38F0EA3C0427C1D4 +DC800E478F3B30DAB35F0CF85BA430039B98C4324470E41B96B40C8B75531C5B +B24D2C77094A41115C04BEA811A5B8418E799E0E20C0B0ED4A22CFCEF242190E +859B21325F4FC0478BE810D72F8EC17BAAB99F2A05ABDB1F25687D88B2229098 +16F7710309114F83D27DE4C6A2AAD8CF9196E046D6C693F7C55C4FC3E13DD9AD +F2C8B9E30F950CD211D7065069E1DDC58C942D575B262D3A0A485E346A6A1F4B +93A433A830F19419D5B4DB6D441383C850C04BC1F7AD865A80130DDA398BFE91 +76414C3C513E93573B73BBD1CE21DC837FDDD210C9E299E81AA5008E80F17D4C +EF4CF23EE37B4AF418E89C0286D20321182DB7F30A6C846995983C6D5A1EC0A9 +616186D7096B27D367963FB1E51CC4235BDAE7D19BBE9FABA1036623C2076DE8 +A57AE86D4C1CB850E550A931F6B7DA34ECC4D8241852F5106C2C0DF4DD065B30 +73693F712FF1185B98490CF933BF01F8100C7D77AB60B86FED13321D60B2257B +CF364A89657845A715389D666C4BD86EFCE36D3E63C189185E4F4A5629858A0F +E142D4FB2D0DC0A9D1D82BA88795B315402BB9C342CAA660EEB890182ED0B25B +3D477F1569F4961EEA099BB322AAC7801AA4E9E2567D0E8E7B18465569B08B19 +376CE9DD3AF4B411B32F07FD74C1DD425D5F7B2684703D6EB4098F2B9DB494DD +4729C5FE4CD7FF9EE0FFBE3A6FA3AD941D1934CC5B811C1D74E6FCEBC1B407AC +FE206160189F3A557C15B48C493A66DF8903EFF673ED1B3B565B618E8DF8C9BC +80D9DE7627CEEAFCF574E44AA99F653C756B8AD4D6A1205C61581B94D0E5C680 +08E7F38E9C956AD88E3F49773F653633BB7C65EDA74483032F35760A50AACBD3 +FFF4305A23323B471F62FB6AC4E05A3D4386FDDE01220DAC3A77015E01A64A9A +FD3FED80C9133A889737E359587159DE92C0BB6AC93A96AFDB3CB6B7A85F3B22 +4D5E53D1BD658449198F4259592D43277ACD02DA61A0F02C44E1F470CB41BFA7 +FDDA7E7246E5E58D0D2FFCB1DB3DD42DFE3CE783D1708C7BF5A80A4D8482C0B0 +36932AAF1C9302528BB0438487D975076E944A3B38B33BD33DDB8FF1353F867D +51180536097DF8031557855BFA8E3A3C5366737695E1EBA98312CB73C01CCBE3 +04E383373E8E8BB90F905CB962437E665B677572024CD152A6C6A9C873A1AF9A +C48FA804111F47A7FF26A48784DDE64564082975EF36CABDBADB32813135C5E2 +D9759FE2166A6618E27E035AE948CC8AAA0CFA5FFF50BD4E4678E403E6F0A3C3 +6C0A25A0E5B9ABED8B714B0D9BFA132918A494C09B508316CCBA1D65A12DAD5C +77F62B2A22A715B423C172DA1E5EE85C79F08D9C6151FE35354FC833009B4B08 +9FE573436576782173E57646F6D154E1491F8635828D6AACA0AB5B3044B29D7C +B004560DC4111C30E52E05FA5C70827A6B486B3A99FD372A2052474FCB79DD8C +CD30404DA620B55CB6242D568B23185147BF690BC8008DACCAD06DC8FC33F669 +993B89FA03CD541B82361ED272CC9D3F73DFB689C64AFAB2A52EE1AE6D409631 +01C3759E3FE2FF709C195AAFC43197EBA626D6979ABA6796E34848F4AAE65067 +97243CE863A7A0AFB94B9D9F6E1C35358F21B028FE3DDE26497873E0E7BB4B8D +F7EFA4D3A58D496BE43E06E8FAE4FBFB0CE77670FD26DC47E903DF1ED1E2EED7 +F66E9C2E035BAFF257955D45C6BB2E146A2C9D5E8957CAD657DDF6F694C96ACB +1D4274A97FE7030AC64FA5088DEA487712FB4F288608A155A16F305286CA9BAE +7671E1E33C5A2DA16FF8FD8A300C7F8EB8EE628196F6E06A763DC62A71C517ED +6C9316B06718F9A00B0CADC44BF5997CE3193C125662AE4043BEEA2F8A58DDB1 +B5402E79CCE6900458E987A0BD5F328425CE9E5A667BD4F46B1CBD636A6D6F52 +A4C1A71ED3FF9BA9E019CBE6BEAC62FDA9830E43E5DF9487247DFA6B2D634007 +101E0CC34A6CE2BD76838FD6A6EA50A1A30C452EB77B9EB60B07F98BD24EFE3B +6AC13810751B86C3E367CFDCAEB0D3DAC7E6597FF2E4C1CD6ABA5FD5688E493B +8AF306880E9E3C3FB3B4CD378C9E3EBB542B6B5A71F75E563261A91EDC7B876B +727E4391201736C6A01FCDAFEEAA12785826C8CDA673B3E0D71DF53153E40B4B +53950A64D498E9D256D4E974741175CCBF59B9168DA4518D6EDC3B29B9F6F048 +5A53FCD2A02FEBC524BDECE64653BBC1C3F42205561F86160B37994B755375CA +A46174C5670F3C0EEC77ADBC14A794403A4B12F44190FE38F9903D1871134F22 +D769925F2CEE2C58BF09D30DFE7370A22488C4D8C942E9B762918A10AA5B6606 +D22C509B803951B77DEEBF6FDBD5DF2027084721FBA234ABA9B439C96CF1AEAF +1CDCF305EEA53B6B85A98F87A0460AE34B54431AC738B5D6F08F28A42F00FD8B +8BABCC540528BAE567C1FAC14A980ACA246B9E096B1290AB80EDB2AF284AB813 +9CC9FA62AFF9AB8DFD34507821CA845A6ECE10F9F2304B063B5829CD517D0003 +0B56A39A2F4B0AC0B7CA2879C7025941B97B4C445FD5D471C87E5DA100B47019 +3B0153BF229D02B96FF771FEF07F0920B4F1CDBAC5CBB4AF4E9C5A3F48C513CE +87238764DF45F01A73E81684803AE4164E855D334501EAE2AAD9663E1AC07CE1 +6D7644C6242C9A82F1A6581FE3031CD50D2CD02286848C1195741B283A9FB0C1 +ED82EEAB344694438EB610B6631EFC2DB3558EA6159D5B72D430E3F63F8515E8 +CC9B6DF1FC086BCD795BDEFD46F06F85F8F7F0F24C5C7B56EFCFD7B09024376E +DC6AF248BE3461FB52493FDE9F0F70C3AF3F0766D076E515171C2F869C6F22CB +215CA00DB6AE9B0761E80CA9AF3A745BB7599D2677D826398D1582D34ED3E336 +C37C3B629A900791A454B2DDB64F00DFF27D2E82B730CB54E6C6723B777C789B +328C5149D6F75D36B14BF2B3501855BB0BED3176DDF7A6DC75A2338B216E0C0F +3B004E69EB845CF2D3A8EA1A84268366BA6211741CD6B3D6A1F4EFC52081D0CF +B7072442CCE7A399CE82E36302C4CDA6787DCD0412239F10032065AC85BD6A72 +83FB3C8B9FC32420D5E15131FAB00EFE953F03F60C62F89DED9D2C58BA111D0E +764230E78CDD93F350197FED21E4A8C9661CCB6F311B14EE0DB9566167357F3F +551542D6B20FB49BA741A8897C9D97F2983763DF830B1039FB42EDEEE0894F79 +C662CD24116BACAAA11C80E0CF806C4D4DCE5CC7ACDD1C636A2316C9449358C4 +541F674D44EAA232B89479B1F7C956AED934E7792A55E72326B76A55250954B4 +36D4FC194500458A331CE56C0D4024F47345210AC0419C46809DD240ED2933CE +F2293CF1321F5292D801EAE93B3039E1CAD8EA3042D23B28C6232EB90FABE0C2 +EEDD2534C460EF846027C977EDBCBA0EA8738801AE5661F8D5C013700AB0E32A +3072622D0E4F77F4B9576213835A261C444083D422EB4DF636B4896FB6DE36A8 +D468A72466B6F670E03DC0325DEEAE27EEAB882E3EC22DA4434EB3A6BAB1AB9A +4E3424C9206093B490363A8D51FA4A3267106B77ABCA10E84D873DC9E0D7CA77 +255CC72639AEE842862094702CABF8001E9A2E1C042246E0C3453DA8D8A6DA5A +71381E22A3E8601E4A1A67A4600C314631CC63F27B1050DF22091040A9217EE1 +EE461EA8387ED0341C763BC439D14352BBA92DC677270412992735440DBEAC5C +8302CD00D4988B3702E6599AFC60CF94CEDA6F971E36891926763FAA13FC126A +CCA88F7F036E826DA4DF7DD850017C148B0DF30FA70C351BC5DDCDAB607B0914 +F27E32CF1309B11623C7689CE9E8389F853900405F011CBD0B7CDB922DDEB876 +5EBC8A9F9153FF2C0646B012492A2B6D47D5C12C0DB129933361203CF719A354 +1336EC9F78E939F10B47B9D2915E4DA7F56082F35DE6B27CE3CDFE1E23669B6A +804E0EF3937AFF6AAF329BFB5CB9417069BBA2CD4C71CC0DC4591972BD3BF123 +7313B0DD3D38ADAF22E079CFE64A22D17B4FA94CC2166C8E79C0AC3EF8329B10 +929CB099255447961775F26C2FD498DDC2D44A08A7457B62F6DF44B3686541BD +4CA358B7B7E4F6FDB27F8FF641653FF5596C031D2DB937848D24844FAF8D4D9E +197532B4522F00F0E4E860892845E9A424E83696BC630162D8A9FA18CE310075 +222B640E5A334D9D374A9C1B6CDDF8980251DE855CA28A20EA23A6690DA9FA1B +CB9CB92283EBD99F9C84816B405A1B5F4BAE2265915EDB316D71D520FC32214E +C3364A361F94B204F6246256066EA8F99AE3C3AF8E4111ED28A7A1D0F872A4CF +8A01A3DF5F8A5494CC64D563C13B89A0C6C81DA235BAD7E5CF45E6AB6B64673A +4B2BB9D61CA3853D1A12980E1F8C1056A685597336B3B5DED072ABE18B2E416C +9DC2616A521EC96EE0E2879C7DB8FC2366734D418D84E3BD8918E003703F9490 +063DC6309FE39F75063BDA079AFDF69144FA6CB761EA7C01FF32828FD29E0E4C +66008487A00416133D280751D8F7608C718AC1B8E3DC476C7D13DD7D84E7F490 +AE794FCF017386EB0C9E43995B844F5511783025E39C0FADB3E69AB5682A9863 +8FB3E3B137315451B7CE458F52C79FD414D0EEC24DB7FE12336F91F93A9D1BAD +A09028A37ACEC4F6406440DFCC10D2A8CC7018DCB05B7FC67CEFDF47B70F1FFA +02B4CF200D0583BEFE4FA720A4F2C59199FA87AD87318C5D0BD0E2965EB871C8 +9325D972E78C73115378CDFF17D1FCE2E202FD8CB8064D294B2EE551A92F2551 +6D619439B5320F36BF2195CCDD8F1D84C0224FF04A56B497EADE63816E6801ED +9647A1D923F4D8F64B54F72E49E06007AE64FA826612A066A5DDB19E3C8EABCE +6B79D2DEB915E9D6002921DE0591ECF553A54B3D684582971B1D5F2641F62F59 +50640E9004C50D7751B3A7BC1FB4ED080FCB5823AEF1C80DF4A7F277948F8739 +C3881932D7BB1B31634CF1DE88FF14C95F2C94645715DF7E4794ECA34C7FEF59 +513E25F5E99057361E6C0B55F06C0408B3CBEDE7AB35FCFA713D24C5F30F9291 +54B75D2B8471EEF982A1086F10E236CC790E9DDC754A43988DEE351432AEADF3 +328894C869FC90E576FB5CA70CCAEF2F6E58F28C9B4741E492173F01515783A8 +2F9594193729CD7EFFCD4E6FB249D8AD9098A18DBCC84891191715CA8E790A4E +A50611B2A28F4EC82FA7DC6B30F187F70CABB88904DF5E9696F468A39FE29086 +EAAD9368C42BC8029034ABE0C1056627D32151E968A0B53C977307CE20608AD3 +39EB1BBDD78D698C13C18D30A7721FD42B636DE6F85DE6A31A9D94438169375E +7A1AD1C77FD2BB690B583EFB63BAF816E9E65777AF550C7D50C11C86874906B9 +27CFC5D78AC61C4AD0B4757C5B87B174333112271145294F8928BE5F79706933 +CF787394088DC50A1C1FC1B6E2E3C22F6419B8E725B4B50F952C889CFEFF997B +C03F5ADE00D7107111FF498E35DD8A21B4CC4B51ABE826993B0B6713BF014760 +FE4DB723ADE963F082357582F265FC249F6AD04833993851C7D7CFC7B93A4E5E +69B5AE710856D549FE44F643007B5E320B437EF4BB5A8D8F42C1DB3DD04427F3 +3310C1CC5A1C8ACA9B16161C56D23D287EA38EFECC082568CDE112DB488B188F +241145CEF155783F0E9DD7FDED715EC8B5C0264F71174957005BC89679369CFB +88CFD92119D251D8B543C01253BECDCAB35D0AB7E23F3C810DFD51551B4A56F7 +0A130E99D24B6D7256DDA51732791FEBD215CF703EB94BC8E5F099936E0A1F5E +7187AC71864EDB3588ABBBDC4BE31D844E121D9F7D77988762289CCCA59D212A +FB5FEDA9288408070E17C82A44B7D2B39C77E04EE3C9545F672C55D0F35981BB +0DD3D631A97B8ACFFBC36BC82FF6098F9B382291735614665F429F825FF2B1CA +CD6C0529E6305E2F54C636D28D5A9EFEC81EAD3F1751F33AA2A50EA76711252F +E89F4D1BBC328C4E61C441351CCF0C0F5CD81F2C915D43EF79B9EB9A3DC900EF +7CE385439E18F3EF1D43FA8132E626EC3E76540E2635666314842D56E4E245EB +72E6686099B4D2EBC2CC2AACC80EFB168A495A7082CDB56CFDCFAFCE5F11F4F1 +FB841F9962A9B6D385091FFABA3DBCA9008CCC43B81FB90A7CD79EE4846358AD +DB87DD0D883A0A7F1B33F4B5AC49AE43A55038A5A09BB2FF6B9FC3A9D05019AC +3F9612DA0DE56FC08908E76152713DAFE2D2EEE6C4022EF69E25A4054360DD18 +0FE3DA4B0B8B9D0909F6610561D84B3BA6153982D70DD7ACCB3F377166950819 +2DB878B63680A7D5E02661F466CF0641AD798A9F1BCF9CE79EC62CC2255D0AF0 +50D364BC85E68FABDF69D90B75A9145D8A011C9754F24F6CDAB27306DC06E78B +0D3738CD2FB5B50664F8A8C273D16D79FE022A4957E3D3D80C06EFA0CB8752A1 +16E808FE4D91F06F6E37BEE0391123815BCE47599DD251001EEB9EFC109E956F +662B8FB56E9460F28F2041234F3B1A9CF4839FE09188F9FA8CC674CDAC21D0DA +ABEEAB41C53F8F01EB4BFB82F8B3488BC7169A56AF8C2D97392FB91AE99C6AF7 +4D232ECD2A7EB313AA87E730E63943AE843CBC96A9075866378E36C838510892 +3108785C1400E0D917F6FB20631AD5BCF50726AA48B71260B49E16EAC7B11D29 +B7A6CF6CF90F83EE68E84E805F061B260922F445A6C767191980052F65F31527 +8F69FCF494341DF91E7143A90525F4FF719E912E5C1BA5A7C86A1543C0F33EB7 +A1144C13D048E0E7F5FCF51A941F636BD45E44BE2CE3ACFF4F448EB80E59742A +D37B4190170EEEA63BFB6E318111F4F12A8EE9A0844D4B1AAC75567A6F81A967 +A7B63438EDE3C9226F5468C1FE9C69DAB57A9E3868C872FD75C32B7E55518421 +13B88CF2FFECC694D26D9F648E8E5E9092ECC84018827851DFE9617A4E1FAFB2 +597B0877D476B0280FCA4A98B42273CD4C56104FD81B59BFD4EE60A439C6A72F +7323BAB0482B7A781C2CCA820578D9C127A6CAE468BFAFAD32370002934DB907 +4990468D8E086CD6369FBBFC201C00C10DCDC5958311EC3C94EB5773CD217CFC +46B48E317315806E7A63271C336CA778D944864DD906EF26C30B95F0BC12C02A +F65E8CD63B601DF3CEF3B82B2D5290B5690D4C6A10C65C2E7BED77FC223B3E79 +45BD45C399EE3C705F14CF23C20D4077A99270F9824E7B4E6E9B56B65268772C +A9E605069014D5B19104D2D194E80E12001DFAAED3E2D1DF125E4370202A7E9A +FE7CD8699C2ECDB856CB23EBCEC0A2DF883154EA68D7555F700247BB6D6122F6 +F407C9588A2ED8A1747E3D758ED413E174D35576C905EA092EDB82985BA93787 +FA25283F942A9D216E0F488F07A9B2A2E22FFACB54A1FD7A43EF3418A4EE611F +026CB386543D9DF5D43BD227F67A195635612C5E8BDF830D3886899FABC82694 +F951585830C7CD15E5B82C2D2549607D83DD6B243782C73D522D9B83632BCCE4 +3458A6735481077DF653B0863A09EA38B0A85E58730B56D5DA3B8788570F86AC +3BC6AABC424DC0EEB6B731682C4324604950FFFE0E8432BE9AF23ACC0D5187DA +632D96388C4D1221564DB31CF6E5B271CFD0C115F158728D742DC5857BCC0988 +9B312024A29CEDEF1133B1BB38596F4EA299B964AD83B837601512B589051C08 +82A19465D11FD05C8B85561AF5A96CCE3D7DFC113032FF2F0BC382EAA05BB3BF +672CD7CA0FF15859424CA21188FC721D2FAAA64FC9765F4284C2D74FD1D7F93D +19FDE5B1641D790473D37DA576833ECC96FFF635D71C76542CD66175321B0796 +8EEB90A2A9C812BEDB5D257ED858353DBB326CED297736E65CB7613AAF688EF0 +B082D9BD02C9F626EEC65AECFBBC023CED23359AA349CEE94A1A3280E395919E +342110307B41117C9E33AFD565296CB8997A67FF71D2929F6526B5D709CEB379 +E927CA67C1D3BD127D51888EFE008BE5C4F7CB3EB600689935BAC1F35E82B237 +047490B4294D0882E8F016E6BA70818548E4ADD19A3F58148285D99E6C5457D9 +2D6153797596D4F5F100D01D95201E61F1A2566E21A74EEBE4C8E5A3C912DC47 +73B56F716A942AD17CA9A57637BFBC09183B8155BC69B131511124179E6989C7 +6762DC1DA3005DC28BD76FB93C62AC37D2B72630C821713B4DDC8A7D73289927 +B840252750485AD870028E37A3E117CA365ED6596ADEB200D1987F0051392B49 +01BDA6FC7B22AC7EED8BC19B73EF2729A9188A9D4F771EFA5A5C449FA3FD8626 +1D6D93B75CE306282F4C821422FBE548346865AC8433C09FD33C12799054722F +354B348B2E20BDF1DB0483CF989312495F7BE933093ECA2B698FC767584E7DBF +495F804B1A18C1E50172EEFA0125EFB17508EDB31F081A02005B6B96EB287009 +5E3736195266353222A960E71D0E0388F1B8B2B375ABD81350A468412650497B +710FB2AFF23D9A6B41502F16E29E17FCE2AF39BC8856764EAC8DF171032C99A0 +45904ABC14BF78F455C1727D1780BADA68A216BF260C08D11A5E7BD0C995046C +28D93B6BC3FFF425915E14F0E1CED3FB8FDAE10ECD70B51C5E433D1D88A96FF0 +CAC95918FAEA5BD09AF4D17FC1D4B56E2EB23BBFA7FFD82F1AB556773C99E273 +9F0CD35AF080215AA906E7D640BD689137D2EFDDE760FA2D15A4FA00A9142713 +5F5939DDE8C4BFFAC802EBCE1CA70607A4DFA3E47414A387AEE4425AAE6B7F90 +7BFC4ECF8D9E5F39DA0C89B1245672AAAE9E199DE00830E0818CB5A8E51A3D19 +F9286F92906F9329459A31947F6E4F01A4F7F9E8276323F18E314D2F1893A15D +E72634837FF30D9CF7C19C2ED62E4FF40F541DA08230E3B968B1811DD20B3308 +93A5597389FC80917A63B84D0A0206E879757FDDCE6F7DCCCBA09DF0B2D3EDEF +8EA4027C3BE49752F4B0DD4513C1F1A45F3C2B4C5254F2E30389423206354D3C +8F411DFB905179DBC2DBB62CED5E49DCADD40882EA2296E7F29BF3FF641724AB +440EF162F0016231D05085C763327B87D36CEB670464869C1CF5961067AB2A20 +C98F8D64B2ACB65E911A885A5A0E0DCA0C2555F046FEDF4F1E22FA5A7A654E85 +B758500AC9FBEEF5316057BF93D55F803CC944988D0EFA641E11E34C6643C195 +450205F366C31177567C97AE0CD330A948465C5BEDB75E02907A42039E2387C6 +B282281D5FE8EF305BCE759EBBFA8B0CCAD64AB1D837D0CEB151E872F1B6D1D2 +73A5FAE6F0D5F17A655F09D464727CC34541F085069671787F7A7E6A57D1168B +B5B11898C6816FBC86574536690B86872104C916D307BD2694366679037E2E5D +95D83A3BFB5960FBD7EB4C7D695C29A4AB69B82058919AFE9F1FE2476BB48DD9 +DBBB2D782CE42EEA1107408ADF4AEE4C346FAAAF6637118EB7481466C5D91886 +6647B0D898E1ECA305BD9722868F8D4BE14A99DAC1317F85E14C77D43141E358 +06D8F53E7327D1517E274F8C4F1055995048D445C799555409FBA8A4A9803CB8 +F91353323A75F94BEC007CBF778DF2DD83F93235008A1E8513BADECF4D704CBB +68B41442FEE50AD93558EC894DCD299DDFEFB2EA88CB9914BA720FB6A8D2B3F1 +CC1E38945633A49E97DB775B7407FE3C37C26DE42F00ACD48A95969761A9CAD7 +3ED6AFDD25DD2663455B287B41BF3991FF908AF26E7BEF9F9EAE46025AA49090 +3A84CDB5B45686C1B31E95D45E9E69B2316E7E49A8C617E1FE0CDC22E425DEF5 +1A6D1333F816516AAC76111BEC9DBFFCA43131655051552934EDC38E5AE40C7B +94D4E43A8B536E54636C252F6CD7373B0AB6CFFA03BDA7F2991B89FD4A423978 +14FE306852A7F278AB095C2DC7952F3AC8BB680EB85D7D7472D802721C294C83 +52C86EB93A045853E276DAAAFB58A993162E334B862449DEA21F505DBB881B27 +E7E2C3EB501BEA65BF9525CFAEA54F53951082E7F18567D9AF69A47DF33A7843 +2B68DF550DAB43698EABBC18C1D484B9F92F68AAF7DBEB3AC43889A0F6F5CDDF +39FCC91D0110E57FEBDA30E1A082E2F4E5FD008E8CFE7BEBE0DFAE1E214CF2B4 +ADA809F2B8A69ED70CEC5FF515D4CE5E0E992BB68CA10E365526B409C507C4F3 +B27513AEC8A581A5A88C812BBB542200A44B7C497EA861E3318C37A5790732B8 +7B47BC881F9719B1216F8E92256042E3E88F845BA0F969052638E2C045ED6934 +1667E2435157FF9A5C1C3B10760CE9FEC0B997B5FA8E026BF76FAA8CEFE9D206 +2E6FA69675C7EDC4D9A0662201CA6059A8E6E0A99A7A37B45EF94D8345CF5005 +DB1F0CFD899138F6F6EB1A073926511210F555E20F6549F6462FDCBC951B3A63 +7585C272A47224C440B5245F807C5BD56E4A9F8EB9A605AA46AB25C2F0B66713 +53334D9D374A9C1B6CD68DE10821422FA8A4069C04FED8B75174F19BF7DF38EA +B8D28DC13B1D0B8BD9DB87D758EDEECC5C179152FA0C531F99019F2761DF7FB9 +ECA6E6266E545CB32F9659730A7C2E3BE4899B26708260E6C16A3DA944955292 +D3F39606B0B5F17934CA55E76DC5E2971F40409841CD2F9CEF874AD07607D147 +12EBB9EE70ED60B206B0EF23020849EE3F88DD2D71F5492DCC475908017EBF19 +BBBA158F6FA410A01D3A7B5856D336BC725FFE059F35904059BE7C0F2FD32ADF +61137C07972BA78EF095252B62AACDE583BCF9F8D50F813095C5B91657D54E71 +73A4563468B092CFA0FF54BEFCEE75EF89EE27E94EB63954352ECE921EF8F946 +4FED905528CD9E2F4966E39F4326BEB59B2DD560FBDA0EE9D4CE163AA3D727DD +B72E215267AB57472A6A69225B260DC1176F69BB7F631F8806444D929D2782D1 +D4F69B7FEA78C18169E756D5333516D5810EF2ED520BD948B3E79FA423AD5FE3 +047BE28606DEC14B7C6F2922254815127EC4F53E0F37668F77C77DC95EF78A6F +E8D4645AC3BCDA9677F2DD5400683904CDA81AB2EE2FC4CA210D72A8BDB2F98E +80B98AC668611A1EC387380A7E23F30F339DCDE1A97252B0DB31369FD69633B9 +E7981956B20591A8F7BE191669B5DBF2B4D1C85BCB0B963D7A16D3AB4135AE2B +913C9E27F26166C7361E90A109749BFA119ABC9D3AB61FEF58D4724EC22C1AA7 +FF31FB66C95D6DBB7876D3048E189096A08F113BB8D768DFD7BD52B49E242C45 +89A8D3DBCE2562757581C7067558852427412B1F5A68BB86DED52CB09190BA47 +87250787D93ADD06CE03607E16148ABB1C5AB512601ED754E7721AD5F383D687 +557793474490BB8D37A86E9E8710870662EAB0BDD1597A60CDABE51BD683A906 +8A695834286F7DEFBF594B0967B4E8E07CA1F17EE19178858C320397DD29678E +AB90FC7CF091410C3B53EC7642CB9778F80EEA438323A04381794121DC142475 +BEC46C64A97745B2A26BCDC93149C4F938D07921E8F1B9014909B5F9C069E0F7 +B08BD838651B9093B022B10D5FC8F106EE9E0E05DBB4B78DBD8A1EC98B13364E +01CBE43303E5E9A8DEECDC26C28A588AD3DDD92DD18E308ABA21A3F9D115F05E +6404206D3309961DCDE3E9AB912359CF6552380F923D4EE5D96B24867DC1A9D8 +6B2A502BC9958860F584E32F206585D36119BEC3D22B80B6A14D2E480371DC4D +9CA23D21F54A8C09AFF8BBBDD5E9539A2C8ACE66A712C87037E4ECBBE36EA579 +3F8F86FABE571365714092DFEFEE0FB8B814239AA3160629129280A59B48F3CC +44B0E66050C6E8CC20B1391F8493841AB1118A6264EFE8972A126B654C99A5EC +BE037A0A783B03996FE50C7351F148C9F9FE6889793E006257585CA0740531F4 +EE247CA64B3EA4CF7C84E8145CCCF7448128225F029EDB29B31E603B06728BCA +5B8C84EAF4D06607AB0FE211CA8316789E7AB0F9F33C8710A2A7CF7FC94B7C79 +8E29B408CDDD0DE7E7E717C16A2797E415B42D1EE964D4D62546C3082A59358E +006DEBD51D8BBD0C45C51F03BAA68B21137A20DE9CAF34A3C1AAEA54E1DC7362 +A3CA0BE789948518084381AFBCBC3B7B +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMSY10 +%!PS-AdobeFont-1.0: CMSY10 003.002 +%%Title: CMSY10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMSY10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMSY10 known{/CMSY10 findfont dup/UniqueID known{dup +/UniqueID get 5096651 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMSY10 def +/FontBBox {-29 -960 1116 775 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSY10.) readonly def +/FullName (CMSY10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 0 /minus put +dup 13 /circlecopyrt put +dup 15 /bullet put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CD06DFE1BE899059C588357426D7A0 +7B684C079A47D271426064AD18CB9750D8A986D1D67C1B2AEEF8CE785CC19C81 +DE96489F740045C5E342F02DA1C9F9F3C167651E646F1A67CF379789E311EF91 +511D0F605B045B279357D6FC8537C233E7AEE6A4FDBE73E75A39EB206D20A6F6 +1021961B748D419EBEEB028B592124E174CA595C108E12725B9875544955CFFD +028B698EF742BC8C19F979E35B8E99CADDDDC89CC6C59733F2A24BC3AF36AD86 +1319147A4A219ECB92D0D9F6228B51A97C29547000FCC8A581BE543D73F1FED4 +3D08C53693138003C01E1D216B185179E1856E2A05AA6C66AABB68B7E4409021 +91AA9D8E4C5FBBDA55F1BB6BC679EABA06BE9795DB920A6343CE934B04D75DF2 +E0C30B8FD2E475FE0D66D4AA65821864C7DD6AC9939A04094EEA832EAD33DB7A +11EE8D595FB0E543D0E80D31D584B97879B3C7B4A85CC6358A41342D70AD0B97 +C14123421FE8A7D131FB0D03900B392FDA0ABAFC25E946D2251F150EC595E857 +D17AE424DB76B431366086F377B2A0EEFD3909E3FA35E51886FC318989C1EF20 +B6F5990F1D39C22127F0A47BC8461F3AFDF87D9BDA4B6C1D1CFD7513F1E3C3D3 +93BEF764AA832316343F9FE869A720E4AA87AE76FA87A833BBC5892DE05B867F +10FA225E233BCFA9BB51F46A6DF22ADCEACC01C3CD1F54C9AEFA25E92EFAC00D +7E2BA427C25483BA42A199F4D2E43DFCE79A7156F7417ACF78E41FCA91E6C9EF +B933450D851B73A6AB6AEA7EE4C710CB5C14270D1674FA334686653793FCB31B +491E870D3C2BC654D2C1DE463EC9BA29D7371AA1078800EF93D3F66263A2EBBB +F5723697BF7448BD0D2E301544BECF497FD475B85DFEF52AF4F8F8BE445CABE6 +019318806D10C5952157FF8F8286C1EE701545C8F60EFA854EAE66835A2046A6 +915D395F1E0366EFE0C0391583FE001FF16D82A2E2DA5F57754A2C6F69306E36 +356ECF8EFC3F1188AD6FCD2427E0580C97A5B69B4E0E09B85EEDE142F5ADD2F0 +5DE51D6DB72B127412A0D57106C19CA493048A4F815129ABE767D51715B1515D +9C21067CB5BC88741B7298C83EAE36A866DFA87D8981F179B1C31292F56BBB64 +3C430779468AAF07C8A8B4934E1E775FE3F35186BD1FA6EE3689C1C750678AF1 +FBF9B23195A124C5C991FE670AC0C86FD39D2B07B9A319E74EFD498B45820252 +720ECDF7294F7B0B137CEB86D33BFCEB8606985A3260FD669E461C8BE94216C5 +D434FD8854F44EE66E5A289A9F9E32BC36AF645D53F96652602BAED418C8D726 +BD04A1B4617551FE4DEF54083D414F7DCE004E6BB2DC9C2EF7CE232B254BA2C5 +7DCBD36C2072ED46FF711F121A701E2284BF1B718B3164382B8F453D68FA0377 +DFE106503B8401D4DB87F5402A3AC9A442FA060B0610A9524D530C7157C26B56 +AC970FCC1D5655FFFFA39246E6420CF97D08ADFB7B05822679BD40C638DDF0E7 +A97BFE8918B611A145AC965C203F1428812F9D340AF499B3A915B22BE798594E +0F520109FC81E452180AE45B170FF999C5FC2761C6CECD8742A5A6FC97F16743 +AD4EFCC6572A6D3F3E4E330C5CB2FF6FEA48A5B64DD3DBE943BD9918D4A18E18 +CBCF598AEFBB6AB3CD2CBC9BFD6099272F6543F3E532E0E21E614BD2880B1023 +0AC234CB705827BF016DB84E00E8C255FDEFA0101A842929540B7B4AA8A089BD +5EFF05B72356B6BC3727817823B5CDBB1B963103000D7F2A4E2A1472FC3E614B +5CBCB6D6D784023173DEFEBFA8F9ED87EC1A0A9EE98CA59CFC964CF943DC683F +E9E00DA718C4425A705A69D99988EC6F152525C790912C2E46A2381A569424AB +54DF4798BC2D7E7A361E7991641D4B756CE2A7FF4A2848927092C59C2C4B8809 +E13AB84FB6B111E680D7FB9F2FFC2C5C66B0B501E4447C2E46C10E2F6124476F +A140C404CFE2DC9E0199BF61E035CEB481D438139A9630934E541D261FFD2906 +4CAD99E20655FA746AFB81EDBB5601F5FD6B1D6832A01D585E2C55053F6A7378 +4DAACCAC7608DBDADAAE732D66B3E7F87E79756337C1A961E53A4651BE7C77F4 +038B89C87F650C54A2A90EB7F1D525BB353F33318551EE8D84A6A83C718EA5A4 +B2AC0F7306B1E095819B87015A90CA3ED739B09061782C28CDB36BA4BD5E5308 +5CBB70414E4112193DAC4A1FA30996327230D1E021F3CD8115E12D239D93FFDC +B645910EB29E40D830E7BAF2DB255FD7C4E776557BB38157917D993EAC245837 +A3B515147043574157B8342D829C7228CCEA843ABC89D1785A9672A5923FC4CD +2F3FF27E6FCACF84E2D3136CA2C0FD3EF1EE7354CD04C38B5FB874553646ED2D +CEDF7E362EADD04B18051F20A8FB0DE18E152385B9D05F98A3A7EF177824E246 +455ABE69E2F700EB78185CCFC07E3B4C6FA301112528D977367D30D0D5D59EDE +FAEB706DDC970A9E296236C725B2B55B09B9C336B8E23CBA5FB8692D56F33B03 +16294E5FC7FAA42E96395A57CE51CA8DDD77442F142E2E576B778373FB31C81C +16840BB422CA827E30A81829648BDF1CA36700EA32AD888D097C1FE0A05B2D9F +483AEE40269DF09AF0D1AD3DF80C45DDC59C2A03FBB661C79B87853737C6D352 +67626B657321B16198DBD6DB98A092F17878AE4698121E1006E53D6F9B0A3BE2 +3FB68828EF854A0CDBAA68B37ABCA6AD4A3D809AAF0BAB1697A81FE59C98C472 +1E33CD70A75A22C249DD11D76C2575ED3370A25892A16D2FD569CDA70C130770 +93F493C7D47D6F9A5424A7A542BAD726BFC3AB225DCEBBE6AC4BE006F8C7C0EA +051424B08305BF2D951AB2986AAFEA04E078CA79B399585BFF0F1ADCED02E15B +8765EB6BF6A8E4D0901EFF2C3AA104924EAD9637A35D877E0C51A3C37DA78CD4 +8643C8CE6DCDDE3F116A6C2390F948E5371BEB5AD2E87B41C5F01FB5C196C436 +6E256A88D082E3F46E4EFFBF605B2EFF1E9D9AD5EE4DDC323A137CD9451EDEE0 +06F7D82898D71FAF2362C0FCF1F726F97F820305B7CE20728CA08C63575083A7 +84BA28B7DE2B916432475510E274C12FFD1660A717F51DACFDF0A102D85224E0 +D6DB607BB72569ABB8A7BC6A10354CBBC01732EFE35B72062DF269CB25EA3DE6 +DC603B04C90C5912D2C38D7A5ACDCDD3F6F116D884F0D8C528F69D5D47BA20DB +0A9E585C7D8CC3C324FE8A1DF150279F7E8FB43BDB720E624E5E9918032C02CD +8020636AE5C38DA2484B7F4B34163E0D0A561B43B80E97746DC05C871AB620EC +C5D47101ECED4A7E25F291184BEF8B80024AA7BB456C1B83A907652B331DEA34 +754226C39C6889EBEEFDAD081E01EF8FE47751987667836FDE4C8BB8A3FD4406 +1E643B4EA37BD370734D1A2DB17C2F4B74B4ED75098B433601F75A88C9A37A05 +CCB157EF6E32023BFA33973F3E655A4D58289136996FCFA61EEABD70791B6523 +1FF5DE71AB8A17038923118A5EED8D59C4C58D246FFA9BB26472346B40C8741F +153D19CAFF20DD2A86C6DB89154A630FB1761929FC3F0448EE2F089C1C953E02 +905BA8DE75D101A982A611056C4B237596C10951DD98BAB838B742D3CF7DE718 +617DB72E5268583223E37E029D1C8FD3F1D21690151F76B76C52C725CA135CA2 +8666553E863CE188BFC9B99AF56AC2DB5BFEBEB12FB563D00244EB89E478657A +98AF2E1223C1ABC25A4500E8119B86EB3C26B8A2F3505A3E5610F89B7C34E278 +53FA0A54A7F46D84A35EFEC36AE660A9E3C37EE3864106702DE5AF6C45ABF64B +888A4A51323138CE77DB935576FE6B4824B6942DF80625098CE1B5B32B234F1D +052A9D6039697118A9D793793775D8729D8574A2E74D7109C7B7E23BC5E2E87A +CA8E019203952A4892544E1AD3D4EDD22971611358AB230E9A2ABDF00A288501 +A01B67C42B33F6B78C39562DB50F4663B922D9BE0D8A150311AE44B83C1F129F +07337323E9A23211EE58E16043E127C6F9574019179F5635648A011266677B56 +B5D0201A4E1470B952A1579B57AB2329CD4C615395023C653F784D36B5EE3672 +10D191F29EA508CE84763CA4CE7C2C5229E38E241255A5CABCD6C7CBAED901A2 +CA53B5E24111921CDDF83578D33D463D70EDACA0E470D8F592303FB6BFD68B4D +3F3BE2D7C5EC8BBF10C90111A33E205F2649B56E8443F6FAA6C721C66575AE12 +D4C40F1F46CF9E9DA675AB5D5840D938780CD9E4AD6736ECBEB6A4397613586F +849B51048AC5F9405E03E14540A5E5582F61CDCDB57EDDF95A8C6705F433EE16 +648F098C03DED8A2AD94AE3DE202D629B9422ABB031318D48F2C85F9DBFA17BE +84708AA3B6C9F81F4508F7A5CB7B6646AB8722ECF817877B77D473F577556DAA +2BA0ABACFCF5DEA7498C47328E873019A956FBB250FD9D8885D21D368FA70CBD +2709D2DA44EE7A9869963EAB48789541906DE49FAE785ECE1F18A22C7E7ED204 +9768896B78E9EB7A2BD6EEC1B26083940656ECD689D92942CC8AF05CBF82AED0 +B45A7DF4DD7AA6526FB597322560B9ED3087A65B5EEF1371C328A021411BFE3B +D9B5088B2F1AAE381FFED52D2D1E02CD0DA78683E3B06171CBE94BE9760005D7 +135893D7CC2DB097F6AC664D9594CF1C650F84DA80D2EDE04802DBA33CE3DAFE +EB7A37E8AEFA4FDA6252FF21E8673DD98E67124D5DBC7BACF361E57077B71939 +C1D1FB923E4E35C075CD1BCBE0E80DAEA1320D55B43EAB45D9B26C366B278782 +7519FDC482D98839BF0DF2E7C3A56A1C1A3FC0E57A75CA414F6536C1FE8EB7A0 +4ADFEE3BEDA0F53BE8CF5F64230784A797133E8CD46BCCB3BF38BCE38A73CCE2 +9E073ADE792F7128231DDD1F63E6156ADB2609C200837C2E8A2D93D2A7BC9171 +050C709A71E44E32B1B03C92EB5CF1D3BAB1C38E027DC4ED9AED633D98CD7486 +3F773ACF8AE332631CF2ABE6D606607593FE862ADE31803964E3F4DC3CE3A271 +C76BDD95C87CDB3B87BC26FC7A16D567EEC62E6FF0D471B4853DB8A94D4CACF8 +843824F818083F10E88D52FC4253E8203292CB40F1414AE7E51DD7347007C342 +CD70E8E9F2D2A13D71213B841DDEAAB208AD9EA644591C15DEB084165F9DF24B +B91D3BBEEC2E34E38EF16A0C3F00700A7BDCBBFED2EC0D09601AD6538288DB50 +3478B051B5E16B604A0341FE621A58718D960D699D3FAD284310DCF54EB13175 +19A75A539EE98E804AEA24689D3540F0F12951A3C01FACCE9A7BAF4D0DAFA946 +FF65A4D2A4C39969607272C6886F44E90ABE27CA3A1F12A29D9B32E60E8E34F0 +17C5FE43D0E69A99A922D98909B2BBCD145E59A5E7F5426B3988F73B09A525F6 +8BD4915663C1301323180E760BE81CB874B020FDA3AE63340E4261E4F3E4949B +CC0966BDC4426190BE9F5D77F76A72AD925662E5FE1CEF9CCAB68F0BD33DA003 +F11EB91AC4502FBD6AE48DA0F9D07C35B96B103E379B8A83A05FE728F1716194 +1F650F75BEBADB2E3810388F3E2DC7B19F1BA9E32925F2FD9F19F4E8701F3E4E +4069125D7C401144740691E7A460021A47B1E27997FC1DDABEC5BD0EE0B20194 +2D579C7D6727AA124083242BDA46D8E116E2751C5F298851A62B60AEBE82A929 +9B9F2492BA35690D1EFD16215B8EF14E7A3803B93C28FA41D971B05B6AF3B593 +E74AD1E68A5FCE12A86E63B78BFEA87D3949FD164F12277A4688BE96356791CB +8671C49365608F3EDECC109321AF92B4C29CAF073DA3A7D73E913D0D83FAC5EB +BD884D4C686056404DAAAD6F82F94F803FA1FB0DD8908D1DF08FB87A8BB83027 +04DE0CBB1C6FEB6B517FBD7CF065120079E608CE41893C2BC96A347826CCDFD5 +C69E161217F2127A59F1A6F22037641613F191F22D5B4CDCBCC2EE5615623404 +ABA7BE6C5FE475481615B2AC1A2412E54688DD21E44CC9AF5F16E634AFCA389C +4D740B7B51BB141BFAD1080E7C726C1606A28ED492E6BDE9F800EFACD1513909 +84E98CEB6A0B7A2A6F3E1D1DCC3B2552795E0932673E59ECC56DDD37A1D52BA6 +C3F0E905978AB568941A163F4CE3AAB5C5B16F86016EC47BA6F3F7AAAA77C3B6 +09C8C3ABDB6D514A76ECD37C37AA88B5860630B3406B494F7725975596F84777 +D9CF48686EC9C5DBCC1D78513F591C7C10AB9D153B3D41426B7BF668B0D04503 +56BCB686258462C1DC61095724B9F3312316262FD7C1AEC6E54DE7E5A7BD8EFF +035299B8FD8A4A7B0F51404F4A760F4D8B4C0FB7A32FA4B2383AB6E9C78FDEDB +FE6A5788D38A6701B123630C2A6D820A684166FBBC83DB17069494FBD411B333 +CB37E2491C5BD035A33867A6D3A3D420CC31ACF43AA07182CAAE67E40EC63663 +B678F71D4C6E0EC3A0AAF904CD3AA66E0DE5E3CDE049E94249B39A1C06E3CE9A +F974B2484BB2CDA14282B9511E505B3C89F9C802218AE40D1A7541335C5736DD +CD565D4B9F4CC78F3A393737EDB4FBD0DA299E21CCFEBA5478EEF013F0552A8B +0BB11FF46CCDB784E8BDCF730A16363E66572049E42C695886EAB42A9AD9094C +B635DF4B5B9BD9B9AE8455DFA3EEFC77653190F9A8B1E93B7281C2A21EA7DDA9 +33484745BDF7E3DD63C7AC66C286C9A5A698A5E4D7A91710B7FF943FB23609B6 +4B442F83CB795788FAB5E9CF3F75D5487DA26170E4561C7941C910B088C3B86D +F844B0F340CF82786A3FCF347048463EBD2006281A816627065DDA6CD4D3AC5E +2024BC96C7D896381BBB567951E7A1F29D4E95351298B000D29E5F3D0448CB5A +CFDAE1BADE9403B90371C3A07D208948AFA022A69C519434B6813086ADF518D5 +88E0B92072A44BA1B3EBB630A13B7AB90992E85B6D67361C8D96F3E0D826FF37 +17B67E4B1EB7BADFD98D7F4FD17BECE740ADF13C141EBF0A91CB105DABB32FE0 +55086D56A0D358841D15FD349E6B95512E4EDF4C430216FF85C2ABE995E4B40A +A6044CC8820AD885C07E052B3F91C2E9A1D163BFFD210F7BE95B923E2500DB50 +2075106DB541C267BD450B25B670CE80BCD068D4DBFF2D82634175B61FBD3BC3 +406131F44C7D6F18D375D1F2270829DDF29DC14DBB58A30AC193245D18DE91F8 +AB88AB548D8138605BB5A50073295534E314366E26665AE70482B890E4101D6B +60E4F3B37ABCA1346DAAE8FDB8DD9C832EFF3E73BA470E2BACE7B8515CB43388 +C27AF99FF9322175CF8D4947E6B3846AFF5163E972156847F58A66660EC8A3A6 +5FB47C9F637B4CBB4C73B6A080B0CF6FD1E9665E92032540570FFCC747C67C50 +822811AADC404BC7ECD1673E8AA6C3A2F1D82F39430B58C29145E2F1B679C46E +94EDC711883F1E4EA84117A54757E8895A40401A26E1437B39A2F65CAADD6E02 +D71FA8AF7453668DC613F326A3344F74AD7AC67569AF399385500ABDA5EDD3BA +343CC5EDD4B558467626850E752B9959FEF1454E53E7A3DCBC2255AD8F6AB4FE +894455118A61C58840CB68A925ACCAD75CEACE863D806916228F0614191A1CD5 +DC9BAE256018615AA3725834519449B0A88B4F396654E74099C007930ADB1327 +DD119BF799FE3B0B223E1EDA04FE2DA7A1C879143E1C33B6C6344F4BA033AD6F +8E88C33DEF1977796B454BAB2494C930F492A518E8198C708A75FFEF8C49C324 +A718AB59B889DED521229E741FFE53F98EBE88B0405AD523254FD3FA4BBE96DA +DA1C27C1C979A0DD4E61C3B1F4C4DE01E42F1C4435EECFC02D97994BC8AF5270 +E7CB1458D76ED0229C5FFB4A23B8716018F9050970895D51722CDE8F2EA3D947 +DFF374D84915D5C5D16463A6FFCD079D1ED416C4347BF831FF0C4ADFB61295DC +4D5785BB0852BF472CFC97EC174491CAF961AB90629F055E75DAA6D9898E8653 +5BCF379816CAE46FEA62E7BE8E9B953466E51828172C4DBD0E1BBAD1CE28B5B1 +02B3E36403BE80B49A47446A6677FCED438F01D60EB10F478C89528FA337D0D8 +88D3FC123C076507ACDAF783A9A6E24ED73BF24B6E0F11C13E532DE5F70B15A0 +657F5ED27D204449A841ED19E01432CFFE928E921321113780D036D34F2797DE +D4459CFD15BB117B5C9745EF3CD2B296D91FAD48C80B136D94476967E255F808 +AD2B5D522ADEC64176833756510391815A1D4A8DA1D0AEE7CAD36A1D161889F2 +3347D5B6BC503300FDDD48F594F391D5FB42C42113C538E707C16EE24A3F375E +7C506E8F49CE50FF9DEF3B4A4C1BEB3848EAA3477349833BA22D2A9012287D8B +A8C4CB4307A1188ACC0E6E9338E1559BE5FAFF381BD82A6C71C267409468B3C0 +2C1A29F4281D565836EAE57F680490FEA4A952FF64C8CD11C377C294DCD1EC25 +CEFB2B6DCE959D0208F85B6E32E9B44FD455F9B134A5306D95EA29F37BB8B86D +9E592159338E1293F449380E13C21AE42E6FC60CE8A8DD021324204494A9EA67 +CB8D6D35618247BE3CA9B656EEA4C65E463AC3969D8C09CABB92396D6C42D9C6 +C63736AD3E22B5226A3CE66EF8290E4B75FFF5456178002F8EEEA0F477A50D0D +A26FC86EB69C9493F6D12629AC8C44C2F24475B28E9D0DD9D39687C6CF683BDA +9211DAA631C5F93BA5C856A04046C308D4687822AC89D264B2592757CFBFC518 +3C0EAA3485C74189AF1FD8C55C057745333A095B4EB8E2FF261398E8C1F7E9B0 +56CDC6E2666576393EC71483E8474831B8B334414BA78BE678ED85F299C71463 +9528EC676EFD3ED257C75A7617DF5BAC084FEF219D3D810433616CB4925C182B +624F3954ECF0E2181E19E4B8F152E4C362DF1D8317D568006E8F3D27A4881317 +090A56349D0AB6EB24013A7311C87772ACFB629243C96862D63D590F91639DA9 +21FC9D5BF5FE25A80BF2AFC849EE9DBA3EB0320299086B5EE667FF58C14B5197 +63644B2C2FA81A11FEF33F24994C062069B8ACB768635663234CE9D5DC6CAB79 +9861C469168B9B +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +%%BeginFont: CMR10 +%!PS-AdobeFont-1.0: CMR10 003.002 +%%Title: CMR10 +%Version: 003.002 +%%CreationDate: Mon Jul 13 16:17:00 2009 +%%Creator: David M. Jones +%Copyright: Copyright (c) 1997, 2009 American Mathematical Society +%Copyright: (), with Reserved Font Name CMR10. +% This Font Software is licensed under the SIL Open Font License, Version 1.1. +% This license is in the accompanying file OFL.txt, and is also +% available with a FAQ at: http://scripts.sil.org/OFL. +%%EndComments +FontDirectory/CMR10 known{/CMR10 findfont dup/UniqueID known{dup +/UniqueID get 5000793 eq exch/FontType get 1 eq and}{pop false}ifelse +{save true}{false}ifelse}{false}ifelse +11 dict begin +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def +/FontName /CMR10 def +/FontBBox {-40 -250 1009 750 }readonly def +/PaintType 0 def +/FontInfo 9 dict dup begin +/version (003.002) readonly def +/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMR10.) readonly def +/FullName (CMR10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +/UnderlinePosition -100 def +/UnderlineThickness 50 def +end readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 11 /ff put +dup 12 /fi put +dup 13 /fl put +dup 14 /ffi put +dup 33 /exclam put +dup 34 /quotedblright put +dup 38 /ampersand put +dup 39 /quoteright put +dup 40 /parenleft put +dup 41 /parenright put +dup 43 /plus put +dup 44 /comma put +dup 45 /hyphen put +dup 46 /period put +dup 47 /slash put +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 53 /five put +dup 54 /six put +dup 55 /seven put +dup 56 /eight put +dup 57 /nine put +dup 58 /colon put +dup 59 /semicolon put +dup 61 /equal put +dup 63 /question put +dup 64 /at put +dup 65 /A put +dup 66 /B put +dup 67 /C put +dup 68 /D put +dup 69 /E put +dup 70 /F put +dup 71 /G put +dup 72 /H put +dup 73 /I put +dup 74 /J put +dup 75 /K put +dup 76 /L put +dup 77 /M put +dup 78 /N put +dup 79 /O put +dup 80 /P put +dup 81 /Q put +dup 82 /R put +dup 83 /S put +dup 84 /T put +dup 85 /U put +dup 86 /V put +dup 87 /W put +dup 88 /X put +dup 89 /Y put +dup 90 /Z put +dup 91 /bracketleft put +dup 92 /quotedblleft put +dup 93 /bracketright put +dup 96 /quoteleft put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 106 /j put +dup 107 /k put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 120 /x put +dup 121 /y put +dup 122 /z put +dup 123 /endash put +dup 124 /emdash put +readonly def +currentdict end +currentfile eexec +D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA +0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 +51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 +7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 +E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 +0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 +C01924195A181D03F5054A93B71E5065F8D92FE23794D2DB9B8591E5F01442D8 +569672CF86B91C3F79C5DDC97C190EE0082814A5B5A2A5E77C790F087E729079 +24A5AC880DDED58334DD5E8DC6A0B2BD4F04B17334A74BF8FF5D88B7B678A04A +2255C050CB39A389106B0C672A1912AFA86A49EFD02E61E6509E50EE35E67944 +8FC63D91C3D2794B49A0C2993832BC4CDC8F7BD7575AD61BCDF42E2E421AA93E +3FF9E4FAD980256D8B377043A07FC75D6169338028692CCA8CD1FE92FD60AD26 +D57B7519B80A8F8DCE9CEE5CDF720AF268D3C14099498A843D76E3B6C0328F24 +D36EFE7F5C4E5B5C612786200C8DE3A41EE5F1FFAF4097653CFCDC8F4FD32E0B +03EDB3E413283B9EFB0AC33B055617005BC9B0057FD68C52D1B0E67F0C571685 +767F2AA85ADE4E0104A1C777733D5E318A22A9944336E5B98D965E50D31F357A +8B6EA5A0EA98E1B027CE68C2EDB149EDDD04ED74A1B3D206D471A0C11C11449B +DE190BBFEBC08C9E1B7513B43DA3134D6B11A2516E6E86B67F68C970A320D05E +94FEC57FB347606DF89989C33482BD09D011C55AA920319E7B26A205D3D0F004 +22466F09C0482A164CFB27EF6ED2B040ECCC3DCAF345B5A73676F193D43123B7 +72FD6CFC5E37930E61EBD5A6307E4DE70194E6384EC0D79DB6AD86D3B319A31C +8B0589D0FE28241D8ACE280D0530EE99C80723E560BB72AE9D53F4713181F491 +344B06D3027BA4E9E94D4305BE1D817197C54C8FF56CD6964165F6448ECC8A8A +64B48B4F0FD69299A137589E2491A283509B21A3A5772F75B7602A9F60AE559B +07A58436D04222C73EAEA72DE9A5A441F88D27C11F4F91255EFE280E91A4ACAC +1E98A4E5E6C57B9AE86FD218C3CD8F24A4104156A80F13821384E529783C52C8 +78B94AB3A0096090867ED32E8A30980E737922037F75F062BD83BF4F5929BC51 +CC22AEE2DBBAAA001CFFBFF41D258424FAD888FFF1BEAB796A44E3126159E120 +7E4025C676CF94888A1971AEF8B6764B3AF4A92D36FAF6FC56FD049710EE3782 +BC2CD84FE2473F133BE03C1346B875463F126DCAB15C7A9BCC9A727D23611462 +4E8D2BFD2466600285D79518712B8681ABCD69608E6AA9578F7BD771EC36E01A +5A17BC17E375020ECA59B43790ABEB9DF5F4FBBEF807E5699EFEAC563E1ACC5D +EFA336E75DE6D8248E9381BB110884FDC89C2F9A41EBBC9A8A1F98E6A41F68BE +EE30E25CA148C1EFF42DFF8C214A6537AB11F260B8C329A4947B5FC8DC9C5622 +4DF7BF4FBFB00380D47BABB03BC30627AA74103E553F55278F538EDD8C1E64CE +0F1398CA0AB5A86630139B4A7E8FC02804CAFF3830114640AE50D2FDA3B561B5 +C63AD7EE3347804CBB40FB1E77A6C89735DD870351C3A1811591AB493251B904 +314F65791963C0412377C1D02362C5E9655F1C3D4803CD379A8EF24C48218C2E +DF1165840462BF37DDE1B8D5FF09FA2C3B261E2F1A65ECFBE5D4EAD43B52C029 +EEB3948CB8A252CBAF545C8FA1C31E920E23A12DD7222CEF2D2A513BD758EA13 +DA33BF5FBF1D734653EB83DA2D374A5B9A0CE316F24EE375D6DF6BDA49954C2E +DB25A88821193636119D469BA66E5DAA9C92520FD4F84426A4E54273FA469084 +7517817A6EE3E21176D333825E88046F50B3CF6938AF9BA79A2F51398239EB91 +1A2D07F7FCD948427FF62F40FF95E39FE1A1AA8451411563FD5388472251C155 +69BDE9283B41900B21EB1190D06E6B13B7794FED020D2C1BDD205AE77B084BCE +EF628249398B496DE85B406FC2E1939EF00DFC84C07E26CF72EC401BAAE756E5 +7F6673216E7560D1C2A723CB405EE5CA474A07F61B81F8836482F73DC9516D67 +CE0CB770EAD755B6B356198B4B97EBB29C63456953270CCC8D5650C1D006E69D +38DE2DFEAB27DAD50A817F0D645D30AF5B75A7B53CBD3D2B8D87BD0A7E525AF3 +22F7ADDFCE31716914C2318260C2E2B4664893921B68C5A93334A361D94A759C +0D7B146D6FD94F0442D672BDA0F6432E18F3C5DFA37ADA378D95B75F413C9ED1 +BB5C606A3EC7DFB3F796F59B0478C13FD1900381EFE0BB5242D5B5D34D03AF1D +4BDC93EAF8020E26CA23C8B0E7DDEBBC6762A557067A4CE05A524188A8F02E2F +3625DA38DFCF381727887F5646A3995A8A38A5FB1E5D5EBB395FDD0B7C8E71AD +B48EEDB62AB2CE99D121435EFBBFCEEA69AE9ED8238B60CC7288DE33C766CDFE +15B767B4AE2E6CE0965E77272AC9F86023DA620548CFAC85BC751C44218A29C9 +849F1C2DCBDFAD895B54E51A569952ED50F82DC8A19F367E7E44643854EFD6B3 +FCAEB04E55E4661C82D31E2932611748480EF61FB2FBFB0CFB940BEA81AFCD84 +4C6A6332D7A600170E38A8EAFCD4F93DC153C43175434C86BC747348FAC61B76 +1FEC9027C1A193E55C80F1F20B5317AA0A05AAA36AE235F6E49F06E570FEE798 +84857D7552EA92EF3EFAD52DE39C2F8F43C59E3A957B7B926FC95FC4B60186DF +7F3523EE2AB74E294C8C4BCD8B4975E84849E0FBDA6C0B0F24A636DFA578B122 +CF97BC5089E21E9F5298D1C9F30CB8BAFF6A3A11BB4D9A0A5CF2B18D055C44CA +4FD4D8FE1AF3630907DE7E585AA811F9CD11FB2C8FC791851D651009FA5DF20B +3C33FD2FF848A9E3F5652BD294965A332DD3F246C91B0ADA34017FF2451D1394 +F9C3C95AAC6EC8062BE98E8914D51DA6A164AD13938693D446044859D03A949D +F9AC5DF4A000CDA98BB516D762CB9F6D44B5268FD0C26E88BC4A760C0F75A140 +DEBDECA4F511128B7D2805872160C55236F0A0FA7637FF0D4E94AC079CD3C8A7 +D03A5A56F26B0438B577C46011A10532FEBCAD14FBD6032E224F45691A726886 +56F305231EB2FCDF59C8BBFCB5DBD2D093A0E84D62AC93A2312CA69295E937C4 +8DBA1802B85F54B5E7E6D6216A918F911FF705D3B5CF055F1D873B96283A0B53 +59344D910CD396D883F6F7836BA65FAB4393A773A8F6BC298069E5BA38210EED +49C9D920F718E3FCE692527DC7CCE6963BF744F2C91BC5952564196D60574E86 +87A0FAB21F2DB2BD5A51D7FBD8FC19946D24E5A228462C4772F978E650ADCE3B +8D66B9C21279C531CA1C3A8ECE3420BB65837287A7222CC3673A2A5F8BBFDB60 +C719CD073EF9A23675198462C7C87B24CC92D6AEE5C25AC63855CC3281494342 +D28F3D2FDE0C183486769A4FD5B0143193D31FCB2C2A14E487BBD96D0BADBB64 +D1B56021C363A795BF10E2DB448261C363A54A4AC1182B470C457AA82DF3F5D1 +F4B329806141EBD53CAE309319B94133D7EBDC2D0453A905ADD207364371E178 +0A95C2686E3B34C4A978BFC0EE968C39ABA00889BC5149162C2B54483D44FD3B +5CFF41F611C7E03B94945F414560E874D7CF27FFD0630890D7D7EA66CBD15448 +229059E1C436BB33D69552B5367AB5D53591C4678D0C704DD3EA23F5D9E8A7AC +17D003C19E333E726FFFA2961F33C70F429085F7BFE3E2510F59B78F58B19CB4 +01B48E184BAD9020FECCE3AF52048A056981DAEA02AE78197E65855DDB170616 +F54278395D9EA50DC83761AE759F9CDEF9E1948E7002414FC05286ED793E6662 +3347F2A9AF8917493D7305B92CF93E8E9185F70015F5594084298A6C2F9FD3C0 +689F262AC9FEDC9B89577ECDE92F08D3142209FBCE7B5C0A840CC767BCA56C20 +4E4E545E2BE4D21C53855CEE4CD0AB35D1A604C0FFFF77DBAE4289752276559F +A05FEE65F45ECAF44E95E23FAB6052195C7948AF0B1126482D4E02D72BF8AB03 +DE0F1A632F7672AD9DDE70EDC82AA993678A82BEAD0BC2649C4707FD8509810D +364B5C6FE0E10772E95288C622C2F06C634F4DF8C7FD1432BC9310D5F24FEE3F +7AB324863D6DABAA1576E70643CA79EF4D7DF4105093D66CEE0F3B87D2164A7F +26EA05F5C4645B22D3E1BFD2219657712C168FD90DE801FB0F32759E80DEC1E1 +43CEEB19FED12D757205043FC98FEC62D6A8D8B97BC083B4A0E985AF7850D6FD +8716B9957C1C35A0675BC53DF672C425C79F43FDABAEE7D63F092CF271C9A9D7 +C41F40C4189510987887942E60A412B3EEC84C9A6E1AC7D54D528F5604B72C08 +94B7882621A5BF1F325B92FF96B80878CC550D1AE4D8196E41CB1251856609A5 +C4D3BD05A922D0D45E039D9450DEF8490A3E924E41434194910BF60BA1B08BE1 +B41824345627745541A4F1703E956328F6227D11C74946B38CFB096139979E56 +4E723B889B44C6D78673868C89912F8B4F0B4B485F1587A637B630F92E6072D5 +7F3B44EA6FD96BBD4FC28A6C1D90805E3BE3E42A7BC9C880762966C55BC04E01 +204D083AE976FAE6F37C94F27E68F8C0F28D52B17F6C0FD7C9150701FD78F8CE +B8E8DC9260E3974005EB5CA728171F482D765016C94D4ADFE4A42EF42212BC56 +7E4EEEE8B0D2A7856CD4E44F55C0BAB762F92CB8D64C17022D4BF3A47C12F5E6 +279FC23101FEE93753653CE8CEDC3B75C9CCB29BF1D4554C6120DE8EE750FCBB +E38B5D915206974962E320362E59B3F21B3AB1875703191043D03284D4467346 +CFF2F98CEB4845B73ED8E003E0DC94251B73E13A9B51A3F1430BCF6A21EB9B7A +65E17FA411F53BE6432F1506232B8159E008FA257F884A4A01AC53BE91754D78 +BF14A5B0FBFB9C31BF4908355F8A762052968DF526D118708CCB0B7CB5BEE285 +6DAB6CD2E3934178E60BECB11AAB5478623CF6C50C92F8BB5D1A583609028FA7 +B8A53B791BDC9EF76A124F3F7641857E4BEA0837CB36176EC9A522EA7F41B8D3 +63C37D1145367BD300F17B54522A834BBB74DE12BF9EB26ACE6F24A046D58F89 +4D4B7DF74875F1A0C1C9D97BE0849593D7B398EB4B00BEBC8C8D1497B6EF831A +A35380FFB7F1AFA4D888AA52C9482E8B1755CC209905F98F40D95B44D4DCBCB6 +67423D1BC2F3560FF0A8B4F0CAC352A4EE2C1D946E45AAEC8A6AD40303F3382C +DF0756BFA3B1ED64C169E56ED1C760F2FF0E24DC5C9F41306EF8D2628153D30A +5DCB0791126BEFD4947D7EF08301FE015F2B0008DFFCBF9F2D4D859FD43EC7D9 +C5BE237E9BF6665B7B1BEBB362F0C0C3A8D86010B9C97FA741C97C2E0513386C +9C26C235B14DD2A58BFDAC7B5F63DB4DA6D5D37D0098175A9071590E1DF66A3D +B8173A047C29D7D35557F06132CC920B5460B8AFC11D23D09A4E45D089F5EB51 +963FA1A6256E359D485107FD143B2BF21FDE9DA5744BC2615E86C31C89470CF0 +D06C6397D9FCCB316EA9989430240759D2C4945D941F159FC02327F34B042BAB +B5C3A47C78E8C1A6FBCD396B1A51CC4B020B8AD401841EDABACECDB482D6EC5B +72D2BFEB4556720FADD49D07307C8B22ACB7E310CA4151A85C71EEF70E8D15DE +B3B00F26E0E166C14647A65ADA228A3D1C89025BE059306565DB1B1EFC37D358 +8C1EB024254AFD049BA977BD4C2C605050E17940A89D0D4C5D963E792320F5DB +3706682E03D25D9E02487247819551465092CC22B6B56E93F3AB528038FEC3F0 +668F866707A19B0463BE706EC729D2EE1653AAC7E29BD25BFB3241D4792F5152 +ED415B4E7FA92C2EE5A22E27E8B75542C492E56D811C192E95542A6FE0BFE5A5 +69273C2ABED4300D491B92D2AECDD278404CB84B1BB1BD7AFEC858215837D118 +C0E928BE7E07CFEEB51A6D21375B772B8248C994564014015232A0DA4BEA1754 +3274F407FED0837A236371F1A32056240F2015B1E7F4B2CA72C6B58610A66F13 +407CFFBA5E0A2893C1F572D50F51286E9133B5A84239C9493B0574E77D281D01 +11D00683354A000C9700EAFBC1FD104EA19DFCB87470190E7E2CE26E3A6FD0FF +2620B87B82AC8686B6206B530F17E9348BC7D04B948348802CE53A312443DB87 +4DBBA5313A6A2A8DAB8A1CC9A594FF8C299281C0A261C8CB2226B732FBEEDE40 +2C6ACC74A1A61379E2E1CD5548CD908268A32FA83D8504C442EA0E183ADBF7FF +9FD09C037AB03516ECCA93FF048235BD11A25DB07F164512A079C5392AC7F889 +CE96AE5C8D9580BCAFCC087C35E76EED1A671E87C12E3045E15A687134736DF8 +DA984772AFD189D68571A2ED7256F1E204230E41D3D9DD876F938951714A3973 +0CA9310489F8E807C1C7A4E51AEA5BC030610A5D7263FF7E0F9FDE3E5E37A362 +5B919000BD94D978583B942EB79CF2BEAC33FEBC9A67272EB10865BA8FB75FD7 +9D280AB59F91B96C16C982DE848D76D8FA8620DFD7C80B7DEAE7264350D6FB3A +EF04794DA3305844A7CF718F6D1A4A3AFF6826173A076A1372ABFC54ED3AC6C2 +09C9287FC830556CA694E21CA5342ECA7B10C90AFC4783D841D7B1E34FA3DB7A +2B706F3E21B0FBAB23E7257962FC3BC309CEA2C7239A9D6B44CC96825115ABD2 +AF9A2566D2F3382C01569FBDB94C8D664A5DA0F7DC3DD140CA77C743D7BC1420 +324ECF9E4780280EB119885E96A6C619CE3C0C8E1E264E2DEB137E5DC8149786 +486D65667ECF47B1A1E20E9E6E4FC8323E0BC8E61BDD3BCDFC6575C69C03E31A +EFFC290472CBBD049DE3F840AEE37A2486034240F80E75D8A79E0762377DF660 +52B12EAA16D678990B11A9BFBC03C1D4FCDA9FD4FFBB3E88352438102F10B7C5 +9F04C013B6575B5E948FAB58EA691984A0E54E6B9F3F505FFFEF74D06FA1CDF3 +4B8A95904C8A2763AA8AF5B71D00F5DE09DC1CDF87A08B6D181453063E14C12D +B7BB3775A6E2A901636273D9EEB833EA8CF20FD83AE899E28DADE10EEEC20BD7 +BD93085A4B1AC80AC1AE8280C14767F1A487BD066007A0D050317BD081131A14 +6EA0898ED59E46DA7B6254BDCCBC660686E2EDA0E77A705A653733BB5C5497D0 +B130359F866CF293FB6EF0C2AC5BAA2DB0DED045E2DED3A2612D078333260359 +16CF0CCB272D34767EA069E0F0B0D42327A18529D72E890EDA6195C2688438ED +E9ACDBEED41E81CA8EB5E43C2B09CE266EFCA03F2D7FF57F12B06F9E54FCC6A6 +546676F6FFC5B8B7D3F0982B6FF0D21D949309F0C0B175CC1D0976F8C55C6AED +6E821C39041E22D91AB30922F2B2EC2746BC7DAB484991542FBC82D87B487507 +559AB466F73EE23C2D3194DC5CE4C9AE66D3164613AC5CBB3DB501B64DA7C91B +C7ED2EE9027FC0906820B35D4F2CF66C4F9CE4A884B7C07155BCA884ECA5EB3A +ABB83F84DB1F5639599DC7D3F51241AB5D95C3BCB7AB1EC90B4BC989F74FB354 +04B2D7366A34D335A47B8C00C05CB423482BF6C7970A95545424A08AFF9A035B +7F83F52B65A9799CE76E303B85664B624C65E9CA58184C7BE2BB9D9C86A4DE5A +8165EE3DA2E652B5022EE7893896BABD88931DE1D538F615787645DF5ACBBA0B +A8E5B899A37321AA7D4B283AC9234978C2DD81813A1EE5DB6EC170DAC1B6EF02 +94892635B498765C07A38D2E9DB0B7581B11056C28278F89B0E60998379C07EB +C0EAEDC32AA69B8B836F92A61AFD35688315B2C3F860632FC13E4BDFB63214BC +41CC6859EAB3AC3034449213CAB99FA1D216563419CD6D6CE4E1B56F33E6C654 +7AA9DCB5B05FC068DF02AC32408C8010AD004F6CCA9887830927F8CBCD49CDB5 +18CAC1EAFF815FF2F6F527F936948201565003022C6C7390B4E3C2B219FB4F76 +9F12BD25CA7B3B61D1A2F8DFEE795D04D5428B42FB66E0C254AF7B7A10CEF7FD +E5ADA5E217BE24851180E9A1700FBA66C7D2B0D7BFDE4F4EED1D24B821A40947 +5620363657F6D048E651A689822CF815E72FC8AE9D835BE31D1DD8B54C9A717F +4DC319B4B59AE073936EA40B070524C7E71D5A7B64436DA107749746B516E29F +E3BBCB8F8C473E706670E11E5B221716F315FF097CD1841D0069FA69EA1898FF +9F9EC2518C77806A19730C97F54BEAD604548D553D4A6EDB247853225E24E7E9 +89D71F6BC94DB986467E755CCC99069B313F5745B02B4BB608A39F0A0A732B87 +7EA2DED68219754BF1FBCA350327572D769C962EF9242132D93A5C8E9725D8D3 +AAAEC15ED0F362471AA58488620156F3474FA59CA080EA96FE995D2B3DEEADF3 +3141D157481C66507725ACA5953CBBE1ACEE7E3F02C72C6552D15EB3D612730E +61A06A43575568DC3CF3844BABF04CA767E2995196097015E0C4F622C4356B6B +F41DBAFD797A4B9D7AC22332C552043EF98913D0D9B50CA6B7CDAF903BC5C04F +D20A952BA5CC35B646ACD0A287C956B98C450051AF6AAF79DF37F8954473F8F6 +652BF03AE2AE82B99D820CF93F5FC0BA17EBD7AF90313E70594EB5C354023BFA +07912408F1757319C7288E99872B907D5AB583B082EEED8AB079C63E38B07D11 +6744856E689A479CB3A8BC081F33CB06755926204981DC0A45B3ACC18F6865BB +EE2C50DB43B62E3630FC1D9B1FFB3BFFAA6D0A20C0381ADF48E4D916BEE85BA2 +BB40F538F55C11D50F882B73913840B45161262BC8B0012694C3EF26452F9B77 +2CD7C7AD6BFEEAFE31C8A721C2D46AA00C10681BA9970D09F1E10DDC250E2AC3 +9A160EC8C9654FCEB36AC2B586E978D54744FC8A0E963D8EF6E228ADD22D093B +B889C940206F504F14DD921D909BE06EC9BACBC23EB9E9D137FBC983570FFD2E +CC5D2EB5D2A4A8604A4AD418B800EDC6B89809E00091A2315EA8C071AB631CCD +04C3EA77541646B7F9D70B7EA564D92A65C4DED8966517660EFB9F77E172CD8F +1B5FA83270898C3709DE964B0C4A899418435F92C13E94F5C1C5B9D7DF3E8793 +5F9E83CE1430E3EF275C26835080FD2AC78DE88BF65298A8EB4181F215181356 +A09245577F997AB5F23F31DB7E081C7385F461B083E96E3F08890BCEFBFBB6FC +E597C3F22E0F0F7B6A93C55879A8EA022411E0C1864E987D2F00CE0427E4E8DE +D92F9621E3F7751A3CE5CF1EC306A78C0D1CC6781A016A285C0D195E17B59A63 +C593D2DC78B6071636FFBF968B8E7970871E4B60DF79B9BF341528C4F0C5008F +191FABC891AD46A68212B20FCC87E25AE386DFA935CC1563EA96F1339B6CC859 +CEA88CCE5DD0993F19E3902D9683ADA47980535FB5597CF57C046C48E0D0140A +C40AF806F16E94FA0C046C0F32AB5BE121A7157A42654E7C1FCBA31379FDA9F7 +BFA8A0D0384D3B29B9DEA1500AFBE314EF78B201E5F679AA38F12A87D1E1512F +F71D12EF75F3DC48BD8BA01A6D091F0C5B2B961F4371E588F79C825EBC124C1C +E334BD4714EDEBB709068CE0669738B49AF675692317C3E530C6AE57CA21B59A +0B542AC77FF404DEEF116796DFAF46DD8C9290CDCA4A16FFE88A0D60ACD6CB47 +440014F30DA7C27C199D99A1E6D89D0A0C31CD1AD4891668DFF5FFFAE992F10E +C7B88872E9AC808E0663929D199AB424136E03E284D8F44DF9235246B9D22C9D +79BBFCC936171A58B943DF0EA5ADFE2818992B46DF97AE05915E078FD6AAF8B7 +1047AD85A1CB13CAF70D095264B8AF9A3FFE6A603B10EFC6A20DD56A9947DC94 +06DE0A6AC5B655C71870FA1BA99322E51D46A52D3E7AEF8189C9F1DE58AC9833 +7B325CC59375D0F61488AD740909A855DC069F260A465080F5570CE7D41CBADA +47C1AB404D32CBE9E1B8220A27C8003ADE08A63AB714709CE4312179218E4924 +6CDEBDCAE80C39AC4063789B6A407EA9C19D12688DF86B62D63BC05E9D65ACD6 +CD5DBF04B896DA28B466D584426F531F4A3F9C4A717A0C5ED8C8CB4191E950DB +CCD311A20B14B417714501AEB2F6F8510242AF91BEDB6D70B1A52B91FB3BBC8F +A8F9731E745F2BA8ED8B00CFD8A93B2BB05DC2DFFB5EF265CAE08E9B046C3F0D +9DD51BECA540149E202F9042A94113745077BCC293DDF27CEB36D7B0C78E1B9C +0308C3A413492F0D59409D923BB699CC6F59285CBF31CF7F1B464AF4BC054880 +B279621391D022E71427F275BF550881FEFF31BA2071293421FF99BCAC2D5483 +B7E56EDB7929BFF410A35BC193DEB96C4A1894D3D262DDCE224ADC5C6E85178B +40FE0E15AD22D7B2F6D066B0DB42E32B026967088FC62BF250842B195D82AB30 +4A5263BEC475A33ADE6EF9B4205BC44543AE6912F1B9BB3D694AF8E9CFA440C2 +E2CA5DD42B637763D9C96DA8DCE38246532ACA6AC4BD7B8F2D348A0A4BBFFCA3 +4CF17A22BF7AF3BC490D254639584011D9D515EEBB719246499AA89CCFBAF34C +77541F2112ABE03FF03C5C8B2BB07DDA99390C222C7CBC96AAAFAB4EE6391224 +6BF97923CCA98DDAF09E5E01C94798C4AE609E954BF1E40330D66423C3CF96A8 +F6879E2135374C80689F757F71375E333A3582C2886F0615F2379DB47721F6B4 +04385DAC971DE716D5AA2CA014EAE9FD0859A89CC62667BD404A071154F7015C +4E1C734081F61F33176F8805AEA5A95E427712789EF20881BAC36C6190971AFD +B876670811FEB1DBC25014AA98D3D0D9A29CA7D853C8118DDE2DC2402DC99211 +438F8A380EF1BD24B442988AE5DD9FE3A87B54BB834F2AB8F69241E7A10559EE +9E1F3DD7597A041F96313568639B2BB50A76FE62D7714AB955DA07C374F642E5 +2060C46160DE1F11ED73A837DEB4EF5FEF9BA654837203FE8BCEAC3F500A0957 +9E673A257569C4D4E6B00BF84FBE1A8C9A566A77B3693FD20159F95F66AF9559 +A80D47C776CD363E299BEEE2D5BB9B10B58B1AF2A76242D59997773834D8945E +F42FBB1E75B90B6BDE5E4DB2E2FE96BB5B8E485E42682E9F4ECF97D61D441707 +9D2DCF09A0E67F4027A9D1072FA8934106E9D7156F7333342BC640D6094EC706 +5BED449D636E42046EEF2AE810351BF1E38581FC71D1BE17BA690B2567F52A39 +1205F2704B712B22C4AA4684CB74785537AE120F66EE7FBB73A8C475477E1E83 +8D6CE79D788B1AE7A159013A2E070123EBDA58BE4DFC8BB39C3D561E2A2917CF +1B3F64217ED680EAF63F04F9415D7F9CB6A5D3E0BC2A6EA4165E69CD8F93727A +4F4E9EDA653BCA0422BFECC33066DFDF3E4AFB32361ACA3A0C339E1B4B1F99EE +EF4C3C3ED1FC3E7078F7FE282F0F6793A4C18A484F1062F780D2947F2AFF2E84 +182DCBFBE1BA25E8346045859715EA2437263F6CE83BE0B858CEE6A5CAD60BBB +45723E3858702B52B9AC50EA918DACB15EC541ACDF19782024143AE9ADC39A0C +AF0B2E4FCD4E97EB36923F31341B9D72B917711F55F4ABE40E6B5F732D46C76F +02BF82C68500194FF7CDEE3CAFE3316C4643295F769C4BD964C3BD4196F7DD45 +EA2E80DA6C2B8A23DADADD50BD28E2DD1BE5852CB88CAA6FB71C40F8EECDA3BD +CE874BAABB668133D5001FA651BE928981AD1A8D95ACDFD83095F12B3E460DF7 +2B68B2C84DB441EB1ABA2DED0E9BF8A04B1572284498AFA3F6DBD1D4DAE8D4EA +877B0AF0944DCF4B6F6B55ED1D99ECBB2A7393DDB4634FC166A47B4D5236C543 +F066200A255781DC3E2E583A0288C1874BE8C25A7C13214A79DA8062B0274429 +57264A9AD87F246982C80FF9E34473082B8A836A0C83FBB736DA740688432090 +3EC63BE175131C8CC487F76FF44F247B7951454D01876332B4DFC27CCEE5476B +68B432744A0C3689D1D79F2B876A30975783B96F904B92F39D2D3FAE7ACB1DFE +A19A42AFE6A2318B0E3542440A40A69FAC261313DAF36C61FBA307C908682BF6 +658BB9FAF140EE91B182D763130FCDF172B811359D669E86C106679FADF3E2C1 +F83685B6CA73CB8E1D58323B6A733EEEBC0323A6F23BE68E5977EB3D881522F2 +0E49440AF248939790089CD9615F24D9370355054A7077585637E6D80E13574E +B802422BDE06ABFA0D1601D78E215DEBFEA118A5CB82E68C5EA656FE97A5E1AD +01A8CD577848C5DA4B9D780BD1B0B4362FA271BEA800890613D8247171938596 +CEBD54A77CA281A5326F2E6F6111C5CB507FF35387ED3D870BEE3C9F06E6E756 +7E84D952B39B49905AC2C1BFF606AD3C07E45A768BA1969F865C58F3455FA101 +2657884B120E69D4D515F8BED9D9FBE928CEAC720A707BA004D95434D4236957 +86A7AB03ECCC79A9D33039559291483B27C66EFF11B3540F7A0E8716584BB29C +EA6259399E5FE1962DCEE55E4AFE699A7BE7E2C5081D6F025F66E4A236E95C01 +9ED2BC2B369D0F7DBDE3F53DEF90FC9F29DDADA413EE3589BA2C9B802F9B5F44 +E00109A44BBAB43AA4E86B63C6E1FE10E8C7049EA6ABAB908C0386FC64BD8C6B +BD8A089A521EB06ED2F433059D5AF5B4E1E86D6F0ACC65A5AA9665651E82F38F +10ACD33897B4612A7D0E08C92FB67193C5F16DAE8017F3F246E509422F8AA656 +ED88EAE8608354A2F6334559DE541445AC1EAB60FC9D4A66110AE5DED90584F3 +EE278836F121144C3038D3B47D9751E0E2285085544558F53464BD908A71B94B +57A71E94C110C8D8DB565A8C6E527BF7E7030848FD2BA4E6748459CB4ED3D0BB +3017EFB793B2A8627F7AD99A9602161C8FA3B0A8B89334D2082370A87CBBF01C +5F420760AB1F70F2794B3C98CDB70BCD5F437BF4593B1BCCFCEDA9577FB496F3 +7E86D7D3235A4CCB9D4320925AC726AE1A27113235E24FAD6CF43365609990F0 +466CEE79F0C0EDE02D2102CB024C9DD90E9863AC9F2C8A6E1ED0C4A2193103BD +C2426B358A2CD7ADC8C1F875D672E220883FFED285666956EC8CCD2F6D5BBDA9 +4907A3E13EC09DA98DEFA48721B1B1E140ABF1CCECC3D17D364D5CE4021B8D28 +546FAEB139027DEF6E4A11312A6357B25B6601E8F6816C413BB16D9CB7535E89 +3CDCFD4A08C51D5310A114E474CF1C48B06C87FBE85E2186D1B8081A3C9BFA67 +6CE5AB3C5ED7539F05344A2A061F5D409EC6D03E5769BC69C6BA042714A6DA0F +890B03838426C5C69D393469CD8FC4BF4C5D7BAAACF20F905FD7BC3246189A36 +E1EEDEFD3F488362478967755E9C2476A76E8197F91F855586B9D8D8E79FC4F0 +66C4D6E151ACA5B821C74BE4A19E86229BFCB3EEF07A2F6DD59F4CB5511FBA40 +378633B1E5B6040ADCBBBD31C7722A828642A38E80A42A90A1984881D9107671 +91F2A5E50887AA1B0D3E96673A3FB85D73EA75007D7E30D21C54FC8224944F8B +6FF866AC71499C6F5F38A54EA4269AE591E9BE9543FCD72C49BCDE00A2FDDCDF +130133FE649CBA9A607428F71FD761EF81046CCA214F7DDCC1A0BE0EFC7B05BE +85D1DF5606F398DDB0413766DDE50E614EEEE1EF52500129D3C6E25E09B7594D +E5F86EBEDC9A262FBC012BE5E4044B64E8F86327FB10EE5AF01746A46971BF45 +73A7804D9FBFFC791A2B38674EB34688108D1A05C6A58117CF47CE531FB6B84D +7419C0C6A3E29C6BFDD122FB1D4675D2510F27032BCBEC6BA2705EBB37367CDB +40EB8C8ECF19E2B507FA4B64F1C1293578380F289D6F006E78428669BE48730C +9DFEF090304F4EA258DBBAFD12E062FC3009AEE31047D608A7D67DBDE50BD5FE +2EE343E8FD49FC9C8914C4201E17EAA6823325DF160D9BF73E2C9A38E7C6E4B1 +18CC66F25638F5C16073F60FF83AACB10ED44C7B2F238BBA448D7C7BB5B1367F +A048C20043D7D1DECDD74E7B17D7014BD861DC0D1B968078C119E33F9AF637D6 +F35BDD606F94FB30591265CEA8376F8E0EFDB6128C4F8BAB44F2F617D4F2D64B +5E1D70C48CD21CA47298F59E8DDD674CC192BAA8E4D709D8B3D220E4A3ED5DB1 +CB68F4F000B42B8A3A3533388F08D4313F381F98A557C76DB3AC2C01DECA19B0 +D41018F4441EAE36EE2ADD3F374DEB8329ADB6D4D83A42D00316ED2633AD1889 +242509F5579386FF4CE439196570E7C170BC31197BA2727A35FEA4C6CDE240F9 +E109403A11DF708702A49F142E7F7843DF1755A7FC718E46D4D3859A738E5E38 +73CF636422CD3D37BBE8D244AEBA9A8A34705BBB855E30E4A24AB357F1B35A76 +B2EB6FF76345CEB715BE827B9FAE2D16C78DB9D54AB5B6299E47C651A3206CF1 +FBEF9D30E5CFDDF7C3383D3A4BCA1F6C1288AC61C379EECB596B5AD5EE795391 +0A7076FB3361D028784DA3C33F44BC2CA5B39F558C0364FD10C3BFA49FA3951E +45F80BB87BC54CDCEF827A06351B326BF276C77F57CC16CE9352F3E1C7577A03 +5D007A3EBFFF808679E105E63D92F5A916307B7B7857A34DD434139229577AEB +54E83EB34581F1E72EB2B19C1390FD0252720FC7ECC6254D46E16D9887506C22 +1A62F7B8CE248C394E9D0BA5A0A21C98A4602A490F5E191FD4DFA2396DAB3407 +A99AC43D6968FF654551E248C4B5C8201350D0D7BE84885EB6D82123F67252E7 +B2E40CCDB1A007E8338770A6B865F0578DA8AA590F0B04B97DE30B6D5EEAECD4 +CAA089740C38F887D7FCBAB40C497B1735068027FA29C7512D0F1FD370439D89 +6EDF4E82F94594978978948E031DF50DBCF28F115E64C14EA132EFE296566230 +75D25AFABF46E74D9CCD94AA92859D2E4A0C5A0EDB60AFC79696AAB11F91C92B +51DA6338584D3FD9FAB8E487DA1077902DCBA979E76AA5F4EB7EC5DA3A1EF864 +0D535034678DD52A68BE4A4527B0809BCF2C5A719B9634AFAA54251AC7CF9568 +B9F46C247C13AD31103CC5A830B5C5D5EDDEB919E8A101ABE06AC2C2DC664E18 +0E58D8FC646B688C45C5AA2D8392E436EBCE3267EA8037E8CE4BB2A88AC29711 +E3944EE2CCE88C991778992357087DC2AD740A5600558E97D61ACBEE7BE140A9 +6779218742B1310136476362BB5E7FCD0A8919E6AC81DDC49A8CA8C21F1780A5 +3CA00703C1E8F82C65F06F9AF2091C7B2815564CABCA72C561E6ECD9F51686A9 +F197C4876023E5F45922F8C06F751F4F3EA001141FC80EA5D9EDC797D17E994F +1C966705E91C921D73A903822F3456DD4AC2E27E9E6DF18CABCE84CCA6D028BB +E0681CF3F22BBC3AA8DB3045A5A5BD8F821DC103A5AF7813484F27A181D76BBE +048F9D173A2E929A478F60C3672F1CED13AADD2761F5FA1FB5D63AFBE2565B1B +40367FAA7E6DD4B6E8158CF3C4C4D108A8FBB2C1634C7BDD9DB85A887A979C79 +9F60EC14AFA0E1731547D89CA95F37CA07E32C181FA05AA03B92C484446DCC7C +D8720B909DCFC3142C4CDF8E0FA5F88DE4F0339F573978AFDA870DDBE2359185 +71D37D1A1B39073A27342B5040E9D6ABFF7FCE20D7ADB85AA9CAD637AF9F1A79 +87242369842693E983153F502CBB90B275B9F731932D8471244511BF76AA6478 +C8E54ADA9AE6DB8755B8305F074DE05D623FBA02FA520C88180E6F147477A96A +FD2CF8B1B32935D8F31D530F9B3207BA196F4BD470436D8B765DB2256C6274EF +B372118E5D8214EB81795788D291774D9C84E79672324104CD4F6B815F06D4D6 +37C0DCD0BAF9F7F48871A87DF98E505C69709A466FDB3DA6584FC9724F4E5395 +8DE19D2677202D175A61B314403B3D4C04C50762FC3D9D79321DC68DB526C768 +3E61C35DDBAA5E406292F56ED9C67FBD8B3C6B41D52F9E1F2B69B3D8F11A3FC4 +2ED8E5A0069642F5E41A81CEDCE1D3279894478C932B6EF8923E5B53760FF559 +F4C75BE841D1F79D5FCA51FE83656A511839FD1FF30B2755AA7307BC2C596D68 +1BBA4C41E8DC140447B586A56C30B9F738099EB1411EB93410336D9D6F9DADE6 +198C1275BB1B37C90FF2C3FFEB313EF7719AC3770B8B160E9E5A1CE82629FF36 +68B9619D1A75DB68BB29D4BAD1CAEFB7F2340D7EBB8F389F7C8CDBD216CF4800 +AE55CF11BC9D49CABCD88368605B74A1EE5BAD649007906296B35BBEBB610BC5 +96851A0A7FAB1BB928871587441BEEEADCD4BC6BA089E578FCF430B5EC558F94 +FA6506F88E19BFCF356BBACACAD66151247EDAB1C37D72C04A245013A11F6585 +0DF608E12F25B52E4DD75E1D99728A9AC5BB05F96059B6C6841D7AD8A708569F +2B98FDD42B34387F9BC209E7A16B9CB99D9C9C0A64E72618EB62BE083D39753C +DDA03C46B2C8DDD31585CD177E990C47BFA400B7D8252DC5E8939E6485EE4CFB +CAE33B74BDF02522271E53ADF98970DB92B5C391E3CCE51B83D0BC452C18590E +C819D41BFFFC4F874C17CCFE261B82A7D5EAF72F7343D57BE5C7CF90A7703395 +FAD5A62409D54AB464BBD65AC64C0F6FF7EEC03667A4CD84D85740675B4A4C12 +92728CF11D582A2F19185CA3190F778CA43EAC1107ADF6806926F033181BFBD4 +25D6FC8FAAD0977F1BCD63A23B74898D78B678692DEE5216B9CC88F333376F50 +25DD4AB937217671DB0A21587BE327CBB4EE5176AA3C4100411465B0EA244A06 +3F02C75EA14240631F40083B8B89D38FB1AFD3618E679A25E0C60D92F5E0572D +75E7555764A4897B543A9E75FBBB1728B328082324AA2E890866367A922FE912 +1F74ABAD8CF24462335BDE419364BE2C8FBDD16CFBF522731C621963B4283262 +1BDFD821E84706606D1F340258D8D5716A65BEE46AAF9C9B88C523F0252E968E +224B47B3DAAEC04FFB1A7BB28F3AE398CCFCD3B5416968B6F52B45DC91B333BE +C103781D810B091CF5397D61BBA16E9C03C3A52BC4DD75B2CB1581FCD515FD31 +2D38BAE12A1A02B7E148899315C4F1BC7E3DA59A05AA61189258E5EB51EEE01D +4BEA5A1D2899EDF6BF8F59CFA9056EA357F7C78BAB0FBD9672997E16F1F533D8 +4F9666EBB535ECD7CCD1A973BF297F5F6F8EDC283DABFE8C5AEB606702C23616 +431CFC07DD67AA5FD6345F02FFBDC9AF5150E49315B830691D97AB0E5592E100 +71ADB2D269B3CFAD3338ED68094624E5B1A41C6D987284C707EA498A0F80DDAA +9A6519001E04B180D78764AF08BED2F46480A9857DE67B15329EE282213255B9 +60E64EE7DED35C5F657C02192366B8BEB7F068AAD857C39F6ACE55E2364CC5A9 +232E07A64C696C768FA8854DF99ADFD2E1938223CF0FFE778A1FCDC6761FD7CC +3716544BA621AF73A7200DB1791397882FCFC8B63F42D07EBB9B2FF0C54F20AB +D05BE419C7ADD38602CF88F195E5DD504EEACBBC5A00C29CBD001DB40FEAFEB6 +6FF424354AF7AC66E67D0E75DB288E07DF362AA49671598F52C9C6D2CD46FF03 +A616CED7626D7F1E4484008271D0CCE4A5468249EBCC78275DFD3D9A140D6146 +C5A3CCDE8FF661B6514E12C553C5044DF9F683B819530ADAF75C1A347906A661 +4128D1BFA4F369A66BE014D726126E8E3E93D8EE3C57CA86F019EABE00487998 +BFF66C914C81AE1D266AF71A69C8544F6C35BAA3BE4BB2317672C8ECA2BD0103 +9B78E15D1CA36069BAB54D51338EBE95A9AE824F5E1A213507CB131A963E18B6 +332A0D85B82D6A333502AA3411C8D080A2350963159D1E8E2DC6832A5C87CF14 +93F7609D60928306B2E4F64896202351A56CC57A8EB7693A4C85B8E4F0DAA80A +F4286E7E3D19C9C3DBD6785109CA65A4E2C4420EDB0EF3B8767593401F71A7C3 +4B9277FF41F469878F831F5D4142A3B7BF08A2DEF63EF1B071887C1D242FBFB1 +04D20CDF0F3EEB235E4E0D2AB43D5C0C61A1221EF17920F625700092A319784D +6369C24872252935BF404B153605402FB8021A4903E1B54D37DF6339269C1150 +337B10606B6E19225B07ABD0D3EA7EDDF802FF4274E2D820E1D548074015C8E1 +09CC29D3E530B0015604A320DB458BC35D0CC4E53054734D6BB9259BE29E52C4 +A5ADEFB04E6880A695B8D4E7DCF910D14D916F28845FEDA2F8172F2AB0BB7EFD +6A41156AB5AFC45426AC633FBADEA8F6AE73FACCA74F0867682D20D90A76A0C6 +493B9FE077F2E6D4384B50037893B83266170E71770426DDF9CEB010257A7181 +3AC0A127A7CE99155C2391C81F502D5BE539BE05C8FDD83BD6B797EF2E932C47 +F1486C17ACBF98E60C90175FEB65A8AEBC9C285547ED0AFCD6E5F07062EE688B +A1EF54231AB0EDFFA2FFE8BA3140EC8BD806A0AFFB6CBA7F3E3F2CE798052E2C +8510CB5DF5F4C37936E7AF7A53751639B0B0CC5AB4B3F573B97C2D5E75BD0278 +A3EF7B79C5738B06E123A1D00B4E2EFE4871D362F6EC1D6F8C6444B9727CB520 +ED9DCEB95D06B8D1AD84AAB0CD13092156089C7FACFD509D0984AFF981A1B38B +5B9E6894BD1F68040405D472FB24FD9CBFBA8C3F6E62474EC3694796BF4C394C +8FDC9E9DBFE6C8C21BDC4A7F133E36168741B75B9A00DDB224BFD9293F6DFA39 +25111D5C8B1A9B1753946048300E92E28F53FC695AB8082A79F4A3609035CDE4 +91CA46E99453BD0B0EA9B9859265F788451D13982FDB5E47FB531BB094260CBC +9CC57ED2AD7F50820BCA50BE95C4F00A783BC37749D7EDF4B3DFBFFAB23AF077 +50F9C4B562046287F9A237D8B048BA937917E349E5CBBE700758C035C5B4F0C8 +CBEC4F3D77A9A6BBE897D45F2768267A7EDB131B6D7156BB4E17EB940E8E7205 +A843D785B40A8E63F134498FB7EB06036495624B8BD2EA2F6730BF50679B6759 +C3756DFB061607F03128CBDDBA6CE54F9BF4DD28A4AF0C452EB77B9EB60B768D +9A05BDBEFD55023EB2BBBB93176EA4693FE4E789F4C354D541DCF3E97BA25BC7 +26363E1162A3272B0D030ECF9A19AC33547F5C79755CE030AD6DA556FF78E0C2 +9E0FD5AB67243CCC6AF8B6FBA75F64ADAC2DCAAC208B05923D508E1FD8DB979F +5C16DE3557D72B87BA34D30E159A0FB107AE6E2A71B9F85A17BCA43245AF45E0 +743E5F303B040E3C04F798BF656C906113B0C961E2305634DF0E134FBF592191 +621DE4D78C94C6A8818E23F4ED24B1474FAF1C517840FC916F6052552E2EB956 +D331A17C5C26524FD3B69DD020FAD592AFBF17C83F0978BD505E04A2B8524C15 +02B617878FBE6F4F4C86700FF939FF37A6E509520C4A169F7C39B5DDB7949718 +924939E7AD0F7311DCA69171534F5C9C287EAD7210EBF6F7598EA10CA38F1954 +BC23E0DF040AFA2B5BAB98066791575795AB1410308E0D45A01F3EFCF1CBCC20 +B065EED67DD487340D1EA90CB75D81093720CF9EEFD48CBFC76F478B2D44913C +CA3F4C726E1A271D580E123BC88A5B04D7A443EFCCEB14A93D432EA7262F6ACB +06AC77D11FABF0A8D25AFF385F001D41841F218E315B7CEDE47F9FE90E5F038D +15484DBA9611F13B9E9CAD85A0C3094FA8314F58895CED63FD18EC14102D920C +26708435116D96C4EB14D8DAB6CC83A2C288FE8E09A5949BD5ECA24FAA616179 +6F05182759A103281DEF05252D61677EA520D6B5B9BB20342C2E8B54D16A955E +DDA39EA8CD1698760BE8263EDF69BAA403D2B1222FA54388FA6FB3B361928249 +25B49AE9A1A2B5D44673BB8E8A11A3E6739E487E800A0ED4E1081CF9A7083494 +C09998332BFDA0A0EB87D9AF93D27B5BC7ED34F4D7CBF9C449FA63400FF9141D +CAEA3952230272E5488054E02F4C95D5788847D00997924D29135EA45376C5EA +DF23027161431722C2C87D65FA25D826C2C9B4E285DBD6855562E454E48C8F8D +EA723233D7AF974A60F7156DC768E773D6A548B8818A21EC955C2532B1A84C92 +F5608C81393BE77970B18E0A0810C30F6CFD3F496D3C13BA79F7BE699589B7A9 +710230A35C8CA859642647263B172E0273628E20A94583270380F7491E737DF5 +6C5D355AD28284DFEE02C06E3448607D91056F2B25D1A0E0172AF3521EDC9C1B +62A35DCDAF833E99D79E759050202D9B4D4EA1B00218904511F6F63F5F96FAEA +AED2B4A70FCD11804B3542B164525753109A7A937847B4F010B8DE17C294C9E3 +9F5D04D583D97FDC1A7E560E08B5BB909FF471BB7B80342118BE0F4693C9860D +6CD372B389F52576EDD3A26FBB04741C15422637978F87AEFA062E7A81C0FE82 +37C2223E90B2C914E659904E4AA9B05528F4FDF3B2D43131452546DB208EFC3C +E27A501C25ACD164834FDBB05606DEBBE0B6859F7BA7E4D86FBDB6850A1834A5 +F58A685CB800806FBEB4FA333E9325209C011ACE3D4F5D398850BB7EBAFB0E40 +A653BAA544E3F5971E7C7BD53D33B19BDC1655C80AAF0500428AEF4B01D333FA +8F7C841B678F38EFE8137839A5D433AC36AEF1E64D6250EA28DE048DF4A3D93F +CD0C0494165A0B170E98DE5A20919D295D54FAE42F3192F21A624AF8DBA48926 +F85E8B12419DE51916902C996E44435E1A41A58C86AFB7ECCE033D0B0A96071F +2F20E1E89F4DFCCB798050B3DE7785CD89B214F2619B30EA19EC0427D5FA06B2 +9FF6FD5455ADFC322723812708203CD7D3785928392DE1CA03DA93B7DB15F4CC +8E90448F3243D8078B5B35D7A3B5CA2293A90D7B115253EEE9608F0DF7BDF9FD +62391D1A44BE5A2373188F00C8BEB5C0EEE7E22C609B39C481B8060DD65D8B3E +27A3F4F0CB8D9A3347ED23D33CC3FCC2645F4C2A4C10ACB8D25A88A50E2DF179 +7A5120E78864EC80F6015C020ADE4BE6DA9FE4118C537A26243A2EBF43470613 +45C41F5C154DF5FA7045332E126637F8855BDA47A65086818147FB63A71BE257 +F0CE4352BE986BACFD0539A293350411780D935E3A809E606DF8A008B08C1ECD +7788B7D9F2E5FEA87679ECE436D02768E6D3E560EE5F067CAC518588BB13C1D9 +AFF18EFECDF137E78FFEC4A83E002EE43A0A03EC30DCF49A228125B95375FEED +23539284B1B01521E964CDF7D99CE8377E523733E654D8FD49C84B87E9D17B5C +A88C673B5291409930DDB76E812A10B24BC5C4CC620D8A463CE6D5DD5E1C4416 +A3641E68410D4247CBA016AAD19DE609AEBBBC518971CCF86AD2D42B5D5607EB +F1E8D9F1775FA06FC9D8ADD178341D666826680B3C79E72B8DF49A51CBFE3AD9 +613A6CE7067C85913D9C99001D92792845F84C35D5625DFBD12F47F3587CD09A +4DF08BF9F945C9DDA34340304A5EFBFCC5EEDCB5E042C5CA0744B599DA45D9BC +D08AE3582B7A7EBE5A2F3B55C5EDE031C505AAE1DDCC8CE36074DAC3214F98AD +3012DAF6B549EC3A8AB3D41A142503A8486BA3D6E94C8FFB03943CDBFCFFA751 +86AF2D51910BE82BDD69387994A7603027D06C90A7D87B06DD81FC608ACE9E55 +11A31B25A82417BE72667F903773E0D848A2618C6D462B58E3D5AE7270C7410F +0B58D567F69497CEFCD8FC6EF2D1C34669DB68C092AEA35054B32BA9A78D5E96 +95891BC1087EA3D747EAA525DAFE23E6C8FAAAA4E17D3EDA5413232203B5D278 +6501D86BC512914109DD8DD72C7356FFEDFA6FE3C470F0E5569EBBEFBA2000C7 +EF375B9CF1074882E368ADEED4EC5309C8B2A8E6207326719C4AF3B4BF7D8A31 +39D8DBE349FB331AE9EABDBF4CAF4D1B31694C260B67F14D4D4DF6000BD59854 +5F85BCB7685FC5127C97E5EF6AF2B2EBEEB0C541173844DF3144A5AD4324690A +A7C20024B8171E5C4E6E094EA34ED80BE796EE2E8623B21F4BF1BE80198EEE53 +FBCD1F0C425E8AE68B2F12C0CC156FE0CCBB3D8EF893119D38DCE40F66FAD8D5 +37A5741BC4E0DFB138C08E33C7C4C0A9114D93139D62C0AE6B62AC27955B982D +7B6EE03AC9B7533EBCD195960859D6829420AC850D66858FC22E16166847AFE8 +F4DAC0BF374F5F563BE3498F657B53F120513D3154E0773805B961BA1C6EE351 +3DA5FA76AC9BF417D6C048EC99A57DC05CC653C223D3F03D8EB1FAE1374DB5CB +16A83FD8E75E6B0EFCFB33B66BC629058A3EF4E8340E91A04BF251FAB4FE5F8A +D98AC011405CBD45C49F696C6C2533CE3983713192E196D9CA3B17A02A35B28F +A7B177DC0B51B718F45956624FC564F9B680CC164CEAF841A1C3A77F779DDE1C +4AE1109DECEA1821548837F67DA8034FC40A4FAB67E070EE18CB4CA12271FA17 +A1115E6F23C594067B7AC06F965062A2ABFF17F2997C332FEAACA0156D477DBD +07EA3FB4CF506DAF89BEF2C9D12EE71E233C7B7260CDED92C8EBA35E41223AA9 +BA6BA26CCB4D6326E44E96994B2D9754FF2B461C4A4D33FF3B7029439388BE7A +DD09B0807DAF4B7D7D52E4A4C6E08B0CCE89673BAA4024EEA5DB21409ABB27E0 +98D97DE394E6503C5656F242AE236898B6EAC00A0AD9A3D55CE6FA560CB6EDED +48BBA43BB483789696E8E999711F1FFD16843EC098C3B34C7FB8BEC701DE86D8 +27D1A645A3FDB11E4EB2291BAED6D4AC97A5DB3CB5EE3A9B2A101A8D8BC6F53C +1DFB60ACCFFBEBFF8EF679CF1656E6FA61B8A00AFC8780B2C04D25A0500D4127 +BBA8E37A4FD539BCBF67D5212DA971B2095496AAD0D1B9C4E0B76F01930CEDE1 +F45A86A82C1F98CBEF2ECCE015D7E61C95A7570B5676B60C5B5669B7ED30FCFA +1023B531B8CAD872A5BDED5C1488BE6B0AFE7D76F0FD26E5386DAE088A71E3B8 +EF98CC04EFC8DACC8AC8864B9C0D36F796EAA683305BFF1AB160CA1AC52769D3 +BD5A92C2E5FF84474A0EF6223D83384CE23A31A8B8FA9AA4AC8AD8F325C0FEF4 +9866992F728CCD7ACA2AAE23C684D38B062E073FA74E3CCD8409413E5848005F +5245C056AC24BB85432AFCB176D8D86F60AECE6D6D028E85F24F66C3477F7D2E +41D6E092C40D58BA9D0BD8DFA07D150767DAECF2508C0F332B1BD1658BDF3980 +CD433DBB1FDE999A8A754D159439BBDE0F596A88E569470582C1382C7C444713 +065702ABFF4F8782D112A7E79FE4CDD21D084655C5E4041D4BBD49CD11749D28 +F541D4AA0D1307F3F06B1B2D9AFAAC88E1CC558614631EA8545CF82C690A9E0A +B91E3D17D2F3F5987FD8F974F75E922E277577C89BC3F8C30042F70D78202F17 +554BD627E34480E13105555B38E475A89A86B09427DA87EF42533A542B6D74E2 +06CBDD5CEFF57E83B428CB5DD64CCBE27D20D419825E91A16B574ADC08EF47B4 +5C691D2F95B3962826BF29F7F9BFBA561237248D1D9A500B6148074741D9D70A +73AE5866D8804DDB686A04D06E6B2CC1AA12DF4D49BF4FC8D36A7E9BDC419FA7 +94AA9DC45A58450DECF34D1556F95C706AAB137A81D21A8D5A1A5776DFF638F7 +B7D09438E1559BE5FAFF38BC59BC83FB182ED1272968BFB4CBF6E9781744E163 +08CA2235BDBE3E77C3E1A8241686B9654FABFF92CDF80DF6159A52E46C4E7417 +13755AC40870893F6FD25066F640F158F5A73805F1DD1B77DD2789367C4BDE14 +48226ECD034467007CE4873AFCA1D462D68D0ED99396618D84E52045D3BE0800 +E35E6927ED42CFBD79999AC375D3E7049D04534A83ED14B0E2890EEF497ACC5F +D082DB2C6678A90D49CE9AB183E4F0A1ABD4CF969B5B4DEF3EA07D52B669BBC7 +02430BFBA84BE226F631111EE1D33E1867FBA3C2C732F78A0207B7CE7714A329 +E8B883775998789D7493D60C51655A42DD182F288817CED039B84360091DFAEF +A9307393A8E24E8B87CEF2E5F81FA97ACA56759EA1D1EB457843B877B609AAC5 +ED2AC0A27930584CE46AFD4CAA7A0BF127EAF8A510C2A474DA3D03A002668DD4 +D93C3C390F4A4DD886892A56BE8FC8959E61AFE3E297AD6C88BE659AD2A162BA +0843D3C60CD263CCE0FE221C488D526480162A51222A67F196C80694DCEC0F25 +D4EE68A899F19EFB5554035FF859EF5BF011F1AC39B69D22F1877240991CF290 +B84B204CB09FDD7781A5F4ED996319059E9BFAB851B93AA982239C41C58D2D49 +67CD5774C4C9421A01EE1C56384D34AEEC54C8B9C77B3716D118F6CC660D6517 +4A0C53D48D57C7F248DE6913BE2423FDE22A29BA6F4548CEAF00AE53AFC6D751 +5F74ACE635376F392E906FBE8CA6FF8581B5A2B1A9C04A9D42683F22C5F2E2D8 +655CA77CA264C6201361EB8739FEA34559FDA772E4972C4DDDA695B64FF1927F +B7C50B5E0CD9270ECFF40BE113F9C7CF6BA73A0E400B1812C50CBB2911573C93 +C344590DE18C24777F772A882FD6A3E2F6D67BC7FB5EB199DBE4EC1145BF8C73 +3F41D7468EA2A217BE9149B76C611119DFD283D87D03300C59BC8CB643F8FC2F +B724A01D7478F44927AB047C734704A79B8293ABBDEE9E728581AA72EC3A0092 +B83B064CEB13B27FFF6AAD8F23042AA78F1CA9555EC3E2B37E1B3F995397E66E +7C20CD0E505B5154A145DBD8646AF0B379B68CC3086DBE6266568BC696DFB656 +40BC29285389A7C70145838D92A435E30E7E7E7F6FEDC50C172174A92906FA8E +767D41A27A738D40E58324E6E814AF8D27520C230273714519F09B76814BC764 +711609357466BBFE4DF9FD471A78F57808133E6C544E869B03D815175764ABB6 +6B007B7E87BD9D405FE6BF5D5E2C5E463CDA41A34509011CA331D1EFFFC885A4 +F26028615816668F12074426928F83FBA320E6E5B0C391153AF550BB8A611654 +D07FAA57BF5845DA21F297738191532B7BBB83DFAEBC78A96F41BBA5F963ACD8 +38ECA80621A53A8737FBF0D7AE784E7DDADCF47A7B63678EAA15AE68B13B1889 +D479F9593D47E829FC3EC89C52E759838CA28ABC1F3FC3A7CC13BEDCE23AC300 +F82ACEE093E7ACBAF0CA6B2E0592915139D3C68CFCA31502C4FF14A21F9A89CE +D6CAC6FED66B2C9D5B55EE47DE4AA52ABD3D72EC426D74A0DE901E614BDBEB9D +AF3C50FB84C5645B24CDF37B8A308C5BC8387034D35BAC4E08E80C365C4F223C +8EB3A88E61A505F32350EB88139EFCEADB63722BFB01D0DB4B73BDBAC020BF4A +FFD76EAB4B50B7A977A1D85A72CF6F1D5219D64604F40BD706A78668EE76BB67 +F21DFE34A71510E4D536AD201C9F1C047D14B5D3B9036CA37265106B92136C6C +123A305BD4ECCBDECAEE4078E736DE6A646485924F6AA40954ED83ED067E18D4 +F7A0518331B65190F8606AC012F1EE90072CE6C672FB085D1A396C884C6EE35D +1E96B60DF9742678663FA65F861D7C41DD9CDAF15A5D62A97BCD039313DDD5B1 +3A0C584BB6160188154A1DD9B337A94216AE66C7DEEE9D560FDB527E934FAAAD +87E65FB2C7956634969EC5C1F1D484702CE0709342E8AD345CEFA46E893519A4 +A5B8CCDCFF492636AC2FFA21B33B65D1E072CC17F6088B492FB8478BE571431A +12D63454E07CE654625D1B4E871957C9EE6752B0FAE8139B8570D47F0C7E7FD1 +50B3ABBC412BAC4E514406554CD3263834C0054F734D1F10C75FF7C28CDCD64D +E9EB343656F418E2AC159398E5E704D00E2F60A1F22118FBDE07FCBB873E65CF +B3194F12002D732D073F4FCF989B18882FB1FF0F6A4D52C3F8552CAC652B4DFB +FED5EDDC9A68EC711DC993065E265C3B73CD97EA23B09223EBA64DE7E5A83C6E +4EDBB3302D384065EC1EF76FCB8FC6420A317CD00BA4F8A9CD51E93C4CA2EB8D +2BE5D56E659BEECC8DBDF65F30336A75CA3FEECD9EBF0A11590558405F8227BC +D967B6C9D9863CAB24959403F117E04A6701854440F60BCE6AD25C6BA2082B57 +83B534FFACCA1B73A088AE1ED54EAEF6E588C4A7F8D8FD5B2308CE6072D11E03 +0176C1D861A65EC4D99ABBA6ABD85F2D830EBD4D8647989479304FFA1AE5CC6F +BD142D6FEBBF6FACE8AE2518785349BA310B63E0AF99D06F80DFFF9EFB122332 +1EFFF408DFF8C4FD6BD910C29D798FFB849E0ACEE96C907E6023814FE319980E +1DDFD0B76C45AE29494D3EC44376D827AA833034B561E2E42C84994A26A78A45 +A0B5101420E7E48E1CBF8D2475B9E25CD86D331A56895BF7E2B5553A688647FE +551D14769CC402F2B36C3927325D6FFABC804D02026C086964F134D75DBED488 +BF57F1FD42830E688214C5B184B42EA514C76058C02FAB07BF5865013FC8DC5C +BBEFAAA721CE4AED76473F34C286C5E77411F8F35BD6ED61E0E54CB717DA80BB +E5CC6B129A1BE37E30C6F8B3B66FBB3BFAFF06DA53B3FDC6D8BC0B3B972CF647 +BBA28E28F90E0D9DF25AA0F331F0B18B3DA3926977585B0CB051A4C6AEDC76DA +9C4D6BF37A4303C20DEC8E040E54B78E35CBEFB6B374ED086503C5B2A69FC582 +C4D2B267B03AAA34D2E1696EE995898603928B80B18D416467127B7686EB9CDE +E7EB296F5DED7B6B83DEB306FEAD6B0A4C506E7A78082C30952A4DD9221D769B +ACD6FD54B80D191DD6ABC86705CF4024CD769C5726B817EA1471E92E371AA8B9 +F4F71FB7EA464B98FC26AD1F7B01B7D7DC50A3C307FCEA591B9F54240B358472 +3F66E4A8ACC815D23DAC48D0AD9E0EEC5DF9CCA9A7056D6F9C28CB1C23EA57A5 +D3E25C09A707DAEB261B0F60E2E5FBB4BDEB157EF11ACB5CB1DD6ED37460F5FF +E7611B0357913950D9FD22E56311E42CCD2DCA7F3AB2634E58170406F8E460EB +B06F189D323A095C7490257D2DFD615262D17F17B0A941B2BDC2294F603D51A8 +03B4F7F6BC4AC96F5DE294C296C094B3FA36EE8BDB46B17F1CED0204016CCF35 +C2F6626DF244CCCDADE331D6511545012C0042F24A4C962A143DBC0066FDC823 +35DD959B45BCD2B383940ABEF43F51B607091DDB9ADEBE22722BFCBEEFF4C6F5 +90DC7B1445AC056E1E2E96C5CE43B13C27519FD6DE8057E0F880DAD5203A3549 +78A94DBA197319E339143F78E3A2C27D557A10E1E74D29EE3DCC56AFB7BB2012 +191CE3F972D8D4F58FCE4FCCFC0C6DAC7F4BCE96901E637F5CFFCCDE21215A34 +FB848B7918261E8F9BDBAB2CB0FDB49A86269B94BCBA5E26808A74A80DBBE886 +80E25FDED892A5C46B6CF076FB9F1732D55AD824DF1E2A99B6C56BE988617C77 +F07C827C4BB559EC53EA89334277280F6C5C9787B1C467501A960A91608DB875 +E2CBD626FAA6F5F804A8D3EF1EA56ED51CA888D394AE4C4D692CAD09D1E377AE +7520640897F86878595EDA1A24FBB1713821371DCF31195356E76855AEEA33D3 +A088FA68AE629305CA9370D7A635F9F622A3651DC21908C33D18EF90AD82758F +1078B50DA862CDD8E1590F2C70C4820E5CB4EDB4E892A23B8E3E7111D7962DCD +A447149AA7D72A02809EB594EEF39DE49F231E7C4482E5519EC25815F3132971 +41AAC8C515325FAF06CDC6BEDB63F33E500E5A9DDA5BAC7801BF94C78F8BCE78 +8F4834269DB9E4FFDCA6E343216969D3D4CC7E33DF11B9E03EF505075691F101 +963D953E64F9D713C1398FBFE4252AE242E78815C614557FCBC9B037010C4D3A +17EA975795C34968F38C1CEFC2C85E12B6F9BE2C3D2097FD19449359603CFD4B +BFB1173B083CFF3482041C38C9338DEA1B737025F82EA84226165CF40AE0A0E8 +44EBA55369A2FC341802A9A96191FF2517FAA3F89519A0F1B48D00AA634BE806 +063B1CF16BD801E7FADA2D7023E1976BFC792291E67A858B3CEE43E2D563C43B +9EBFDB23621A0560DFCD53612D87C881E175643FEA25853A658722AFBFE0A30E +C82AD82C47E600F1D7065DF6B3014C9E27B891543F99871415387B024B7076DE +44BABCC53F9DBBBA510E87998E3C628B412F98E6F383F4FAAEF3C2BC5EA372A4 +4811FE43FDC59A904C1A3908391FF0A696FF449F6CDCF89287A77959DE20947F +1DEA7FA113D4F04BC0CA58E1BB752C9B177263EE62B3077844F213DBC33359C1 +F76E305B51B2D9C99ECE72E99C4C48960650BE4ACD610F5168D32E38B3473F20 +105CCD5EF5AF500BACB7903D2D769E8D3F74C2ECD311866984955BADF4E7C95A +23C507C4ED454D2079BC2773FD9D0115C504FCD32A06F30D13DC8B1A60619017 +E035B4028B5A13E082C09BA0E3C9EEFDD5F90B8C1DE5123D7E076DBA4BA9D793 +FD451B3649100EB0AE054CD40FF05CAD4119E2D6FF161280E396B4576C6DB72D +F39AB0B544098C667CDE016451E64207531C5050E4D6B4F98D00FDCF2996D724 +9A8A5F24B51C769C2C54FFCD2C6149231E24301C1AD8DDC9078A5F3CD28B1EC5 +5F5EF97ECD39A1905BEA0719B47CEE618D3E192800F009D9B5FCC4A5503072F2 +5975778DAB93AA93FDAE58F4C51EEBD37119F8D6F041F537B09DB0FB16B4429B +50E36E0E17148AB5A03DD6F5D4D9D7B3822DA4A7754A7F91FD7F3D19D98780C0 +4D4855C3CA007BAF7D765EA0F37011C792CE7FD4A236DF2A04D46E2F027A74D6 +55A1CCB98F11C0A8705D49AC4247B056535AF9984C9F95E32C65AC985CB70C61 +08B6ADD2A7D1647F37E9808623F747ECC17CF55186CFB32B81C7864BCB83A290 +79D0F4944369C7F45623168B6BA93B87381EA1FF6C3353AC37B1E42E74D65E34 +D7A347547E0A414E82E70884D1D86EC9A2D4DC8FC0005827839DD5384BCC8625 +A3B6BA8180D1AE87A6A854C0743BC590C51528FE2BA32A98C1BFB76D21DEA20D +E350EAECDAE0868B7519244F4727E0364CF9FA32421303135AF8E2B7BFD9E3AD +6626FF5BD185830FC1BC301214079A4071287493CFC6233152FA3DFC40B92F19 +B98E92F5E16D097520EED2156853E0834344AF12D97CE13DE23818E7C20208C8 +73550C323B4CBB5F8FE3626723EA798AA82C89B226C21C821DDDB1B7B9D9EA41 +AFC12DF72E64A64546654E8E3663A60629A696F16719CD409F6A05C4B3C16377 +D0CC1BB270A6190039BD94F2BB959C20E5B4DA9898D8526321DD89D8AF8061F7 +EC4BD1AF9C55923D4AA816E0FCC575501FEEFC45D54F7280AC86E5E7F141D624 +75B6AB037E73FF8316051F24F84BAE64693D1F74DDEC8EC96A1E012E5A27B100 +154250532668782C814CBF5A984D07B461A328B1EF9DBC1D3B1B1E6C57D11472 +8FFC5F1D95B13027F3D4DC4F29B0791A6F59444211359057C12C711184A595DC +61CDCC6B085FA277618AB325EBBC64BAB4B175F79D8177977F0F1A6A04777599 +FC469FFFF183D9EF57B534A3E8669E112C96909121260DCE0612350A0DDCD116 +26DB29601790A870AD2BD5BD7BBDA5D67A7E440D24D1D8C9DBA749ADF4AB1EC9 +EECB799B845E126E9D6B107541B2034EFC728B5C7B4B659A1EB3554F94E973E9 +5CD782C0A5DA76E9F1A150820E4DEF5A9F5908EC5B7D6F4F2768CFDFE3BD7076 +5983E1DD7D83D36213396E826CDE48A1BAB0F1A982DB37C9874FD66DB6BFD7C9 +E3858B9DC2A4187207FA4DF201F88F717CEE6AF78BD7FACFCD5E0053F08E2CE7 +11FBAFF328C356FCD6EABD002E13064E41F9922E35B911ACCE89151FA57448F1 +6E3C769B7EBEC2838024A7F4BA53918C563EEE207829FE15493A91B9387C6665 +8DD965A48C3969CDDC7BC2A8FBEAC4A8ADDAF244AA2A07E8869C0358FBAB6799 +877255FE017DC69BB05BFCE0A4B84682D2CC80D1B5901A8B5AABBC43C5B9127B +F1F9C7B7148C0171DECA80BE75C8E47FE65AC4E5B0075811DEC04C7687CB14AB +C0476BFAE0D08A3433C6ADA9D8B6D3A7D09EFFBAAD0220A26BF4C1D063348826 +63452900215BFB423749E22F640F3E6D396A7185DB8CE4D856ED43FFFE857745 +1ED28443DEA7081564C36CBE41E4001D3A20F9AFB1B359A4CA1C52D3FE1BBE10 +74202B8EE40682870E1AF5C9F6A941B632C25CFC1742CF6670DA62C72EF72B3A +C436D379D3FDE2593B93A35A3FD631DB1C0374FC76B59E02E2D9618048DF2975 +51DC64D38EAE47F1F89CF6881F745EC712987491D1B0E473DF85EA91766D4233 +51D323405551D7E1E4927C4C6CC4B21266E0FD629E853EEF24C970B19C02B05F +0B4BC79965C85DCFC246F48A3CB511C82E1EF5B9BC1C0E0794D302E6993C47CD +A108D21396BBFC0DDCC2653D7B9EC57EB9ED5B9443B7017691BFE4F9DFC005B5 +CFA41C3E11D3DCC5DE9024DDA2042B9F61BE3C3ED2E4C97E66DF83C8F261FCE3 +C2FAA67DEFD34044D9C69D2E5D553B3FE51E92776EEF1DEA4D0A738D8CA7B7D2 +108008A37EAD7F2AA5CE97A89089D5F9F0919F6D04E64A59D4DC17EAFA942418 +007A2939220D351CE81739C819E206E7C12CCE7F1129770259B8DED1DE45222D +E97401069AD20733AD76F07BCA85F8C55DC84D9EBD4EED68FEB03A04BA37014D +C7DCEB4DDDFFDCFF88C2B5F48EEBA2F0127706DAF153E7335ABDE5B33C394635 +9D0D219799B944C933A94C5CF53A7ACB03C8AB948CEBC61272CA5FF58B15A1F2 +3E77F1CC9F0975421568A8BDEE54E1391B588B209ECBBC868DD9454616E33618 +207D8ACDF4A855849B1BB91557E75F393EF18ACF2B6FF2161B1BDE8A3E8B07F3 +09BB2F0B9A51A862680261C3306ADF71F344FC5F4E9A3008D3A29B3C1ADF4807 +032314F7DDAF488F88D74F316205C0B6B76696243699BCDB765E03F5E30F1368 +F5BF9C95FCB47E968683B090F1E3F8F036323F9BB33CC9802B1E829DEB94EAF2 +18887DE86D77C870F4710122D391DD743C5FB99C919CA1F9921C9607C937F081 +0ECE41990F33A70ECCE08AB7A25AC17A8F1BBBED87973DE7A017892257D93A63 +A7950C5EED71E6E1FF34C932BD061C595826EED750B53B6C4F2A1DA2598AA85D +1A40DF5321CD5F32E2C3D5C1DBA042485148B8BF47BB5D0300B7B4A18DD5E4F8 +016160514200B5415BB2F1F5DF6ADC4F653E7D20BCDECE3E51622F703228840B +54DE8F1F4F374D3304ACE67CFCF8EB97A39FEEC70476EE8A0540729AEA489566 +945563628C639B480FFF4692B34FFB6273EF4F210407A3014ABFC5899EFD8CC9 +ACD0345630AF32139331F6B2C353D47D78887613EF12BC65AA3C4A8BFAE52BC1 +3899D6F419C293E1FC65F3E2964D7C6757B573E7A5309FB389ABC5776CDAEC27 +3A372BE7DFB80897DE3D5D89EA343A9D7349AC92E81286557C1463CEE798E809 +16A6653CE0B033FC31C9B69B51D467B8A14660EE4D22D06166220B4544C8ECBB +85FF4F63E60C9AB3E4E47D6CCA0EC1A5E05449162684418D16881DF68B68DD22 +7E931B08508A33BBF1EBC4A8EE3E3C87FD9E944DD16478A089A9625153109BFB +C385D9C371A2F95EFBBE2E95694F29B346DF5AC71D167FD020A767238D17432D +F0BDF1FCB84DE5048D2EF789D006256A19CEFCDDF265F5A80F7FA9DF2574A7B2 +D6998FC6B01A3B3CD17CF3749C8C8B9B0F94B0BBBDC8F916FD9B3473F8AFF71D +295C15A986743556CAFDA42E6BB0A5957C3BD16AE677E4DD5EC965725B69F5DD +ABF7B2DBE8E6E560F378F62EC29921403B800AF157DCC57CA0D3707DC423FC55 +4FACBE6DBD14FEA4BA532BFC497422E47F2EF9F33396C0EBD141D851BBEC4FEB +0CACFEDC785AA375A4AC3BE7A7E12C07005283AD76674DBEB1028462BD9A20E3 +BD9EF054D89BED09E260D3226057A0DE3D52D471C3903609B05B6063AD76B450 +E4D7BBBA119F0F2CEC35C41C53EDE4DC0B7AB0F5D6C25FEE73A2ED93FC96348D +63D35B66CFD53FFEB70B4B0F791472882EA74E1E1452E8943CB30F097E6C1D4D +9D2E92457E356DED6FF47B528D354AF5C88AA49A697568E7B4AF7F292DD37F56 +263DB322BF3DFAD05BF42A358C320136591EDA0CAD5ED65378A4A9ACCF2C904D +8FE7CE46D728EA6B4CB4DB2FB1D6671F5948DBD4D3876773AF0CD40AAA0EF26A +1730B38CE86196A8838885680CC8FCB1EB5EC2F3FF2F96039061EB5E108FC080 +0DDDB6E570E231C1B7605095AA55B334244E45FCC9FEF4545876B2886C1F2E52 +3D88F6EB909C38D992A5E3F6C5226DD5A98C7193790C2780D8496AA29608FBFF +7B220B583E8406AA97E236E472BED19F58C83B7C14CD7E330BE705C1ECE46469 +447440059F8F0044521FFD0EEC8467F1A0C913DF64BC00B7A56A723153BE70A6 +CF839A5EFA7B50E02AA5D5FCF70B6A96A39DD8A1FF6E35B6539AD7B91D4F5E56 +B96A6754C12CED2456C0077B67E631AB54BD2B3FD8B31C3BD85C496C3438778D +9882AE5C970FDEC213130CA6645E9FE2EFE1614BC2DEB3577AABD0DE5D6392E4 +B1EB847A029B5DF9C6588ABB5D280602DBC6A3981F62450DE1A79D47844A344A +9E2A1B45A0F409FD1CA9546067A978708C33F035D57AD24140D683C1CDD8D922 +00F8868AAB203BEDD34FA35A2C6E83B5410E211C9D61075D5F89EA52106EF4BC +06DB37C9A66E3DF0F4A9CBC829C038EEF4F07BB8DC09B61D19B61AA48B3D8B7E +B2545AC022B57CB6D78BA6ADA8C5287C0A3D2F086DFC6F70BC9CFAC4B3A88F62 +898EEB7A17AF834D22AE3D7C06A3D5979F0168867910B98E4798B7045FA40C0C +999232D3292BC97604B9F5A800206601232A0D64C3F9B6BCA7A081B1EA41ECB1 +76F00A667EED1F9BB64E17505E77883473FFE3526185335F0D4C20EC08246347 +09D92E7AEDD2B2620554223B29AA0AC2EA49D92F6BD09A04324A747DED51CCE5 +A00D55B5060828AEA0D791D0049C05F0B395F29C78C2F0C99D00D6906BE5DB1F +F29F6354B52CC13835172C5A2D985EBC145F76EA1DFE65DA54F68B1792B11775 +65484F5B10309D39273C49A79CE3CBFE1589D9020EA27DDA1D5E9400E98AC732 +2C50070BE72E4941A590C71039D41F4ECAA25D32084CF2FAB186CC0BD8D33556 +5F7A251B0AB3630FC747623CE173DAA92A76A83073F51880D680A5967B784813 +C91DDFDF9F9A9979A8E4FE4D34137CDA38E54F972D6A172C2C75B5B605E03719 +84F46009DE6351F095CA507E562F41FE7BAF40A9D9C3646BEBBD5DAE26AF3754 +C0632B78ADC504432D92A48E503C92B1C071048F7D58560F2DB0FA42A030A1C1 +1D79E7E54CEFDBC88CF6090F59CDB8F07FFED41E648323EC1CFDEF3AE91E169A +384C566052662944F5CC95AEC8B7BFDAA7E44AC87CD75FE1742A9A8412634CAF +C27961137A41991E91409BFC4DF39FD05911C6AC6520E93086471B090685E3ED +24B260B73772357438A3E1FB486F7464A5DDEEC293D6C83840AD4C8D9F198506 +E19752843B5D9A3073EF5F2735B9C54511D374D1E46960DCCA08C043C65E059E +0938011BAB8C39FCACB54BA0BD9BDCBFCF56AC092E754CD072C47A0326BD407D +E4A17623A5B6257CC054BA93725278F9E6400D167FE02F7F0E36A2CDD7C8516C +5BA75DF431C05A1C18A3B3A98F2CB24AE679A4CE799AA77C8E3C77B77A1EC634 +48CFE113E29E06DAFE8656EF896A4B7CBCC62211092985E86908F7914D9E4CAF +2D1B402AE73423C861DF93B42180530C9403217803DA2F4E7D985355C1172E62 +5276CF524CADF7B5D35E0335227E1BD5C69282459F753B4D8184BEF52FC49A3D +2C49CB5B8CD49AB854AF7A6C744F5E4F2DCDFF4A7C294F5233D3A22D5239C874 +BCE61A6BEC8A2F2AC4CAF8809349BF6A4E7355BF87DB6E338C827175BF481F19 +9A874331B30B9196A0DF41258FEB35E2F56126F51800E16DFD0DE6340C1E0DB9 +5ED2B6D06B7284708C23A7B568A56249A9DD376A79695C591A806E3F23C5E0E5 +E302734F4AE59890BF3453923D9F26F46AA44B673475E20BAC6DFF99C14986F1 +CFA53EAF5543DB43CD32E8349A440AA0046210648904686280FFFF643B17F13C +7D9DE31161A5CA8AA10052DA73B15B619AE55D232037C23538658BE415B1CBF8 +DBCA1B1421F74DB94D3E6C365B4D9FCC605E24D9DA58E6ABD5E3E61855807DD0 +E0E664B2B5D04EDF15D8712C0DCFE47FF0CC5F7618A8E3749DFFD6FB23FFC6C8 +45A60F07E67B8C973B7A16E1FE5B9B7A8289165D101B26A8314F356B89222E65 +5F16A427E908228B8AEB3BA3553D06607337463BDCD461485B0D5B7430A080D5 +DA2E207515B5A3AC7E73E730BFB373DD85234FEC97244F61C6D52A5DABA07866 +8F3396992CC1CA9713AFCF7BCDDC5329D0E6DCF5366B38B14C723089D71287E1 +6C9304DE6282EF986B0916DD21E9B0BCCB0AA2979A3D25A477501F4D7EFB34E8 +D904449D83F2BBB13DD219B50734581D304FBEAC3B8128F7CDD4ECB08F2227D9 +1048309F7EF797DAC8B6F43B188C803FC8251A6F22C13C3E8F3B4B7DC4D3AA26 +5FF27B108AEFAF31E01863970BBB44962D85559D904E35E384592F9C7565AEFB +E5FA492438CF77145954A3922F5EFA27F384CEDF1E786865243BB2552A720BB2 +F1C87AA58D00F97599FF0574617C001510DB77D3486A08E6925BA99FBF038FA4 +B0792180CF812F96B2B0C1F99BCF5E97B17DB2082F06C0462C608A5F83D3A905 +95272D5D904C3BC367D8E447DFDBA7C20928AEFFC40E6BA076D4D5FC0D968980 +42A5266798BB8304F75F23EF101AED2A933B2DC838AA3067AEE473015E4D8C8B +4C9CA2ECAFCD96247318F9D9F9E9590FE202D29EFB383C422C977009A6330D46 +D019247C030B15915B38E1B82D8FDC46463517960F8D41FA64F149431EEAC6B1 +DBDE1505B262D025CCEDEAE1D0AD580974CAC4ADCE3C843BC6B69E65BCB6BCAF +14E0A6AF1016E56C6CB8D03B2670801DF17C8FE9457E801C154DBE9B360E18C5 +C368552620AE1F139A7623D341C3513CB59FC379C7AA116E7201DC64BED6D045 +307E06DD8B0F455C2305C7DA7391F75E1C5137279BDAED7DE304025D1FCB5A3E +4D5231D83269E3C0B4525DF25BB12A3CC8CD081ED15C98D998A05E7A8E7EFA08 +574C684A48C0EAC6E91D256CFBBD21FD30AC9CC5AA4E6568016E59631F37700C +17DA8A06A95EE1F9E7EE4CA33AD6CB2A9BB9EB32A34305B5F56632CBF4E846C3 +B11474D88FE6C102C0520F484FE782E5F56E451C036FCFDF45935BBE9A7CC20D +367A403B2274FA0CB256916E11617838874E7F848D08E841815A5ECED6F4E422 +7923D061EFE5A040ACFB413712AEB73728C3AF751BEC7F2E828730FCF2EAF2A0 +1D48C676097D30CF0EDD06BED2C7FE6ACC1CEF8D8654A61C7B08A2211F57722F +9E31D0D4B0F5D23734D3A4DBDA7A17DD5FBCD6D138DC373DA2BAA3D97D533D6F +08B9C9B5E0A1C1910A3320 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +{restore}if +%%EndFont +TeXDict begin 40258431 52099146 1000 600 600 (am-utils.dvi) +@start /Fa 197[25 58[{}1 90.9091 /CMMI10 rf /Fb 197[33 +58[{}1 119.552 /CMMI12 rf /Fc 145[43 110[{}1 74.7198 +/CMSL9 rf /Fd 197[21 58[{}1 74.7198 /CMMI9 rf /Fe 134[66 +66 2[70 49 50 52 1[70 63 70 105 3[35 70 1[38 58 70 56 +70 61 51[42 45[{}19 109.174 /CMBXSL10 rf /Ff 142[58 2[71 +103 6[44 58 65 6[39 1[39 25[94 3[97 61[{}10 109.174 /CMBXTI10 +rf /Fg 144[71 78 113 3[43 2[48 1[71 16[78 12[87 4[103 +65[{}9 119.552 /CMBXTI10 rf /Fh 134[73 1[99 73 76 53 +54 57 1[76 69 76 115 38 73 1[38 76 69 42 63 76 61 1[67 +13[76 4[108 4[52 26[38 46 32[76 12[{}27 119.552 /CMBXSL10 +rf /Fi 134[62 62 62 62 62 62 62 62 1[62 62 62 62 62 62 +1[62 62 62 62 62 62 62 62 62 12[62 62 3[62 6[62 1[62 +1[62 62 1[62 17[62 1[62 1[62 43[{}34 119.552 /CMTT12 +rf /Fj 146[135 8[85 34[124 65[{}3 143.462 /CMBXTI10 rf +/Fk 134[48 48 48 48 48 48 48 48 1[48 48 48 48 48 48 1[48 +48 48 48 48 48 48 48 48 1[48 1[48 1[48 7[48 4[48 48 3[48 +3[48 3[48 14[48 48 2[48 48 3[48 48 40[{}38 90.9091 /CMSLTT10 +rf /Fl 133[56 56 56 56 56 56 56 56 56 56 56 56 56 56 +56 56 1[56 56 56 56 56 56 56 56 56 1[56 9[56 56 3[56 +6[56 56 3[56 22[56 1[56 43[{}34 109.091 /CMTT12 rf /Fm +133[55 65 65 89 65 68 48 48 50 65 68 61 68 102 34 65 +1[34 68 61 37 56 68 55 68 60 9[127 93 94 1[68 2[84 92 +96 116 74 2[46 96 1[77 81 94 89 1[93 1[58 5[61 61 61 +61 61 61 61 61 61 61 1[34 41 32[68 12[{}55 109.091 /CMBX12 +rf /Fn 134[48 48 66 48 51 35 36 39 1[51 45 51 76 25 48 +1[25 51 45 28 42 51 40 51 44 8[69 1[69 70 63 51 69 1[62 +68 71 86 55 2[36 2[57 60 70 66 65 69 14[45 13[45 36[{}43 +90.9091 /CMB10 rf /Fo 133[40 48 48 66 48 51 35 36 36 +48 51 45 51 76 25 48 1[25 51 45 28 40 51 40 51 45 13[51 +4[68 1[57 2[33 68 1[59 4[68 18[25 30 32[51 12[{}35 90.9091 +/CMSL10 rf /Fp 129[48 48 48 48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 1[48 48 +48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 +48 48 48 48 48 48 48 48 48 48 33[{}93 90.9091 /CMTT10 +rf /Fq 135[39 39 1[39 39 39 39 1[39 39 39 39 39 39 39 +39 39 39 39 39 39 39 39 39 24[39 13[39 5[39 1[39 2[39 +39 39 1[39 43[{}30 74.7198 /CMTT9 rf /Fr 131[77 1[34 +41 41 55 41 43 30 30 30 41 43 38 43 64 21 41 23 21 43 +38 23 34 43 34 43 38 21 6[58 58 79 58 58 55 43 57 60 +52 60 58 70 48 60 1[28 58 60 50 52 59 55 54 58 1[36 1[60 +1[21 1[38 38 38 38 38 38 38 38 38 38 38 21 26 21 2[30 +30 21 5[21 19[43 43 45 11[{}76 74.7198 /CMR9 rf /Fs 205[33 +33 49[{}2 58.1154 /CMR7 rf /Ft 134[44 42 60 42 49 30 +37 38 42 46 46 51 74 23 42 1[28 46 42 28 42 46 42 42 +46 3[28 1[28 3[91 3[51 66 1[62 1[68 82 57 2[35 68 70 +59 62 3[68 3[70 11[46 1[46 28 33 3[37 37 27[51 12[{}47 +90.9091 /CMTI10 rf /Fu 134[85 85 117 85 90 63 64 66 1[90 +81 90 134 45 85 1[45 1[81 49 74 90 72 90 78 12[112 90 +120 1[110 121 1[153 97 2[60 126 127 101 106 124 117 1[122 +7[81 81 81 81 81 81 81 81 81 81 2[54 6[126 25[90 12[{}50 +143.462 /CMBX12 rf /Fv 240[45 1[91 12[71{}3 90.9091 /CMSY10 +rf /Fw 133[60 71 71 97 71 75 52 53 55 1[75 67 75 112 +37 71 41 37 75 67 41 61 75 60 75 65 37 5[82 102 102 139 +102 103 94 75 100 101 92 101 105 128 81 105 1[50 105 +106 85 88 103 97 96 102 7[67 67 67 67 67 67 67 67 67 +67 67 37 45 37 2[52 52 37 105 4[41 20[75 12[{}71 119.552 +/CMBX12 rf /Fx 131[91 45 40 48 48 66 48 51 35 36 36 48 +51 45 51 76 25 48 28 25 51 45 28 40 51 40 51 45 25 2[25 +45 25 56 68 68 93 68 68 66 51 67 71 62 71 68 83 57 71 +47 33 68 71 59 62 69 66 64 68 71 43 1[71 1[25 25 45 45 +45 45 45 45 45 45 45 45 45 25 30 25 71 1[35 35 25 71 +3[45 25 18[76 51 51 53 11[{}88 90.9091 /CMR10 rf /Fy +138[108 75 76 79 2[97 108 161 54 2[54 3[88 15[149 1[108 +14[148 1[138 146 12[97 5[54 65 3[75 75 40[{}20 172.154 +/CMBX12 rf end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%BeginPaperSize: Letter +/setpagedevice where +{ pop << /PageSize [612 792] >> setpagedevice } +{ /letter where { pop letter } if } +ifelse +%%EndPaperSize + end +%%EndSetup +%%Page: 1 1 +TeXDict begin 1 0 bop 150 1328 a Fy(Am-utils)65 b(\(4.4BSD)f(Automoun) +-5 b(ter)64 b(Utilities\))p 150 1437 3600 34 v 2452 1534 +a Fx(F)-8 b(or)31 b(v)m(ersion)g(6.2,)h(28)f(Octob)s(er)f(2014)150 +4934 y Fw(Erez)45 b(Zadok)150 5068 y Fx(\(Originally)31 +b(b)m(y)g(Jan-Simon)e(P)m(endry)h(and)g(Nic)m(k)h(Williams\))p +150 5141 3600 17 v eop end +%%Page: 2 2 +TeXDict begin 2 1 bop 150 433 a Fx(Cop)m(yrigh)m(t)602 +430 y(c)577 433 y Fv(\015)30 b Fx(1997-2014)k(Erez)d(Zadok)150 +543 y(Cop)m(yrigh)m(t)602 540 y(c)577 543 y Fv(\015)f +Fx(1989)i(Jan-Simon)e(P)m(endry)150 653 y(Cop)m(yrigh)m(t)602 +650 y(c)577 653 y Fv(\015)g Fx(1989)i(Imp)s(erial)e(College)i(of)f +(Science,)g(T)-8 b(ec)m(hnology)33 b(&)d(Medicine)150 +762 y(Cop)m(yrigh)m(t)602 759 y(c)577 762 y Fv(\015)g +Fx(1989)i(The)e(Regen)m(ts)i(of)e(the)h(Univ)m(ersit)m(y)h(of)e +(California.)150 1006 y(All)h(Righ)m(ts)g(Reserv)m(ed.)150 +1180 y(P)m(ermission)d(to)g(cop)m(y)g(this)f(do)s(cumen)m(t,)h(or)g(an) +m(y)f(p)s(ortion)g(of)h(it,)h(as)e(necessary)h(for)f(use)h(of)f(this)g +(soft)m(w)m(are)150 1289 y(is)j(gran)m(ted)h(pro)m(vided)f(this)h(cop)m +(yrigh)m(t)h(notice)f(and)f(statemen)m(t)i(of)f(p)s(ermission)e(are)i +(included.)p eop end +%%Page: 1 3 +TeXDict begin 1 2 bop 150 -116 a Fx(Preface)3264 b(1)150 +299 y Fu(Preface)150 533 y Fx(This)24 b(man)m(ual)h(do)s(cumen)m(ts)f +(the)h(use)f(of)h(the)g(4.4BSD)h(automoun)m(ter)f(to)s(ol)h(suite,)g +(whic)m(h)e(includes)h Ft(A)n(md)p Fx(,)150 643 y Ft(A)n(mq)p +Fx(,)34 b Ft(Hlfsd)p Fx(,)h(and)e(other)h(programs.)50 +b(This)32 b(is)i(primarily)f(a)h(reference)g(man)m(ual.)51 +b(While)34 b(no)g(tutorial)150 752 y(exists,)d(there)g(are)g(examples)g +(a)m(v)-5 b(ailable.)43 b(See)30 b(Chapter)g(11)h([Examples],)g(page)g +(107.)275 887 y(This)e(man)m(ual)i(comes)h(in)e(t)m(w)m(o)i(forms:)41 +b(the)31 b(published)e(form)h(and)g(the)h(Info)f(form.)41 +b(The)30 b(Info)g(form)150 996 y(is)g(for)f(on-line)i(p)s(erusal)d +(with)i(the)g(INF)m(O)g(program)g(whic)m(h)f(is)h(distributed)f(along)h +(with)g(GNU)g(texinfo)150 1106 y(pac)m(k)-5 b(age)27 +b(\(a)f(v)m(ersion)f(of)h(whic)m(h)e(is)i(a)m(v)-5 b(ailable)27 +b(for)e(GNU)h(Emacs\).)2386 1073 y Fs(1)2462 1106 y Fx(Both)g(forms)f +(con)m(tain)h(substan)m(tially)150 1215 y(the)32 b(same)h(text)g(and)f +(are)h(generated)g(from)f(a)g(common)h(source)f(\014le,)h(whic)m(h)f +(is)h(distributed)e(with)h(the)150 1325 y Ft(A)n(m-utils)37 +b Fx(source.)p 150 5241 1200 4 v 199 5308 a Fs(1)275 +5340 y Fr(GNU)25 b(pac)n(k)l(ages)h(can)g(b)r(e)f(found)h(in)f +Fq(ftp://ftp.gnu.org/pub/gnu/)p Fr(.)p eop end +%%Page: 2 4 +TeXDict begin 2 3 bop eop end +%%Page: 3 5 +TeXDict begin 3 4 bop 150 -116 a Fx(License)3266 b(3)150 +299 y Fu(License)150 533 y Ft(A)n(m-utils)47 b Fx(is)41 +b(not)f(in)g(the)h(public)f(domain;)45 b(it)c(is)g(cop)m(yrigh)m(ted)h +(and)d(there)i(are)g(restrictions)g(on)g(its)150 643 +y(distribution.)275 777 y(Redistribution)c(and)g(use)g(in)g(source)h +(and)f(binary)f(forms,)j(with)f(or)f(without)h(mo)s(di\014cation,)i +(are)150 887 y(p)s(ermitted)30 b(pro)m(vided)g(that)h(the)f(follo)m +(wing)i(conditions)f(are)g(met:)199 1021 y(1.)61 b(Redistributions)29 +b(of)h(source)g(co)s(de)g(m)m(ust)g(retain)g(the)g(ab)s(o)m(v)m(e)h +(cop)m(yrigh)m(t)h(notice,)f(this)f(list)g(of)g(con-)330 +1131 y(ditions)g(and)g(the)h(follo)m(wing)h(disclaimer.)199 +1265 y(2.)61 b(Redistributions)31 b(in)h(binary)e(form)i(m)m(ust)f +(repro)s(duce)g(the)g(ab)s(o)m(v)m(e)i(cop)m(yrigh)m(t)g(notice,)h +(this)d(list)i(of)330 1375 y(conditions)j(and)e(the)i(follo)m(wing)h +(disclaimer)e(in)g(the)h(do)s(cumen)m(tation)g(and/or)f(other)h +(materials)330 1484 y(pro)m(vided)30 b(with)g(the)h(distribution.)199 +1619 y(3.)61 b(Neither)34 b(the)g(name)g(of)f(the)h(Univ)m(ersit)m(y)h +(nor)e(the)h(names)f(of)h(its)g(con)m(tributors)f(ma)m(y)i(b)s(e)d +(used)h(to)330 1729 y(endorse)e(or)g(promote)h(pro)s(ducts)e(deriv)m +(ed)i(from)f(this)g(soft)m(w)m(are)i(without)e(sp)s(eci\014c)g(prior)g +(written)330 1838 y(p)s(ermission.)275 1998 y(THIS)c(SOFTW)-10 +b(ARE)27 b(IS)g(PR)m(O)m(VIDED)i(BY)g(THE)f(REGENTS)f(AND)i +(CONTRIBUTORS)d(\\AS)150 2107 y(IS")i(AND)h(ANY)f(EXPRESS)f(OR)g +(IMPLIED)h(W)-10 b(ARRANTIES,)28 b(INCLUDING,)h(BUT)f(NOT)g(LIM-)150 +2217 y(ITED)41 b(TO,)g(THE)g(IMPLIED)g(W)-10 b(ARRANTIES)41 +b(OF)g(MER)m(CHANT)-8 b(ABILITY)42 b(AND)g(FITNESS)150 +2326 y(F)m(OR)24 b(A)f(P)-8 b(AR)g(TICULAR)23 b(PURPOSE)f(ARE)i +(DISCLAIMED.)f(IN)g(NO)g(EVENT)g(SHALL)g(THE)g(RE-)150 +2436 y(GENTS)h(OR)f(CONTRIBUTORS)g(BE)h(LIABLE)g(F)m(OR)h(ANY)f +(DIRECT,)g(INDIRECT,)g(INCIDEN-)150 2545 y(T)-8 b(AL,)21 +b(SPECIAL,)f(EXEMPLAR)-8 b(Y,)22 b(OR)f(CONSEQUENTIAL)e(D)m(AMA)m(GES)k +(\(INCLUDING,)f(BUT)150 2655 y(NOT)f(LIMITED)h(TO,)f(PR)m(OCUREMENT)h +(OF)g(SUBSTITUTE)e(GOODS)i(OR)f(SER)-10 b(VICES;)20 b(LOSS)150 +2765 y(OF)i(USE,)g(D)m(A)-8 b(T)g(A,)24 b(OR)e(PR)m(OFITS;)g(OR)g +(BUSINESS)f(INTERR)m(UPTION\))h(HO)m(WEVER)h(CA)m(USED)150 +2874 y(AND)35 b(ON)f(ANY)h(THEOR)-8 b(Y)34 b(OF)g(LIABILITY,)g(WHETHER) +g(IN)g(CONTRA)m(CT,)g(STRICT)e(LIA-)150 2984 y(BILITY,)26 +b(OR)g(TOR)-8 b(T)25 b(\(INCLUDING)i(NEGLIGENCE)f(OR)g(OTHER)-10 +b(WISE\))25 b(ARISING)h(IN)g(ANY)150 3093 y(W)-10 b(A)i(Y)31 +b(OUT)e(OF)h(THE)f(USE)g(OF)h(THIS)f(SOFTW)-10 b(ARE,)29 +b(EVEN)h(IF)g(AD)m(VISED)g(OF)g(THE)f(POSSI-)150 3203 +y(BILITY)h(OF)g(SUCH)g(D)m(AMA)m(GE.)p eop end +%%Page: 4 6 +TeXDict begin 4 5 bop eop end +%%Page: 5 7 +TeXDict begin 5 6 bop 150 -116 a Fx(Source)30 b(Distribution)2778 +b(5)150 299 y Fu(Source)52 b(Distribution)150 533 y Fx(The)30 +b Ft(A)n(m-utils)37 b Fx(home)30 b(page)i(is)e(lo)s(cated)i(in)390 +667 y Fp(http://www.am-utils.org/)275 802 y Fx(Y)-8 b(ou)30 +b(can)h(get)h(the)e(latest)i(distribution)e(v)m(ersion)h(of)f +Ft(A)n(m-utils)37 b Fx(from)390 936 y Fp(ftp://ftp.am-utils.org/p)o +(ub/a)o(m-ut)o(ils)o(/am-)o(util)o(s.t)o(ar.g)o(z)275 +1071 y Fx(Additional)31 b(alpha,)f(b)s(eta,)h(and)f(release)i +(distributions)d(are)i(a)m(v)-5 b(ailable)33 b(in)390 +1205 y Fp(ftp://ftp.am-utils.org/p)o(ub/a)o(m-ut)o(ils)o(/.)275 +1340 y Fx(Revision)d(5.2)i(w)m(as)f(part)f(of)g(the)h(4.3BSD)h(Reno)e +(distribution.)275 1474 y(Revision)j(5.3bsdnet,)h(a)g(late)g(alpha)f(v) +m(ersion)h(of)f(5.3,)i(w)m(as)f(part)e(of)i(the)f(BSD)g(net)m(w)m(ork)h +(v)m(ersion)g(2)150 1584 y(distribution)275 1719 y(Revision)e(6.0)i(w)m +(as)e(made)h(indep)s(enden)m(tly)e(b)m(y)h(Erez)h(Zadok)f(at)h(the)f +(Computer)g(Science)h(Depart-)150 1828 y(men)m(t)f(of)f(Colum)m(bia)g +(Univ)m(ersit)m(y)h(\()p Fp(http:)q(/)q(/www)q(.cs)q(.columbia)q(.edu/) +p Fx(\),)26 b(as)31 b(part)g(of)g(his)g(PhD)g(thesis)150 +1938 y(w)m(ork)i(\()p Fp(http:)r(/)r(/)r(www)r(.)r(fsl)r(.)r(cs)r(.)r +(sunysb)r(.)r(edu)r(/)r(do)o(cs)r(/)r(z)o(adok)o(-the)o(sis)o(-pro)o +(posa)o(l)r(/)r Fx(\).)43 b(Am-utils)34 b(\(es-)150 2047 +y(p)s(ecially)k(v)m(ersion)g(6.1\))h(con)m(tin)m(ues)g(to)f(b)s(e)f +(dev)m(elop)s(ed)h(and)f(main)m(tained)h(at)h(the)e(Computer)g(Science) +150 2157 y(Departmen)m(t)k(\()p Fp(http:)8 b(/)g(/)e(www)i(.)e(cs)i(.)e +(sunysb)i(.)e(edu)i(/)e Fx(\))36 b(of)k(Ston)m(y)g(Bro)s(ok)h(Univ)m +(ersit)m(y)g(\()p Fp(http:)8 b(/)g(/)e(www)i(.)150 2267 +y(stonybrook.edu/)p Fx(\),)27 b(as)j(a)h(service)g(to)h(the)e(user)g +(comm)m(unit)m(y)-8 b(.)275 2401 y(See)30 b([History],)i(page)f(11,)g +(for)g(more)f(details.)p eop end +%%Page: 6 8 +TeXDict begin 6 7 bop eop end +%%Page: 7 9 +TeXDict begin 7 8 bop 150 -116 a Fx(Getting)32 b(Additional)f +(Information)2299 b(7)150 299 y Fu(Getting)52 b(Additional)g +(Information)150 660 y Fw(Bug)44 b(Rep)t(orts)150 819 +y Fx(Before)33 b(rep)s(orting)f(a)h(bug,)g(see)g(if)f(it)h(is)g(a)g +(kno)m(wn)f(one)g(in)g(the)h(bugs)f(\()p Fp(http:)r(/)r(/)q(www)r(.)q +(am-utils)r(.)q(org)q(/)150 929 y(docs/am-utils/BUGS.txt)p +Fx(\))25 b(\014le.)275 1072 y(If)g(y)m(ou)i(\014nd)e(a)h(problem)g(and) +g(hop)s(efully)f(y)m(ou)i(can)f(repro)s(duce)g(it,)h(please)h(describ)s +(e)d(it)i(in)f(detail)i(and)150 1181 y(submit)j(a)i(bug)f(rep)s(ort)f +(\()p Fp(https:)q(/)q(/)q(bugzilla)q(.)q(filesystems)q(.)q(org)q(/)q +Fx(\))c(via)33 b(Bugzilla)h(\()p Fp(http:)q(/)q(/)q(www)q(.)150 +1291 y(bugzilla)t(.)s(org)t(/)s Fx(\).)54 b(Alternativ)m(ely)-8 +b(,)39 b(y)m(ou)d(can)g(send)f(y)m(our)g(bug)g(rep)s(ort)g(to)h(the)g +(\\am-utils")h(list)f(\(see)150 1401 y Fp(http:)q(/)q(/)q(www)q(.)q +(am-uti)o(ls)q(.or)o(g)q(/)25 b Fx(under)30 b(\\Mailing)j(Lists"\))f +(quoting)g(the)f(details)h(of)g(the)f(release)i(and)150 +1510 y(y)m(our)k(con\014guration.)60 b(These)36 b(details)i(can)f(b)s +(e)f(obtained)h(b)m(y)g(running)e(the)i(command)g(`)p +Fp(amd)29 b(-v)p Fx('.)60 b(It)150 1620 y(w)m(ould)29 +b(greatly)h(help)f(if)g(y)m(ou)h(could)f(pro)m(vide)g(a)g(repro)s +(ducible)f(pro)s(cedure)g(for)h(detecting)i(the)e(bug)g(y)m(ou)150 +1729 y(are)i(rep)s(orting.)275 1872 y(Pro)m(viding)41 +b(w)m(orking)h(patc)m(hes)g(is)g(highly)f(encouraged.)74 +b(Ev)m(ery)42 b(patc)m(h)g(incorp)s(orated,)j(ho)m(w)m(ev)m(er)150 +1982 y(small,)29 b(will)f(get)h(its)f(author)g(an)f(honorable)h(men)m +(tion)h(in)e(the)h(authors)f(\014le)h(\()p Fp(http://www.am-utils.)150 +2091 y(org/docs/am-utils/AUTHOR)o(S.tx)o(t)p Fx(\).)150 +2336 y Fw(Mailing)46 b(Lists)150 2496 y Fx(There)21 b(are)g(sev)m(eral) +i(mailing)f(lists)f(for)g(p)s(eople)g(in)m(terested)i(in)d(k)m(eeping)i +(up-to-date)h(with)d(dev)m(elopmen)m(ts.)199 2638 y(1.)61 +b(The)30 b(users)f(mailing)j(list,)f(`)p Fp(am-utils)p +Fx(')e(is)h(for)379 2777 y Fv(\000)60 b Fx(announcemen)m(ts)30 +b(of)h(alpha)f(and)g(b)s(eta)h(releases)g(of)g(am-utils)379 +2916 y Fv(\000)60 b Fx(rep)s(orting)30 b(of)h(bugs)e(and)h(patc)m(hes) +379 3054 y Fv(\000)60 b Fx(discussions)30 b(of)g(new)g(features)h(for)f +(am-utils)379 3193 y Fv(\000)60 b Fx(implemen)m(tation)32 +b(and)e(p)s(orting)g(issues)330 3361 y(T)-8 b(o)40 b(subscrib)s(e,)g +(visit)f Fp(http:)7 b(/)g(/)f(www)h(.)f(am-utils)h(.)f(org)h(/)38 +b Fx(under)g(\\Mailing)j(Lists.")67 b(After)40 b(sub-)330 +3470 y(scribing,)31 b(y)m(ou)f(can)h(p)s(ost)f(a)h(message)h(to)f(this) +g(list.)41 b(T)-8 b(o)31 b(a)m(v)m(oid)h(as)f(m)m(uc)m(h)g(spam)f(as)g +(p)s(ossible,)h(only)330 3580 y(subscrib)s(ers)d(to)j(this)g(list)g(ma) +m(y)g(p)s(ost)f(to)h(it.)330 3719 y(Subscrib)s(ers)d(of)k(`)p +Fp(am-utils)p Fx(')d(are)i(most)h(helpful)e(if)h(they)g(ha)m(v)m(e)h +(the)f(time)h(and)e(resources)h(to)h(test)330 3828 y(new)42 +b(and)h(dev)m(elopmen)m(t)h(v)m(ersions)f(of)g(amd,)j(on)d(as)g(man)m +(y)g(di\013eren)m(t)g(platforms)g(as)g(p)s(ossible.)330 +3938 y(They)38 b(should)g(also)i(b)s(e)e(prepared)g(to)h(learn)g(and)g +(use)f(the)h(GNU)h(Auto)s(conf,)h(Automak)m(e,)i(and)330 +4047 y(Libto)s(ol)32 b(pac)m(k)-5 b(ages,)33 b(as)f(needed;)g(and)e(of) +i(course,)g(b)s(ecome)f(familiar)h(with)f(the)h(complex)g(co)s(de)f(in) +330 4157 y(the)g(am-utils)g(pac)m(k)-5 b(age.)43 b(In)30 +b(other)h(w)m(ords,)g(subscrib)s(ers)d(on)i(this)h(list)g(should)f(hop) +s(efully)f(b)s(e)h(able)330 4267 y(to)h(con)m(tribute)g(meaningfully)g +(to)g(the)f(dev)m(elopmen)m(t)i(of)f(amd.)330 4405 y(Note)39 +b(that)f(this)f(`)p Fp(am-utils)p Fx(')f(list)i(used)f(to)h(b)s(e)f +(called)i(`)p Fp(amd-dev)p Fx(')d(b)s(efore)h(Jan)m(uary)g(1st,)j +(2004.)330 4515 y(Please)32 b(use)e(the)g(new)g(name,)h(`)p +Fp(am-utils)p Fx('.)199 4653 y(2.)61 b(The)49 b(announcemen)m(ts)i +(mailing)f(list,)56 b(`)p Fp(am-utils-announce)p Fx(')46 +b(is)k(for)g(announcemen)m(ts)g(only)330 4763 y(\(mostly)j(new)e +(releases\).)107 b(T)-8 b(o)52 b(subscrib)s(e,)k(visit)d +Fp(http:)16 b(/)h(/)d(www)j(.)d(am-utils)g(.)g(org)i(/)65 +b Fx(under)330 4873 y(\\Mailing)32 b(Lists.")42 b(This)29 +b(list)i(is)g(read-only:)41 b(only)30 b(am-utils)h(dev)m(elop)s(ers)g +(ma)m(y)g(p)s(ost)f(to)h(it.)199 5011 y(3.)61 b(W)-8 +b(e)37 b(distribute)f(nigh)m(tly)h(CVS)e(snapshots)h(in)g +Fp(ftp:)5 b(/)g(/)t(ftp)g(.)t(am-util)o(s)g(.)s(org)t(/)s(pub)t(/)t(a)o +(m-ut)o(ils)t(/)330 5121 y(snapshots)t(/)s(daily)t(/)s +Fx(.)48 b(If)35 b(y)m(ou)g(lik)m(e)h(to)f(get)h(email)g(notices)g(of)f +(commits)h(to)f(the)g(am-utils)h(CVS)330 5230 y(rep)s(ository)-8 +b(,)42 b(subscrib)s(e)c(to)h(the)h(CVS)e(logs)i(mailing)g(list,)j(`)p +Fp(am-utils-cvs)p Fx(')36 b(at)k Fp(http:)7 b(/)g(/)f(www)h(.)330 +5340 y(am-utils.org/)27 b Fx(under)i(\\Mailing)j(Lists.")p +eop end +%%Page: 8 10 +TeXDict begin 8 9 bop 150 -116 a Fx(8)1900 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))199 299 y(4.)61 +b(The)29 b(older)g(list)h(whic)m(h)f(w)m(as)g(used)g(to)h(user)e +(discussions,)h(`)p Fp(amd-workers)p Fx(',)e(is)j(defunct)e(as)i(of)f +(Jan-)330 408 y(uary)34 b(2004.)55 b(\(Its)35 b(last)g(address)f(w)m +(as)h Fp(amd-workers)27 b(AT)j(majordomo)s(.)s(glue)s(.)s(umd)s(.)s +(edu)p Fx(.\))47 b(Don't)330 518 y(use)30 b(`)p Fp(amd-workers)p +Fx(':)38 b(use)30 b(the)h(new)m(er,)f(more)h(activ)m(e)i(`)p +Fp(am-utils)p Fx(')28 b(list.)199 653 y(5.)61 b(F)-8 +b(or)36 b(completeness,)h(there's)f(a)f(dev)m(elop)s(ers-only)h(closed) +g(list)f(called)i(`)p Fp(am-utils-developers)p Fx(')330 +762 y(\(see)31 b Fp(http://www.am-utils.org/)24 b Fx(under)29 +b(\\Mailing)j(Lists"\).)150 995 y Fw(Am-utils)45 b(Bo)t(ok)150 +1154 y Fx(Erez)40 b(Zadok)f(\()p Fp(http:)7 b(/)g(/)f(www)h(.)f(cs)h(.) +f(sunysb)h(.)f(edu)h(/)f(~ezk)p Fx(\))34 b(wrote)40 b(a)g(b)s(o)s(ok)f +(\()p Fp(http:)7 b(/)g(/)f(www)h(.)f(fsl)h(.)f(cs)h(.)150 +1264 y(sunysb.edu/docs/amd-book/)p Fx(\),)28 b(titled)k +Ft(Linux)h(NFS)g(and)h(A)n(utomounter)g(A)-5 b(dministr)g(ation)p +Fx(,)34 b(ISBN)150 1373 y(0-7821-2739-8,)e(\(Syb)s(ex,)25 +b(2001\).)41 b(The)25 b(b)s(o)s(ok)g(is)g(full)f(of)i(details)g(and)e +(examples)i(that)g(go)g(b)s(ey)m(ond)e(what)150 1483 +y(this)34 b(man)m(ual)h(has.)52 b(The)33 b(b)s(o)s(ok)h(also)h(co)m(v)m +(ers)h(NFS)e(in)g(great)h(detail.)54 b(Although)34 b(the)g(b)s(o)s(ok)g +(is)g(geared)150 1592 y(to)m(w)m(ard)h(Lin)m(ux)f(users,)g(it)h(is)g +(general)g(enough)f(for)g(an)m(y)g(Unix)g(administrator)h(and)f(con)m +(tains)h(sp)s(eci\014c)150 1702 y(sections)c(for)g(non-Lin)m(ux)e +(systems.)p eop end +%%Page: 9 11 +TeXDict begin 9 10 bop 150 -116 a Fx(In)m(tro)s(duction)3057 +b(9)150 299 y Fu(In)l(tro)t(duction)150 533 y Fx(An)37 +b Fo(automoun)m(ter)44 b Fx(main)m(tains)38 b(a)g(cac)m(he)g(of)g(moun) +m(ted)f(\014lesystems.)61 b(Filesystems)38 b(are)g(moun)m(ted)f(on)150 +643 y(demand)29 b(when)h(they)g(are)h(\014rst)f(referenced,)g(and)g +(unmoun)m(ted)f(after)i(a)g(p)s(erio)s(d)e(of)i(inactivit)m(y)-8 +b(.)275 777 y Ft(A)n(md)38 b Fx(ma)m(y)30 b(b)s(e)e(used)h(as)g(a)h +(replacemen)m(t)g(for)f(Sun's)f(automoun)m(ter.)41 b(The)29 +b(c)m(hoice)i(of)e(whic)m(h)g(\014lesys-)150 887 y(tem)40 +b(to)g(moun)m(t)f(can)h(b)s(e)e(con)m(trolled)j(dynamically)f(with)f +Fo(selectors)p Fx(.)69 b(Selectors)40 b(allo)m(w)h(decisions)f(of)150 +996 y(the)i(form)e(\\hostname)i(is)g Fo(this)p Fx(,")i(or)e(\\arc)m +(hitecture)h(is)e(not)h Fo(that)p Fx(.")75 b(Selectors)42 +b(ma)m(y)g(b)s(e)f(com)m(bined)150 1106 y(arbitrarily)-8 +b(.)52 b Ft(A)n(md)43 b Fx(also)34 b(supp)s(orts)e(a)i(v)-5 +b(ariet)m(y)36 b(of)e(\014lesystem)g(t)m(yp)s(es,)h(including)e(NFS,)h +(UFS)g(and)f(the)150 1215 y(no)m(v)m(el)38 b Fo(program)f +Fx(\014lesystem.)60 b(The)36 b(com)m(bination)i(of)f(selectors)i(and)d +(m)m(ultiple)h(\014lesystem)g(t)m(yp)s(es)g(al-)150 1325 +y(lo)m(ws)25 b(iden)m(tical)g(con\014guration)g(\014les)f(to)g(b)s(e)g +(used)f(on)h(all)h(mac)m(hines)f(th)m(us)g(reducing)f(the)i +(administrativ)m(e)150 1435 y(o)m(v)m(erhead.)275 1569 +y Ft(A)n(md)36 b Fx(ensures)26 b(that)h(it)h(will)f(not)g(hang)g(if)g +(a)g(remote)h(serv)m(er)f(go)s(es)g(do)m(wn.)39 b(Moreo)m(v)m(er,)30 +b Ft(A)n(md)37 b Fx(can)27 b(de-)150 1679 y(termine)h(when)f(a)h +(remote)h(serv)m(er)f(has)f(b)s(ecome)i(inaccessible)g(and)e(then)h +(moun)m(t)g(replacemen)m(t)h(\014lesys-)150 1788 y(tems)i(as)f(and)g +(when)f(they)i(b)s(ecome)g(a)m(v)-5 b(ailable.)275 1923 +y Ft(A)n(md)45 b Fx(con)m(tains)37 b(no)f(proprietary)g(source)g(co)s +(de)g(and)g(has)g(b)s(een)f(p)s(orted)g(to)i(n)m(umerous)e(\015a)m(v)m +(ors)i(of)150 2032 y(Unix.)p eop end +%%Page: 10 12 +TeXDict begin 10 11 bop eop end +%%Page: 11 13 +TeXDict begin 11 12 bop 150 -116 a Fx(History)3216 b(11)150 +299 y Fu(History)150 533 y Fx(The)31 b Ft(A)n(md)41 b +Fx(pac)m(k)-5 b(age)33 b(has)e(b)s(een)f(without)i(an)f(o\016cial)i +(main)m(tainer)f(since)g(1992.)45 b(Sev)m(eral)32 b(p)s(eople)g(ha)m(v) +m(e)150 643 y(stepp)s(ed)e(in)h(to)h(main)m(tain)g(it)g(uno\016cially) +-8 b(.)45 b(Most)32 b(notable)g(w)m(ere)f(the)h(`upl')f(\(Uno\016cial)i +(P)m(atc)m(h)f(Lev)m(el\))150 752 y(releases)39 b(of)e +Ft(A)n(md)p Fx(,)i(created)g(b)m(y)e(me)h(\(Erez)f(Zadok)h(\()p +Fp(http:)6 b(/)g(/)t(www)g(.)t(cs)g(.)t(sunysb)g(.)t(edu)f(/)t(~ezk)p +Fx(\)\),)34 b(and)150 862 y(a)m(v)-5 b(ailable)37 b(from)c +Fp(ftp:)s(/)s(/)r(ftp)s(.)r(am-utils)s(.)r(org)s(/)r(pub)s(/)r(amd)s(/) +r Fx(.)48 b(The)33 b(last)i(suc)m(h)f(uno\016cial)h(release)h(w)m(as) +150 971 y(`upl102'.)275 1106 y(Through)d(the)h(pro)s(cess)g(of)h(patc)m +(hing)g(and)f(aging,)i(it)f(w)m(as)g(b)s(ecoming)g(more)f(and)g(more)h +(apparen)m(t)150 1215 y(that)25 b Ft(A)n(md)34 b Fx(w)m(as)25 +b(in)f(m)m(uc)m(h)h(need)f(of)h(revitalizing.)40 b(Main)m(taining)27 +b Ft(A)n(md)34 b Fx(had)24 b(b)s(ecome)g(a)h(di\016cult)g(task.)39 +b(I)150 1325 y(to)s(ok)26 b(it)f(up)s(on)f(m)m(yself)h(to)h(clean)m(up) +g(the)f(co)s(de,)h(so)g(that)f(it)h(w)m(ould)f(b)s(e)f(easier)i(to)g(p) +s(ort)e(to)i(new)f(platforms,)150 1435 y(add)37 b(new)f(features,)k(k)m +(eep)d(up)g(with)f(the)i(man)m(y)f(new)g(feature)g(requests,)i(and)e +(deal)g(with)g(the)h(nev)m(er)150 1544 y(ending)30 b(stream)h(of)f(bug) +g(rep)s(orts.)275 1679 y(I)35 b(ha)m(v)m(e)i(b)s(een)e(w)m(orking)h(on) +g(suc)m(h)f(a)h(release)h(of)f Ft(A)n(md)45 b Fx(on)36 +b(and)f(o\013)h(since)h(Jan)m(uary)e(of)h(1996.)58 b(The)150 +1788 y(new)26 b(suite)g(of)g(to)s(ols)h(is)f(curren)m(tly)g(named)g +Fp(")p Fx(am-utils)p Fp(")g Fx(\(AutoMoun)m(ter)i(Utilities\),)h(in)d +(line)h(with)e(GNU)150 1898 y(naming)e(con)m(v)m(en)m(tions,)k(b)s +(e\014tting)c(the)h(con)m(ten)m(ts)h(of)e(the)g(pac)m(k)-5 +b(age.)41 b(In)22 b(Octob)s(er)h(of)h(1996)h(I)e(had)g(receiv)m(ed)150 +2007 y(enough)29 b(o\013ers)h(to)g(help)f(me)g(with)g(this)g(task)h +(that)g(I)f(decided)g(to)h(mak)m(e)g(a)g(mailing)g(list)g(for)f(this)g +(group)150 2117 y(of)38 b(p)s(eople.)64 b(Around)37 b(the)h(same)h +(time,)i Ft(A)n(md)47 b Fx(had)38 b(b)s(ecome)g(a)h(necessary)f(part)g +(of)h(m)m(y)f(PhD)g(thesis)150 2227 y(w)m(ork,)31 b(resulting)f(in)g +(more)h(w)m(ork)f(p)s(erformed)f(on)h(am-utils.)275 2361 +y(Am-utils)k(v)m(ersion)i(6.0)f(w)m(as)g(n)m(um)m(b)s(ered)e(with)i(a)f +(ma)5 b(jor)35 b(new)f(release)i(n)m(um)m(b)s(er)d(to)j(distinguish)d +(it)150 2471 y(from)g(the)g(last)h(o\016cial)h(release)g(of)e +Ft(A)n(md)43 b Fx(\(5.x\).)51 b(Man)m(y)34 b(new)f(features)g(ha)m(v)m +(e)i(b)s(een)d(added)h(suc)m(h)g(as)h(a)150 2580 y(GNU)g +Fp(configure)c Fx(system,)35 b(NFS)e(V)-8 b(ersion)34 +b(3,)g(a)g(run-time)f(con\014guration)g(\014le)g(\(`amd.conf)7 +b('\),)36 b(man)m(y)150 2690 y(new)d(p)s(orts,)g(more)h(scripts)f(and)f +(programs,)i(as)g(w)m(ell)g(as)f(n)m(umerous)g(bug)f(\014xes.)49 +b(Another)34 b(reason)f(for)150 2800 y(the)41 b(new)g(ma)5 +b(jor)40 b(release)j(n)m(um)m(b)s(er)c(w)m(as)j(to)f(alert)h(users)e +(of)h(am-utils)h(that)f(user-visible)h(in)m(terfaces)150 +2909 y(ma)m(y)29 b(ha)m(v)m(e)g(c)m(hanged.)40 b(In)28 +b(order)f(to)i(mak)m(e)g Ft(A)n(md)38 b Fx(w)m(ork)28 +b(w)m(ell)h(for)f(the)g(next)g(10)h(y)m(ears,)g(and)f(b)s(e)f(easier)i +(to)150 3019 y(main)m(tain,)e(it)d(w)m(as)h(necessary)f(to)h(remo)m(v)m +(e)g(old)g(or)f(un)m(used)e(features,)k(c)m(hange)f(v)-5 +b(arious)24 b(syn)m(tax)h(\014les,)h(etc.)150 3128 y(Ho)m(w)m(ev)m(er,) +33 b(great)e(care)g(w)m(as)g(tak)m(en)h(to)f(ensure)e(the)i(maxim)m(um) +f(p)s(ossible)g(bac)m(kw)m(ards)h(compatibilit)m(y)-8 +b(.)275 3263 y(Am-utils)39 b(v)m(ersion)h(6.1)g(has)f(autofs)g(supp)s +(ort)e(for)i(Lin)m(ux)g(and)f(Solaris)i(2.5)p Fp(+)g +Fx(as)f Ft(the)46 b Fx(ma)5 b(jor)39 b(new)150 3372 y(feature,)33 +b(in)e(addition)g(to)i(sev)m(eral)g(other)e(minor)g(new)g(features.)45 +b(The)31 b(autofs)h(supp)s(ort)e(is)h(completely)150 +3482 y(transparen)m(t)41 b(to)i(the)e(end-user,)j(aside)d(from)g(the)h +(fact)g(that)g Fp(/bin/pwd)d Fx(no)m(w)j(alw)m(a)m(ys)h(returns)d(the) +150 3592 y(correct)22 b(amd-i\014ed)f(path.)38 b(The)20 +b(administrator)i(can)f(easily)h(switc)m(h)g(b)s(et)m(w)m(een)g(NFS)f +(and)g(autofs)g(moun)m(ts)150 3701 y(b)m(y)33 b(c)m(hanging)h(one)g +(parameter)f(in)g Fp(amd.conf)p Fx(.)47 b(Autofs)33 b(supp)s(ort)f(and) +g(main)m(tenance)j(w)m(as)f(dev)m(elop)s(ed)150 3811 +y(in)c(conjunction)g(with)h(Ion)f(Badulescu)g(\()p Fp(ionut)g(AT)f +(badula.org)p Fx(\).)p eop end +%%Page: 12 14 +TeXDict begin 12 13 bop eop end +%%Page: 13 15 +TeXDict begin 13 14 bop 150 -116 a Fx(Chapter)30 b(1:)41 +b(Ov)m(erview)2673 b(13)150 299 y Fu(1)80 b(Ov)l(erview)150 +559 y Ft(A)n(md)48 b Fx(main)m(tains)39 b(a)g(cac)m(he)h(of)f(moun)m +(ted)f(\014lesystems.)66 b(Filesystems)40 b(are)e Fo(demand-moun)m(ted) +k Fx(when)150 669 y(they)37 b(are)h(\014rst)e(referenced,)j(and)e +(unmoun)m(ted)f(after)h(a)h(p)s(erio)s(d)d(of)j(inactivit)m(y)-8 +b(.)63 b Ft(A)n(md)47 b Fx(ma)m(y)37 b(b)s(e)g(used)150 +778 y(as)c(a)f(replacemen)m(t)i(for)f(Sun's)e Fn(automoun)m(t)p +Fx(\(8\))j(program.)47 b(It)32 b(con)m(tains)i(no)e(proprietary)g +(source)h(co)s(de)150 888 y(and)j(has)g(b)s(een)f(p)s(orted)h(to)h(n)m +(umerous)e(\015a)m(v)m(ors)i(of)f(Unix.)58 b(See)37 b(Chapter)e(2)i +([Supp)s(orted)d(Platforms],)150 998 y(page)d(17.)275 +1141 y Ft(A)n(md)45 b Fx(w)m(as)37 b(designed)f(as)h(the)f(basis)g(for) +g(exp)s(erimen)m(ting)h(with)f(\014lesystem)h(la)m(y)m(out)h(and)e +(manage-)150 1251 y(men)m(t.)66 b(Although)39 b Ft(A)n(md)48 +b Fx(has)39 b(man)m(y)f(direct)i(applications)f(it)h(is)e(loaded)i +(with)e(additional)i(features)150 1360 y(whic)m(h)c(ha)m(v)m(e)i +(little)g(practical)g(use.)58 b(A)m(t)38 b(some)e(p)s(oin)m(t)h(the)f +(infrequen)m(tly)h(used)e(comp)s(onen)m(ts)i(ma)m(y)g(b)s(e)150 +1470 y(remo)m(v)m(ed)31 b(to)g(streamline)h(the)e(pro)s(duction)g +(system.)275 1613 y Ft(A)n(md)42 b Fx(supp)s(orts)32 +b(the)i(notion)g(of)f Fo(replicated)38 b Fx(\014lesystems)c(b)m(y)f(ev) +-5 b(aluating)35 b(eac)m(h)g(mem)m(b)s(er)e(of)g(a)h(list)150 +1723 y(of)28 b(p)s(ossible)g(\014lesystem)h(lo)s(cations)h(one)e(b)m(y) +g(one.)41 b Ft(A)n(md)c Fx(c)m(hec)m(ks)30 b(that)f(eac)m(h)g(cac)m +(hed)h(mapping)d(remains)150 1832 y(v)-5 b(alid.)67 b(Should)37 +b(a)i(mapping)g(b)s(e)f(lost)h({)h(suc)m(h)e(as)h(happ)s(ens)e(when)h +(a)i(\014leserv)m(er)f(go)s(es)g(do)m(wn)g({)g Ft(A)n(md)150 +1942 y Fx(automatically)33 b(selects)f(a)f(replacemen)m(t)h(should)d +(one)i(b)s(e)e(a)m(v)-5 b(ailable.)150 2187 y Fw(1.1)68 +b(F)-11 b(undamen)l(tals)150 2347 y Fx(The)26 b(fundamen)m(tal)h +(concept)h(b)s(ehind)d Ft(A)n(md)36 b Fx(is)27 b(the)g(abilit)m(y)h(to) +f(separate)h(the)f(name)g(used)f(to)h(refer)g(to)h(a)150 +2456 y(\014le)j(from)g(the)g(name)g(used)g(to)h(refer)f(to)h(its)f(ph)m +(ysical)h(storage)h(lo)s(cation.)44 b(This)31 b(allo)m(ws)h(the)f(same) +h(\014les)150 2566 y(to)k(b)s(e)f(accessed)i(with)e(the)h(same)g(name)g +(regardless)f(of)h(where)f(in)g(the)h(net)m(w)m(ork)h(the)e(name)h(is)f +(used.)150 2676 y(This)23 b(is)h(v)m(ery)g(di\013eren)m(t)g(from)g +(placing)g Fp(/n/hostname)d Fx(in)i(fron)m(t)h(of)g(the)g(pathname)g +(since)g(that)g(includes)150 2785 y(lo)s(cation)32 b(dep)s(enden)m(t)d +(information)i(whic)m(h)f(ma)m(y)h(c)m(hange)h(if)e(\014les)g(are)h(mo) +m(v)m(ed)g(to)g(another)g(mac)m(hine.)275 2928 y(By)g(placing)g(the)g +(required)f(mappings)h(in)f(a)h(cen)m(trally)i(administered)d +(database,)j(\014lesystems)e(can)150 3038 y(b)s(e)f(re-organized)h +(without)g(requiring)f(c)m(hanges)h(to)g(con\014guration)g(\014les,)f +(shell)h(scripts)f(and)g(so)h(on.)150 3284 y Fw(1.2)68 +b(Filesystems)46 b(and)f(V)-11 b(olumes)150 3443 y Ft(A)n(md)40 +b Fx(views)32 b(the)f(w)m(orld)g(as)g(a)g(set)h(of)f(\014leserv)m(ers,) +h(eac)m(h)g(con)m(taining)h(one)e(or)g(more)g(\014lesystems)g(where)150 +3553 y(eac)m(h)j(\014lesystem)f(con)m(tains)i(one)e(or)g(more)g +Fo(v)m(olumes)p Fx(.)49 b(Here)34 b(the)f(term)g Fo(v)m(olume)39 +b Fx(is)33 b(used)f(to)i(refer)f(to)h(a)150 3662 y(coheren)m(t)d(set)g +(of)g(\014les)f(suc)m(h)g(as)h(a)g(user's)e(home)i(directory)g(or)f(a)h +(T)2458 3682 y(E)2508 3662 y(X)f(distribution.)275 3805 +y(In)i(order)g(to)h(access)h(the)f(con)m(ten)m(ts)i(of)e(a)g(v)m +(olume,)h Ft(A)n(md)43 b Fx(m)m(ust)32 b(b)s(e)g(told)i(in)e(whic)m(h)h +(\014lesystem)g(the)150 3915 y(v)m(olume)i(resides)e(and)h(whic)m(h)f +(host)h(o)m(wns)g(the)g(\014lesystem.)52 b(By)34 b(default)h(the)f +(host)g(is)g(assumed)f(to)i(b)s(e)150 4025 y(lo)s(cal)f(and)f(the)g(v)m +(olume)h(is)f(assumed)f(to)i(b)s(e)e(the)h(en)m(tire)h(\014lesystem.)49 +b(If)33 b(a)g(\014lesystem)h(con)m(tains)g(more)150 4134 +y(than)d(one)g(v)m(olume,)h(then)f(a)g Fo(sublink)36 +b Fx(is)31 b(used)f(to)i(refer)e(to)i(the)f(sub-directory)g(within)f +(the)i(\014lesystem)150 4244 y(where)e(the)g(v)m(olume)i(can)e(b)s(e)g +(found.)150 4489 y Fw(1.3)68 b(V)-11 b(olume)45 b(Naming)150 +4649 y Fx(V)-8 b(olume)35 b(names)f(are)h(de\014ned)e(to)h(b)s(e)g +(unique)f(across)i(the)f(en)m(tire)h(net)m(w)m(ork.)53 +b(A)34 b(v)m(olume)h(name)g(is)f(the)150 4758 y(pathname)39 +b(to)h(the)g(v)m(olume's)g(ro)s(ot)g(as)f(kno)m(wn)g(b)m(y)g(the)h +(users)e(of)i(that)g(v)m(olume.)68 b(Since)40 b(this)f(name)150 +4868 y(uniquely)31 b(iden)m(ti\014es)g(the)h(v)m(olume)g(con)m(ten)m +(ts,)h(all)f(v)m(olumes)g(can)g(b)s(e)e(named)h(and)g(accessed)h(from)f +(eac)m(h)150 4978 y(host,)g(sub)5 b(ject)30 b(to)h(administrativ)m(e)h +(con)m(trols.)275 5121 y(V)-8 b(olumes)35 b(ma)m(y)h(b)s(e)e +(replicated)i(or)f(duplicated.)55 b(Replicated)36 b(v)m(olumes)g(con)m +(tain)g(iden)m(tical)h(copies)150 5230 y(of)27 b(the)h(same)f(data)h +(and)e(reside)i(at)f(t)m(w)m(o)i(or)e(more)g(lo)s(cations)i(in)e(the)g +(net)m(w)m(ork.)40 b(Eac)m(h)28 b(of)g(the)f(replicated)150 +5340 y(v)m(olumes)37 b(can)f(b)s(e)g(used)f(in)m(terc)m(hangeably)-8 +b(.)61 b(Duplicated)37 b(v)m(olumes)g(eac)m(h)g(ha)m(v)m(e)g(the)g +(same)f(name)h(but)p eop end +%%Page: 14 16 +TeXDict begin 14 15 bop 150 -116 a Fx(14)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y(con)m(tain)39 +b(di\013eren)m(t,)h(though)e(functionally)g(iden)m(tical,)j(data.)64 +b(F)-8 b(or)38 b(example,)i(`)p Fp(/vol/tex)p Fx(')c(migh)m(t)j(b)s(e) +150 408 y(the)31 b(name)f(of)h(a)f(T)779 428 y(E)829 +408 y(X)h(distribution)e(whic)m(h)i(v)-5 b(aried)30 b(for)g(eac)m(h)i +(mac)m(hine)f(arc)m(hitecture.)275 549 y Ft(A)n(md)48 +b Fx(pro)m(vides)39 b(facilities)i(to)e(tak)m(e)i(adv)-5 +b(an)m(tage)41 b(of)e(b)s(oth)f(replicated)i(and)e(duplicated)h(v)m +(olumes.)150 659 y(Con\014guration)30 b(options)g(allo)m(w)h(a)g +(single)f(set)h(of)f(con\014guration)h(data)f(to)h(b)s(e)e(shared)h +(across)g(an)g(en)m(tire)150 769 y(net)m(w)m(ork)h(b)m(y)f(taking)i +(adv)-5 b(an)m(tage)32 b(of)f(replicated)g(and)f(duplicated)g(v)m +(olumes.)275 910 y Ft(A)n(md)40 b Fx(can)31 b(tak)m(e)h(adv)-5 +b(an)m(tage)33 b(of)e(replacemen)m(t)h(v)m(olumes)f(b)m(y)g(moun)m +(ting)g(them)g(as)g(required)f(should)150 1019 y(an)g(activ)m(e)j +(\014leserv)m(er)e(b)s(ecome)f(una)m(v)-5 b(ailable.)150 +1261 y Fw(1.4)68 b(V)-11 b(olume)45 b(Binding)150 1421 +y Fx(Unix)28 b(implemen)m(ts)h(a)f(namespace)h(of)g(hierarc)m(hically)g +(moun)m(ted)g(\014lesystems.)40 b(Tw)m(o)28 b(forms)g(of)g(binding)150 +1530 y(b)s(et)m(w)m(een)34 b(names)f(and)f(\014les)h(are)h(pro)m +(vided.)49 b(A)33 b Fo(hard)f(link)39 b Fx(completes)34 +b(the)f(binding)f(when)h(the)g(name)150 1640 y(is)i(added)f(to)h(the)g +(\014lesystem.)54 b(A)34 b Fo(soft)h(link)41 b Fx(dela)m(ys)35 +b(the)g(binding)e(un)m(til)i(the)g(name)g(is)g(accessed.)54 +b(An)150 1750 y Fo(automoun)m(ter)32 b Fx(adds)24 b(a)i(further)d(form) +i(in)g(whic)m(h)f(the)h(binding)f(of)h(name)g(to)h(\014lesystem)f(is)g +(dela)m(y)m(ed)i(un)m(til)150 1859 y(the)k(name)f(is)g(accessed.)275 +2000 y(The)j(target)i(v)m(olume,)g(in)e(its)h(general)h(form,)f(is)f(a) +h(tuple)g(\(host,)h(\014lesystem,)g(sublink\))d(whic)m(h)i(can)150 +2110 y(b)s(e)c(used)f(to)i(name)g(the)f(ph)m(ysical)h(lo)s(cation)h(of) +f(an)m(y)g(v)m(olume)g(in)f(the)g(net)m(w)m(ork.)275 +2251 y(When)h(a)i(target)g(is)f(referenced,)g Ft(A)n(md)42 +b Fx(ignores)32 b(the)g(sublink)f(elemen)m(t)i(and)f(determines)g +(whether)150 2360 y(the)39 b(required)f(\014lesystem)h(is)g(already)h +(moun)m(ted.)66 b(This)38 b(is)g(done)h(b)m(y)g(computing)g(the)g(lo)s +(cal)h(moun)m(t)150 2470 y(p)s(oin)m(t)30 b(for)f(the)g(\014lesystem)h +(and)f(c)m(hec)m(king)i(for)f(an)f(existing)i(\014lesystem)e(moun)m +(ted)h(at)g(the)g(same)g(place.)150 2580 y(If)22 b(suc)m(h)h(a)g +(\014lesystem)g(already)g(exists)h(then)e(it)h(is)g(assumed)f(to)i(b)s +(e)e(functionally)h(iden)m(tical)i(to)e(the)g(target)150 +2689 y(\014lesystem.)63 b(By)38 b(default)g(there)g(is)g(a)g +(one-to-one)i(mapping)d(b)s(et)m(w)m(een)h(the)g(pair)g(\(host,)i +(\014lesystem\))150 2799 y(and)30 b(the)g(lo)s(cal)i(moun)m(t)e(p)s +(oin)m(t)h(so)f(this)h(assumption)e(is)i(v)-5 b(alid.)150 +3041 y Fw(1.5)68 b(Op)t(erational)46 b(Principles)150 +3200 y Ft(A)n(md)53 b Fx(op)s(erates)44 b(b)m(y)f(in)m(tro)s(ducing)g +(new)g(moun)m(t)g(p)s(oin)m(ts)g(in)m(to)i(the)e(namespace.)81 +b(These)43 b(are)h(called)150 3310 y Fo(automoun)m(t)29 +b Fx(p)s(oin)m(ts.)39 b(The)26 b(k)m(ernel)h(sees)g(these)g(automoun)m +(t)g(p)s(oin)m(ts)f(as)h(NFS)f(\014lesystems)h(b)s(eing)f(serv)m(ed)150 +3419 y(b)m(y)i Ft(A)n(md)p Fx(.)40 b(Ha)m(ving)29 b(attac)m(hed)h +(itself)f(to)f(the)h(namespace,)g Ft(A)n(md)37 b Fx(is)29 +b(no)m(w)f(able)g(to)h(con)m(trol)g(the)g(view)f(the)150 +3529 y(rest)34 b(of)g(the)g(system)f(has)h(of)g(those)g(moun)m(t)g(p)s +(oin)m(ts.)50 b(RPC)33 b(calls)i(are)f(receiv)m(ed)h(from)e(the)h(k)m +(ernel)h(one)150 3639 y(at)c(a)g(time.)275 3780 y(When)e(a)i +Fo(lo)s(okup)h Fx(call)f(is)f(receiv)m(ed)i Ft(A)n(md)39 +b Fx(c)m(hec)m(ks)32 b(whether)d(the)h(name)g(is)g(already)h(kno)m(wn.) +40 b(If)29 b(it)i(is)150 3889 y(not,)i(the)f(required)f(v)m(olume)i(is) +f(moun)m(ted.)45 b(A)32 b(sym)m(b)s(olic)g(link)g(p)s(oin)m(ting)g(to)h +(the)f(v)m(olume)h(ro)s(ot)f(is)g(then)150 3999 y(returned.)43 +b(Once)31 b(the)h(sym)m(b)s(olic)g(link)f(is)g(returned,)g(the)h(k)m +(ernel)g(will)g(send)e(all)i(other)g(requests)f(direct)150 +4108 y(to)g(the)g(moun)m(ted)f(\014lesystem.)275 4249 +y(If)25 b(a)h(v)m(olume)g(is)g(not)f(y)m(et)i(moun)m(ted,)g +Ft(A)n(md)35 b Fx(consults)26 b(a)g(con\014guration)g +Fo(moun)m(t-map)i Fx(corresp)s(onding)150 4359 y(to)h(the)g(automoun)m +(t)g(p)s(oin)m(t.)40 b Ft(A)n(md)e Fx(then)28 b(mak)m(es)h(a)g(run)m +(time)f(decision)h(on)f(what)g(and)g(where)g(to)h(moun)m(t)150 +4469 y(a)i(\014lesystem)f(based)g(on)h(the)f(information)h(obtained)g +(from)f(the)g(map.)275 4610 y Ft(A)n(md)k Fx(do)s(es)25 +b(not)h(implemen)m(t)f(all)h(the)g(NFS)f(requests;)i(only)f(those)f +(relev)-5 b(an)m(t)27 b(to)f(name)f(binding)f(suc)m(h)150 +4719 y(as)36 b Fo(lo)s(okup)p Fx(,)g Fo(readlink)41 b +Fx(and)35 b Fo(readdir)p Fx(.)55 b(Some)36 b(other)g(calls)g(are)g +(also)h(implemen)m(ted)f(but)f(most)g(simply)150 4829 +y(return)29 b(an)i(error)f(co)s(de;)g(for)h(example)g +Fo(mkdir)36 b Fx(alw)m(a)m(ys)31 b(returns)f(\\read-only)h +(\014lesystem".)150 5071 y Fw(1.6)68 b(Moun)l(ting)45 +b(a)g(V)-11 b(olume)150 5230 y Fx(Eac)m(h)38 b(automoun)m(t)g(p)s(oin)m +(t)f(has)g(a)g(corresp)s(onding)f(moun)m(t)h(map.)61 +b(The)37 b(moun)m(t)g(map)f(con)m(tains)j(a)e(list)150 +5340 y(of)c(k)m(ey{v)-5 b(alue)34 b(pairs.)48 b(The)32 +b(k)m(ey)i(is)e(the)h(name)g(of)g(the)g(v)m(olume)h(to)f(b)s(e)f(moun)m +(ted.)48 b(The)32 b(v)-5 b(alue)33 b(is)g(a)g(list)p +eop end +%%Page: 15 17 +TeXDict begin 15 16 bop 150 -116 a Fx(Chapter)30 b(1:)41 +b(Ov)m(erview)2673 b(15)150 299 y(of)32 b(lo)s(cations)h(describing)f +(where)f(the)h(\014lesystem)g(is)g(stored)g(in)f(the)h(net)m(w)m(ork.) +46 b(In)31 b(the)h(source)g(for)g(the)150 408 y(map)e(the)h(v)-5 +b(alue)30 b(w)m(ould)h(lo)s(ok)g(lik)m(e)390 541 y(lo)s(cation1)63 +b(lo)s(cation2)68 b(.)22 b(.)h(.)71 b(lo)s(cationN)275 +674 y Ft(A)n(md)37 b Fx(examines)28 b(eac)m(h)h(lo)s(cation)g(in)e +(turn.)39 b(Eac)m(h)28 b(lo)s(cation)i(ma)m(y)e(con)m(tain)h +Fo(selectors)k Fx(whic)m(h)27 b(con)m(trol)150 784 y(whether)i +Ft(A)n(md)39 b Fx(can)29 b(use)g(that)h(lo)s(cation.)42 +b(F)-8 b(or)31 b(example,)f(the)g(lo)s(cation)h(ma)m(y)f(b)s(e)f +(restricted)h(to)g(use)f(b)m(y)150 893 y(certain)i(hosts.)41 +b(Those)30 b(lo)s(cations)i(whic)m(h)e(cannot)h(b)s(e)f(used)f(are)i +(ignored.)275 1026 y Ft(A)n(md)50 b Fx(attempts)42 b(to)g(moun)m(t)g +(the)f(\014lesystem)h(describ)s(ed)e(b)m(y)h(eac)m(h)i(remaining)e(lo)s +(cation)i(un)m(til)f(a)150 1136 y(moun)m(t)30 b(succeeds)h(or)f +Ft(A)n(md)40 b Fx(can)31 b(no)f(longer)h(pro)s(ceed.)40 +b(The)30 b(latter)i(can)f(o)s(ccur)f(in)g(three)h(w)m(a)m(ys:)225 +1269 y Fv(\017)60 b Fx(If)34 b(none)f(of)h(the)h(lo)s(cations)g(could)f +(b)s(e)g(used,)g(or)g(if)g(all)h(of)f(the)g(lo)s(cations)i(caused)e(an) +f(error,)i(then)330 1378 y(the)c(last)g(error)f(is)g(returned.)225 +1511 y Fv(\017)60 b Fx(If)26 b(a)h(lo)s(cation)i(could)d(b)s(e)g(used)g +(but)g(w)m(as)h(b)s(eing)g(moun)m(ted)f(in)h(the)f(bac)m(kground)h +(then)f Ft(A)n(md)36 b Fx(marks)330 1621 y(that)27 b(moun)m(t)f(as)g(b) +s(eing)f(\\in)h(progress")h(and)e(con)m(tin)m(ues)i(with)f(the)g(next)g +(request;)i(no)e(reply)f(is)h(sen)m(t)330 1730 y(to)31 +b(the)g(k)m(ernel.)225 1863 y Fv(\017)60 b Fx(Lastly)-8 +b(,)27 b(one)e(or)g(more)g(of)g(the)g(moun)m(ts)g(ma)m(y)g(ha)m(v)m(e)h +(b)s(een)e Fo(deferred)p Fx(.)38 b(A)25 b(moun)m(t)g(is)g(deferred)e +(if)i(extra)330 1973 y(information)k(is)f(required)g(b)s(efore)g(the)h +(moun)m(t)f(can)h(pro)s(ceed.)40 b(When)28 b(the)h(information)g(b)s +(ecomes)330 2082 y(a)m(v)-5 b(ailable)29 b(the)d(moun)m(t)g(will)h(tak) +m(e)h(place,)g(but)e(in)g(the)g(mean)g(time)h(no)g(reply)f(is)g(sen)m +(t)h(to)g(the)f(k)m(ernel.)330 2192 y(If)k(the)g(moun)m(t)h(is)f +(deferred,)g Ft(A)n(md)40 b Fx(con)m(tin)m(ues)31 b(to)g(try)g(an)m(y)f +(remaining)h(lo)s(cations.)275 2348 y(Once)e(a)h(v)m(olume)g(has)g(b)s +(een)e(moun)m(ted,)i Ft(A)n(md)39 b Fx(establishes)31 +b(a)e Fo(v)m(olume)i(mapping)37 b Fx(whic)m(h)29 b(is)g(used)g(to)150 +2457 y(satisfy)i(subsequen)m(t)e(requests.)150 2687 y +Fw(1.7)68 b(Automatic)46 b(Unmoun)l(ting)150 2846 y Fx(T)-8 +b(o)32 b(a)m(v)m(oid)i(an)e(ev)m(er)g(increasing)h(n)m(um)m(b)s(er)e +(of)h(\014lesystem)g(moun)m(ts,)g Ft(A)n(md)42 b Fx(remo)m(v)m(es)33 +b(v)m(olume)g(mappings)150 2956 y(whic)m(h)c(ha)m(v)m(e)h(not)f(b)s +(een)g(used)f(recen)m(tly)-8 b(.)42 b(A)29 b(time-to-liv)m(e)k(in)m +(terv)-5 b(al)30 b(is)f(asso)s(ciated)i(with)d(eac)m(h)j(mapping)150 +3065 y(and)g(when)g(that)h(expires)g(the)g(mapping)f(is)g(remo)m(v)m +(ed.)46 b(When)32 b(the)g(last)g(reference)g(to)h(a)f(\014lesystem)g +(is)150 3175 y(remo)m(v)m(ed,)h(that)f(\014lesystem)f(is)h(unmoun)m +(ted.)42 b(If)31 b(the)h(unmoun)m(t)e(fails,)j(for)e(example)h(the)f +(\014lesystem)h(is)150 3284 y(still)j(busy)-8 b(,)35 +b(the)f(mapping)g(is)g(re-instated)h(and)f(its)g(time-to-liv)m(e)k(in)m +(terv)-5 b(al)35 b(is)g(extended.)52 b(The)34 b(global)150 +3394 y(default)d(for)f(this)h(grace)h(p)s(erio)s(d)d(is)i(con)m +(trolled)h(b)m(y)f(the)g Fp(-w)f Fx(command-line)h(option)g(\(see)h +(Section)f(4.12)150 3504 y([-w)i(Option],)h(page)g(42\))h(or)e(the)g +Ft(amd.c)-5 b(onf)54 b Fx(parameter)34 b(`)p Fp(dismount_interval)p +Fx(')29 b(\(see)34 b(Section)g(6.5.8)150 3613 y([dismoun)m(t)p +548 3613 28 4 v 40 w(in)m(terv)-5 b(al)27 b(P)m(arameter],)i(page)e +(63\).)41 b(It)26 b(is)g(also)i(p)s(ossible)d(to)i(set)g(this)f(v)-5 +b(alue)27 b(on)f(a)h(p)s(er-moun)m(t)150 3723 y(basis)j(\(see)i +(Section)f(3.3.4.4)i([opts],)e(page)g(31\).)275 3856 +y(Filesystems)g(can)g(b)s(e)f(forcefully)h(timed)g(out)g(using)f(the)h +Ft(A)n(mq)38 b Fx(command.)j(See)31 b(Chapter)f(7)h([Run-)150 +3965 y(time)44 b(Administration],)j(page)e(73.)80 b(Note)45 +b(that)f(on)f(new)g(enough)g(systems)g(that)h(supp)s(ort)e(forced)150 +4075 y(unmoun)m(ts,)h(suc)m(h)d(as)h(Lin)m(ux,)i Ft(A)n(md)51 +b Fx(can)41 b(try)f(to)i(use)f(the)g Fn(umoun)m(t2)p +Fx(\(2\))h(system)f(call)h(to)f(force)h(the)150 4184 +y(unmoun)m(t,)48 b(if)d(the)g(regular)g Fn(umoun)m(t)p +Fx(\(2\))h(system)f(call)i(failed)e(in)g(a)h(w)m(a)m(y)g(that)f +(indicates)h(that)g(the)150 4294 y(moun)m(t)30 b(p)s(oin)m(t)h(is)f(h)m +(ung)g(or)g(stale.)42 b(See)31 b(Section)g(6.5.11)i([forced)p +2362 4294 V 40 w(unmoun)m(ts)c(P)m(arameter],)j(page)g(63.)150 +4523 y Fw(1.8)68 b(Keep-aliv)l(es)150 4682 y Fx(Use)39 +b(of)g(some)g(\014lesystem)g(t)m(yp)s(es)g(requires)f(the)h(presence)g +(of)g(a)g(serv)m(er)g(on)g(another)g(mac)m(hine.)66 b(If)39 +b(a)150 4792 y(mac)m(hine)29 b(crashes)f(then)f(it)i(is)f(of)g(no)g +(concern)g(to)g(pro)s(cesses)g(on)g(that)g(mac)m(hine)h(that)g(the)f +(\014lesystem)g(is)150 4902 y(una)m(v)-5 b(ailable.)42 +b(Ho)m(w)m(ev)m(er,)32 b(to)e(pro)s(cesses)f(on)g(a)h(remote)g(host)f +(using)g(that)h(mac)m(hine)g(as)g(a)f(\014leserv)m(er)h(this)150 +5011 y(ev)m(en)m(t)35 b(is)f(imp)s(ortan)m(t.)52 b(This)33 +b(situation)i(is)f(most)g(widely)g(recognized)h(when)e(an)h(NFS)g(serv) +m(er)g(crashes)150 5121 y(and)i(the)h(b)s(eha)m(vior)g(observ)m(ed)g +(on)g(clien)m(t)h(mac)m(hines)g(is)e(that)i(more)f(and)f(more)h(pro)s +(cesses)g(hang.)60 b(In)150 5230 y(order)27 b(to)i(pro)m(vide)f(the)g +(p)s(ossibilit)m(y)h(of)f(reco)m(v)m(ery)-8 b(,)31 b +Ft(A)n(md)37 b Fx(implemen)m(ts)29 b(a)f Fo(k)m(eep-aliv)m(e)36 +b Fx(in)m(terv)-5 b(al)29 b(timer)f(for)150 5340 y(some)j(\014lesystem) +f(t)m(yp)s(es.)41 b(Curren)m(tly)30 b(only)g(NFS)h(mak)m(es)g(use)f(of) +h(this)f(service.)p eop end +%%Page: 16 18 +TeXDict begin 16 17 bop 150 -116 a Fx(16)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(The)25 +b(basis)i(of)f(the)h(NFS)f(k)m(eep-aliv)m(e)j(implemen)m(tation)f(is)e +(the)h(observ)-5 b(ation)27 b(that)g(most)g(sites)g(main-)150 +408 y(tain)j(replicated)g(copies)g(of)f(common)h(system)f(data)h(suc)m +(h)f(as)g(man)m(ual)h(pages,)g(most)g(or)f(all)h(programs,)150 +518 y(system)h(source)h(co)s(de)f(and)g(so)g(on.)43 b(If)31 +b(one)h(of)f(those)h(serv)m(ers)f(go)s(es)h(do)m(wn)f(it)h(w)m(ould)f +(b)s(e)f(reasonable)i(to)150 628 y(moun)m(t)e(one)h(of)g(the)f(others)h +(as)f(a)h(replacemen)m(t.)275 762 y(The)43 b(\014rst)g(part)h(of)g(the) +g(pro)s(cess)f(is)h(to)h(k)m(eep)f(trac)m(k)h(of)f(whic)m(h)g +(\014leserv)m(ers)g(are)g(up)f(and)g(whic)m(h)150 872 +y(are)f(do)m(wn.)72 b Ft(A)n(md)51 b Fx(do)s(es)41 b(this)g(b)m(y)g +(sending)g(RPC)f(requests)h(to)h(the)g(serv)m(ers')f(NFS)h +Fp(NullProc)d Fx(and)150 981 y(c)m(hec)m(king)c(whether)e(a)h(reply)f +(is)h(returned.)48 b(While)35 b(the)e(serv)m(er)h(state)h(is)e +(uncertain)h(the)f(requests)h(are)150 1091 y(re-transmitted)f(at)g +(three)f(second)g(in)m(terv)-5 b(als)33 b(and)f(if)g(no)g(reply)g(is)g +(receiv)m(ed)i(after)e(four)g(attempts)h(the)150 1200 +y(serv)m(er)g(is)g(mark)m(ed)g(do)m(wn.)48 b(If)33 b(a)g(reply)g(is)g +(receiv)m(ed)h(the)f(\014leserv)m(er)h(is)f(mark)m(ed)g(up)e(and)i(sta) +m(ys)h(in)e(that)150 1310 y(state)i(for)f(30)g(seconds)g(at)h(whic)m(h) +e(time)i(another)f(NFS)f(ping)h(is)g(sen)m(t.)48 b(This)32 +b(in)m(terv)-5 b(al)34 b(is)f(con\014gurable)150 1420 +y(and)24 b(can)g(ev)m(en)h(b)s(e)f(turned)f(o\013)i(using)f(the)g +Ft(ping)33 b Fx(option.)39 b(See)24 b(Section)i(3.3.4.4)g([opts)f +(Option],)h(page)f(31.)275 1554 y(Once)i(a)i(\014leserv)m(er)f(is)g +(mark)m(ed)g(do)m(wn,)g(requests)g(con)m(tin)m(ue)h(to)f(b)s(e)f(sen)m +(t)i(ev)m(ery)f(30)h(seconds)f(in)f(order)150 1664 y(to)37 +b(determine)f(when)f(the)h(\014leserv)m(er)h(comes)g(bac)m(k)f(up.)57 +b(During)36 b(this)g(time)h(an)m(y)f(reference)h(through)150 +1773 y Ft(A)n(md)47 b Fx(to)39 b(the)f(\014lesystems)g(on)f(that)i +(serv)m(er)f(fail)g(with)g(the)f(error)h(\\Op)s(eration)g(w)m(ould)f +(blo)s(c)m(k".)64 b(If)38 b(a)150 1883 y(replacemen)m(t)31 +b(v)m(olume)g(is)f(a)m(v)-5 b(ailable)32 b(then)e(it)g(will)g(b)s(e)g +(moun)m(ted,)g(otherwise)g(the)g(error)g(is)f(returned)g(to)150 +1993 y(the)i(user.)275 2127 y(Although)37 b(this)g(action)i(do)s(es)e +(not)h(protect)g(user)f(\014les,)i(whic)m(h)e(are)h(unique)e(on)h(the)h +(net)m(w)m(ork,)i(or)150 2237 y(pro)s(cesses)22 b(whic)m(h)g(do)g(not)g +(access)i(\014les)e(via)h Ft(A)n(md)31 b Fx(or)23 b(already)f(ha)m(v)m +(e)i(op)s(en)d(\014les)h(on)g(the)h(h)m(ung)e(\014lesystem,)150 +2346 y(it)31 b(can)g(prev)m(en)m(t)g(most)f(new)g(pro)s(cesses)g(from)g +(hanging.)150 2579 y Fw(1.9)68 b(Non-blo)t(c)l(king)45 +b(Op)t(eration)150 2738 y Fx(Since)37 b(there)g(is)f(only)h(one)g +(instance)h(of)f Ft(A)n(md)46 b Fx(for)36 b(eac)m(h)i(automoun)m(t)g(p) +s(oin)m(t,)g(and)e(usually)h(only)g(one)150 2848 y(instance)31 +b(on)g(eac)m(h)h(mac)m(hine,)g(it)f(is)g(imp)s(ortan)m(t)g(that)g(it)g +(is)g(alw)m(a)m(ys)h(a)m(v)-5 b(ailable)33 b(to)f(service)f(k)m(ernel)h +(calls.)150 2957 y Ft(A)n(md)49 b Fx(go)s(es)41 b(to)f(great)i(lengths) +e(to)g(ensure)f(that)i(it)f(do)s(es)g(not)g(blo)s(c)m(k)g(in)g(a)g +(system)g(call.)71 b(As)40 b(a)g(last)150 3067 y(resort)34 +b Ft(A)n(md)43 b Fx(will)35 b(fork)e(b)s(efore)h(it)h(attempts)f(a)h +(system)f(call)h(that)g(ma)m(y)f(blo)s(c)m(k)h(inde\014nitely)-8 +b(,)35 b(suc)m(h)f(as)150 3176 y(moun)m(ting)g(an)h(NFS)f +(\014lesystem.)53 b(Other)33 b(tasks)i(suc)m(h)f(as)h(obtaining)f +(\014lehandle)g(information)h(for)f(an)150 3286 y(NFS)22 +b(\014lesystem,)j(are)d(done)g(using)g(a)g(purp)s(ose)f(built)h +(non-blo)s(c)m(king)h(RPC)e(library)h(whic)m(h)g(is)g(in)m(tegrated)150 +3396 y(with)38 b Ft(A)n(md)9 b Fx('s)39 b(task)g(sc)m(heduler.)65 +b(This)37 b(library)h(is)h(also)g(used)e(to)j(implemen)m(t)f(NFS)f(k)m +(eep-aliv)m(es)j(\(see)150 3505 y(Section)31 b(1.8)h([Keep-aliv)m(es],) +h(page)e(15\).)275 3640 y(Whenev)m(er)24 b(a)g(moun)m(t)g(is)g +(deferred)e(or)i(bac)m(kgrounded,)h Ft(A)n(md)33 b Fx(m)m(ust)24 +b(w)m(ait)h(for)e(it)i(to)f(complete)h(b)s(efore)150 +3749 y(replying)33 b(to)h(the)g(k)m(ernel.)50 b(Ho)m(w)m(ev)m(er,)36 +b(this)d(w)m(ould)h(cause)f Ft(A)n(md)43 b Fx(to)34 b(blo)s(c)m(k)g(w)m +(aiting)h(for)e(a)h(reply)f(to)h(b)s(e)150 3859 y(constructed.)56 +b(Rather)35 b(than)g(do)g(this,)i Ft(A)n(md)45 b Fx(simply)34 +b Fo(drops)k Fx(the)e(call)g(under)e(the)i(assumption)e(that)150 +3968 y(the)d(k)m(ernel)f(RPC)g(mec)m(hanism)h(will)g(automatically)i +(retry)d(the)h(request.)p eop end +%%Page: 17 19 +TeXDict begin 17 18 bop 150 -116 a Fx(Chapter)30 b(2:)41 +b(Supp)s(orted)28 b(Platforms)2214 b(17)150 299 y Fu(2)80 +b(Supp)t(orted)52 b(Platforms)150 533 y Ft(A)n(m-utils)37 +b Fx(has)30 b(b)s(een)f(p)s(orted)g(to)i(a)f(wide)g(v)-5 +b(ariet)m(y)32 b(of)e(mac)m(hines)g(and)g(op)s(erating)g(systems.)41 +b Ft(A)n(m-utils)7 b Fx('s)150 643 y(co)s(de)30 b(w)m(orks)g(for)g +(little-endian)h(and)f(big-endian)g(mac)m(hines,)h(as)f(w)m(ell)h(as)f +(32)h(bit)f(and)f(64)i(bit)f(arc)m(hitec-)150 752 y(tures.)54 +b(F)-8 b(urthermore,)36 b(when)e Ft(A)n(m-utils)42 b +Fx(p)s(orts)34 b(to)i(an)f(Op)s(erating)g(System)f(on)h(one)g(arc)m +(hitecture,)j(it)150 862 y(is)32 b(generally)g(readily)g(p)s(ortable)g +(to)g(the)g(same)g(Op)s(erating)f(System)h(on)f(all)i(platforms)e(on)g +(whic)m(h)h(it)g(is)150 971 y(a)m(v)-5 b(ailable.)275 +1106 y(See)32 b(the)f Fp(INSTALL)f Fx(in)i(the)g(distribution)f(for)g +(more)h(sp)s(eci\014c)f(details)i(on)f(building)f(and/or)g(con\014g-) +150 1215 y(uring)f(for)g(some)h(systems.)p eop end +%%Page: 18 20 +TeXDict begin 18 19 bop eop end +%%Page: 19 21 +TeXDict begin 19 20 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(19)150 299 y Fu(3)80 b(Moun)l(t)53 +b(Maps)150 511 y Ft(A)n(md)40 b Fx(has)30 b(no)g(built-in)g(kno)m +(wledge)h(of)g(mac)m(hines)f(or)h(\014lesystems.)41 b(External)30 +b Fo(moun)m(t-maps)k Fx(are)d(used)150 620 y(to)26 b(pro)m(vide)g(the)f +(required)g(information.)40 b(Sp)s(eci\014cally)-8 b(,)27 +b Ft(A)n(md)35 b Fx(needs)25 b(to)h(kno)m(w)g(when)e(and)h(under)f +(what)150 730 y(conditions)31 b(it)g(should)e(moun)m(t)h +(\014lesystems.)275 860 y(The)d(map)g(en)m(try)h(corresp)s(onding)f(to) +h(the)g(requested)g(name)g(con)m(tains)h(a)f(list)g(of)g(p)s(ossible)f +(lo)s(cations)150 970 y(from)43 b(whic)m(h)g(to)h(resolv)m(e)h(the)f +(request.)80 b(Eac)m(h)44 b(lo)s(cation)h(sp)s(eci\014es)e +(\014lesystem)h(t)m(yp)s(e,)j(information)150 1079 y(required)32 +b(b)m(y)g(that)h(\014lesystem)g(\(for)f(example)h(the)g(blo)s(c)m(k)g +(sp)s(ecial)g(device)g(in)f(the)h(case)g(of)g(UFS\),)g(and)150 +1189 y(some)c(information)g(describing)g(where)f(to)h(moun)m(t)g(the)g +(\014lesystem)g(\(see)g(Section)h(3.3.4.3)h([fs)e(Option],)150 +1298 y(page)i(31\).)42 b(A)31 b(lo)s(cation)g(ma)m(y)g(also)h(con)m +(tain)f Fo(selectors)36 b Fx(\(see)31 b(Section)h(3.3.3)g([Selectors],) +g(page)f(26\).)150 1522 y Fw(3.1)68 b(Map)45 b(T)l(yp)t(es)150 +1681 y Fx(A)34 b(moun)m(t-map)g(pro)m(vides)g(the)g(run-time)g +(con\014guration)g(information)h(to)f Ft(A)n(md)p Fx(.)52 +b(Maps)34 b(can)g(b)s(e)g(im-)150 1791 y(plemen)m(ted)39 +b(in)e(man)m(y)i(w)m(a)m(ys.)64 b(Some)39 b(of)f(the)g(forms)g(supp)s +(orted)e(b)m(y)i Ft(A)n(md)48 b Fx(are)38 b(regular)g(\014les,)j(ndbm) +150 1901 y(databases,)31 b(NIS)f(maps,)g(the)h Fo(Hesio)s(d)j +Fx(name)c(serv)m(er,)h(and)f(ev)m(en)h(the)g(passw)m(ord)e(\014le.)275 +2031 y(A)34 b(moun)m(t-map)g Fo(name)39 b Fx(is)34 b(a)h(sequence)f(of) +h(c)m(haracters.)53 b(When)34 b(an)g(automoun)m(t)h(p)s(oin)m(t)f(is)g +(created)150 2140 y(a)f(handle)e(on)i(the)f(moun)m(t-map)g(is)h +(obtained.)46 b(F)-8 b(or)33 b(eac)m(h)h(map)e(t)m(yp)s(e)g +(con\014gured,)g Ft(A)n(md)42 b Fx(attempts)33 b(to)150 +2250 y(reference)26 b(the)g(map)f(of)h(the)g(appropriate)g(t)m(yp)s(e.) +39 b(If)26 b(a)g(map)f(is)h(found,)f Ft(A)n(md)35 b Fx(notes)27 +b(the)e(t)m(yp)s(e)h(for)g(future)150 2359 y(use)33 b(and)g(deletes)h +(the)g(reference,)h(for)e(example)h(closing)g(an)m(y)g(op)s(en)f +(\014le)g(descriptors.)50 b(The)33 b(a)m(v)-5 b(ailable)150 +2469 y(maps)25 b(are)h(con\014gured)f(when)g Ft(A)n(md)35 +b Fx(is)26 b(built)g(and)f(can)h(b)s(e)f(displa)m(y)m(ed)h(b)m(y)g +(running)e(the)i(command)g(`)p Fp(amd)150 2579 y(-v)p +Fx('.)275 2709 y(When)d(using)g(an)h Ft(A)n(md)33 b Fx(con\014guration) +24 b(\014le)g(\(see)h(Chapter)e(6)i([Amd)e(Con\014guration)g(File],)k +(page)e(59\))150 2818 y(and)35 b(the)g(k)m(eyw)m(ord)g(`)p +Fp(map_type)p Fx(')f(\(see)i(Section)g(6.4.5)h([map)p +2259 2818 28 4 v 40 w(t)m(yp)s(e)e(P)m(arameter],)j(page)e(60\),)i(y)m +(ou)d(ma)m(y)150 2928 y(force)c(the)g(map)f(used)f(to)i(an)m(y)g(t)m +(yp)s(e.)275 3058 y(By)c(default,)g Ft(A)n(md)37 b Fx(cac)m(hes)28 +b(data)f(in)f(a)i(mo)s(de)e(dep)s(enden)m(t)g(on)g(the)h(t)m(yp)s(e)g +(of)g(map.)39 b(This)26 b(is)h(the)g(same)150 3167 y(as)40 +b(sp)s(ecifying)g(`)p Fp(cache:=mapdefault)p Fx(')c(and)j(selects)j(a)e +(suitable)h(default)f(cac)m(he)i(mo)s(de)d(dep)s(ending)150 +3277 y(on)c(the)h(map)f(t)m(yp)s(e.)57 b(The)35 b(individual)g +(defaults)g(are)h(describ)s(ed)f(b)s(elo)m(w.)56 b(The)35 +b Fo(cac)m(he)43 b Fx(option)36 b(can)g(b)s(e)150 3387 +y(sp)s(eci\014ed)c(on)g(automoun)m(t)h(p)s(oin)m(ts)f(to)h(alter)g(the) +f(cac)m(hing)i(b)s(eha)m(vior)e(\(see)h(Section)g(5.19)h([Automoun)m(t) +150 3496 y(Filesystem],)e(page)f(54\).)275 3626 y(The)h(follo)m(wing)i +(map)e(t)m(yp)s(es)h(ha)m(v)m(e)g(b)s(een)f(implemen)m(ted,)i(though)f +(some)g(are)g(not)g(a)m(v)-5 b(ailable)35 b(on)d(all)150 +3736 y(mac)m(hines.)68 b(Run)38 b(the)i(command)f(`)p +Fp(amd)30 b(-v)p Fx(')39 b(to)h(obtain)g(a)f(list)h(of)g(map)f(t)m(yp)s +(es)g(con\014gured)g(on)g(y)m(our)150 3845 y(mac)m(hine.)150 +4036 y Fm(3.1.1)63 b(File)41 b(maps)150 4183 y Fx(When)36 +b Ft(A)n(md)45 b Fx(searc)m(hes)36 b(a)g(\014le)g(for)g(a)g(map)f(en)m +(try)h(it)h(do)s(es)e(a)h(simple)g(scan)g(of)g(the)g(\014le)g(and)f +(supp)s(orts)150 4292 y(b)s(oth)30 b(commen)m(ts)h(and)f(con)m(tin)m +(uation)i(lines.)275 4422 y(Con)m(tin)m(uation)j(lines)h(are)f +(indicated)g(b)m(y)g(a)g(bac)m(kslash)h(c)m(haracter)g(\(`)p +Fp(\\)p Fx('\))g(as)f(the)g(last)g(c)m(haracter)i(of)150 +4532 y(a)42 b(line)f(in)g(the)h(\014le.)73 b(The)41 b(bac)m(kslash,)k +(newline)c(c)m(haracter)i Ft(and)h(any)f(le)-5 b(ading)44 +b(white)f(sp)-5 b(ac)g(e)44 b(on)g(the)150 4642 y(fol)5 +b(lowing)39 b(line)k Fx(are)36 b(discarded.)57 b(A)36 +b(maxim)m(um)g(line)g(length)g(of)g(2047)i(c)m(haracters)f(is)f +(enforced)g(after)150 4751 y(con)m(tin)m(uation)g(lines)e(are)g(read)g +(but)f(b)s(efore)g(commen)m(ts)i(are)f(stripp)s(ed.)50 +b(Eac)m(h)34 b(line)g(m)m(ust)g(end)f(with)h(a)150 4861 +y(newline)27 b(c)m(haracter;)i(that)f(is)e(newlines)h(are)g +(terminators,)h(not)f(separators.)40 b(The)26 b(follo)m(wing)i +(examples)150 4970 y(illustrate)k(this:)390 5100 y Fp(key)238 +b(valA)142 b(valB;)g(\\)867 5210 y(valC)275 5340 y Fx(sp)s(eci\014es)30 +b Ft(thr)-5 b(e)g(e)38 b Fx(lo)s(cations,)32 b(and)e(is)g(iden)m(tical) +i(to)p eop end +%%Page: 20 22 +TeXDict begin 20 21 bop 150 -116 a Fx(20)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))390 299 y Fp(key)238 +b(valA)142 b(valB;)g(valC)275 435 y Fx(Ho)m(w)m(ev)m(er,)390 +571 y Fp(key)238 b(valA)142 b(valB;\\)867 681 y(valC)275 +817 y Fx(sp)s(eci\014es)30 b(only)g Ft(two)37 b Fx(lo)s(cations,)32 +b(and)e(is)g(iden)m(tical)j(to)390 953 y Fp(key)238 b(valA)142 +b(valB;valC)275 1089 y Fx(After)34 b(a)g(complete)h(line)f(has)g(b)s +(een)f(read)g(from)g(the)h(\014le,)h(including)f(con)m(tin)m(uations,)i +Ft(A)n(md)43 b Fx(deter-)150 1198 y(mines)e(whether)g(there)g(is)h(a)f +(commen)m(t)i(on)e(the)g(line.)74 b(A)42 b(commen)m(t)g(b)s(egins)f +(with)g(a)h(hash)e(\(\\`)p Fp(#)p Fx('"\))150 1308 y(c)m(haracter)e +(and)e(con)m(tin)m(ues)i(to)g(the)f(end)f(of)g(the)h(line.)60 +b(There)37 b(is)f(no)h(w)m(a)m(y)h(to)f(escap)s(e)g(or)g(c)m(hange)h +(the)150 1417 y(commen)m(t)31 b(lead-in)g(c)m(haracter.)275 +1553 y(Note)39 b(that)g(con)m(tin)m(uation)h(lines)f(and)e(commen)m(t)j +(supp)s(ort)c Fo(only)46 b Fx(apply)38 b(to)h(\014le)f(maps,)i(or)f +(ndbm)150 1663 y(maps)30 b(built)g(with)g(the)h Fp(mk-amd-map)c +Fx(program.)275 1799 y(When)32 b(cac)m(hing)h(is)g(enabled,)g(\014le)f +(maps)g(ha)m(v)m(e)i(a)f(default)f(cac)m(he)i(mo)s(de)e(of)g +Fp(all)g Fx(\(see)h(Section)g(5.19)150 1909 y([Automoun)m(t)e +(Filesystem],)h(page)f(54\).)150 2109 y Fm(3.1.2)63 b(ndbm)41 +b(maps)150 2256 y Fx(An)c(ndbm)g(map)g(ma)m(y)h(b)s(e)g(used)f(as)h(a)g +(fast)g(access)h(form)f(of)g(a)g(\014le)g(map.)63 b(The)37 +b(program,)j Fp(mk-amd-)150 2366 y(map)p Fx(,)32 b(con)m(v)m(erts)i(a)e +(normal)h(map)f(\014le)g(in)m(to)h(an)f(ndbm)f(database.)47 +b(This)32 b(program)g(supp)s(orts)e(the)j(same)150 2476 +y(con)m(tin)m(uation)39 b(and)d(commen)m(t)i(con)m(v)m(en)m(tions)h +(that)e(are)g(pro)m(vided)g(for)g(\014le)f(maps.)60 b(Note)38 +b(that)g(ndbm)150 2585 y(format)22 b(\014les)g(ma)m(y)h +Ft(not)31 b Fx(b)s(e)21 b(sharable)h(across)h(mac)m(hine)f(arc)m +(hitectures.)40 b(The)21 b(notion)i(of)f(sp)s(eed)f(generally)150 +2695 y(only)34 b(applies)h(to)g(large)g(maps;)h(a)e(small)h(map,)g +(less)f(than)g(a)h(single)g(disk)e(blo)s(c)m(k,)j(is)f(almost)g +(certainly)150 2804 y(b)s(etter)30 b(implemen)m(ted)h(as)g(a)g(\014le)f +(map.)275 2940 y(ndbm)20 b(maps)i(ha)m(v)m(e)i(a)f(default)f(cac)m(he)i +(mo)s(de)e(of)h(`)p Fp(all)p Fx(')f(\(see)i(Section)f(5.19)h([Automoun) +m(t)f(Filesystem],)150 3050 y(page)31 b(54\).)150 3251 +y Fm(3.1.3)63 b(NIS)40 b(maps)150 3398 y Fx(When)c(using)g(NIS)f +(\(formerly)i(YP\),)f(an)g Ft(A)n(md)46 b Fx(map)36 b(is)g(implemen)m +(ted)h(directly)g(b)m(y)f(the)g(underlying)150 3507 y(NIS)j(map.)67 +b(Commen)m(ts)40 b(and)e(con)m(tin)m(uation)j(lines)f(are)g +Ft(not)48 b Fx(supp)s(orted)38 b(in)h(the)g(automoun)m(ter)i(and)150 +3617 y(m)m(ust)30 b(b)s(e)g(stripp)s(ed)f(when)g(constructing)i(the)g +(NIS)f(serv)m(er's)g(database.)275 3753 y(NIS)h(maps)h(ha)m(v)m(e)h(a)g +(default)f(cac)m(he)i(mo)s(de)e(of)g Fp(all)f Fx(\(see)i(Section)g +(5.19)h([Automoun)m(t)f(Filesystem],)150 3862 y(page)e(54\).)275 +3998 y(The)i(follo)m(wing)j(rule)f(illustrates)g(what)f(could)h(b)s(e)f +(added)f(to)j(y)m(our)e(NIS)g Fp(Makefile)p Fx(,)f(in)i(this)f(case)150 +4108 y(causing)d(the)f Fp(amd.home)e Fx(map)i(to)i(b)s(e)d(rebuilt:)390 +4244 y Fp($\(YPTSDIR\)/amd.home.time)o(:)42 b($\(ETCDIR\)/amd.home)581 +4354 y(-@sed)k(-e)h("s/#.*$$//")e(-e)i("/^$$/d")f($\(ETCDIR\)/amd.home) +d(|)k(\\)676 4463 y(awk)g('{)95 b(\\)820 4573 y(for)46 +b(\(i)i(=)f(1;)g(i)h(<=)f(NF;)g(i++\))f(\\)1010 4682 +y(if)i(\(i)f(==)g(NF\))g({)g(\\)1010 4792 y(if)h(\(substr\($$i,)c +(length\($$i\),)h(1\))i(==)g("\\\\"\))f(\\)1201 4902 +y(printf\("\045s",)f(substr\($$i,)g(1,)i(length\($$i\))d(-)k(1\)\);)f +(\\)1010 5011 y(else)g(\\)1201 5121 y(printf\("\045s\\n",)d($$i\);)j +(\\)1010 5230 y(})h(\\)1010 5340 y(else)f(\\)p eop end +%%Page: 21 23 +TeXDict begin 21 22 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(21)1010 299 y Fp(printf\("\045s)45 +b(",)j($$i\);)e(\\)820 408 y(}')h(|)g(\\)581 518 y($\(MAKEDBM\))e(-)i +($\(YPDBDIR\)/amd.home;)c(\\)581 628 y(touch)j +($\(YPTSDIR\)/amd.home.time;)41 b(\\)581 737 y(echo)47 +b("updated)e(amd.home";)g(\\)581 847 y(if)i([)h(!)f($\(NOPUSH\))e(];)i +(then)g(\\)772 956 y($\(YPPUSH\))e(amd.home;)g(\\)772 +1066 y(echo)h("pushed)g(amd.home";)f(\\)581 1176 y(else)i(\\)772 +1285 y(:)g(;)h(\\)581 1395 y(fi)275 1529 y Fx(Here)20 +b Fp($\(YPTSDIR\))e Fx(con)m(tains)k(the)e(time)h(stamp)f(\014les,)j +(and)d Fp($\(YPDBDIR\))d Fx(con)m(tains)22 b(the)f(dbm)e(format)150 +1639 y(NIS)30 b(\014les.)150 1838 y Fm(3.1.4)63 b(NIS)p +Fl(+)41 b Fm(maps)150 1985 y Fx(NIS)p Fp(+)31 b Fx(maps)g(do)g(not)h +(supp)s(ort)e(cac)m(he)j(mo)s(de)e(`)p Fp(all)p Fx(')g(and,)h(when)e +(cac)m(hing)j(is)f(enabled,)g(ha)m(v)m(e)h(a)f(default)150 +2095 y(cac)m(he)g(mo)s(de)e(of)g(`)p Fp(inc)p Fx('.)275 +2230 y(XXX:)h(FILL)f(IN)g(WITH)g(AN)h(EXAMPLE.)150 2429 +y Fm(3.1.5)63 b(Hesio)s(d)42 b(maps)150 2576 y Fx(When)32 +b(the)g(map)g(name)g(b)s(egins)g(with)g(the)g(string)h(`)p +Fp(hesiod.)p Fx(')d(lo)s(okups)i(are)g(made)h(using)e(the)i +Fo(Hesio)s(d)150 2686 y Fx(name)27 b(serv)m(er.)40 b(The)26 +b(string)g(follo)m(wing)j(the)e(dot)g(is)f(used)g(as)h(a)g(name)g +(quali\014er)g(and)f(is)h(prep)s(ended)d(with)150 2795 +y(the)32 b(k)m(ey)h(b)s(eing)e(lo)s(cated.)47 b(The)31 +b(en)m(tire)i(string)f(is)g(then)g(resolv)m(ed)g(in)g(the)g +Fp(automount)d Fx(con)m(text,)35 b(or)d(the)150 2905 +y Ft(amd.c)-5 b(onf)53 b Fx(parameter)32 b(`)p Fp(hesiod_base)p +Fx(')d(\(see)k(Section)f(6.5.14)i([hesio)s(d)p 2651 2905 +28 4 v 40 w(base)e(P)m(arameter],)i(page)e(64\).)150 +3014 y(F)-8 b(or)34 b(example,)g(if)f(the)g(k)m(ey)h(is)f(`)p +Fp(jsp)p Fx(')f(and)g(map)h(name)g(is)g(`)p Fp(hesiod.homes)p +Fx(')d(then)i Fo(Hesio)s(d)37 b Fx(is)c(ask)m(ed)g(to)150 +3124 y(resolv)m(e)f(`)p Fp(jsp.homes.automount)p Fx('.)275 +3259 y(Hesio)s(d)39 b(maps)g(do)g(not)h(supp)s(ort)d(cac)m(he)k(mo)s +(de)e(`)p Fp(all)p Fx(')g(and,)j(when)c(cac)m(hing)j(is)e(enabled,)j +(ha)m(v)m(e)f(a)150 3368 y(default)31 b(cac)m(he)h(mo)s(de)d(of)i(`)p +Fp(inc)p Fx(')f(\(see)h(Section)g(5.19)h([Automoun)m(t)g(Filesystem],)g +(page)f(54\).)275 3503 y(The)e(follo)m(wing)j(is)f(an)f(example)h(of)g +(a)f Fo(Hesio)s(d)k Fx(map)c(en)m(try:)390 3638 y Fp +(jsp.homes.automount)43 b(HS)k(TXT)g("rfs:=/home/charm;rhost)o(:=ch)o +(arm)o(;sub)o(link)o(:=j)o(sp")390 3747 y(njw.homes.automount)c(HS)k +(TXT)g("rfs:=/home/dylan/dk2;r)o(host)o(:=d)o(ylan)o(;sub)o(lin)o(k:=n) +o(jw")p 3970 3767 42 84 v 150 3947 a Fm(3.1.6)63 b(P)m(assw)m(ord)40 +b(maps)150 4094 y Fx(The)30 b(passw)m(ord)h(map)f(supp)s(ort)f(is)i +(unlik)m(e)h(the)f(four)f(previous)g(map)h(t)m(yp)s(es.)42 +b(When)31 b(the)g(map)g(name)g(is)150 4203 y(the)j(string)f +Fp(/etc/passwd)e Ft(A)n(md)43 b Fx(can)34 b(lo)s(okup)f(a)h(user)f +(name)h(in)f(the)h(passw)m(ord)f(\014le)g(and)g(re-arrange)150 +4313 y(the)e(home)f(directory)h(\014eld)f(to)h(pro)s(duce)e(a)i(usable) +f(map)g(en)m(try)-8 b(.)275 4447 y Ft(A)n(md)44 b Fx(assumes)34 +b(the)h(home)g(directory)g(has)g(the)g(format)g(`)p Fp(/)p +Ft(anydir)10 b Fp(/)p Ft(dom1)i Fp(/../)p Ft(domN)j Fp(/)p +Ft(lo)-5 b(gin)7 b Fx('.)57 b(It)150 4557 y(breaks)26 +b(this)g(string)h(in)m(to)g(a)g(map)f(en)m(try)h(where)e +Fp(${rfs})g Fx(has)h(the)h(v)-5 b(alue)27 b(`)p Fp(/)p +Ft(anydir)10 b Fp(/)p Ft(domN)15 b Fx(',)28 b Fp(${rhost})150 +4667 y Fx(has)i(the)h(v)-5 b(alue)31 b(`)p Ft(domN)15 +b Fp(.)p Ft(...)p Fp(.)p Ft(dom1)d Fx(',)32 b(and)e Fp(${sublink})e +Fx(has)i(the)h(v)-5 b(alue)30 b Ft(lo)-5 b(gin)p Fx(.)275 +4801 y(Th)m(us)29 b(if)h(the)h(passw)m(ord)e(\014le)i(en)m(try)g(w)m +(as)390 4936 y Fp(/home/achilles/jsp)275 5071 y Fx(the)f(map)g(en)m +(try)h(used)e(b)m(y)i Ft(A)n(md)39 b Fx(w)m(ould)30 b(b)s(e)390 +5205 y Fp(rfs:=/home/achilles;rhos)o(t:=a)o(chil)o(les)o(;sub)o(link)o +(:=j)o(sp)275 5340 y Fx(Similarly)-8 b(,)31 b(if)f(the)h(passw)m(ord)e +(\014le)i(en)m(try)f(w)m(as)p eop end +%%Page: 22 24 +TeXDict begin 22 23 bop 150 -116 a Fx(22)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))390 299 y Fp +(/home/cc/sugar/mjh)275 434 y Fx(the)g(map)g(en)m(try)h(used)e(b)m(y)i +Ft(A)n(md)39 b Fx(w)m(ould)30 b(b)s(e)390 570 y Fp +(rfs:=/home/sugar;rhost:=)o(suga)o(r.cc)o(;su)o(blin)o(k:=m)o(hj)150 +770 y Fm(3.1.7)63 b(Union)42 b(maps)150 917 y Fx(The)32 +b(union)g(map)g(supp)s(ort)f(is)i(pro)m(vided)f(sp)s(eci\014cally)i +(for)e(use)g(with)h(the)g(union)e(\014lesystem,)j(see)f(Sec-)150 +1027 y(tion)e(5.21)h([Union)e(Filesystem],)j(page)e(55.)275 +1163 y(It)44 b(is)g(iden)m(ti\014ed)g(b)m(y)f(the)i(string)f(`)p +Fp(union:)p Fx(')e(whic)m(h)i(is)g(follo)m(w)m(ed)i(b)m(y)d(a)i(colon)g +(separated)f(list)h(of)150 1272 y(directories.)k(The)33 +b(directories)h(are)f(read)g(in)g(order,)g(and)f(the)i(names)e(of)i +(all)f(en)m(tries)h(are)f(recorded)g(in)150 1382 y(the)j(map)f(cac)m +(he.)58 b(Later)36 b(directories)g(tak)m(e)h(precedence)f(o)m(v)m(er)h +(earlier)g(ones.)56 b(The)35 b(union)g(\014lesystem)150 +1491 y(t)m(yp)s(e)c(then)f(uses)g(the)g(map)g(cac)m(he)i(to)f +(determine)g(the)f(union)g(of)g(the)h(names)f(in)g(all)h(the)g +(directories.)150 1692 y Fm(3.1.8)63 b(LD)m(AP)39 b(maps)150 +1839 y Fx(LD)m(AP)26 b(\(Ligh)m(t)m(w)m(eigh)m(t)i(Directory)e(Access)h +(Proto)s(col\))f(maps)f(do)g(not)g(supp)s(ort)e(cac)m(he)k(mo)s(de)e(`) +p Fp(all)p Fx(')f(and,)150 1948 y(when)29 b(cac)m(hing)j(is)f(enabled,) +f(ha)m(v)m(e)i(a)e(default)h(cac)m(he)h(mo)s(de)e(of)g(`)p +Fp(inc)p Fx('.)275 2084 y(F)-8 b(or)31 b(example,)g(an)f +Ft(A)n(md)40 b Fx(map)30 b(`)p Fp(amd.home)p Fx(')f(that)i(lo)s(oks)f +(as)h(follo)m(ws:)390 2219 y Fp(/defaults)188 b +(opts:=rw,intr;type:=link)390 2439 y(zing)428 b(-rhost:=shekel)44 +b(\\)1010 2548 y(host==shekel)h(\\)1010 2658 y(host!=shekel;type:=nfs) +150 2793 y Fx(when)24 b(con)m(v)m(erted)i(to)f(LD)m(AP)h(\(see)g +(Section)f(10.3)h([amd2ldif)7 b(],)27 b(page)f(101\),)h(will)e(result)g +(in)g(the)f(follo)m(wing)150 2903 y(LD)m(AP)31 b(database:)390 +3039 y Fp($)47 b(amd2ldif)f(amd.home)g(CUCS)g(<)i(amd.home)390 +3148 y(dn:)f(cn=amdmap)e(timestamp,)g(CUCS)390 3258 y(cn)620 +b(:)47 b(amdmap)f(timestamp)390 3367 y(objectClass)188 +b(:)47 b(amdmapTimestamp)390 3477 y(amdmapTimestamp:)c(873071363)390 +3696 y(dn:)k(cn=amdmap)e(amd.home[/defaults],)d(CUCS)390 +3806 y(cn)477 b(:)47 b(amdmap)f(amd.home[/defaults])390 +3915 y(objectClass)f(:)i(amdmap)390 4025 y(amdmapName)93 +b(:)47 b(amd.home)390 4134 y(amdmapKey)141 b(:)47 b(/defaults)390 +4244 y(amdmapValue)e(:)i(opts:=rw,intr;type:=link)390 +4463 y(dn:)g(cn=amdmap)e(amd.home[],)g(CUCS)390 4573 +y(cn)477 b(:)47 b(amdmap)f(amd.home[])390 4682 y(objectClass)f(:)i +(amdmap)390 4792 y(amdmapName)93 b(:)47 b(amd.home)390 +4902 y(amdmapKey)141 b(:)390 5011 y(amdmapValue)45 b(:)390 +5230 y(dn:)i(cn=amdmap)e(amd.home[zing],)f(CUCS)390 5340 +y(cn)477 b(:)47 b(amdmap)f(amd.home[zing])p eop end +%%Page: 23 25 +TeXDict begin 23 24 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(23)390 299 y Fp(objectClass)45 +b(:)i(amdmap)390 408 y(amdmapName)93 b(:)47 b(amd.home)390 +518 y(amdmapKey)141 b(:)47 b(zing)390 628 y(amdmapValue)e(:)i +(-rhost:=shekel)d(host==shekel)h(host!=shekel;type:=nfs)150 +825 y Fm(3.1.9)63 b(Executable)39 b(maps)150 972 y Fx(An)45 +b(executable)i(map)e(is)h(a)g(dynamic)f(map)g(in)g(whic)m(h)g(the)h(k)m +(eys)g(and)f(v)-5 b(alues)46 b(for)f(the)h(maps)f(are)150 +1081 y(generated)c(on)g(the)f(\015y)g(b)m(y)g(a)h(program)f(or)h +(script.)70 b(The)40 b(program)g(is)h(exp)s(ected)f(to)i(tak)m(e)g(a)e +(single)150 1191 y(parameter)35 b(argumen)m(t)h(whic)m(h)f(is)g(the)g +(k)m(ey)h(to)f(lo)s(okup.)54 b(If)35 b(the)g(k)m(ey)h(is)f(found,)g +(the)g(program)g(should)150 1300 y(prin)m(t)25 b(on)g(stdout)h(the)f(k) +m(ey-v)-5 b(alue)27 b(pair)f(that)g(w)m(ere)g(found;)g(if)f(the)h(k)m +(ey)g(w)m(as)g(not)f(found,)h(nothing)f(should)150 1410 +y(b)s(e)30 b(prin)m(ted)g(out.)41 b(Belo)m(w)32 b(is)e(an)g(sample)h +(of)f(suc)m(h)g(a)h(map)f(script:)390 1543 y Fp(#!/bin/sh)390 +1653 y(#)47 b(executable)e(map)i(example)390 1763 y(case)g("$1")f(in) +581 1872 y("/defaults")f(\))390 1982 y(echo)i("/defaults)140 +b(type:=nfs;rfs:=filer")390 2091 y(;;)581 2201 y("a")47 +b(\))390 2311 y(echo)g("a)142 b(type:=nfs;fs:=/tmp")390 +2420 y(;;)581 2530 y("b")47 b(\))390 2639 y(echo)g("b)142 +b(type:=link;fs:=/usr/local)o(")390 2749 y(;;)581 2859 +y(*)47 b(\))96 b(#)47 b(no)g(match,)f(echo)h(nothing)390 +2968 y(;;)390 3078 y(esac)275 3211 y Fx(See)30 b(Section)h(6.5.10)i +([exec)p 1216 3211 28 4 v 41 w(map)p 1429 3211 V 40 w(timeout)f(P)m +(arameter],)g(page)f(63.)150 3441 y Fw(3.2)68 b(Ho)l(w)46 +b(k)l(eys)f(are)h(lo)t(ok)l(ed)f(up)150 3601 y Fx(The)31 +b(k)m(ey)h(is)g(lo)s(cated)h(in)e(the)g(map)h(whose)f(t)m(yp)s(e)h(w)m +(as)f(determined)h(when)e(the)i(automoun)m(t)g(p)s(oin)m(t)g(w)m(as)150 +3710 y(\014rst)26 b(created.)40 b(In)26 b(general)i(the)f(k)m(ey)g(is)g +(a)g(pathname)f(comp)s(onen)m(t.)40 b(In)26 b(some)h(circumstances)g +(this)f(ma)m(y)150 3820 y(b)s(e)38 b(mo)s(di\014ed)g(b)m(y)h(v)-5 +b(ariable)39 b(expansion)g(\(see)h(Section)g(3.3.2)g([V)-8 +b(ariable)41 b(Expansion],)g(page)e(25\))i(and)150 3930 +y(pre\014xing.)57 b(If)35 b(the)h(automoun)m(t)h(p)s(oin)m(t)f(has)g(a) +g(pre\014x,)h(sp)s(eci\014ed)e(b)m(y)h(the)g Fo(pref)53 +b Fx(option,)38 b(then)d(that)i(is)150 4039 y(prep)s(ended)28 +b(to)j(the)g(searc)m(h)g(k)m(ey)g(b)s(efore)f(the)h(map)f(is)g(searc)m +(hed.)275 4173 y(If)36 b(the)g(map)g(cac)m(he)i(is)f(a)g(`)p +Fp(regexp)p Fx(')e(cac)m(he)j(then)e(the)h(k)m(ey)g(is)g(treated)g(as)g +(an)f(egrep-st)m(yle)j(regular)150 4282 y(expression,)30 +b(otherwise)h(a)g(normal)f(string)h(comparison)f(is)h(made.)275 +4416 y(If)f(the)g(k)m(ey)h(cannot)g(b)s(e)f(found)f(then)i(a)f +Fo(wildcard)k Fx(matc)m(h)d(is)g(attempted.)42 b Ft(A)n(md)e +Fx(rep)s(eatedly)31 b(strips)150 4525 y(the)k(basename)g(from)f(the)h +(k)m(ey)-8 b(,)37 b(app)s(ends)c(`)p Fp(/*)p Fx(')h(and)g(attempts)i(a) +f(lo)s(okup.)53 b(Finally)-8 b(,)37 b Ft(A)n(md)44 b +Fx(attempts)150 4635 y(to)31 b(lo)s(cate)h(the)f(sp)s(ecial)g(k)m(ey)g +(`)p Fp(*)p Fx('.)275 4768 y(F)-8 b(or)41 b(example,)k(the)c(follo)m +(wing)i(sequence)e(w)m(ould)g(b)s(e)g(c)m(hec)m(k)m(ed)i(if)e +Fp(home/dylan/dk2)c Fx(w)m(as)k(b)s(eing)150 4878 y(lo)s(cated:)533 +5011 y Fp(home/dylan/dk2)533 5121 y(home/dylan/*)533 +5230 y(home/*)533 5340 y(*)p eop end +%%Page: 24 26 +TeXDict begin 24 25 bop 150 -116 a Fx(24)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(A)m(t)36 +b(an)m(y)g(p)s(oin)m(t)g(when)e(a)j(wildcard)e(is)g(found,)h +Ft(A)n(md)45 b Fx(pro)s(ceeds)36 b(as)g(if)f(an)h(exact)h(matc)m(h)g +(had)e(b)s(een)150 408 y(found)26 b(and)g(the)h(v)-5 +b(alue)28 b(\014eld)e(is)h(then)g(used)f(to)i(resolv)m(e)h(the)e(moun)m +(t)g(request,)h(otherwise)f(an)g(error)g(co)s(de)150 +518 y(is)j(propagated)h(bac)m(k)h(to)f(the)f(k)m(ernel.)41 +b(\(see)32 b(Chapter)e(5)g([Filesystem)i(T)m(yp)s(es],)f(page)g(47\).) +150 758 y Fw(3.3)68 b(Lo)t(cation)46 b(F)-11 b(ormat)150 +917 y Fx(The)35 b(v)-5 b(alue)35 b(\014eld)g(from)g(the)g(lo)s(okup)g +(pro)m(vides)g(the)g(information)h(required)e(to)i(moun)m(t)f(a)g +(\014lesystem.)150 1027 y(The)30 b(information)h(is)f(parsed)g +(according)h(to)g(the)g(syn)m(tax)g(sho)m(wn)e(b)s(elo)m(w.)390 +1166 y Ft(lo)-5 b(c)g(ation-list)9 b Fx(:)935 1276 y +Ft(lo)-5 b(c)g(ation-sele)g(ction)935 1385 y(lo)g(c)g(ation-list)42 +b(white-sp)-5 b(ac)g(e)39 b Fp(||)29 b Ft(white-sp)-5 +b(ac)g(e)39 b(lo)-5 b(c)g(ation-sele)g(ction)390 1495 +y(lo)g(c)g(ation-sele)g(ction)7 b Fx(:)935 1604 y Ft(lo)-5 +b(c)g(ation)935 1714 y(lo)g(c)g(ation-sele)g(ction)40 +b(white-sp)-5 b(ac)g(e)39 b(lo)-5 b(c)g(ation)390 1824 +y(lo)g(c)g(ation)7 b Fx(:)935 1933 y Ft(lo)-5 b(c)g(ation-info)935 +2043 y Fp(-)p Ft(lo)g(c)g(ation-info)935 2152 y Fp(-)390 +2262 y Ft(lo)g(c)g(ation-info)6 b Fx(:)935 2372 y Ft(sel-or-opt)935 +2481 y(lo)-5 b(c)g(ation-info)6 b Fp(;)p Ft(sel-or-opt)935 +2591 y Fp(;)390 2700 y Ft(sel-or-opt)j Fx(:)935 2810 +y Ft(sele)-5 b(ction)935 2920 y(opt-ass)390 3029 y(sele)g(ction)7 +b Fx(:)935 3139 y(selector)p Fp(==)p Ft(value)935 3248 +y Fx(selector)p Fp(!=)p Ft(value)390 3358 y(opt-ass)g +Fx(:)935 3468 y(option)p Fp(:=)p Ft(value)390 3577 y(white-sp)-5 +b(ac)g(e)7 b Fx(:)935 3687 y(space)935 3796 y(tab)275 +3936 y(Note)32 b(that)g(unquoted)e(whitespace)i(is)g(not)f(allo)m(w)m +(ed)i(in)e(a)h(lo)s(cation)h(description.)43 b(White)32 +b(space)g(is)150 4045 y(only)e(allo)m(w)m(ed,)j(and)d(is)g(mandatory)-8 +b(,)31 b(where)f(sho)m(wn)g(with)g(non-terminal)h Ft(white-sp)-5 +b(ac)g(e)p Fx(.)275 4185 y(A)29 b Fo(lo)s(cation-selection)j +Fx(is)e(a)f(list)h(of)f(p)s(ossible)f(v)m(olumes)i(with)f(whic)m(h)g +(to)g(satisfy)h(the)f(request.)40 b(Eac)m(h)150 4294 +y Fo(lo)s(cation-selection)30 b Fx(is)c(tried)g(sequen)m(tially)-8 +b(,)29 b(un)m(til)d(either)g(one)g(succeeds)h(or)e(all)i(fail.)40 +b(This,)26 b(b)m(y)g(the)g(w)m(a)m(y)-8 b(,)150 4404 +y(is)34 b(di\013eren)m(t)h(from)e(the)i(historically)g(do)s(cumen)m +(ted)f(b)s(eha)m(vior,)h(whic)m(h)f(claimed)h(\(falsely)-8 +b(,)37 b(at)e(least)g(for)150 4513 y(last)f(3)g(y)m(ears\))g(that)g +Ft(A)n(md)43 b Fx(w)m(ould)33 b(attempt)h(to)g(moun)m(t)g(all)g +Fo(lo)s(cation-selection)p Fx(s)j(in)c(parallel)h(and)f(the)150 +4623 y(\014rst)d(one)g(to)h(succeed)g(w)m(ould)f(b)s(e)g(used.)275 +4762 y Fo(lo)s(cation-selection)p Fx(s)g(are)e(optionally)g(separated)g +(b)m(y)f(the)g(`)p Fp(||)p Fx(')g(op)s(erator.)40 b(The)26 +b(e\013ect)j(of)e(this)g(op)s(er-)150 4872 y(ator)f(is)g(to)g(prev)m +(en)m(t)g(use)f(of)h(lo)s(cation-selections)j(to)d(its)g(righ)m(t)g(if) +f(an)m(y)h(of)g(the)f(lo)s(cation-selections)k(on)d(its)150 +4981 y(left)j(w)m(ere)h(selected,)h(whether)d(or)g(not)h(an)m(y)h(of)e +(them)h(w)m(ere)g(successfully)g(moun)m(ted)g(\(see)h(Section)f(3.3.3) +150 5091 y([Selectors],)j(page)f(26\).)275 5230 y(The)f(lo)s +(cation-selection,)35 b(and)30 b(singleton)i Fo(lo)s(cation-list)p +Fx(,)h(`)p Fp(type:=ufs;dev:=/dev/xd1g)p Fx(')25 b(w)m(ould)150 +5340 y(inform)30 b Ft(A)n(md)39 b Fx(to)32 b(moun)m(t)e(a)h(UFS)f +(\014lesystem)h(from)f(the)g(blo)s(c)m(k)h(sp)s(ecial)g(device)g +Fp(/dev/xd1g)p Fx(.)p eop end +%%Page: 25 27 +TeXDict begin 25 26 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(25)275 299 y(The)20 b Fo(sel-or-opt)k +Fx(comp)s(onen)m(t)e(is)f(either)g(the)g(name)h(of)f(an)g(option)g +(required)f(b)m(y)h(a)h(sp)s(eci\014c)e(\014lesystem,)150 +408 y(or)31 b(it)g(is)f(the)h(name)g(of)f(a)h(built-in,)g(prede\014ned) +e(selector)j(suc)m(h)e(as)h(the)g(arc)m(hitecture)h(t)m(yp)s(e.)41 +b(The)30 b(v)-5 b(alue)150 518 y(ma)m(y)45 b(b)s(e)f(quoted)h(with)f +(double)g(quotes)i(`)p Fp(")p Fx(',)i(for)d(example)g(`)p +Fp(type:="ufs";dev:="/dev/xd)o(1g")o Fx('.)150 628 y(These)37 +b(quotes)h(are)g(stripp)s(ed)e(when)h(the)g(v)-5 b(alue)38 +b(is)g(parsed)f(and)f(there)i(is)g(no)f(w)m(a)m(y)i(to)f(get)g(a)g +(double)150 737 y(quote)29 b(in)m(to)g(a)g(v)-5 b(alue)28 +b(\014eld.)40 b(Double)29 b(quotes)g(are)f(used)g(to)h(get)g(white)f +(space)h(in)m(to)g(a)g(v)-5 b(alue)29 b(\014eld,)f(whic)m(h)150 +847 y(is)i(needed)g(for)h(the)f(program)g(\014lesystem)h(\(see)g +(Section)g(5.15)h([Program)f(Filesystem],)h(page)g(52\).)150 +1047 y Fm(3.3.1)63 b(Map)41 b(Defaults)150 1194 y Fx(A)e(lo)s(cation)h +(b)s(eginning)d(with)i(a)g(dash)e(`)p Fp(-)p Fx(')i(is)f(used)g(to)h +(sp)s(ecify)f(default)h(v)-5 b(alues)39 b(for)f(subsequen)m(t)g(lo-)150 +1304 y(cations.)63 b(An)m(y)37 b(previously)g(sp)s(eci\014ed)g +(defaults)g(in)g(the)g(lo)s(cation-list)j(are)e(discarded.)61 +b(The)37 b(default)150 1413 y(string)30 b(can)h(b)s(e)f(empt)m(y)h(in)f +(whic)m(h)g(case)h(no)f(defaults)h(apply)-8 b(.)275 1549 +y(The)28 b(lo)s(cation)i(`)p Fp(-fs:=/mnt;opts:=ro)p +Fx(')24 b(w)m(ould)29 b(set)g(the)g(lo)s(cal)h(moun)m(t)f(p)s(oin)m(t)f +(to)i Fp(/mnt)d Fx(and)h(cause)150 1659 y(moun)m(ts)38 +b(to)h(b)s(e)f(read-only)g(b)m(y)h(default.)64 b(Defaults)40 +b(sp)s(eci\014ed)d(this)h(w)m(a)m(y)i(are)e(app)s(ended)f(to,)k(and)d +(so)150 1768 y(o)m(v)m(erride,)32 b(an)m(y)e(global)i(map)e(defaults)h +(giv)m(en)g(with)f(`)p Fp(/defaults)p Fx('\).)150 1968 +y Fm(3.3.2)63 b(V)-10 b(ariable)40 b(Expansion)150 2115 +y Fx(T)-8 b(o)31 b(allo)m(w)i(generic)e(lo)s(cation)i(sp)s +(eci\014cations)e Ft(A)n(md)41 b Fx(do)s(es)30 b(v)-5 +b(ariable)32 b(expansion)e(on)h(eac)m(h)h(lo)s(cation)h(and)150 +2225 y(also)42 b(on)f(some)h(of)f(the)g(option)h(strings.)73 +b(An)m(y)41 b(option)h(or)f(selector)i(app)s(earing)d(in)h(the)g(form)g +Fp($)p Fk(var)150 2335 y Fx(is)e(replaced)h(b)m(y)g(the)f(curren)m(t)g +(v)-5 b(alue)40 b(of)g(that)g(option)f(or)h(selector.)69 +b(F)-8 b(or)40 b(example,)j(if)c(the)h(v)-5 b(alue)40 +b(of)150 2444 y Fp(${key})31 b Fx(w)m(as)i(`)p Fp(bin)p +Fx(',)h Fp(${autodir})c Fx(w)m(as)j(`)p Fp(/a)p Fx(')f(and)h +Fp(${fs})e Fx(w)m(as)i(`)p Fp(${autodir}/local/${key})p +Fx(')27 b(then)150 2554 y(after)e(expansion)g Fp(${fs})f +Fx(w)m(ould)h(ha)m(v)m(e)h(the)f(v)-5 b(alue)25 b(`)p +Fp(/a/local/bin)p Fx('.)36 b(An)m(y)25 b(en)m(vironmen)m(t)h(v)-5 +b(ariable)26 b(can)150 2663 y(b)s(e)k(accessed)h(in)f(a)h(similar)g(w)m +(a)m(y)-8 b(.)275 2799 y(Tw)m(o)29 b(pathname)h(op)s(erators)g(are)g(a) +m(v)-5 b(ailable)32 b(when)c(expanding)h(a)h(v)-5 b(ariable.)42 +b(If)29 b(the)g(v)-5 b(ariable)31 b(name)150 2909 y(b)s(egins)e(with)f +(`)p Fp(/)p Fx(')h(then)g(only)g(the)h(last)g(comp)s(onen)m(t)f(of)g +(the)g(pathname)g(is)g(substituted.)40 b(F)-8 b(or)30 +b(example,)150 3018 y(if)38 b Fp(${path})e Fx(w)m(as)i(`)p +Fp(/foo/bar)p Fx(')e(then)i Fp(${/path})e Fx(w)m(ould)i(b)s(e)f +(expanded)g(to)i(`)p Fp(bar)p Fx('.)63 b(Similarly)-8 +b(,)41 b(if)d(the)150 3128 y(v)-5 b(ariable)27 b(name)f(ends)f(with)g +(`)p Fp(/)p Fx(')i(then)e(all)i(but)e(the)h(last)h(comp)s(onen)m(t)f +(of)g(the)h(pathname)e(is)h(substituted.)150 3237 y(In)k(the)g +(previous)g(example,)h Fp(${path/})e Fx(w)m(ould)h(b)s(e)f(expanded)h +(to)h(`)p Fp(/foo)p Fx('.)275 3373 y(Tw)m(o)40 b(domain)f(name)h(op)s +(erators)g(are)g(also)h(pro)m(vided.)69 b(If)39 b(the)h(v)-5 +b(ariable)41 b(name)f(b)s(egins)f(with)h(`)p Fp(.)p Fx(')150 +3482 y(then)k(only)h(the)f(domain)g(part)g(of)h(the)f(name)h(is)f +(substituted.)82 b(F)-8 b(or)45 b(example,)k(if)44 b +Fp(${rhost})f Fx(w)m(as)150 3592 y(`)p Fp(swan.doc.ic.ac.uk)p +Fx(')33 b(then)38 b Fp(${.rhost})d Fx(w)m(ould)i(b)s(e)g(expanded)f(to) +j(`)p Fp(doc.ic.ac.uk)p Fx('.)59 b(Similarly)-8 b(,)150 +3702 y(if)40 b(the)g(v)-5 b(ariable)41 b(name)f(ends)g(with)g(`)p +Fp(.)p Fx(')g(then)g(only)g(the)g(host)g(comp)s(onen)m(t)h(is)f +(substituted.)69 b(In)40 b(the)150 3811 y(previous)30 +b(example,)h Fp(${rhost.})d Fx(w)m(ould)i(b)s(e)g(expanded)f(to)j(`)p +Fp(swan)p Fx('.)275 3947 y(V)-8 b(ariable)32 b(expansion)f(is)h(a)f(t)m +(w)m(o)i(phase)e(pro)s(cess.)43 b(Before)32 b(a)f(lo)s(cation)i(is)f +(parsed,)f(all)h(references)f(to)150 4056 y(selectors,)k +Ft(e)-5 b(g)40 b Fp(${path})p Fx(,)31 b(are)i(expanded.)47 +b(The)31 b(lo)s(cation)k(is)d(then)g(parsed,)h(selections)h(are)f(ev)-5 +b(aluated)150 4166 y(and)42 b(option)g(assignmen)m(ts)h(recorded.)77 +b(If)42 b(there)g(w)m(ere)h(no)f(selections)i(or)e(they)h(all)g +(succeeded)g(the)150 4276 y(lo)s(cation)38 b(is)f(used)f(and)h(the)g(v) +-5 b(alues)37 b(of)g(the)g(follo)m(wing)h(options)f(are)h(expanded)e +(in)g(the)h(order)g(giv)m(en:)150 4385 y Fo(sublink)p +Fx(,)29 b Fo(rfs)p Fx(,)h Fo(fs)p Fx(,)g Fo(opts)p Fx(,)h +Fo(remopts)p Fx(,)g Fo(moun)m(t)h Fx(and)e Fo(unmoun)m(t)p +Fx(.)275 4521 y(Note)h(that)f(expansion)g(of)g(option)g(v)-5 +b(alues)31 b(is)f(done)f(after)i Fo(all)j Fx(assignmen)m(ts)d(ha)m(v)m +(e)g(b)s(een)e(completed)150 4630 y(and)d(not)h(in)g(a)g(purely)f(left) +h(to)h(righ)m(t)f(order)f(as)h(is)g(done)g(b)m(y)f(the)h(shell.)40 +b(This)26 b(generally)i(has)f(the)f(desired)150 4740 +y(e\013ect)39 b(but)e(care)h(m)m(ust)f(b)s(e)g(tak)m(en)i(if)e(one)h +(of)f(the)h(options)g(references)f(another,)j(in)d(whic)m(h)g(case)i +(the)150 4850 y(ordering)30 b(can)h(b)s(ecome)g(signi\014can)m(t.)275 +4985 y(There)e(are)i(t)m(w)m(o)h(sp)s(ecial)f(cases)g(concerning)g(v)-5 +b(ariable)31 b(expansion:)199 5121 y(1.)61 b(b)s(efore)44 +b(a)g(map)g(is)g(consulted,)k(an)m(y)d(selectors)h(in)e(the)g(name)g +(receiv)m(ed)i(from)d(the)i(k)m(ernel)g(are)330 5230 +y(expanded.)e(F)-8 b(or)32 b(example,)h(if)e(the)g(request)h(from)f +(the)g(k)m(ernel)h(w)m(as)g(for)f(`)p Fp(${arch}.bin)p +Fx(')e(and)i(the)330 5340 y(mac)m(hine)g(arc)m(hitecture)h(w)m(as)f(`)p +Fp(vax)p Fx(',)f(the)h(v)-5 b(alue)30 b(giv)m(en)i(to)f +Fp(${key})e Fx(w)m(ould)h(b)s(e)g(`)p Fp(vax.bin)p Fx('.)p +eop end +%%Page: 26 28 +TeXDict begin 26 27 bop 150 -116 a Fx(26)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))199 299 y(2.)61 +b(the)53 b(v)-5 b(alue)53 b(of)f Fp(${rhost})f Fx(is)h(expanded)g(and)g +(normalized)h(b)s(efore)f(the)h(other)g(options)g(are)330 +408 y(expanded.)123 b(The)58 b(normalization)h(pro)s(cess)f(strips)g +(an)m(y)g(lo)s(cal)h(sub-domain)f(comp)s(onen)m(ts.)330 +518 y(F)-8 b(or)78 b(example,)90 b(if)78 b Fp(${domain})c +Fx(w)m(as)k(`)p Fp(Berkeley.EDU)p Fx(')d(and)i Fp(${rhost})e +Fx(w)m(as)i(initially)330 628 y(`)p Fp(snow.Berkeley.EDU)p +Fx(',)35 b(after)j(the)g(normalization)h(it)f(w)m(ould)g(simply)f(b)s +(e)g(`)p Fp(snow)p Fx('.)61 b(Hostname)330 737 y(normalization)32 +b(is)e(curren)m(tly)h(done)f(in)g(a)h Ft(c)-5 b(ase-dep)g(endent)41 +b Fx(manner.)150 925 y Fm(3.3.3)63 b(Selectors)150 1072 +y Fx(Selectors)32 b(are)f(used)e(to)i(con)m(trol)h(the)f(use)f(of)h(a)g +(lo)s(cation.)42 b(It)31 b(is)f(p)s(ossible)g(to)i(share)e(a)h(moun)m +(t)f(map)g(b)s(e-)150 1181 y(t)m(w)m(een)24 b(man)m(y)g(mac)m(hines)g +(in)f(suc)m(h)g(a)g(w)m(a)m(y)i(that)e(\014lesystem)h(lo)s(cation,)j +(arc)m(hitecture)e(and)d(op)s(erating)i(sys-)150 1291 +y(tem)h(di\013erences)g(are)g(hidden)e(from)i(the)f(users.)38 +b(A)25 b(selector)h(of)f(the)g(form)f(`)p Fp(arch==sun3;os==sunos4)p +Fx(')150 1400 y(w)m(ould)30 b(only)h(apply)f(on)g(Sun-3s)f(running)g +(SunOS)f(4.x.)275 1529 y(Selectors)33 b(can)f(b)s(e)f(negated)j(b)m(y)d +(using)h(`)p Fp(!=)p Fx(')g(instead)g(of)g(`)p Fp(==)p +Fx('.)46 b(F)-8 b(or)33 b(example)g(to)f(select)i(a)e(lo)s(cation)150 +1639 y(on)e(all)i(non-V)-8 b(ax)31 b(mac)m(hines)g(the)f(selector)i(`)p +Fp(arch!=vax)p Fx(')d(w)m(ould)h(b)s(e)f(used.)275 1767 +y(Selectors)d(are)f(ev)-5 b(aluated)26 b(left)g(to)g(righ)m(t.)39 +b(If)25 b(a)g(selector)i(fails)e(then)g(that)g(lo)s(cation)i(is)e +(ignored.)39 b(Th)m(us)150 1877 y(the)34 b(selectors)i(form)e(a)g +(conjunction)h(and)e(the)i(lo)s(cations)g(form)f(a)h(disjunction.)51 +b(If)34 b(all)h(the)f(lo)s(cations)150 1986 y(are)j(ignored)h(or)f +(otherwise)g(fail)h(then)e Ft(A)n(md)47 b Fx(uses)36 +b(the)i Fo(error)43 b Fx(\014lesystem)37 b(\(see)h(Section)g(5.22)h +([Error)150 2096 y(Filesystem],)34 b(page)e(56\).)45 +b(This)31 b(is)h(equiv)-5 b(alen)m(t)33 b(to)f(ha)m(ving)g(a)g(lo)s +(cation)h(`)p Fp(type:=error)p Fx(')c(at)j(the)g(end)f(of)150 +2205 y(eac)m(h)h(moun)m(t-map)e(en)m(try)-8 b(.)275 2334 +y(The)40 b(default)h(v)-5 b(alue)41 b(of)g(man)m(y)g(of)g(the)g +(selectors)h(listed)f(here)g(can)g(b)s(e)f(o)m(v)m(erridden)h(b)m(y)f +(an)h Ft(A)n(md)150 2444 y Fx(command)33 b(line)h(switc)m(h)g(or)f(in)g +(an)g Ft(A)n(md)43 b Fx(con\014guration)34 b(\014le.)49 +b(See)34 b(Chapter)f(6)g([Amd)g(Con\014guration)150 2553 +y(File],)f(page)f(59.)275 2682 y(The)e(follo)m(wing)j(selectors)g(are)f +(curren)m(tly)f(implemen)m(ted.)150 2869 y Fm(3.3.3.1)63 +b(arc)m(h)40 b(Selector)h(V)-10 b(ariable)150 3016 y +Fx(The)36 b(mac)m(hine)i(arc)m(hitecture)h(whic)m(h)d(w)m(as)i +(automatically)i(determined)c(at)i(compile)g(time.)61 +b(The)37 b(ar-)150 3126 y(c)m(hitecture)c(t)m(yp)s(e)f(can)g(b)s(e)f +(displa)m(y)m(ed)h(b)m(y)g(running)d(the)j(command)g(`)p +Fp(amd)d(-v)p Fx('.)44 b(Y)-8 b(ou)32 b(can)g(o)m(v)m(erride)h(this)150 +3235 y(v)-5 b(alue)23 b(also)h(using)f(the)g Fp(-A)f +Fx(command)h(line)g(option.)39 b(See)23 b(Chapter)g(2)g([Supp)s(orted)e +(Platforms],)k(page)f(17.)150 3423 y Fm(3.3.3.2)63 b(auto)s(dir)42 +b(Selector)f(V)-10 b(ariable)150 3570 y Fx(The)34 b(default)g +(directory)h(under)d(whic)m(h)i(to)h(moun)m(t)f(\014lesystems.)52 +b(This)33 b(ma)m(y)i(b)s(e)e(c)m(hanged)i(b)m(y)f(the)h +Fp(-a)150 3679 y Fx(command)30 b(line)h(option.)41 b(See)31 +b(Section)g(3.3.4.3)i([fs)d(Option],)g(page)i(31.)150 +3867 y Fm(3.3.3.3)63 b(b)m(yte)40 b(Selector)h(V)-10 +b(ariable)150 4014 y Fx(The)42 b(mac)m(hine's)h(b)m(yte)g(ordering.)76 +b(This)41 b(is)i(either)f(`)p Fp(little)p Fx(',)i(indicating)g +(little-endian,)j(or)42 b(`)p Fp(big)p Fx(',)150 4123 +y(indicating)28 b(big-endian.)40 b(One)27 b(p)s(ossible)g(use)g(is)g +(to)h(share)f(`)p Fp(rwho)p Fx(')g(databases)h(\(see)g(Section)h(11.5)g +([rwho)150 4233 y(serv)m(ers],)d(page)f(110\).)40 b(Another)24 +b(is)g(to)g(share)g(ndbm)e(databases,)27 b(ho)m(w)m(ev)m(er)e(this)f +(use)g(can)g(b)s(e)f(considered)150 4342 y(a)31 b(courageous)g +(juggling)g(act.)150 4530 y Fm(3.3.3.4)63 b(cluster)41 +b(Selector)g(V)-10 b(ariable)150 4677 y Fx(This)35 b(is)h(pro)m(vided)g +(as)g(a)g(ho)s(ok)g(for)g(the)g(name)g(of)g(the)g(lo)s(cal)h(cluster.) +58 b(This)35 b(can)h(b)s(e)g(used)f(to)i(decide)150 4786 +y(whic)m(h)32 b(serv)m(ers)h(to)g(use)f(for)h(copies)g(of)f(replicated) +i(\014lesystems.)47 b Fp(${cluster})30 b Fx(defaults)j(to)g(the)f(v)-5 +b(alue)150 4896 y(of)31 b Fp(${domain})c Fx(unless)j(a)h(di\013eren)m +(t)g(v)-5 b(alue)31 b(is)f(set)h(with)f(the)g Fp(-C)g +Fx(command)g(line)h(option.)150 5083 y Fm(3.3.3.5)63 +b(domain)42 b(Selector)f(V)-10 b(ariable)150 5230 y Fx(The)36 +b(lo)s(cal)j(domain)d(name)h(as)g(sp)s(eci\014ed)g(b)m(y)f(the)i +Fp(-d)e Fx(command)h(line)g(option.)61 b(See)37 b(Section)g(3.3.3.7)150 +5340 y([host)31 b(Selector)g(V)-8 b(ariable],)33 b(page)e(27.)p +eop end +%%Page: 27 29 +TeXDict begin 27 28 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(27)150 299 y Fm(3.3.3.6)63 +b(dollar)42 b(Selector)e(V)-10 b(ariable)150 446 y Fx(This)28 +b(is)h(a)g(sp)s(ecial)h(v)-5 b(ariable,)30 b(whose)f(sole)h(purp)s(ose) +d(is)i(to)h(pro)s(duce)e(a)h(literal)h(dollar)g(sign)f(in)f(the)h(v)-5 +b(alue)150 555 y(of)26 b(another)g(v)-5 b(ariable.)40 +b(F)-8 b(or)27 b(example,)h(if)e(y)m(ou)g(ha)m(v)m(e)i(a)e(remote)h +(\014le)f(system)g(whose)g(name)g(is)g(`)p Fp(/disk$s)p +Fx(',)150 665 y(y)m(ou)31 b(can)f(moun)m(t)h(it)g(b)m(y)f(setting)h +(the)g(remote)g(\014le)g(system)f(v)-5 b(ariable)31 b(as)g(follo)m(ws:) +390 831 y Fp(rfs:=/disk${dollar}s)150 1062 y Fm(3.3.3.7)63 +b(host)42 b(Selector)f(V)-10 b(ariable)150 1209 y Fx(The)27 +b(lo)s(cal)j(hostname)e(as)g(determined)g(b)m(y)g Fn(gethostname)p +Fx(\(2\).)42 b(If)28 b(no)g(domain)f(name)h(w)m(as)h(sp)s(eci\014ed)e +(on)150 1319 y(the)h(command)g(line)h(and)e(the)i(hostname)f(con)m +(tains)h(a)g(p)s(erio)s(d)e(`)p Fp(.)p Fx(')h(then)g(the)g(string)g(b)s +(efore)g(the)g(p)s(erio)s(d)150 1428 y(is)38 b(used)e(as)i(the)g(host)g +(name,)h(and)e(the)h(string)g(after)g(the)f(p)s(erio)s(d)g(is)g +(assigned)h(to)g Fp(${domain})p Fx(.)60 b(F)-8 b(or)150 +1538 y(example,)35 b(if)e(the)g(hostname)g(is)h(`)p Fp +(styx.doc.ic.ac.uk)p Fx(')29 b(then)j Fp(host)g Fx(w)m(ould)h(b)s(e)g +(`)p Fp(styx)p Fx(')f(and)h Fp(domain)150 1648 y Fx(w)m(ould)d(b)s(e)g +(`)p Fp(doc.ic.ac.uk)p Fx('.)38 b Fp(hostd)29 b Fx(w)m(ould)h(b)s(e)g +(`)p Fp(styx.doc.ic.ac.uk)p Fx('.)150 1879 y Fm(3.3.3.8)63 +b(hostd)42 b(Selector)f(V)-10 b(ariable)150 2026 y Fx(This)24 +b(resolv)m(es)i(to)g(the)f Fp(${host})e Fx(and)i Fp(${domain})d +Fx(concatenated)27 b(with)e(a)g(`)p Fp(.)p Fx(')h(inserted)e(b)s(et)m +(w)m(een)i(them)150 2135 y(if)k(required.)40 b(If)30 +b Fp(${domain})e Fx(is)i(an)h(empt)m(y)f(string)h(then)f +Fp(${host})e Fx(and)i Fp(${hostd})e Fx(will)j(b)s(e)f(iden)m(tical.)150 +2366 y Fm(3.3.3.9)63 b(k)-7 b(arc)m(h)40 b(Selector)h(V)-10 +b(ariable)150 2513 y Fx(This)27 b(is)g(pro)m(vided)h(as)f(a)h(ho)s(ok)g +(for)f(the)h(k)m(ernel)g(arc)m(hitecture.)41 b(This)27 +b(is)h(used)f(on)g(SunOS)e(4)j(and)f(SunOS)150 2623 y(5,)32 +b(for)g(example,)h(to)f(distinguish)f(b)s(et)m(w)m(een)h(di\013eren)m +(t)g(`)p Fp(/usr/kvm)p Fx(')e(v)m(olumes.)44 b Fp(${karch})30 +b Fx(defaults)h(to)150 2732 y(the)k(\\mac)m(hine")i(v)-5 +b(alue)36 b(gotten)g(from)f Fn(uname)p Fx(\(2\).)55 b(If)35 +b(the)g Fn(uname)p Fx(\(2\))h(system)f(call)i(is)e(not)g(a)m(v)-5 +b(ailable,)150 2842 y(the)26 b(v)-5 b(alue)27 b(of)f +Fp(${karch})e Fx(defaults)i(to)h(that)f(of)h Fp(${arch})p +Fx(.)37 b(Finally)-8 b(,)28 b(a)f(di\013eren)m(t)f(v)-5 +b(alue)27 b(can)f(b)s(e)g(set)g(with)150 2951 y(the)31 +b Fp(-k)e Fx(command)h(line)h(option.)150 3182 y Fm(3.3.3.10)63 +b(os)42 b(Selector)f(V)-10 b(ariable)150 3329 y Fx(The)32 +b(op)s(erating)i(system.)48 b(Lik)m(e)34 b(the)f(mac)m(hine)g(arc)m +(hitecture,)i(this)e(is)g(automatically)j(determined)c(at)150 +3439 y(compile)f(time.)41 b(The)30 b(op)s(erating)g(system)g(name)g +(can)h(b)s(e)e(displa)m(y)m(ed)i(b)m(y)e(running)g(the)h(command)g(`)p +Fp(amd)150 3549 y(-v)p Fx('.)40 b(See)31 b(Chapter)f(2)h([Supp)s(orted) +d(Platforms],)j(page)g(17.)150 3780 y Fm(3.3.3.11)63 +b(osv)m(er)42 b(Selector)f(V)-10 b(ariable)150 3927 y +Fx(The)42 b(op)s(erating)h(system)f(v)m(ersion.)77 b(Lik)m(e)43 +b(the)g(mac)m(hine)g(arc)m(hitecture,)k(this)42 b(is)h(automatically)i +(de-)150 4036 y(termined)38 b(at)g(compile)h(time.)64 +b(The)38 b(op)s(erating)g(system)g(name)g(can)g(b)s(e)f(displa)m(y)m +(ed)i(b)m(y)f(running)e(the)150 4146 y(command)30 b(`)p +Fp(amd)g(-v)p Fx('.)40 b(See)31 b(Chapter)f(2)g([Supp)s(orted)f +(Platforms],)i(page)g(17.)150 4377 y Fm(3.3.3.12)63 b(full)p +802 4377 37 5 v 55 w(os)42 b(Selector)f(V)-10 b(ariable)150 +4524 y Fx(The)35 b(full)g(name)g(of)h(the)f(op)s(erating)h(system,)h +(including)e(its)h(v)m(ersion.)56 b(This)35 b(v)-5 b(alue)36 +b(is)f(automatically)150 4633 y(determined)30 b(at)h(compile)g(time.)42 +b(The)29 b(full)h(op)s(erating)h(system)f(name)h(and)e(v)m(ersion)i +(can)g(b)s(e)e(displa)m(y)m(ed)150 4743 y(b)m(y)h(running)f(the)h +(command)h(`)p Fp(amd)e(-v)p Fx('.)41 b(See)30 b(Chapter)g(2)h([Supp)s +(orted)d(Platforms],)j(page)h(17.)150 4974 y Fm(3.3.3.13)63 +b(v)m(endor)42 b(Selector)f(V)-10 b(ariable)150 5121 +y Fx(The)34 b(name)g(of)g(the)h(v)m(endor)f(of)g(the)g(op)s(erating)h +(system.)52 b(This)33 b(v)-5 b(alue)35 b(is)f(automatically)j +(determined)150 5230 y(at)c(compile)g(time.)48 b(The)32 +b(name)g(of)h(the)f(v)m(endor)h(can)f(b)s(e)g(displa)m(y)m(ed)h(b)m(y)f +(running)f(the)h(command)h(`)p Fp(amd)150 5340 y(-v)p +Fx('.)40 b(See)31 b(Chapter)f(2)h([Supp)s(orted)d(Platforms],)j(page)g +(17.)p eop end +%%Page: 28 30 +TeXDict begin 28 29 bop 150 -116 a Fx(28)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(The)g(follo)m(wing) +i(selectors)g(are)g(also)f(pro)m(vided.)42 b(Unlik)m(e)32 +b(the)f(other)g(selectors,)i(they)d(v)-5 b(ary)31 b(for)g(eac)m(h)150 +408 y(lo)s(okup.)39 b(Note)28 b(that)f(when)e(the)h(name)h(from)f(the)g +(k)m(ernel)h(is)f(expanded)g(prior)g(to)h(a)f(map)g(lo)s(okup,)h(these) +150 518 y(selectors)32 b(are)f(all)g(de\014ned)e(as)i(empt)m(y)f +(strings.)150 710 y Fm(3.3.3.14)63 b(k)m(ey)40 b(Selector)h(V)-10 +b(ariable)150 856 y Fx(The)39 b(name)g(b)s(eing)f(resolv)m(ed.)68 +b(F)-8 b(or)40 b(example,)i(if)d Fp(/home)f Fx(is)h(an)g(automoun)m(t)h +(p)s(oin)m(t,)i(then)c(accessing)150 966 y Fp(/home/foo)25 +b Fx(w)m(ould)j(set)h Fp(${key})d Fx(to)j(the)f(string)g(`)p +Fp(foo)p Fx('.)39 b(The)28 b(k)m(ey)g(is)g(pre\014xed)f(b)m(y)h(the)g +Fo(pref)45 b Fx(option)28 b(set)150 1076 y(in)k(the)h(paren)m(t)f(moun) +m(t)h(p)s(oin)m(t.)47 b(The)31 b(default)i(pre\014x)e(is)i(an)f(empt)m +(y)h(string.)47 b(If)32 b(the)g(pre\014x)g(w)m(as)g Fp(blah/)150 +1185 y Fx(then)e Fp(${key})f Fx(w)m(ould)h(b)s(e)g(set)h(to)g +Fp(blah/foo)p Fx(.)150 1377 y Fm(3.3.3.15)63 b(map)41 +b(Selector)g(V)-10 b(ariable)150 1524 y Fx(The)30 b(name)g(of)h(the)f +(moun)m(t)h(map)f(b)s(eing)g(used.)150 1715 y Fm(3.3.3.16)63 +b(netn)m(um)m(b)s(er)42 b(Selector)f(V)-10 b(ariable)150 +1862 y Fx(This)56 b(selector)j(is)e(iden)m(tical)i(to)f(the)g(`)p +Fp(in_network)p Fx(')d(selector)j(function,)64 b(see)58 +b(Section)g(3.3.3.26)150 1972 y([in)p 257 1972 28 4 v +40 w(net)m(w)m(ork)36 b(Selector)h(F)-8 b(unction],)37 +b(page)f(30.)57 b(It)35 b(will)h(matc)m(h)g(either)g(the)f(name)h(or)f +(n)m(um)m(b)s(er)f(of)h Ft(any)150 2081 y Fx(net)m(w)m(ork)47 +b(in)m(terface)h(on)e(whic)m(h)g(this)g(host)g(is)g(connected)i(to.)89 +b(The)45 b(names)h(and)g(n)m(um)m(b)s(ers)f(of)h(all)150 +2191 y(attac)m(hed)32 b(in)m(terfaces)g(are)f(a)m(v)-5 +b(ailable)33 b(from)c(the)i(output)f(of)g(`)p Fp(amd)g(-v)p +Fx('.)150 2382 y Fm(3.3.3.17)63 b(net)m(w)m(ork)40 b(Selector)h(V)-10 +b(ariable)150 2529 y Fx(This)56 b(selector)j(is)e(iden)m(tical)i(to)f +(the)g(`)p Fp(in_network)p Fx(')d(selector)j(function,)64 +b(see)58 b(Section)g(3.3.3.26)150 2639 y([in)p 257 2639 +V 40 w(net)m(w)m(ork)36 b(Selector)h(F)-8 b(unction],)37 +b(page)f(30.)57 b(It)35 b(will)h(matc)m(h)g(either)g(the)f(name)h(or)f +(n)m(um)m(b)s(er)f(of)h Ft(any)150 2748 y Fx(net)m(w)m(ork)47 +b(in)m(terface)h(on)e(whic)m(h)g(this)g(host)g(is)g(connected)i(to.)89 +b(The)45 b(names)h(and)g(n)m(um)m(b)s(ers)f(of)h(all)150 +2858 y(attac)m(hed)32 b(in)m(terfaces)g(are)f(a)m(v)-5 +b(ailable)33 b(from)c(the)i(output)f(of)g(`)p Fp(amd)g(-v)p +Fx('.)150 3050 y Fm(3.3.3.18)63 b(path)41 b(Selector)g(V)-10 +b(ariable)150 3196 y Fx(The)39 b(full)f(pathname)h(of)g(the)h(name)f(b) +s(eing)f(resolv)m(ed.)68 b(F)-8 b(or)40 b(example)g Fp(/home/foo)c +Fx(in)j(the)g(example)150 3306 y(ab)s(o)m(v)m(e.)150 +3498 y Fm(3.3.3.19)63 b(wire)41 b(Selector)g(V)-10 b(ariable)150 +3644 y Fx(This)56 b(selector)j(is)e(iden)m(tical)i(to)f(the)g(`)p +Fp(in_network)p Fx(')d(selector)j(function,)64 b(see)58 +b(Section)g(3.3.3.26)150 3754 y([in)p 257 3754 V 40 w(net)m(w)m(ork)36 +b(Selector)h(F)-8 b(unction],)37 b(page)f(30.)57 b(It)35 +b(will)h(matc)m(h)g(either)g(the)f(name)h(or)f(n)m(um)m(b)s(er)f(of)h +Ft(any)150 3864 y Fx(net)m(w)m(ork)47 b(in)m(terface)h(on)e(whic)m(h)g +(this)g(host)g(is)g(connected)i(to.)89 b(The)45 b(names)h(and)g(n)m(um) +m(b)s(ers)f(of)h(all)150 3973 y(attac)m(hed)32 b(in)m(terfaces)g(are)f +(a)m(v)-5 b(ailable)33 b(from)c(the)i(output)f(of)g(`)p +Fp(amd)g(-v)p Fx('.)150 4165 y Fm(3.3.3.20)63 b(uid)42 +b(Selector)f(V)-10 b(ariable)150 4312 y Fx(This)24 b(selector)i(pro)m +(vides)f(the)f(n)m(umeric)h(e\013ectiv)m(e)i(user)d(ID)h(\(UID\))g(of)g +(the)g(user)f(whic)m(h)g(last)h(accessed)h(an)150 4421 +y(automoun)m(ted)i(path)e(name.)40 b(This)26 b(simple)h(example)g(sho)m +(ws)g(ho)m(w)g(\015opp)m(y)f(moun)m(ting)h(can)g(b)s(e)g(assigned)150 +4531 y(only)j(to)i(mac)m(hine)f(o)m(wners:)390 4661 y +Fp(floppy)94 b(-type:=pcfs)45 b(\\)772 4771 y(uid==2301;host==shekel;d) +o(ev:)o(=/de)o(v/fl)o(opp)o(y)d(\\)772 4881 y(uid==6712;host==titan;de) +o(v=/)o(dev/)o(fd0)f(\\)772 4990 y(uid==0;dev:=/dev/fd0c)h(\\)772 +5100 y(type:=error)275 5230 y Fx(The)27 b(example)i(allo)m(ws)h(t)m(w)m +(o)f(mac)m(hine)g(o)m(wners)g(to)g(moun)m(t)f(\015oppies)f(on)i(their)f +(designated)h(w)m(orksta-)150 5340 y(tions,)i(allo)m(ws)h(the)e(ro)s +(ot)h(user)f(to)h(moun)m(t)f(on)g(an)m(y)h(host,)g(and)f(otherwise)g +(forces)h(an)f(error.)p eop end +%%Page: 29 31 +TeXDict begin 29 30 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(29)150 299 y Fm(3.3.3.21)63 +b(gid)42 b(Selector)f(V)-10 b(ariable)150 446 y Fx(This)27 +b(selector)j(pro)m(vides)f(the)f(n)m(umeric)g(e\013ectiv)m(e)j(group)d +(ID)g(\(GID\))i(of)e(the)h(user)f(whic)m(h)g(last)h(accessed)150 +555 y(an)h(automoun)m(ted)h(path)f(name.)275 908 y(The)23 +b(follo)m(wing)j(b)s(o)s(olean)e(functions)g(are)h(selectors)h(whic)m +(h)e(tak)m(e)i(an)e(argumen)m(t)h Ft(AR)n(G)p Fx(.)f(They)g(return)150 +1018 y(a)33 b(v)-5 b(alue)32 b(of)h(true)f(or)g(false,)i(and)e(th)m(us) +g(do)g(not)g(need)g(to)h(b)s(e)f(compared)g(with)g(a)h(v)-5 +b(alue.)47 b(Eac)m(h)33 b(of)f(these)150 1127 y(ma)m(y)f(b)s(e)f +(negated)h(b)m(y)f(prep)s(ending)f(`)p Fp(!)p Fx(')h(to)h(their)g +(name.)150 1325 y Fm(3.3.3.22)63 b(exists)42 b(Selector)f(F)-10 +b(unction)150 1472 y Fx(If)31 b(the)h(\014le)g(listed)g(b)m(y)g +Ft(AR)n(G)39 b Fx(exists)33 b(\(via)g Fn(lstat)p Fx(\(2\)\),)i(this)c +(function)h(ev)-5 b(aluates)33 b(to)f(true.)45 b(Otherwise)31 +b(it)150 1581 y(ev)-5 b(aluates)32 b(to)f(false.)150 +1779 y Fm(3.3.3.23)63 b(false)42 b(Selector)f(F)-10 b(unction)150 +1925 y Fx(Alw)m(a)m(ys)32 b(ev)-5 b(aluates)32 b(to)f(false.)41 +b Ft(AR)n(G)d Fx(is)31 b(ignored.)150 2123 y Fm(3.3.3.24)63 +b(netgrp)42 b(Selector)f(F)-10 b(unction)150 2270 y Fx(The)37 +b(argumen)m(t)h Ft(AR)n(G)45 b Fx(of)38 b(this)f(selector)j(is)d(a)h +(netgroup)f(name)h(follo)m(w)m(ed)h(optionally)g(b)m(y)e(a)h(comma)150 +2379 y(and)g(a)i(host)f(name.)66 b(If)39 b(the)g(host)g(name)g(is)g +(not)g(sp)s(eci\014ed,)i(it)e(defaults)g(to)h Fp(${host})p +Fx(.)64 b(If)39 b(the)g(host)150 2489 y(name)30 b(\(short)f(name\))h +(is)g(a)g(mem)m(b)s(er)f(of)g(the)h(netgroup,)g(this)f(selector)j(ev)-5 +b(aluates)31 b(to)f(true.)40 b(Otherwise)150 2599 y(it)31 +b(ev)-5 b(aluates)32 b(to)f(false.)275 2732 y(F)-8 b(or)27 +b(example,)h(supp)s(ose)e(y)m(ou)h(ha)m(v)m(e)h(a)f(netgroup)f(`)p +Fp(ppp-hosts)p Fx(',)g(and)g(for)h(reasons)f(of)h(p)s(erformance,)150 +2842 y(these)33 b(ha)m(v)m(e)g(a)f(lo)s(cal)i Fp(/home)d +Fx(partition,)i(while)f(all)h(other)g(clien)m(ts)g(on)f(the)h(faster)f +(net)m(w)m(ork)h(can)g(access)150 2951 y(a)e(shared)e(home)i(directory) +-8 b(.)41 b(A)31 b(common)g(map)f(to)h(use)f(for)g(b)s(oth)g(migh)m(t)h +(lo)s(ok)g(lik)m(e)g(the)g(follo)m(wing:)390 3085 y Fp(home/*)94 +b(netgrp\(ppp-hosts\);type:=)o(lin)o(k;fs)o(:=/l)o(oca)o(l/${)o(key})41 +b(\\)772 3194 y(!netgrp\(ppp-hosts\);type:)o(=nf)o(s;rh)o(ost:)o(=se)o +(rv1;)o(rfs:)o(=/r)o(emot)o(e/${)o(key)o(})275 3328 y +Fx(A)26 b(more)h(complex)h(example)f(that)h(tak)m(es)g(adv)-5 +b(an)m(tage)29 b(of)e(the)g(t)m(w)m(o)h(argumen)m(t)f(netgrp)g(moun)m +(t)f(selec-)150 3437 y(tor)32 b(is)g(giv)m(en)g(in)f(the)h(follo)m +(wing)h(scenario.)45 b(Supp)s(ose)30 b(one)i(w)m(an)m(ts)g(to)h(moun)m +(t)e(the)h(lo)s(cal)h(scratc)m(h)f(space)150 3547 y(from)d(a)h(eac)m(h) +h(host)f(under)e Fp(scratch/)c Fx(and)29 b(some)h(hosts)g(ha) +m(v)m(e)h(their)e(scratc)m(h)i(space)f(in)g(a)150 3657 +y(di\013eren)m(t)35 b(path)f(than)g(others.)52 b(Hosts)35 +b(in)f(the)g(netgroup)g(`)p Fp(apple-hosts)p Fx(')e(ha)m(v)m(e)j(their) +f(scratc)m(h)h(space)150 3766 y(in)e(the)g Fp(/apple)e +Fx(path,)j(where)f(hosts)g(in)g(the)g(netgroup)g(`)p +Fp(cherry-hosts)p Fx(')d(ha)m(v)m(e)k(their)f(scratc)m(h)h(space)150 +3876 y(in)h(the)g Fp(/cherry)e Fx(path.)54 b(F)-8 b(or)36 +b(hosts)f(that)g(are)h(neither)f(in)f(the)h(`)p Fp(apple-hosts)p +Fx(')e(or)i(`)p Fp(cherry-hosts)p Fx(')150 3985 y(netgroups)c(w)m(e)i +(w)m(an)m(t)g(to)f(mak)m(e)h(a)f(symlink)g(p)s(oin)m(ting)g(to)g(no)m +(where)g(but)f(pro)m(vide)h(a)h(descriptiv)m(e)f(error)150 +4095 y(message)f(in)g(the)f(link)g(destination:)390 4229 +y Fp(scratch/*)45 b(netgrp\(apple-hosts,${/key)o(}\);t)o(ype:)o(=nf)o +(s;rh)o(ost:)o(=${)o(/key)o(};\\)581 4338 y(rfs:="/apple")f(\\)390 +4448 y(netgrp\(cherry-hosts,${/k)o(ey}\))o(;typ)o(e:=)o(nfs;)o(rhos)o +(t:=)o(${/k)o(ey};)o(\\)581 4557 y(rfs:="/cherry")g(\\)390 +4667 y(type:=link;rfs:="no)f(local)j(partition)f(for)i(${/key}")150 +4864 y Fm(3.3.3.25)63 b(netgrp)s(d)43 b(Selector)d(F)-10 +b(unction)150 5011 y Fx(The)37 b(argumen)m(t)h Ft(AR)n(G)45 +b Fx(of)38 b(this)f(selector)j(is)d(a)h(netgroup)f(name)h(follo)m(w)m +(ed)h(optionally)g(b)m(y)e(a)h(comma)150 5121 y(and)e(a)h(host)g(name.) +60 b(If)36 b(the)h(host)g(name)f(is)h(not)g(sp)s(eci\014ed,)h(it)f +(defaults)g(to)g Fp(${hostd})p Fx(.)58 b(If)36 b(the)h(host)150 +5230 y(name)g(\(fully-quali\014ed)h(name\))f(is)g(a)h(mem)m(b)s(er)e +(of)h(the)h(netgroup,)h(this)e(selector)h(ev)-5 b(aluates)39 +b(to)f(true.)150 5340 y(Otherwise)30 b(it)h(ev)-5 b(aluates)32 +b(to)f(false.)p eop end +%%Page: 30 32 +TeXDict begin 30 31 bop 150 -116 a Fx(30)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(The)f(`)p +Fp(netgrpd)p Fx(')f(function)i(uses)f(fully-quali\014ed)h(host)g(names) +g(to)g(matc)m(h)h(netgroup)f(names,)g(while)150 408 y(the)j(`)p +Fp(netgrp)p Fx(')f(function)h(\(see)h(Section)g(3.3.3.24)i([netgrp)e +(Selector)g(F)-8 b(unction],)35 b(page)f(29\))g(uses)f(short)150 +518 y(host)d(names.)150 712 y Fm(3.3.3.26)63 b(in)p 731 +712 37 5 v 55 w(net)m(w)m(ork)40 b(Selector)h(F)-10 b(unction)150 +859 y Fx(This)42 b(selector)j(matc)m(hes)f(against)g(an)m(y)g(net)m(w)m +(ork)g(name)f(or)g(n)m(um)m(b)s(er)f(with)g(an)h(optional)h(netmask.) +150 969 y(First,)33 b(if)e(the)h(curren)m(t)f(host)h(has)g(an)m(y)g +(net)m(w)m(ork)g(in)m(terface)h(that)g(is)e(lo)s(cally)i(attac)m(hed)h +(to)e(the)g(net)m(w)m(ork)150 1078 y(sp)s(eci\014ed)e(in)g +Ft(AR)n(G)38 b Fx(\(either)31 b(via)g(name)f(or)h(n)m(um)m(b)s(er\),)e +(this)i(selector)h(ev)-5 b(aluates)32 b(to)f(true.)275 +1210 y(Second,)22 b(`)p Fp(in_network)p Fx(')c(supp)s(orts)g(a)j(net)m +(w)m(ork/netmask)h(syn)m(tax)e(suc)m(h)g(as)h(`)p Fp +(128.59.16.0/255.255.255.0)o Fx(',)p 4135 1233 42 91 +v 150 1320 a(`)p Fp(128.59.16.0/24)p Fx(',)37 b(`)p Fp +(128.59.16.0/0xffffff00)p Fx(',)e(or)j(`)p Fp(128.59.16.0/)p +Fx('.)62 b(Using)39 b(the)f(last)h(form,)150 1430 y Ft(A)n(md)i +Fx(will)32 b(matc)m(h)g(the)g(sp)s(eci\014ed)f(net)m(w)m(ork)h(n)m(um)m +(b)s(er)e(against)j(the)e(default)h(netmasks)g(of)f(eac)m(h)i(of)f(the) +150 1539 y(lo)s(cally)g(attac)m(hed)g(in)m(terfaces.)275 +1671 y(If)d(the)i(selector)h(do)s(es)e(not)h(matc)m(h,)g(it)g(ev)-5 +b(aluates)32 b(to)f(false.)275 1803 y(F)-8 b(or)35 b(example,)h(supp)s +(ose)d(y)m(ou)h(ha)m(v)m(e)i(t)m(w)m(o)g(serv)m(ers)e(that)h(ha)m(v)m +(e)g(an)g(exp)s(ortable)f Fp(/opt)g Fx(that)g(smaller)150 +1913 y(clien)m(ts)g(can)f(NFS)g(moun)m(t.)47 b(The)33 +b(t)m(w)m(o)h(serv)m(ers)e(are)h(sa)m(y)-8 b(,)35 b(`)p +Fp(serv1)p Fx(')d(on)g(net)m(w)m(ork)i(`)p Fp(foo-net.site.com)p +Fx(')150 2022 y(and)g(`)p Fp(serv2)p Fx(')g(on)h(net)m(w)m(ork)g(`)p +Fp(123.4.5.0)p Fx('.)52 b(Y)-8 b(ou)35 b(can)h(write)f(a)g(map)f(to)i +(b)s(e)e(used)g(b)m(y)g(all)i(clien)m(ts)g(that)150 2132 +y(will)31 b(attempt)g(to)g(moun)m(t)g(the)f(closest)i(one)f(as)f(follo) +m(ws:)390 2264 y Fp(opt)47 b(in_network\(foo-net.site.)o(com\))o(;rh)o +(ost:)o(=ser)o(v1;)o(rfs:)o(=/op)o(t)42 b(\\)581 2374 +y(in_network\(123.4.5.0\);rh)o(ost:)o(=se)o(rv2;)o(rfs:)o(=/o)o(pt)g +(\\)581 2483 y(rhost:=fallback-server)150 2677 y Fm(3.3.3.27)63 +b(true)41 b(Selector)g(F)-10 b(unction)150 2824 y Fx(Alw)m(a)m(ys)32 +b(ev)-5 b(aluates)32 b(to)f(true.)40 b Ft(AR)n(G)e Fx(is)31 +b(ignored.)150 3019 y Fm(3.3.3.28)63 b(xhost)42 b(Selector)f(F)-10 +b(unction)150 3166 y Fx(This)26 b(function)h(compares)g +Ft(AR)n(G)35 b Fx(against)28 b(the)f(curren)m(t)g(hostname,)h +(similarly)g(to)f(the)h(Section)f(3.3.3.7)150 3275 y([host)45 +b(Selector)i(V)-8 b(ariable],)50 b(page)c(27.)85 b(Ho)m(w)m(ev)m(er,)51 +b(this)45 b(function)g(will)g(also)h(matc)m(h)g(if)f +Ft(AR)n(G)53 b Fx(is)45 b(a)150 3385 y(CNAME)31 b(\(DNS)f(Canonical)i +(Name,)f(or)f(alias\))i(for)e(the)h(curren)m(t)f(host's)h(name.)150 +3579 y Fm(3.3.4)63 b(Map)41 b(Options)150 3726 y Fx(Options)36 +b(are)h(parsed)f(concurren)m(tly)h(with)f(selectors.)61 +b(The)36 b(di\013erence)h(is)g(that)g(when)e(an)i(option)g(is)150 +3836 y(seen)32 b(the)g(string)h(follo)m(wing)g(the)f(`)p +Fp(:=)p Fx(')g(is)h(recorded)e(for)h(later)h(use.)46 +b(As)32 b(a)h(minim)m(um)e(the)h Fo(t)m(yp)s(e)37 b Fx(option)150 +3945 y(m)m(ust)27 b(b)s(e)f(sp)s(eci\014ed.)39 b(Eac)m(h)28 +b(\014lesystem)f(t)m(yp)s(e)g(has)g(other)g(options)h(whic)m(h)f(m)m +(ust)f(also)i(b)s(e)f(sp)s(eci\014ed.)39 b(See)150 4055 +y(Chapter)30 b(5)h([Filesystem)h(T)m(yp)s(es],)e(page)h(47,)g(for)g +(details)g(on)f(the)h(\014lesystem)f(sp)s(eci\014c)h(options.)275 +4187 y(Sup)s(er\015uous)c(option)k(sp)s(eci\014cations)g(are)f(ignored) +h(and)f(are)g(not)h(rep)s(orted)f(as)g(errors.)275 4319 +y(The)f(follo)m(wing)j(options)f(apply)f(to)h(more)g(than)f(one)g +(\014lesystem)h(t)m(yp)s(e.)150 4513 y Fm(3.3.4.1)63 +b(addopts)42 b(Option)150 4660 y Fx(This)23 b(option)i(adds)e +(additional)i(options)f(to)g(default)h(options)f(normally)g(sp)s +(eci\014ed)f(in)h(the)g(`)p Fp(/defaults)p Fx(')150 4770 +y(en)m(try)38 b(or)f(the)h(defaults)f(of)h(the)f(k)m(ey)i(en)m(try)e(b) +s(eing)g(pro)s(cessed)g(\(see)i(Section)f(3.3.4.4)i([opts)e(Option],) +150 4879 y(page)d(31\).)55 b(Normally)35 b(when)f(y)m(ou)h(sp)s(ecify)f +(`)p Fp(opts)p Fx(')g(in)g(b)s(oth)g(the)h(`)p Fp(/defaults)p +Fx(')d(and)i(the)h(map)f(en)m(try)-8 b(,)150 4989 y(the)34 +b(latter)h(o)m(v)m(errides)g(the)f(former)f(completely)-8 +b(.)53 b(But)34 b(with)f(`)p Fp(addopts)p Fx(')f(it)j(will)f(app)s(end) +e(the)i(options)150 5098 y(and)c(o)m(v)m(erride)h(an)m(y)g +(con\015icting)g(ones.)275 5230 y(`)p Fp(addopts)p Fx(')f(also)i(o)m(v) +m(errides)h(the)e(v)-5 b(alue)32 b(of)g(the)g(`)p Fp(remopts)p +Fx(')e(option)i(\(see)g(Section)h(3.3.4.5)h([remopts)150 +5340 y(Option],)d(page)g(36\),)h(whic)m(h)e(unless)f(sp)s(eci\014ed)h +(defaults)g(to)i(the)e(v)-5 b(alue)31 b(of)f(`)p Fp(opts)p +Fx('.)p eop end +%%Page: 31 33 +TeXDict begin 31 32 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(31)275 299 y(Options)30 b(whic)m(h)h(start) +g(with)g(`)p Fp(no)p Fx(')f(will)i(o)m(v)m(erride)g(those)f(with)g(the) +g(same)g(name)g(that)g(do)g(not)g(start)150 408 y(with)j(`)p +Fp(no)p Fx(')g(and)f(vice)i(v)m(erse.)53 b(Sp)s(ecial)34 +b(handling)g(is)g(giv)m(en)h(to)g(in)m(v)m(erted)g(options)f(suc)m(h)g +(as)g(`)p Fp(soft)p Fx(')g(and)150 518 y(`)p Fp(hard)p +Fx(',)c(`)p Fp(bg)p Fx(')g(and)g(`)p Fp(fg)p Fx(',)h(`)p +Fp(ro)p Fx(')f(and)g(`)p Fp(rw)p Fx(',)g(etc.)275 653 +y(F)-8 b(or)31 b(example,)g(if)f(the)h(default)f(options)h(sp)s +(eci\014ed)f(w)m(ere)390 787 y Fp(opts:=rw,nosuid,intr,rsi)o(ze=1)o +(024,)o(wsi)o(ze=1)o(024,)o(quo)o(ta,p)o(osix)275 922 +y Fx(and)f(the)i(ones)f(sp)s(eci\014ed)g(in)g(a)h(map)f(en)m(try)h(w)m +(ere)390 1057 y Fp(addopts:=grpid,suid,ro,r)o(size)o(=204)o(8,q)o(uota) +o(,noi)o(ntr)275 1191 y Fx(then)f(the)g(actual)i(options)f(used)e(w)m +(ould)h(b)s(e)390 1326 y Fp(wsize=1024,posix,grpid,s)o(uid,)o(ro,r)o +(siz)o(e=20)o(48,q)o(uot)o(a,no)o(intr)150 1526 y Fm(3.3.4.2)63 +b(dela)m(y)40 b(Option)150 1672 y Fx(The)29 b(dela)m(y)-8 +b(,)31 b(in)e(seconds,)h(b)s(efore)f(an)h(attempt)g(will)g(b)s(e)f +(made)g(to)i(moun)m(t)e(from)g(the)h(curren)m(t)f(lo)s(cation.)150 +1782 y(Auxiliary)i(data,)g(suc)m(h)f(as)g(net)m(w)m(ork)h(address,)f +(\014le)g(handles)g(and)g(so)g(on)g(are)h(computed)f(regardless)h(of) +150 1892 y(this)f(v)-5 b(alue.)275 2026 y(A)27 b(dela)m(y)h(can)g(b)s +(e)f(used)f(to)i(implemen)m(t)g(the)g(notion)g(of)f(primary)g(and)g +(secondary)g(\014le)h(serv)m(ers.)39 b(The)150 2136 y(secondary)c(serv) +m(ers)h(w)m(ould)f(ha)m(v)m(e)h(a)g(dela)m(y)g(of)f(a)h(few)f(seconds,) +i(th)m(us)d(giving)i(the)g(primary)e(serv)m(ers)i(a)150 +2246 y(c)m(hance)31 b(to)h(resp)s(ond)c(\014rst.)150 +2445 y Fm(3.3.4.3)63 b(fs)42 b(Option)150 2592 y Fx(The)30 +b(lo)s(cal)i(moun)m(t)e(p)s(oin)m(t.)41 b(The)29 b(seman)m(tics)j(of)f +(this)f(option)h(v)-5 b(ary)30 b(b)s(et)m(w)m(een)h(\014lesystems.)275 +2727 y(F)-8 b(or)32 b(NFS)g(and)g(UFS)f(\014lesystems)i(the)f(v)-5 +b(alue)32 b(of)g Fp(${fs})f Fx(is)h(used)f(as)h(the)g(lo)s(cal)i(moun)m +(t)e(p)s(oin)m(t.)45 b(F)-8 b(or)150 2836 y(other)22 +b(\014lesystem)g(t)m(yp)s(es)f(it)i(has)e(other)h(meanings)g(whic)m(h)f +(are)h(describ)s(ed)f(in)g(the)h(section)g(describing)g(the)150 +2946 y(resp)s(ectiv)m(e)29 b(\014lesystem)f(t)m(yp)s(e.)41 +b(It)28 b(is)g(imp)s(ortan)m(t)g(that)h(this)f(string)g(uniquely)f +(iden)m(ti\014es)h(the)h(\014lesystem)150 3055 y(b)s(eing)23 +b(moun)m(ted.)39 b(T)-8 b(o)24 b(satisfy)g(this)f(requiremen)m(t,)j(it) +e(should)f(con)m(tain)i(the)f(name)f(of)h(the)g(host)g(on)f(whic)m(h) +150 3165 y(the)31 b(\014lesystem)f(is)h(residen)m(t)f(and)g(the)h +(pathname)f(of)g(the)h(\014lesystem)g(on)f(the)h(lo)s(cal)g(or)g +(remote)g(host.)275 3300 y(The)26 b(reason)h(for)f(requiring)g(the)h +(hostname)g(is)g(clear)h(if)e(replicated)i(\014lesystems)f(are)g +(considered.)39 b(If)150 3409 y(a)30 b(\014leserv)m(er)f(go)s(es)h(do)m +(wn)f(and)g(a)g(replacemen)m(t)i(\014lesystem)f(is)f(moun)m(ted)g(then) +g(the)h Fo(lo)s(cal)k Fx(moun)m(t)29 b(p)s(oin)m(t)150 +3519 y Fo(m)m(ust)d Fx(b)s(e)e(di\013eren)m(t)i(from)e(that)h(of)g(the) +g(\014lesystem)g(whic)m(h)f(is)h(h)m(ung.)38 b(Some)24 +b(enco)s(ding)h(of)g(the)g(\014lesystem)150 3628 y(name)30 +b(is)h(required)e(if)i(more)f(than)g(one)h(\014lesystem)g(is)f(to)h(b)s +(e)f(moun)m(ted)g(from)g(an)m(y)h(giv)m(en)g(host.)275 +3763 y(If)21 b(the)i(hostname)f(is)h(\014rst)e(in)h(the)h(path)f(then)g +(all)h(moun)m(ts)f(from)g(a)h(particular)g(host)f(will)h(b)s(e)e +(gathered)150 3873 y(b)s(elo)m(w)26 b(a)g(single)h(directory)-8 +b(.)40 b(If)26 b(that)g(serv)m(er)g(go)s(es)h(do)m(wn)e(then)h(the)g(h) +m(ung)f(moun)m(t)h(p)s(oin)m(ts)g(are)g(less)g(lik)m(ely)150 +3982 y(to)31 b(b)s(e)e(acciden)m(tally)k(referenced,)d(for)g(example)h +(when)e Fn(getcwd)p Fx(\(3\))j(tra)m(v)m(erses)g(the)e(namespace)h(to)f +(\014nd)150 4092 y(the)h(pathname)f(of)g(the)h(curren)m(t)f(directory) +-8 b(.)275 4226 y(The)28 b(`)p Fp(fs)p Fx(')h(option)h(defaults)f(to)h +Fp(${autodir}/${rhost}${rfs)o(})p Fx(.)k(In)29 b(addition,)h(`)p +Fp(rhost)p Fx(')e(defaults)150 4336 y(to)23 b(the)g(lo)s(cal)h(host)e +(name)h(\()p Fp(${host})p Fx(\))e(and)h(`)p Fp(rfs)p +Fx(')g(defaults)h(to)g(the)g(v)-5 b(alue)23 b(of)f Fp(${path})p +Fx(,)h(whic)m(h)f(is)h(the)f(full)150 4446 y(path)32 +b(of)g(the)g(requested)f(\014le;)i(`)p Fp(/home/foo)p +Fx(')d(in)h(the)h(example)h(ab)s(o)m(v)m(e)g(\(see)g(Section)f(3.3.3)i +([Selectors],)150 4555 y(page)42 b(26\).)75 b Fp(${autodir})39 +b Fx(defaults)i(to)h(`)p Fp(/a)p Fx(')g(but)e(ma)m(y)i(b)s(e)f(c)m +(hanged)h(with)f(the)h Fp(-a)e Fx(command)i(line)150 +4665 y(option.)55 b(Sun's)33 b(automoun)m(ter)j(defaults)f(to)h(`)p +Fp(/tmp_mnt)p Fx('.)52 b(Note)37 b(that)e(there)g(is)g(no)g(`)p +Fp(/)p Fx(')g(b)s(et)m(w)m(een)h(the)150 4774 y Fp(${rhost})28 +b Fx(and)i Fp(${rfs})f Fx(since)h Fp(${rfs})f Fx(b)s(egins)h(with)g(a)h +(`)p Fp(/)p Fx('.)150 4974 y Fm(3.3.4.4)63 b(opts)42 +b(Option)150 5121 y Fx(The)29 b(options)g(to)h(pass)f(to)h(the)f(moun)m +(t)g(system)h(call.)41 b(A)30 b(leading)g(`)p Fp(-)p +Fx(')f(is)g(silen)m(tly)i(ignored.)40 b(The)29 b(moun)m(t)150 +5230 y(options)39 b(supp)s(orted)d(generally)k(corresp)s(ond)d(to)i +(those)g(used)e(b)m(y)i Fn(moun)m(t)p Fx(\(8\))g(and)f(are)h(listed)f +(b)s(elo)m(w.)150 5340 y(Some)30 b(additional)i(pseudo-options)e(are)h +(in)m(terpreted)f(b)m(y)h Ft(A)n(md)39 b Fx(and)30 b(are)h(also)g +(listed.)p eop end +%%Page: 32 34 +TeXDict begin 32 33 bop 150 -116 a Fx(32)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(Unless)36 +b(sp)s(eci\014cally)h(o)m(v)m(erridden,)h(eac)m(h)f(of)g(the)f(system)g +(default)h(moun)m(t)f(options)g(applies.)59 b(An)m(y)150 +408 y(options)33 b(not)g(recognized)h(are)f(ignored.)48 +b(If)33 b(no)f(options)h(list)h(is)e(supplied)g(the)h(string)g(`)p +Fp(rw,defaults)p Fx(')150 518 y(is)g(used)f(and)g(all)h(the)g(system)g +(default)f(moun)m(t)h(options)g(apply)-8 b(.)48 b(Options)32 +b(whic)m(h)g(are)h(not)g(applicable)150 628 y(for)e(a)g(particular)g +(op)s(erating)h(system)f(are)g(silen)m(tly)i(ignored.)42 +b(F)-8 b(or)32 b(example,)g(only)f(4.4BSD)h(is)f(kno)m(wn)150 +737 y(to)g(implemen)m(t)g(the)g Fp(compress)d Fx(and)i +Fp(spongy)e Fx(options.)150 909 y Fp(acdirmax=)p Fk(n)630 +1018 y Fx(Set)j(the)f(maxim)m(um)g(directory)h(attribute)g(cac)m(he)h +(timeout)g(to)f Fo(n)p Fx(.)150 1186 y Fp(acdirmin=)p +Fk(n)630 1295 y Fx(Set)g(the)f(minim)m(um)g(directory)h(attribute)g +(cac)m(he)h(timeout)f(to)g Fo(n)p Fx(.)150 1463 y Fp(acregmax=)p +Fk(n)630 1572 y Fx(Set)g(the)f(maxim)m(um)g(\014le)h(attribute)g(cac)m +(he)h(timeout)f(to)g Fo(n)p Fx(.)150 1739 y Fp(acregmin=)p +Fk(n)630 1849 y Fx(Set)g(the)f(minim)m(um)g(\014le)g(attribute)h(cac)m +(he)h(timeout)g(to)f Fo(n)p Fx(.)150 2016 y Fp(actimeo=)p +Fk(n)630 2126 y Fx(Set)g(the)f(o)m(v)m(erall)j(attribute)e(cac)m(he)h +(timeout)f(to)g Fo(n)p Fx(.)150 2293 y Fp(auto)150 2403 +y(ignore)192 b Fx(Ignore)31 b(this)f(moun)m(t)g(b)m(y)g +Fn(df)p Fx(\(1\).)150 2570 y Fp(cache)240 b Fx(Allo)m(w)32 +b(data)f(to)g(b)s(e)e(cac)m(hed)j(from)e(a)h(remote)g(serv)m(er)g(for)f +(this)g(moun)m(t.)150 2738 y Fp(closesession)630 2847 +y Fx(F)-8 b(or)31 b(UDF)g(moun)m(ts,)g(close)h(the)e(session)h(when)e +(unmoun)m(ting.)150 3015 y Fp(compress)96 b Fx(Use)31 +b(NFS)f(compression)g(proto)s(col.)150 3182 y Fp(defperm)144 +b Fx(Ignore)34 b(the)g(p)s(ermission)f(mo)s(de)h(bits,)g(and)g(default) +g(\014le)g(p)s(ermissions)f(to)h(0555,)j(UID)d(0,)630 +3292 y(and)c(GID)h(0.)41 b(Useful)30 b(for)g(CD-R)m(OMs)h(formatted)g +(as)g(ISO-9660.)150 3459 y Fp(dev)336 b Fx(Allo)m(w)32 +b(lo)s(cal)f(sp)s(ecial)g(devices)g(on)g(this)f(\014lesystem.)150 +3626 y Fp(dirmask=)p Fk(n)630 3736 y Fx(F)-8 b(or)32 +b(PCFS)f(moun)m(ts,)h(sp)s(ecify)f(the)h(maxim)m(um)g(\014le)f(p)s +(ermissions)g(for)g(directories)h(in)g(the)630 3846 y(\014le)41 +b(system.)72 b(See)41 b(the)g(`)p Fp(mask)p Fx(')f(option's)h +(description)g(for)f(more)h(details.)73 b(The)40 b(mask)630 +3955 y(v)-5 b(alue)31 b(of)f Fo(n)g Fx(can)h(b)s(e)f(sp)s(eci\014ed)f +(in)h(decimal,)i(o)s(ctal,)g(or)e(hexadecimal.)150 4123 +y Fp(dumbtimr)96 b Fx(T)-8 b(urn)19 b(o\013)j(the)f(dynamic)f +(retransmit)h(timeout)h(estimator.)39 b(This)20 b(ma)m(y)i(b)s(e)e +(useful)g(for)h(UDP)630 4232 y(moun)m(ts)34 b(that)g(exhibit)g(high)f +(retry)h(rates,)h(since)f(it)g(is)g(p)s(ossible)f(that)h(the)g +(dynamically)630 4342 y(estimated)e(timeout)f(in)m(terv)-5 +b(al)32 b(is)e(to)s(o)h(short.)150 4509 y Fp(extatt)192 +b Fx(Enable)30 b(extended)h(attributes)g(in)f(ISO-9660)h(\014le)g +(systems.)150 4676 y Fp(fsid)288 b Fx(Set)31 b(ID)f(of)h(\014lesystem.) +150 4844 y Fp(gens)288 b Fx(Enable)34 b(generations)h(in)f(ISO-9660)h +(\014le)f(systems.)51 b(Generations)35 b(allo)m(w)h(y)m(ou)e(to)h(see)f +(all)630 4953 y(v)m(ersions)d(of)f(a)h(giv)m(en)g(\014le.)150 +5121 y Fp(gmtoff=)p Fk(n)96 b Fx(F)-8 b(or)26 b(UDF)f(moun)m(ts,)i(set) +e(the)g(time)h(zone)f(o\013set)h(from)f(UTC)f(to)i Fo(n)e +Fx(seconds,)i(with)f(p)s(ositiv)m(e)630 5230 y(v)-5 b(alues)28 +b(indicating)g(east)g(of)g(the)f(Prime)h(Meridian.)40 +b(If)26 b(not)i(set,)h(the)e(user's)g(curren)m(t)g(time)630 +5340 y(zone)k(will)g(b)s(e)f(used.)p eop end +%%Page: 33 35 +TeXDict begin 33 34 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(33)150 299 y Fp(group=)p +Fk(n)144 b Fx(F)-8 b(or)35 b(PCFS)f(and)g(UDF)i(moun)m(ts,)f(set)g(the) +g(group)f(of)h(the)f(\014les)h(in)f(the)h(\014le)g(system)f(to)h +Fo(n)630 408 y Fx(\(whic)m(h)h(can)h(either)g(b)s(e)f(a)g(group)g(name) +h(or)f(a)h(GID)g(n)m(um)m(b)s(er\).)58 b(The)35 b(default)i(group)f(is) +630 518 y(the)31 b(group)e(of)i(the)f(directory)h(on)g(whic)m(h)f(the)g +(\014le)h(system)f(is)h(b)s(eing)f(moun)m(ted.)150 675 +y Fp(grpid)240 b Fx(Use)31 b(BSD)f(directory)h(group-id)f(seman)m +(tics.)150 831 y Fp(int)150 941 y(intr)288 b Fx(Allo)m(w)32 +b(k)m(eyb)s(oard)e(in)m(terrupts)f(on)i(hard)e(moun)m(ts.)150 +1097 y Fp(lock)288 b Fx(Use)31 b(the)f(NFS)h(lo)s(c)m(king)g(proto)s +(col)h(\(default\))150 1254 y Fp(longname)96 b Fx(F)-8 +b(or)31 b(PCFS)f(moun)m(ts,)g(force)h(Win95)h(long)f(names.)150 +1410 y Fp(mask=)p Fk(n)192 b Fx(F)-8 b(or)41 b(PCFS)f(moun)m(ts,)j(sp)s +(ecify)e(the)f(maxim)m(um)h(\014le)g(p)s(ermissions)e(for)h(\014les)h +(in)f(the)h(\014le)630 1520 y(system.)e(F)-8 b(or)27 +b(example,)g(a)g(mask)e(of)h(755)h(sp)s(eci\014es)f(that,)h(b)m(y)f +(default,)h(the)f(o)m(wner)g(should)630 1630 y(ha)m(v)m(e)k(read,)f +(write,)g(and)f(execute)i(p)s(ermissions)d(for)i(\014les,)g(but)f +(others)g(should)g(only)h(ha)m(v)m(e)630 1739 y(read)k(and)g(execute)h +(p)s(ermissions.)48 b(Only)33 b(the)g(nine)g(lo)m(w-order)h(bits)f(of)h +(mask)f(are)g(used.)630 1849 y(The)d(default)g(mask)g(is)h(tak)m(en)g +(from)f(the)g(directory)h(on)f(whic)m(h)g(the)g(\014le)h(system)f(is)g +(b)s(eing)630 1958 y(moun)m(ted.)43 b(The)31 b(mask)g(v)-5 +b(alue)32 b(of)f Fo(n)g Fx(can)g(b)s(e)g(sp)s(eci\014ed)f(in)h +(decimal,)i(o)s(ctal,)g(or)e(hexadeci-)630 2068 y(mal.)150 +2225 y Fp(multi)240 b Fx(P)m(erform)30 b(m)m(ulti-comp)s(onen)m(t)i(lo) +s(okup)e(on)g(\014les.)150 2381 y Fp(maxgroups)630 2491 +y Fx(Set)h(the)f(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(groups)f(to)h +(allo)m(w)h(for)e(this)g(moun)m(t.)150 2647 y Fp(nfsv3)240 +b Fx(Use)31 b(NFS)f(V)-8 b(ersion)31 b(3)g(for)f(this)g(moun)m(t.)150 +2804 y Fp(noac)288 b Fx(T)-8 b(urn)29 b(o\013)i(the)f(attribute)h(cac)m +(he.)150 2960 y Fp(noauto)192 b Fx(This)29 b(option)i(is)f(used)f(b)m +(y)h(the)h(moun)m(t)f(command)g(in)g(`)p Fp(/etc/fstab)p +Fx(')d(or)k(`)p Fp(/etc/vfstab)p Fx(')630 3070 y(and)f(means)g(not)h +(to)g(moun)m(t)f(this)g(\014le)h(system)f(when)g(moun)m(t)g(-a)h(is)g +(used.)150 3226 y Fp(nocache)144 b Fx(Do)31 b(not)g(allo)m(w)h(data)f +(to)g(b)s(e)f(cac)m(hed)h(from)f(a)h(remote)g(serv)m(er)g(for)f(this)g +(moun)m(t.)150 3383 y Fp(nocasetrans)630 3493 y Fx(Don't)h(do)g(case)g +(translation.)42 b(Useful)30 b(for)g(CD-R)m(OMS)h(formatted)g(as)f +(ISO-9660.)150 3649 y Fp(noconn)192 b Fx(Don't)31 b(mak)m(e)h(a)e +(connection)i(on)e(datagram)i(transp)s(orts.)150 3806 +y Fp(nocto)240 b Fx(No)31 b(close-to-op)s(en)h(consistency)-8 +b(.)150 3962 y Fp(nodefperm)630 4072 y Fx(Do)38 b(not)f(ignore)h(the)f +(p)s(ermission)f(mo)s(de)h(bits.)61 b(Useful)37 b(for)g(CD-R)m(OMS)g +(formatted)h(as)630 4181 y(ISO-9660.)150 4338 y Fp(nodev)150 +4448 y(nodevs)192 b Fx(Don't)31 b(allo)m(w)h(lo)s(cal)g(sp)s(ecial)f +(devices)g(on)f(this)g(\014lesystem.)150 4604 y Fp(noexec)192 +b Fx(Don't)31 b(allo)m(w)h(program)e(execution.)150 4761 +y Fp(noint)240 b Fx(Do)31 b(not)g(allo)m(w)h(k)m(eyb)s(oard)e(in)m +(terrupts)g(for)g(this)g(moun)m(t)150 4917 y Fp(nojoliet)96 +b Fx(T)-8 b(urn)29 b(o\013)i(the)f(Joliet)i(extensions.)41 +b(Useful)31 b(for)f(CD-R)m(OMS)g(formatted)h(as)g(ISO-9660.)150 +5074 y Fp(nolock)192 b Fx(Do)31 b(not)g(use)f(the)g(NFS)h(lo)s(c)m +(king)g(proto)s(col)150 5230 y Fp(nomnttab)96 b Fx(This)31 +b(option)i(is)f(used)f(in)m(ternally)j(to)e(tell)i(Amd)d(that)i(a)f +(Solaris)h(8)f(system)h(using)e(mn)m(tfs)630 5340 y(is)f(in)g(use.)p +eop end +%%Page: 34 36 +TeXDict begin 34 35 bop 150 -116 a Fx(34)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fp(norrip)192 +b Fx(T)-8 b(urn)35 b(o\013)i(using)g(of)g(the)f(Ro)s(c)m(k)i(Ridge)f +(In)m(terc)m(hange)h(Proto)s(col)g(\(RRIP\))f(extensions)g(to)630 +408 y(ISO-9660.)150 565 y Fp(nosub)240 b Fx(Disallo)m(w)32 +b(moun)m(ts)f(b)s(eneath)f(this)g(moun)m(t.)150 722 y +Fp(nosuid)192 b Fx(Don't)31 b(allo)m(w)h(set-uid)f(or)f(set-gid)h +(executables)h(on)f(this)f(\014lesystem.)150 878 y Fp(noversion)630 +988 y Fx(Strip)25 b(the)i(extension)f(`)p Fp(;#)p Fx(')h(from)e(the)i +(v)m(ersion)f(string)g(of)h(\014les)f(recorded)g(on)g(an)g(ISO-9660)630 +1097 y(CD-R)m(OM.)150 1254 y Fp(nowin95)144 b Fx(F)-8 +b(or)31 b(PCFS)f(moun)m(ts,)g(completely)i(ignore)f(Win95)h(en)m +(tries.)150 1410 y Fp(optionstr)630 1520 y Fx(Under)37 +b(Solaris)i(8,)i(pro)m(vide)d(the)h(k)m(ernel)g(a)f(string)h(of)f +(options)h(to)g(parse)f(and)g(sho)m(w)g(as)630 1630 y(part)30 +b(of)h(the)f(sp)s(ecial)h(in-k)m(ernel)g(moun)m(t)g(\014le)f(system.) +150 1786 y Fp(overlay)144 b Fx(Ov)m(erla)m(y)32 b(this)e(moun)m(t)g(on) +h(top)f(of)h(an)f(existing)h(moun)m(t,)g(if)f(an)m(y)-8 +b(.)150 1943 y Fp(pgthresh=)p Fk(n)630 2052 y Fx(Set)31 +b(the)f(paging)h(threshold)f(to)h Fo(n)f Fx(kilob)m(ytes.)150 +2209 y Fp(port=)p Fk(n)192 b Fx(Set)31 b(the)f(NFS)g(p)s(ort)g(to)h +Fo(n)p Fx(.)150 2365 y Fp(posix)240 b Fx(T)-8 b(urn)29 +b(on)h(POSIX)g(static)i(pathconf)e(for)g(moun)m(ts.)150 +2522 y Fp(private)144 b Fx(Use)31 b(lo)s(cal)g(lo)s(c)m(king)h(instead) +f(of)f(the)h(NLM)f(proto)s(col,)i(useful)e(for)g(IRIX)g(6)h(only)-8 +b(.)150 2679 y Fp(proplist)96 b Fx(Supp)s(ort)22 b(prop)s(ert)m(y)h +(lists)i(\(A)m(CLs\))g(for)f(this)g(moun)m(t,)h(useful)f(primarily)f +(for)h(T)-8 b(ru64)24 b(UNIX.)150 2835 y Fp(proto=)p +Fk(s)144 b Fx(Use)31 b(transp)s(ort)e(proto)s(col)j Fo(s)h +Fx(for)e(NFS)f(\(can)h(b)s(e)f Fp("tcp")f Fx(or)h Fp("udp")p +Fx(\).)150 2992 y Fp(quota)240 b Fx(Enable)30 b(quota)h(c)m(hec)m(king) +i(on)d(this)g(moun)m(t.)150 3148 y Fp(rdonly)150 3258 +y(ro)384 b Fx(Moun)m(t)31 b(this)f(\014lesystem)h(readonly)-8 +b(.)150 3414 y Fp(resvport)96 b Fx(Use)27 b(a)h(reserv)m(ed)f(p)s(ort)f +(\(smaller)i(than)f(1024\))i(for)e(remote)h(NFS)f(moun)m(ts.)39 +b(Most)28 b(systems)630 3524 y(assume)k(that,)i(but)e(some)h(allo)m(w)h +(for)f(moun)m(ts)f(to)i(o)s(ccur)e(on)h(non-reserv)m(ed)f(p)s(orts.)47 +b(This)630 3634 y(causes)c(problems)f(when)g(suc)m(h)h(a)g(system)g +(tries)g(to)g(NFS)g(moun)m(t)g(one)g(that)g(requires)630 +3743 y(reserv)m(ed)31 b(p)s(orts.)40 b(It)30 b(is)g(recommended)g(that) +h(this)g(option)f(alw)m(a)m(ys)i(b)s(e)e(on.)150 3900 +y Fp(retrans=)p Fk(n)630 4009 y Fx(The)39 b(n)m(um)m(b)s(er)g(of)h(NFS) +g(retransmits)g(made)g(b)s(efore)g(a)g(user)f(error)h(is)g(generated)h +(b)m(y)f(a)630 4119 y(`)p Fp(soft)p Fx(')25 b(moun)m(ted)h +(\014lesystem,)i(and)d(b)s(efore)h(a)g(`)p Fp(hard)p +Fx(')g(moun)m(ted)g(\014lesystem)g(rep)s(orts)g(`)p Fp(NFS)630 +4228 y(server)j Fk(yoyo)g Fp(not)g(responding)f(still)h(trying)p +Fx('.)150 4385 y Fp(retry)240 b Fx(Set)31 b(the)f(NFS)g(retry)h(coun)m +(ter.)150 4542 y Fp(rrcaseins)630 4651 y Fx(Enable)21 +b(the)g(Ro)s(c)m(k)g(Ridge)g(In)m(terc)m(hange)h(Proto)s(col)h +(\(RRIP\))e(case)g(insensitiv)m(e)h(extensions.)630 4761 +y(Useful)30 b(for)g(CD-R)m(OMS)h(formatted)g(as)g(ISO-9660.)150 +4917 y Fp(rrip)288 b Fx(Uses)31 b(the)f(Ro)s(c)m(k)h(Ridge)g(In)m(terc) +m(hange)h(Proto)s(col)f(\(RRIP\))g(extensions)g(to)g(ISO-9660.)150 +5074 y Fp(rsize=)p Fk(n)144 b Fx(The)25 b(NFS)h(read)g(pac)m(k)m(et)i +(size.)40 b(Y)-8 b(ou)26 b(ma)m(y)h(need)e(to)i(set)f(this)g(if)g(y)m +(ou)g(are)h(using)e(NFS/UDP)630 5183 y(through)30 b(a)g(gatew)m(a)m(y)j +(or)e(a)g(slo)m(w)g(link.)150 5340 y Fp(rw)384 b Fx(Allo)m(w)32 +b(reads)e(and)f(writes)i(on)f(this)g(\014lesystem.)p +eop end +%%Page: 35 37 +TeXDict begin 35 36 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(35)150 299 y Fp(sessionnr=)p +Fk(n)630 408 y Fx(F)-8 b(or)31 b(m)m(ultisession)g(UDF)g(moun)m(ts,)g +(use)f(session)h(n)m(um)m(b)s(er)e Fo(n)g Fx(when)h(moun)m(ting.)150 +574 y Fp(shortname)630 684 y Fx(F)-8 b(or)31 b(PCFS)f(moun)m(ts,)g +(force)h(old)g(DOS)f(short)g(names)g(only)-8 b(.)150 +850 y Fp(soft)288 b Fx(Giv)m(e)32 b(up)d(after)i Fo(retrans)j +Fx(retransmissions.)150 1015 y Fp(spongy)192 b Fx(Lik)m(e)31 +b(`)p Fp(soft)p Fx(')f(for)g(status)h(requests,)f(and)g(`)p +Fp(hard)p Fx(')g(for)g(data)h(transfers.)150 1181 y Fp(suid)288 +b Fx(Allo)m(w)32 b(set-uid)e(programs)g(on)g(this)h(moun)m(t.)150 +1347 y Fp(symttl)192 b Fx(T)-8 b(urn)29 b(o\013)i(the)f(sym)m(b)s(olic) +h(link)f(cac)m(he)i(time-to-liv)m(e.)150 1513 y Fp(sync)288 +b Fx(P)m(erform)30 b(sync)m(hronous)g(\014lesystem)g(op)s(erations)h +(on)f(this)h(moun)m(t.)150 1678 y Fp(tcp)336 b Fx(Use)33 +b(TCP/IP)e(instead)h(of)h(UDP/IP)-8 b(,)33 b(ignored)f(if)h(the)f(NFS)g +(implemen)m(tation)i(do)s(es)e(not)630 1788 y(supp)s(ort)d(TCP/IP)g +(moun)m(ts.)150 1954 y Fp(timeo=)p Fk(n)144 b Fx(The)30 +b(NFS)g(timeout,)i(in)e(ten)m(th-seconds,)h(b)s(efore)f(a)h(request)f +(is)h(retransmitted.)150 2119 y Fp(user=)p Fk(n)192 b +Fx(F)-8 b(or)35 b(PCFS)e(and)h(UDF)h(moun)m(ts,)g(set)f(the)h(o)m(wner) +f(of)g(the)g(\014les)g(in)g(the)g(\014le)g(system)h(to)f +Fo(n)630 2229 y Fx(\(whic)m(h)c(can)h(either)g(b)s(e)f(a)h(user)e(name) +i(or)f(a)h(UID)g(n)m(um)m(b)s(er\).)39 b(The)30 b(default)h(o)m(wner)f +(is)h(the)630 2339 y(o)m(wner)f(of)h(the)g(directory)f(on)h(whic)m(h)f +(the)g(\014le)h(system)f(is)h(b)s(eing)f(moun)m(ted.)150 +2504 y Fp(vers=)p Fk(n)192 b Fx(Use)31 b(NFS)f(proto)s(col)h(v)m +(ersion)g(n)m(um)m(b)s(er)e Fo(n)h Fx(\(can)h(b)s(e)f(2)h(or)f(3\).)150 +2670 y Fp(wsize=)p Fk(n)144 b Fx(The)23 b(NFS)h(write)g(pac)m(k)m(et)i +(size.)39 b(Y)-8 b(ou)24 b(ma)m(y)h(need)e(to)i(set)f(this)g(if)f(y)m +(ou)i(are)f(using)f(NFS/UDP)630 2780 y(through)30 b(a)g(gatew)m(a)m(y)j +(or)e(a)g(slo)m(w)g(link.)275 2948 y(The)d(follo)m(wing)i(options)f +(are)g(implemen)m(ted)g(b)m(y)g Ft(A)n(md)p Fx(,)g(rather)g(than)f(b)s +(eing)h(passed)f(to)h(the)g(k)m(ernel.)150 3117 y Fp(nounmount)630 +3227 y Fx(Con\014gures)41 b(the)h(moun)m(t)g(so)g(that)h(its)f +(time-to-liv)m(e)j(will)e(nev)m(er)f(expire.)76 b(This)41 +b(is)h(the)630 3337 y(default)35 b(for)g(non-net)m(w)m(ork)h(based)f +(\014lesystem)g(t)m(yp)s(es)g(\(suc)m(h)g(as)h(moun)m(ting)f(lo)s(cal)h +(disks,)630 3446 y(\015oppies,)30 b(and)g(CD-R)m(OMs\).)42 +b(See)30 b(also)h(the)g(related)g Ft(unmount)40 b Fx(option.)150 +3612 y Fp(ping=)p Fk(n)192 b Fx(The)45 b(in)m(terv)-5 +b(al,)50 b(in)45 b(seconds,)k(b)s(et)m(w)m(een)d(k)m(eep-aliv)m(e)i +(pings.)85 b(When)45 b(four)f(consecutiv)m(e)630 3721 +y(pings)30 b(ha)m(v)m(e)i(failed)f(the)g(moun)m(t)f(p)s(oin)m(t)h(is)g +(mark)m(ed)f(as)h(h)m(ung.)41 b(This)30 b(in)m(terv)-5 +b(al)32 b(defaults)e(to)630 3831 y(30)25 b(seconds;)h(if)f(the)f(ping)g +(in)m(terv)-5 b(al)25 b(is)g(set)f(to)h(zero,)i Ft(A)n(md)33 +b Fx(will)25 b(use)f(the)g(default)h(30-second)630 3941 +y(in)m(terv)-5 b(al.)48 b(If)32 b(the)g(in)m(terv)-5 +b(al)34 b(is)e(set)h(to)g(-1)g(\(or)g(an)m(y)f(other)h(negativ)m(e)i(v) +-5 b(alue\),)33 b(no)g(pings)f(are)630 4050 y(sen)m(t)37 +b(and)f(the)h(host)f(is)h(assumed)f(to)h(b)s(e)f(alw)m(a)m(ys)i(up,)g +(whic)m(h)e(can)h(cause)g(unmoun)m(ts)e(to)630 4160 y(hang)e(See)h(the) +g Ft(softlo)-5 b(okup)42 b Fx(option)34 b(for)f(a)h(b)s(etter)g +(alternativ)m(e.)53 b(T)-8 b(urning)32 b(pings)i(o\013)g(can)630 +4269 y(b)s(e)41 b(useful)h(in)g(NFS-HA)g(\(High-Av)-5 +b(ailabilit)m(y\))46 b(sites)d(where)e(the)i(NFS)f(service)h(rarely)630 +4379 y(go)s(es)36 b(do)m(wn.)55 b(Setting)36 b(the)f(ping)g(v)-5 +b(alue)36 b(to)g(a)g(large)g(v)-5 b(alue)36 b(can)g(reduce)f(the)g +(amoun)m(t)h(of)630 4489 y(NFS)p 814 4489 28 4 v 40 w(NULL)30 +b(c)m(hatter)i(on)e(y)m(our)h(net)m(w)m(ork)g(considerably)-8 +b(,)31 b(esp)s(ecially)h(in)e(large)h(sites.)630 4626 +y(Note)e(that)e(if)h(y)m(ou)f(ha)m(v)m(e)i(m)m(ultiple)f +Ft(A)n(md)36 b Fx(en)m(tries)28 b(using)f(the)h(same)f(\014le)h(serv)m +(er,)g(and)f(eac)m(h)630 4736 y(en)m(try)k(sets)f(a)h(di\013eren)m(t)g +(v)-5 b(alue)31 b(of)f(N,)h(then)f(eac)m(h)h(time)g(Amd)f(moun)m(ts)g +(a)h(new)e(en)m(try)-8 b(,)32 b(the)630 4845 y(ping)f(v)-5 +b(alue)31 b(will)h(b)s(e)e(re-ev)-5 b(aluated)33 b(\(and)e(up)s(dated,) +f(turned)g(o\013,)i(or)f(turned)f(bac)m(k)i(on)f(as)630 +4955 y(needed\).)40 b(Finally)-8 b(,)32 b(note)e(that)g(NFS)p +1911 4955 V 40 w(NULL)f(pings)g(are)h(sen)m(t)f(for)h(b)s(oth)e(UDP)i +(and)f(TCP)630 5065 y(moun)m(ts,)h(b)s(ecause)h(ev)m(en)g(a)g(h)m(ung)e +(TCP)h(moun)m(t)g(can)h(cause)g(user)f(pro)s(cesses)g(to)h(hang.)150 +5230 y Fp(public)192 b Fx(Use)32 b(W)-8 b(ebNFS)33 b(m)m(ulti-comp)s +(onen)m(t)h(lo)s(okup)d(on)h(the)h(public)e(\014le)h(handle)g(instead)g +(of)h(the)630 5340 y(moun)m(t)42 b(proto)s(col)i(to)f(obtain)g(NFS)g +(\014le)f(handles,)j(as)e(do)s(cumen)m(ted)f(in)h(the)f(W)-8 +b(ebNFS)p eop end +%%Page: 36 38 +TeXDict begin 36 37 bop 150 -116 a Fx(36)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))630 299 y(Clien)m(t)d(Sp)s +(eci\014cation,)h(RF)m(C)f(2054.)41 b(This)26 b(means)g(that)h +Ft(A)n(md)36 b Fx(will)27 b(not)g(attempt)g(to)g(con-)630 +408 y(tact)33 b(the)e(remote)h(p)s(ortmapp)s(er)d(or)i(remote)h(moun)m +(td)e(daemon,)i(and)e(will)i(only)f(connect)630 518 y(to)40 +b(the)f(w)m(ell-kno)m(wn)h(NFS)e(p)s(ort)h(2049)h(or)f(the)g(p)s(ort)g +(sp)s(eci\014ed)f(with)h(the)g Ft(p)-5 b(ort)49 b Fx(moun)m(t)630 +628 y(option,)31 b(th)m(us)f(making)h(it)g(easier)g(to)g(use)f(NFS)g +(through)g(a)h(\014rew)m(all.)150 824 y Fp(retry=)p Fk(n)144 +b Fx(The)30 b(n)m(um)m(b)s(er)f(of)h(times)h(to)h(retry)e(the)g(moun)m +(t)h(system)f(call.)150 1021 y Fp(softlookup)630 1130 +y Fx(Con\014gures)h Ft(A)n(md)9 b Fx('s)33 b(b)s(eha)m(vior)f(with)h +(resp)s(ect)f(to)h(already-moun)m(ted)g(shares)f(from)g(NFS)630 +1240 y(\014leserv)m(ers)c(that)h(are)f(unreac)m(hable.)41 +b(If)27 b(softlo)s(okup)h(is)g(sp)s(eci\014ed,)g(trying)g(to)h(access)g +(suc)m(h)630 1350 y(a)35 b(share)e(will)i(result)f(in)g(an)g(error)f +(\(EIO,)i(whic)m(h)e(is)i(c)m(hanged)f(from)g(the)g(ENOENT)g(6.0)630 +1459 y(used)k(to)h(return\).)65 b(If)38 b(it)h(is)g(not)g(sp)s +(eci\014ed,)h(a)f(regular)g(symlink)f(is)h(pro)m(vided)f(and)g(the)630 +1569 y(access)32 b(will)e(probably)g(hang)g(in)g(the)h(NFS)f +(\014lesystem.)630 1722 y(The)38 b(default)g(b)s(eha)m(vior)g(dep)s +(ends)e(on)i(whether)g(the)g(moun)m(t)g(is)g('soft')h(or)g('hard';)i +(soft-)630 1832 y(lo)s(okup)f(can)h(b)s(e)f(used)g(to)h(c)m(hange)h +(this)e(default.)72 b(This)40 b(is)g(c)m(hanged)h(from)g(6.0)g(whic)m +(h)630 1941 y(alw)m(a)m(ys)32 b(b)s(eha)m(v)m(ed)e(as)h(if)f(softlo)s +(okup)h(w)m(as)g(sp)s(eci\014ed.)150 2138 y Fp(unmount)144 +b Fx(Con\014gures)20 b(the)h(moun)m(t)f(so)h(that)h(its)f(time-to-liv)m +(e)j(will)d(indeed)f(expire)h(\(and)g(th)m(us)f(ma)m(y)i(b)s(e)630 +2247 y(automatically)j(unmoun)m(ted\).)37 b(This)21 b(is)h(also)h(the)f +(default)g(for)g(net)m(w)m(ork-based)h(\014lesystem)630 +2357 y(t)m(yp)s(es)31 b(\(e.g.,)i(NFS\).)f(This)e(option)h(is)g(useful) +f(for)h(remo)m(v)-5 b(able)32 b(lo)s(cal)g(media)g(suc)m(h)e(as)i(CD-) +630 2466 y(R)m(OMs,)25 b(USB)f(driv)m(es,)h(etc.)39 b(so)24 +b(they)f(can)h(expire)f(when)g(not)g(in)g(use,)i(and)e(get)h(unmoun)m +(ted)630 2576 y(\(suc)m(h)34 b(driv)m(es)g(can)h(get)g(w)m(ork)f(out)h +(when)e(they)h(k)m(eep)h(spinning\).)51 b(See)35 b(also)g(the)f +(related)630 2686 y Ft(nounmount)40 b Fx(option.)150 +2882 y Fp(utimeout=)p Fk(n)630 2992 y Fx(The)31 b(in)m(terv)-5 +b(al,)34 b(in)d(seconds,)h(that)h(lo)s(ok)m(ed)f(up)f(and)g(moun)m(ted) +h(map)f(en)m(tries)h(are)h(cac)m(hed.)630 3101 y(After)21 +b(that)g(p)s(erio)s(d)e(of)h(time,)j Ft(A)n(md)30 b Fx(will)21 +b(attempt)g(to)g(unmoun)m(t)f(the)g(en)m(tries.)38 b(If,)22 +b(ho)m(w)m(ev)m(er,)630 3211 y(the)32 b(unmoun)m(t)f(fails)i(\(with)f +(EBUSY\),)h(then)f Ft(A)n(md)42 b Fx(will)32 b(extend)g(the)h(moun)m +(t's)f(time-to-)630 3321 y(liv)m(e)j(b)m(y)f(the)g Ft(utime)-5 +b(out)43 b Fx(v)-5 b(alue)34 b(b)s(efore)g(the)g(next)g(unmoun)m(t)f +(attempt)i(is)f(made.)51 b(In)33 b(fact)630 3430 y(the)h(in)m(terv)-5 +b(al)34 b(is)g(extended)f(b)s(efore)g(the)h(unmoun)m(t)e(is)i +(attempted,)h(to)f(a)m(v)m(oid)h(thrashing.)630 3540 +y(The)f(default)i(v)-5 b(alue)35 b(is)g(120)h(seconds)f(\(t)m(w)m(o)i +(min)m(utes\))e(or)g(as)g(set)h(b)m(y)f(the)g Fp(-w)f +Fx(command)630 3649 y(line)d(option.)150 3846 y Fp(xlatecookie)630 +3956 y Fx(T)-8 b(ranslate)31 b(directory)g(co)s(okies)h(b)s(et)m(w)m +(een)f(32-long)h(and)e(64-long)i(lengths.)150 4192 y +Fm(3.3.4.5)63 b(remopts)42 b(Option)150 4339 y Fx(This)36 +b(option)g(has)h(the)f(same)h(use)f(as)h Fp(${opts})d +Fx(but)i(applies)g(only)h(when)e(the)i(remote)g(host)g(is)f(on)h(a)150 +4449 y(non-lo)s(cal)32 b(net)m(w)m(ork.)43 b(F)-8 b(or)31 +b(example,)h(when)e(using)h(NFS)f(across)i(a)f(gatew)m(a)m(y)i(it)f(is) +f(often)g(necessary)g(to)150 4558 y(use)e(smaller)g(v)-5 +b(alues)29 b(for)g(the)g(data)g(read)g(and)f(write)h(sizes.)41 +b(This)28 b(can)h(simply)g(b)s(e)f(done)g(b)m(y)h(sp)s(ecifying)150 +4668 y(the)44 b(small)g(v)-5 b(alues)44 b(in)g Fo(remopts)p +Fx(.)81 b(When)43 b(a)i(non-lo)s(cal)f(host)g(is)g(accessed,)49 +b(the)44 b(smaller)g(sizes)h(will)150 4777 y(automatically)33 +b(b)s(e)d(used.)275 4949 y Ft(A)n(md)h Fx(determines)23 +b(whether)f(a)h(host)f(is)h(lo)s(cal)h(b)m(y)e(examining)h(the)g(net)m +(w)m(ork)g(in)m(terface)i(con\014guration)150 5059 y(at)37 +b(startup.)58 b(An)m(y)37 b(in)m(terface)h(c)m(hanges)f(made)g(after)f +Ft(A)n(md)46 b Fx(has)36 b(b)s(een)g(started)h(will)g(not)f(b)s(e)g +(noticed.)150 5168 y(The)30 b(lik)m(ely)i(e\013ect)g(will)e(b)s(e)g +(that)h(a)g(host)f(ma)m(y)h(incorrectly)h(b)s(e)e(declared)g(non-lo)s +(cal.)275 5340 y(Unless)g(otherwise)h(set,)g(the)f(v)-5 +b(alue)31 b(of)g Fp(${remopts})c Fx(is)k(the)f(same)h(as)g(the)f(v)-5 +b(alue)31 b(of)g Fp(${opts})p Fx(.)p eop end +%%Page: 37 39 +TeXDict begin 37 38 bop 150 -116 a Fx(Chapter)30 b(3:)41 +b(Moun)m(t)31 b(Maps)2536 b(37)150 299 y Fm(3.3.4.6)63 +b(sublink)42 b(Option)150 446 y Fx(The)30 b(sub)s(directory)g(within)g +(the)h(moun)m(ted)g(\014lesystem)g(to)g(whic)m(h)g(the)g(reference)g +(should)f(p)s(oin)m(t.)42 b(This)150 555 y(can)c(b)s(e)e(used)h(to)h +(prev)m(en)m(t)f(duplicate)h(moun)m(ts)f(in)g(cases)h(where)f(m)m +(ultiple)h(directories)g(in)f(the)h(same)150 665 y(moun)m(ted)30 +b(\014lesystem)h(are)g(used.)150 864 y Fm(3.3.4.7)63 +b(t)m(yp)s(e)41 b(Option)150 1011 y Fx(The)i(\014lesystem)g(t)m(yp)s(e) +g(to)h(b)s(e)e(used.)78 b(See)43 b(Chapter)g(5)g([Filesystem)i(T)m(yp)s +(es],)h(page)e(47,)j(for)c(a)g(full)150 1121 y(description)30 +b(of)h(eac)m(h)g(t)m(yp)s(e.)p eop end +%%Page: 38 40 +TeXDict begin 38 39 bop eop end +%%Page: 39 41 +TeXDict begin 39 40 bop 150 -116 a Fx(Chapter)30 b(4:)41 +b Ft(A)n(md)f Fx(Command)29 b(Line)h(Options)1862 b(39)150 +299 y Fu(4)80 b Fj(A)l(md)70 b Fu(Command)54 b(Line)f(Options)150 +595 y Fx(Man)m(y)34 b(of)f Ft(A)n(md)9 b Fx('s)33 b(parameters)g(can)g +(b)s(e)g(set)g(from)f(the)i(command)e(line.)49 b(The)32 +b(command)h(line)g(is)g(also)150 705 y(used)d(to)h(sp)s(ecify)f +(automoun)m(t)h(p)s(oin)m(ts)f(and)g(maps.)275 860 y(The)f(general)j +(format)e(of)h(a)g(command)f(line)h(is)390 1015 y Fp(amd)47 +b([)p Fk(options)p Fp(])e([{)i Fk(directory)f(map-name)f +Fp([-)p Fk(map-options)p Fp(])f(})k(...])275 1170 y Fx(F)-8 +b(or)22 b(eac)m(h)h(directory)g(and)e(map-name)h(giv)m(en)h(or)f(sp)s +(eci\014ed)f(in)g(the)h Fp(amd.conf)e Fx(\014le,)k Ft(A)n(md)31 +b Fx(establishes)150 1280 y(an)36 b(automoun)m(t)h(p)s(oin)m(t.)59 +b(The)35 b Fo(map-options)41 b Fx(ma)m(y)c(b)s(e)e(an)m(y)i(sequence)g +(of)f(options)h(or)f(selectors|see)150 1389 y(Section)24 +b(3.3)h([Lo)s(cation)g(F)-8 b(ormat],)27 b(page)d(24.)39 +b(The)23 b Fo(map-options)28 b Fx(apply)23 b(only)h(to)g +Ft(A)n(md)9 b Fx('s)24 b(moun)m(t)g(p)s(oin)m(t.)275 +1545 y(`)p Fp(type:=toplvl;cache:=mapd)o(efa)o(ult;)o(fs:)o(=${m)o(ap}) +p Fx(')j(is)34 b(the)g(default)f(v)-5 b(alue)34 b(for)g(the)g(map)f +(op-)150 1654 y(tions.)64 b(Default)39 b(options)g(for)e(a)i(map)e(are) +i(read)f(from)f(a)i(sp)s(ecial)f(en)m(try)h(in)e(the)i(map)e(whose)h(k) +m(ey)h(is)150 1764 y(the)30 b(string)f(`)p Fp(/defaults)p +Fx('.)39 b(When)29 b(default)h(options)g(are)g(giv)m(en)h(they)f(are)g +(prep)s(ended)d(to)k(an)m(y)f(options)150 1873 y(sp)s(eci\014ed)d(in)h +(the)g(moun)m(t-map)g(lo)s(cations)h(as)f(explained)g(in)g(Section)g +(3.3.1)i([Map)e(Defaults],)i(page)f(25.)275 2029 y(The)g +Fo(options)35 b Fx(are)c(an)m(y)f(com)m(bination)i(of)f(those)f(listed) +h(b)s(elo)m(w.)275 2184 y(Once)23 b(the)g(command)g(line)h(has)e(b)s +(een)h(parsed,)h(the)f(automoun)m(t)h(p)s(oin)m(ts)f(are)h(moun)m(ted.) +38 b(The)23 b(moun)m(t)150 2293 y(p)s(oin)m(ts)36 b(are)g(created)h(if) +g(they)f(do)g(not)g(already)h(exist,)h(in)e(whic)m(h)g(case)h(they)f +(will)g(b)s(e)g(remo)m(v)m(ed)h(when)150 2403 y Ft(A)n(md)f +Fx(exits.)k(Finally)-8 b(,)29 b Ft(A)n(md)36 b Fx(disasso)s(ciates)28 +b(itself)f(from)f(its)h(con)m(trolling)h(terminal)f(and)f(forks)g(in)m +(to)i(the)150 2513 y(bac)m(kground.)275 2668 y(Note:)42 +b(Ev)m(en)31 b(if)f Ft(A)n(md)40 b Fx(has)31 b(b)s(een)f(built)g(with)g +(`)p Fp(-DDEBUG)p Fx(')g(\(via)h Fp(configure)d(--enable-debug)p +Fx(\),)f(it)150 2777 y(will)37 b(still)g(bac)m(kground)f(itself)h(and)f +(disasso)s(ciate)i(itself)f(from)f(the)h(con)m(trolling)h(terminal.)60 +b(T)-8 b(o)36 b(use)h(a)150 2887 y(debugger)c(it)g(is)h(necessary)f(to) +h(sp)s(ecify)f(`)p Fp(-D)d(daemon)p Fx(')h(on)i(the)g(command)g(line.) +49 b(Ho)m(w)m(ev)m(er,)36 b(ev)m(en)e(with)150 2997 y(all)h(of)e(this,) +i(moun)m(ts)f(and)f(unmoun)m(ts)f(are)i(p)s(erformed)e(in)i(the)g(bac)m +(kground,)g(and)f Ft(A)n(md)43 b Fx(will)34 b(alw)m(a)m(ys)150 +3106 y(fork)h(b)s(efore)f(doing)h(them.)55 b(Therefore,)36 +b(debugging)f(what)g(happ)s(ens)e(closely)k(during)d(un/moun)m(ts)g(is) +150 3216 y(more)d(c)m(hallenging.)275 3371 y Ft(A)n(l)5 +b(l)41 b Fx(of)32 b Ft(A)n(md)9 b Fx('s)33 b(command)f(options)g(\(sa)m +(v)m(e)j Fp(-F)c Fx(and)h Fp(-T)p Fx(\))g(can)h(b)s(e)e(sp)s(eci\014ed) +h(in)g(the)h Fp(amd.conf)d Fx(\014le.)150 3481 y(See)d(Chapter)f(6)h +([Amd)f(Con\014guration)g(File],)j(page)f(59.)40 b(If)26 +b Ft(A)n(md)36 b Fx(is)27 b(in)m(v)m(ok)m(ed)h(without)e(an)m(y)h +(command)150 3590 y(line)k(options,)g(it)g(will)f(default)h(to)g(using) +f(the)g(con\014guration)h(\014le)g Fp(/etc/amd.conf)p +Fx(,)c(if)j(one)h(exists.)150 3854 y Fw(4.1)68 b Fi(-a)44 +b Fh(directory)150 4013 y Fx(Sp)s(eci\014es)30 b(the)i(default)f(moun)m +(t)g(directory)-8 b(.)44 b(This)30 b(option)i(c)m(hanges)g(the)f(v)-5 +b(ariable)32 b Fp(${autodir})c Fx(whic)m(h)150 4123 y(otherwise)j +(defaults)f(to)h Fp(/a)p Fx(.)40 b(F)-8 b(or)32 b(example,)f(some)g +(sites)g(prefer)e Fp(/amd)h Fx(or)g Fp(/n)p Fx(.)390 +4278 y Fp(amd)47 b(-a)g(/amd)g(...)150 4541 y Fw(4.2)68 +b Fi(-c)44 b Fh(cac)l(he-in)l(terv)-8 b(al)150 4701 y +Fx(Selects)31 b(the)f(p)s(erio)s(d,)f(in)g(seconds,)h(for)g(whic)m(h)g +(a)g(name)g(is)g(cac)m(hed)g(b)m(y)g Ft(A)n(md)p Fx(.)41 +b(If)29 b(no)h(reference)g(is)g(made)150 4810 y(to)h(the)g(v)m(olume)g +(in)f(this)g(p)s(erio)s(d,)f Ft(A)n(md)40 b Fx(discards)30 +b(the)h(v)m(olume)g(name)f(to)h(\014lesystem)g(mapping.)275 +4966 y(Once)36 b(the)i(last)f(reference)h(to)g(a)f(\014lesystem)g(has)g +(b)s(een)f(remo)m(v)m(ed,)k Ft(A)n(md)46 b Fx(attempts)38 +b(to)g(unmoun)m(t)150 5075 y(the)28 b(\014lesystem.)40 +b(If)28 b(the)g(unmoun)m(t)f(fails)h(the)g(in)m(terv)-5 +b(al)29 b(is)f(extended)g(b)m(y)g(a)g(further)f(p)s(erio)s(d)f(as)j(sp) +s(eci\014ed)150 5185 y(b)m(y)h(the)h(`)p Fp(-w)p Fx(')f(command)g(line) +h(option)g(or)f(b)m(y)g(the)h(`)p Fp(utimeout)p Fx(')e(moun)m(t)h +(option.)275 5340 y(The)f(default)i Fo(cac)m(he-in)m(terv)-5 +b(al)37 b Fx(is)30 b(300)i(seconds)e(\(\014v)m(e)h(min)m(utes\).)p +eop end +%%Page: 40 42 +TeXDict begin 40 41 bop 150 -116 a Fx(40)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fw(4.3)68 +b Fi(-d)44 b Fh(domain)150 458 y Fx(Sp)s(eci\014es)g(the)g(host's)h +(domain.)83 b(This)43 b(sets)i(the)g(in)m(ternal)g(v)-5 +b(ariable)45 b Fp(${domain})d Fx(and)i(a\013ects)i(the)150 +568 y Fp(${hostd})28 b Fx(v)-5 b(ariable.)275 697 y(If)30 +b(this)i(option)f(is)h(not)f(sp)s(eci\014ed)g(and)g(the)g(hostname)h +(already)f(con)m(tains)i(the)e(lo)s(cal)i(domain)e(then)150 +806 y(that)g(is)f(used,)g(otherwise)h(the)g(default)f(v)-5 +b(alue)31 b(of)g Fp(${domain})c Fx(is)k(`)p Fp(unknown.domain)p +Fx('.)275 935 y(F)-8 b(or)30 b(example,)h(if)f(the)g(lo)s(cal)h(domain) +f(w)m(as)g(`)p Fp(doc.ic.ac.uk)p Fx(',)e Ft(A)n(md)39 +b Fx(could)30 b(b)s(e)f(started)h(as)h(follo)m(ws:)390 +1063 y Fp(amd)47 b(-d)g(doc.ic.ac.uk)e(...)150 1284 y +Fw(4.4)68 b Fi(-k)44 b Fh(k)l(ernel-arc)l(hitecture)150 +1444 y Fx(Sp)s(eci\014es)25 b(the)g(k)m(ernel)h(arc)m(hitecture)h(of)f +(the)g(system.)39 b(This)24 b(is)i(usually)f(the)h(output)f(of)g(`)p +Fp(uname)k(-m)p Fx(')c(\(the)150 1553 y(\\mac)m(hine")34 +b(v)-5 b(alue)34 b(gotten)g(from)e Fn(uname)p Fx(\(2\)\).)49 +b(If)32 b(the)h Fn(uname)p Fx(\(2\))g(system)g(call)h(is)f(not)g(a)m(v) +-5 b(ailable,)36 b(the)150 1663 y(v)-5 b(alue)31 b(of)f +Fp(${karch})f Fx(defaults)h(to)h(that)g(of)g Fp(${arch})p +Fx(.)275 1791 y(The)e(only)i(e\013ect)h(of)e(this)h(option)f(is)h(to)g +(set)g(the)f(v)-5 b(ariable)32 b Fp(${karch})p Fx(.)275 +1920 y(This)d(option)i(w)m(ould)f(b)s(e)g(used)f(as)i(follo)m(ws:)390 +2049 y Fp(amd)47 b(-k)g(`arch)f(-k`)h(...)150 2269 y +Fw(4.5)68 b Fi(-l)44 b Fh(log-option)150 2429 y Fx(Selects)31 +b(the)g(form)f(of)g(logging)j(to)e(b)s(e)e(made.)41 b(Sev)m(eral)32 +b(sp)s(ecial)f Fo(log-options)k Fx(are)c(recognized.)199 +2557 y(1.)61 b(If)39 b Fo(log-option)i Fx(is)f(the)f(string)g(`)p +Fp(syslog)p Fx(',)i Ft(A)n(md)49 b Fx(will)39 b(use)g(the)h +Fn(syslog)p Fx(\(3\))h(mec)m(hanism.)68 b(If)39 b(y)m(our)330 +2667 y(system)31 b(supp)s(orts)d(syslog)j(facilities,)i(then)d(the)h +(default)f(facilit)m(y)j(used)c(is)i(`)p Fp(LOG_DAEMON)p +Fx('.)199 2796 y(2.)61 b(When)43 b(using)g(syslog,)48 +b(if)43 b(y)m(ou)h(wish)f(to)h(c)m(hange)h(the)e(facilit)m(y)-8 +b(,)50 b(app)s(end)42 b(its)h(name)h(to)g(the)g(log)330 +2905 y(option)e(name,)i(delimited)e(b)m(y)f(a)h(single)g(colon.)75 +b(F)-8 b(or)42 b(example,)j(if)c Fo(log-options)47 b +Fx(is)41 b(the)h(string)330 3015 y(`)p Fp(syslog:local7)p +Fx(')27 b(then)j Fn(Amd)e Fx(will)j(log)g(messages)g(via)f +Fn(syslog)p Fx(\(3\))i(using)e(the)g(`)p Fp(LOG_LOCAL7)p +Fx(')d(fa-)330 3124 y(cilit)m(y)-8 b(.)41 b(If)23 b(the)h(facilit)m(y)h +(name)f(sp)s(eci\014ed)f(is)h(not)f(recognized,)k Ft(A)n(md)33 +b Fx(will)24 b(default)g(to)g(`)p Fp(LOG_DAEMON)p Fx('.)330 +3234 y(Note:)48 b(while)33 b(y)m(ou)g(can)h(use)f(an)m(y)g(syslog)h +(facilit)m(y)h(a)m(v)-5 b(ailable)36 b(on)d(y)m(our)g(system,)h(it)g +(is)f(generally)i(a)330 3344 y(bad)30 b(idea)h(to)g(use)f(those)h +(reserv)m(ed)f(for)g(other)h(services)g(suc)m(h)f(as)h(`)p +Fp(kern)p Fx(',)f(`)p Fp(lpr)p Fx(',)g(`)p Fp(cron)p +Fx(',)g(etc.)199 3472 y(3.)61 b(If)36 b Fo(log-option)i +Fx(is)e(the)g(string)g(`)p Fp(/dev/stderr)p Fx(',)f Ft(A)n(md)45 +b Fx(will)37 b(use)f(standard)f(error,)i(whic)m(h)f(is)g(also)330 +3582 y(the)27 b(default)g(target)h(for)e(log)i(messages.)40 +b(T)-8 b(o)27 b(implemen)m(t)h(this,)f Ft(A)n(md)36 b +Fx(sim)m(ulates)28 b(the)f(e\013ect)h(of)f(the)330 3691 +y(`)p Fp(/dev/fd)p Fx(')i(driv)m(er.)275 3839 y(An)m(y)k(other)g +(string)g(is)h(tak)m(en)g(as)f(a)h(\014lename)f(to)h(use)f(for)g +(logging.)51 b(Log)34 b(messages)g(are)g(app)s(ended)150 +3949 y(to)g(the)g(\014le)g(if)g(it)g(already)g(exists,)h(otherwise)f(a) +g(new)g(\014le)f(is)h(created.)52 b(The)33 b(\014le)h(is)f(op)s(ened)g +(once)i(and)150 4058 y(then)30 b(held)g(op)s(en,)g(rather)g(than)g(b)s +(eing)g(re-op)s(ened)g(for)g(eac)m(h)i(message.)275 4187 +y(Normally)-8 b(,)42 b(when)37 b(long-running)h(daemons)h(hold)f(an)g +(op)s(en)g(\014le)h(descriptor)g(on)f(a)h(log)h(\014le,)h(it)e(is)150 +4297 y(imp)s(ossible)c(to)h(\\rotate")h(the)e(log)i(\014le)e(and)f +(compress)h(older)g(logs)i(on)e(a)g(daily)h(basis.)54 +b(The)35 b(daemon)150 4406 y(needs)g(to)i(b)s(e)e(told)h(to)g(discard)f +(\(via)i Fn(close)p Fx(\(2\)\))i(its)d(\014le)f(handle,)i(and)e(re-op)s +(en)h(the)g(log)g(\014le.)57 b(This)35 b(is)150 4516 +y(done)30 b(using)g Fp(amq)g(-l)f Ft(lo)-5 b(g-option)p +Fx(.)43 b(See)31 b(Section)g(7.4.5)h([Amq)e(-l)h(option],)h(page)f(75.) +275 4644 y(If)24 b(the)h(`)p Fp(syslog)p Fx(')f(option)h(is)g(sp)s +(eci\014ed)f(but)g(the)h(system)g(do)s(es)g(not)g(supp)s(ort)e(syslog)j +(or)e(if)h(the)g(named)150 4754 y(\014le)34 b(cannot)h(b)s(e)f(op)s +(ened)f(or)i(created,)h Ft(A)n(md)44 b Fx(will)35 b(use)f(standard)f +(error.)52 b(Error)34 b(messages)h(generated)150 4864 +y(b)s(efore)30 b Ft(A)n(md)40 b Fx(has)30 b(\014nished)f(parsing)h(the) +g(command)g(line)h(are)g(prin)m(ted)f(on)g(standard)g(error.)275 +4992 y(Since)35 b Ft(A)n(md)45 b Fx(tends)35 b(to)h(generate)h(a)f(lot) +g(of)g(logging)h(information)f(\(esp)s(ecially)h(if)e(debugging)h(w)m +(as)150 5102 y(turned)29 b(on\),)h(and)g(due)f(to)i(it)f(b)s(eing)g(an) +f(imp)s(ortan)m(t)h(program)g(running)e(on)i(the)g(system,)h(it)f(is)g +(usually)150 5211 y(b)s(est)g(to)h(log)h(to)f(a)f(separate)i(disk)e +(\014le.)40 b(In)30 b(that)h(case)g Ft(A)n(md)40 b Fx(w)m(ould)30 +b(b)s(e)g(started)h(as)g(follo)m(ws:)390 5340 y Fp(amd)47 +b(-l)g(/var/log/amd)e(...)p eop end +%%Page: 41 43 +TeXDict begin 41 42 bop 150 -116 a Fx(Chapter)30 b(4:)41 +b Ft(A)n(md)f Fx(Command)29 b(Line)h(Options)1862 b(41)150 +299 y Fw(4.6)68 b Fi(-n)150 458 y Fx(Normalizes)38 b(the)e(remote)h +(hostname)g(b)s(efore)e(using)h(it.)59 b(Normalization)38 +b(is)f(done)f(b)m(y)g(replacing)h(the)150 568 y(v)-5 +b(alue)24 b(of)g Fp(${rhost})e Fx(with)i(the)g(\(generally)h(fully)f +(quali\014ed\))g(primary)f(name)h(returned)f(b)m(y)g(a)i(hostname)150 +677 y(lo)s(okup.)275 817 y(This)h(option)i(should)f(b)s(e)g(used)g(if)g +(sev)m(eral)i(names)f(are)g(used)f(to)h(refer)f(to)i(a)f(single)g(host) +g(in)f(a)h(moun)m(t)150 926 y(map.)150 1166 y Fw(4.7)68 +b Fi(-o)44 b Fh(op-sys-v)l(er)150 1325 y Fx(Ov)m(errides)29 +b(the)h(compiled-in)g(v)m(ersion)g(n)m(um)m(b)s(er)e(of)i(the)g(op)s +(erating)g(system,)g(with)f Fo(op-sys-v)m(er)p Fx(.)41 +b(Useful)150 1435 y(when)26 b(the)h(built-in)g(v)m(ersion)g(is)g(not)g +(desired)g(for)g(bac)m(kw)m(ard)g(compatibilit)m(y)i(reasons.)40 +b(F)-8 b(or)27 b(example,)i(if)150 1544 y(the)g(built-in)f(v)m(ersion)g +(is)h(`)p Fp(2.5.1)p Fx(',)f(y)m(ou)h(can)f(o)m(v)m(erride)i(it)e(to)h +(`)p Fp(5.5.1)p Fx(',)g(and)e(use)h(older)h(maps)f(that)g(w)m(ere)150 +1654 y(written)i(with)h(the)f(latter)i(in)e(mind.)150 +1893 y Fw(4.8)68 b Fi(-p)150 2053 y Fx(Causes)37 b Ft(A)n(md)9 +b Fx('s)38 b(pro)s(cess)e(id)h(to)h(b)s(e)f(prin)m(ted)g(on)g(standard) +f(output.)61 b(This)37 b(can)g(b)s(e)g(redirected)h(to)g(a)150 +2162 y(suitable)31 b(\014le)f(for)g(use)h(with)f(kill:)390 +2301 y Fp(amd)47 b(-p)g(>)h(/var/run/amd.pid)43 b(...)275 +2441 y Fx(This)35 b(option)h(only)g(has)g(an)g(a\013ect)i(if)e +Ft(A)n(md)45 b Fx(is)36 b(running)e(in)i(daemon)g(mo)s(de.)57 +b(If)36 b Ft(A)n(md)45 b Fx(is)36 b(started)150 2550 +y(with)30 b(the)h Fp(-D)e(daemon)g Fx(debug)h(\015ag,)h(this)f(option)h +(is)f(ignored.)150 2790 y Fw(4.9)68 b Fi(-r)150 2949 +y Fx(T)-8 b(ells)31 b Ft(A)n(md)40 b Fx(to)31 b(restart)g(existing)g +(moun)m(ts)g(\(see)g(Section)g(5.25)h([Inheritance)f(Filesystem],)h +(page)f(56\).)150 3188 y Fw(4.10)68 b Fi(-t)44 b Fh(timeout.retransmit) +150 3348 y Fx(Sp)s(eci\014es)22 b(the)h(RPC)f Fo(timeout)j +Fx(in)m(terv)-5 b(al)24 b(and)e(the)h Fo(retransmit)h +Fx(coun)m(ter)g(used)e(b)m(y)g(the)h(k)m(ernel)g(to)g(comm)m(u-)150 +3457 y(nicate)i(to)g Ft(A)n(md)p Fx(.)38 b(These)24 b(are)g(used)f(to)i +(set)f(the)g(`)p Fp(timeo)p Fx(')f(and)g(`)p Fp(retrans)p +Fx(')f(moun)m(t)i(options,)i(resp)s(ectiv)m(ely)-8 b(.)150 +3567 y(The)30 b(default)g(timeout)i(is)e(0.8)i(seconds,)e(and)g(the)h +(default)f(n)m(um)m(b)s(er)f(of)i(retransmissions)f(is)g(11.)275 +3706 y Ft(A)n(md)51 b Fx(relies)43 b(on)g(the)f(k)m(ernel)h(RPC)f +(retransmit)g(mec)m(hanism)h(to)g(trigger)g(moun)m(t)f(retries.)77 +b(The)150 3816 y(v)-5 b(alues)27 b(of)f(these)h(parameters)g(c)m(hange) +g(the)g(o)m(v)m(erall)i(retry)d(in)m(terv)-5 b(al.)41 +b(T)-8 b(o)s(o)26 b(long)h(an)g(in)m(terv)-5 b(al)27 +b(giv)m(es)h(p)s(o)s(or)150 3925 y(in)m(teractiv)m(e)33 +b(resp)s(onse;)d(to)s(o)h(short)f(an)g(in)m(terv)-5 b(al)32 +b(causes)f(excessiv)m(e)h(retries.)150 4165 y Fw(4.11)68 +b Fi(-v)150 4324 y Fx(Prin)m(t)30 b(v)m(ersion)h(information)g(on)f +(standard)g(error)g(and)f(then)i(exit.)41 b(The)30 b(output)g(is)g(of)h +(the)g(form:)390 4463 y Fp(Copyright)45 b(\(c\))i(1997-1999)e(Erez)i +(Zadok)390 4573 y(Copyright)e(\(c\))i(1990)g(Jan-Simon)e(Pendry)390 +4682 y(Copyright)g(\(c\))i(1990)g(Imperial)e(College)h(of)h(Science,)f +(Technology)f(&)i(Medicine)390 4792 y(Copyright)e(\(c\))i(1990)g(The)g +(Regents)f(of)h(the)g(University)e(of)i(California.)390 +4902 y(am-utils)f(version)f(6.0a15)h(\(build)h(61\).)390 +5011 y(Built)f(by)i(ezk@example.com)43 b(on)k(date)g(Wed)g(Oct)g(22)g +(15:21:03)f(EDT)g(1997.)390 5121 y(cpu=sparc)f(\(big-endian\),)f +(arch=sun4,)h(karch=sun4u.)390 5230 y(full_os=solaris2.5.1,)d(os=sos5,) +k(osver=5.5.1,)e(vendor=sun.)390 5340 y(Map)j(support)f(for:)g(root,)h +(passwd,)f(union,)g(nisplus,)f(nis,)i(ndbm,)f(file,)h(error.)p +eop end +%%Page: 42 44 +TeXDict begin 42 43 bop 150 -116 a Fx(42)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))390 299 y Fp(AMFS:)46 +b(nfs,)h(link,)f(nfsx,)h(nfsl,)f(host,)g(linkx,)h(program,)e(union,)h +(inherit,)676 408 y(ufs,)h(lofs,)f(hsfs,)h(pcfs,)f(auto,)g(direct,)g +(toplvl,)g(error.)390 518 y(FS:)h(autofs,)f(cachefs,)f(cdfs,)i(lofs,)f +(nfs,)h(nfs3,)f(pcfs,)g(tfs,)h(tmpfs,)f(udf,)h(ufs.)390 +628 y(Network)f(1:)h(wire="mcl-lab-net.cs.col)o(umbi)o(a.ed)o(u")41 +b(\(netnumber=128.59.13\).)390 737 y(Network)46 b(2:)h +(wire="14-net.cs.columbia)o(.edu)o(")42 b(\(netnumber=128.59.14\).)390 +847 y(Network)k(3:)h(wire="old-net.cs.columbi)o(a.ed)o(u")42 +b(\(netnumber=128.59.16\).)275 978 y Fx(The)35 b(information)h +(includes)g(the)g(v)m(ersion)g(n)m(um)m(b)s(er,)g(n)m(um)m(b)s(er)f(of) +h(times)g Ft(A)n(md)45 b Fx(w)m(as)37 b(compiled)f(on)150 +1088 y(the)45 b(lo)s(cal)h(system,)i(release)e(date)f(and)f(name)h(of)f +(the)h(release.)84 b(F)-8 b(ollo)m(wing)47 b(come)f(the)f(cpu)f(t)m(yp) +s(e,)150 1197 y(b)m(yte)i(ordering,)j(and)c(the)h(arc)m(hitecture)h +(and)e(k)m(ernel)h(arc)m(hitecture)h(as)f Fp(${arch})d +Fx(and)i Fp(${karch})p Fx(,)150 1307 y(resp)s(ectiv)m(ely)-8 +b(.)52 b(The)34 b(next)g(line)g(lists)g(the)g(op)s(erating)g(system)g +(full)f(name,)i(short)e(name,)i(v)m(ersion,)h(and)150 +1417 y(v)m(endor.)46 b(These)32 b(four)f(v)-5 b(alues)33 +b(corresp)s(ond)e(to)h(the)h(v)-5 b(ariables)33 b Fp(${full_os})p +Fx(,)d Fp(${os})p Fx(,)h Fp(${osver})p Fx(,)g(and)150 +1526 y Fp(${vendor})p Fx(,)d(resp)s(ectiv)m(ely)-8 b(.)43 +b(See)30 b(Chapter)g(2)h([Supp)s(orted)d(Platforms],)j(page)g(17.)275 +1657 y(Then)43 b(come)j(a)f(list)h(of)f(map)f(t)m(yp)s(es)h(supp)s +(orted,)i(\014lesystems)e(in)m(ternally)g(supp)s(orted)e(b)m(y)i +Ft(A)n(md)150 1767 y Fx(\(AMFS\),)30 b(and)f(generic)h(\014lesystems)f +(a)m(v)-5 b(ailable)31 b(\(FS\).)f(Finally)g(all)g(kno)m(wn)e(net)m(w)m +(orks)i(\(if)f(an)m(y\))h(of)f(this)150 1877 y(host)43 +b(are)h(listed)g(b)m(y)f(name)h(and)e(n)m(um)m(b)s(er.)79 +b(They)43 b(are)g(a)m(v)-5 b(ailable)46 b(via)e(the)g(v)-5 +b(ariables)44 b Fp(${wire})d Fx(or)150 1986 y Fp(${network})p +Fx(,)24 b(and)h Fp(${netnumber})d Fx(\(see)27 b(Section)f(3.3.3)i +([Selectors],)g(page)f(26\))g(or)e(the)h(`)p Fp(in_network)p +Fx(')150 2096 y(selector)32 b(function)e(\(see)h(Section)h(3.3.3.26)h +([in)p 1776 2096 28 4 v 40 w(net)m(w)m(ork)e(Selector)h(F)-8 +b(unction],)31 b(page)h(30\).)150 2322 y Fw(4.12)68 b +Fi(-w)44 b Fh(w)l(ait-timeout)150 2481 y Fx(Selects)32 +b(the)f(in)m(terv)-5 b(al)33 b(in)e(seconds)g(b)s(et)m(w)m(een)g +(unmoun)m(t)f(attempts)i(after)g(the)f(initial)i(time-to-liv)m(e)h(has) +150 2591 y(expired.)275 2722 y(This)29 b(defaults)i(to)g(120)g(seconds) +g(\(t)m(w)m(o)h(min)m(utes\).)150 2948 y Fw(4.13)68 b +Fi(-x)44 b Fh(opts)150 3108 y Fx(Sp)s(eci\014es)35 b(the)g(t)m(yp)s(e)h +(and)f(v)m(erb)s(osit)m(y)h(of)f(log)i(messages.)57 b +Fo(opts)39 b Fx(is)d(a)f(comma)h(separated)g(list)g(selected)150 +3217 y(from)30 b(the)g(follo)m(wing)i(options:)150 3371 +y Fp(fatal)240 b Fx(F)-8 b(atal)33 b(errors)c(\(cannot)j(b)s(e)d +(turned)h(o\013)7 b(\))150 3524 y Fp(error)240 b Fx(Non-fatal)32 +b(errors)e(\(cannot)h(b)s(e)f(turned)f(o\013)7 b(\))150 +3677 y Fp(user)288 b Fx(Non-fatal)32 b(user)e(errors)150 +3830 y Fp(warn)288 b Fx(Reco)m(v)m(erable)33 b(errors)150 +3983 y Fp(warning)144 b Fx(Alias)31 b(for)f Fp(warn)150 +4136 y(info)288 b Fx(Information)30 b(messages)150 4289 +y Fp(map)336 b Fx(Moun)m(t)31 b(map)f(usage)150 4442 +y Fp(stats)240 b Fx(Additional)31 b(statistics)150 4595 +y Fp(all)336 b Fx(All)31 b(of)g(the)f(ab)s(o)m(v)m(e)150 +4749 y Fp(defaults)96 b Fx(An)30 b(alias)i(for)e Fp(")p +Fx(fatal,error,user,w)m(arning,info)p Fp(")p Fx(.)275 +4902 y(Initially)43 b(a)g(set)h(of)f(default)g(logging)h(\015ags)f(is)g +(enabled.)77 b(This)42 b(is)h(as)g(if)g(`)p Fp(-x)30 +b(defaults)p Fx(')41 b(or)h(`)p Fp(-x)150 5011 y +(fatal,error,user,warning)o(,inf)o(o)p Fx(')33 b(had)39 +b(b)s(een)f(selected.)68 b(The)39 b(command)g(line)g(is)g(parsed)g(and) +150 5121 y(logging)c(is)e(con)m(trolled)i(b)m(y)f(the)f +Fp(-x)g Fx(option.)50 b(The)33 b(v)m(ery)h(\014rst)e(set)i(of)f +(logging)j(\015ags)d(is)g(sa)m(v)m(ed)i(and)e(can)150 +5230 y(not)j(b)s(e)f(subsequen)m(tly)g(disabled)h(using)f +Ft(A)n(mq)p Fx(.)56 b(This)35 b(default)h(set)g(of)g(options)g(is)g +(useful)e(for)i(general)150 5340 y(pro)s(duction)29 b(use.)p +eop end +%%Page: 43 45 +TeXDict begin 43 44 bop 150 -116 a Fx(Chapter)30 b(4:)41 +b Ft(A)n(md)f Fx(Command)29 b(Line)h(Options)1862 b(43)275 +299 y(The)21 b(`)p Fp(info)p Fx(')h(messages)i(include)e(details)h(of)g +(what)f(is)h(moun)m(ted)f(and)g(unmoun)m(ted)g(and)f(when)h(\014lesys-) +150 408 y(tems)35 b(ha)m(v)m(e)i(timed)e(out.)55 b(If)34 +b(y)m(ou)h(w)m(an)m(t)h(to)g(ha)m(v)m(e)g(the)f(default)h(set)f(of)g +(messages)h(without)f(the)h(`)p Fp(info)p Fx(')150 518 +y(messages)c(then)e(y)m(ou)h(simply)f(need)h(`)p Fp(-x)f(noinfo)p +Fx('.)40 b(The)30 b(messages)i(giv)m(en)f(b)m(y)g(`)p +Fp(user)p Fx(')f(relate)i(to)f(errors)150 628 y(in)i(the)h(moun)m(t)f +(maps,)h(so)f(these)h(are)g(useful)e(when)h(new)f(maps)h(are)h +(installed.)50 b(The)33 b(follo)m(wing)i(table)150 737 +y(lists)c(the)f(syslog)i(priorities)e(used)g(for)g(eac)m(h)i(of)e(the)h +(message)g(t)m(yp)s(es.)150 917 y Fp(fatal)240 b Fx(`)p +Fp(LOG_CRIT)p Fx(')150 1090 y Fp(error)g Fx(`)p Fp(LOG_ERR)p +Fx(')150 1263 y Fp(user)288 b Fx(`)p Fp(LOG_WARNING)p +Fx(')150 1435 y Fp(warning)144 b Fx(`)p Fp(LOG_WARNING)p +Fx(')150 1608 y Fp(info)288 b Fx(`)p Fp(LOG_INFO)p Fx(')150 +1781 y Fp(debug)240 b Fx(`)p Fp(LOG_DEBUG)p Fx(')150 +1954 y Fp(map)336 b Fx(`)p Fp(LOG_DEBUG)p Fx(')150 2127 +y Fp(stats)240 b Fx(`)p Fp(LOG_INFO)p Fx(')275 2306 y(The)38 +b(options)g(can)h(b)s(e)f(pre\014xed)g(b)m(y)g(the)h(string)f(`)p +Fp(no)p Fx(')h(to)g(indicate)g(that)h(this)e(option)h(should)f(b)s(e) +150 2416 y(turned)j(o\013.)75 b(F)-8 b(or)42 b(example,)k(to)c(obtain)g +(all)h(but)e(`)p Fp(info)p Fx(')g(messages)h(the)g(option)g(`)p +Fp(-x)30 b(all,noinfo)p Fx(')150 2526 y(w)m(ould)g(b)s(e)g(used.)275 +2674 y(If)39 b Ft(A)n(md)50 b Fx(w)m(as)40 b(built)g(with)g(debugging)g +(enabled)g(the)g Fp(debug)e Fx(option)j(is)f(automatically)j(enabled) +150 2783 y(regardless)31 b(of)f(the)h(command)f(line)h(options.)150 +3036 y Fw(4.14)68 b Fi(-y)44 b Fh(NIS-domain)150 3195 +y Fx(Selects)d(an)f(alternate)i(NIS)d(domain.)70 b(This)39 +b(is)i(useful)e(for)h(debugging)g(and)f(cross-domain)i(shared)150 +3305 y(moun)m(ting.)50 b(If)33 b(this)g(\015ag)h(is)f(sp)s(eci\014ed,)h +Ft(A)n(md)43 b Fx(immediately)35 b(attempts)f(to)g(bind)e(to)i(a)g +(serv)m(er)g(for)f(this)150 3414 y(domain.)150 3667 y +Fw(4.15)68 b Fi(-A)44 b Fh(arc)l(hitecture)150 3827 y +Fx(Sp)s(eci\014es)39 b(the)h(OS)e(arc)m(hitecture)j(of)f(the)g(system.) +68 b(The)39 b(only)h(e\013ect)h(of)e(this)h(option)g(is)f(to)i(set)f +(the)150 3936 y(v)-5 b(ariable)31 b Fp(${arch})p Fx(.)275 +4084 y(This)e(option)i(w)m(ould)f(b)s(e)g(used)f(as)i(follo)m(ws:)390 +4232 y Fp(amd)47 b(-A)g(i386)g(...)150 4485 y Fw(4.16)68 +b Fi(-C)44 b Fh(cluster-name)150 4644 y Fx(Sp)s(eci\014es)32 +b(the)h(name)g(of)g(the)g(cluster)g(of)f(whic)m(h)h(the)g(lo)s(cal)h +(mac)m(hine)f(is)g(a)g(mem)m(b)s(er.)47 b(The)33 b(only)f(e\013ect)150 +4754 y(is)37 b(to)h(set)g(the)g(v)-5 b(ariable)38 b Fp(${cluster})p +Fx(.)59 b(The)37 b Fo(cluster-name)43 b Fx(is)37 b(will)h(usually)f +(obtained)g(b)m(y)h(running)150 4863 y(another)d(command)f(whic)m(h)g +(uses)h(a)g(database)g(to)g(map)g(the)f(lo)s(cal)i(hostname)f(in)m(to)h +(a)f(cluster)g(name.)150 4973 y Fp(${cluster})30 b Fx(can)i(then)h(b)s +(e)e(used)h(as)h(a)g(selector)h(to)f(restrict)g(moun)m(ting)g(of)g +(replicated)g(data.)48 b(If)32 b(this)150 5082 y(option)g(is)g(not)f +(giv)m(en,)j Fp(${cluster})28 b Fx(has)k(the)f(same)h(v)-5 +b(alue)32 b(as)g Fp(${domain})p Fx(.)42 b(This)31 b(w)m(ould)g(b)s(e)g +(used)g(as)150 5192 y(follo)m(ws:)390 5340 y Fp(amd)47 +b(-C)g(`clustername`)d(...)p eop end +%%Page: 44 46 +TeXDict begin 44 45 bop 150 -116 a Fx(44)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fw(4.17)68 +b Fi(-D)44 b Fh(opts)150 458 y Fx(Con)m(trols)30 b(the)f(v)m(erb)s +(osit)m(y)g(and)g(co)m(v)m(erage)j(of)d(the)g(debugging)g(trace;)i +Fo(opts)i Fx(is)c(a)g(comma)h(separated)f(list)150 568 +y(of)f(debugging)f(options.)41 b(The)27 b Fp(-D)g Fx(option)h(is)f +(only)h(a)m(v)-5 b(ailable)30 b(if)e Ft(A)n(md)37 b Fx(w)m(as)28 +b(compiled)g(with)f(`)p Fp(-DDEBUG)p Fx(',)150 677 y(or)36 +b(con\014gured)f(with)h Fp(configure)27 b(--enable-debug)p +Fx(.)54 b(The)35 b(memory)h(debugging)g(facilities)i(\(`)p +Fp(mem)p Fx('\))150 787 y(are)33 b(only)f(a)m(v)-5 b(ailable)35 +b(if)d Ft(A)n(md)42 b Fx(w)m(as)33 b(compiled)g(with)f(`)p +Fp(-DDEBUG_MEM)p Fx(')e(\(in)i(addition)h(to)g(`)p Fp(-DDEBUG)p +Fx('\),)f(or)150 897 y(con\014gured)e(with)g Fp(configure)e +(--enable-debug=mem)p Fx(.)275 1039 y(The)k(most)h(common)g(options)g +(to)g(use)f(are)h(`)p Fp(-D)d(trace)p Fx(')i(and)g(`)p +Fp(-D)e(test)p Fx(')i(\(whic)m(h)g(turns)g(on)g(all)i(the)150 +1149 y(useful)c(debug)f(options\).)42 b(As)30 b(usual,)g(ev)m(ery)h +(option)g(can)g(b)s(e)f(pre\014xed)f(with)h(`)p Fp(no)p +Fx(')g(to)h(turn)e(it)i(o\013.)150 1321 y Fp(all)336 +b Fx(all)31 b(options)g(\(excluding)g(hrtime)f(and)g(m)m(tab\))150 +1488 y Fp(defaults)96 b Fx(\\sensible")31 b(default)g(options)f +(\(all{excluding)j(hrtime,)d(m)m(tab,)h(and)f(xdrtrace\))150 +1656 y Fp(test)288 b Fx(full)30 b(debug)g(options)g(plus)g(m)m(tab,no)s +(daemon,nofork,noamq)150 1824 y Fp(amq)336 b Fx(register)31 +b Ft(A)n(md)40 b Fx(with)30 b(the)h(RPC)e(p)s(ortmapp)s(er,)g(for)h +Ft(A)n(mq)150 1991 y Fp(daemon)192 b Fx(en)m(ter)31 b(daemon)f(mo)s(de) +150 2159 y Fp(fork)288 b Fx(fork)30 b(c)m(hild)h(w)m(ork)m(er)g +(\(hlfsd)e(only\))150 2327 y Fp(full)288 b Fx(program)30 +b(trace)150 2494 y Fp(hrtime)192 b Fx(prin)m(t)30 b(high)g(resolution)h +(time)g(stamps)f(\(only)h(if)f Fn(syslog)p Fx(\(3\))j(is)d(not)h +(used\))150 2662 y Fp(info)288 b Fx(info)36 b(service)i(sp)s(eci\014c)e +(debugging)g(\(hesio)s(d,)i(nis,)g(etc.\))61 b(In)35 +b(the)i(case)h(of)e(hesio)s(d)g(maps,)630 2772 y(turns)29 +b(on)h(the)h(hesio)s(d)f(RES)p 1618 2772 28 4 v 39 w(DEBUG)i(in)m +(ternal)f(debugging)f(option.)150 2939 y Fp(mem)336 b +Fx(trace)31 b(memory)f(allo)s(cations.)43 b(Needs)30 +b(to)h(b)s(e)f(explicitly)h(enabled)g(at)f(compile)h(time)g(with)630 +3049 y({enable-debug=mem.)150 3217 y Fp(mtab)288 b Fx(use)80 +b(lo)s(cal)i(moun)m(t-table)g(\014le)f(\(defaults)f(to)i +Fp(/tmp/mtab)p Fx(,)91 b(see)81 b(Section)g(6.5.6)630 +3326 y([debug)p 899 3326 V 40 w(m)m(tab)p 1143 3326 V +40 w(\014le)31 b(P)m(arameter],)h(page)f(63\))150 3494 +y Fp(readdir)144 b Fx(sho)m(w)30 b(readdir)g(progress)150 +3661 y Fp(str)336 b Fx(debug)30 b(string)g(m)m(unging)150 +3829 y Fp(trace)240 b Fx(trace)32 b(RPC)d(proto)s(col)j(and)d(NFS)i +(moun)m(t)f(argumen)m(ts)150 3997 y Fp(xdrtrace)96 b +Fx(trace)32 b(XDR)e(routines)275 4169 y(Y)-8 b(ou)24 +b(ma)m(y)h(also)g(refer)f(to)h(the)f(program)g(source)h(for)f(a)g(more) +g(detailed)i(explanation)f(of)f(the)h(a)m(v)-5 b(ailable)150 +4278 y(options.)150 4523 y Fw(4.18)68 b Fi(-F)44 b Fh(conf-\014le)150 +4682 y Fx(Sp)s(ecify)d(an)g Ft(A)n(md)51 b Fx(con\014guration)42 +b(\014le)g Fo(conf-\014le)47 b Fx(to)42 b(use.)74 b(F)-8 +b(or)43 b(a)f(description)f(of)h(the)g(format)g(and)150 +4792 y(syn)m(tax,)31 b(see)g(Chapter)e(6)i([Amd)f(Con\014guration)f +(File],)j(page)f(59.)42 b(This)29 b(con\014guration)h(\014le)h(is)f +(used)f(to)150 4902 y(sp)s(ecify)d(an)m(y)h(options)g(in)f(lieu)h(of)g +(t)m(yping)g(man)m(y)g(of)f(them)h(on)f(the)h(command)g(line.)39 +b(The)27 b Fp(amd.conf)d Fx(\014le)150 5011 y(includes)31 +b(directiv)m(es)i(for)e(ev)m(ery)h(command)g(line)f(option)h +Ft(A)n(md)41 b Fx(has,)32 b(and)f(man)m(y)g(more)h(that)g(are)g(only) +150 5121 y(a)m(v)-5 b(ailable)39 b(via)e(the)g(con\014guration)g +(\014le)g(facilit)m(y)-8 b(.)62 b(The)36 b(con\014guration)i(\014le)e +(sp)s(eci\014ed)g(b)m(y)h(this)f(option)150 5230 y(is)31 +b(pro)s(cessed)f(after)h(all)h(other)f(options)g(had)f(b)s(een)h(pro)s +(cessed,)f(regardless)h(of)g(the)g(actual)h(lo)s(cation)h(of)150 +5340 y(this)d(option)h(on)f(the)h(command)f(line.)p eop +end +%%Page: 45 47 +TeXDict begin 45 46 bop 150 -116 a Fx(Chapter)30 b(4:)41 +b Ft(A)n(md)f Fx(Command)29 b(Line)h(Options)1862 b(45)150 +299 y Fw(4.19)68 b Fi(-H)150 458 y Fx(Prin)m(t)30 b(a)h(brief)f(help)g +(and)g(usage)h(string.)150 691 y Fw(4.20)68 b Fi(-O)44 +b Fh(op-sys-name)150 850 y Fx(Ov)m(errides)35 b(the)g(compiled-in)g +(name)g(of)g(the)h(op)s(erating)f(system,)i(with)d Fo(op-sys-name)p +Fx(.)55 b(Useful)35 b(when)150 960 y(the)i(built-in)h(name)f(is)g(not)h +(desired)f(for)g(bac)m(kw)m(ard)g(compatibilit)m(y)j(reasons.)61 +b(F)-8 b(or)39 b(example,)g(if)f(the)150 1069 y(build)31 +b(in)h(name)g(is)h(`)p Fp(sunos5)p Fx(',)e(y)m(ou)i(can)f(o)m(v)m +(erride)i(it)e(to)h(the)g(old)f(name)g(`)p Fp(sos5)p +Fx(',)h(and)e(use)h(older)g(maps)150 1179 y(whic)m(h)e(w)m(ere)h +(written)f(with)g(the)h(latter)h(in)e(mind.)150 1411 +y Fw(4.21)68 b Fi(-S)150 1571 y Fx(Do)37 b Ft(not)45 +b Fx(lo)s(c)m(k)37 b(the)f(running)f(executable)i(pages)g(of)f +Ft(A)n(md)45 b Fx(in)m(to)37 b(memory)-8 b(.)58 b(T)-8 +b(o)36 b(impro)m(v)m(e)h Ft(A)n(md)9 b Fx('s)37 b(p)s(er-)150 +1680 y(formance,)32 b(systems)f(that)g(supp)s(ort)e(the)j +Fn(plo)s(c)m(k)p Fx(\(3\))g(or)f Fn(mlo)s(c)m(k)-5 b(all)p +Fx(\(2\))34 b(call)e(lo)s(c)m(k)g(the)f Ft(A)n(md)40 +b Fx(pro)s(cess)31 b(in)m(to)150 1790 y(memory)-8 b(.)54 +b(This)34 b(w)m(a)m(y)i(there)f(is)g(less)g(c)m(hance)h(the)f(op)s +(erating)g(system)g(will)g(sc)m(hedule,)i(page)e(out,)i(and)150 +1900 y(sw)m(ap)27 b(the)h Ft(A)n(md)36 b Fx(pro)s(cess)27 +b(as)h(needed.)39 b(This)27 b(tends)f(to)j(impro)m(v)m(e)f +Ft(A)n(md)9 b Fx('s)27 b(p)s(erformance,)h(at)g(the)f(cost)i(of)150 +2009 y(reserving)e(the)f(memory)h(used)e(b)m(y)i(the)f +Ft(A)n(md)36 b Fx(pro)s(cess)26 b(\(making)i(it)f(una)m(v)-5 +b(ailable)27 b(for)g(other)g(pro)s(cesses\).)150 2119 +y(If)j(this)g(b)s(eha)m(vior)h(is)f(not)h(desired,)f(use)g(the)g +Fp(-S)g Fx(option.)150 2351 y Fw(4.22)68 b Fi(-T)44 b +Fh(tag)150 2511 y Fx(Sp)s(ecify)37 b(a)h(tag)h(to)f(use)g(with)f +Fp(amd.conf)p Fx(.)61 b(All)38 b(map)f(en)m(tries)i(tagged)g(with)e +Fo(tag)47 b Fx(will)38 b(b)s(e)f(pro)s(cessed.)150 2620 +y(Map)31 b(en)m(tries)i(that)e(are)h(not)g(tagged)g(are)g(alw)m(a)m(ys) +h(pro)s(cessed.)43 b(Map)31 b(en)m(tries)h(that)g(are)g(tagged)h(with)e +(a)150 2730 y(tag)h(other)e(than)g Fo(tag)40 b Fx(will)30 +b(not)h(b)s(e)f(pro)s(cessed.)p eop end +%%Page: 46 48 +TeXDict begin 46 47 bop eop end +%%Page: 47 49 +TeXDict begin 47 48 bop 150 -116 a Fx(Chapter)30 b(5:)41 +b(Filesystem)32 b(T)m(yp)s(es)2351 b(47)150 299 y Fu(5)80 +b(Filesystem)53 b(T)l(yp)t(es)150 543 y Fx(T)-8 b(o)33 +b(moun)m(t)f(a)g(v)m(olume,)i Ft(A)n(md)41 b Fx(m)m(ust)32 +b(b)s(e)g(told)g(the)h(t)m(yp)s(e)f(of)g(\014lesystem)g(to)h(b)s(e)f +(used.)45 b(Eac)m(h)33 b(\014lesystem)150 652 y(t)m(yp)s(e)e(t)m +(ypically)h(requires)e(additional)h(information)g(suc)m(h)f(as)g(the)h +(\014leserv)m(er)g(name)f(for)g(NFS.)275 790 y(F)-8 b(rom)35 +b(the)h(p)s(oin)m(t)f(of)g(view)h(of)f Ft(A)n(md)p Fx(,)i(a)e +Fo(\014lesystem)h Fx(is)f(an)m(ything)g(that)h(can)g(resolv)m(e)g(an)f +(incoming)150 900 y(name)28 b(lo)s(okup.)40 b(An)28 b(imp)s(ortan)m(t)g +(feature)h(is)f(supp)s(ort)e(for)i(m)m(ultiple)h(\014lesystem)g(t)m(yp) +s(es.)40 b(Some)28 b(of)g(these)150 1009 y(\014lesystems)34 +b(are)g(implemen)m(ted)g(in)f(the)h(lo)s(cal)h(k)m(ernel)f(and)f(some)h +(on)f(remote)h(\014leserv)m(ers,)h(whilst)f(the)150 1119 +y(others)c(are)h(implemen)m(ted)g(in)m(ternally)g(b)m(y)g +Ft(A)n(md)p Fx(.)275 1256 y(The)f(t)m(w)m(o)i(common)f(\014lesystem)g +(t)m(yp)s(es)g(are)g(UFS)f(and)g(NFS.)h(F)-8 b(our)31 +b(other)g(user)f(accessible)j(\014lesys-)150 1366 y(tems)c(\(`)p +Fp(link)p Fx(',)g(`)p Fp(program)p Fx(',)e(`)p Fp(auto)p +Fx(')h(and)g(`)p Fp(direct)p Fx('\))g(are)h(also)h(implemen)m(ted)f(in) +m(ternally)g(b)m(y)g Ft(A)n(md)38 b Fx(and)150 1476 y(these)26 +b(are)g(describ)s(ed)f(b)s(elo)m(w.)40 b(There)25 b(are)h(t)m(w)m(o)h +(additional)g(\014lesystem)f(t)m(yp)s(es)g(in)m(ternal)g(to)h +Ft(A)n(md)35 b Fx(whic)m(h)150 1585 y(are)29 b(not)g(directly)g +(accessible)i(to)e(the)g(user)f(\(`)p Fp(inherit)p Fx(')f(and)h(`)p +Fp(error)p Fx('\).)40 b(Their)28 b(use)g(is)h(describ)s(ed)f(since)150 +1695 y(they)j(ma)m(y)g(still)g(ha)m(v)m(e)g(an)g(e\013ect)h(visible)e +(to)h(the)g(user.)150 1932 y Fw(5.1)68 b(Net)l(w)l(ork)47 +b(Filesystem)f(\(`)p Fi(nfs)p Fw('\))150 2092 y Fx(The)30 +b Fo(nfs)j Fx(\(`)p Fp(type:=nfs)p Fx('\))c(\014lesystem)i(t)m(yp)s(e)f +(pro)m(vides)h(access)g(to)g(Sun's)e(NFS.)150 2229 y(The)h(follo)m +(wing)i(options)e(m)m(ust)h(b)s(e)e(sp)s(eci\014ed:)150 +2394 y Fp(rhost)240 b Fx(the)24 b(remote)g(\014leserv)m(er.)39 +b(This)22 b(m)m(ust)i(b)s(e)e(an)i(en)m(try)f(in)g(the)h(hosts)f +(database.)40 b(IP)23 b(addresses)630 2503 y(are)g(not)f(accepted.)40 +b(The)21 b(default)i(v)-5 b(alue)23 b(is)f(tak)m(en)i(from)d(the)i(lo)s +(cal)g(host)g(name)f(\()p Fp(${host})p Fx(\))630 2613 +y(if)30 b(no)h(other)f(v)-5 b(alue)31 b(is)f(sp)s(eci\014ed.)150 +2775 y Fp(rfs)336 b Fx(the)25 b(remote)h(\014lesystem.)39 +b(If)25 b(no)g(v)-5 b(alue)25 b(is)g(sp)s(eci\014ed)g(for)f(this)h +(option,)i(an)e(in)m(ternal)h(default)630 2885 y(of)31 +b Fp(${path})d Fx(is)i(used.)275 3049 y(NFS)e(moun)m(ts)h(require)g(a)g +(t)m(w)m(o)h(stage)g(pro)s(cess.)40 b(First,)30 b(the)f +Fo(\014le)g(handle)k Fx(of)c(the)g(remote)h(\014le)f(system)150 +3159 y(m)m(ust)36 b(b)s(e)g(obtained)h(from)e(the)i(serv)m(er.)59 +b(Then)35 b(a)i(moun)m(t)f(system)g(call)i(m)m(ust)e(b)s(e)g(done)g(on) +g(the)h(lo)s(cal)150 3268 y(system.)46 b Ft(A)n(md)41 +b Fx(k)m(eeps)33 b(a)f(cac)m(he)i(of)e(\014le)g(handles)f(for)h(remote) +h(\014le)f(systems.)46 b(The)31 b(cac)m(he)j(en)m(tries)f(ha)m(v)m(e) +150 3378 y(a)e(lifetime)h(of)e(a)h(few)f(min)m(utes.)275 +3516 y(If)j(a)h(required)f(\014le)h(handle)g(is)g(not)g(in)g(the)g(cac) +m(he,)i Ft(A)n(md)44 b Fx(sends)33 b(a)h(request)g(to)h(the)f(remote)h +(serv)m(er)150 3625 y(to)c(obtain)g(it.)275 3763 y(Historically)-8 +b(,)38 b(this)d(do)s(cumen)m(tation)h(has)f(main)m(tained)g(that)h +Ft(A)n(md)44 b Fx(will)35 b(try)g(all)h(the)f(lo)s(cations)h(in)150 +3873 y(parallel)h(and)f(use)f(the)h(\014rst)g(one)g(whic)m(h)g(resp)s +(onds)e(with)i(a)g(v)-5 b(alid)36 b(\014le)g(handle.)57 +b(This)36 b(has)f(not)i(b)s(een)150 3982 y(the)30 b(case)h(for)e(quite) +h(some)g(time,)h(ho)m(w)m(ev)m(er.)42 b(Instead,)30 b +Ft(A)n(md)39 b Fx(will)30 b(go)h(through)e(eac)m(h)h(lo)s(cation,)i +(one)e(b)m(y)150 4092 y(one,)h(and)f(will)g(only)h(skip)f(to)h(the)f +(next)h(one)g(if)f(the)h(previous)e(one)i(either)g(fails)g(or)f(times)h +(out.)150 4229 y(An)f(NFS)g(en)m(try)h(migh)m(t)g(b)s(e:)390 +4367 y Fp(jsp)95 b(host!=charm;type:=nfs;r)o(host)o(:=c)o(harm)o(;rfs)o +(:=/)o(home)o(/cha)o(rm;)o(subl)o(ink:)o(=js)o(p)275 +4505 y Fx(The)37 b(moun)m(t)h(system)g(call)h(and)e(an)m(y)h(unmoun)m +(t)f(attempts)i(are)f(alw)m(a)m(ys)h(done)f(in)f(a)h(new)g(task)g(to) +150 4615 y(a)m(v)m(oid)32 b(the)e(p)s(ossibilit)m(y)h(of)g(blo)s(c)m +(king)g Ft(A)n(md)p Fx(.)150 4852 y Fw(5.2)68 b(Net)l(w)l(ork)47 +b(Host)e(Filesystem)h(\(`)p Fi(host)p Fw('\))150 5011 +y Fx(The)25 b Fo(host)j Fx(\(`)p Fp(type:=host)p Fx('\))d(\014lesystem) +h(allo)m(ws)h(access)h(to)e(the)g(en)m(tire)h(exp)s(ort)f(tree)h(of)f +(an)g(NFS)f(serv)m(er.)150 5121 y(The)34 b(implemen)m(tation)j(is)e(la) +m(y)m(ered)h(ab)s(o)m(v)m(e)g(the)f(`)p Fp(nfs)p Fx(')f(implemen)m +(tation)j(so)e(k)m(eep-aliv)m(es)i(w)m(ork)e(in)g(the)150 +5230 y(same)30 b(w)m(a)m(y)-8 b(.)42 b(The)29 b(only)h(option)g(whic)m +(h)g(needs)f(to)i(b)s(e)e(sp)s(eci\014ed)g(is)h(`)p Fp(rhost)p +Fx(')f(whic)m(h)g(is)h(the)g(name)g(of)g(the)150 5340 +y(\014leserv)m(er)h(to)g(moun)m(t.)p eop end +%%Page: 48 50 +TeXDict begin 48 49 bop 150 -116 a Fx(48)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(The)20 +b(`)p Fp(host)p Fx(')h(\014lesystem)h(t)m(yp)s(e)g(w)m(orks)f(b)m(y)g +(querying)g(the)h(moun)m(t)f(daemon)h(on)f(the)h(giv)m(en)g(\014leserv) +m(er)g(to)150 408 y(obtain)g(its)f(exp)s(ort)g(list.)38 +b Ft(A)n(md)31 b Fx(then)20 b(obtains)i(\014lehandles)f(for)f(eac)m(h)j +(of)e(the)g(exp)s(orted)g(\014lesystems.)38 b(An)m(y)150 +518 y(errors)33 b(at)h(this)g(stage)h(cause)f(that)g(particular)g +(\014lesystem)g(to)g(b)s(e)f(ignored.)50 b(Finally)35 +b(eac)m(h)g(\014lesystem)150 628 y(is)e(moun)m(ted.)50 +b(Again,)35 b(errors)e(are)g(logged)i(but)e(ignored.)49 +b(One)33 b(common)h(reason)f(for)g(moun)m(ts)g(to)h(fail)150 +737 y(is)i(that)g(the)g(moun)m(t)g(p)s(oin)m(t)g(do)s(es)f(not)h +(exist.)58 b(Although)36 b Ft(A)n(md)45 b Fx(attempts)37 +b(to)g(automatically)h(create)150 847 y(the)k(moun)m(t)g(p)s(oin)m(t,)j +(it)d(ma)m(y)g(b)s(e)f(on)h(a)g(remote)h(\014lesystem)f(to)h(whic)m(h)e +Ft(A)n(md)51 b Fx(do)s(es)42 b(not)g(ha)m(v)m(e)h(write)150 +956 y(p)s(ermission.)275 1097 y(When)23 b(an)g(attempt)i(to)f(unmoun)m +(t)e(a)i(`)p Fp(host)p Fx(')f(\014lesystem)h(moun)m(t)f(fails,)j +Ft(A)n(md)33 b Fx(remoun)m(ts)23 b(an)m(y)h(\014lesys-)150 +1207 y(tems)32 b(whic)m(h)e(had)h(successfully)g(b)s(een)g(unmoun)m +(ted.)42 b(T)-8 b(o)31 b(do)h(this)f Ft(A)n(md)40 b Fx(queries)31 +b(the)h(moun)m(t)f(daemon)150 1317 y(again)k(and)e(obtains)i(a)f(fresh) +f(cop)m(y)i(of)f(the)g(exp)s(ort)g(list.)53 b Ft(A)n(md)43 +b Fx(then)34 b(tries)g(to)h(moun)m(t)f(an)m(y)g(exp)s(orted)150 +1426 y(\014lesystems)d(whic)m(h)f(are)g(not)h(curren)m(tly)f(moun)m +(ted.)275 1567 y(Sun's)36 b(automoun)m(ter)j(pro)m(vides)f(a)h(sp)s +(ecial)f(`)p Fp(-hosts)p Fx(')f(map.)64 b(T)-8 b(o)38 +b(ac)m(hiev)m(e)j(the)d(same)h(e\013ect)g(with)150 1677 +y Ft(A)n(md)h Fx(requires)30 b(t)m(w)m(o)h(steps.)41 +b(First)31 b(a)g(moun)m(t)f(map)g(m)m(ust)g(b)s(e)g(created)h(as)g +(follo)m(ws:)390 1818 y Fp(*)334 b(type:=host;rhost:=${key})o(;fs)o +(:=${)o(auto)o(dir)o(}/${)o(rhos)o(t}/)o(root)150 1959 +y Fx(and)30 b(then)g(start)h Ft(A)n(md)40 b Fx(with)30 +b(the)g(follo)m(wing)i(command)390 2100 y Fp(amd)47 b(/net)g(net.map) +150 2241 y Fx(where)41 b(`)p Fp(net.map)p Fx(')f(is)i(the)f(name)h(of)g +(map)f(describ)s(ed)f(ab)s(o)m(v)m(e.)75 b(Note)43 b(that)f(the)g(v)-5 +b(alue)42 b(of)g Fp(${fs})e Fx(is)150 2351 y(o)m(v)m(erridden)27 +b(in)h(the)f(map.)39 b(This)27 b(is)g(done)h(to)g(a)m(v)m(oid)h(a)e +(clash)h(b)s(et)m(w)m(een)g(the)g(moun)m(t)f(tree)h(and)f(an)m(y)h +(other)150 2460 y(\014lesystem)j(already)g(moun)m(ted)f(from)g(the)g +(same)h(\014leserv)m(er.)275 2601 y(If)i(di\013eren)m(t)i(moun)m(t)f +(options)g(are)h(needed)e(for)h(di\013eren)m(t)h(hosts)f(then)f +(additional)i(en)m(tries)g(can)g(b)s(e)150 2711 y(added)30 +b(to)h(the)f(map,)h(for)f(example)390 2852 y Fp(host2)333 +b(opts:=ro,nosuid,soft)150 2993 y Fx(w)m(ould)30 b(soft)h(moun)m(t)f(`) +p Fp(host2)p Fx(')g(read-only)-8 b(.)150 3235 y Fw(5.3)68 +b(Net)l(w)l(ork)47 b(Filesystem)f(Group)e(\(`)p Fi(nfsx)p +Fw('\))150 3395 y Fx(The)21 b Fo(nfsx)28 b Fx(\(`)p Fp(type:=nfsx)p +Fx('\))20 b(\014lesystem)i(allo)m(ws)i(a)e(group)f(of)h(\014lesystems)h +(to)f(b)s(e)g(moun)m(ted)f(from)h(a)g(single)150 3504 +y(NFS)33 b(serv)m(er.)48 b(The)32 b(implemen)m(tation)j(is)d(la)m(y)m +(ered)j(ab)s(o)m(v)m(e)f(the)e(`)p Fp(nfs)p Fx(')h(implemen)m(tation)h +(so)f(k)m(eep-aliv)m(es)150 3614 y(w)m(ork)d(in)h(the)f(same)h(w)m(a)m +(y)-8 b(.)275 3755 y Ft(W)h(ARNING)8 b Fx(:)28 b(`)p +Fp(nfsx)p Fx(')g(is)g(mean)m(t)i(to)f(b)s(e)f(a)h(\\last)h(resort")g +(kind)e(of)g(solution.)41 b(It)29 b(is)g(racy)g(and)f(p)s(o)s(orly)150 +3864 y(supp)s(orted.)37 b(The)24 b(authors)g Ft(highly)34 +b Fx(recommend)24 b(that)i(other)f(solutions)g(b)s(e)f(considered)g(b)s +(efore)h(relying)150 3974 y(on)30 b(it.)275 4115 y(The)38 +b(options)i(are)f(the)h(same)f(as)h(for)f(the)g(`)p Fp(nfs)p +Fx(')g(\014lesystem)g(with)g(one)h(di\013erence)f(for)g(`)p +Fp(rfs)p Fx(',)j(as)150 4225 y(explained)31 b(b)s(elo)m(w.)150 +4366 y(The)f(follo)m(wing)i(options)e(should)g(b)s(e)g(sp)s(eci\014ed:) +150 4535 y Fp(rhost)240 b Fx(the)44 b(remote)g(\014leserv)m(er.)80 +b(The)43 b(default)h(v)-5 b(alue)44 b(is)f(tak)m(en)i(from)e(the)h(lo)s +(cal)g(host)g(name)630 4645 y(\()p Fp(${host})p Fx(\))29 +b(if)h(no)h(other)f(v)-5 b(alue)31 b(is)g(sp)s(eci\014ed.)150 +4811 y Fp(rfs)336 b Fx(is)31 b(a)h(list)g(of)f(\014lesystems)h(to)g +(moun)m(t,)g(and)e(m)m(ust)h(b)s(e)g(sp)s(eci\014ed.)43 +b(The)31 b(list)h(is)f(in)g(the)g(form)630 4920 y(of)g(a)f(comma)h +(separated)g(strings.)150 5089 y(F)-8 b(or)31 b(example:)390 +5230 y Fp(pub)95 b(type:=nfsx;rhost:=gould)o(;\\)629 +5340 y(rfs:=/public,/,graphics)o(,use)o(net)o(;fs:)o(=${a)o(uto)o(dir}) +o(/${r)o(hos)o(t}/r)o(oot)p eop end +%%Page: 49 51 +TeXDict begin 49 50 bop 150 -116 a Fx(Chapter)30 b(5:)41 +b(Filesystem)32 b(T)m(yp)s(es)2351 b(49)275 299 y(The)31 +b(\014rst)h(string)g(de\014nes)g(the)g(ro)s(ot)h(of)g(the)f(tree,)i +(and)e(is)g(applied)g(as)h(a)g(pre\014x)e(to)i(the)g(remaining)150 +408 y(mem)m(b)s(ers)27 b(of)g(the)g(list)h(whic)m(h)f(de\014ne)g(the)g +(individual)g(\014lesystems.)40 b(The)27 b(\014rst)f(string)i(is)f +Ft(not)37 b Fx(used)26 b(as)i(a)150 518 y(\014lesystem)33 +b(name.)47 b(A)32 b(serial)h(op)s(eration)g(is)f(used)g(to)h(determine) +g(the)f(lo)s(cal)i(moun)m(t)e(p)s(oin)m(ts)h(to)g(ensure)150 +628 y(a)e(consisten)m(t)g(la)m(y)m(out)i(of)d(a)h(tree)g(of)g(moun)m +(ts.)275 762 y(Here,)58 b(the)52 b Ft(thr)-5 b(e)g(e)60 +b Fx(\014lesystems,)e(`)p Fp(/public)p Fx(',)e(`)p Fp(/public/graphics) +p Fx(')49 b(and)i(`)p Fp(/public/usenet)p Fx(',)150 871 +y(w)m(ould)30 b(b)s(e)g(moun)m(ted.)275 1005 y(A)75 b(lo)s(cal)h(moun)m +(t)f(p)s(oin)m(t,)86 b Fp(${fs})p Fx(,)f Ft(must)g Fx(b)s(e)74 +b(sp)s(eci\014ed.)174 b(The)74 b(default)i(lo)s(cal)g(moun)m(t)150 +1115 y(p)s(oin)m(t)81 b(will)g(not)g(w)m(ork)g(correctly)i(in)d(the)h +(general)h(case.)194 b(A)81 b(suggestion)h(is)f(to)g(use)150 +1224 y(`)p Fp(fs:=${autodir}/${rhost}/r)o(oot)p Fx('.)150 +1455 y Fw(5.4)68 b(Unix)45 b(Filesystem)i(\(`)p Fi(ufs)p +Fw(',)d(`)p Fi(xfs)p Fw(',)h(or)g(`)p Fi(efs)p Fw('\))150 +1615 y Fx(The)54 b Fo(ufs)j Fx(\(`)p Fp(type:=ufs)p Fx('\))c +(\014lesystem)i(t)m(yp)s(e)f(pro)m(vides)h(access)g(to)h(the)e +(system's)h(standard)e(disk)150 1724 y(\014lesystem|usually)30 +b(a)h(deriv)-5 b(ativ)m(e)32 b(of)f(the)f(Berk)m(eley)i(F)-8 +b(ast)32 b(Filesystem.)150 1858 y(The)e(follo)m(wing)i(option)f(m)m +(ust)f(b)s(e)g(sp)s(eci\014ed:)150 2016 y Fp(dev)336 +b Fx(the)31 b(blo)s(c)m(k)f(sp)s(ecial)h(device)h(to)f(b)s(e)f(moun)m +(ted.)275 2174 y(A)g(UFS)g(en)m(try)h(migh)m(t)g(b)s(e:)390 +2308 y Fp(jsp)142 b(host==charm;type:=ufs;dev:)o(=/d)o(ev/s)o(d0d;)o +(sub)o(link)o(:=js)o(p)275 2442 y Fx(UFS)42 b(is)h(the)g(default)g +(Unix)g(disk-based)f(\014le)h(system,)j(whic)m(h)d(Am-utils)g(pic)m(ks) +g(up)f(during)g(the)150 2552 y(auto)s(con\014guration)27 +b(phase.)39 b(Some)26 b(systems)g(ha)m(v)m(e)h(more)g(than)e(one)i(t)m +(yp)s(e,)g(suc)m(h)f(as)g(IRIX,)g(that)h(comes)150 2661 +y(with)i(EFS)g(\(Exten)m(t)h(File)h(System\))e(and)g(XFS)g(\(Extended)g +(File)h(System\).)41 b(In)28 b(those)i(cases,)h(y)m(ou)e(ma)m(y)150 +2771 y(explicitly)j(set)f(the)f(\014le)h(system)f(t)m(yp)s(e,)h(b)m(y)f +(using)g(en)m(tries)i(suc)m(h:)390 2905 y Fp(ez1)142 +b(type:=efs;dev:=/dev/xd0a)390 3014 y(ez2)g(type:=xfs;dev:=/dev/sd3c) +275 3148 y Fx(The)32 b(UFS/XFS/EFS)i(\014lesystems)g(are)g(nev)m(er)g +(timed)f(out)h(b)m(y)f(default,)i(i.e.)50 b(they)34 b(will)g(nev)m(er)g +(b)s(e)150 3258 y(unmoun)m(ted)29 b(b)m(y)g Ft(A)n(md)p +Fx(.)41 b(If)29 b(automatic)j(unmoun)m(ting)d(is)g(desired,)h(the)g +(\\unmoun)m(t")g(option)g(should)f(b)s(e)150 3367 y(added)h(to)h(the)f +(moun)m(t)h(options)f(for)h(the)f(en)m(try)-8 b(.)150 +3599 y Fw(5.5)68 b(Cac)l(hing)46 b(Filesystem)g(\(`)p +Fi(cachefs)p Fw('\))150 3758 y Fx(The)30 b Fo(cac)m(hefs)35 +b Fx(\(`)p Fp(type:=cachefs)p Fx('\))28 b(\014lesystem)j(cac)m(hes)h +(\014les)e(from)g(one)h(lo)s(cation)h(on)m(to)f(another,)g(pre-)150 +3868 y(sumably)d(pro)m(viding)h(faster)g(access.)42 b(It)29 +b(is)g(particularly)h(useful)e(to)i(cac)m(he)g(from)f(a)g(larger)h(and) +e(remote)150 3977 y(\(slo)m(w)m(er\))k(NFS)f(partition)g(to)g(a)f +(smaller)h(and)f(lo)s(cal)i(\(faster\))f(UFS)g(directory)-8 +b(.)150 4111 y(The)30 b(follo)m(wing)i(options)e(m)m(ust)h(b)s(e)e(sp)s +(eci\014ed:)150 4269 y Fp(cachedir)96 b Fx(the)31 b(directory)f(where)g +(the)h(cac)m(he)h(is)e(stored.)150 4427 y Fp(rfs)336 +b Fx(the)31 b(path)f(name)g(to)h(the)g(\\bac)m(k)g(\014le)g(system")g +(to)g(b)s(e)f(cac)m(hed)h(from.)150 4585 y Fp(fs)384 +b Fx(the)35 b(\\fron)m(t)g(\014le)g(system")g(moun)m(t)g(p)s(oin)m(t)f +(to)i(the)f(cac)m(hed)g(\014les,)h(where)e Ft(A)n(md)44 +b Fx(will)35 b(set)h(a)630 4695 y(sym)m(b)s(olic)31 b(link)f(p)s(oin)m +(ting)h(to.)275 4853 y(A)f(Cac)m(heFS)h(en)m(try)g(for,)f(sa)m(y)-8 +b(,)32 b(the)e Fp(/import)f Ft(A)n(md)40 b Fx(moun)m(t)30 +b(p)s(oin)m(t,)h(migh)m(t)g(b)s(e:)390 4987 y Fp(copt)94 +b(type:=cachefs;cachedir:=/c)o(ach)o(e;rf)o(s:=/)o(imp)o(ort/)o(opt;)o +(fs:)o(=/n/)o(impo)o(rt/)o(copt)275 5121 y Fx(Access)33 +b(to)f(the)h(pathname)f Fp(/import/copt)c Fx(will)33 +b(follo)m(w)g(a)f(sym)m(b)s(olic)h(link)f(to)h Fp(/n/import/copt)p +Fx(.)150 5230 y(The)g(latter)i(is)f(the)g(moun)m(t)g(p)s(oin)m(t)g(for) +f(a)h(cac)m(hing)i(\014le)e(system,)h(that)f(cac)m(hes)h(from)e +Fp(/import/opt)e Fx(to)150 5340 y Fp(/cache)p Fx(.)p +eop end +%%Page: 50 52 +TeXDict begin 50 51 bop 150 -116 a Fx(50)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(The)f(cac)m(hefs)i +(\014lesystem)f(is)g(nev)m(er)g(timed)g(out)h(b)m(y)e(default,)i(i.e.) +41 b(it)31 b(will)f(nev)m(er)g(b)s(e)f(unmoun)m(ted)g(b)m(y)150 +408 y Ft(A)n(md)p Fx(.)53 b(If)34 b(automatic)i(unmoun)m(ting)e(is)g +(desired,)h(the)g(\\unmoun)m(t")f(option)h(should)e(b)s(e)h(added)g(to) +h(the)150 518 y(moun)m(t)30 b(options)h(for)f(the)h(en)m(try)-8 +b(.)275 652 y Fn(Ca)m(v)m(eats)p Fx(:)199 787 y(1.)61 +b(This)30 b(\014le)g(system)h(is)f(curren)m(tly)g(only)h(implemen)m +(ted)g(for)f(Solaris)h(2.x!)199 921 y(2.)61 b(Before)49 +b(b)s(eing)e(used)g(for)g(the)h(\014rst)f(time,)53 b(the)48 +b(cac)m(he)i(directory)e Ft(must)57 b Fx(b)s(e)47 b(initialized)i(with) +330 1031 y(`)p Fp(cfsadmin)28 b(-c)i Fk(cachedir)p Fx('.)69 +b(See)41 b(the)g(man)m(ual)f(page)i(for)e Fn(cfsadmin)p +Fx(\(1M\))h(for)f(more)h(informa-)330 1140 y(tion.)199 +1274 y(3.)61 b(The)37 b(\\bac)m(k)h(\014le)f(system")h(moun)m(ted)f(m)m +(ust)g(b)s(e)g(a)h(complete)g(\014le)g(system,)h(not)e(a)h(sub)s +(directory)330 1384 y(thereof;)31 b(otherwise)g(y)m(ou)g(will)f(get)i +(an)e(error)g(\\In)m(v)-5 b(alid)31 b(Argumen)m(t".)199 +1518 y(4.)61 b(If)22 b Ft(A)n(md)32 b Fx(ab)s(orts)23 +b(abnormally)-8 b(,)25 b(the)e(state)h(of)e(the)h(cac)m(he)i(ma)m(y)e +(b)s(e)f(inconsisten)m(t,)j(requiring)e(running)330 1628 +y(the)k(command)g Fp(fsck)i(-F)h(cachefs)e Fk(cachedir)p +Fx(.)38 b(Otherwise)27 b(y)m(ou)g(will)g(get)i(the)e(error)g(\\No)h +(Space)330 1737 y(Left)j(on)f(Device".)150 1970 y Fw(5.6)68 +b(CD-R)l(OM)45 b(Filesystem)h(\(`)p Fi(cdfs)p Fw('\))150 +2129 y Fx(The)28 b Fo(cdfs)33 b Fx(\(`)p Fp(type:=cdfs)p +Fx('\))27 b(\014lesystem)i(moun)m(ts)g(a)g(CD-R)m(OM)h(with)f(an)g +(ISO9660)g(format)h(\014lesystem)150 2239 y(on)g(it.)150 +2373 y(The)g(follo)m(wing)i(option)f(m)m(ust)f(b)s(e)g(sp)s(eci\014ed:) +150 2532 y Fp(dev)336 b Fx(the)31 b(blo)s(c)m(k)f(sp)s(ecial)h(device)h +(to)f(b)s(e)f(moun)m(ted.)275 2691 y(Some)f(op)s(erating)h(systems)g +(will)f(fail)i(to)f(moun)m(t)f(read-only)h(CDs)g(unless)e(the)i(`)p +Fp(ro)p Fx(')f(option)h(is)g(sp)s(ec-)150 2800 y(i\014ed.)40 +b(A)31 b(cdfs)f(en)m(try)g(migh)m(t)h(b)s(e:)390 2935 +y Fp(cdfs)285 b(os==sunos4;type:=cdfs;dev)o(:=/d)o(ev/s)o(r0)41 +b(\\)867 3044 y(os==sunos5;addopts:=ro;ty)o(pe:=)o(cdfs)o(;de)o(v:=/)o +(dev/)o(dsk)o(/c0t)o(6d0s)o(2)150 3276 y Fw(5.7)68 b(CD-R)l(OM)45 +b(Filesystem)h(\(`)p Fi(udf)p Fw('\))150 3436 y Fx(The)f +Fo(udf)62 b Fx(\(`)p Fp(type:=udf)p Fx('\))44 b(\014lesystem)i(moun)m +(ts)g(media)g(with)f(a)h(Univ)m(ersal)g(Disk)g(F)-8 b(ormat)47 +b(\(UDF\))150 3545 y(\014lesystem)31 b(on)f(it,)h(e.g.,)h(a)f(video)g +(D)m(VD.)150 3680 y(The)f(follo)m(wing)i(option)f(m)m(ust)f(b)s(e)g(sp) +s(eci\014ed:)150 3839 y Fp(dev)336 b Fx(the)31 b(blo)s(c)m(k)f(sp)s +(ecial)h(device)h(to)f(b)s(e)f(moun)m(ted.)275 3998 y(Some)42 +b(op)s(erating)g(systems)g(will)h(fail)f(to)h(moun)m(t)f(read-only)h +(media)f(unless)f(the)h(`)p Fp(ro)p Fx(')g(option)h(is)150 +4107 y(sp)s(eci\014ed.)d(A)31 b(udf)e(en)m(try)h(migh)m(t)h(b)s(e:)390 +4242 y Fp(udf)286 b(os==sunos4;type:=udf;de)o(v:=)o(/dev)o(/sr0)41 +b(\\)820 4351 y(os==sunos5;addopts:=ro;)o(typ)o(e:=u)o(df;d)o(ev:)o +(=/de)o(v/ds)o(k/c)o(0t6d)o(0s2)150 4583 y Fw(5.8)68 +b(Lo)t(opbac)l(k)45 b(Filesystem)h(\(`)p Fi(lofs)p Fw('\))150 +4743 y Fx(The)f Fo(lofs)k Fx(\(`)p Fp(type:=lofs)p Fx('\))44 +b(\014lesystem)i(is)f(also)i(called)f(the)g(lo)s(opbac)m(k)g +(\014lesystem.)87 b(It)45 b(moun)m(ts)h(a)150 4852 y(lo)s(cal)34 +b(directory)f(on)f(another,)i(th)m(us)e(pro)m(viding)h(moun)m(t-time)g +(binding)f(to)h(another)g(lo)s(cation)h(\(unlik)m(e)150 +4962 y(sym)m(b)s(olic)d(links\).)275 5096 y(The)25 b(lo)s(opbac)m(k)h +(\014lesystem)g(is)f(particularly)i(useful)d(within)h(the)h(con)m(text) +h(of)f(a)g(c)m(hro)s(ot-ed)g(directory)150 5206 y(\(via)31 +b Fn(c)m(hro)s(ot)p Fx(\(2\)\),)j(to)d(pro)m(vide)f(access)i(to)f +(directories)g(otherwise)g(inaccessible.)150 5340 y(The)f(follo)m(wing) +i(option)f(m)m(ust)f(b)s(e)g(sp)s(eci\014ed:)p eop end +%%Page: 51 53 +TeXDict begin 51 52 bop 150 -116 a Fx(Chapter)30 b(5:)41 +b(Filesystem)32 b(T)m(yp)s(es)2351 b(51)150 299 y Fp(rfs)336 +b Fx(the)31 b(pathname)f(to)h(b)s(e)f(moun)m(ted)g(on)g(top)h(of)f +Fp(${fs})p Fx(.)275 461 y(Usually)-8 b(,)36 b(the)e(FTP)g(serv)m(er)h +(runs)e(in)h(a)g(c)m(hro)s(ot-ed)i(en)m(vironmen)m(t,)g(for)e(securit)m +(y)h(reasons.)52 b(In)34 b(this)150 571 y(example,)27 +b(lofs)f(is)g(used)e(to)j(pro)m(vide)e(a)h(sub)s(directory)e(within)h +(a)h(user's)f(home)h(directory)-8 b(,)27 b(also)g(a)m(v)-5 +b(ailable)150 680 y(for)30 b(public)g(ftp.)390 817 y +Fp(lofs)285 b(type:=lofs;rfs:=/home/ezk)o(/myf)o(tpdi)o(r;f)o(s:=/)o +(usr/)o(ftp)o(/pub)o(/ezk)150 1052 y Fw(5.9)68 b(Memory/RAM)45 +b(Filesystem)h(\(`)p Fi(mfs)p Fw('\))150 1211 y Fx(The)c +Fo(mfs)k Fx(\(`)p Fp(type:=mfs)p Fx('\))41 b(\014lesystem)i(is)g(a)m(v) +-5 b(ailable)45 b(in)d(4.4BSD,)i(Lin)m(ux,)i(and)c(other)g(systems.)78 +b(It)150 1321 y(creates)47 b(a)e(\014lesystem)h(in)f(a)h(p)s(ortion)f +(of)g(the)h(system's)f(memory)-8 b(,)50 b(th)m(us)45 +b(pro)m(viding)g(v)m(ery)h(fast)g(\014le)150 1430 y(\(v)m(olatile\))34 +b(access.)275 1567 y(XXX:)d(THIS)e(FILESYSTEM)g(IS)h(NOT)g(IMPLEMENTED) +g(YET!)150 1802 y Fw(5.10)68 b(Null)46 b(Filesystem)g(\(`)p +Fi(nullfs)p Fw('\))150 1961 y Fx(The)29 b Fo(n)m(ullfs)j +Fx(\(`)p Fp(type:=nullfs)p Fx('\))27 b(\014lesystem)j(is)f(a)m(v)-5 +b(ailable)31 b(from)e(4.4BSD,)i(and)e(is)g(v)m(ery)g(similar)h(to)g +(the)150 2071 y(lo)s(opbac)m(k)h(\014lesystem,)g Fo(lofs)p +Fx(.)275 2207 y(XXX:)g(THIS)e(FILESYSTEM)g(IS)h(NOT)g(IMPLEMENTED)g +(YET!)150 2443 y Fw(5.11)68 b(Flopp)l(y)45 b(Filesystem)h(\(`)p +Fi(pcfs)p Fw('\))150 2602 y Fx(The)30 b Fo(p)s(cfs)j +Fx(\(`)p Fp(type:=pcfs)p Fx('\))28 b(\014lesystem)j(moun)m(ts)f(a)g +(\015opp)m(y)g(previously)g(formatted)h(for)f(the)g(MS-DOS)150 +2712 y(format.)150 2848 y(The)g(follo)m(wing)i(option)f(m)m(ust)f(b)s +(e)g(sp)s(eci\014ed:)150 3010 y Fp(dev)336 b Fx(the)31 +b(blo)s(c)m(k)f(sp)s(ecial)h(device)h(to)f(b)s(e)f(moun)m(ted.)275 +3172 y(A)g(p)s(cfs)f(en)m(try)i(migh)m(t)g(b)s(e:)390 +3309 y Fp(pcfs)285 b(os==sunos4;type:=pcfs;dev)o(:=/d)o(ev/f)o(d0)41 +b(\\)867 3418 y(os==sunos5;type:=pcfs;dev)o(:=/d)o(ev/d)o(isk)o(ette) +150 3653 y Fw(5.12)68 b(T)-11 b(ranslucen)l(t)45 b(Filesystem)h(\(`)p +Fi(tfs)p Fw('\))150 3813 y Fx(The)30 b Fo(tfs)k Fx(\(`)p +Fp(type:=tfs)p Fx('\))29 b(\014lesystem)i(is)f(an)g(older)h(v)m(ersion) +g(of)f(the)h(4.4BSD)h Fo(unionfs)p Fx(.)275 3949 y(XXX:)f(THIS)e +(FILESYSTEM)g(IS)h(NOT)g(IMPLEMENTED)g(YET!)150 4184 +y Fw(5.13)68 b(Shared)45 b(Memory)p Fi(+)p Fw(Sw)l(ap)g(Filesystem)h +(\(`)p Fi(tmpfs)p Fw('\))150 4344 y Fx(The)34 b Fo(tmpfs)j +Fx(\(`)p Fp(type:=tmpfs)p Fx('\))c(\014lesystem)h(shares)g(memory)g(b)s +(et)m(w)m(een)h(a)g(the)g(sw)m(ap)f(device)h(and)f(the)150 +4453 y(rest)27 b(of)f(the)h(system.)39 b(It)27 b(is)f(generally)i(used) +d(to)i(pro)m(vide)g(a)g(fast)f(access)i Fp(/tmp)d Fx(directory)-8 +b(,)29 b(one)d(that)h(uses)150 4563 y(memory)j(that)h(is)g(otherwise)f +(un)m(used.)40 b(This)29 b(\014lesystem)i(is)g(a)m(v)-5 +b(ailable)32 b(in)e(SunOS)e(4.x)j(and)f(5.x.)275 4699 +y(XXX:)h(THIS)e(FILESYSTEM)g(IS)h(NOT)g(IMPLEMENTED)g(YET!)150 +4935 y Fw(5.14)68 b(User)46 b(ID)f(Mapping)f(Filesystem)j(\(`)p +Fi(umapfs)p Fw('\))150 5094 y Fx(The)32 b Fo(umapfs)i +Fx(\(`)p Fp(type:=umapfs)p Fx('\))c(\014lesystem)i(maps)g(User)g(IDs)g +(of)g(\014le)g(o)m(wnership,)g(and)f(is)i(a)m(v)-5 b(ailable)150 +5204 y(from)30 b(4.4BSD.)275 5340 y(XXX:)h(THIS)e(FILESYSTEM)g(IS)h +(NOT)g(IMPLEMENTED)g(YET!)p eop end +%%Page: 52 54 +TeXDict begin 52 53 bop 150 -116 a Fx(52)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fw(5.15)68 +b(Program)46 b(Filesystem)g(\(`)p Fi(program)p Fw('\))150 +458 y Fx(The)38 b Fo(program)g Fx(\(`)p Fp(type:=program)p +Fx('\))e(\014lesystem)j(t)m(yp)s(e)g(allo)m(ws)h(a)f(program)f(to)h(b)s +(e)f(run)f(whenev)m(er)i(a)150 568 y(moun)m(t)e(or)f(unmoun)m(t)g(is)g +(required.)59 b(This)35 b(allo)m(ws)j(easy)f(addition)g(of)g(supp)s +(ort)e(for)h(other)h(\014lesystem)150 677 y(t)m(yp)s(es,)32 +b(suc)m(h)g(as)g(MIT's)f(Remote)i(Virtual)f(Disk)h(\(R)-10 +b(VD\))32 b(whic)m(h)g(has)f(a)h(programmatic)h(in)m(terface)g(via)150 +787 y(the)e(commands)f(`)p Fp(rvdmount)p Fx(')e(and)i(`)p +Fp(rvdunmount)p Fx('.)150 917 y(Both)h(of)g(the)f(follo)m(wing)i +(options)f(m)m(ust)f(b)s(e)g(sp)s(eci\014ed:)150 1069 +y Fp(mount)240 b Fx(the)31 b(program)f(whic)m(h)g(will)h(p)s(erform)d +(the)j(moun)m(t.)150 1220 y Fp(unmount)150 1371 y(umount)192 +b Fx(the)25 b(program)g(whic)m(h)f(will)h(p)s(erform)e(the)i(unmoun)m +(t.)38 b(F)-8 b(or)26 b(con)m(v)m(enience,)i(y)m(ou)d(ma)m(y)h(use)e +(ei-)630 1481 y(ther)i(`)p Fp(unmount)p Fx(')g(or)g(`)p +Fp(umount)p Fx(')g(but)f(not)i(b)s(oth.)39 b(If)26 b(neither)h(is)f +(de\014ned,)h Ft(A)n(md)36 b Fx(will)27 b(default)630 +1591 y(to)37 b(`)p Fp(umount)28 b(${fs})p Fx(')35 b(\(the)h(actual)i +(unmoun)m(t)c(program)i(pathname)g(will)g(b)s(e)f(automati-)630 +1700 y(cally)d(determined)e(at)h(the)f(time)h(GNU)g Fp(configure)d +Fx(runs.\))275 1851 y(The)23 b(exit)h(co)s(de)g(from)f(these)h(t)m(w)m +(o)h(programs)e(is)h(in)m(terpreted)g(as)g(a)f(Unix)h(error)f(co)s(de.) +39 b(As)23 b(usual,)i(exit)150 1961 y(co)s(de)33 b(zero)g(indicates)h +(success.)47 b(T)-8 b(o)33 b(execute)h(the)f(program,)g +Ft(A)n(md)42 b Fx(splits)32 b(the)h(string)g(on)f(whitespace)150 +2071 y(to)h(create)h(an)e(arra)m(y)h(of)g(substrings.)45 +b(Single)33 b(quotes)f(`)p Fp(')p Fx(')h(can)g(b)s(e)e(used)h(to)h +(quote)g(whitespace)g(if)f(that)150 2180 y(is)27 b(required)g(in)g(an)g +(argumen)m(t.)40 b(There)27 b(is)g(no)g(w)m(a)m(y)h(to)g(escap)s(e)g +(or)f(c)m(hange)i(the)e(single)h(quote)g(c)m(haracter.)275 +2311 y(T)-8 b(o)34 b(run)e(e.g.)53 b(the)34 b(program)f(`)p +Fp(rvdmount)p Fx(')g(with)g(a)h(host)g(name)g(and)g(\014lesystem)g(as)g +(argumen)m(ts,)h(it)150 2420 y(w)m(ould)23 b(b)s(e)g(sp)s(eci\014ed)g +(b)m(y)g(`)p Fp(fs:=${autodir}${path};type)o(:=pr)o(ogra)o(m;m)o(ount)o +(:="/)o(etc)o(/rvd)o(moun)o(t)150 2530 y(rvdmount)28 +b(fserver)h(${fs}";unmount:="/etc/)o(rdvu)o(moun)o(t)24 +b(rvdumount)k(${fs}")p Fx('.)275 2660 y(The)41 b(\014rst)h(elemen)m(t)h +(in)f(the)h(arra)m(y)f(is)h(tak)m(en)g(as)f(the)h(pathname)f(of)g(the)g +(program)g(to)h(execute.)150 2770 y(The)36 b(other)h(mem)m(b)s(ers)e +(of)i(the)g(arra)m(y)g(form)f(the)g(argumen)m(t)h(v)m(ector)h(to)f(b)s +(e)f(passed)g(to)h(the)g(program,)150 2879 y Fo(including)30 +b(argumen)m(t)i(zero)p Fx(.)43 b(The)30 b(arra)m(y)h(is)g(exactly)i +(the)e(same)g(as)g(the)g(arra)m(y)g(passed)g(to)g(the)g(execv\(\))150 +2989 y(system)g(call)h(\(man)f(execv)h(for)e(details\).)43 +b(The)30 b(split)h(string)g(m)m(ust)g(ha)m(v)m(e)h(at)f(least)h(t)m(w)m +(o)g(elemen)m(ts.)43 b(The)150 3099 y(programs)29 b(are)i(directly)f +(executed)h(b)m(y)e Ft(A)n(md)p Fx(,)h(not)h(via)f(a)g(shell.)41 +b(Therefore,)30 b(if)f(a)i(script)e(is)h(to)h(b)s(e)e(used)150 +3208 y(as)i(a)f(moun)m(t/umoun)m(t)h(program,)f(it)h +Fo(m)m(ust)h Fx(b)s(egin)e(with)g(a)h Fp(#!)f Fx(in)m(terpreter)h(sp)s +(eci\014cation.)275 3339 y(Often,)23 b(this)f(program)f(moun)m(t)h(t)m +(yp)s(e)g(is)g(used)f(for)h(Sam)m(ba)g(moun)m(ts,)h(where)f(y)m(ou)g +(need)f(a)i(double)e(slash)150 3448 y(in)37 b(pathnames.)59 +b(Ho)m(w)m(ev)m(er,)41 b Ft(A)n(md)46 b Fx(normalizes)38 +b(sequences)f(of)g(slashes)g(in)m(to)h(one)f(slash.)60 +b(Therefore,)150 3558 y(y)m(ou)29 b(m)m(ust)g(use)f(an)h(escap)s(ed)g +(slash,)g(preceded)f(b)m(y)h(an)g(escap)s(ed)g(bac)m(kslash.)40 +b(So)29 b(to)h(get)g(a)f(double)f(slash)150 3667 y(in)38 +b(the)g(moun)m(t)g(command,)i(y)m(ou)e(need)g(the)g(eigh)m(t)h(c)m +(haracter)h(sequence)e(`)p Fp(\\\\\\/\\\\\\/)p Fx(')e(in)i(y)m(our)g +(map.)150 3777 y(F)-8 b(or)31 b(example:)275 3907 y(`)p +Fp(mount="/sbin/mount)25 b(mount)k(-r)h(-t)g(smbfs)f(-o-N,-Ihostname)d +(\\\\\\/\\\\\\/guest@venus/mp3)o(")p Fx(')p 3895 3928 +42 84 v 275 4038 a(If)j(a)h(\014lesystem)g(t)m(yp)s(e)g(is)g(to)h(b)s +(e)e(hea)m(vily)i(used,)f(it)g(ma)m(y)h(b)s(e)e(w)m(orth)m(while)h +(adding)g(a)g(new)g(\014lesystem)150 4147 y(t)m(yp)s(e)h(in)m(to)g +Ft(A)n(md)p Fx(,)g(but)e(for)h(most)h(uses)f(the)h(program)f +(\014lesystem)g(should)g(su\016ce.)275 4278 y(When)39 +b(the)i(program)e(is)h(run,)i(standard)d(input)g(and)g(standard)g +(error)h(are)g(inherited)g(from)g(the)150 4387 y(curren)m(t)32 +b(v)-5 b(alues)33 b(used)f(b)m(y)h Ft(A)n(md)p Fx(.)48 +b(Standard)31 b(output)h(is)h(a)g(duplicate)g(of)g(standard)f(error.)47 +b(The)32 b(v)-5 b(alue)150 4497 y(sp)s(eci\014ed)30 b(with)g(the)g +Fp(-l)g Fx(command)g(line)h(option)g(has)f(no)g(e\013ect)i(on)e +(standard)g(error.)275 4627 y Ft(A)n(md)37 b Fx(guaran)m(tees)30 +b(that)f(the)f(moun)m(tp)s(oin)m(t)h(will)f(b)s(e)g(created)h(b)s +(efore)f(calling)i(the)f(moun)m(t)f(program,)150 4737 +y(and)i(that)h(it)g(will)f(b)s(e)g(remo)m(v)m(ed)h(after)g(the)g(umoun) +m(t)f(program)g(returns)f(success.)150 4961 y Fw(5.16)68 +b(Sym)l(b)t(olic)45 b(Link)g(Filesystem)h(\(`)p Fi(link)p +Fw('\))150 5121 y Fx(Eac)m(h)28 b(\014lesystem)g(t)m(yp)s(e)f(creates)i +(a)f(sym)m(b)s(olic)f(link)h(to)g(p)s(oin)m(t)f(from)g(the)g(v)m(olume) +h(name)g(to)g(the)f(ph)m(ysical)150 5230 y(moun)m(t)40 +b(p)s(oin)m(t.)68 b(The)39 b(`)p Fp(link)p Fx(')g(\014lesystem)h(do)s +(es)g(the)g(same)g(without)f(an)m(y)h(other)g(side)g(e\013ects.)70 +b(This)150 5340 y(allo)m(ws)32 b(an)m(y)e(part)h(of)f(the)h(mac)m +(hines)g(name)f(space)h(to)g(b)s(e)f(accessed)h(via)g +Ft(A)n(md)p Fx(.)p eop end +%%Page: 53 55 +TeXDict begin 53 54 bop 150 -116 a Fx(Chapter)30 b(5:)41 +b(Filesystem)32 b(T)m(yp)s(es)2351 b(53)275 299 y(One)28 +b(common)i(use)f(for)f(the)i(symlink)e(\014lesystem)i(is)f +Fp(/homes)f Fx(whic)m(h)g(can)i(b)s(e)e(made)i(to)g(con)m(tain)g(an)150 +408 y(en)m(try)38 b(for)g(eac)m(h)h(user)e(whic)m(h)g(p)s(oin)m(ts)h +(to)h(their)f(\(auto-moun)m(ted\))h(home)f(directory)-8 +b(.)64 b(Although)38 b(this)150 518 y(ma)m(y)31 b(seem)g(rather)f(exp)s +(ensiv)m(e,)h(it)g(pro)m(vides)f(a)h(great)g(deal)g(of)g(administrativ) +m(e)h(\015exibilit)m(y)-8 b(.)150 654 y(The)30 b(follo)m(wing)i(option) +f(m)m(ust)f(b)s(e)g(de\014ned:)150 815 y Fp(fs)384 b +Fx(The)32 b(v)-5 b(alue)34 b(of)f Fo(fs)j Fx(option)d(sp)s(eci\014es)g +(the)g(destination)g(of)g(the)h(link,)f(as)g(mo)s(di\014ed)f(b)m(y)h +(the)630 925 y Fo(sublink)26 b Fx(option.)38 b(If)22 +b Fo(sublink)k Fx(is)c(non-n)m(ull,)h(it)f(is)g(app)s(ended)e(to)j +Fp(${fs}/)d Fx(and)h(the)h(resulting)630 1034 y(string)30 +b(is)h(used)e(as)i(the)g(target.)275 1196 y(The)f(`)p +Fp(link)p Fx(')f(\014lesystem)i(can)g(b)s(e)f(though)m(t)h(of)g(as)g +(iden)m(tical)h(to)f(the)g(`)p Fp(ufs)p Fx(')f(\014lesystem)h(but)f +(without)150 1305 y(actually)i(moun)m(ting)f(an)m(ything.)275 +1441 y(An)f(example)h(en)m(try)f(migh)m(t)h(b)s(e:)390 +1577 y Fp(jsp)142 b(host==charm;type:=link;fs:)o(=/h)o(ome/)o(char)o +(m;s)o(ubli)o(nk:=)o(jsp)275 1713 y Fx(whic)m(h)30 b(w)m(ould)g(return) +f(a)i(sym)m(b)s(olic)g(link)f(p)s(oin)m(ting)g(to)i Fp(/home/charm/jsp) +p Fx(.)150 1947 y Fw(5.17)68 b(Sym)l(b)t(olic)45 b(Link)g(Filesystem)h +(I)t(I)f(\(`)p Fi(linkx)p Fw('\))150 2106 y Fx(The)26 +b Fo(linkx)32 b Fx(\(`)p Fp(type:=linkx)p Fx('\))25 b(\014lesystem)h(t) +m(yp)s(e)h(is)f(iden)m(tical)i(to)f(`)p Fp(link)p Fx(')f(with)g(the)g +(exception)i(that)f(the)150 2216 y(target)32 b(of)e(the)h(link)f(m)m +(ust)h(exist.)41 b(Existence)31 b(is)g(c)m(hec)m(k)m(ed)h(with)e(the)h +Fn(lstat)p Fx(\(2\))i(system)d(call.)275 2352 y(The)e(`)p +Fp(linkx)p Fx(')h(\014lesystem)g(t)m(yp)s(e)h(is)f(particularly)h +(useful)f(for)g(wildcard)g(map)g(en)m(tries.)41 b(In)28 +b(this)i(case,)150 2461 y(a)e(list)h(of)f(p)s(ossible)g(targets)h(can)g +(b)s(e)e(giv)m(en)i(and)f Ft(A)n(md)37 b Fx(will)28 b(c)m(ho)s(ose)h +(the)g(\014rst)e(one)h(whic)m(h)g(exists)h(on)f(the)150 +2571 y(lo)s(cal)k(mac)m(hine.)150 2805 y Fw(5.18)68 b(NFS-Link)44 +b(Filesystem)j(\(`)p Fi(nfsl)p Fw('\))150 2965 y Fx(The)34 +b Fo(nfsl)j Fx(\(`)p Fp(type:=nfsl)p Fx('\))32 b(\014lesystem)j(t)m(yp) +s(e)f(is)g(a)h(com)m(bination)g(of)f(t)m(w)m(o)i(others:)48 +b(`)p Fp(link)p Fx(')34 b(and)f(`)p Fp(nfs)p Fx('.)150 +3074 y(If)j(the)h(lo)s(cal)i(host)d(name)h(is)g(equal)h(to)f(the)g(v)-5 +b(alue)37 b(of)g Fp(${rhost})e Ft(and)47 b Fx(the)37 +b(target)i(pathname)d(listed)150 3184 y(in)h Fp(${fs})g +Fx(exists,)j(`)p Fp(nfsl)p Fx(')d(will)i(b)s(eha)m(v)m(e)f(exactly)h +(as)f(`)p Fp(type:=link)p Fx(',)g(and)f(refer)h(to)g(the)g(target)i(as) +e(a)150 3294 y(sym)m(b)s(olic)24 b(link.)38 b(If)24 b(the)f(lo)s(cal)i +(host)f(name)g(is)f(not)h(equal)g(to)h(the)f(v)-5 b(alue)24 +b(of)g Fp(${rhost})p Fx(,)f(or)g(if)h(the)g(target)h(of)150 +3403 y(the)f(link)f(do)s(es)g(not)h(exist,)i Ft(A)n(md)33 +b Fx(will)23 b(treat)i(it)f(as)g(`)p Fp(type:=nfs)p Fx(',)f(and)g(will) +g(moun)m(t)h(a)g(remote)g(pathname)150 3513 y(for)30 +b(it.)275 3649 y(The)23 b(`)p Fp(nfsl)p Fx(')h(\014lesystem)g(t)m(yp)s +(e)g(is)g(particularly)h(useful)e(as)i(a)f(shorthand)f(for)h(the)g +(more)g(cum)m(b)s(ersome)150 3758 y(and)g(y)m(et)i(one)g(of)f(the)g +(most)g(p)s(opular)f Ft(A)n(md)34 b Fx(en)m(tries.)40 +b(F)-8 b(or)26 b(example,)h(y)m(ou)e(can)g(simplify)g(all)h(map)e(en)m +(tries)150 3868 y(that)31 b(lo)s(ok)g(lik)m(e:)390 4004 +y Fp(zing)190 b(-fs:=/n/shekel/u/zing)42 b(\\)772 4113 +y(host!=shekel;type:=nfs;r)o(hos)o(t:=s)o(heke)o(l;r)o(fs:=)o(${fs)o(}) +g(\\)772 4223 y(host==shekel;type:=link)275 4358 y Fx(or)390 +4494 y Fp(zing)190 b(-fs:=/n/shekel/u/zing)42 b(\\)772 +4604 y(exists\(${fs}\);type:=link)f(\\)772 4713 y +(!exists\(${fs}\);type:=nfs)o(;rh)o(ost:)o(=she)o(kel)o(;rfs)o(:=${)o +(fs})275 4849 y Fx(in)m(to)31 b(a)g(shorter)f(form)390 +4985 y Fp(zing)190 b(type:=nfsl;fs:=/n/shekel)o(/u/)o(zing)o(;rho)o +(st:)o(=she)o(kel;)o(rfs)o(:=${)o(fs})275 5121 y Fx(Not)27 +b(just)f(do)s(es)g(it)h(mak)m(e)g(the)g(maps)f(smaller)h(and)f +(simpler,)h(but)f(it)h(a)m(v)m(oids)h(p)s(ossible)e(mistak)m(es)h(that) +150 5230 y(often)k(happ)s(en)d(when)i(forgetting)i(to)f(set)g(up)e(the) +h(t)m(w)m(o)i(en)m(tries)f(\(one)g(for)f(`)p Fp(type:=nfs)p +Fx(')e(and)i(the)h(other)150 5340 y(for)f(`)p Fp(type:=link)p +Fx('\))f(necessary)h(to)h(p)s(erform)e(transparen)m(t)i(moun)m(ts)f(of) +h(existing)g(or)f(remote)i(moun)m(ts.)p eop end +%%Page: 54 56 +TeXDict begin 54 55 bop 150 -116 a Fx(54)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fw(5.19)68 +b(Automoun)l(t)45 b(Filesystem)i(\(`)p Fi(auto)p Fw('\))150 +458 y Fx(The)29 b Fo(auto)36 b Fx(\(`)p Fp(type:=auto)p +Fx('\))28 b(\014lesystem)i(t)m(yp)s(e)g(creates)i(a)e(new)f(automoun)m +(t)i(p)s(oin)m(t)f(b)s(elo)m(w)g(an)g(existing)150 568 +y(automoun)m(t)41 b(p)s(oin)m(t.)72 b(T)-8 b(op-lev)m(el)43 +b(automoun)m(t)f(p)s(oin)m(ts)e(app)s(ear)g(as)h(system)g(moun)m(t)g(p) +s(oin)m(ts.)71 b(An)41 b(au-)150 677 y(tomoun)m(t)36 +b(moun)m(t)f(p)s(oin)m(t)g(can)g(also)h(app)s(ear)e(as)h(a)h +(sub-directory)e(of)h(an)g(existing)h(automoun)m(t)g(p)s(oin)m(t.)150 +787 y(This)28 b(allo)m(ws)h(some)g(additional)g(structure)f(to)h(b)s(e) +f(added,)h(for)f(example)h(to)g(mimic)g(the)f(moun)m(t)h(tree)g(of)150 +897 y(another)i(mac)m(hine.)275 1036 y(The)e(follo)m(wing)j(options)f +(ma)m(y)g(b)s(e)f(sp)s(eci\014ed:)150 1203 y Fp(cache)240 +b Fx(sp)s(eci\014es)36 b(whether)g(the)h(data)g(in)f(this)h(moun)m +(t-map)f(should)g(b)s(e)g(cac)m(hed.)60 b(The)36 b(default)630 +1313 y(v)-5 b(alue)31 b(is)f(`)p Fp(none)p Fx(',)g(in)g(whic)m(h)g +(case)i(no)e(cac)m(hing)i(is)e(done)g(in)g(order)g(to)h(conserv)m(e)h +(memory)-8 b(.)630 1450 y(Ho)m(w)m(ev)m(er,)37 b(b)s(etter)d(p)s +(erformance)g(and)f(reliabilit)m(y)j(can)e(b)s(e)g(obtained)g(b)m(y)g +(cac)m(hing)i(some)630 1559 y(or)30 b(all)i(of)e(a)h(moun)m(t-map.)630 +1696 y(If)22 b(the)g(cac)m(he)i(option)f(sp)s(eci\014es)f(`)p +Fp(all)p Fx(',)i(the)e(en)m(tire)h(map)f(is)h(en)m(umerated)f(when)f +(the)i(moun)m(t)630 1806 y(p)s(oin)m(t)30 b(is)h(created.)630 +1943 y(If)j(the)g(cac)m(he)i(option)f(sp)s(eci\014es)f(`)p +Fp(inc)p Fx(',)h(cac)m(hing)h(is)e(done)g(incremen)m(tally)i(as)e(and)g +(when)630 2052 y(data)g(is)f(required.)49 b(Some)34 b(map)f(t)m(yp)s +(es)g(do)g(not)h(supp)s(ort)d(cac)m(he)k(mo)s(de)e(`)p +Fp(all)p Fx(',)h(in)f(whic)m(h)630 2162 y(case)e(`)p +Fp(inc)p Fx(')f(is)h(used)e(whenev)m(er)i(`)p Fp(all)p +Fx(')f(is)g(requested.)630 2299 y(Cac)m(hing)h(can)g(b)s(e)e(en)m +(tirely)j(disabled)e(b)m(y)g(using)g(cac)m(he)i(mo)s(de)e(`)p +Fp(none)p Fx('.)630 2436 y(If)k(the)g(cac)m(he)i(option)f(sp)s +(eci\014es)f(`)p Fp(regexp)p Fx(')f(then)h(the)g(en)m(tire)h(map)f +(will)h(b)s(e)f(en)m(umerated)630 2545 y(and)j(eac)m(h)h(k)m(ey)g(will) +g(b)s(e)e(treated)i(as)g(an)f(egrep-st)m(yle)i(regular)f(expression.)61 +b(The)36 b(order)630 2655 y(in)c(whic)m(h)h(a)g(cac)m(hed)h(map)e(is)h +(searc)m(hed)g(do)s(es)g(not)g(corresp)s(ond)e(to)j(the)f(ordering)f +(in)h(the)630 2765 y(source)39 b(map)f(so)h(the)g(regular)f +(expressions)h(should)e(b)s(e)h(m)m(utually)h(exclusiv)m(e)h(to)f(a)m +(v)m(oid)630 2874 y(confusion.)630 3011 y(Eac)m(h)g(moun)m(t)f(map)f(t) +m(yp)s(e)i(has)e(a)i(default)f(cac)m(he)i(t)m(yp)s(e,)g(usually)e(`)p +Fp(inc)p Fx(',)h(whic)m(h)f(can)h(b)s(e)630 3121 y(selected)32 +b(b)m(y)e(sp)s(ecifying)g(`)p Fp(mapdefault)p Fx('.)630 +3258 y(The)j(cac)m(he)j(mo)s(de)d(for)h(a)g(moun)m(t)g(map)f(can)h +(only)g(b)s(e)g(selected)h(on)f(the)g(command)f(line.)630 +3367 y(Starting)e Ft(A)n(md)40 b Fx(with)30 b(the)g(command:)870 +3504 y Fp(amd)47 b(/homes)f(hesiod.homes)e(-cache:=inc)630 +3641 y Fx(will)27 b(cause)g(`)p Fp(/homes)p Fx(')f(to)h(b)s(e)f +(automoun)m(ted)i(using)e(the)h Fo(Hesio)s(d)j Fx(name)d(serv)m(er)g +(with)g(lo)s(cal)630 3751 y(incremen)m(tal)32 b(cac)m(hing)f(of)g(all)g +(successfully)g(resolv)m(ed)g(names.)630 3888 y(All)45 +b(cac)m(hed)g(data)g(is)g(forgotten)g(whenev)m(er)g Ft(A)n(md)53 +b Fx(receiv)m(es)46 b(a)f(`)p Fp(SIGHUP)p Fx(')e(signal)i(and,)630 +3998 y(if)g(cac)m(he)h(`)p Fp(all)p Fx(')f(mo)s(de)f(w)m(as)h +(selected,)50 b(the)45 b(cac)m(he)i(will)e(b)s(e)f(reloaded.)84 +b(This)44 b(can)i(b)s(e)630 4107 y(used)36 b(to)i(inform)e +Ft(A)n(md)46 b Fx(that)38 b(a)f(map)g(has)f(b)s(een)h(up)s(dated.)59 +b(In)36 b(addition,)j(whenev)m(er)e(a)630 4217 y(cac)m(he)30 +b(lo)s(okup)e(fails)h(and)f Ft(A)n(md)38 b Fx(needs)28 +b(to)h(examine)g(a)g(map,)f(the)h(map's)f(mo)s(dify)g(time)h(is)630 +4326 y(examined.)40 b(If)28 b(the)h(cac)m(he)h(is)f(out)f(of)h(date)g +(with)f(resp)s(ect)h(to)g(the)g(map)f(then)g(it)h(is)g(\015ushed)630 +4436 y(as)i(if)f(a)h(`)p Fp(SIGHUP)p Fx(')e(had)h(b)s(een)f(receiv)m +(ed.)630 4573 y(An)24 b(additional)i(option)f(\(`)p Fp(sync)p +Fx('\))g(ma)m(y)g(b)s(e)f(sp)s(eci\014ed)h(to)g(force)g +Ft(A)n(md)34 b Fx(to)26 b(c)m(hec)m(k)g(the)f(map's)630 +4682 y(mo)s(dify)h(time)h(whenev)m(er)g(a)g(cac)m(hed)h(en)m(try)f(is)g +(b)s(eing)f(used.)39 b(F)-8 b(or)28 b(example,)g(an)f(incremen-)630 +4792 y(tal,)32 b(sync)m(hronized)e(cac)m(he)i(w)m(ould)e(b)s(e)g +(created)h(b)m(y)f(the)h(follo)m(wing)h(command:)870 +4929 y Fp(amd)47 b(/homes)f(hesiod.homes)e(-cache:=inc,sync)150 +5093 y(fs)384 b Fx(sp)s(eci\014es)30 b(the)h(name)f(of)h(the)f(moun)m +(t)g(map)g(to)i(use)e(for)g(the)g(new)g(moun)m(t)h(p)s(oin)m(t.)630 +5230 y(Arguably)37 b(this)g(should)f(ha)m(v)m(e)i(b)s(een)e(sp)s +(eci\014ed)g(with)h(the)g Fp(${rfs})e Fx(option)j(but)e(w)m(e)i(are)630 +5340 y(no)m(w)30 b(stuc)m(k)h(with)f(it)h(due)f(to)h(historical)h +(acciden)m(t.)p eop end +%%Page: 55 57 +TeXDict begin 55 56 bop 150 -116 a Fx(Chapter)30 b(5:)41 +b(Filesystem)32 b(T)m(yp)s(es)2351 b(55)150 299 y Fp(pref)288 +b Fx(alters)31 b(the)g(name)g(that)g(is)g(lo)s(ok)m(ed)g(up)f(in)g(the) +h(moun)m(t)f(map.)41 b(If)30 b Fp(${pref})p Fx(,)f(the)i +Fo(pre\014x)p Fx(,)f(is)630 408 y(non-n)m(ull)35 b(then)f(it)i(is)f +(prep)s(ended)e(to)i(the)h(name)f(requested)f(b)m(y)h(the)h(k)m(ernel)f +Fo(b)s(efore)40 b Fx(the)630 518 y(map)25 b(is)g(searc)m(hed.)39 +b(The)25 b(default)g(pre\014x)f(is)h(the)g(pre\014x)f(of)h(the)g(paren) +m(t)h(map)e(\(if)i(an)m(y\))f(with)630 628 y(name)33 +b(of)f(the)h(auto)g(no)s(de)f(app)s(ended)f(to)i(it.)47 +b(That)33 b(means)f(if)h(y)m(ou)f(w)m(an)m(t)i(no)e(pre\014x)g(y)m(ou) +630 737 y(m)m(ust)e(sa)m(y)h(so)g(in)f(the)h(map:)40 +b(`)p Fp(pref:=null)p Fx('.)150 898 y Fp(opts)288 b Fx(Normally)-8 +b(,)42 b(`)p Fp(auto)p Fx(')c(st)m(yle)h(maps)f(are)h(not)f(bro)m +(wsable)h(ev)m(en)g(if)f(y)m(ou)h(turn)e(on)h(directory)630 +1007 y(bro)m(wsabilit)m(y)56 b(\(see)g(Section)g(6.4.2)g([bro)m(wsable) +p 2382 1007 28 4 v 41 w(dirs)e(P)m(arameter],)63 b(page)56 +b(60\).)115 b(T)-8 b(o)630 1117 y(enable)73 b(bro)m(wsing)e(en)m(tries) +i(in)f(`)p Fp(auto)p Fx(')f(maps,)83 b(sp)s(ecify)72 +b(`)p Fp(opts:=browsable)p Fx(')c(or)630 1226 y(`)p Fp +(opts:=fullybrowsable)p Fx(')25 b(in)30 b(the)h(description)f(of)h +(this)f(map.)275 1387 y(The)85 b(serv)m(er)h(`)p Fp(dylan.doc.ic.ac.uk) +p Fx(')81 b(has)k(t)m(w)m(o)i(user)e(disks:)151 b(`)p +Fp(/dev/dsk/2s0)p Fx(')83 b(and)150 1497 y(`)p Fp(/dev/dsk/5s0)p +Fx('.)133 b(These)62 b(are)g(accessed)h(as)g(`)p Fp(/home/dylan/dk2)p +Fx(')58 b(and)k(`)p Fp(/home/dylan/dk5)p Fx(')150 1606 +y(resp)s(ectiv)m(ely)-8 b(.)68 b(Since)39 b(`)p Fp(/home)p +Fx(')f(is)h(already)g(an)g(automoun)m(t)h(p)s(oin)m(t,)h(this)e(naming) +g(is)g(ac)m(hiev)m(ed)h(with)150 1716 y(the)31 b(follo)m(wing)g(map)f +(en)m(tries:)390 1852 y Fp(dylan)380 b(type:=auto;fs:=${map};pref)o +(:=${)o(key)o(}/)390 1961 y(dylan/dk2)188 b(type:=ufs;dev:=/dev/dsk/2s) +o(0)390 2071 y(dylan/dk5)g(type:=ufs;dev:=/dev/dsk/5s)o(0)150 +2305 y Fw(5.20)68 b(Direct)46 b(Automoun)l(t)f(Filesystem)h(\(`)p +Fi(direct)p Fw('\))150 2464 y Fx(The)c Fo(direct)i Fx(\(`)p +Fp(type:=direct)p Fx('\))c(\014lesystem)j(is)f(almost)h(iden)m(tical)h +(to)f(the)f(automoun)m(t)h(\014lesystem.)150 2574 y(Instead)33 +b(of)f(app)s(earing)h(to)g(b)s(e)f(a)i(directory)f(of)g(moun)m(t)f(p)s +(oin)m(ts,)i(it)f(app)s(ears)f(as)h(a)g(sym)m(b)s(olic)g(link)g(to)h(a) +150 2683 y(moun)m(ted)f(\014lesystem.)49 b(The)33 b(moun)m(t)g(is)g +(done)g(at)h(the)f(time)h(the)f(link)g(is)g(accessed.)50 +b(See)33 b(Section)h(5.19)150 2793 y([Automoun)m(t)d(Filesystem],)h +(page)f(54,)h(for)e(a)h(list)g(of)f(required)g(options.)275 +2928 y(Direct)35 b(automoun)m(t)g(p)s(oin)m(ts)f(are)h(created)g(b)m(y) +f(sp)s(ecifying)g(the)h(`)p Fp(direct)p Fx(')e(\014lesystem)h(t)m(yp)s +(e)h(on)f(the)150 3038 y(command)c(line:)390 3173 y Fp(amd)47 +b(...)g(/usr/man)e(auto.direct)g(-type:=direct)275 3309 +y Fx(where)29 b(`)p Fp(auto.direct)p Fx(')f(w)m(ould)i(con)m(tain)i(an) +e(en)m(try)h(suc)m(h)f(as:)390 3444 y Fp(usr/man)189 +b(-type:=nfs;rfs:=/usr/man)41 b(\\)915 3554 y(rhost:=man-server1)91 +b(rhost:=man-server2)275 3689 y Fx(In)32 b(this)h(example,)i(`)p +Fp(man-server1)p Fx(')30 b(and)j(`)p Fp(man-server2)p +Fx(')d(are)k(\014le)f(serv)m(ers)g(whic)m(h)g(exp)s(ort)g(copies)150 +3799 y(of)g(the)g(man)m(ual)g(pages.)49 b(Note)35 b(that)e(the)g(k)m +(ey)h(whic)m(h)e(is)h(lo)s(ok)m(ed)h(up)e(is)h(the)g(name)g(of)g(the)g +(automoun)m(t)150 3909 y(p)s(oin)m(t)d(without)h(the)f(leading)h(`)p +Fp(/)p Fx('.)275 4044 y(Note)38 b(that)g(the)f(implemen)m(tation)i(of)e +(the)h(traditional)g Fo(direct)i Fx(\014lesystem)d(is)g(essen)m(tially) +j(a)d(hac)m(k)150 4154 y(\(pretending)32 b(that)i(the)f(ro)s(ot)g(of)g +(an)f(NFS)h(\014lesystem)g(is)g(a)g(symlink\))f(and)g(man)m(y)h(mo)s +(dern)e(op)s(erating)150 4263 y(systems)36 b(get)h(v)m(ery)f(unhapp)m +(y)e(ab)s(out)h(it.)58 b(F)-8 b(or)36 b(example,)i(Lin)m(ux)e(k)m +(ernel)g(2.4)p Fp(+)h Fx(completely)g(disallo)m(ws)150 +4373 y(it,)j(and)d(Solaris)h(2.8)h(fails)f(to)g(unmoun)m(t)f(it)h(when) +f Ft(A)n(md)47 b Fx(sh)m(uts)37 b(do)m(wn.)62 b(Therefore,)39 +b(the)f(use)f(of)h(the)150 4482 y(traditional)32 b Fo(direct)h +Fx(\014lesystem)d(is)h(strongly)f(discouraged;)h(it)g(is)g(only)f +(semi-supp)s(orted,)g(at)h(b)s(est.)275 4618 y(The)40 +b(autofs)h(implemen)m(tations)h(that)f(p)s(ermit)f(direct)i(moun)m(ts)e +(are)h(fully)g(supp)s(orted,)g(ho)m(w)m(ev)m(er.)150 +4727 y(That)j(curren)m(tly)h(includes)f(all)h(v)m(ersions)g(of)g +(Solaris.)83 b(Lin)m(ux)44 b(autofs)h(do)s(es)f(NOT)g(supp)s(ort)e +(direct)150 4837 y(moun)m(ts)30 b(at)h(all.)150 5071 +y Fw(5.21)68 b(Union)46 b(Filesystem)g(\(`)p Fi(union)p +Fw('\))150 5230 y Fx(The)32 b Fo(union)g Fx(\(`)p Fp(type:=union)p +Fx('\))f(\014lesystem)i(t)m(yp)s(e)g(allo)m(ws)h(the)f(con)m(ten)m(ts)h +(of)f(sev)m(eral)h(directories)g(to)g(b)s(e)150 5340 +y(merged)j(and)g(made)g(visible)h(in)e(a)i(single)g(directory)-8 +b(.)62 b(This)36 b(can)i(b)s(e)e(used)h(to)g(o)m(v)m(ercome)j(one)d(of) +h(the)p eop end +%%Page: 56 58 +TeXDict begin 56 57 bop 150 -116 a Fx(56)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y(ma)5 +b(jor)31 b(limitations)i(of)e(the)h(Unix)e(moun)m(t)i(mec)m(hanism)f +(whic)m(h)g(only)g(allo)m(ws)h(complete)h(directories)f(to)150 +408 y(b)s(e)e(moun)m(ted.)275 552 y(F)-8 b(or)41 b(example,)i(supp)s +(osing)c Fp(/tmp)g Fx(and)h Fp(/var/tmp)e Fx(w)m(ere)j(to)g(b)s(e)e +(merged)i(in)m(to)g(a)g(new)e(directory)150 662 y(called)c +Fp(/mtmp)p Fx(,)e(with)g(\014les)g(in)h Fp(/var/tmp)d +Fx(taking)j(precedence.)51 b(The)33 b(follo)m(wing)i(command)e(could)h +(b)s(e)150 771 y(used)c(to)h(ac)m(hiev)m(e)h(this)f(e\013ect:)390 +915 y Fp(amd)47 b(...)g(/mtmp)f(union:/tmp:/var/tmp)d(-type:=union)275 +1059 y Fx(Curren)m(tly)-8 b(,)28 b(the)g(unioned)e(directories)j(m)m +(ust)f Ft(not)37 b Fx(b)s(e)27 b(automoun)m(ted.)40 b(That)28 +b(w)m(ould)f(cause)i(a)f(dead-)150 1169 y(lo)s(c)m(k.)59 +b(This)35 b(seriously)i(limits)f(the)h(curren)m(t)f(usefulness)f(of)h +(this)g(\014lesystem)g(t)m(yp)s(e)h(and)e(the)i(problem)150 +1278 y(will)31 b(b)s(e)e(addressed)h(in)g(a)h(future)e(release)j(of)e +Ft(A)n(md)p Fx(.)275 1422 y(Files)24 b(created)g(in)f(the)g(union)f +(directory)i(are)f(actually)i(created)f(in)f(the)g(last)h(named)f +(directory)-8 b(.)39 b(This)150 1532 y(is)d(done)g(b)m(y)g(creating)h +(a)f(wildcard)g(en)m(try)g(whic)m(h)g(p)s(oin)m(ts)g(to)g(the)g +(correct)h(directory)-8 b(.)59 b(The)35 b(wildcard)150 +1641 y(en)m(try)g(is)g(visible)h(if)f(the)g(union)f(directory)h(is)g +(listed,)i(so)f(allo)m(wing)g(y)m(ou)g(to)f(see)h(whic)m(h)f(directory) +g(has)150 1751 y(priorit)m(y)-8 b(.)275 1895 y(The)35 +b(\014les)g(visible)h(in)g(the)f(union)g(directory)h(are)g(computed)g +(at)g(the)g(time)g Ft(A)n(md)45 b Fx(is)36 b(started,)i(and)150 +2004 y(are)g(not)g(k)m(ept)h(up-to-date)g(with)f(resp)s(ect)f(to)i(the) +f(underlying)f(directories.)64 b(Similarly)-8 b(,)41 +b(if)d(a)g(link)g(is)150 2114 y(remo)m(v)m(ed,)32 b(for)e(example)h +(with)f(the)g(`)p Fp(rm)p Fx(')h(command,)f(it)h(will)g(b)s(e)e(lost)j +(forev)m(er.)150 2360 y Fw(5.22)68 b(Error)46 b(Filesystem)g(\(`)p +Fi(error)p Fw('\))150 2520 y Fx(The)25 b Fo(error)32 +b Fx(\(`)p Fp(type:=error)p Fx('\))24 b(\014lesystem)i(t)m(yp)s(e)g(is) +g(used)f(in)m(ternally)i(as)f(a)g(catc)m(h-all)i(in)e(the)g(case)g +(where)150 2629 y(none)42 b(of)g(the)f(other)i(\014lesystems)e(w)m(as)i +(selected,)j(or)c(some)g(other)g(error)f(o)s(ccurred.)75 +b(Lo)s(okups)41 b(and)150 2739 y(moun)m(ts)30 b(alw)m(a)m(ys)i(fail)f +(with)f(\\No)i(suc)m(h)e(\014le)g(or)h(directory".)41 +b(All)31 b(other)g(op)s(erations)f(trivially)i(succeed.)275 +2883 y(The)d(error)h(\014lesystem)h(is)f(not)h(directly)g(accessible.) +150 3129 y Fw(5.23)68 b(T)-11 b(op-lev)l(el)46 b(Filesystem)g(\(`)p +Fi(toplvl)p Fw('\))150 3289 y Fx(The)26 b Fo(toplvl)k +Fx(\(`)p Fp(type:=toplvl)p Fx('\))24 b(\014lesystems)i(is)g(deriv)m(ed) +h(from)e(the)h(`)p Fp(auto)p Fx(')g(\014lesystem)g(and)g(is)g(used)f +(to)150 3398 y(moun)m(t)35 b(the)g(top-lev)m(el)i(automoun)m(t)f(no)s +(des.)53 b(Requests)35 b(of)g(this)g(t)m(yp)s(e)g(are)g(automatically)j +(generated)150 3508 y(from)30 b(the)g(command)h(line)f(argumen)m(ts.) +150 3754 y Fw(5.24)68 b(Ro)t(ot)46 b(Filesystem)g(\(`)p +Fi(root)p Fw('\))150 3914 y Fx(The)36 b Fo(ro)s(ot)j +Fx(\(`)p Fp(type:=root)p Fx('\))c(\014lesystem)h(t)m(yp)s(e)h(acts)h +(as)e(an)h(in)m(ternal)g(placeholder)g(on)m(to)h(whic)m(h)e +Ft(A)n(md)150 4023 y Fx(can)h(pin)f(`)p Fp(toplvl)p Fx(')f(moun)m(ts.) +60 b(Only)36 b(one)h(no)s(de)f(of)h(this)g(t)m(yp)s(e)g(need)f(ev)m(er) +i(exist)f(and)f(one)h(is)g(created)150 4133 y(automatically)c(during)c +(startup.)41 b(The)30 b(e\013ect)h(of)g(ha)m(ving)g(more)f(than)h(one)f +(ro)s(ot)h(no)s(de)f(is)g(unde\014ned.)275 4277 y(The)f(ro)s(ot)i +(\014lesystem)g(is)f(not)h(directly)g(accessible.)150 +4523 y Fw(5.25)68 b(Inheritance)46 b(Filesystem)g(\(`)p +Fi(inherit)p Fw('\))150 4682 y Fx(The)36 b Fo(inheritance)42 +b Fx(\(`)p Fp(type:=inherit)p Fx('\))34 b(\014lesystem)i(is)h(not)f +(directly)h(accessible.)60 b(Instead,)38 b(in)m(ternal)150 +4792 y(moun)m(t)g(no)s(des)g(of)g(this)h(t)m(yp)s(e)f(are)h +(automatically)i(generated)f(when)d Ft(A)n(md)48 b Fx(is)38 +b(started)h(with)f(the)h Fp(-r)150 4902 y Fx(option.)i(A)m(t)29 +b(this)g(time)g(the)g(system)g(moun)m(t)g(table)h(is)f(scanned)f(to)h +(lo)s(cate)i(an)m(y)e(\014lesystems)g(whic)m(h)g(are)150 +5011 y(already)d(moun)m(ted.)38 b(If)25 b(an)m(y)g(reference)h(to)f +(these)h(\014lesystems)f(is)g(made)g(through)f Ft(A)n(md)35 +b Fx(then)25 b(instead)g(of)150 5121 y(attempting)30 +b(to)g(moun)m(t)g(it,)g Ft(A)n(md)38 b Fx(sim)m(ulates)31 +b(the)e(moun)m(t)g(and)g Fo(inherits)j Fx(the)e(\014lesystem.)40 +b(This)29 b(allo)m(ws)150 5230 y(a)d(new)f(v)m(ersion)h(of)g +Ft(A)n(md)35 b Fx(to)26 b(b)s(e)f(installed)i(on)e(a)h(liv)m(e)h +(system)f(simply)f(b)m(y)h(killing)g(the)g(old)g(daemon)f(with)150 +5340 y(`)p Fp(SIGTERM)p Fx(')k(and)h(starting)h(the)f(new)g(one.)p +eop end +%%Page: 57 59 +TeXDict begin 57 58 bop 150 -116 a Fx(Chapter)30 b(5:)41 +b(Filesystem)32 b(T)m(yp)s(es)2351 b(57)275 299 y(This)27 +b(\014lesystem)i(t)m(yp)s(e)f(is)g(not)h(generally)g(visible)g +(externally)-8 b(,)31 b(but)c(it)i(is)f(p)s(ossible)g(that)h(the)f +(output)150 408 y(from)40 b(`)p Fp(amq)30 b(-m)p Fx(')40 +b(ma)m(y)i(list)f(`)p Fp(inherit)p Fx(')e(as)i(the)g(\014lesystem)g(t)m +(yp)s(e.)72 b(This)40 b(happ)s(ens)f(when)h(an)g(inherit)150 +518 y(op)s(eration)31 b(cannot)g(b)s(e)f(completed)h(for)f(some)h +(reason,)g(usually)f(b)s(ecause)g(a)h(\014leserv)m(er)g(is)f(do)m(wn.)p +eop end +%%Page: 58 60 +TeXDict begin 58 59 bop eop end +%%Page: 59 61 +TeXDict begin 59 60 bop 150 -116 a Fx(Chapter)30 b(6:)41 +b(Amd)30 b(Con\014guration)g(File)2094 b(59)150 299 y +Fu(6)80 b(Amd)54 b(Con\014guration)d(File)150 603 y Fx(The)28 +b(`)p Fp(amd.conf)p Fx(')g(\014le)h(is)g(the)g(con\014guration)g +(\014le)g(for)g Ft(A)n(md)p Fx(,)g(as)h(part)e(of)h(the)h(am-utils)f +(suite.)41 b(This)28 b(\014le)150 713 y(con)m(tains)k(run)m(time)e +(con\014guration)g(information)h(for)f(the)h Ft(A)n(md)40 +b Fx(automoun)m(ter)31 b(program.)150 980 y Fw(6.1)68 +b(File)46 b(F)-11 b(ormat)150 1140 y Fx(The)28 b(`)p +Fp(amd.conf)p Fx(')g(\014le)h(consists)g(of)g(sections)h(and)f +(parameters.)40 b(A)29 b(section)i(b)s(egins)d(with)h(the)g(name)g(of) +150 1249 y(the)f(section)i(in)e(square)g(brac)m(k)m(ets)h(`)p +Fp([])p Fx(')f(and)g(con)m(tin)m(ues)h(un)m(til)g(the)f(next)h(section) +g(b)s(egins)f(or)g(the)g(end)g(of)150 1359 y(the)j(\014le)f(is)g(reac)m +(hed.)42 b(Sections)31 b(con)m(tain)h(parameters)e(of)h(the)f(form)g(`) +p Fp(name)g(=)g(value)p Fx('.)275 1517 y(The)20 b(\014le)g(is)h +(line-based)f(|)h(that)g(is,)i(eac)m(h)e(newline-terminated)h(line)e +(represen)m(ts)h(either)g(a)g(commen)m(t,)150 1626 y(a)31 +b(section)g(name)g(or)f(a)h(parameter.)41 b(No)31 b(line-con)m(tin)m +(uation)i(syn)m(tax)e(is)f(a)m(v)-5 b(ailable.)275 1784 +y(Section)31 b(names,)f(parameter)h(names)f(and)g(their)h(v)-5 +b(alues)30 b(are)h(case)g(sensitiv)m(e.)275 1942 y(Only)43 +b(the)i(\014rst)f(equals)g(sign)h(in)f(a)h(parameter)g(is)f +(signi\014can)m(t.)84 b(Whitespace)46 b(b)s(efore)e(or)g(after)150 +2051 y(the)33 b(\014rst)g(equals)h(sign)f(is)g(discarded.)49 +b(Leading,)34 b(trailing)h(and)d(in)m(ternal)i(whitespace)g(in)f +(section)i(and)150 2161 y(parameter)41 b(names)g(is)f(irrelev)-5 +b(an)m(t.)73 b(Leading)41 b(and)f(trailing)h(whitespace)h(in)e(a)h +(parameter)g(v)-5 b(alue)41 b(is)150 2271 y(discarded.)56 +b(In)m(ternal)36 b(whitespace)g(within)f(a)h(parameter)g(v)-5 +b(alue)36 b(is)f(not)h(allo)m(w)m(ed,)j(unless)c(the)h(whole)150 +2380 y(parameter)31 b(v)-5 b(alue)31 b(is)f(quoted)h(with)f(double)g +(quotes)g(as)h(in)f(`)p Fp(name)g(=)g("some)f(value")p +Fx('.)275 2538 y(An)m(y)i(line)g(b)s(eginning)g(with)g(a)h(p)s(ound)d +(sign)i(`)p Fp(#)p Fx(')h(is)f(ignored,)h(as)f(are)h(lines)f(con)m +(taining)i(only)f(white-)150 2648 y(space.)275 2806 y(The)40 +b(v)-5 b(alues)42 b(follo)m(wing)g(the)g(equals)f(sign)g(in)g +(parameters)g(are)h(all)g(either)f(a)h(string)f(\(no)g(quotes)150 +2915 y(needed)35 b(if)g(string)g(do)s(es)f(not)h(include)g(spaces\))h +(or)f(a)g(b)s(o)s(olean,)i(whic)m(h)d(ma)m(y)i(b)s(e)e(giv)m(en)i(as)g +(`)p Fp(yes)p Fx('/`)p Fp(no)p Fx('.)150 3025 y(Case)31 +b(is)f(signi\014can)m(t)h(in)f(all)i(v)-5 b(alues.)41 +b(Some)30 b(items)h(suc)m(h)f(as)h(cac)m(he)h(timeouts)f(are)g(n)m +(umeric.)150 3292 y Fw(6.2)68 b(The)45 b(Global)g(Section)150 +3452 y Fx(The)28 b(global)h(section)g(m)m(ust)f(b)s(e)g(sp)s(eci\014ed) +f(as)i(`)p Fp([global])p Fx('.)38 b(P)m(arameters)29 +b(in)f(this)g(section)i(either)e(apply)150 3561 y(to)g +Ft(A)n(md)37 b Fx(as)28 b(a)g(whole,)g(or)g(to)g(all)h(other)f(regular) +f(map)g(sections)i(whic)m(h)e(follo)m(w.)41 b(There)27 +b(should)g(b)s(e)g(only)150 3671 y(one)k(global)g(section)h(de\014ned)d +(in)h(one)h(con\014guration)f(\014le.)275 3829 y(It)h(is)h(highly)g +(recommended)f(that)i(this)e(section)i(b)s(e)f(sp)s(eci\014ed)f +(\014rst)g(in)g(the)h(con\014guration)g(\014le.)45 b(If)150 +3938 y(it)27 b(is)g(not,)h(then)f(regular)g(map)g(sections)h(whic)m(h)e +(precede)h(it)h(will)f(not)g(use)g(global)h(v)-5 b(alues)27 +b(de\014ned)f(later.)150 4206 y Fw(6.3)68 b(Regular)46 +b(Map)f(Sections)150 4365 y Fx(P)m(arameters)38 b(in)e(regular)h +(\(non-global\))i(sections)e(apply)g(to)g(a)g(single)h(map)e(en)m(try) +-8 b(.)60 b(F)-8 b(or)38 b(example,)h(if)150 4475 y(the)d(map)f +(section)h(`)p Fp([/homes])p Fx(')e(is)h(de\014ned,)h(then)f(all)i +(parameters)e(follo)m(wing)i(it)f(will)g(b)s(e)f(applied)g(to)150 +4584 y(the)c Fp(/homes)d Ft(A)n(md)p Fx(-managed)j(moun)m(t)g(p)s(oin)m +(t.)150 4852 y Fw(6.4)68 b(Common)45 b(P)l(arameters)150 +5011 y Fx(These)36 b(parameters)h(can)g(b)s(e)f(sp)s(eci\014ed)g +(either)i(in)e(the)h(global)h(or)e(a)h(map-sp)s(eci\014c)g(section.)61 +b(En)m(tries)150 5121 y(sp)s(eci\014ed)36 b(in)h(a)h(map-sp)s(eci\014c) +f(section)h(o)m(v)m(erride)g(the)g(default)f(v)-5 b(alue)38 +b(or)f(one)g(de\014ned)f(in)h(the)h(global)150 5230 y(section.)k(If)29 +b(suc)m(h)h(a)g(common)g(parameter)g(is)g(sp)s(eci\014ed)g(only)f(in)h +(the)g(global)h(section,)h(it)e(is)g(applicable)150 5340 +y(to)h(all)g(regular)g(map)f(sections)h(that)g(follo)m(w.)p +eop end +%%Page: 60 62 +TeXDict begin 60 61 bop 150 -116 a Fx(60)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fm(6.4.1)63 +b Fl(autofs_use_lofs)43 b Fm(P)m(arameter)150 446 y Fx(\(t)m(yp)s +(e=string,)49 b(default=`)p Fp(yes)p Fx('\).)83 b(When)45 +b(set)g(to)g(`)p Fp(yes)p Fx(',)k Ft(A)n(md)9 b Fx('s)45 +b(autofs)g(co)s(de)g(will)g(use)f(lofs-t)m(yp)s(e)150 +555 y(\(lo)s(opbac)m(k\))30 b(moun)m(ts)e(for)g Fp(type:=link)e +Fx(moun)m(ts,)j(as)f(w)m(ell)i(as)e(sev)m(eral)i(other)e(cases)i(that)f +(require)f(lo)s(cal)150 665 y(references.)56 b(This)34 +b(has)h(the)g(adv)-5 b(an)m(tage)38 b(that)d Ft(A)n(md)45 +b Fx(do)s(es)35 b(not)g(use)g(a)h(secondary)f(moun)m(t)g(p)s(oin)m(t)h +(and)150 775 y(users)d(do)h(not)f(see)i(external)f(pathnames)g(\(the)g +(infamous)f Fp(/bin/pwd)f Fx(problem,)i(where)f(it)i(rep)s(orts)e(a)150 +884 y(di\013eren)m(t)i(path)f(than)h(the)f(user)g(c)m(hdir'ed)g(in)m +(to\).)55 b(One)34 b(of)h(the)f(disadv)-5 b(an)m(tages)36 +b(of)f(using)f(this)g(option)150 994 y(is)f(that)g(the)g(autofs)g(co)s +(de)g(is)f(relativ)m(ely)j(new)e(and)f(the)g(in-place)i(moun)m(ts)f(ha) +m(v)m(e)h(not)e(b)s(een)g(throughly)150 1103 y(tested.)275 +1246 y(If)26 b(this)h(option)g(is)g(set)g(to)h(`)p Fp(no)p +Fx(',)g(then)e Ft(A)n(md)9 b Fx('s)28 b(autofs)f(co)s(de)g(will)g(use)g +(symlinks)f(instead)h(of)g(lofs-t)m(yp)s(e)150 1356 y(moun)m(ts)36 +b(for)g(lo)s(cal)i(references.)59 b(This)36 b(has)g(the)g(adv)-5 +b(an)m(tage)39 b(of)d(using)g(simpler)g(\(more)h(stable\))g(co)s(de,) +150 1466 y(but)28 b(at)h(the)f(exp)s(ense)g(of)g(negating)i(one)f(of)f +(autofs's)h(big)f(adv)-5 b(an)m(tages:)42 b(the)28 b(hiding)g(of)g +Ft(A)n(md)9 b Fx('s)29 b(in)m(ternal)150 1575 y(paths.)39 +b(Note)28 b(that)e(symlinks)g(are)h(not)f(supp)s(orted)f(in)g(all)j +(autofs)e(implemen)m(tations,)j(esp)s(ecially)e(those)150 +1685 y(deriv)m(ed)38 b(from)g(Solaris)h(Autofs)g(v1.)65 +b(Also,)41 b(on)e(Solaris)f(2.6)i(and)e(new)m(er,)i(autofs)f(symlinks)f +(are)h(not)150 1794 y(cac)m(hed,)32 b(resulting)e(in)g(rep)s(eated)h +(up-call)g(requests)f(to)h Ft(A)n(md)p Fx(.)150 2002 +y Fm(6.4.2)63 b Fl(browsable_dirs)42 b Fm(P)m(arameter)150 +2149 y Fx(\(t)m(yp)s(e=string,)30 b(default=`)p Fp(no)p +Fx('\).)41 b(If)29 b(`)p Fp(yes)p Fx(',)h(then)g Ft(A)n(md)9 +b Fx('s)30 b(top-lev)m(el)i(moun)m(t)e(p)s(oin)m(ts)g(will)g(b)s(e)f +(bro)m(wsable)150 2259 y(to)41 b Fn(readdir)p Fx(\(3\))g(calls.)73 +b(This)39 b(means)i(y)m(ou)f(could)h(run)e(for)h(example)h +Fn(ls)p Fx(\(1\))h(and)e(see)h(what)f(k)m(eys)i(are)150 +2368 y(a)m(v)-5 b(ailable)40 b(to)f(moun)m(t)f(in)g(that)h(directory)-8 +b(.)64 b(Not)39 b(all)g(en)m(tries)g(are)g(made)f(visible)g(to)h +Fn(readdir)p Fx(\(3\):)57 b(the)150 2478 y(`)p Fp(/defaults)p +Fx(')34 b(en)m(try)-8 b(,)37 b(wildcard)e(en)m(tries,)j(and)d(those)h +(with)f(a)h Fp(/)g Fx(in)f(them)g(are)h(not)g(included.)56 +b(If)35 b(y)m(ou)150 2587 y(sp)s(ecify)29 b(`)p Fp(full)p +Fx(')f(to)i(this)f(option,)h(all)g(but)e(the)i(`)p Fp(/defaults)p +Fx(')d(en)m(try)i(will)g(b)s(e)g(visible.)40 b(Note)31 +b(that)f(if)f(y)m(ou)150 2697 y(run)g(a)j(command)e(whic)m(h)h(will)g +(attempt)h(to)g Fn(stat)p Fx(\(2\))h(the)e(en)m(tries,)h(suc)m(h)f(as)g +(often)g(done)g(b)m(y)f(`)p Fp(ls)g(-l)p Fx(')h(or)150 +2807 y(`)p Fp(ls)f(-F)p Fx(',)d Ft(A)n(md)36 b Fx(will)27 +b(attempt)h(to)f(moun)m(t)g Ft(every)35 b Fx(en)m(try)26 +b(in)h(that)g(map.)39 b(This)26 b(is)h(often)g(called)g(a)g(\\moun)m(t) +150 2916 y(storm".)275 3059 y(Note)43 b(that)g(moun)m(t)f(storms)g(are) +g(mostly)h(a)m(v)m(oided)g(b)m(y)f(using)g(autofs)g(moun)m(ts)g(\(`)p +Fp(mount_type)28 b(=)150 3169 y(autofs)p Fx('\).)150 +3376 y Fm(6.4.3)63 b Fl(map_defaults)42 b Fm(P)m(arameter)150 +3523 y Fx(\(t)m(yp)s(e=string,)23 b(default)e(to)h(empt)m(y\).)38 +b(This)20 b(option)i(sets)f(a)g(string)g(to)g(b)s(e)g(used)f(as)h(the)g +(map's)f Fp(/defaults)150 3633 y Fx(en)m(try)-8 b(,)31 +b(o)m(v)m(erriding)g(an)m(y)f Fp(/defaults)e Fx(sp)s(eci\014ed)h(in)h +(the)g(map.)40 b(This)29 b(allo)m(ws)i(lo)s(cal)h(users)d(to)h(o)m(v)m +(erride)i(a)150 3743 y(giv)m(en)j(map's)f(defaults)g(without)g(mo)s +(difying)f(maps)g(globally)j(\(whic)m(h)e(is)g(imp)s(ossible)f(in)h +(sites)g(where)150 3852 y(the)d(maps)e(are)i(managed)g(b)m(y)f(a)h +(di\013eren)m(t)g(administrativ)m(e)h(group\).)150 4060 +y Fm(6.4.4)63 b Fl(map_options)42 b Fm(P)m(arameter)150 +4207 y Fx(\(t)m(yp)s(e=string,)27 b(default)f(no)g(options\).)40 +b(This)25 b(option)i(is)f(the)g(same)g(as)g(sp)s(ecifying)g(map)g +(options)g(on)g(the)150 4316 y(command)k(line)h(to)g +Ft(A)n(md)p Fx(,)g(suc)m(h)f(as)g(`)p Fp(cache:=all)p +Fx('.)150 4524 y Fm(6.4.5)63 b Fl(map_type)42 b Fm(P)m(arameter)150 +4671 y Fx(\(t)m(yp)s(e=string,)34 b(default)f(searc)m(h)h(all)f(map)g +(t)m(yp)s(es\).)48 b(If)33 b(sp)s(eci\014ed,)g Ft(A)n(md)42 +b Fx(will)33 b(initialize)i(the)e(map)g(only)150 4781 +y(for)c(the)h(t)m(yp)s(e)f(giv)m(en.)41 b(This)29 b(is)g(useful)g(to)h +(a)m(v)m(oid)h(the)e(default)h(map)e(searc)m(h)i(t)m(yp)s(e)g(used)e(b) +m(y)i Ft(A)n(md)38 b Fx(whic)m(h)150 4890 y(tak)m(es)f(longer)f(and)f +(can)g(ha)m(v)m(e)i(undesired)d(side-e\013ects)j(suc)m(h)e(as)h +(initializing)h(NIS)e(ev)m(en)h(if)g(not)f(used.)150 +5000 y(P)m(ossible)c(v)-5 b(alues)31 b(are)150 5172 y(`)p +Fp(file)p Fx(')238 b(plain)30 b(\014les)150 5340 y(`)p +Fp(hesiod)p Fx(')142 b(Hesio)s(d)30 b(name)h(service)g(from)f(MIT)p +eop end +%%Page: 61 63 +TeXDict begin 61 62 bop 150 -116 a Fx(Chapter)30 b(6:)41 +b(Amd)30 b(Con\014guration)g(File)2094 b(61)150 299 y(`)p +Fp(ldap)p Fx(')238 b(Ligh)m(t)m(w)m(eigh)m(t)33 b(Directory)f(Access)f +(Proto)s(col)150 456 y(`)p Fp(ndbm)p Fx(')238 b(\(New\))31 +b(dbm)e(st)m(yle)j(hash)e(\014les)150 613 y(`)p Fp(nis)p +Fx(')286 b(Net)m(w)m(ork)32 b(Information)e(Services)h(\(v)m(ersion)g +(2\))150 771 y(`)p Fp(nisplus)p Fx(')94 b(Net)m(w)m(ork)32 +b(Information)e(Services)h(Plus)f(\(v)m(ersion)h(3\))150 +928 y(`)p Fp(passwd)p Fx(')142 b(lo)s(cal)32 b(passw)m(ord)d(\014les) +150 1085 y(`)p Fp(union)p Fx(')190 b(union)30 b(maps)150 +1282 y Fm(6.4.6)63 b Fl(mount_type)42 b Fm(P)m(arameter)150 +1429 y Fx(\(t)m(yp)s(e=string,)c(default=`)p Fp(nfs)p +Fx('\).)58 b(All)36 b Ft(A)n(md)46 b Fx(moun)m(t)36 b(t)m(yp)s(es)g +(default)g(to)h(NFS.)f(That)g(is,)i Ft(A)n(md)45 b Fx(is)36 +b(an)150 1539 y(NFS)i(serv)m(er)h(on)f(the)g(map)g(moun)m(t)g(p)s(oin)m +(ts,)i(for)e(the)g(lo)s(cal)i(host)e(it)h(is)f(running)e(on.)64 +b(If)38 b(`)p Fp(autofs)p Fx(')f(is)150 1648 y(sp)s(eci\014ed,)30 +b Ft(A)n(md)40 b Fx(will)30 b(b)s(e)g(an)g(autofs)h(serv)m(er)g(for)f +(those)h(moun)m(t)f(p)s(oin)m(ts.)150 1845 y Fm(6.4.7)63 +b Fl(search_path)42 b Fm(P)m(arameter)150 1992 y Fx(\(t)m(yp)s +(e=string,)27 b(default)g(no)f(searc)m(h)g(path\).)40 +b(This)25 b(pro)m(vides)h(a)h(\(colon-delimited\))h(searc)m(h)f(path)f +(for)g(\014le)150 2102 y(maps.)40 b(Using)28 b(a)h(searc)m(h)g(path,)g +(sites)g(can)f(allo)m(w)i(for)e(lo)s(cal)i(map)e(customizations)i(and)e +(o)m(v)m(errides,)i(and)150 2211 y(can)h(distributed)e(maps)h(in)g(sev) +m(eral)i(lo)s(cations)g(as)e(needed.)150 2409 y Fm(6.4.8)63 +b Fl(selectors_in_defaults)43 b Fm(P)m(arameter)150 2555 +y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)32 b(default=`)p Fp(no)p +Fx('\).)44 b(If)31 b(`)p Fp(yes)p Fx(',)g(then)g(the)h(`)p +Fp(/defaults)p Fx(')d(en)m(try)i(of)h(maps)f(will)g(searc)m(h)h(for)150 +2665 y(and)40 b(pro)s(cess)g(an)m(y)h(selectors)i(b)s(efore)d(setting)i +(defaults)f(for)f(all)i(other)f(k)m(eys)g(in)f(that)i(map.)71 +b(Useful)150 2775 y(when)29 b(y)m(ou)h(w)m(an)m(t)h(to)f(set)g +(di\013eren)m(t)h(options)f(for)f(a)h(complete)i(map)d(based)g(on)h +(some)g(parameters.)41 b(F)-8 b(or)150 2884 y(example,)39 +b(y)m(ou)e(ma)m(y)g(w)m(an)m(t)h(to)f(b)s(etter)g(the)f(NFS)h(p)s +(erformance)f(o)m(v)m(er)i(slo)m(w)f(slip-based)f(net)m(w)m(orks)i(as) +150 2994 y(follo)m(ws:)390 3127 y Fp(/defaults)45 b(\\)581 +3237 y(wire==slip-net;opts:=int)o(r,rs)o(ize)o(=102)o(4,ws)o(ize)o +(=102)o(4)d(\\)581 3346 y(wire!=slip-net;opts:=int)o(r,rs)o(ize)o(=819) +o(2,ws)o(ize)o(=819)o(2)275 3480 y Fx(Deprecated)31 b(form:)41 +b(selectors)p 1343 3480 28 4 v 41 w(on)p 1480 3480 V +40 w(default.)150 3677 y Fm(6.4.9)63 b Fl(sun_map_syntax)42 +b Fm(P)m(arameter)150 3824 y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)30 +b(default=`)p Fp(no)p Fx('\).)41 b(If)30 b(`)p Fp(yes)p +Fx(',)f(then)h Ft(A)n(md)39 b Fx(will)30 b(parse)g(the)g(map)f +(according)i(to)f(the)g(Sun)150 3933 y(Automoun)m(t)h(syn)m(tax.)150 +4164 y Fw(6.5)68 b(Global)46 b(P)l(arameters)150 4323 +y Fx(The)30 b(follo)m(wing)i(parameters)e(are)h(applicable)g(to)h(the)e +(`)p Fp([global])p Fx(')f(section)i(only)-8 b(.)150 4520 +y Fm(6.5.1)63 b Fl(arch)41 b Fm(P)m(arameter)150 4667 +y Fx(\(t)m(yp)s(e=string,)31 b(default)f(to)h(compiled)f(in)g(v)-5 +b(alue\).)41 b(Same)31 b(as)f(the)g Fp(-A)g Fx(option)g(to)h +Ft(A)n(md)p Fx(.)41 b(Allo)m(ws)31 b(y)m(ou)f(to)150 +4777 y(o)m(v)m(erride)h(the)g(v)-5 b(alue)31 b(of)f(the)h +Ft(ar)-5 b(ch)39 b(A)n(md)g Fx(v)-5 b(ariable.)150 4974 +y Fm(6.5.2)63 b Fl(auto_attrcache)42 b Fm(P)m(arameter)150 +5121 y Fx(\(t)m(yp)s(e=n)m(umeric,)34 b(default=0\).)49 +b(Sp)s(ecify)32 b(in)h(seconds)f(\(or)i(units)e(of)h(0.1)h(seconds,)g +(dep)s(ending)d(on)i(the)150 5230 y(OS\),)44 b(what)h(is)f(the)h(\(k)m +(ernel-side\))h(NFS)e(attribute)h(cac)m(he)h(timeout)g(for)e +Ft(A)n(md)9 b Fx('s)45 b(o)m(wn)f(automoun)m(t)150 5340 +y(p)s(oin)m(ts.)51 b(A)35 b(v)-5 b(alue)34 b(of)g(0)h(is)f(supp)s(osed) +e(to)i(turn)f(o\013)i(attribute)f(cac)m(hing,)j(meaning)d(that)h +Ft(A)n(md)43 b Fx(will)35 b(b)s(e)p eop end +%%Page: 62 64 +TeXDict begin 62 63 bop 150 -116 a Fx(62)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y(consulted)37 +b(via)f(a)h(k)m(ernel-RPC)g(eac)m(h)g(time)g(someone)g(stat\(\)'s)i +(the)d(moun)m(t)g(p)s(oin)m(t)h(\(whic)m(h)f(could)h(b)s(e)150 +408 y(abused)30 b(as)g(a)h(denial-of-service)h(attac)m(k\).)275 +564 y Ft(W)-7 b(ARNING)8 b Fx(:)23 b Ft(A)n(md)33 b Fx(dep)s(ends)22 +b(on)i(b)s(eing)f(able)i(to)f(turn)f(o\013)h(the)g(NFS)g(attribute)h +(cac)m(he)g(of)f(the)g(clien)m(t)150 674 y(OS.)i(If)h(it)g(cannot)g(b)s +(e)g(turned)e(o\013,)k(then)d(users)g(ma)m(y)h(get)h(EST)-8 +b(ALE)27 b(errors)f(or)h(symlinks)f(that)h(p)s(oin)m(t)g(to)150 +783 y(the)f(wrong)g(places.)40 b(This)26 b(is)g(more)g(lik)m(ely)i +(under)c(hea)m(vy)j(use)f(of)g Ft(A)n(md)p Fx(,)i(for)e(example)g(if)g +(y)m(our)h(system)f(is)150 893 y(exp)s(eriencing)e(frequen)m(t)f(map)h +(c)m(hanges)g(or)g(frequen)m(t)f(moun)m(ts/unmoun)m(ts.)38 +b(Therefore,)25 b(under)d(normal)150 1002 y(circumstances,)31 +b(this)f(parameter)h(should)e(remain)h(set)h(to)f(0,)h(to)g(ensure)e +(that)i(the)f(attribute)h(cac)m(he)h(is)150 1112 y(indeed)e(o\013.)275 +1268 y(Unfortunately)-8 b(,)34 b(some)f(k)m(ernels)h(\(e.g.,)h(certain) +f(BSDs\))g(don't)f(ha)m(v)m(e)h(a)f(w)m(a)m(y)h(to)g(turn)d(o\013)j +(the)f(NFS)150 1377 y(attribute)21 b(cac)m(he.)40 b(Setting)21 +b(this)g(parameter)g(to)g(0)h(is)e(supp)s(osed)f(to)j(turn)d(o\013)i +(attribute)h(cac)m(hing)g(en)m(tirely)-8 b(,)150 1487 +y(but)23 b(unfortunately)f(it)i(do)s(es)f(not;)j(instead,)g(the)d +(attribute)h(cac)m(he)h(is)e(set)h(to)g(some)g(in)m(ternal)g(hard-co)s +(ded)150 1596 y(default)32 b(\(usually)g(an)m(ywhere)f(from)g(5-30)j +(seconds\).)44 b(If)32 b(y)m(ou)g(susp)s(ect)f(that)h(y)m(our)f(OS)g +(do)s(esn't)h(ha)m(v)m(e)h(a)150 1706 y(reliable)d(w)m(a)m(y)f(of)g +(turning)e(o\013)i(the)g(attribute)g(cac)m(he,)i(then)d(it)h(is)f(b)s +(etter)h(to)g(set)g(this)g(parameter)g(to)g(the)150 1815 +y(smallest)g(p)s(ossible)f(non-zero)g(v)-5 b(alue)29 +b(\(set)g(`)p Fp(auto_attrcache=1)p Fx(')24 b(in)k(y)m(our)g +Fp(amd.conf)p Fx(\).)38 b(This)27 b(will)i(not)150 1925 +y(eliminate)36 b(the)f(problem,)g(but)f(reduce)g(the)h(risk)f(windo)m +(w)g(somewhat.)54 b(The)34 b(b)s(est)g(solutions)h(are)g(\(1\))150 +2035 y(to)e(use)f Ft(A)n(md)42 b Fx(in)32 b(Autofs)h(mo)s(de,)g(if)f +(it's)h(supp)s(orted)e(in)h(y)m(our)g(OS,)g(and)g(\(2\))h(talk)h(to)f +(y)m(our)f(OS)g(v)m(endor)150 2144 y(to)j(supp)s(ort)e(a)i(true)g(`)p +Fp(noac)p Fx(')f(\015ag.)54 b(See)35 b(the)g(README.attrcac)m(he)i(\()p +Fp(http:)t(/)t(/)s(www)t(.)s(am-utils)s(.)s(o)o(rg)s(/)150 +2254 y(docs/am-utils/attrcache.)o(txt)p Fx(\))24 b(do)s(cumen)m(t)30 +b(for)h(more)f(details.)275 2409 y(If)39 b(y)m(ou)h(are)h(able)f(to)h +(turn)e(o\013)h(the)g(attribute)h(cac)m(he)g(on)f(y)m(our)g(OS,)g +(alas,)j Ft(A)n(md)9 b Fx('s)41 b(p)s(erformance)150 +2519 y(ma)m(y)27 b(degrade)f(\(when)g(not)h(using)e(Autofs\))i(b)s +(ecause)f(ev)m(ery)h(tra)m(v)m(ersal)i(of)d(an)g(automoun)m(ter-con)m +(trolled)150 2629 y(pathname)42 b(will)h(result)f(in)g(a)g(lo)s(okup)g +(request)g(from)g(the)g(k)m(ernel)h(to)g Ft(A)n(md)p +Fx(.)76 b(Under)41 b(hea)m(vy)i(loads,)150 2738 y(for)38 +b(example)g(when)g(using)f(recursiv)m(e)h(to)s(ols)h(lik)m(e)h(`)p +Fp(find)p Fx(',)f(`)p Fp(rdist)p Fx(',)g(or)f(`)p Fp(rsync)p +Fx(',)i(this)e(p)s(erformance)150 2848 y(degradation)c(can)f(b)s(e)g +(noticeable.)50 b(There)33 b(are)g(t)m(w)m(o)i(p)s(ossible)d(solutions) +i(that)f(some)h(administrators)150 2957 y(ha)m(v)m(e)e(c)m(hosen)f(to)g +(impro)m(v)m(e)g(p)s(erformance:)199 3113 y(1.)61 b(First,)43 +b(y)m(ou)e(can)f(turn)f(o\013)i(unmoun)m(ting)e(using)g(the)i(`)p +Fp(nounmount)p Fx(')d(moun)m(t)i(option.)70 b(This)40 +b(will)330 3223 y(ensure)c(that)h(no)f Ft(A)n(md)46 b +Fx(symlink)36 b(could)h(ev)m(er)g(c)m(hange,)j(thereb)m(y)c(the)h(k)m +(ernel's)g(attribute)g(cac)m(he)330 3332 y(and)22 b Ft(A)n(md)32 +b Fx(will)23 b(alw)m(a)m(ys)h(b)s(e)d(in)h(sync.)38 b(Ho)m(w)m(ev)m +(er,)27 b(this)22 b(metho)s(d)g(will)h(cause)g(the)f(n)m(um)m(b)s(er)f +(of)i(moun)m(ts)330 3442 y(to)29 b(k)m(eep)g(gro)m(wing,)h(ev)m(en)f +(if)f(some)g(are)h(no)f(longer)h(in)f(use;)h(this)f(has)g(the)g(disadv) +-5 b(an)m(tage)30 b(that)f(y)m(our)330 3551 y(system)34 +b(could)g(b)s(e)g(more)g(susceptible)g(to)h(hangs)f(if)g(ev)m(en)g(one) +h(of)f(those)g(accum)m(ulating)i(moun)m(ts)330 3661 y(hangs)30 +b(due)g(to)h(a)g(do)m(wned)e(serv)m(er.)199 3806 y(2.)61 +b(Second,)40 b(y)m(ou)e(can)h(turn)e(on)h(attribute)h(cac)m(hing)g +(carefully)g(b)m(y)f(setting)h(a)g(small)f(automoun)m(ter)330 +3916 y(attribute)d(cac)m(he)h(v)-5 b(alue)34 b(\(sa)m(y)-8 +b(,)37 b(one)e(second\),)h(and)d(a)i(relativ)m(ely)i(large)e(dismoun)m +(t)f(in)m(terv)-5 b(al)35 b(\(sa)m(y)-8 b(,)330 4025 +y(one)35 b(hour\).)54 b(\(See)36 b(Section)f(6.5.8)i([dismoun)m(t)p +1942 4025 28 4 v 40 w(in)m(terv)-5 b(al)36 b(P)m(arameter],)i(page)e +(63.\))55 b(F)-8 b(or)36 b(example,)330 4135 y(y)m(ou)31 +b(can)f(set)h(this)g(in)f(y)m(our)g Fp(amd.conf)p Fx(:)570 +4280 y Fp([global])570 4389 y(auto_attrcache)44 b(=)j(1)570 +4499 y(dismount_interval)c(=)48 b(3600)330 4644 y Fx(This)34 +b(has)h(the)h(b)s(ene\014t)e(of)h(using)g(the)g(k)m(ernel's)h +(attribute)g(cac)m(he)h(and)e(th)m(us)f(impro)m(ving)i(p)s(erfor-)330 +4754 y(mance.)56 b(The)34 b(disadv)-5 b(an)m(tage)37 +b(with)e(this)g(option)g(is)h(that)f(the)h(windo)m(w)e(of)i +(vulnerabilit)m(y)f(is)h(not)330 4863 y(eliminated)31 +b(en)m(tirely:)42 b(it)31 b(is)g(only)f(made)h(smaller.)150 +5083 y Fm(6.5.3)63 b Fl(auto_dir)42 b Fm(P)m(arameter)150 +5230 y Fx(\(t)m(yp)s(e=string,)28 b(default=`)p Fp(/a)p +Fx('\).)40 b(Same)26 b(as)h(the)g Fp(-a)f Fx(option)h(to)g +Ft(A)n(md)p Fx(.)40 b(This)26 b(sets)h(the)f(priv)-5 +b(ate)27 b(directory)150 5340 y(where)j Ft(A)n(md)40 +b Fx(will)30 b(create)i(sub-directories)f(for)f(its)h(real)g(moun)m(t)f +(p)s(oin)m(ts.)p eop end +%%Page: 63 65 +TeXDict begin 63 64 bop 150 -116 a Fx(Chapter)30 b(6:)41 +b(Amd)30 b(Con\014guration)g(File)2094 b(63)150 299 y +Fm(6.5.4)63 b Fl(cache_duration)42 b Fm(P)m(arameter)150 +446 y Fx(\(t)m(yp)s(e=n)m(umeric,)28 b(default=300\).)41 +b(Same)27 b(as)g(the)g Fp(-c)g Fx(option)g(to)g Ft(A)n(md)p +Fx(.)40 b(Sets)27 b(the)g(duration)f(in)h(seconds)150 +555 y(that)k(lo)s(ok)m(ed-up)g(or)f(moun)m(ted)g(map)g(en)m(tries)h +(remain)g(in)f(the)g(cac)m(he.)150 748 y Fm(6.5.5)63 +b Fl(cluster)41 b Fm(P)m(arameter)150 895 y Fx(\(t)m(yp)s(e=string,)c +(default)e(no)g(cluster\).)55 b(Same)36 b(as)f(the)g +Fp(-C)g Fx(option)g(to)h Ft(A)n(md)p Fx(.)55 b(Sp)s(eci\014es)34 +b(the)h(alternate)150 1004 y(HP-UX)c(cluster)g(to)g(use.)150 +1196 y Fm(6.5.6)63 b Fl(debug_mtab_file)43 b Fm(P)m(arameter)150 +1343 y Fx(\(t)m(yp)s(e=string,)c(default=)p Fp(")p Fx(/tmp/m)m(tab)p +Fp(")p Fx(\).)60 b(P)m(ath)37 b(to)h(m)m(tab)f(\014le)g(that)g(is)f +(used)g(b)m(y)h Ft(A)n(md)46 b Fx(to)37 b(store)h(a)150 +1453 y(list)31 b(of)g(moun)m(ted)f(\014le)h(systems)f(during)f(debug-m) +m(tab)i(mo)s(de.)41 b(This)29 b(option)i(only)g(applies)g(to)g(systems) +150 1562 y(that)g(store)g(m)m(tab)g(information)f(on)h(disk.)150 +1754 y Fm(6.5.7)63 b Fl(debug_options)42 b Fm(P)m(arameter)150 +1901 y Fx(\(t)m(yp)s(e=string,)k(default)d(no)f(debug)g(options\).)77 +b(Same)43 b(as)f(the)h Fp(-D)f Fx(option)h(to)g Ft(A)n(md)p +Fx(.)77 b(Sp)s(ecify)42 b(an)m(y)150 2011 y(debugging)f(options)f(for)h +Ft(A)n(md)p Fx(.)71 b(W)-8 b(orks)41 b(only)g(if)g(am-utils)g(w)m(as)g +(con\014gured)f(for)g(debugging)g(using)150 2121 y(the)32 +b Fp(--enable-debug)27 b Fx(option.)45 b(The)31 b(additional)h(`)p +Fp(mem)p Fx(')f(option)h(can)g(b)s(e)f(turned)f(on)h(via)h +Fp(--enable-)150 2230 y(debug=mem)p Fx(.)45 b(Otherwise)32 +b(debugging)h(options)g(are)g(ignored.)47 b(Options)32 +b(are)h(comma)h(delimited,)g(and)150 2340 y(can)24 b(b)s(e)e(preceded)h +(b)m(y)g(the)h(string)f(`)p Fp(no)p Fx(')g(to)h(negate)h(their)e +(meaning.)38 b(Y)-8 b(ou)24 b(can)g(get)g(the)g(list)f(of)h(supp)s +(orted)150 2449 y(debugging)35 b(and)e(logging)k(options)e(b)m(y)f +(running)f Fp(amd)c(-H)p Fx(.)53 b(P)m(ossible)35 b(v)-5 +b(alues)35 b(those)g(listed)g(for)g(the)f(-D)150 2559 +y(option.)41 b(See)31 b(Section)g(4.17)h([-D)f(Option],)g(page)g(44.) +150 2751 y Fm(6.5.8)63 b Fl(dismount_interval)43 b Fm(P)m(arameter)150 +2898 y Fx(\(t)m(yp)s(e=n)m(umeric,)29 b(default=120\).)41 +b(Same)28 b(as)h(the)f Fp(-w)f Fx(option)i(to)f Ft(A)n(md)p +Fx(.)40 b(Sp)s(ecify)28 b(in)f(seconds,)i(the)f(time)150 +3008 y(b)s(et)m(w)m(een)j(attempts)g(to)g(dismoun)m(t)f(\014le)h +(systems)f(that)h(ha)m(v)m(e)h(exceeded)f(their)g(cac)m(hed)g(times.) +150 3200 y Fm(6.5.9)63 b Fl(domain_strip)42 b Fm(P)m(arameter)150 +3347 y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)23 b(default=`)p +Fp(yes)p Fx('\).)37 b(If)21 b(`)p Fp(yes)p Fx(',)h(then)e(the)h(domain) +g(name)f(part)h(referred)e(to)j(b)m(y)e Fp(${rhost})150 +3456 y Fx(is)31 b(stripp)s(ed)e(o\013.)43 b(This)31 b(is)g(useful)f(to) +i(k)m(eep)f(logs)h(and)f(smaller.)43 b(If)30 b(`)p Fp(no)p +Fx(',)h(then)g(the)g(domain)g(name)g(part)150 3566 y(is)36 +b(left)h(c)m(hanged.)58 b(This)35 b(is)h(useful)f(when)g(using)h(m)m +(ultiple)h(domains)e(with)h(the)g(same)h(maps)e(\(as)i(y)m(ou)150 +3676 y(ma)m(y)31 b(ha)m(v)m(e)h(hosts)e(whose)g(domain-stripp)s(ed)f +(name)i(is)f(iden)m(tical\).)150 3868 y Fm(6.5.10)63 +b Fl(exec_map_timeout)43 b Fm(P)m(arameter)150 4015 y +Fx(\(t)m(yp)s(e=n)m(umeric,)29 b(default=10\).)41 b(The)27 +b(timeout)j(in)d(seconds)h(that)h Ft(A)n(md)37 b Fx(will)29 +b(w)m(ait)g(for)e(an)h(executable)150 4124 y(map)c(program)h(b)s(efore) +f(an)h(answ)m(er)g(is)g(returned)e(from)h(that)i(program)e(\(or)i +(script\).)39 b(This)24 b(v)-5 b(alue)25 b(should)150 +4234 y(b)s(e)33 b(set)h(to)h(as)f(small)g(as)g(p)s(ossible)g(while)f +(still)i(allo)m(wing)g(normal)f(replies)g(to)h(b)s(e)e(returned)f(b)s +(efore)i(the)150 4343 y(timer)g(expires,)h(b)s(ecause)f(during)f(the)h +(time)g(that)h(the)f(executable)h(map)f(program)f(is)h(queried,)h +Ft(A)n(md)150 4453 y Fx(is)k(essen)m(tially)h(w)m(aiting)g(and)e(is)h +(th)m(us)f(not)h(resp)s(onding)e(to)i(an)m(y)g(other)g(queries.)65 +b(See)39 b(Section)g(3.1.9)150 4563 y([Executable)32 +b(maps],)e(page)h(23.)150 4755 y Fm(6.5.11)63 b Fl(forced_unmounts)43 +b Fm(P)m(arameter)150 4902 y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)h +(default=`)p Fp(no)p Fx('\).)73 b(Sometimes,)44 b(moun)m(t)d(p)s(oin)m +(ts)g(are)g(h)m(ung)g(due)f(to)i(unreco)m(v)m(erable)150 +5011 y(conditions,)36 b(suc)m(h)e(as)h(when)e(NFS)h(serv)m(ers)h +(migrate,)h(c)m(hange)g(their)e(IP)g(address,)h(are)g(do)m(wn)e(p)s +(erma-)150 5121 y(nen)m(tly)-8 b(,)43 b(or)d(due)g(to)g(hardw)m(are)g +(failures,)j(and)c(more.)69 b(In)40 b(this)g(case,)j(attempting)e(to)g +(unmoun)m(t)e(an)150 5230 y(existing)e(moun)m(t)f(p)s(oin)m(t,)i(or)e +(ev)m(en)h(just)e(to)i Fn(stat)p Fx(\(2\))h(it,)h(results)d(in)f(one)i +(of)f(three)g(fatal)i(errors:)51 b(EIO,)150 5340 y(EST)-8 +b(ALE,)29 b(or)g(EBUSY.)h(A)m(t)g(that)g(p)s(oin)m(t,)g +Ft(A)n(md)38 b Fx(can)30 b(do)f(little)i(to)f(reco)m(v)m(er)h(that)f(h) +m(ung)f(p)s(oin)m(t)g(\(in)h(fact,)p eop end +%%Page: 64 66 +TeXDict begin 64 65 bop 150 -116 a Fx(64)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y(the)37 +b(OS)f(cannot)i(automatically)i(reco)m(v)m(er)f(either\).)61 +b(F)-8 b(or)38 b(that)f(reason,)j(some)d(OSs)f(supp)s(ort)f(sp)s(ecial) +150 408 y(kinds)d(of)h(forced)g(unmoun)m(ts,)g(whic)m(h)f(m)m(ust)h(b)s +(e)f(used)h(v)m(ery)g(carefully:)46 b(they)33 b(will)h(force)f(an)g +(unmoun)m(t)150 518 y(immediately)27 b(\(or)f(lazily)h(on)f(Lin)m +(ux\),)h(whic)m(h)e(could)h(result)g(in)f(application)i(data)g(loss.)39 +b(Ho)m(w)m(ev)m(er,)29 b(that)150 628 y(ma)m(y)35 b(b)s(e)e(the)i(only) +f(w)m(a)m(y)h(to)g(reco)m(v)m(er)h(the)f(en)m(tire)g(host)f(\(without)h +(reb)s(o)s(oting\).)53 b(Once)34 b(a)g(h)m(ung)g(moun)m(t)150 +737 y(p)s(oin)m(t)k(is)h(forced)f(out,)j Ft(A)n(md)48 +b Fx(can)38 b(then)g(re-moun)m(t)h(a)f(replacemen)m(t)i(one)f(\(if)f(a) +m(v)-5 b(ailable\),)44 b(bringing)38 b(a)150 847 y(mostly-h)m(ung)31 +b(system)f(bac)m(k)h(to)g(op)s(eration)g(and)f(a)m(v)m(oiding)i(a)f(p)s +(oten)m(tially)h(costly)g(reb)s(o)s(ot.)275 1024 y(If)37 +b(the)g(`)p Fp(forced_unmounts)p Fx(')d(option)k(is)f(set)h(to)h(`)p +Fp(yes)p Fx(',)g(and)e(the)g(clien)m(t)i(OS)e(supp)s(orts)e(forced)j +(or)150 1134 y(lazy)45 b(unmoun)m(ts,)h(then)d Ft(A)n(md)53 +b Fx(will)44 b(attempt)g(to)h(use)e(them)h(if)f(it)h(gets)h(an)m(y)f +(of)g(the)f(three)h(serious)150 1244 y(error)30 b(conditions)h(listed)g +(ab)s(o)m(v)m(e.)42 b(Note)32 b(that)f Ft(A)n(md)39 b +Fx(will)31 b(force)g(the)g(unmoun)m(t)e(of)i(moun)m(t)f(p)s(oin)m(ts)g +(that)150 1353 y(returned)e(EBUSY)i(only)g(for)f(`)p +Fp(type:=toplvl)p Fx(')e(moun)m(ts)j(\(see)g(Section)h(5.23)g([T)-8 +b(op-lev)m(el)32 b(Filesystem],)150 1463 y(page)25 b(56\):)39 +b(that)25 b(is,)g Ft(A)n(md)9 b Fx('s)25 b(o)m(wn)f(moun)m(t)h(p)s(oin) +m(ts.)38 b(This)24 b(is)g(useful)f(to)i(reco)m(v)m(er)h(from)e(a)h +(previously)f(h)m(ung)150 1572 y Ft(A)n(md)p Fx(,)30 +b(and)f(to)h(ensure)f(that)h(an)f(existing)i Ft(A)n(md)39 +b Fx(can)29 b(sh)m(utdo)m(wn)g(cleanly)i(ev)m(en)f(if)f(some)h(pro)s +(cesses)g(are)150 1682 y(k)m(eeping)j(its)g(moun)m(t)f(p)s(oin)m(ts)h +(busy)e(\(i.e.,)j(when)e(a)h(user's)e(shell)i(pro)s(cess)f(uses)g +Fp(cd)g Fx(to)h(set)g(its)f(CWD)h(to)150 1791 y Ft(A)n(md)9 +b Fx('s)31 b(o)m(wn)f(moun)m(t)h(p)s(oin)m(t\).)275 1969 +y(If)25 b(this)h(option)g(is)g(set)g(to)h(`)p Fp(no)p +Fx(')f(\(the)g(default\),)i(then)d Ft(A)n(md)36 b Fx(will)26 +b(not)g(attempt)h(this)f(sp)s(ecial)g(reco)m(v)m(ery)150 +2079 y(pro)s(cedure.)150 2321 y Fm(6.5.12)63 b Fl(full_os)42 +b Fm(P)m(arameter)150 2468 y Fx(\(t)m(yp)s(e=string,)33 +b(default)g(to)g(compiled)g(in)f(v)-5 b(alue\).)47 b(The)32 +b(full)g(name)g(of)g(the)h(op)s(erating)g(system,)g(along)150 +2577 y(with)d(its)h(v)m(ersion.)41 b(Allo)m(ws)32 b(y)m(ou)e(to)i(o)m +(v)m(erride)f(the)g(compiled-in)g(full)f(name)g(and)g(v)m(ersion)h(of)g +(the)f(op)s(er-)150 2687 y(ating)e(system.)40 b(Useful)28 +b(when)e(the)i(compiled-in)g(name)g(is)f(not)h(desired.)39 +b(F)-8 b(or)28 b(example,)h(the)f(full)f(op)s(er-)150 +2797 y(ating)i(system)e(name)h(on)g(lin)m(ux)f(comes)i(up)d(as)i(`)p +Fp(linux)p Fx(',)g(but)f(y)m(ou)h(can)g(o)m(v)m(erride)h(it)f(to)g(`)p +Fp(linux-2.2.5)p Fx('.)150 3039 y Fm(6.5.13)63 b Fl +(fully_qualified_hosts)44 b Fm(P)m(arameter)150 3186 +y Fx(\(t)m(yp)s(e=string,)c(default=`)p Fp(no)p Fx('\).)62 +b(If)37 b(`)p Fp(yes)p Fx(',)i Ft(A)n(md)47 b Fx(will)38 +b(p)s(erform)e(RPC)g(authen)m(tication)k(using)d(fully-)150 +3295 y(quali\014ed)32 b(host)h(names.)48 b(This)32 b(is)g(necessary)h +(for)g(some)g(systems,)h(and)e(esp)s(ecially)h(when)f(p)s(erforming)150 +3405 y(cross-domain)k(moun)m(ting.)57 b(F)-8 b(or)36 +b(this)g(function)f(to)i(w)m(ork,)g(the)f Ft(A)n(md)45 +b Fx(v)-5 b(ariable)37 b(`)p Fp(${hostd})p Fx(')d(is)h(used,)150 +3515 y(requiring)30 b(that)h(`)p Fp(${domain})p Fx(')d(not)j(b)s(e)f(n) +m(ull.)150 3757 y Fm(6.5.14)63 b Fl(hesiod_base)42 b +Fm(P)m(arameter)150 3904 y Fx(\(t)m(yp)s(e=string,)31 +b(default=`)p Fp(automount)p Fx('\).)39 b(Sp)s(ecify)30 +b(the)g(base)h(name)f(for)g(hesio)s(d)g(maps.)150 4146 +y Fm(6.5.15)63 b Fl(karch)42 b Fm(P)m(arameter)150 4293 +y Fx(\(t)m(yp)s(e=string,)j(default)c(to)h(k)-5 b(arc)m(h)42 +b(of)f(the)h(system\).)74 b(Same)41 b(as)g(the)h Fp(-k)f +Fx(option)g(to)h Ft(A)n(md)p Fx(.)74 b(Allo)m(ws)150 +4403 y(y)m(ou)32 b(to)h(o)m(v)m(erride)f(the)g(k)m(ernel-arc)m +(hitecture)j(of)d(y)m(our)f(system.)45 b(Useful)32 b(for)g(example)g +(on)g(Sun)e(\(Sparc\))150 4512 y(mac)m(hines,)j(where)f(y)m(ou)g(can)h +(build)e(one)h Ft(A)n(md)41 b Fx(binary)-8 b(,)33 b(and)e(run)g(it)h +(on)g(m)m(ultiple)h(mac)m(hines,)g(y)m(et)h(y)m(ou)150 +4622 y(w)m(an)m(t)27 b(eac)m(h)g(one)g(to)g(get)g(the)f(correct)i +Ft(kar)-5 b(ch)34 b Fx(v)-5 b(ariable)27 b(set)g(\(for)f(example,)i +(sun4c,)f(sun4m,)f(sun4u,)g(etc.\))150 4732 y(Note)35 +b(that)g(if)f(not)g(sp)s(eci\014ed,)h Ft(A)n(md)43 b +Fx(will)35 b(use)e Fn(uname)p Fx(\(2\))i(to)g(\014gure)e(out)h(the)g(k) +m(ernel)h(arc)m(hitecture)h(of)150 4841 y(the)31 b(mac)m(hine.)150 +5083 y Fm(6.5.16)63 b Fl(ldap_base)42 b Fm(P)m(arameter)150 +5230 y Fx(\(t)m(yp)s(e=string,)26 b(default)f(not)f(set\).)40 +b(Sp)s(ecify)24 b(the)g(base)h(name)f(for)h(LD)m(AP)-8 +b(.)25 b(This)f(often)h(includes)f(LD)m(AP-)150 5340 +y(sp)s(eci\014c)30 b(v)-5 b(alues)31 b(suc)m(h)f(as)h(coun)m(try)f(and) +g(organization.)p eop end +%%Page: 65 67 +TeXDict begin 65 66 bop 150 -116 a Fx(Chapter)30 b(6:)41 +b(Amd)30 b(Con\014guration)g(File)2094 b(65)150 299 y +Fm(6.5.17)63 b Fl(ldap_cache_maxmem)43 b Fm(P)m(arameter)150 +446 y Fx(\(t)m(yp)s(e=n)m(umeric,)29 b(default=131072\).)43 +b(Sp)s(ecify)28 b(the)h(maxim)m(um)g(memory)f Ft(A)n(md)38 +b Fx(should)28 b(use)g(to)h(cac)m(he)150 555 y(LD)m(AP)i(en)m(tries.) +150 756 y Fm(6.5.18)63 b Fl(ldap_cache_seconds)43 b Fm(P)m(arameter)150 +903 y Fx(\(t)m(yp)s(e=n)m(umeric,)31 b(default=0\).)41 +b(Sp)s(ecify)30 b(the)g(n)m(um)m(b)s(er)f(of)i(seconds)f(to)h(k)m(eep)g +(en)m(tries)h(in)e(the)g(cac)m(he.)150 1103 y Fm(6.5.19)63 +b Fl(ldap_hostports)43 b Fm(P)m(arameter)150 1250 y Fx(\(t)m(yp)s +(e=string,)31 b(default)f(not)h(set\).)42 b(Sp)s(ecify)29 +b(the)i(LD)m(AP)g(host)f(and)g(p)s(ort)g(v)-5 b(alues.)150 +1450 y Fm(6.5.20)63 b Fl(ldap_proto_version)43 b Fm(P)m(arameter)150 +1597 y Fx(\(t)m(yp)s(e=n)m(umeric,)33 b(default=2\).)48 +b(Sp)s(ecify)32 b(the)h(LD)m(AP)g(proto)s(col)g(v)m(ersion)g(to)g(use.) +47 b(With)33 b(a)g(v)-5 b(alue)33 b(of)g(3)150 1707 y(will)e(use)f(LD)m +(APv3)h(proto)s(col.)150 1907 y Fm(6.5.21)63 b Fl(local_domain)43 +b Fm(P)m(arameter)150 2054 y Fx(\(t)m(yp)s(e=string,)38 +b(default)f(no)f(sub-domain\).)59 b(Same)36 b(as)h(the)g +Fp(-d)e Fx(option)i(to)g Ft(A)n(md)p Fx(.)59 b(Sp)s(ecify)36 +b(the)h(lo)s(cal)150 2164 y(domain)23 b(name.)38 b(If)22 +b(this)h(option)h(is)f(not)g(giv)m(en)h(the)f(domain)g(name)f(is)h +(determined)g(from)f(the)h(hostname,)150 2273 y(b)m(y)30 +b(remo)m(ving)h(the)g(\014rst)f(comp)s(onen)m(t)g(of)h(the)f +(fully-quali\014ed)h(host)f(name.)150 2474 y Fm(6.5.22)63 +b Fl(localhost_address)43 b Fm(P)m(arameter)150 2621 +y Fx(\(t)m(yp)s(e=string,)28 b(default)f(to)h(lo)s(calhost)h(or)d +(127.0.0.1\).)44 b(Sp)s(ecify)26 b(the)h(name)g(or)g(IP)g(address)f +(for)h Ft(A)n(md)36 b Fx(to)150 2730 y(use)25 b(when)f(connecting)j +(the)e(so)s(c)m(k)m(ets)i(for)e(the)h(lo)s(cal)g(NFS)g(serv)m(er)f(and) +g(the)g(RPC)g(serv)m(er.)39 b(This)25 b(defaults)150 +2840 y(to)34 b(127.0.0.1)i(or)c(whatev)m(er)i(the)f(host)g(rep)s(orts)f +(as)h(its)g(lo)s(cal)h(address.)47 b(This)32 b(parameter)h(is)g(useful) +f(on)150 2949 y(hosts)25 b(with)g(m)m(ultiple)h(addresses)e(where)h(y)m +(ou)h(w)m(an)m(t)g(to)g(force)f Ft(A)n(md)35 b Fx(to)26 +b(connect)g(to)g(a)g(sp)s(eci\014c)f(address.)150 3150 +y Fm(6.5.23)63 b Fl(log_file)42 b Fm(P)m(arameter)150 +3297 y Fx(\(t)m(yp)s(e=string,)d(default=`)p Fp(stderr)p +Fx('\).)59 b(Same)36 b(as)h(the)g Fp(-l)f Fx(option)h(to)h +Ft(A)n(md)p Fx(.)60 b(Sp)s(ecify)36 b(a)h(\014le)f(name)h(to)150 +3406 y(log)29 b Ft(A)n(md)38 b Fx(ev)m(en)m(ts)29 b(to.)41 +b(If)28 b(the)g(string)g(`)p Fp(/dev/stderr)p Fx(')d(is)k(sp)s +(eci\014ed,)f Ft(A)n(md)37 b Fx(will)29 b(send)e(its)h(ev)m(en)m(ts)i +(to)f(the)150 3516 y(standard)h(error)g(\014le)g(descriptor.)275 +3652 y(If)48 b(the)i(string)f(`)p Fp(syslog)p Fx(')f(is)h(giv)m(en,)55 +b Ft(A)n(md)j Fx(will)50 b(record)f(its)g(ev)m(en)m(ts)i(with)e(the)g +(system)g(logger)150 3761 y Fn(syslogd)p Fx(\(8\).)100 +b(If)49 b(y)m(our)g(system)h(supp)s(orts)e(syslog)i(facilities,)57 +b(then)49 b(the)h(default)f(facilit)m(y)j(used)d(is)150 +3871 y(`)p Fp(LOG_DAEMON)p Fx('.)275 4006 y(When)38 b(using)f(syslog,) +42 b(if)c(y)m(ou)g(wish)g(to)h(c)m(hange)g(the)g(facilit)m(y)-8 +b(,)43 b(app)s(end)36 b(its)j(name)f(to)h(the)f(option)150 +4116 y(name,)g(delimited)g(b)m(y)e(a)h(single)g(colon.)61 +b(F)-8 b(or)37 b(example,)i(if)e(it)g(is)f(the)h(string)g(`)p +Fp(syslog:local7)p Fx(')c(then)150 4226 y Ft(A)n(md)46 +b Fx(will)38 b(log)g(messages)g(via)f Fn(syslog)p Fx(\(3\))i(using)d +(the)i(`)p Fp(LOG_LOCAL7)p Fx(')c(facilit)m(y)-8 b(.)63 +b(If)37 b(the)g(facilit)m(y)i(name)150 4335 y(sp)s(eci\014ed)28 +b(is)g(not)g(recognized,)j Ft(A)n(md)37 b Fx(will)29 +b(default)f(to)h(`)p Fp(LOG_DAEMON)p Fx('.)38 b(Note:)j(while)28 +b(y)m(ou)h(can)g(use)f(an)m(y)150 4445 y(syslog)k(facilit)m(y)i(a)m(v) +-5 b(ailable)33 b(on)f(y)m(our)f(system,)h(it)g(is)f(generally)i(a)f +(bad)f(idea)h(to)g(use)f(those)h(reserv)m(ed)f(for)150 +4554 y(other)g(services)g(suc)m(h)f(as)g(`)p Fp(kern)p +Fx(',)g(`)p Fp(lpr)p Fx(',)h(`)p Fp(cron)p Fx(',)f(etc.)150 +4755 y Fm(6.5.24)63 b Fl(log_options)42 b Fm(P)m(arameter)150 +4902 y Fx(\(t)m(yp)s(e=string,)g(default=\\defaults"\).)68 +b(Same)40 b(as)f(the)h Fp(-x)e Fx(option)i(to)g Ft(A)n(md)p +Fx(.)67 b(Sp)s(ecify)39 b(an)m(y)g(logging)150 5011 y(options)31 +b(for)g Ft(A)n(md)p Fx(.)43 b(Options)31 b(are)g(comma)h(delimited,)h +(and)d(can)h(b)s(e)g(preceded)g(b)m(y)g(the)g(string)g(`)p +Fp(no)p Fx(')g(to)150 5121 y(negate)24 b(their)f(meaning.)39 +b(The)22 b(`)p Fp(debug)p Fx(')g(logging)j(option)e(is)g(only)g(a)m(v) +-5 b(ailable)25 b(if)e(am-utils)g(w)m(as)h(con\014gured)150 +5230 y(with)i Fp(--enable-debug)p Fx(.)36 b(Y)-8 b(ou)27 +b(can)g(get)h(the)e(list)i(of)e(supp)s(orted)f(debugging)i(options)f(b) +m(y)h(running)e Fp(amd)150 5340 y(-H)p Fx(.)40 b(P)m(ossible)31 +b(v)-5 b(alues)31 b(are:)p eop end +%%Page: 66 68 +TeXDict begin 66 67 bop 150 -116 a Fx(66)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y(`)p +Fp(all)p Fx(')286 b(all)31 b(messages)150 457 y(`)p Fp(defaults)p +Fx(')630 566 y(an)f(alias)i(for)e Fp(")p Fx(fatal,error,user,w)m +(arning,info)p Fp(")150 724 y Fx(`)p Fp(debug)p Fx(')190 +b(debug)30 b(messages)150 882 y(`)p Fp(error)p Fx(')190 +b(non-fatal)31 b(system)g(errors)f(\(cannot)h(b)s(e)f(turned)f(o\013)7 +b(\))150 1040 y(`)p Fp(fatal)p Fx(')190 b(fatal)32 b(errors)d(\(cannot) +j(b)s(e)e(turned)f(o\013)7 b(\))150 1198 y(`)p Fp(info)p +Fx(')238 b(information)150 1356 y(`)p Fp(map)p Fx(')286 +b(map)30 b(errors)150 1514 y(`)p Fp(stats)p Fx(')190 +b(additional)31 b(statistical)i(information)150 1672 +y(`)p Fp(user)p Fx(')238 b(non-fatal)31 b(user)f(errors)150 +1830 y(`)p Fp(warn)p Fx(')238 b(w)m(arnings)150 1988 +y(`)p Fp(warning)p Fx(')94 b(w)m(arnings)150 2186 y Fm(6.5.25)63 +b Fl(map_reload_interval)43 b Fm(P)m(arameter)150 2333 +y Fx(\(t)m(yp)s(e=n)m(umeric,)28 b(default=3600\).)42 +b(The)26 b(n)m(um)m(b)s(er)f(of)i(seconds)g(that)g Ft(A)n(md)37 +b Fx(will)27 b(w)m(ait)h(b)s(efore)e(it)h(c)m(hec)m(ks)150 +2443 y(to)39 b(see)f(if)g(an)m(y)h(maps)e(ha)m(v)m(e)j(c)m(hanged)e(at) +h(their)f(source)g(\(NIS)g(serv)m(ers,)j(LD)m(AP)d(serv)m(ers,)j +(\014les,)f(etc.\).)150 2552 y Ft(A)n(md)g Fx(will)30 +b(reload)h(only)g(those)g(maps)f(that)h(ha)m(v)m(e)g(c)m(hanged.)150 +2750 y Fm(6.5.26)63 b Fl(nfs_allow_any_interface)44 b +Fm(P)m(arameter)150 2897 y Fx(\(t)m(yp)s(e=string,)28 +b(default=`)p Fp(no)p Fx('\).)40 b(Normally)27 b Ft(A)n(md)37 +b Fx(accepts)28 b(lo)s(cal)g(NFS)e(pac)m(k)m(ets)j(only)e(from)f +(127.0.0.1.)150 3007 y(If)37 b(this)h(parameter)g(is)g(set)g(to)h(`)p +Fp(yes)p Fx(',)g(then)e Ft(amd)49 b Fx(will)38 b(accept)h(lo)s(cal)g +(NFS)f(pac)m(k)m(ets)h(from)f(an)m(y)g(lo)s(cal)150 3116 +y(in)m(terface;)28 b(this)23 b(is)h(useful)e(on)i(hosts)f(that)i(ma)m +(y)f(ha)m(v)m(e)h(m)m(ultiple)f(in)m(terfaces)h(where)e(the)h(system)f +(is)h(forced)150 3226 y(to)k(send)f(all)h(outgoing)h(pac)m(k)m(ets)g +(\(ev)m(en)f(those)g(b)s(ound)e(to)i(the)f(same)h(host\))g(via)g(an)f +(address)g(other)g(than)150 3335 y(127.0.0.1.)150 3533 +y Fm(6.5.27)63 b Fl(nfs_allow_insecure_port)44 b Fm(P)m(arameter)150 +3680 y Fx(\(t)m(yp)s(e=string,)33 b(default=`)p Fp(no)p +Fx('\).)45 b(Normally)33 b Ft(A)n(md)42 b Fx(will)32 +b(refuse)f(requests)h(coming)h(from)e(unprivileged)150 +3790 y(p)s(orts)k(\(i.e.,)40 b(p)s(orts)35 b Fp(>)p Fx(=)h(1024)i(on)e +(Unix)g(systems\),)i(so)e(that)h(only)f(privileged)h(users)e(and)h(the) +g(k)m(ernel)150 3899 y(can)27 b(send)f(NFS)h(requests)g(to)h(it.)40 +b(Ho)m(w)m(ev)m(er,)30 b(some)d(k)m(ernels)h(\(certain)g(v)m(ersions)f +(of)h(Darwin,)f(MacOS)h(X,)150 4009 y(and)d(Lin)m(ux\))g(ha)m(v)m(e)i +(bugs)e(that)h(cause)g(them)g(to)g(use)f(unprivileged)g(p)s(orts)g(in)g +(certain)i(situations,)g(whic)m(h)150 4118 y(causes)37 +b Ft(A)n(md)47 b Fx(to)37 b(stop)h(dead)e(in)h(its)g(trac)m(ks.)62 +b(This)36 b(parameter)i(allo)m(ws)g Ft(A)n(md)46 b Fx(to)38 +b(op)s(erate)g(normally)150 4228 y(ev)m(en)33 b(on)g(suc)m(h)g +(systems,)g(at)h(the)f(exp)s(ense)f(of)h(a)g(sligh)m(t)h(decrease)f(in) +g(the)g(securit)m(y)g(of)g(its)g(op)s(erations.)150 4338 +y(If)h(y)m(ou)h(see)h(messages)g(lik)m(e)g(\\ignoring)f(request)g(from) +g(fo)s(o:1234,)j(p)s(ort)c(not)h(reserv)m(ed")h(in)e(y)m(our)h +Ft(A)n(md)150 4447 y Fx(log,)d(try)e(enabling)h(this)f(parameter)h(and) +e(giv)m(e)j(it)f(another)g(go.)150 4645 y Fm(6.5.28)63 +b Fl(nfs_proto)42 b Fm(P)m(arameter)150 4792 y Fx(\(t)m(yp)s(e=string,) +31 b(default)f(to)g(trying)h(v)m(ersion)f(tcp)g(then)g(udp\).)39 +b(By)31 b(default,)f Ft(A)n(md)39 b Fx(tries)31 b Fp(tcp)e +Fx(and)g(then)150 4902 y Fp(udp)p Fx(.)39 b(This)27 b(option)i(forces)f +(the)g(o)m(v)m(erall)i(NFS)e(proto)s(col)h(used)e(to)i(TCP)e(or)h(UDP) +-8 b(.)29 b(It)f(o)m(v)m(errides)h(what)f(is)150 5011 +y(in)d(the)g Ft(A)n(md)34 b Fx(maps,)26 b(and)e(is)h(useful)f(when)g +Ft(A)n(md)35 b Fx(is)25 b(compiled)g(with)g(TCP)f(supp)s(ort)f(in)i +(NFSv2/NFSv3)150 5121 y(that)33 b(ma)m(y)f(not)h(b)s(e)e(stable.)47 +b(With)33 b(this)f(option)g(y)m(ou)h(can)f(turn)f(o\013)i(the)f +(complete)i(usage)f(of)f(TCP)f(for)150 5230 y(NFS)i(dynamically)g +(\(without)g(ha)m(ving)g(to)h(recompile)f Ft(A)n(md)9 +b Fx(\),)34 b(and)f(use)f(UDP)h(only)-8 b(,)34 b(un)m(til)f(suc)m(h)f +(time)150 5340 y(as)f(TCP)e(supp)s(ort)g(is)h(desired)g(again.)p +eop end +%%Page: 67 69 +TeXDict begin 67 68 bop 150 -116 a Fx(Chapter)30 b(6:)41 +b(Amd)30 b(Con\014guration)g(File)2094 b(67)150 299 y +Fm(6.5.29)63 b Fl(nfs_retransmit_counter)44 b Fm(P)m(arameter)150 +446 y Fx(\(t)m(yp)s(e=n)m(umeric,)h(default=11\).)77 +b(Same)42 b(as)g(the)g Ft(r)-5 b(etr)g(ansmit)53 b Fx(part)42 +b(of)g(the)g Fp(-t)g Ft(time)-5 b(out.r)g(etr)g(ansmit)150 +555 y Fx(option)38 b(to)h Ft(A)n(md)p Fx(.)63 b(Sp)s(eci\014es)37 +b(the)h(n)m(um)m(b)s(er)e(of)i(NFS)g(retransmissions)f(that)h(the)g(k)m +(ernel)h(will)f(use)f(to)150 665 y(comm)m(unicate)g(with)e +Ft(A)n(md)45 b Fx(using)35 b(either)h(UDP)g(or)f(TCP)g(moun)m(ts.)56 +b(See)35 b(Section)h(4.10)h([-t)g(Option],)150 775 y(page)31 +b(41.)150 978 y Fm(6.5.30)63 b Fl(nfs_retransmit_counter_udp)44 +b Fm(P)m(arameter)150 1125 y Fx(\(t)m(yp)s(e=n)m(umeric,)36 +b(default=11\).)56 b(Same)34 b(as)h(the)g Ft(nfs)p 2005 +1125 28 4 v 41 w(r)-5 b(etr)g(ansmit)p 2450 1125 V 44 +w(c)g(ounter)45 b Fx(parameter,)37 b(but)d(applied)150 +1235 y(globally)50 b(only)e(to)h(UDP)f(moun)m(ts.)94 +b(See)48 b(Section)h(6.5.29)i([nfs)p 2454 1235 V 39 w(retransmit)p +2908 1235 V 40 w(coun)m(ter)e(P)m(arameter],)150 1344 +y(page)31 b(67.)150 1548 y Fm(6.5.31)63 b Fl +(nfs_retransmit_counter_tcp)44 b Fm(P)m(arameter)150 +1695 y Fx(\(t)m(yp)s(e=n)m(umeric,)36 b(default=11\).)56 +b(Same)34 b(as)h(the)g Ft(nfs)p 2005 1695 V 41 w(r)-5 +b(etr)g(ansmit)p 2450 1695 V 44 w(c)g(ounter)45 b Fx(parameter,)37 +b(but)d(applied)150 1804 y(globally)50 b(only)f(to)g(TCP)f(moun)m(ts.) +96 b(See)49 b(Section)g(6.5.29)i([nfs)p 2453 1804 V 40 +w(retransmit)p 2908 1804 V 40 w(coun)m(ter)e(P)m(arameter],)150 +1914 y(page)31 b(67.)150 2118 y Fm(6.5.32)63 b Fl +(nfs_retransmit_counter_toplvl)45 b Fm(P)m(arameter)150 +2265 y Fx(\(t)m(yp)s(e=n)m(umeric,)32 b(default=11\).)46 +b(Same)32 b(as)g(the)g Ft(nfs)p 1983 2265 V 41 w(r)-5 +b(etr)g(ansmit)p 2428 2265 V 43 w(c)g(ounter)43 b Fx(parameter,)32 +b(applied)g(only)150 2374 y(for)f Ft(A)n(md)9 b Fx('s)32 +b(top-lev)m(el)h(UDP)f(moun)m(ts.)43 b(On)31 b(some)g(systems)h(it)f +(is)h(useful)e(to)i(set)g(this)f(di\013eren)m(tly)h(than)150 +2484 y(the)27 b(OS)e(default,)j(so)e(as)h(to)g(b)s(etter)f(tune)g +Ft(A)n(md)9 b Fx('s)27 b(resp)s(onsiv)m(eness)f(under)f(hea)m(vy)i(sc)m +(heduler)f(loads.)40 b(See)150 2593 y(Section)31 b(6.5.29)i([nfs)p +877 2593 V 39 w(retransmit)p 1331 2593 V 40 w(coun)m(ter)e(P)m +(arameter],)i(page)e(67.)150 2797 y Fm(6.5.33)63 b Fl +(nfs_retry_interval)43 b Fm(P)m(arameter)150 2944 y Fx(\(t)m(yp)s(e=n)m +(umeric,)31 b(default=8\).)44 b(Same)30 b(as)i(the)f +Ft(time)-5 b(out)40 b Fx(part)31 b(of)g(the)g Fp(-t)g +Ft(time)-5 b(out.r)g(etr)g(ansmit)42 b Fx(option)150 +3054 y(to)25 b Ft(A)n(md)p Fx(.)39 b(Sp)s(eci\014es)23 +b(the)i(NFS)f(timeout)h(in)m(terv)-5 b(al,)27 b(in)d +Ft(tenths)32 b Fx(of)25 b(seconds,)h(b)s(et)m(w)m(een)e(NFS/RPC)h +(retries)150 3163 y(\(for)35 b(UDP)h(or)f(TCP\).)g(This)f(is)i(the)f(v) +-5 b(alue)36 b(that)f(the)h(k)m(ernel)g(will)f(use)g(to)h(comm)m +(unicate)h(with)e Ft(A)n(md)p Fx(.)150 3273 y(See)c(Section)g(4.10)h +([-t)f(Option],)g(page)g(41.)275 3412 y Ft(A)n(md)g Fx(relies)23 +b(on)f(the)g(k)m(ernel)g(RPC)g(retransmit)g(mec)m(hanism)g(to)h +(trigger)g(moun)m(t)f(retries.)38 b(The)22 b(v)-5 b(alues)150 +3521 y(of)23 b(the)h Ft(nfs)p 519 3521 V 41 w(r)-5 b(etr)g(ansmit)p +964 3521 V 43 w(c)g(ounter)34 b Fx(and)23 b(the)g Ft(nfs)p +1769 3521 V 41 w(r)-5 b(etry)p 1997 3521 V 42 w(interval)33 +b Fx(parameters)24 b(c)m(hange)g(the)g(o)m(v)m(erall)h(retry)150 +3631 y(in)m(terv)-5 b(al.)48 b(T)-8 b(o)s(o)33 b(long)g(an)f(in)m(terv) +-5 b(al)34 b(giv)m(es)g(p)s(o)s(or)d(in)m(teractiv)m(e)k(resp)s(onse;)e +(to)s(o)g(short)g(an)f(in)m(terv)-5 b(al)34 b(causes)150 +3740 y(excessiv)m(e)e(retries.)150 3944 y Fm(6.5.34)63 +b Fl(nfs_retry_interval_udp)44 b Fm(P)m(arameter)150 +4091 y Fx(\(t)m(yp)s(e=n)m(umeric,)27 b(default=8\).)40 +b(Same)26 b(as)g(the)g Ft(nfs)p 1909 4091 V 41 w(r)-5 +b(etry)p 2137 4091 V 42 w(interval)36 b Fx(parameter,)27 +b(but)e(applied)g(globally)150 4200 y(only)30 b(to)i(UDP)e(moun)m(ts.) +41 b(See)31 b(Section)g(6.5.33)h([nfs)p 1935 4200 V 40 +w(retry)p 2170 4200 V 40 w(in)m(terv)-5 b(al)31 b(P)m(arameter],)h +(page)g(67.)150 4404 y Fm(6.5.35)63 b Fl(nfs_retry_interval_tcp)44 +b Fm(P)m(arameter)150 4551 y Fx(\(t)m(yp)s(e=n)m(umeric,)27 +b(default=8\).)40 b(Same)26 b(as)g(the)g Ft(nfs)p 1909 +4551 V 41 w(r)-5 b(etry)p 2137 4551 V 42 w(interval)36 +b Fx(parameter,)27 b(but)e(applied)g(globally)150 4661 +y(only)30 b(to)i(TCP)d(moun)m(ts.)41 b(See)30 b(Section)h(6.5.33)i +([nfs)p 1929 4661 V 39 w(retry)p 2163 4661 V 40 w(in)m(terv)-5 +b(al)32 b(P)m(arameter],)g(page)f(67.)150 4864 y Fm(6.5.36)63 +b Fl(nfs_retry_interval_toplvl)44 b Fm(P)m(arameter)150 +5011 y Fx(\(t)m(yp)s(e=n)m(umeric,)h(default=8\).)76 +b(Same)42 b(as)g(the)g Ft(nfs)p 2011 5011 V 41 w(r)-5 +b(etry)p 2239 5011 V 42 w(interval)52 b Fx(parameter,)46 +b(applied)41 b(only)h(for)150 5121 y Ft(A)n(md)9 b Fx('s)31 +b(top-lev)m(el)h(UDP)f(moun)m(ts.)40 b(On)30 b(some)g(systems)h(it)f +(is)h(useful)e(to)i(set)g(this)f(di\013eren)m(tly)h(than)f(the)150 +5230 y(OS)36 b(default,)k(so)d(as)g(to)h(b)s(etter)g(tune)e +Ft(A)n(md)9 b Fx('s)38 b(resp)s(onsiv)m(eness)f(under)e(hea)m(vy)j(sc)m +(heduler)f(loads.)62 b(See)150 5340 y(Section)31 b(6.5.33)i([nfs)p +877 5340 V 39 w(retry)p 1111 5340 V 40 w(in)m(terv)-5 +b(al)32 b(P)m(arameter],)g(page)f(67.)p eop end +%%Page: 68 70 +TeXDict begin 68 69 bop 150 -116 a Fx(68)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fm(6.5.37)63 +b Fl(nfs_vers)42 b Fm(P)m(arameter)150 446 y Fx(\(t)m(yp)s(e=n)m +(umeric,)c(default)e(to)g(trying)g(v)m(ersion)g(3)h(then)e(2\).)58 +b(By)36 b(default,)i Ft(A)n(md)45 b Fx(tries)36 b(v)m(ersion)g(3)h(and) +150 555 y(then)k(v)m(ersion)h(2.)74 b(This)41 b(option)h(forces)g(the)f +(o)m(v)m(erall)j(NFS)d(proto)s(col)i(used)d(to)i(v)m(ersion)g(3)g(or)g +(2.)74 b(It)150 665 y(o)m(v)m(errides)45 b(what)e(is)h(in)f(the)h +Ft(A)n(md)53 b Fx(maps,)46 b(and)d(is)h(useful)f(when)g +Ft(A)n(md)53 b Fx(is)43 b(compiled)h(with)g(NFSv3)150 +775 y(supp)s(ort)32 b(that)i(ma)m(y)g(not)g(b)s(e)f(stable.)52 +b(With)34 b(this)g(option)g(y)m(ou)g(can)g(turn)e(o\013)i(the)g +(complete)h(usage)g(of)150 884 y(NFSv3)i(dynamically)f(\(without)h(ha)m +(ving)g(to)g(recompile)g Ft(A)n(md)9 b Fx(\),)38 b(and)e(use)g(NFSv2)g +(only)-8 b(,)39 b(un)m(til)d(suc)m(h)150 994 y(time)31 +b(as)g(NFSv3)f(supp)s(ort)f(is)h(desired)g(again.)150 +1200 y Fm(6.5.38)63 b Fl(nis_domain)42 b Fm(P)m(arameter)150 +1347 y Fx(\(t)m(yp)s(e=string,)32 b(default)g(to)g(lo)s(cal)h(NIS)e +(domain)g(name\).)44 b(Same)32 b(as)f(the)h Fp(-y)f Fx(option)h(to)g +Ft(A)n(md)p Fx(.)44 b(Sp)s(ecify)150 1457 y(an)35 b(alternativ)m(e)j +(NIS)c(domain)h(from)g(whic)m(h)g(to)h(fetc)m(h)g(the)g(NIS)e(maps.)55 +b(The)35 b(default)g(is)g(the)h(system)150 1567 y(domain)30 +b(name.)41 b(This)30 b(option)g(is)h(ignored)f(if)h(NIS)e(supp)s(ort)g +(is)h(not)h(a)m(v)-5 b(ailable.)150 1773 y Fm(6.5.39)63 +b Fl(normalize_hostnames)43 b Fm(P)m(arameter)150 1920 +y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)g(default=`)p Fp(no)p +Fx('\).)69 b(Same)40 b(as)g(the)g Fp(-n)f Fx(option)h(to)h +Ft(A)n(md)p Fx(.)69 b(If)39 b(`)p Fp(yes)p Fx(',)j(then)e(the)g(name) +150 2030 y(referred)28 b(to)h(b)m(y)f Fp(${rhost})e Fx(is)i(normalized) +h(relativ)m(e)h(to)f(the)g(host)f(database)h(b)s(efore)f(b)s(eing)g +(used.)39 b(The)150 2139 y(e\013ect)32 b(is)e(to)h(translate)h(aliases) +g(in)m(to)f(\\o\016cial")i(names.)150 2346 y Fm(6.5.40)63 +b Fl(normalize_slashes)43 b Fm(P)m(arameter)150 2493 +y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)30 b(default=`)p Fp(yes)p +Fx('\).)40 b(If)28 b(`)p Fp(yes)p Fx(')g(then)h(amd)f(will)h(condense)g +(all)g(m)m(ultiple)h Fp(/)e Fx(\(slash\))h(c)m(har-)150 +2603 y(acters)h(in)m(to)f(one)g(and)f(remo)m(v)m(e)i(all)f(trailing)h +(slashes.)40 b(If)28 b(`)p Fp(no)p Fx(',)i(then)e(amd)g(will)h(not)g +(touc)m(h)g(strings)f(that)150 2712 y(ma)m(y)g(con)m(tain)h(rep)s +(eated)f(or)g(trailing)h(slashes.)40 b(The)27 b(latter)i(is)f +(sometimes)h(useful)e(with)g(SMB)h(moun)m(ts,)150 2822 +y(whic)m(h)i(often)h(require)f(m)m(ultiple)h(slash)f(c)m(haracters)i +(in)e(pathnames.)150 3029 y Fm(6.5.41)63 b Fl(os)41 b +Fm(P)m(arameter)150 3176 y Fx(\(t)m(yp)s(e=string,)d(default)f(to)g +(compiled)f(in)g(v)-5 b(alue\).)59 b(Same)37 b(as)f(the)h +Fp(-O)e Fx(option)i(to)g Ft(A)n(md)p Fx(.)58 b(Allo)m(ws)38 +b(y)m(ou)150 3285 y(to)c(o)m(v)m(erride)g(the)g(compiled-in)f(name)h +(of)f(the)g(op)s(erating)h(system.)49 b(Useful)33 b(when)f(the)i +(built-in)f(name)150 3395 y(is)42 b(not)f(desired)g(for)h(bac)m(kw)m +(ard)g(compatibilit)m(y)i(reasons.)74 b(F)-8 b(or)42 +b(example,)k(if)41 b(the)h(built-in)f(name)h(is)150 3504 +y(`)p Fp(sunos5)p Fx(',)c(y)m(ou)f(can)g(o)m(v)m(erride)h(it)g(to)g(`)p +Fp(sos5)p Fx(',)g(and)e(use)h(older)g(maps)g(whic)m(h)f(w)m(ere)i +(written)f(with)g(the)150 3614 y(latter)32 b(in)e(mind.)150 +3821 y Fm(6.5.42)63 b Fl(osver)42 b Fm(P)m(arameter)150 +3968 y Fx(\(t)m(yp)s(e=string,)31 b(default)f(to)h(compiled)f(in)g(v)-5 +b(alue\).)41 b(Same)31 b(as)f(the)g Fp(-o)g Fx(option)g(to)h +Ft(A)n(md)p Fx(.)41 b(Allo)m(ws)31 b(y)m(ou)f(to)150 +4077 y(o)m(v)m(erride)37 b(the)f(compiled-in)g(v)m(ersion)g(n)m(um)m(b) +s(er)e(of)i(the)g(op)s(erating)g(system.)57 b(Useful)35 +b(when)g(the)h(built-)150 4187 y(in)f(v)m(ersion)g(is)g(not)g(desired)g +(for)f(bac)m(kw)m(ard)i(compatibilit)m(y)h(reasons.)55 +b(F)-8 b(or)35 b(example,)i(if)e(the)g(build)f(in)150 +4296 y(v)m(ersion)26 b(is)f(`)p Fp(2.5.1)p Fx(',)h(y)m(ou)g(can)f(o)m +(v)m(erride)i(it)f(to)g(`)p Fp(5.5.1)p Fx(',)g(and)e(use)i(older)f +(maps)g(that)h(w)m(ere)g(written)f(with)150 4406 y(the)31 +b(latter)g(in)f(mind.)150 4613 y Fm(6.5.43)63 b Fl(pid_file)42 +b Fm(P)m(arameter)150 4760 y Fx(\(t)m(yp)s(e=string,)29 +b(default=`)p Fp(/dev/stdout)p Fx('\).)37 b(Sp)s(ecify)27 +b(a)h(\014le)f(to)h(store)g(the)g(pro)s(cess)f(ID)g(of)h(the)g(running) +150 4869 y(daemon)23 b(in)m(to.)40 b(If)22 b(not)i(sp)s(eci\014ed,)g +Ft(A)n(md)32 b Fx(will)24 b(prin)m(t)f(its)g(pro)s(cess)g(id)g(on)m(to) +h(the)g(standard)e(output.)38 b(Useful)150 4979 y(for)27 +b(killing)h Ft(A)n(md)36 b Fx(after)28 b(it)f(had)g(run.)38 +b(Note)28 b(that)g(the)f(PID)g(of)g(a)h(running)d Ft(A)n(md)36 +b Fx(can)28 b(also)g(b)s(e)e(retriev)m(ed)150 5088 y(via)31 +b Ft(A)n(mq)38 b Fx(\(see)31 b(Section)g(7.4.7)h([Amq)f(-p)f(option],)h +(page)g(76\).)275 5230 y(This)i(\014le)h(is)g(used)g(only)g(if)g(the)h +(`)p Fp(print_pid)p Fx(')d(option)j(is)f(on)g(\(see)h(Section)g(6.5.47) +i([prin)m(t)p 3421 5230 28 4 v 40 w(pid)c(P)m(a-)150 +5340 y(rameter],)e(page)h(69\).)p eop end +%%Page: 69 71 +TeXDict begin 69 70 bop 150 -116 a Fx(Chapter)30 b(6:)41 +b(Amd)30 b(Con\014guration)g(File)2094 b(69)150 299 y +Fm(6.5.44)63 b Fl(plock)42 b Fm(P)m(arameter)150 446 +y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)34 b(default=`)p Fp(yes)p +Fx('\).)47 b(Same)33 b(as)g(the)f Fp(-S)g Fx(option)h(to)h +Ft(A)n(md)p Fx(.)47 b(If)32 b(`)p Fp(yes)p Fx(',)h(lo)s(c)m(k)h(the)f +(running)150 555 y(executable)47 b(pages)e(of)h Ft(A)n(md)54 +b Fx(in)m(to)46 b(memory)-8 b(.)86 b(T)-8 b(o)45 b(impro)m(v)m(e)h +Ft(A)n(md)9 b Fx('s)46 b(p)s(erformance,)i(systems)d(that)150 +665 y(supp)s(ort)30 b(the)i Fn(plo)s(c)m(k)p Fx(\(3\))h(or)f +Fn(mlo)s(c)m(k)-5 b(all)p Fx(\(2\))34 b(call)f(can)f(lo)s(c)m(k)h(the)f +Ft(A)n(md)41 b Fx(pro)s(cess)31 b(in)m(to)i(memory)-8 +b(.)45 b(This)31 b(w)m(a)m(y)150 775 y(there)25 b(is)g(less)g(c)m +(hance)h(the)f(op)s(erating)g(system)g(will)h(sc)m(hedule,)g(page)g +(out,)g(and)e(sw)m(ap)h(the)g Ft(A)n(md)34 b Fx(pro)s(cess)150 +884 y(as)28 b(needed.)40 b(This)27 b(impro)m(v)m(es)i +Ft(A)n(md)9 b Fx('s)29 b(p)s(erformance,)f(at)h(the)f(cost)h(of)f +(reserving)g(the)h(memory)f(used)f(b)m(y)150 994 y(the)k +Ft(A)n(md)39 b Fx(pro)s(cess)30 b(\(making)h(it)g(una)m(v)-5 +b(ailable)32 b(for)e(other)h(pro)s(cesses\).)150 1261 +y Fm(6.5.45)63 b Fl(portmap_program)43 b Fm(P)m(arameter)150 +1408 y Fx(\(t)m(yp)s(e=n)m(umeric,)25 b(default=300019\).)42 +b(Sp)s(ecify)22 b(an)i(alternate)h(P)m(ort-mapp)s(er)e(RPC)g(program)g +(n)m(um)m(b)s(er,)150 1517 y(other)34 b(than)g(the)g(o\016cial)h(n)m +(um)m(b)s(er.)51 b(This)33 b(is)h(useful)f(when)g(running)f(m)m +(ultiple)j Ft(A)n(md)43 b Fx(pro)s(cesses.)51 b(F)-8 +b(or)150 1627 y(example,)42 b(y)m(ou)d(can)h(run)d(another)i +Ft(A)n(md)49 b Fx(in)38 b(\\test")j(mo)s(de,)g(without)e(a\013ecting)i +(the)e(primary)f Ft(A)n(md)150 1736 y Fx(pro)s(cess)25 +b(in)f(an)m(y)i(w)m(a)m(y)-8 b(.)40 b(F)-8 b(or)26 b(safet)m(y)g +(reasons,)g(the)f(alternate)i(program)e(n)m(um)m(b)s(ers)e(that)j(can)f +(b)s(e)g(sp)s(eci\014ed)150 1846 y(m)m(ust)34 b(b)s(e)f(in)h(the)g +(range)g(300019-300029,)41 b(inclusiv)m(e.)52 b Ft(A)n(mq)41 +b Fx(has)33 b(an)h(option)g Fp(-P)g Fx(whic)m(h)f(can)h(b)s(e)g(used) +150 1956 y(to)e(sp)s(ecify)g(an)f(alternate)j(program)d(n)m(um)m(b)s +(er)f(of)i(an)g Ft(A)n(md)41 b Fx(to)32 b(con)m(tact.)47 +b(In)31 b(this)h(w)m(a)m(y)-8 b(,)33 b(amq)f(can)g(fully)150 +2065 y(con)m(trol)g(an)m(y)f(n)m(um)m(b)s(er)e(of)h Ft(A)n(md)40 +b Fx(pro)s(cesses)30 b(running)f(on)h(the)h(same)f(host.)150 +2332 y Fm(6.5.46)63 b Fl(preferred_amq_port)43 b Fm(P)m(arameter)150 +2479 y Fx(\(t)m(yp)s(e=n)m(umeric,)26 b(default=0\).)39 +b(Sp)s(ecify)23 b(an)h(alternate)i(P)m(ort-mapp)s(er)d(RPC)h(p)s(ort)f +(n)m(um)m(b)s(er)g(for)g Ft(A)n(md)9 b Fx('s)150 2589 +y Ft(A)n(mq)38 b Fx(service.)43 b(This)30 b(is)h(used)e(for)i(b)s(oth)f +(UDP)h(and)f(TCP)-8 b(.)31 b(Setting)g(this)g(v)-5 b(alue)31 +b(to)h(0)f(\(or)g(not)g(de\014ning)150 2698 y(it\))25 +b(will)f(cause)h Ft(A)n(md)34 b Fx(to)24 b(select)i(an)e(arbitrary)g(p) +s(ort)f(n)m(um)m(b)s(er.)38 b(Setting)25 b(the)f Ft(A)n(mq)31 +b Fx(RPC)24 b(service)h(p)s(ort)e(to)150 2808 y(a)32 +b(sp)s(eci\014c)e(n)m(um)m(b)s(er)g(is)h(useful)g(in)g(\014rew)m(alled) +g(or)g(NA)-8 b(T'ed)32 b(en)m(vironmen)m(ts,)g(where)f(y)m(ou)g(need)g +(to)h(kno)m(w)150 2917 y(whic)m(h)e(p)s(ort)g Ft(A)n(md)40 +b Fx(will)30 b(listen)h(on.)150 3184 y Fm(6.5.47)63 b +Fl(print_pid)42 b Fm(P)m(arameter)150 3331 y Fx(\(t)m(yp)s(e=b)s(o)s +(olean,)32 b(default=`)p Fp(no)p Fx('\).)45 b(Same)32 +b(as)f(the)h Fp(-p)f Fx(option)h(to)g Ft(A)n(md)p Fx(.)45 +b(If)31 b(`)p Fp(yes)p Fx(',)g Ft(A)n(md)41 b Fx(will)32 +b(prin)m(t)g(its)150 3441 y(pro)s(cess)e(ID)g(up)s(on)f(starting.)150 +3708 y Fm(6.5.48)63 b Fl(print_version)43 b Fm(P)m(arameter)150 +3855 y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)35 b(default=`)p +Fp(no)p Fx('\).)51 b(Same)34 b(as)g(the)g Fp(-v)f Fx(option)h(to)g +Ft(A)n(md)p Fx(,)h(but)e(the)h(v)m(ersion)g(prin)m(ts)g(and)150 +3964 y Ft(A)n(md)f Fx(con)m(tin)m(ues)24 b(to)g(run.)37 +b(If)23 b(`)p Fp(yes)p Fx(',)h Ft(A)n(md)33 b Fx(will)24 +b(prin)m(t)e(its)i(v)m(ersion)g(information)f(string,)i(whic)m(h)e +(includes)150 4074 y(some)31 b(con\014guration)g(and)e(compilation)j(v) +-5 b(alues.)150 4341 y Fm(6.5.49)63 b Fl(restart_mounts)43 +b Fm(P)m(arameter)150 4488 y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)34 +b(default=`)p Fp(no)p Fx('\).)47 b(Same)33 b(as)g(the)f +Fp(-r)g Fx(option)h(to)h Ft(A)n(md)p Fx(.)47 b(If)32 +b(`)p Fp(yes)p Fx(')g Ft(A)n(md)42 b Fx(will)33 b(scan)g(the)150 +4597 y(moun)m(t)27 b(table)g(to)h(determine)f(whic)m(h)f(\014le)h +(systems)g(are)g(curren)m(tly)g(moun)m(ted.)39 b(Whenev)m(er)28 +b(one)f(of)f(these)150 4707 y(w)m(ould)k(ha)m(v)m(e)i(b)s(een)d +(auto-moun)m(ted,)j Ft(A)n(md)40 b Fx(inherits)30 b(it.)150 +4974 y Fm(6.5.50)63 b Fl(show_statfs_entries)43 b Fm(P)m(arameter)150 +5121 y Fx(\(t)m(yp)s(e=b)s(o)s(olean\),)34 b(default=`)p +Fp(no)p Fx('\).)48 b(If)32 b(`)p Fp(yes)p Fx(',)h(then)g(all)g(maps)f +(whic)m(h)h(are)g(bro)m(wsable)f(will)h(also)h(sho)m(w)150 +5230 y(the)27 b(n)m(um)m(b)s(er)e(of)h(en)m(tries)h(\(k)m(eys\))h(they) +f(ha)m(v)m(e)g(when)f Fn(df)p Fx(\(1\))g(runs.)38 b(\(This)26 +b(is)g(accomplished)i(b)m(y)e(returning)150 5340 y(non-zero)31 +b(v)-5 b(alues)31 b(to)g(the)f Fn(statfs)p Fx(\(2\))i(system)f(call\).) +p eop end +%%Page: 70 72 +TeXDict begin 70 71 bop 150 -116 a Fx(70)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fm(6.5.51)63 +b Fl(truncate_log)43 b Fm(P)m(arameter)150 446 y Fx(\(t)m(yp)s(e=b)s(o) +s(olean\),)28 b(default=`)p Fp(no)p Fx('\).)39 b(If)26 +b(`)p Fp(yes)p Fx(',)h(then)f Ft(A)n(md)35 b Fx(will)27 +b(truncate)f(the)h(log)g(\014le)f(\(if)g(it's)h(a)g(regular)150 +555 y(\014le\))k(on)g(startup.)41 b(This)30 b(could)g(b)s(e)g(useful)g +(when)g(conducting)h(extensiv)m(e)h(testing)g(on)e Ft(A)n(md)40 +b Fx(maps)31 b(\(or)150 665 y Ft(A)n(md)40 b Fx(itself)7 +b(\))31 b(and)f(y)m(ou)h(don't)f(w)m(an)m(t)h(to)h(see)f(log)g(data)g +(from)f(a)h(previous)f(run)f(in)h(the)g(same)h(\014le.)150 +853 y Fm(6.5.52)63 b Fl(unmount_on_exit)43 b Fm(P)m(arameter)150 +1000 y Fx(\(t)m(yp)s(e=b)s(o)s(olean,)30 b(default=`)p +Fp(no)p Fx('\).)41 b(If)29 b(`)p Fp(yes)p Fx(',)h(then)f +Ft(A)n(md)40 b Fx(will)30 b(attempt)g(to)h(unmoun)m(t)e(all)h(\014le)g +(systems)150 1110 y(whic)m(h)43 b(it)h(kno)m(ws)e(ab)s(out.)79 +b(Normally)44 b(it)g(lea)m(v)m(es)h(all)f(\(esp.)79 b(NFS\))44 +b(moun)m(ted)f(\014le)g(systems)g(in)m(tact.)150 1219 +y(Note)36 b(that)f Ft(A)n(md)44 b Fx(do)s(es)34 b(not)h(kno)m(w)g(ab)s +(out)f(\014le)h(systems)f(moun)m(ted)h(b)s(efore)f(it)h(starts)g(up,)g +(unless)f(the)150 1329 y(`)p Fp(restart_mounts)p Fx(')27 +b(option)j(is)h(used)e(\(see)i(Section)g(6.5.49)i([restart)p +2537 1329 28 4 v 40 w(moun)m(ts)e(P)m(arameter],)h(page)e(69\).)150 +1517 y Fm(6.5.53)63 b Fl(use_tcpwrappers)43 b Fm(P)m(arameter)150 +1664 y Fx(\(t)m(yp)s(e=b)s(o)s(olean\),)92 b(default=`)p +Fp(yes)p Fx('\).)187 b(If)78 b(`)p Fp(yes)p Fx(',)91 +b(then)79 b(amd)g(will)g(use)g(the)g(tcp)m(wrapp)s(ers)150 +1774 y(\(tcp)s(d/librw)m(ap\))36 b(library)g(\(if)g(a)m(v)-5 +b(ailable\))39 b(to)e(con)m(trol)h(access)f(to)g Ft(A)n(md)45 +b Fx(via)37 b(the)f Fp(/etc/hosts.allow)150 1883 y Fx(and)f +Fp(/etc/hosts.deny)c Fx(\014les.)57 b Ft(A)n(md)44 b +Fx(will)36 b(v)m(erify)g(that)h(the)e(host)h(running)e +Ft(A)n(mq)43 b Fx(is)35 b(authorized)h(to)150 1993 y(connect.)k(The)25 +b Fp(amd)g Fx(service)h(name)g(m)m(ust)f(used)g(in)g(the)h +Fp(/etc/hosts.allow)21 b Fx(and)k Fp(/etc/hosts.deny)150 +2103 y Fx(\014les.)133 b(F)-8 b(or)62 b(example,)69 b(to)62 +b(allo)m(w)h(only)e(lo)s(calhost)i(to)e(connect)h(to)g +Ft(A)n(md)p Fx(,)69 b(add)61 b(this)g(line)g(to)150 2212 +y Fp(/etc/hosts.allow)p Fx(:)390 2341 y Fp(amd:)47 b(localhost)275 +2470 y Fx(and)29 b(this)i(line)f(to)h Fp(/etc/hosts.deny)p +Fx(:)390 2599 y Fp(amd:)47 b(ALL)275 2728 y Fx(Consult)21 +b(the)h(man)f(pages)h(for)g Fn(hosts)p 1525 2728 28 5 +v 40 w(access)p Fx(\(5\))i(for)d(more)h(information)g(on)g(using)f(the) +h(tcp)m(wrapp)s(ers)150 2838 y(access-con)m(trol)33 b(library)-8 +b(.)275 2967 y(Note)43 b(that)g(in)e(particular,)46 b(y)m(ou)d(should)e +(not)h(con\014gure)g(y)m(our)g Fp(hosts.allow)d Fx(\014le)j(to)h(spa)m +(wn)f(a)150 3077 y(command)28 b(for)g Ft(A)n(md)9 b Fx(:)40 +b(that)28 b(will)h(cause)g Ft(A)n(md)37 b Fx(to)29 b(not)f(b)s(e)g +(able)g(to)h Fp(waitpid)d Fx(on)i(the)h(c)m(hild)f(pro)s(cess)g(ID)150 +3186 y(of)i(an)m(y)h(bac)m(kground)f(un/moun)m(t)g(that)h +Ft(A)n(md)40 b Fx(issued,)29 b(resulting)i(in)f(a)g(confused)g +Ft(A)n(md)40 b Fx(that)31 b(do)s(es)f(not)150 3296 y(kno)m(w)g(what)h +(happ)s(ened)d(to)j(those)g(bac)m(kground)f(un/moun)m(t)g(requests.)150 +3484 y Fm(6.5.54)63 b Fl(vendor)42 b Fm(P)m(arameter)150 +3631 y Fx(\(t)m(yp)s(e=string,)47 b(default)d(to)g(compiled)g(in)f(v)-5 +b(alue\).)81 b(The)43 b(name)h(of)f(the)h(v)m(endor)f(of)h(the)f(op)s +(erating)150 3741 y(system.)e(Ov)m(errides)31 b(the)g(compiled-in)g(v)m +(endor)f(name.)41 b(Useful)31 b(when)f(the)g(compiled-in)h(name)g(is)g +(not)150 3850 y(desired.)40 b(F)-8 b(or)30 b(example,)h(most)e(In)m +(tel)i(based)e(systems)g(set)h(the)g(v)m(endor)f(name)g(to)h(`)p +Fp(unknown)p Fx(',)f(but)g(y)m(ou)150 3960 y(can)i(set)g(it)f(to)i(`)p +Fp(redhat)p Fx('.)150 4181 y Fw(6.6)68 b(Regular)46 b(Map)f(P)l +(arameters)150 4341 y Fx(The)30 b(follo)m(wing)i(parameters)e(are)h +(applicable)g(only)g(to)g(regular)g(map)f(sections.)150 +4529 y Fm(6.6.1)63 b(map)p 703 4529 37 5 v 54 w(name)41 +b(P)m(arameter)150 4676 y Fx(\(t)m(yp)s(e=string,)31 +b(m)m(ust)f(b)s(e)g(sp)s(eci\014ed\).)40 b(Name)31 b(of)g(the)f(map)g +(where)g(the)h(k)m(eys)g(are)g(lo)s(cated.)150 4864 y +Fm(6.6.2)63 b(tag)40 b(P)m(arameter)150 5011 y Fx(\(t)m(yp)s(e=string,) +28 b(default)e(no)g(tag\).)41 b(Eac)m(h)27 b(map)f(en)m(try)h(in)f(the) +h(con\014guration)f(\014le)h(can)f(b)s(e)g(tagged.)41 +b(If)26 b(no)150 5121 y(tag)34 b(is)f(sp)s(eci\014ed,)g(that)g(map)f +(section)i(will)f(alw)m(a)m(ys)h(b)s(e)f(pro)s(cessed)f(b)m(y)g +Ft(A)n(md)p Fx(.)48 b(If)32 b(it)i(is)e(sp)s(eci\014ed,)h(then)150 +5230 y Ft(A)n(md)41 b Fx(will)33 b(pro)s(cess)e(the)i(map)e(if)h(the)h +Fp(-T)e Fx(option)h(w)m(as)h(giv)m(en)g(to)g Ft(A)n(md)p +Fx(,)f(and)g(the)g(v)-5 b(alue)33 b(giv)m(en)g(to)f(that)150 +5340 y(command-line)f(option)g(matc)m(hes)g(that)g(in)f(the)h(map)f +(section.)p eop end +%%Page: 71 73 +TeXDict begin 71 72 bop 150 -116 a Fx(Chapter)30 b(6:)41 +b(Amd)30 b(Con\014guration)g(File)2094 b(71)150 299 y +Fw(6.7)68 b(amd.conf)45 b(Examples)150 458 y Fx(The)36 +b(follo)m(wing)i(is)e(the)h(actual)g Fp(amd.conf)e Fx(\014le)h(I)g +(used)g(at)h(the)f(Computer)g(Science)h(Departmen)m(t)h(of)150 +568 y(Colum)m(bia)31 b(Univ)m(ersit)m(y)-8 b(.)390 702 +y Fp(#)47 b(GLOBAL)g(OPTIONS)e(SECTION)390 812 y([)i(global)g(])390 +922 y(normalize_hostnames)c(=)190 b(no)390 1031 y(print_pid)45 +b(=)668 b(no)390 1141 y(#pid_file)45 b(=)668 b(/var/run/amd.pid)390 +1250 y(restart_mounts)44 b(=)429 b(yes)390 1360 y(#unmount_on_exit)43 +b(=)334 b(yes)390 1469 y(auto_dir)46 b(=)715 b(/n)390 +1579 y(log_file)46 b(=)715 b(/var/log/amd)390 1689 y(log_options)45 +b(=)572 b(all)390 1798 y(#debug_options)44 b(=)429 b(defaults)390 +1908 y(plock)46 b(=)859 b(no)390 2017 y(selectors_in_defaults)42 +b(=)95 b(yes)390 2127 y(#)47 b(config.guess)e(picks)h(up)h("sunos5")f +(and)h(I)g(don't)g(want)f(to)i(edit)e(my)h(maps)g(yet)390 +2237 y(os)g(=)1002 b(sos5)390 2346 y(#)47 b(if)h(you)f(print_version)d +(after)i(setting)g(up)h("os",)f(it)i(will)e(show)h(it.)390 +2456 y(print_version)d(=)477 b(no)390 2565 y(map_type)46 +b(=)715 b(file)390 2675 y(search_path)45 b(=)572 b +(/etc/amdmaps:/usr/lib/amd)o(:/us)o(r/l)o(ocal)o(/AMD)o(/li)o(b)390 +2785 y(browsable_dirs)44 b(=)429 b(yes)390 2894 y +(fully_qualified_hosts)42 b(=)95 b(no)390 3113 y(#)47 +b(DEFINE)g(AN)g(AMD)g(MOUNT)f(POINT)390 3223 y([)h(/u)h(])390 +3333 y(map_name)e(=)715 b(amd.u)390 3552 y([)47 b(/proj)g(])390 +3661 y(map_name)f(=)715 b(amd.proj)390 3880 y([)47 b(/src)g(])390 +3990 y(map_name)f(=)715 b(amd.src)390 4209 y([)47 b(/misc)g(])390 +4319 y(map_name)f(=)715 b(amd.misc)390 4538 y([)47 b(/import)f(])390 +4648 y(map_name)g(=)715 b(amd.import)390 4867 y([)47 +b(/tftpboot/.amd)d(])390 4976 y(tag)j(=)954 b(tftpboot)390 +5086 y(map_name)46 b(=)715 b(amd.tftpboot)p eop end +%%Page: 72 74 +TeXDict begin 72 73 bop eop end +%%Page: 73 75 +TeXDict begin 73 74 bop 150 -116 a Fx(Chapter)30 b(7:)41 +b(Run-time)30 b(Administration)2035 b(73)150 299 y Fu(7)80 +b(Run-time)53 b(Administration)150 655 y Fw(7.1)68 b(Starting)46 +b Fg(A)l(md)150 815 y Ft(A)n(md)37 b Fx(is)28 b(b)s(est)g(started)g +(from)f(`)p Fp(/etc/rc.local)p Fx(')e(on)j(BSD)g(systems,)h(or)f(from)f +(the)h(appropriate)g(start-)150 924 y(lev)m(el)k(script)e(in)g(`)p +Fp(/etc/init.d)p Fx(')e(on)i(System)h(V)f(systems.)390 +1066 y Fp(if)47 b([)h(-f)f(/usr/local/sbin/ctl-amd)41 +b(];)47 b(then)581 1176 y(/usr/local/sbin/ctl-amd)41 +b(start;)46 b(\(echo)h(-n)g(')g(amd'\))g(>)g(/dev/console)390 +1285 y(fi)150 1427 y Fx(The)32 b(shell)h(script,)g(`)p +Fp(ctl-amd)p Fx(')e(is)h(used)g(to)h(start,)h(stop,)f(or)f(restart)h +Ft(A)n(md)p Fx(.)47 b(It)33 b(is)f(a)h(relativ)m(ely)i(generic)150 +1536 y(script.)49 b(All)34 b(options)g(y)m(ou)f(w)m(an)m(t)i(to)f(set)f +(should)g(not)g(b)s(e)g(made)g(in)g(this)g(script,)i(but)d(rather)h(up) +s(dated)150 1646 y(in)d(the)h Fp(amd.conf)d Fx(\014le.)41 +b(See)30 b(Chapter)g(6)h([Amd)f(Con\014guration)g(File],)i(page)f(59.) +275 1787 y(If)f(y)m(ou)h(do)g(not)g(wish)f(to)h(use)g(an)f +Ft(A)n(md)41 b Fx(con\014guration)31 b(\014le,)g(y)m(ou)g(ma)m(y)h +(start)f Ft(A)n(md)40 b Fx(man)m(ually)-8 b(.)43 b(F)-8 +b(or)150 1897 y(example,)31 b(getting)h(the)f(map)f(en)m(tries)h(via)g +(NIS:)390 2038 y Fp(amd)47 b(-r)g(-l)g(/var/log/amd)e(`ypcat)h(-k)h +(auto.master`)150 2281 y Fw(7.2)68 b(Stopping)45 b Fg(A)l(md)150 +2441 y Ft(A)n(md)40 b Fx(stops)30 b(in)g(resp)s(onse)g(to)h(t)m(w)m(o)g +(signals.)150 2611 y(`)p Fp(SIGTERM)p Fx(')94 b(causes)29 +b(the)f(top-lev)m(el)i(automoun)m(t)f(p)s(oin)m(ts)f(to)h(b)s(e)f +(unmoun)m(ted)f(and)g(then)h Ft(A)n(md)38 b Fx(to)29 +b(exit.)630 2720 y(An)m(y)45 b(automoun)m(ted)g(\014lesystems)g(are)h +(left)f(moun)m(ted.)84 b(They)44 b(can)h(b)s(e)g(reco)m(v)m(ered)h(b)m +(y)630 2830 y(restarting)31 b Ft(A)n(md)40 b Fx(with)30 +b(the)h Fp(-r)e Fx(command)h(line)h(option.)150 2996 +y(`)p Fp(SIGINT)p Fx(')142 b(causes)28 b Ft(A)n(md)37 +b Fx(to)29 b(attempt)g(to)g(unmoun)m(t)d(an)m(y)j(\014lesystems)f(whic) +m(h)f(it)h(has)g(automoun)m(ted,)630 3106 y(in)f(addition)g(to)g(the)g +(actions)h(of)f(`)p Fp(SIGTERM)p Fx('.)39 b(This)26 b(signal)h(is)g +(primarily)g(used)f(for)g(debug-)630 3215 y(ging.)275 +3385 y(Actions)31 b(tak)m(en)g(for)f(other)h(signals)g(are)g +(unde\014ned.)275 3527 y(The)e(easiest)i(and)e(safest)h(w)m(a)m(y)h(to) +f(stop)g Ft(A)n(md)p Fx(,)g(without)g(ha)m(ving)g(to)g(\014nd)e(its)i +(pro)s(cess)f(ID)h(b)m(y)g(hand,)150 3636 y(is)g(to)i(use)e(the)g +Fp(ctl-amd)f Fx(script,)h(as)h(with:)390 3778 y Fp(ctl-amd)46 +b(stop)150 4021 y Fw(7.3)68 b(Restarting)47 b Fg(A)l(md)150 +4180 y Fx(Before)29 b Ft(A)n(md)37 b Fx(can)29 b(b)s(e)e(started,)i(it) +g(is)f(vital)h(to)g(ensure)f(that)g(no)g(other)g Ft(A)n(md)38 +b Fx(pro)s(cesses)28 b(are)g(managing)150 4290 y(an)m(y)i(of)f(the)g +(moun)m(t)g(p)s(oin)m(ts,)h(and)f(that)g(the)h(previous)e(pro)s +(cess\(es\))i(ha)m(v)m(e)h(terminated)e(cleanly)-8 b(.)42 +b(When)150 4399 y(a)26 b(terminating)h(signal)g(is)f(set)g(to)h +Ft(A)n(md)p Fx(,)g(the)f(automoun)m(ter)h(do)s(es)f Ft(not)35 +b Fx(terminate)27 b(righ)m(t)g(then.)39 b(Rather,)150 +4509 y(it)i(starts)g(b)m(y)f(unmoun)m(ting)g(all)h(of)g(its)f(managed)h +(moun)m(t)g(moun)m(ts)f(in)g(the)g(bac)m(kground,)j(and)d(then)150 +4619 y(terminates.)57 b(It)36 b(usually)f(tak)m(es)i(a)f(few)g(seconds) +f(for)h(this)f(pro)s(cess)g(to)h(happ)s(en,)g(but)f(it)h(can)g(tak)m(e) +h(an)150 4728 y(arbitrarily)30 b(longer)h(time.)41 b(If)29 +b(t)m(w)m(o)j(or)e(more)g Ft(A)n(md)39 b Fx(pro)s(cesses)30 +b(attempt)h(to)g(manage)f(the)h(same)f(moun)m(t)150 4838 +y(p)s(oin)m(t,)h(it)g(usually)f(will)g(result)h(in)f(a)g(system)h(lo)s +(c)m(kup.)275 4979 y(The)39 b(easiest)i(and)e(safest)i(w)m(a)m(y)g(to)f +(restart)h Ft(A)n(md)p Fx(,)h(without)e(ha)m(ving)g(to)h(\014nd)d(its)j +(pro)s(cess)e(ID)h(b)m(y)150 5089 y(hand,)34 b(sending)f(it)i(the)f(`)p +Fp(SIGTERM)p Fx(')f(signal,)j(w)m(aiting)f(for)f Ft(A)n(md)43 +b Fx(to)35 b(die)f(cleanly)-8 b(,)37 b(and)c(v)m(erifying)i(so,)g(is) +150 5198 y(to)c(use)f(the)h Fp(ctl-amd)d Fx(script,)j(as)f(with:)390 +5340 y Fp(ctl-amd)46 b(restart)p eop end +%%Page: 74 76 +TeXDict begin 74 75 bop 150 -116 a Fx(74)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(The)d(script)i +(will)f(lo)s(cate)j(the)d(pro)s(cess)g(ID)h(of)f Ft(A)n(md)p +Fx(,)h(kill)g(it,)h(and)e(w)m(ait)h(for)f(it)h(to)g(die)g(cleanly)g(b)s +(efore)150 408 y(starting)h(a)f(new)g(instance)h(of)f(the)g(automoun)m +(ter.)41 b Fp(ctl-amd)27 b Fx(will)j(w)m(ait)g(for)f(a)g(total)i(of)e +(30)h(seconds)f(for)150 518 y Ft(A)n(md)40 b Fx(to)31 +b(die,)g(and)e(will)i(c)m(hec)m(k)h(once)f(ev)m(ery)g(5)g(seconds)f(if) +h(it)g(had.)150 751 y Fw(7.4)68 b(Con)l(trolling)47 b +Fg(A)l(md)150 910 y Fx(It)e(is)g(sometimes)h(desirable)f(or)g +(necessary)g(to)h(exercise)g(external)g(con)m(trol)g(o)m(v)m(er)g(some) +f(of)g Ft(A)n(md)9 b Fx('s)150 1020 y(in)m(ternal)37 +b(state.)58 b(T)-8 b(o)36 b(supp)s(ort)e(this)i(requiremen)m(t,)i +Ft(A)n(md)45 b Fx(implemen)m(ts)36 b(an)g(RPC)f(in)m(terface)i(whic)m +(h)f(is)150 1129 y(used)30 b(b)m(y)g(the)g Fo(Amq)j Fx(program.)40 +b(A)31 b(v)-5 b(ariet)m(y)31 b(of)g(information)g(is)f(a)m(v)-5 +b(ailable.)275 1264 y Ft(A)n(mq)33 b Fx(generally)27 +b(applies)g(an)f(op)s(eration,)h(sp)s(eci\014ed)f(b)m(y)f(a)i(single)g +(letter)g(option,)h(to)f(a)f(list)h(of)f(moun)m(t)150 +1374 y(p)s(oin)m(ts.)39 b(The)25 b(default)g(op)s(eration)h(is)f(to)i +(obtain)e(statistics)j(ab)s(out)d(eac)m(h)h(moun)m(t)g(p)s(oin)m(t.)39 +b(This)24 b(is)i(similar)150 1483 y(to)h(the)g(output)f(sho)m(wn)g(ab)s +(o)m(v)m(e)i(but)d(includes)h(information)h(ab)s(out)f(the)h(n)m(um)m +(b)s(er)e(and)h(t)m(yp)s(e)h(of)f(accesses)150 1593 y(to)31 +b(eac)m(h)h(moun)m(t)e(p)s(oin)m(t.)150 1792 y Fm(7.4.1)63 +b Ff(A)m(mq)52 b Fm(default)42 b(information)150 1939 +y Fx(With)27 b(no)f(argumen)m(ts,)i Fo(Amq)g Fx(obtains)e(a)h(brief)f +(list)h(of)f(all)h(existing)g(moun)m(ts)g(created)g(b)m(y)f +Ft(A)n(md)p Fx(.)39 b(This)26 b(is)150 2049 y(di\013eren)m(t)g(from)g +(the)g(list)h(displa)m(y)m(ed)g(b)m(y)e Fn(df)p Fx(\(1\))i(since)f(the) +g(latter)i(only)e(includes)g(system)g(moun)m(t)g(p)s(oin)m(ts.)150 +2184 y(The)k(output)g(from)g(this)g(option)h(includes)f(the)g(follo)m +(wing)i(information:)225 2318 y Fv(\017)60 b Fx(the)31 +b(automoun)m(t)g(p)s(oin)m(t,)225 2453 y Fv(\017)60 b +Fx(the)31 b(\014lesystem)f(t)m(yp)s(e,)225 2588 y Fv(\017)60 +b Fx(the)31 b(moun)m(t)f(map)g(or)g(moun)m(t)h(information,)225 +2722 y Fv(\017)60 b Fx(the)31 b(in)m(ternal,)g(or)f(system)h(moun)m(t)f +(p)s(oin)m(t.)150 2882 y(F)-8 b(or)31 b(example:)390 +3017 y Fp(/)572 b(root)143 b("root")952 b(sky:\(pid75\))390 +3126 y(/homes)332 b(toplvl)47 b(/usr/local/etc/amd.home)o(s)89 +b(/homes)390 3236 y(/home)380 b(toplvl)47 b(/usr/local/etc/amd.home)136 +b(/home)390 3345 y(/homes/jsp)k(nfs)191 b(charm:/home/charm)424 +b(/a/charm/home/charm/jsp)390 3455 y(/homes/phjk)92 b(nfs)191 +b(toytown:/home/toytown)232 b(/a/toytown/home/toytown/ai)o(/phj)o(k)p +4065 3475 42 84 v 150 3590 a Fx(If)30 b(an)g(argumen)m(t)h(is)f(giv)m +(en)i(then)e(statistics)i(for)e(that)h(v)m(olume)g(name)g(will)g(b)s(e) +e(output.)41 b(F)-8 b(or)31 b(example:)390 3725 y Fp(What)428 +b(Uid)143 b(Getattr)46 b(Lookup)g(RdDir)142 b(RdLnk)f(Statfs)46 +b(Mounted@)390 3834 y(/homes)332 b(0)239 b(1196)190 b(512)g(22)286 +b(0)333 b(30)238 b(90/09/14)46 b(12:32:55)p 3922 3842 +42 71 v 390 3944 a(/homes/jsp)140 b(0)239 b(0)334 b(0)286 +b(0)334 b(1180)189 b(0)286 b(90/10/13)46 b(12:56:58)p +3922 3964 42 84 v 150 4103 a(What)288 b Fx(the)31 b(v)m(olume)g(name.) +150 4263 y Fp(Uid)336 b Fx(ignored.)150 4423 y Fp(Getattr)144 +b Fx(the)32 b(coun)m(t)h(of)f(NFS)g Fo(getattr)40 b Fx(requests)32 +b(on)g(this)f(no)s(de.)45 b(This)31 b(should)g(only)h(b)s(e)f(non-zero) +630 4532 y(for)f(directory)h(no)s(des.)150 4692 y Fp(Lookup)192 +b Fx(the)33 b(coun)m(t)g(of)g(NFS)f Fo(lo)s(okup)j Fx(requests)d(on)h +(this)f(no)s(de.)47 b(This)31 b(should)h(only)g(b)s(e)g(non-zero)630 +4802 y(for)e(directory)h(no)s(des.)150 4961 y Fp(RdDir)240 +b Fx(the)31 b(coun)m(t)h(of)g(NFS)f Fo(readdir)37 b Fx(requests)31 +b(on)g(this)g(no)s(de.)43 b(This)30 b(should)g(only)i(b)s(e)e(non-zero) +630 5071 y(for)g(directory)h(no)s(des.)150 5230 y Fp(RdLnk)240 +b Fx(the)45 b(coun)m(t)g(of)g(NFS)f Fo(readlink)50 b +Fx(requests)45 b(on)f(this)h(no)s(de.)82 b(This)44 b(should)g(b)s(e)g +(zero)h(for)630 5340 y(directory)31 b(no)s(des.)p eop +end +%%Page: 75 77 +TeXDict begin 75 76 bop 150 -116 a Fx(Chapter)30 b(7:)41 +b(Run-time)30 b(Administration)2035 b(75)150 299 y Fp(Statfs)192 +b Fx(the)36 b(coun)m(t)h(of)f(NFS)g Fo(statfs)k Fx(requests)c(on)f +(this)h(no)s(de.)57 b(This)35 b(should)g(only)h(b)s(e)f(non-zero)630 +408 y(for)30 b(top-lev)m(el)j(automoun)m(t)e(p)s(oin)m(ts.)150 +570 y Fp(Mounted@)96 b Fx(the)31 b(date)g(and)e(time)i(the)g(v)m(olume) +g(name)g(w)m(as)f(\014rst)g(referenced.)150 771 y Fm(7.4.2)63 +b Ff(A)m(mq)52 b Fl(-f)42 b Fm(option)150 918 y Fx(The)22 +b Fp(-f)h Fx(option)g(causes)h Ft(A)n(md)32 b Fx(to)24 +b(\015ush)d(the)i(in)m(ternal)h(moun)m(t)f(map)f(cac)m(he.)40 +b(This)22 b(is)h(useful)g(for)f(example)150 1028 y(in)i(Hesio)s(d)h +(maps)f(since)g Ft(A)n(md)34 b Fx(will)25 b(not)g(automatically)i +(notice)f(when)d(they)i(ha)m(v)m(e)g(b)s(een)f(up)s(dated.)37 +b(The)150 1137 y(map)e(cac)m(he)h(can)f(also)h(b)s(e)e(sync)m(hronized) +h(with)g(the)g(map)f(source)h(b)m(y)g(using)f(the)h(`)p +Fp(sync)p Fx(')g(option)g(\(see)150 1247 y(Section)c(5.19)h([Automoun)m +(t)f(Filesystem],)h(page)g(54\).)150 1448 y Fm(7.4.3)63 +b Ff(A)m(mq)52 b Fl(-h)42 b Fm(option)150 1595 y Fx(By)30 +b(default)g(the)h(lo)s(cal)g(host)f(is)g(used.)40 b(In)29 +b(an)h(HP-UX)h(cluster)f(the)g(ro)s(ot)g(serv)m(er)h(is)f(used)f(since) +h(that)h(is)150 1705 y(the)j(only)f(place)i(in)e(the)h(cluster)g(where) +f Ft(A)n(md)43 b Fx(will)34 b(b)s(e)f(running.)49 b(T)-8 +b(o)34 b(query)f Ft(A)n(md)43 b Fx(on)33 b(another)h(host)150 +1814 y(the)d Fp(-h)e Fx(option)i(should)f(b)s(e)f(used.)150 +2016 y Fm(7.4.4)63 b Ff(A)m(mq)52 b Fl(-H)42 b Fm(option)150 +2163 y Fx(Prin)m(t)30 b(a)h(brief)f(help)g(and)g(usage)h(string.)150 +2364 y Fm(7.4.5)63 b Ff(A)m(mq)52 b Fl(-l)42 b Fm(option)150 +2511 y Fx(T)-8 b(ell)34 b Ft(A)n(md)43 b Fx(to)34 b(use)f +Ft(lo)-5 b(g)p 948 2511 28 4 v 41 w(\014le)41 b Fx(as)33 +b(the)h(log)g(\014le)f(name.)50 b(F)-8 b(or)34 b(securit)m(y)g +(reasons,)g(this)f Ft(must)42 b Fx(b)s(e)33 b(the)h(same)150 +2620 y(log)28 b(\014le)e(whic)m(h)g Ft(A)n(md)36 b Fx(used)26 +b(when)f(started.)40 b(This)26 b(option)h(is)f(therefore)h(only)g +(useful)f(to)h(refresh)e Ft(A)n(md)9 b Fx('s)150 2730 +y(op)s(en)25 b(\014le)g(handle)g(on)h(the)f(log)i(\014le,)g(so)f(that)g +(it)g(can)f(b)s(e)g(rotated)i(and)e(compressed)g(via)h(daily)g(cron)f +(jobs.)150 2931 y Fm(7.4.6)63 b Ff(A)m(mq)52 b Fl(-m)42 +b Fm(option)150 3078 y Fx(The)35 b Fp(-m)g Fx(option)i(displa)m(ys)f +(similar)g(information)g(ab)s(out)f(moun)m(ted)h(\014lesystems,)i +(rather)d(than)h(auto-)150 3188 y(moun)m(t)30 b(p)s(oin)m(ts.)41 +b(The)30 b(output)g(includes)g(the)g(follo)m(wing)i(information:)225 +3324 y Fv(\017)60 b Fx(the)31 b(moun)m(t)f(information,)225 +3460 y Fv(\017)60 b Fx(the)31 b(moun)m(t)f(p)s(oin)m(t,)225 +3595 y Fv(\017)60 b Fx(the)31 b(\014lesystem)f(t)m(yp)s(e,)225 +3731 y Fv(\017)60 b Fx(the)31 b(n)m(um)m(b)s(er)e(of)h(references)h(to) +g(this)f(\014lesystem,)225 3866 y Fv(\017)60 b Fx(the)31 +b(serv)m(er)f(hostname,)225 4002 y Fv(\017)60 b Fx(the)31 +b(state)g(of)g(the)f(\014le)h(serv)m(er,)225 4137 y Fv(\017)60 +b Fx(an)m(y)31 b(error)f(whic)m(h)g(has)g(o)s(ccurred.)275 +4300 y(F)-8 b(or)31 b(example:)390 4436 y Fp("root")523 +b(truth:\(pid602\))235 b(root)142 b(1)48 b(localhost)d(is)i(up)390 +4546 y(hesiod.home)283 b(/home)667 b(toplvl)46 b(1)i(localhost)d(is)i +(up)390 4656 y(hesiod.vol)331 b(/vol)715 b(toplvl)46 +b(1)i(localhost)d(is)i(up)390 4765 y(hesiod.homes)235 +b(/homes)619 b(toplvl)46 b(1)i(localhost)d(is)i(up)390 +4875 y(amy:/home/amy)187 b(/a/amy/home/amy)g(nfs)j(5)48 +b(amy)f(is)g(up)390 4984 y(swan:/home/swan)91 b(/a/swan/home/swan)g +(nfs)190 b(0)48 b(swan)e(is)i(up)f(\(Permission)d(denied\))p +3970 5004 42 84 v 390 5094 a(ex:/home/ex)283 b(/a/ex/home/ex)g(nfs)190 +b(0)48 b(ex)f(is)g(down)275 5230 y Fx(When)26 b(the)h(reference)g(coun) +m(t)g(is)f(zero)i(the)e(\014lesystem)h(is)g(not)g(moun)m(ted)f(but)g +(the)g(moun)m(t)h(p)s(oin)m(t)g(and)150 5340 y(serv)m(er)k(information) +f(is)h(still)g(b)s(eing)f(main)m(tained)h(b)m(y)f Ft(A)n(md)p +Fx(.)p eop end +%%Page: 76 78 +TeXDict begin 76 77 bop 150 -116 a Fx(76)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fm(7.4.7)63 +b Ff(A)m(mq)52 b Fl(-p)42 b Fm(option)150 446 y Fx(Return)26 +b(the)h(pro)s(cess)f(ID)h(of)g(the)g(remote)g(or)g(lo)s(cally)h +(running)d Ft(A)n(md)p Fx(.)40 b(Useful)26 b(when)g(y)m(ou)h(need)f(to) +i(send)150 555 y(a)g(signal)g(to)h(the)e(lo)s(cal)i Ft(A)n(md)37 +b Fx(pro)s(cess,)28 b(and)f(w)m(ould)g(rather)h(not)f(ha)m(v)m(e)i(to)g +(searc)m(h)f(through)f(the)g(pro)s(cess)150 665 y(table.)42 +b(This)29 b(option)i(is)f(used)g(in)g(the)h Fp(ctl-amd)d +Fx(script.)150 874 y Fm(7.4.8)63 b Ff(A)m(mq)52 b Fl(-P)42 +b Fm(option)150 1021 y Fx(Con)m(tact)49 b(an)e(alternate)j(running)45 +b Ft(A)n(md)57 b Fx(that)48 b(had)f(registered)i(itself)f(on)f(a)h +(di\013eren)m(t)g(RPC)f Fo(pro-)150 1130 y(gram)p 358 +1130 28 4 v 40 w(n)m(um)m(b)s(er)d Fx(and)38 b(apply)g(all)h(other)g +(op)s(erations)g(to)g(that)g(instance)g(of)g(the)g(automoun)m(ter.)66 +b(This)150 1240 y(is)36 b(useful)e(when)h(y)m(ou)h(run)e(m)m(ultiple)i +(copies)g(of)g Ft(A)n(md)p Fx(,)h(and)e(need)g(to)h(manage)h(eac)m(h)f +(one)g(separately)-8 b(.)150 1349 y(If)33 b(not)i(sp)s(eci\014ed,)f +Ft(A)n(mq)41 b Fx(will)35 b(use)e(the)h(default)g(program)g(n)m(um)m(b) +s(er)f(for)g Ft(A)n(md)p Fx(,)i(300019.)54 b(F)-8 b(or)35 +b(securit)m(y)150 1459 y(reasons,)h(the)f(only)g(alternate)i(program)e +(n)m(um)m(b)s(ers)e Ft(A)n(md)44 b Fx(can)36 b(use)e(range)h(from)g +(300019)i(to)f(300029,)150 1569 y(inclusiv)m(e.)275 1712 +y(F)-8 b(or)31 b(example,)g(to)g(kill)g(an)f(alternate)i(running)d +Ft(A)n(md)9 b Fx(:)390 1856 y Fp(kill)47 b(`amq)f(-p)h(-P)h(300020`)150 +2065 y Fm(7.4.9)63 b Ff(A)m(mq)52 b Fl(-q)42 b Fm(option)150 +2212 y Fx(Suppress)18 b(an)m(y)j(error)g(messages)g(pro)s(duced)e(when) +h(a)h(sync)m(hronous)f(unmoun)m(t)f(fails.)38 b(See)21 +b(Section)h(7.4.13)150 2321 y([Amq)30 b(-u)h(option],)g(page)g(77.)150 +2530 y Fm(7.4.10)63 b Ff(A)m(mq)53 b Fl(-s)41 b Fm(option)150 +2677 y Fx(The)25 b Fp(-s)g Fx(option)g(displa)m(ys)h(global)g +(statistics.)41 b(If)25 b(an)m(y)h(other)g(options)f(are)h(sp)s +(eci\014ed)f(or)g(an)m(y)h(\014lesystems)150 2787 y(named)k(then)g +(this)g(option)h(is)g(ignored.)40 b(F)-8 b(or)31 b(example:)390 +2930 y Fp(requests)93 b(stale)238 b(mount)f(mount)g(unmount)390 +3040 y(deferred)93 b(fhandles)h(ok)381 b(failed)189 b(failed)390 +3150 y(1054)285 b(1)430 b(487)333 b(290)g(7017)150 3323 +y Fx(`)p Fp(Deferred)28 b(requests)p Fx(')630 3433 y(are)f(those)h(for) +f(whic)m(h)g(an)g(immediate)h(reply)e(could)i(not)f(b)s(e)f +(constructed.)40 b(F)-8 b(or)28 b(example,)630 3542 y(this)i(w)m(ould)g +(happ)s(en)f(if)h(a)h(bac)m(kground)f(moun)m(t)h(w)m(as)f(required.)150 +3711 y(`)p Fp(Stale)f(filehandles)p Fx(')630 3821 y(coun)m(ts)j(the)g +(n)m(um)m(b)s(er)e(of)i(times)g(the)f(k)m(ernel)i(passes)e(a)h(stale)h +(\014lehandle)e(to)h Ft(A)n(md)p Fx(.)44 b(Large)630 +3930 y(n)m(um)m(b)s(ers)29 b(indicate)i(problems.)150 +4099 y(`)p Fp(Mount)e(ok)p Fx(')65 b(coun)m(ts)31 b(the)f(n)m(um)m(b)s +(er)f(of)i(automoun)m(ts)g(whic)m(h)f(w)m(ere)h(successful.)150 +4268 y(`)p Fp(Mount)e(failed)p Fx(')630 4377 y(coun)m(ts)i(the)f(n)m +(um)m(b)s(er)f(of)i(automoun)m(ts)g(whic)m(h)f(failed.)150 +4546 y(`)p Fp(Unmount)f(failed)p Fx(')630 4656 y(coun)m(ts)35 +b(the)g(n)m(um)m(b)s(er)e(of)i(times)g(a)g(\014lesystem)g(could)g(not)f +(b)s(e)g(unmoun)m(ted.)53 b(V)-8 b(ery)35 b(large)630 +4765 y(n)m(um)m(b)s(ers)44 b(here)h(indicate)h(that)g(the)f(time)h(b)s +(et)m(w)m(een)g(unmoun)m(t)e(attempts)i(should)f(b)s(e)630 +4875 y(increased.)150 5083 y Fm(7.4.11)63 b Ff(A)m(mq)53 +b Fl(-T)41 b Fm(option)150 5230 y Fx(The)31 b Fp(-T)f +Fx(option)i(causes)g(the)f Ft(A)n(mq)39 b Fx(to)32 b(con)m(tact)h +Ft(A)n(md)41 b Fx(using)31 b(the)g(TCP)g(transp)s(ort)f(only)h +(\(connection)150 5340 y(orien)m(ted\).)42 b(Normally)-8 +b(,)32 b Ft(A)n(mq)38 b Fx(will)30 b(use)g(TCP)g(\014rst,)g(and)g(if)g +(that)h(failed,)g(will)g(try)f(UDP)-8 b(.)p eop end +%%Page: 77 79 +TeXDict begin 77 78 bop 150 -116 a Fx(Chapter)30 b(7:)41 +b(Run-time)30 b(Administration)2035 b(77)150 299 y Fm(7.4.12)63 +b Ff(A)m(mq)53 b Fl(-U)41 b Fm(option)150 446 y Fx(The)28 +b Fp(-U)g Fx(option)h(causes)g(the)g Ft(A)n(mq)36 b Fx(to)30 +b(con)m(tact)g Ft(A)n(md)39 b Fx(using)28 b(the)g(UDP)i(transp)s(ort)d +(only)i(\(connection-)150 555 y(less\).)41 b(Normally)-8 +b(,)32 b Ft(A)n(mq)38 b Fx(will)31 b(use)f(TCP)f(\014rst,)h(and)g(if)g +(that)h(failed,)g(will)g(try)f(UDP)-8 b(.)150 755 y Fm(7.4.13)63 +b Ff(A)m(mq)53 b Fl(-u)41 b Fm(option)150 902 y Fx(The)23 +b Fp(-u)f Fx(option)i(causes)f(the)h(time-to-liv)m(e)i(in)m(terv)-5 +b(al)25 b(of)e(the)g(named)g(moun)m(t)g(p)s(oin)m(ts)g(to)h(b)s(e)f +(expired,)h(th)m(us)150 1011 y(causing)h(an)f(unmoun)m(t)f(attempt.)40 +b(This)23 b(is)h(the)h(only)f(safe)h(w)m(a)m(y)g(to)g(unmoun)m(t)e(an)h +(automoun)m(ted)h(\014lesys-)150 1121 y(tem.)56 b(If)35 +b Fp(-u)g Fx(is)g(rep)s(eated,)i(then)e Ft(A)n(md)45 +b Fx(will)36 b(attempt)g(to)g(unmoun)m(t)f(the)g(\014lesystem)h(sync)m +(hronously)-8 b(.)150 1230 y(This)30 b(mak)m(es)h(things)f(lik)m(e)390 +1365 y Fp(amq)47 b(-uu)g(/t/cd0d)f(&&)h(eject)f(cd0)150 +1499 y Fx(w)m(ork)34 b(as)h(exp)s(ected.)52 b(An)m(y)34 +b(error)g(messages)h(this)f(migh)m(t)h(pro)s(duce)e(can)h(b)s(e)f +(suppressed)f(with)i(the)h Fp(-q)150 1609 y Fx(option.)41 +b(See)31 b(Section)g(7.4.9)h([Amq)f(-q)f(option],)i(page)f(76.)150 +1808 y Fm(7.4.14)63 b Ff(A)m(mq)53 b Fl(-v)41 b Fm(option)150 +1955 y Fx(The)30 b Fp(-v)g Fx(option)g(displa)m(ys)h(the)f(v)m(ersion)h +(of)g Ft(A)n(md)40 b Fx(in)30 b(a)g(similar)h(w)m(a)m(y)g(to)h +Ft(A)n(md)9 b Fx('s)30 b Fp(-v)g Fx(option.)150 2154 +y Fm(7.4.15)63 b Ff(A)m(mq)53 b Fl(-w)41 b Fm(option)150 +2301 y Fx(The)k Fp(-w)g Fx(option)g(translates)i(a)f(full)f(pathname)g +(as)g(returned)g(b)m(y)g Fn(getp)m(wd)p Fx(\(3\))i(in)m(to)f(a)g(short) +f Ft(A)n(md)150 2411 y Fx(pathname)30 b(that)h(go)s(es)g(through)f(its) +h(moun)m(t)f(p)s(oin)m(ts.)41 b(This)29 b(option)i(requires)f(that)h +Ft(A)n(md)40 b Fx(is)30 b(running.)150 2610 y Fm(7.4.16)63 +b(Other)41 b Ff(A)m(mq)53 b Fm(options)150 2757 y Fx(Tw)m(o)31 +b(other)f(op)s(erations)h(are)g(implemen)m(ted.)41 b(These)30 +b(mo)s(dify)f(the)i(state)h(of)e Ft(A)n(md)40 b Fx(as)31 +b(a)f(whole,)h(rather)150 2867 y(than)23 b(an)m(y)g(particular)g +(\014lesystem.)39 b(The)23 b Fp(-x)f Fx(and)g Fp(-D)h +Fx(options)g(ha)m(v)m(e)h(exactly)h(the)e(same)h(e\013ect)g(as)f +Ft(A)n(md)9 b Fx('s)150 2976 y(corresp)s(onding)29 b(command)h(line)h +(options.)275 3111 y(When)39 b Ft(A)n(md)50 b Fx(receiv)m(es)41 +b(the)f Fp(-x)g Fx(\015ag,)j(it)d(disallo)m(ws)h(turning)e(o\013)h(the) +h(`)p Fp(fatal)p Fx(')e(or)g(`)p Fp(error)p Fx(')g(\015ags.)150 +3220 y(Both)34 b(are)f(on)g(b)m(y)g(default.)49 b(They)33 +b(are)h(mandatory)f(so)g(that)h Ft(A)n(md)42 b Fx(could)33 +b(rep)s(ort)g(imp)s(ortan)m(t)g(errors,)150 3330 y(including)d(errors)g +(relating)h(to)g(turning)f(\015ags)h(on/o\013.)p eop +end +%%Page: 78 80 +TeXDict begin 78 79 bop eop end +%%Page: 79 81 +TeXDict begin 79 80 bop 150 -116 a Fx(Chapter)30 b(8:)41 +b(FSinfo)2785 b(79)150 299 y Fu(8)80 b(FSinfo)150 530 +y Fx(XXX:)31 b(this)f(c)m(hapter)h(should)f(b)s(e)g(review)m(ed)g(b)m +(y)h(someone)g(kno)m(wledgeable)h(with)e(fsinfo.)150 +761 y Fw(8.1)68 b Fg(FSinfo)53 b Fw(o)l(v)l(erview)150 +920 y Ft(FSinfo)41 b Fx(is)35 b(a)g(\014lesystem)g(managemen)m(t)h(to)s +(ol.)55 b(It)35 b(has)f(b)s(een)g(designed)h(to)g(w)m(ork)g(with)g +Ft(A)n(md)44 b Fx(to)35 b(help)150 1030 y(system)h(administrators)f(k)m +(eep)i(trac)m(k)f(of)g(the)g(ev)m(er)g(increasing)g(\014lesystem)g +(namespace)g(under)e(their)150 1140 y(con)m(trol.)275 +1273 y(The)k(purp)s(ose)f(of)i Ft(FSinfo)45 b Fx(is)39 +b(to)g(generate)h(all)g(the)f(imp)s(ortan)m(t)g(standard)f +(\014lesystem)h(data)g(\014les)150 1383 y(from)33 b(a)g(single)h(set)f +(of)h(input)e(data.)49 b(Starting)34 b(with)e(a)i(single)g(data)f +(source)h(guaran)m(tees)g(that)g(all)g(the)150 1493 y(generated)e +(\014les)e(are)h(self-consisten)m(t.)44 b(One)30 b(of)h(the)g(p)s +(ossible)f(output)g(data)h(formats)g(is)g(a)g(set)g(of)g +Ft(A)n(md)150 1602 y Fx(maps)f(whic)m(h)g(can)h(b)s(e)e(used)h(among)h +(the)f(set)h(of)g(hosts)f(describ)s(ed)g(in)g(the)g(input)g(data.)275 +1736 y Ft(FSinfo)k Fx(implemen)m(ts)28 b(a)h(declarativ)m(e)h +(language.)42 b(This)27 b(language)i(is)f(sp)s(eci\014cally)h(designed) +f(for)g(de-)150 1846 y(scribing)22 b(\014lesystem)g(namespace)g(and)f +(ph)m(ysical)i(la)m(y)m(outs.)39 b(The)21 b(basic)i(declaration)g +(de\014nes)e(a)h(moun)m(ted)150 1955 y(\014lesystem)32 +b(including)g(its)g(device)h(name,)f(moun)m(t)g(p)s(oin)m(t,)h(and)e +(all)i(the)f(v)m(olumes)g(and)g(access)h(p)s(ermis-)150 +2065 y(sions.)57 b Ft(FSinfo)43 b Fx(reads)35 b(this)h(information)h +(and)e(builds)g(an)h(in)m(ternal)g(map)g(of)g(the)g(en)m(tire)h(net)m +(w)m(ork)g(of)150 2174 y(hosts.)i(Using)25 b(this)h(map,)g(man)m(y)f +(di\013eren)m(t)h(data)g(formats)f(can)h(b)s(e)e(pro)s(duced)g +(including)g Fp(/etc/fstab)p Fx(,)150 2284 y Fp(/etc/exports)p +Fx(,)j Ft(A)n(md)40 b Fx(moun)m(t)30 b(maps)g(and)g Fp(/etc/bootparams) +p Fx(.)150 2515 y Fw(8.2)68 b(Using)46 b Fg(FSinfo)150 +2675 y Fx(The)28 b(basic)g(strategy)h(when)f(using)f +Ft(FSinfo)35 b Fx(is)28 b(to)h(gather)f(all)h(the)g(information)f(ab)s +(out)g(all)h(disks)e(on)h(all)150 2784 y(mac)m(hines)h(in)m(to)g(one)g +(set)g(of)f(declarations.)42 b(F)-8 b(or)29 b(eac)m(h)g(mac)m(hine)g(b) +s(eing)f(managed,)i(the)e(follo)m(wing)i(data)150 2894 +y(is)g(required:)225 3028 y Fv(\017)60 b Fx(Hostname)225 +3161 y Fv(\017)g Fx(List)31 b(of)f(all)h(\014lesystems)g(and,)f +(optionally)-8 b(,)32 b(their)f(moun)m(t)f(p)s(oin)m(ts.)225 +3295 y Fv(\017)60 b Fx(Names)31 b(of)f(v)m(olumes)h(stored)g(on)f(eac)m +(h)i(\014lesystem.)225 3429 y Fv(\017)60 b Fx(NFS)30 +b(exp)s(ort)g(information)h(for)f(eac)m(h)i(v)m(olume.)225 +3563 y Fv(\017)60 b Fx(The)30 b(list)h(of)f(static)i(\014lesystem)f +(moun)m(ts.)275 3721 y(The)h(follo)m(wing)j(information)f(can)f(also)i +(b)s(e)d(en)m(tered)i(in)m(to)h(the)e(same)h(con\014guration)f(\014les) +h(so)f(that)150 3831 y(all)e(data)g(can)g(b)s(e)f(k)m(ept)h(in)f(one)g +(place.)225 3965 y Fv(\017)60 b Fx(List)31 b(of)f(net)m(w)m(ork)h(in)m +(terfaces)225 4098 y Fv(\017)60 b Fx(IP)30 b(address)f(of)i(eac)m(h)h +(in)m(terface)225 4232 y Fv(\017)60 b Fx(Hardw)m(are)31 +b(address)e(of)i(eac)m(h)g(in)m(terface)225 4366 y Fv(\017)60 +b Fx(Dumpset)30 b(to)h(whic)m(h)f(eac)m(h)i(\014lesystem)f(b)s(elongs) +225 4500 y Fv(\017)60 b Fx(and)30 b(more)36 b(.)22 b(.)g(.)275 +4658 y(T)-8 b(o)26 b(generate)i Ft(A)n(md)35 b Fx(moun)m(t)26 +b(maps,)h(the)g(automoun)m(t)f(tree)h(m)m(ust)f(also)h(b)s(e)f +(de\014ned)f(\(see)i(Section)g(8.8)150 4768 y([FSinfo)41 +b(automoun)m(t)g(de\014nitions],)i(page)e(86\).)73 b(This)40 +b(will)g(ha)m(v)m(e)i(b)s(een)e(designed)g(at)i(the)e(time)i(the)150 +4877 y(v)m(olume)e(names)g(w)m(ere)g(allo)s(cated.)71 +b(Some)39 b(v)m(olume)i(names)e(will)h(not)g(b)s(e)f(automoun)m(ted,)k +(so)d Ft(FSinfo)150 4987 y Fx(needs)30 b(an)g(explicit)i(list)f(of)g +(whic)m(h)f(v)m(olumes)h(should)e(b)s(e)h(automoun)m(ted.)275 +5121 y(Hostnames)41 b(are)f(required)g(at)h(sev)m(eral)h(places)f(in)f +(the)g Ft(FSinfo)47 b Fx(language.)72 b(It)40 b(is)h(imp)s(ortan)m(t)f +(to)150 5230 y(stic)m(k)33 b(to)g(either)g(fully)e(quali\014ed)h(names) +g(or)g(unquali\014ed)f(names.)46 b(Using)32 b(a)h(mixture)f(of)g(the)g +(t)m(w)m(o)i(will)150 5340 y(inevitably)d(result)g(in)f(confusion.)p +eop end +%%Page: 80 82 +TeXDict begin 80 81 bop 150 -116 a Fx(80)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(Sometimes)d(v)m +(olumes)h(need)f(to)g(b)s(e)g(referenced)g(whic)m(h)f(are)i(not)f +(de\014ned)f(in)g(the)i(set)f(of)g(hosts)g(b)s(eing)150 +408 y(managed)f(with)g Ft(FSinfo)p Fx(.)40 b(The)25 b(required)h +(action)h(is)f(to)g(add)g(a)g(dumm)m(y)f(set)h(of)h(de\014nitions)e +(for)h(the)g(host)150 518 y(and)j(v)m(olume)i(names)e(required.)40 +b(Since)30 b(the)g(\014les)g(generated)h(for)e(those)h(particular)h +(hosts)e(will)i(not)f(b)s(e)150 628 y(used)g(on)g(them,)g(the)h(exact)h +(v)-5 b(alues)31 b(used)e(is)i(not)f(critical.)150 866 +y Fw(8.3)68 b Fg(FSinfo)53 b Fw(grammar)150 1025 y Ft(FSinfo)37 +b Fx(has)30 b(a)h(relativ)m(ely)i(simple)d(grammar.)41 +b(Distinct)32 b(syn)m(tactic)g(constructs)f(exist)g(for)f(eac)m(h)i(of) +f(the)150 1135 y(di\013eren)m(t)k(t)m(yp)s(es)f(of)g(data,)i(though)e +(they)g(share)g(a)g(common)g(\015a)m(v)m(or.)53 b(Sev)m(eral)35 +b(con)m(v)m(en)m(tions)h(are)f(used)150 1245 y(in)30 +b(the)h(grammar)f(fragmen)m(ts)h(b)s(elo)m(w.)275 1383 +y(The)g(notation,)j Ft(list\()15 b Fp(xxx)p Ft(\))p Fx(,)32 +b(indicates)h(a)g(list)f(of)g(zero)h(or)f(more)g Fp(xxx)p +Fx('s.)45 b(The)31 b(notation,)j Ft(opt\()15 b Fp(xxx)p +Ft(\))p Fx(,)150 1493 y(indicates)27 b(zero)g(or)f(one)h +Fp(xxx)p Fx(.)38 b(Items)26 b(in)g(double)g(quotes,)i +Ft(e)-5 b(g)34 b Fp("host")p Fx(,)25 b(represen)m(t)h(input)g(tok)m +(ens.)40 b(Items)150 1602 y(in)d(angle)i(brac)m(k)m(ets,)i +Ft(e)-5 b(g)45 b Fp(<)p Fo(hostname)p Fp(>)p Fx(,)39 +b(represen)m(t)f(strings)f(in)g(the)h(input.)61 b(Strings)37 +b(need)h(not)f(b)s(e)g(in)150 1712 y(double)21 b(quotes,)j(except)e(to) +g(di\013eren)m(tiate)h(them)f(from)e(reserv)m(ed)i(w)m(ords.)37 +b(Quoted)21 b(strings)g(ma)m(y)h(include)150 1822 y(the)k(usual)e(set)i +(of)g(C)f(\\)p Fp(\\)p Fx(")h(escap)s(e)f(sequences)h(with)f(one)h +(exception:)39 b(a)26 b(bac)m(kslash-newline-whitespace)150 +1931 y(sequence)38 b(is)h(squashed)e(in)m(to)i(a)f(single)h(space)g(c)m +(haracter.)65 b(T)-8 b(o)39 b(defeat)g(this)f(feature,)i(put)e(a)g +(further)150 2041 y(bac)m(kslash)31 b(at)g(the)g(start)g(of)f(the)h +(second)f(line.)275 2179 y(A)m(t)40 b(the)g(outermost)g(lev)m(el)h(of)e +(the)h(grammar,)i(the)e(input)e(consists)i(of)g(a)g(sequence)f(of)h +(host)g(and)150 2289 y(automoun)m(t)34 b(declarations.)51 +b(These)33 b(declarations)h(are)g(all)g(parsed)f(b)s(efore)f(they)i +(are)g(analyzed.)50 b(This)150 2398 y(means)30 b(they)h(can)f(app)s +(ear)g(in)g(an)m(y)h(order)f(and)g(cyclic)i(host)e(references)h(are)g +(p)s(ossible.)390 2537 y Fp(fsinfo)285 b(:)47 b Fk(list\()p +Fp(fsinfo_attr)p Fk(\))c Fp(;)390 2756 y(fsinfo_attr)i(:)i(host)g(|)g +(automount)f(;)150 2994 y Fw(8.4)68 b Fg(FSinfo)53 b +Fw(host)45 b(de\014nitions)150 3154 y Fx(A)20 b(host)h(declaration)h +(consists)f(of)f(three)h(parts:)35 b(a)21 b(set)g(of)f(mac)m(hine)h +(attribute)g(data,)j(a)c(list)h(of)g(\014lesystems)150 +3263 y(ph)m(ysically)31 b(attac)m(hed)h(to)g(the)e(mac)m(hine,)h(and)f +(a)h(list)g(of)g(additional)g(statically)i(moun)m(ted)d(\014lesystems.) +390 3402 y Fp(host)381 b(:)47 b("host")f(host_data)g +Fk(list\()p Fp(filesystem)p Fk(\))d(list\()p Fp(mount)p +Fk(\))i Fp(;)275 3540 y Fx(Eac)m(h)e(host)f(m)m(ust)g(b)s(e)g(declared) +h(in)f(this)h(w)m(a)m(y)g(exactly)h(once.)78 b(Suc)m(h)42 +b(things)g(as)h(the)f(hardw)m(are)150 3650 y(address,)29 +b(the)g(arc)m(hitecture)h(and)f(op)s(erating)g(system)g(t)m(yp)s(es)g +(and)f(the)h(cluster)h(name)f(are)g(all)h(sp)s(eci\014ed)150 +3760 y(within)g(the)g Fo(host)h(data)p Fx(.)275 3898 +y(All)g(the)g(disks)f(the)h(mac)m(hine)g(has)g(should)e(then)i(b)s(e)f +(describ)s(ed)g(in)g(the)h Fo(list)g(of)g(\014lesystems)p +Fx(.)42 b(When)150 4008 y(describing)28 b(disks,)g(y)m(ou)h(can)f(sp)s +(ecify)g(what)g Fo(v)m(olname)35 b Fx(the)28 b(disk/partition)h(should) +e(ha)m(v)m(e)j(and)d(all)i(suc)m(h)150 4117 y(en)m(tries)i(are)f(built) +g(up)f(in)m(to)i(a)f(dictionary)h(whic)m(h)f(can)g(then)g(b)s(e)f(used) +g(for)h(building)f(the)h(automoun)m(ter)150 4227 y(maps.)275 +4365 y(The)f Fo(list)h(of)g(moun)m(ts)j Fx(sp)s(eci\014es)c(all)i(the)f +(\014lesystems)g(that)g(should)e(b)s(e)h(statically)k(moun)m(ted)c(on)h +(the)150 4475 y(mac)m(hine.)150 4713 y Fw(8.5)68 b Fg(FSinfo)53 +b Fw(host)45 b(attributes)150 4873 y Fx(The)37 b(host)g(data,)j +Fo(host)p 962 4873 28 4 v 40 w(data)p Fx(,)g(alw)m(a)m(ys)f(includes)e +(the)g Fo(hostname)p Fx(.)62 b(In)36 b(addition,)k(sev)m(eral)e(other)g +(host)150 4982 y(attributes)31 b(can)g(b)s(e)e(giv)m(en.)390 +5121 y Fp(host_data)141 b(:)47 b(<)p Fk(hostname)p Fp(>)963 +5230 y(|)g("{")g Fk(list\()p Fp(host_attrs)p Fk(\))c +Fp("}")k(<)p Fk(hostname)p Fp(>)963 5340 y(;)p eop end +%%Page: 81 83 +TeXDict begin 81 82 bop 150 -116 a Fx(Chapter)30 b(8:)41 +b(FSinfo)2785 b(81)390 408 y Fp(host_attrs)93 b(:)47 +b(host_attr)e("=")i(<)p Fk(string)p Fp(>)963 518 y(|)g(netif)963 +628 y(;)390 847 y(host_attr)141 b(:)47 b("config")963 +956 y(|)g("arch")963 1066 y(|)g("os")963 1176 y(|)g("cluster")963 +1285 y(;)275 1417 y Fx(The)29 b Fo(hostname)36 b Fx(is,)31 +b(t)m(ypically)-8 b(,)33 b(the)d(fully)g(quali\014ed)g(hostname)h(of)g +(the)f(mac)m(hine.)275 1548 y(Examples:)390 1679 y Fp(host)47 +b(dylan.doc.ic.ac.uk)390 1899 y(host)g({)581 2008 y(os)g(=)h(hpux)581 +2118 y(arch)f(=)g(hp300)390 2227 y(})g(dougal.doc.ic.ac.uk)275 +2359 y Fx(The)29 b(options)i(that)g(can)g(b)s(e)e(giv)m(en)j(as)e(host) +h(attributes)g(are)g(sho)m(wn)e(b)s(elo)m(w.)150 2552 +y Fm(8.5.1)63 b(netif)41 b(Option)150 2699 y Fx(This)20 +b(de\014nes)g(the)h(set)g(of)g(net)m(w)m(ork)h(in)m(terfaces)g +(con\014gured)e(on)h(the)g(mac)m(hine.)38 b(The)20 b(in)m(terface)i +(attributes)150 2809 y(collected)31 b(b)m(y)d Ft(FSinfo)34 +b Fx(are)29 b(the)f(IP)g(address,)g(subnet)f(mask)i(and)e(hardw)m(are)h +(address.)39 b(Multiple)29 b(in)m(ter-)150 2918 y(faces)35 +b(ma)m(y)g(b)s(e)f(de\014ned)f(for)h(hosts)h(with)f(sev)m(eral)h(in)m +(terfaces)h(b)m(y)e(an)h(en)m(try)f(for)h(eac)m(h)g(in)m(terface.)54 +b(The)150 3028 y(v)-5 b(alues)31 b(giv)m(en)g(are)g(sanit)m(y)g(c)m +(hec)m(k)m(ed,)i(but)c(are)i(curren)m(tly)f(un)m(used)g(for)g(an)m +(ything)g(else.)390 3159 y Fp(netif)333 b(:)47 b("netif")f(<)p +Fk(string)p Fp(>)g("{")g Fk(list\()p Fp(netif_attrs)p +Fk(\))e Fp("}")i(;)390 3378 y(netif_attrs)f(:)i(netif_attr)e("=")i(<)p +Fk(string)p Fp(>)f(;)390 3597 y(netif_attr)93 b(:)47 +b("inaddr")f(|)h("netmask")e(|)j("hwaddr")d(;)275 3729 +y Fx(Examples:)390 3860 y Fp(netif)h(ie0)h({)581 3970 +y(inaddr)94 b(=)47 b(129.31.81.37)581 4080 y(netmask)f(=)h(0xfffffe00) +581 4189 y(hwaddr)94 b(=)47 b("08:00:20:01:a6:a5")390 +4299 y(})390 4518 y(netif)f(ec0)h({)h(})150 4711 y Fm(8.5.2)63 +b(con\014g)41 b(Option)150 4858 y Fx(This)25 b(option)i(allo)m(ws)g(y)m +(ou)f(to)h(sp)s(ecify)f(con\014guration)g(v)-5 b(ariables)27 +b(for)e(the)i(startup)e(scripts)h(\()p Fp(rc)g Fx(scripts\).)150 +4968 y(A)k(simple)h(string)f(should)g(immediately)h(follo)m(w)h(the)e +(k)m(eyw)m(ord.)275 5099 y(Example:)390 5230 y Fp(config)46 +b("NFS_SERVER=true")390 5340 y(config)g("ZEPHYR=true")p +eop end +%%Page: 82 84 +TeXDict begin 82 83 bop 150 -116 a Fx(82)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(This)f(option)i(is) +f(curren)m(tly)h(unsupp)s(orted.)150 494 y Fm(8.5.3)63 +b(arc)m(h)40 b(Option)150 641 y Fx(This)30 b(de\014nes)f(the)i(arc)m +(hitecture)h(of)e(the)h(mac)m(hine.)41 b(F)-8 b(or)31 +b(example:)390 774 y Fp(arch)47 b(=)g(hp300)275 906 y +Fx(This)32 b(is)i(in)m(tended)f(to)h(b)s(e)f(of)h(use)f(when)f +(building)h(arc)m(hitecture)i(sp)s(eci\014c)e(moun)m(tmaps,)h(ho)m(w)m +(ev)m(er,)150 1016 y(the)d(option)f(is)h(curren)m(tly)f(unsupp)s +(orted.)150 1211 y Fm(8.5.4)63 b(os)41 b(Option)150 1358 +y Fx(This)30 b(de\014nes)f(the)i(op)s(erating)f(system)h(t)m(yp)s(e)g +(of)f(the)h(host.)40 b(F)-8 b(or)32 b(example:)390 1490 +y Fp(os)47 b(=)h(hpux)275 1623 y Fx(This)33 b(information)i(is)g(used)f +(when)g(creating)i(the)e Fp(fstab)g Fx(\014les,)i(for)e(example)h(in)g +(c)m(ho)s(osing)g(whic)m(h)150 1733 y(format)c(to)g(use)f(for)g(the)h +Fp(fstab)e Fx(en)m(tries)i(within)f(the)g(\014le.)150 +1928 y Fm(8.5.5)63 b(cluster)41 b(Option)150 2075 y Fx(This)30 +b(is)g(used)g(for)g(sp)s(ecifying)g(in)g(whic)m(h)g(cluster)h(the)f +(mac)m(hine)h(b)s(elongs.)41 b(F)-8 b(or)31 b(example:)390 +2207 y Fp(cluster)46 b(=)h("theory")275 2340 y Fx(The)29 +b(cluster)h(is)g(in)m(tended)g(to)h(b)s(e)e(used)h(when)f(generating)i +(the)f(automoun)m(t)h(maps,)f(although)g(it)h(is)150 +2449 y(curren)m(tly)f(unsupp)s(orted.)150 2678 y Fw(8.6)68 +b Fg(FSinfo)53 b Fw(\014lesystems)150 2837 y Fx(The)39 +b(list)i(of)f(ph)m(ysically)g(attac)m(hed)i(\014lesystems)e(follo)m(ws) +h(the)f(mac)m(hine)h(attributes.)69 b(These)40 b(should)150 +2947 y(de\014ne)28 b(all)h(the)f(\014lesystems)h(a)m(v)-5 +b(ailable)31 b(from)d(this)g(mac)m(hine,)i(whether)d(exp)s(orted)h(or)h +(not.)40 b(In)28 b(addition)150 3057 y(to)44 b(the)f(device)h(name,)j +(\014lesystems)c(ha)m(v)m(e)i(sev)m(eral)f(attributes,)j(suc)m(h)c(as)h +(\014lesystem)f(t)m(yp)s(e,)k(moun)m(t)150 3166 y(options,)31 +b(and)f(`)p Fp(fsck)p Fx(')f(pass)h(n)m(um)m(b)s(er)f(whic)m(h)i(are)f +(needed)g(to)h(generate)h Fp(fstab)d Fx(en)m(tries.)390 +3299 y Fp(filesystem)93 b(:)47 b("fs")g(<)p Fk(device)p +Fp(>)e("{")i Fk(list\()p Fp(fs_data)p Fk(\))d Fp("}")j(;)390 +3518 y(fs_data)237 b(:)47 b(fs_data_attr)e("=")i(<)p +Fk(string)p Fp(>)963 3627 y(|)g(mount)963 3737 y(;)390 +3956 y(fs_data_attr)963 4066 y(:)g("fstype")f(|)h("opts")f(|)i +("passno")963 4175 y(|)f("freq")f(|)i("dumpset")d(|)i("log")963 +4285 y(;)275 4417 y Fx(Here,)30 b Fp(<)p Fo(device)p +Fp(>)g Fx(is)f(the)g(device)i(name)e(of)h(the)f(disk)g(\(for)g +(example,)i Fp(/dev/dsk/2s0)p Fx(\).)37 b(The)29 b(device)150 +4527 y(name)j(is)f(used)g(for)h(building)e(the)i(moun)m(t)g(maps)f(and) +g(for)g(the)h Fp(fstab)e Fx(\014le.)45 b(The)31 b(attributes)h(that)h +(can)150 4637 y(b)s(e)d(sp)s(eci\014ed)f(are)i(sho)m(wn)f(in)g(the)h +(follo)m(wing)g(section.)275 4769 y(The)e Ft(FSinfo)37 +b Fx(con\014guration)31 b(\014le)f(for)h Fp(dylan.doc.ic.ac.uk)25 +b Fx(is)30 b(listed)h(b)s(elo)m(w.)390 4902 y Fp(host)47 +b(dylan.doc.ic.ac.uk)390 5121 y(fs)g(/dev/dsk/0s0)e({)772 +5230 y(fstype)h(=)h(swap)390 5340 y(})p eop end +%%Page: 83 85 +TeXDict begin 83 84 bop 150 -116 a Fx(Chapter)30 b(8:)41 +b(FSinfo)2785 b(83)390 408 y Fp(fs)47 b(/dev/dsk/0s0)e({)772 +518 y(fstype)h(=)h(hfs)772 628 y(opts)f(=)i(rw,noquota,grpid)772 +737 y(passno)e(=)h(0;)772 847 y(freq)f(=)i(1;)772 956 +y(mount)e(/)i({)f(})390 1066 y(})390 1285 y(fs)g(/dev/dsk/1s0)e({)772 +1395 y(fstype)h(=)h(hfs)772 1504 y(opts)f(=)i(defaults)772 +1614 y(passno)e(=)h(1;)772 1724 y(freq)f(=)i(1;)772 1833 +y(mount)e(/usr)h({)1154 1943 y(local)f({)1535 2052 y(exportfs)g +("dougal)g(eden)g(dylan)h(zebedee)f(brian")1535 2162 +y(volname)g(/nfs/hp300/local)1154 2271 y(})772 2381 y(})390 +2491 y(})390 2710 y(fs)h(/dev/dsk/2s0)e({)772 2819 y(fstype)h(=)h(hfs) +772 2929 y(opts)f(=)i(defaults)772 3039 y(passno)e(=)h(1;)772 +3148 y(freq)f(=)i(1;)772 3258 y(mount)e(default)g({)1154 +3367 y(exportfs)f("toytown_clients)f(hangers_on")1154 +3477 y(volname)h(/home/dylan/dk2)772 3587 y(})390 3696 +y(})390 3915 y(fs)i(/dev/dsk/3s0)e({)772 4025 y(fstype)h(=)h(hfs)772 +4134 y(opts)f(=)i(defaults)772 4244 y(passno)e(=)h(1;)772 +4354 y(freq)f(=)i(1;)772 4463 y(mount)e(default)g({)1154 +4573 y(exportfs)f("toytown_clients)f(hangers_on")1154 +4682 y(volname)h(/home/dylan/dk3)772 4792 y(})390 4902 +y(})390 5121 y(fs)i(/dev/dsk/5s0)e({)772 5230 y(fstype)h(=)h(hfs)772 +5340 y(opts)f(=)i(defaults)p eop end +%%Page: 84 86 +TeXDict begin 84 85 bop 150 -116 a Fx(84)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))772 299 y Fp(passno)46 +b(=)h(1;)772 408 y(freq)f(=)i(1;)772 518 y(mount)e(default)g({)1154 +628 y(exportfs)f("toytown_clients)f(hangers_on")1154 +737 y(volname)h(/home/dylan/dk5)772 847 y(})390 956 y(})150 +1162 y Fm(8.6.1)63 b(fst)m(yp)s(e)41 b(Option)150 1309 +y Fx(This)27 b(sp)s(eci\014es)h(the)g(t)m(yp)s(e)g(of)g(\014lesystem)h +(b)s(eing)e(declared)i(and)e(will)h(b)s(e)g(placed)g(in)m(to)h(the)f +Fp(fstab)f Fx(\014le)h(as)150 1419 y(is.)40 b(The)29 +b(v)-5 b(alue)30 b(of)g(this)f(option)h(will)f(b)s(e)g(handed)f(to)i +Fp(mount)e Fx(as)i(the)g(\014lesystem)f(t)m(yp)s(e|it)h(should)f(ha)m +(v)m(e)150 1529 y(suc)m(h)h(v)-5 b(alues)31 b(as)f Fp(4.2)p +Fx(,)g Fp(nfs)g Fx(or)g Fp(swap)p Fx(.)40 b(The)29 b(v)-5 +b(alue)31 b(is)g(not)f(examined)h(for)f(correctness.)275 +1670 y(There)21 b(is)g(one)h(sp)s(ecial)g(case.)39 b(If)21 +b(the)h(\014lesystem)g(t)m(yp)s(e)f(is)h(sp)s(eci\014ed)f(as)g(`)p +Fp(export)p Fx(')g(then)g(the)h(\014lesystem)150 1779 +y(information)28 b(will)h(not)f(b)s(e)f(added)h(to)g(the)g(host's)h +Fp(fstab)d Fx(information,)j(but)f(it)g(will)g(still)h(b)s(e)f(visible) +g(on)150 1889 y(the)k(net)m(w)m(ork.)48 b(This)31 b(is)h(useful)g(for)g +(de\014ning)f(hosts)h(whic)m(h)g(con)m(tain)i(referenced)e(v)m(olumes)h +(but)e(whic)m(h)150 1999 y(are)g(not)f(under)f(full)h(con)m(trol)i(of)f +Ft(FSinfo)p Fx(.)275 2140 y(Example:)390 2281 y Fp(fstype)46 +b(=)i(swap)150 2487 y Fm(8.6.2)63 b(opts)41 b(Option)150 +2634 y Fx(This)30 b(de\014nes)f(an)m(y)i(options)f(that)h(should)f(b)s +(e)g(giv)m(en)h(to)g Fn(moun)m(t)p Fx(\(8\))h(in)e(the)g +Fp(fstab)f Fx(\014le.)41 b(F)-8 b(or)31 b(example:)390 +2776 y Fp(opts)47 b(=)g(rw,nosuid,grpid)150 2982 y Fm(8.6.3)63 +b(passno)42 b(Option)150 3129 y Fx(This)34 b(de\014nes)g(the)h +Fn(fsc)m(k)p Fx(\(8\))h(pass)e(n)m(um)m(b)s(er)f(in)i(whic)m(h)f(to)i +(c)m(hec)m(k)g(the)f(\014lesystem.)54 b(This)33 b(v)-5 +b(alue)36 b(will)f(b)s(e)150 3238 y(placed)c(in)m(to)g(the)g +Fp(fstab)e Fx(\014le.)275 3379 y(Example:)390 3521 y +Fp(passno)46 b(=)i(1)150 3727 y Fm(8.6.4)63 b(freq)41 +b(Option)150 3874 y Fx(This)27 b(de\014nes)h(the)g(in)m(terv)-5 +b(al)29 b(\(in)g(da)m(ys\))f(b)s(et)m(w)m(een)h(dumps.)38 +b(The)28 b(v)-5 b(alue)28 b(is)h(placed)f(as)h(is)f(in)m(to)h(the)f +Fp(fstab)150 3983 y Fx(\014le.)275 4125 y(Example:)390 +4266 y Fp(freq)47 b(=)g(3)150 4472 y Fm(8.6.5)63 b(moun)m(t)41 +b(Option)150 4619 y Fx(This)e(de\014nes)g(the)h(moun)m(tp)s(oin)m(t)g +(at)g(whic)m(h)g(to)g(place)h(the)f(\014lesystem.)70 +b(If)39 b(the)h(moun)m(tp)s(oin)m(t)g(of)g(the)150 4729 +y(\014lesystem)26 b(is)f(sp)s(eci\014ed)g(as)h Fp(default)p +Fx(,)f(then)g(the)h(\014lesystem)g(will)g(b)s(e)f(moun)m(ted)g(in)g +(the)h(automoun)m(ter's)150 4838 y(tree)39 b(under)f(its)h(v)m(olume)g +(name)g(and)f(the)h(moun)m(t)f(will)h(automatically)j(b)s(e)c +(inherited)g(b)m(y)h(the)g(auto-)150 4948 y(moun)m(ter.)275 +5089 y(F)-8 b(ollo)m(wing)34 b(the)e(moun)m(tp)s(oin)m(t,)g(namespace)h +(information)f(for)f(the)h(\014lesystem)g(ma)m(y)h(b)s(e)e(describ)s +(ed.)150 5199 y(The)f(options)h(that)g(can)f(b)s(e)g(giv)m(en)h(here)g +(are)f Fp(exportfs)p Fx(,)f Fp(volname)f Fx(and)i Fp(sel)p +Fx(.)275 5340 y(The)f(format)i(is:)p eop end +%%Page: 85 87 +TeXDict begin 85 86 bop 150 -116 a Fx(Chapter)30 b(8:)41 +b(FSinfo)2785 b(85)390 299 y Fp(mount)333 b(:)47 b("mount")f(vol_tree)g +(;)390 518 y(vol_tree)189 b(:)47 b Fk(list\()p Fp(vol_tree_attr)p +Fk(\))c Fp(;)390 737 y(vol_tree_attr)963 847 y(:)95 b(<)p +Fk(string)p Fp(>)45 b("{")i Fk(list\()p Fp(vol_tree_info)p +Fk(\))c Fp(vol_tree)i("}")i(;)390 1066 y(vol_tree_info)963 +1176 y(:)g("exportfs")e(<)p Fk(export-data)p Fp(>)963 +1285 y(|)i("volname")e(<)p Fk(volname)p Fp(>)963 1395 +y(|)i("sel")g(<)p Fk(selector-list)p Fp(>)963 1504 y(;)275 +1640 y Fx(Example:)390 1775 y Fp(mount)f(default)g({)581 +1884 y(exportfs)f("dylan)i(dougal)f(florence)f(zebedee")581 +1994 y(volname)h(/vol/andrew)390 2103 y(})275 2239 y +Fx(In)29 b(the)i(ab)s(o)m(v)m(e)h(example,)f(the)g(\014lesystem)f +(curren)m(tly)h(b)s(eing)f(declared)h(will)g(ha)m(v)m(e)g(an)g(en)m +(try)f(placed)150 2348 y(in)m(to)d(the)f Fp(exports)e +Fx(\014le)i(allo)m(wing)i(the)e(\014lesystem)g(to)h(b)s(e)e(exp)s +(orted)g(to)i(the)f(mac)m(hines)h Fp(dylan)p Fx(,)e Fp(dougal)p +Fx(,)150 2458 y Fp(florence)41 b Fx(and)i Fp(zebedee)p +Fx(.)78 b(The)43 b(v)m(olume)h(name)f(b)m(y)h(whic)m(h)f(the)g +(\014lesystem)h(will)g(b)s(e)f(referred)f(to)150 2567 +y(remotely)-8 b(,)32 b(is)f Fp(/vol/andrew)p Fx(.)38 +b(By)31 b(declaring)g(the)g(moun)m(tp)s(oin)m(t)g(to)g(b)s(e)f +Fp(default)p Fx(,)f(the)i(\014lesystem)g(will)150 2677 +y(b)s(e)h(moun)m(ted)h(on)g(the)g(lo)s(cal)i(mac)m(hine)e(in)g(the)g +(automoun)m(ter)h(tree,)h(where)d Ft(A)n(md)43 b Fx(will)33 +b(automatically)150 2787 y(inherit)d(the)h(moun)m(t)f(as)h +Fp(/vol/andrew)p Fx(.)150 2947 y(`)p Fp(exportfs)p Fx(')630 +3057 y(a)38 b(string)g(de\014ning)e(whic)m(h)i(mac)m(hines)g(the)g +(\014lesystem)f(ma)m(y)i(b)s(e)e(exp)s(orted)g(to.)63 +b(This)37 b(is)630 3166 y(copied,)42 b(as)e(is,)h(in)m(to)g(the)e +Fp(exports)e Fx(\014le|no)j(sanit)m(y)g(c)m(hec)m(king)h(is)e(p)s +(erformed)f(on)h(this)630 3276 y(string.)150 3436 y(`)p +Fp(volname)p Fx(')94 b(a)33 b(string)g(whic)m(h)g(declares)h(the)f +(remote)h(name)f(b)m(y)f(whic)m(h)h(to)h(reference)f(the)g +(\014lesystem.)630 3545 y(The)27 b(string)g(is)g(en)m(tered)g(in)m(to)i +(a)e(dictionary)h(and)e(allo)m(ws)j(y)m(ou)e(to)h(refer)f(to)h(this)f +(\014lesystem)630 3655 y(in)j(other)h(places)g(b)m(y)f(this)g(v)m +(olume)i(name.)150 3815 y(`)p Fp(sel)p Fx(')286 b(a)28 +b(string)f(whic)m(h)g(is)g(placed)h(in)m(to)g(the)g(automoun)m(ter)g +(maps)e(as)i(a)f(selector)i(for)e(the)h(\014lesys-)630 +3925 y(tem.)150 4125 y Fm(8.6.6)63 b(dumpset)41 b(Option)150 +4271 y Fx(This)30 b(pro)m(vides)h(supp)s(ort)f(for)h(Imp)s(erial)f +(College's)k(lo)s(cal)e(\014le)f(bac)m(kup)g(to)s(ols)h(and)f(is)g(not) +g(do)s(cumen)m(ted)150 4381 y(further)e(here.)150 4581 +y Fm(8.6.7)63 b(log)41 b(Option)150 4728 y Fx(Sp)s(eci\014es)36 +b(the)i(log)g(device)g(for)f(the)g(curren)m(t)g(\014lesystem.)61 +b(This)36 b(is)h(ignored)g(if)g(not)h(required)e(b)m(y)h(the)150 +4838 y(particular)31 b(\014lesystem)f(t)m(yp)s(e.)150 +5071 y Fw(8.7)68 b Fg(FSinfo)53 b Fw(static)46 b(moun)l(ts)150 +5230 y Fx(Eac)m(h)27 b(host)g(ma)m(y)g(also)h(ha)m(v)m(e)g(a)f(n)m(um)m +(b)s(er)f(of)g(statically)k(moun)m(ted)c(\014lesystems.)40 +b(F)-8 b(or)28 b(example,)g(the)f(host)150 5340 y(ma)m(y)37 +b(b)s(e)e(a)i(diskless)f(w)m(orkstation)h(in)f(whic)m(h)g(case)h(it)g +(will)f(ha)m(v)m(e)i(no)e Fp(fs)f Fx(declarations.)59 +b(In)36 b(this)g(case)p eop end +%%Page: 86 88 +TeXDict begin 86 87 bop 150 -116 a Fx(86)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y(the)i +Fp(mount)e Fx(declaration)j(is)f(used)f(to)i(determine)e(from)h(where)f +(its)h(\014lesystems)g(will)g(b)s(e)f(moun)m(ted.)45 +b(In)150 408 y(addition)33 b(to)g(b)s(eing)g(added)f(to)h(the)g +Fp(fstab)f Fx(\014le,)h(this)g(information)g(can)g(also)h(b)s(e)e(used) +g(to)h(generate)i(a)150 518 y(suitable)c Fp(bootparams)c +Fx(\014le.)390 657 y Fp(mount)333 b(:)47 b("mount")f(<)p +Fk(volname)p Fp(>)f Fk(list\()p Fp(localinfo)p Fk(\))f +Fp(;)390 876 y(localinfo)141 b(:)47 b(localinfo_attr)d(<)p +Fk(string)p Fp(>)i(;)390 1095 y(localinfo_attr)963 1205 +y(:)h("as")963 1314 y(|)g("from")963 1424 y(|)g("fstype")963 +1534 y(|)g("opts")963 1643 y(;)275 1782 y Fx(The)30 b(\014lesystem)i +(sp)s(eci\014ed)e(to)i(b)s(e)e(moun)m(ted)h(will)h(b)s(e)e(searc)m(hed) +i(for)f(in)g(the)g(dictionary)h(of)f(v)m(olume)150 1891 +y(names)f(built)g(when)g(scanning)g(the)h(list)g(of)f(hosts')h +(de\014nitions.)275 2030 y(The)e(attributes)i(ha)m(v)m(e)h(the)f(follo) +m(wing)g(seman)m(tics:)150 2196 y(`)p Fp(from)e Fk(machine)p +Fx(')630 2305 y(moun)m(t)h(the)h(\014lesystem)g(from)e(the)i(mac)m +(hine)g(with)f(the)h(hostname)f(of)h Fo(mac)m(hine)p +Fx(.)150 2469 y(`)p Fp(as)f Fk(mountpoint)p Fx(')630 +2579 y(moun)m(t)37 b(the)g(\014lesystem)h(lo)s(cally)g(as)g(the)f(name) +g(giv)m(en,)j(in)d(case)h(this)f(is)g(di\013eren)m(t)g(from)630 +2688 y(the)31 b(adv)m(ertised)g(v)m(olume)g(name)f(of)h(the)f +(\014lesystem.)150 2852 y(`)p Fp(opts)f Fk(options)p +Fx(')630 2962 y(nativ)m(e)j Fn(moun)m(t)p Fx(\(8\))f(options.)150 +3125 y(`)p Fp(fstype)e Fk(type)p Fx(')630 3235 y(t)m(yp)s(e)i(of)f +(\014lesystem)h(to)g(b)s(e)f(moun)m(ted.)275 3401 y(An)g(example:)390 +3539 y Fp(mount)46 b(/export/exec/hp300/local)c(as)47 +b(/usr/local)275 3678 y Fx(If)38 b(the)h(moun)m(tp)s(oin)m(t)f(sp)s +(eci\014ed)g(is)h(either)g Fp(/)f Fx(or)h Fp(swap)p Fx(,)h(the)e(mac)m +(hine)i(will)f(b)s(e)f(considered)g(to)i(b)s(e)150 3788 +y(b)s(o)s(oting)35 b(o\013)h(the)f(net)g(and)g(this)g(will)g(b)s(e)g +(noted)g(for)g(use)g(in)f(generating)j(a)e Fp(bootparams)e +Fx(\014le)i(for)g(the)150 3897 y(host)30 b(whic)m(h)h(o)m(wns)f(the)g +(\014lesystems.)150 4136 y Fw(8.8)68 b(De\014ning)45 +b(an)g Fg(A)l(md)58 b Fw(Moun)l(t)45 b(Map)g(in)f Fg(FSinfo)150 +4295 y Fx(The)c(maps)f(used)g(b)m(y)h Ft(A)n(md)50 b +Fx(can)40 b(b)s(e)g(constructed)g(from)f Ft(FSinfo)47 +b Fx(b)m(y)40 b(de\014ning)f(all)i(the)f(automoun)m(t)150 +4405 y(trees.)h Ft(FSinfo)c Fx(tak)m(es)32 b(all)f(the)g(de\014nitions) +f(found)f(and)g(builds)h(one)g(map)g(for)g(eac)m(h)i(top)f(lev)m(el)h +(tree.)275 4544 y(The)21 b(automoun)m(t)i(tree)f(is)g(usually)g +(de\014ned)f(last.)38 b(A)22 b(single)h(automoun)m(t)g(con\014guration) +f(will)g(usually)150 4653 y(apply)i(to)g(an)g(en)m(tire)h(managemen)m +(t)g(domain.)38 b(One)24 b Fp(automount)d Fx(declaration)26 +b(is)e(needed)f(for)h(eac)m(h)h Ft(A)n(md)150 4763 y +Fx(automoun)m(t)c(p)s(oin)m(t.)38 b Ft(FSinfo)26 b Fx(determines)21 +b(whether)e(the)i(automoun)m(t)g(p)s(oin)m(t)g(is)f Fo(direct)j +Fx(\(see)e(Section)g(5.20)150 4872 y([Direct)j(Automoun)m(t)f +(Filesystem],)j(page)d(55\))h(or)e Fo(indirect)j Fx(\(see)e(Section)g +(5.23)h([T)-8 b(op-lev)m(el)25 b(Filesystem],)150 4982 +y(page)i(56\).)41 b(Direct)28 b(automoun)m(t)f(p)s(oin)m(ts)g(are)g +(distinguished)e(b)m(y)i(the)g(fact)g(that)g(there)g(is)g(no)f +(underlying)150 5092 y Fo(automoun)m(t)p 587 5092 28 +4 v 41 w(tree)p Fx(.)390 5230 y Fp(automount)141 b(:)47 +b("automount")e Fk(opt\()p Fp(auto_opts)p Fk(\))f Fp(automount_tree)g +(;)p eop end +%%Page: 87 89 +TeXDict begin 87 88 bop 150 -116 a Fx(Chapter)30 b(8:)41 +b(FSinfo)2785 b(87)390 299 y Fp(auto_opts)141 b(:)47 +b("opts")f(<)p Fk(mount-options)p Fp(>)e(;)390 518 y(automount_tree)963 +628 y(:)j Fk(list\()p Fp(automount_attr)p Fk(\))963 737 +y Fp(;)390 956 y(automount_attr)963 1066 y(:)g(<)p Fk(string)p +Fp(>)f("=")h(<)p Fk(volname)p Fp(>)963 1176 y(|)g(<)p +Fk(string)p Fp(>)f("->")g(<)p Fk(symlink)p Fp(>)963 1285 +y(|)h(<)p Fk(string)p Fp(>)f("{")h(automount_tree)d("}")963 +1395 y(;)275 1538 y Fx(If)31 b Fp(<)p Fo(moun)m(t-options)p +Fp(>)i Fx(is)f(giv)m(en,)j(then)d(it)h(is)f(the)h(string)f(to)h(b)s(e)f +(placed)h(in)f(the)g(maps)g(for)g Ft(A)n(md)42 b Fx(for)150 +1648 y(the)31 b Fp(opts)e Fx(option.)275 1791 y(A)36 +b Fo(map)i Fx(is)e(t)m(ypically)h(a)g(tree)f(of)g(\014lesystems,)i(for) +e(example)g Fp(home)f Fx(normally)h(con)m(tains)h(a)f(tree)h(of)150 +1901 y(\014lesystems)31 b(represen)m(ting)f(other)h(mac)m(hines)g(in)f +(the)g(net)m(w)m(ork.)275 2044 y(A)i(map)f(can)h(either)h(b)s(e)e(giv)m +(en)i(as)f(a)g(name)g(represen)m(ting)h(an)e(already)i(de\014ned)e(v)m +(olume)h(name,)h(or)150 2153 y(it)i(can)f(b)s(e)f(a)i(tree.)52 +b(A)34 b(tree)h(is)f(represen)m(ted)g(b)m(y)g(placing)h(braces)f(after) +h(the)f(name.)52 b(F)-8 b(or)34 b(example,)i(to)150 2263 +y(de\014ne)30 b(a)g(tree)h Fp(/vol)p Fx(,)f(the)g(follo)m(wing)i(map)e +(w)m(ould)g(b)s(e)g(de\014ned:)390 2406 y Fp(automount)45 +b(/vol)i({)g(})275 2550 y Fx(Within)30 b(a)h(tree,)g(the)g(only)f +(items)h(that)g(can)g(app)s(ear)f(are)g(more)h(maps.)40 +b(F)-8 b(or)31 b(example:)390 2693 y Fp(automount)45 +b(/vol)i({)581 2803 y(andrew)f({)h(})581 2912 y(X11)g({)g(})390 +3022 y(})275 3165 y Fx(In)25 b(this)i(case,)i Ft(FSinfo)k +Fx(will)27 b(lo)s(ok)g(for)g(v)m(olumes)g(named)f Fp(/vol/andrew)e +Fx(and)i Fp(/vol/X11)e Fx(and)i(a)h(map)150 3275 y(en)m(try)35 +b(will)f(b)s(e)g(generated)i(for)e(eac)m(h.)54 b(If)34 +b(the)g(v)m(olumes)h(are)g(de\014ned)e(more)i(than)f(once,)i(then)e +Ft(FSinfo)150 3384 y Fx(will)d(generate)h(a)e(series)h(of)g(alternate)h +(en)m(tries)f(for)f(them)g(in)g(the)h(maps.)275 3528 +y(Instead)39 b(of)h(a)h(tree,)i(either)d(a)g(link)g(\()p +Fo(name)45 b Fp(->)40 b Fo(destination)p Fx(\))h(or)f(a)g(reference)g +(can)g(b)s(e)g(sp)s(eci\014ed)150 3637 y(\()p Fo(name)32 +b Fp(=)27 b Fo(destination)p Fx(\).)40 b(A)27 b(link)g(creates)h(a)f +(sym)m(b)s(olic)h(link)e(to)i(the)f(string)f(sp)s(eci\014ed,)h(without) +g(further)150 3747 y(pro)s(cessing)k(the)h(en)m(try)-8 +b(.)45 b(A)31 b(reference)h(will)g(examine)g(the)g(destination)g +(\014lesystem)g(and)f(optimize)i(the)150 3856 y(reference.)60 +b(F)-8 b(or)38 b(example,)h(to)e(create)h(an)f(en)m(try)g(for)f +Fp(njw)g Fx(in)h(the)g Fp(/homes)e Fx(map,)j(either)f(of)g(the)g(t)m(w) +m(o)150 3966 y(forms)30 b(can)g(b)s(e)g(used:)390 4109 +y Fp(automount)45 b(/homes)h({)581 4219 y(njw)h(->)g(/home/dylan/njw) +390 4328 y(})275 4472 y Fx(or)390 4615 y Fp(automount)e(/homes)h({)581 +4725 y(njw)h(=)g(/home/dylan/njw)390 4834 y(})275 4977 +y Fx(In)34 b(the)i(\014rst)e(example,)k(when)c Fp(/homes/njw)f +Fx(is)i(referenced)h(from)f Ft(A)n(md)p Fx(,)h(a)g(link)f(will)h(b)s(e) +f(created)150 5087 y(leading)21 b(to)h Fp(/home/dylan/njw)16 +b Fx(and)21 b(the)g(automoun)m(ter)g(will)g(b)s(e)f(referenced)h(a)g +(second)g(time)g(to)h(resolv)m(e)150 5197 y(this)30 b(\014lename.)41 +b(The)30 b(map)g(en)m(try)h(w)m(ould)f(b)s(e:)390 5340 +y Fp(njw)47 b(type:=link;fs:=/home/dyl)o(an/n)o(jw)p +eop end +%%Page: 88 90 +TeXDict begin 88 89 bop 150 -116 a Fx(88)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(In)40 +b(the)h(second)g(example,)j(the)d(destination)h(directory)g(is)e +(analyzed)i(and)f(found)e(to)j(b)s(e)e(in)h(the)150 408 +y(\014lesystem)d Fp(/home/dylan)d Fx(whic)m(h)j(has)g(previously)g(b)s +(een)f(de\014ned)g(in)h(the)g(maps.)63 b(Hence)39 b(the)f(map)150 +518 y(en)m(try)31 b(will)f(lo)s(ok)h(lik)m(e:)390 658 +y Fp(njw)47 b(rhost:=dylan;rfs:=/home/)o(dyla)o(n;s)o(ubli)o(nk:=)o +(njw)275 797 y Fx(Creating)31 b(only)f(one)h(sym)m(b)s(olic)f(link,)h +(and)f(one)g(access)i(to)f Ft(A)n(md)p Fx(.)150 1037 +y Fw(8.9)68 b Fg(FSinfo)53 b Fw(Command)45 b(Line)g(Options)150 +1197 y Ft(FSinfo)37 b Fx(is)30 b(started)h(from)f(the)h(command)f(line) +g(b)m(y)h(using)f(the)g(command:)390 1336 y Fp(fsinfo)46 +b([)p Fk(options)p Fp(])f Fk(files)i Fp(...)275 1476 +y Fx(The)33 b(input)g(to)i Ft(FSinfo)40 b Fx(is)34 b(a)h(single)f(set)h +(of)f(de\014nitions)f(of)i(mac)m(hines)f(and)g(automoun)m(t)g(maps.)51 +b(If)150 1586 y(m)m(ultiple)38 b(\014les)f(are)h(giv)m(en)g(on)f(the)g +(command-line,)j(then)d(the)g(\014les)h(are)f(concatenated)j(together)e +(to)150 1695 y(form)27 b(the)h(input)f(source.)40 b(The)28 +b(\014les)f(are)i(passed)e(individually)g(through)h(the)g(C)f(pre-pro)s +(cessor)g(b)s(efore)150 1805 y(b)s(eing)j(parsed.)275 +1944 y(Sev)m(eral)25 b(options)h(de\014ne)e(a)h(pre\014x)f(for)g(the)h +(name)g(of)g(an)g(output)f(\014le.)39 b(If)25 b(the)g(pre\014x)f(is)h +(not)g(sp)s(eci\014ed)150 2054 y(no)j(output)g(of)h(that)g(t)m(yp)s(e)g +(is)f(pro)s(duced.)39 b(The)28 b(su\016x)f(used)h(will)h(corresp)s(ond) +e(either)i(to)g(the)g(hostname)150 2163 y(to)h(whic)m(h)f(a)g(\014le)h +(b)s(elongs,)f(or)h(to)g(the)f(t)m(yp)s(e)g(of)h(output)e(if)i(only)f +(one)g(\014le)h(is)f(pro)s(duced.)39 b(Dumpsets)29 b(and)150 +2273 y(the)35 b Fp(bootparams)d Fx(\014le)j(are)g(in)g(the)g(latter)h +(class.)55 b(T)-8 b(o)36 b(put)e(the)h(output)f(in)m(to)i(a)g(sub)s +(directory)d(simply)150 2383 y(put)38 b(a)g Fp(/)g Fx(at)h(the)g(end)e +(of)i(the)f(pre\014x,)h(making)g(sure)e(that)i(the)g(directory)g(has)f +(already)g(b)s(een)g(made)150 2492 y(b)s(efore)30 b(running)f +Ft(Fsinfo)p Fx(.)150 2697 y Fm(8.9.1)63 b Fl(-a)41 b +Fe(auto)s(dir)150 2844 y Fx(Sp)s(eci\014es)21 b(the)h(directory)g(name) +f(in)g(whic)m(h)h(to)g(place)g(the)g(automoun)m(ter's)g(moun)m(tp)s +(oin)m(ts.)38 b(This)21 b(defaults)150 2953 y(to)31 b +Fp(/a)p Fx(.)40 b(Some)31 b(sites)g(ha)m(v)m(e)g(the)g(auto)s(dir)f +(set)h(to)g(b)s(e)f Fp(/amd)p Fx(,)f(and)h(this)g(w)m(ould)g(b)s(e)g +(ac)m(hiev)m(ed)i(b)m(y:)390 3093 y Fp(fsinfo)46 b(-a)h(/amd)g(...)150 +3297 y Fm(8.9.2)63 b Fl(-b)41 b Fe(b)s(o)s(otparams)150 +3444 y Fx(This)34 b(sp)s(eci\014es)h(the)g(pre\014x)f(for)g(the)h +Fp(bootparams)d Fx(\014lename.)55 b(If)34 b(it)i(is)f(not)g(giv)m(en,)i +(then)e(the)g(\014le)g(will)150 3554 y(not)28 b(b)s(e)f(generated.)41 +b(The)28 b Fp(bootparams)d Fx(\014le)j(will)g(b)s(e)f(constructed)h +(for)g(the)g(destination)h(mac)m(hine)g(and)150 3663 +y(will)g(b)s(e)f(placed)h(in)m(to)h(a)f(\014le)g(named)g +Fp(bootparams)d Fx(and)i(pre\014xed)f(b)m(y)i(this)g(string.)40 +b(The)28 b(\014le)h(generated)150 3773 y(con)m(tains)k(a)g(list)g(of)g +(en)m(tries)g(describing)f(eac)m(h)h(diskless)f(clien)m(t)i(that)f(can) +g(b)s(o)s(ot)f(from)g(the)g(destination)150 3882 y(mac)m(hine.)275 +4022 y(As)23 b(an)h(example,)i(to)f(create)g(a)f Fp(bootparams)d +Fx(\014le)j(in)f(the)h(directory)h Fp(generic)p Fx(,)e(the)h(follo)m +(wing)h(w)m(ould)150 4132 y(b)s(e)30 b(used:)390 4271 +y Fp(fsinfo)46 b(-b)h(generic/)f(...)150 4475 y Fm(8.9.3)63 +b Fl(-d)41 b Fe(dumpsets)150 4622 y Fx(This)28 b(sp)s(eci\014es)h(the)g +(pre\014x)f(for)g(the)i Fp(dumpsets)c Fx(\014le.)41 b(If)28 +b(it)h(is)g(not)h(sp)s(eci\014ed,)e(then)h(the)g(\014le)g(will)g(not)h +(b)s(e)150 4732 y(generated.)52 b(The)33 b(\014le)h(will)g(b)s(e)f(for) +g(the)h(destination)g(mac)m(hine)h(and)e(will)h(b)s(e)f(placed)h(in)m +(to)h(a)f(\014lename)150 4842 y Fp(dumpsets)p Fx(,)d(pre\014xed)g(b)m +(y)h(this)h(string.)46 b(The)32 b Fp(dumpsets)e Fx(\014le)j(is)f(for)g +(use)g(b)m(y)g(Imp)s(erial)g(College's)j(lo)s(cal)150 +4951 y(bac)m(kup)30 b(system.)275 5091 y(F)-8 b(or)27 +b(example,)i(to)f(create)g(a)g Fp(dumpsets)d Fx(\014le)i(in)f(the)i +(directory)f Fp(generic)p Fx(,)f(then)h(y)m(ou)g(w)m(ould)g(use)g(the) +150 5200 y(follo)m(wing:)390 5340 y Fp(fsinfo)46 b(-d)h(generic/)f(...) +p eop end +%%Page: 89 91 +TeXDict begin 89 90 bop 150 -116 a Fx(Chapter)30 b(8:)41 +b(FSinfo)2785 b(89)150 299 y Fm(8.9.4)63 b Fl(-e)41 b +Fe(exp)s(ortfs)150 446 y Fx(De\014nes)26 b(the)g(pre\014x)e(for)i(the)f +Fp(exports)f Fx(\014les.)39 b(If)25 b(it)h(is)g(not)g(giv)m(en,)i(then) +d(the)h(\014le)g(will)g(not)g(b)s(e)f(generated.)150 +555 y(F)-8 b(or)46 b(eac)m(h)h(mac)m(hine)f(de\014ned)e(in)h(the)g +(con\014guration)h(\014les)g(as)f(ha)m(ving)h(disks,)j(an)c +Fp(exports)e Fx(\014le)j(is)150 665 y(constructed)38 +b(and)f(giv)m(en)i(a)f(\014lename)f(determined)h(b)m(y)f(the)h(name)g +(of)g(the)f(mac)m(hine,)k(pre\014xed)36 b(with)150 775 +y(this)d(string.)49 b(If)33 b(a)h(mac)m(hine)g(is)f(de\014ned)f(as)h +(diskless,)h(then)f(no)g Fp(exports)e Fx(\014le)j(will)f(b)s(e)g +(created)h(for)f(it.)150 884 y(The)d(\014les)g(con)m(tain)i(en)m(tries) +f(for)f(directories)i(on)e(the)g(mac)m(hine)h(that)g(ma)m(y)g(b)s(e)f +(exp)s(orted)g(to)h(clien)m(ts.)275 1026 y(Example:)40 +b(T)-8 b(o)30 b(create)h(the)e Fp(exports)f Fx(\014les)h(for)g(eac)m(h) +i(diskfull)e(mac)m(hine)h(and)f(place)h(them)f(in)m(to)i(the)150 +1135 y(directory)g Fp(exports)p Fx(:)390 1277 y Fp(fsinfo)46 +b(-e)h(exports/)f(...)150 1483 y Fm(8.9.5)63 b Fl(-f)41 +b Fe(fstab)150 1630 y Fx(This)c(de\014nes)g(the)h(pre\014x)e(for)i(the) +g Fp(fstab)e Fx(\014les.)63 b(The)37 b(\014les)h(will)g(only)g(b)s(e)f +(created)i(if)f(this)f(pre\014x)g(is)150 1739 y(de\014ned.)61 +b(F)-8 b(or)38 b(eac)m(h)h(mac)m(hine)f(de\014ned)e(in)h(the)h +(con\014guration)g(\014les,)i(a)d Fp(fstab)g Fx(\014le)g(is)h(created)g +(with)150 1849 y(the)30 b(\014lename)h(determined)f(b)m(y)g +(pre\014xing)f(this)i(string)f(with)g(the)g(name)h(of)f(the)h(mac)m +(hine.)41 b(These)30 b(\014les)150 1959 y(con)m(tain)i(en)m(tries)f +(for)f(\014lesystems)h(and)e(partitions)i(to)g(moun)m(t)g(at)g(b)s(o)s +(ot)f(time.)275 2100 y(Example,)g(to)h(create)h(the)f(\014les)f(in)g +(the)h(directory)g Fp(fstabs)p Fx(:)390 2241 y Fp(fsinfo)46 +b(-f)h(fstabs/)f(...)150 2448 y Fm(8.9.6)63 b Fl(-h)41 +b Fe(hostname)150 2595 y Fx(De\014nes)34 b(the)f(hostname)h(of)g(the)f +(destination)i(mac)m(hine)f(to)g(pro)s(cess)f(for.)50 +b(If)33 b(this)g(is)h(not)g(sp)s(eci\014ed,)f(it)150 +2704 y(defaults)d(to)i(the)e(lo)s(cal)i(mac)m(hine)f(name,)f(as)h +(returned)e(b)m(y)i Fn(gethostname)p Fx(\(2\).)275 2846 +y(Example:)390 2987 y Fp(fsinfo)46 b(-h)h(dylan.doc.ic.ac.uk)c(...)150 +3193 y Fm(8.9.7)63 b Fl(-m)41 b Fe(moun)m(t-maps)150 +3340 y Fx(De\014nes)31 b(the)h(pre\014x)e(for)h(the)h(automoun)m(ter)g +(\014les.)44 b(The)31 b(maps)g(will)g(only)h(b)s(e)f(pro)s(duced)e(if)j +(this)f(pre\014x)150 3450 y(is)f(de\014ned.)40 b(The)30 +b(moun)m(t)g(maps)g(suitable)g(for)g(the)h(net)m(w)m(ork)g(de\014ned)e +(b)m(y)h(the)h(con\014guration)f(\014les)h(will)150 3559 +y(b)s(e)c(placed)h(in)m(to)h(\014les)f(with)f(names)h(calculated)i(b)m +(y)d(pre\014xing)g(this)h(string)g(to)g(the)g(name)g(of)g(eac)m(h)h +(map.)275 3701 y(F)-8 b(or)25 b(example,)h(to)f(create)h(the)e +(automoun)m(ter)h(maps)f(and)f(place)j(them)e(in)g(the)g(directory)h +Fp(automaps)p Fx(:)390 3842 y Fp(fsinfo)46 b(-m)h(automaps/)f(...)150 +4048 y Fm(8.9.8)63 b Fl(-q)150 4195 y Fx(Selects)27 b(quiet)f(mo)s(de.) +38 b Ft(FSinfo)32 b Fx(suppress)24 b(the)i(\\running)e(commen)m(tary")j +(and)e(only)g(outputs)g(an)m(y)h(error)150 4305 y(messages)31 +b(whic)m(h)f(are)h(generated.)150 4511 y Fm(8.9.9)63 +b Fl(-v)150 4658 y Fx(Selects)28 b(v)m(erb)s(ose)f(mo)s(de.)39 +b(When)27 b(this)g(is)g(activ)-5 b(ated,)30 b(the)d(program)f(will)i +(displa)m(y)f(more)g(messages,)i(and)150 4768 y(displa)m(y)j(all)g(the) +g(information)g(disco)m(v)m(ered)h(when)e(p)s(erforming)f(the)i(seman)m +(tic)h(analysis)f(phase.)44 b(Eac)m(h)150 4877 y(v)m(erb)s(ose)31 +b(message)g(is)f(output)g(to)i Fp(stdout)c Fx(on)i(a)h(line)g(starting) +g(with)f(a)h(`)p Fp(#)p Fx(')f(c)m(haracter.)150 5083 +y Fm(8.9.10)63 b Fl(-D)41 b Fe(name)6 b Ff([=defn])150 +5230 y Fx(De\014nes)23 b(a)h(sym)m(b)s(ol)f Fo(name)28 +b Fx(for)23 b(the)h(prepro)s(cessor)e(when)g(reading)i(the)f +(con\014guration)h(\014les.)38 b(Equiv)-5 b(alen)m(t)150 +5340 y(to)31 b Fp(#define)e Fx(directiv)m(e.)p eop end +%%Page: 90 92 +TeXDict begin 90 91 bop 150 -116 a Fx(90)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fm(8.9.11)63 +b Fl(-I)41 b Fe(directory)150 446 y Fx(This)25 b(option)h(is)f(passed)g +(in)m(to)h(the)g(prepro)s(cessor)f(for)g(the)g(con\014guration)h +(\014les.)39 b(It)26 b(sp)s(eci\014es)f(directories)150 +555 y(in)30 b(whic)m(h)g(to)h(\014nd)e(include)h(\014les)150 +766 y Fm(8.9.12)63 b Fl(-U)41 b Fe(name)150 913 y Fx(Remo)m(v)m(es)32 +b(an)m(y)f(initial)g(de\014nition)f(of)h(the)g(sym)m(b)s(ol)f +Fo(name)p Fx(.)40 b(In)m(v)m(erse)31 b(of)g(the)f Fp(-D)g +Fx(option.)150 1163 y Fw(8.10)68 b(Errors)46 b(pro)t(duced)d(b)l(y)i +Fg(FSinfo)150 1323 y Fx(The)30 b(follo)m(wing)i(table)f(do)s(cumen)m +(ts)f(the)h(errors)e(and)h(w)m(arnings)g(whic)m(h)g Ft(FSinfo)37 +b Fx(ma)m(y)31 b(pro)s(duce.)150 1499 y Fp(")47 b(expected)630 +1609 y Fx(Occurs)30 b(if)g(an)g(unescap)s(ed)g(newline)g(is)g(found)g +(in)g(a)g(quoted)h(string.)150 1780 y Fp(ambiguous)45 +b(mount:)h Fk(volume)g Fp(is)i(a)f(replicated)e(filesystem)630 +1890 y Fx(If)24 b(sev)m(eral)i(\014lesystems)f(are)g(declared)g(as)g +(ha)m(ving)g(the)g(same)g(v)m(olume)h(name,)g(they)f(will)g(b)s(e)630 +1999 y(considered)36 b(replicated)h(\014lesystems.)57 +b(T)-8 b(o)36 b(moun)m(t)g(a)h(replicated)g(\014lesystem)f(statically) +-8 b(,)630 2109 y(a)33 b(sp)s(eci\014c)e(host)i(will)f(need)g(to)h(b)s +(e)e(named,)i(to)g(sa)m(y)f(whic)m(h)g(particular)h(cop)m(y)g(to)g(try) +f(and)630 2218 y(moun)m(t,)f(else)g(this)f(error)g(will)h(result.)150 +2389 y Fp(can't)46 b(open)h Fk(filename)f Fp(for)g(writing)630 +2499 y Fx(Occurs)30 b(if)g(an)m(y)h(errors)f(are)g(encoun)m(tered)h +(when)f(op)s(ening)g(an)g(output)g(\014le.)150 2670 y +Fp(cannot)46 b(determine)f(localname)h(since)g(volname)g +Fk(volume)g Fp(is)h(not)g(uniquely)f(defined)630 2780 +y Fx(If)27 b(a)i(v)m(olume)f(is)g(replicated)h(and)f(an)g(attempt)h(is) +f(made)g(to)g(moun)m(t)g(the)g(\014lesystem)g(stati-)630 +2889 y(cally)k(without)e(sp)s(ecifying)g(a)h(lo)s(cal)g(moun)m(tp)s +(oin)m(t,)g Ft(FSinfo)36 b Fx(cannot)31 b(calculate)i(a)e(moun)m(t-)630 +2999 y(p)s(oin)m(t,)g(as)f(the)h(desired)f(pathname)g(w)m(ould)g(b)s(e) +g(am)m(biguous.)150 3170 y Fk(device)46 b Fp(has)h(duplicate)e +(exportfs)h(data)630 3279 y Fx(Pro)s(duced)20 b(if)h(the)h(`)p +Fp(exportfs)p Fx(')d(option)j(is)f(used)g(m)m(ultiple)h(times)g(within) +e(the)i(same)g(branc)m(h)630 3389 y(of)37 b(a)g(\014lesystem)h +(de\014nition.)60 b(F)-8 b(or)38 b(example,)h(if)e(y)m(ou)g(attempt)h +(to)g(set)g(the)f(`)p Fp(exportfs)p Fx(')630 3499 y(data)31 +b(at)g(di\013eren)m(t)g(lev)m(els)h(of)e(the)h(moun)m(tp)s(oin)m(t)f +(directory)h(tree.)150 3670 y Fp(dump)47 b(frequency)e(for)i +Fk(host)p Fp(:)p Fk(device)e Fp(is)i(non-zero)630 3779 +y Fx(Occurs)41 b(if)h Fo(device)48 b Fx(has)42 b(its)g(`)p +Fp(fstype)p Fx(')f(declared)h(to)g(b)s(e)g(`)p Fp(swap)p +Fx(')f(or)h(`)p Fp(export)p Fx(')e(and)i(the)630 3889 +y(`)p Fp(dump)p Fx(')34 b(option)h(is)g(set)g(to)g(a)g(v)-5 +b(alue)35 b(greater)h(than)e(zero.)55 b(Sw)m(ap)34 b(devices)h(should)f +(not)h(b)s(e)630 3998 y(dump)s(ed.)150 4169 y Fp(duplicate)45 +b(host)i Fk(hostname)p Fp(!)630 4279 y Fx(If)30 b(a)h(host)f(has)g +(more)h(than)f(one)h(de\014nition.)150 4450 y Fp(end)47 +b(of)g(file)g(within)f(comment)630 4560 y Fx(A)30 b(commen)m(t)i(w)m +(as)f(un)m(terminated)f(b)s(efore)g(the)h(end)e(of)i(one)f(of)h(the)g +(con\014guration)f(\014les.)150 4731 y Fk(filename)p +Fp(:)45 b(cannot)h(open)h(for)g(reading)630 4840 y Fx(If)34 +b(a)h(\014le)f(sp)s(eci\014ed)g(on)g(the)h(command)f(line)h(as)f(con)m +(taining)i(con\014guration)f(data)g(could)630 4950 y(not)c(b)s(e)e(op)s +(ened.)150 5121 y Fk(filesystem)45 b Fp(has)i(a)g(volname)f(but)h(no)g +(exportfs)f(data)630 5230 y Fx(Occurs)30 b(when)f(a)i(v)m(olume)h(name) +e(is)h(declared)g(for)f(a)h(\014le)g(system,)g(but)f(the)g(string)h(sp) +s(eci-)630 5340 y(fying)f(what)h(mac)m(hines)f(the)h(\014lesystem)g +(can)f(b)s(e)g(exp)s(orted)g(to)h(is)g(missing.)p eop +end +%%Page: 91 93 +TeXDict begin 91 92 bop 150 -116 a Fx(Chapter)30 b(8:)41 +b(FSinfo)2785 b(91)150 299 y Fp(fs)47 b(field)g(")p Fk(field-name)p +Fp(")d(already)i(set)630 408 y Fx(Occurs)30 b(when)f(m)m(ultiple)i +(de\014nitions)f(are)h(giv)m(en)g(for)g(one)f(of)h(the)f(attributes)h +(of)g(a)g(host's)630 518 y(\014lesystem.)150 678 y Fp(host)47 +b(field)f(")p Fk(field-name)p Fp(")e(already)i(set)630 +788 y Fx(If)30 b(duplicate)h(de\014nitions)f(are)h(giv)m(en)g(for)f(an) +m(y)h(of)f(the)h(\014elds)f(with)g(a)h(host)f(de\014nition.)150 +948 y Fk(host)p Fp(:)p Fk(device)45 b Fp(has)i(more)f(than)h(one)g +(mount)f(point)630 1058 y Fx(Occurs)39 b(if)g(the)h(moun)m(t)g(option)g +(for)f(a)h(host's)g(\014lesystem)g(sp)s(eci\014es)f(m)m(ultiple)h +(trees)g(at)630 1167 y(whic)m(h)30 b(to)h(place)h(the)e(moun)m(tp)s +(oin)m(t.)150 1327 y Fk(host)p Fp(:)p Fk(device)45 b +Fp(has)i(no)g(mount)f(point)630 1437 y Fx(Occurs)30 b(if)g(the)h(`)p +Fp(mount)p Fx(')e(option)i(is)f(not)h(sp)s(eci\014ed)f(for)g(a)h +(host's)f(\014lesystem.)150 1597 y Fk(host)p Fp(:)p Fk(device)45 +b Fp(needs)h(field)g(")p Fk(field-name)p Fp(")630 1707 +y Fx(Occurs)34 b(when)f(a)i(\014lesystem)g(is)g(missing)f(a)h(required) +f(\014eld.)53 b Fo(\014eld-name)39 b Fx(could)c(b)s(e)f(one)630 +1816 y(of)d(`)p Fp(fstype)p Fx(',)e(`)p Fp(opts)p Fx(',)h(`)p +Fp(passno)p Fx(')f(or)h(`)p Fp(mount)p Fx('.)150 1976 +y Fk(host)p Fp(:mount)45 b(field)h(specified)g(for)h(swap)f(partition) +630 2086 y Fx(Occurs)35 b(if)h(a)g(moun)m(tp)s(oin)m(t)g(is)g(giv)m(en) +h(for)e(a)h(\014lesystem)g(whose)g(t)m(yp)s(e)g(is)g(declared)g(to)h(b) +s(e)630 2196 y(`)p Fp(swap)p Fx('.)150 2356 y Fp(malformed)45 +b(IP)i(dotted)g(quad:)f Fk(address)630 2465 y Fx(If)e(the)h(In)m +(ternet)g(address)f(of)h(an)g(in)m(terface)h(is)f(incorrectly)h(sp)s +(eci\014ed.)83 b(An)45 b(In)m(ternet)630 2575 y(address)26 +b(de\014nition)h(is)g(handled)f(to)h Fn(inet)p 2046 2575 +28 5 v 41 w(addr)p Fx(\(3N\))g(to)h(see)f(if)g(it)h(can)f(cop)s(e.)40 +b(If)26 b(not,)i(then)630 2685 y(this)i(message)i(will)e(b)s(e)g +(displa)m(y)m(ed.)150 2845 y Fp(malformed)45 b(netmask:)h +Fk(netmask)630 2954 y Fx(If)38 b(the)h(netmask)g(cannot)g(b)s(e)f(deco) +s(ded)g(as)h(though)f(it)h(w)m(ere)g(a)g(hexadecimal)h(n)m(um)m(b)s +(er,)630 3064 y(then)f(this)g(message)i(will)e(b)s(e)g(displa)m(y)m +(ed.)68 b(It)39 b(will)h(t)m(ypically)h(b)s(e)e(caused)g(b)m(y)g +(incorrect)630 3173 y(c)m(haracters)32 b(in)e(the)g Fo(netmask)37 +b Fx(v)-5 b(alue.)150 3334 y Fp(mount)46 b(field)h(")p +Fk(field-name)p Fp(")d(already)i(set)630 3443 y Fx(Occurs)30 +b(when)f(a)i(static)h(moun)m(t)e(has)g(m)m(ultiple)h(de\014nitions)f +(of)h(the)f(same)h(\014eld.)150 3603 y Fp(mount)46 b(tree)h(field)f(")p +Fk(field-name)p Fp(")f(already)h(set)630 3713 y Fx(Occurs)30 +b(when)g(the)h Fo(\014eld-name)36 b Fx(is)31 b(de\014ned)e(more)i(than) +f(once)i(during)d(the)i(de\014nition)g(of)630 3823 y(a)g(\014lesystems) +f(moun)m(tp)s(oin)m(t.)150 3983 y Fp(netif)46 b(field)h +Fk(field-name)e Fp(already)h(set)630 4092 y Fx(Occurs)30 +b(if)g(y)m(ou)h(attempt)g(to)g(de\014ne)f(an)g(attribute)h(of)g(an)f +(in)m(terface)i(more)f(than)f(once.)150 4253 y Fp(network)46 +b(booting)g(requires)f(both)i(root)f(and)h(swap)g(areas)630 +4362 y Fx(Occurs)28 b(if)h(a)h(mac)m(hine)g(has)e(moun)m(t)i +(declarations)g(for)f(either)g(the)h(ro)s(ot)f(partition)h(or)f(the)630 +4472 y(sw)m(ap)34 b(area,)i(but)d(not)i(b)s(oth.)51 b(Y)-8 +b(ou)34 b(cannot)h(de\014ne)e(a)h(mac)m(hine)h(to)g(only)f(partially)h +(b)s(o)s(ot)630 4581 y(via)c(the)g(net)m(w)m(ork.)150 +4741 y Fp(no)47 b(disk)g(mounts)f(on)h Fk(hostname)630 +4851 y Fx(If)38 b(there)g(are)h(no)f(static)i(moun)m(ts,)g(nor)e(lo)s +(cal)h(disk)f(moun)m(ts)g(sp)s(eci\014ed)f(for)h(a)h(mac)m(hine,)630 +4961 y(this)30 b(message)i(will)e(b)s(e)g(displa)m(y)m(ed.)150 +5121 y Fp(no)47 b(volname)f(given)g(for)h Fk(host)p Fp(:)p +Fk(device)630 5230 y Fx(Occurs)28 b(when)g(a)h(\014lesystem)g(is)f +(de\014ned)g(to)h(b)s(e)f(moun)m(ted)h(on)f Fp(default)p +Fx(,)g(but)g(no)g(v)m(olume)630 5340 y(name)i(is)h(giv)m(en)g(for)f +(the)h(\014le)f(system,)h(then)f(the)h(moun)m(tp)s(oin)m(t)f(cannot)h +(b)s(e)f(determined.)p eop end +%%Page: 92 94 +TeXDict begin 92 93 bop 150 -116 a Fx(92)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fp(not)47 +b(allowed)f('/')h(in)g(a)g(directory)f(name)630 408 y +Fx(Occurs)35 b(when)g(a)i(pathname)e(with)h(m)m(ultiple)h(directory)f +(elemen)m(ts)h(is)f(sp)s(eci\014ed)g(as)g(the)630 518 +y(name)27 b(for)f(an)h(automoun)m(ter)h(tree.)40 b(A)27 +b(tree)g(should)f(only)h(ha)m(v)m(e)h(one)f(name)g(at)g(eac)m(h)h(lev)m +(el.)150 677 y Fp(pass)47 b(number)f(for)h Fk(host)p +Fp(:)p Fk(device)d Fp(is)k(non-zero)630 787 y Fx(Occurs)41 +b(if)h Fo(device)48 b Fx(has)42 b(its)g(`)p Fp(fstype)p +Fx(')f(declared)h(to)g(b)s(e)g(`)p Fp(swap)p Fx(')f(or)h(`)p +Fp(export)p Fx(')e(and)i(the)630 897 y Fn(fsc)m(k)p Fx(\(8\))27 +b(pass)e(n)m(um)m(b)s(er)g(is)g(set.)40 b(Sw)m(ap)25 +b(devices)h(should)f(not)h(b)s(e)f(fsc)m(k'd.)39 b(See)26 +b(Section)g(8.6.1)630 1006 y([FSinfo)k(fst)m(yp)s(e)h(Option],)f(page)h +(84.)150 1166 y Fp(sub-directory)44 b Fk(directory)h +Fp(of)j Fk(directory-tree)c Fp(starts)i(with)g('/')630 +1275 y Fx(Within)40 b(the)f(\014lesystem)h(sp)s(eci\014cation)g(for)f +(a)h(host,)h(if)f(an)f(elemen)m(t)i Fo(directory)47 b +Fx(of)40 b(the)630 1385 y(moun)m(tp)s(oin)m(t)30 b(b)s(egins)g(with)g +(a)h(`)p Fp(/)p Fx(')g(and)e(it)i(is)g(not)f(the)h(start)g(of)f(the)h +(tree.)150 1544 y Fp(sub-directory)44 b(of)j Fk(directory-tree)d +Fp(is)j(named)g("default")630 1654 y Fx(`)p Fp(default)p +Fx(')25 b(is)h(a)h(k)m(eyw)m(ord)g(used)f(to)h(sp)s(ecify)f(if)g(a)h +(moun)m(tp)s(oin)m(t)g(should)e(b)s(e)h(automatically)630 +1763 y(calculated)j(b)m(y)f Ft(FSinfo)p Fx(.)40 b(If)27 +b(y)m(ou)h(attempt)g(to)g(sp)s(ecify)f(a)h(directory)g(name)f(as)h +(this,)g(it)g(will)630 1873 y(use)i(the)h(\014lename)f(of)h +Fp(default)d Fx(but)i(will)h(pro)s(duce)e(this)h(w)m(arning.)150 +2032 y Fp(unknown)46 b(\\)h(sequence)630 2142 y Fx(Occurs)25 +b(if)h(an)f(unkno)m(wn)f(escap)s(e)i(sequence)g(is)g(found)e(inside)i +(a)g(string.)39 b(Within)26 b(a)g(string,)630 2252 y(y)m(ou)j(can)g +(giv)m(e)h(the)f(standard)f(C)g(escap)s(e)h(sequences)g(for)g(strings,) +g(suc)m(h)f(as)h(newlines)g(and)630 2361 y(tab)i(c)m(haracters.)150 +2521 y Fp(unknown)46 b(directory)f(attribute)630 2630 +y Fx(If)29 b(an)g(unkno)m(wn)e(k)m(eyw)m(ord)j(is)f(found)f(while)h +(reading)g(the)g(de\014nition)g(of)g(a)h(host's)f(\014lesys-)630 +2740 y(tem)i(moun)m(t)f(option.)150 2899 y Fp(unknown)46 +b(filesystem)f(attribute)630 3009 y Fx(Occurs)30 b(if)g(an)g +(unrecognized)h(k)m(eyw)m(ord)g(is)f(used)g(when)f(de\014ning)h(a)g +(host's)h(\014lesystems.)150 3168 y Fp(unknown)46 b(host)g(attribute) +630 3278 y Fx(Occurs)30 b(if)g(an)g(unrecognized)h(k)m(eyw)m(ord)g(is)f +(used)g(when)f(de\014ning)h(a)g(host.)150 3437 y Fp(unknown)46 +b(mount)g(attribute)630 3547 y Fx(Occurs)e(if)g(an)h(unrecognized)g(k)m +(eyw)m(ord)g(is)f(found)f(while)i(parsing)f(the)h(list)g(of)f(static) +630 3656 y(moun)m(ts.)150 3816 y Fp(unknown)i(volname)g +Fk(volume)g Fp(automounted)e Fk([)k Fp(on)f Fk(name)g(])630 +3925 y Fx(Occurs)32 b(if)g Fo(v)m(olume)39 b Fx(is)32 +b(used)g(in)g(a)h(de\014nition)f(of)h(an)f(automoun)m(t)i(map)e(but)f +(the)i(v)m(olume)630 4035 y(name)d(has)h(not)f(b)s(een)g(declared)h +(during)e(the)h(host)h(\014lesystem)f(de\014nitions.)150 +4194 y Fp(volname)46 b Fk(volume)g Fp(is)h(unknown)630 +4304 y Fx(Occurs)31 b(if)g(an)g(attempt)h(is)f(made)h(to)g(moun)m(t)f +(or)g(reference)h(a)f(v)m(olume)h(name)f(whic)m(h)g(has)630 +4413 y(not)g(b)s(een)e(declared)i(during)e(the)i(host)f(\014lesystem)h +(de\014nitions.)150 4573 y Fp(volname)46 b Fk(volume)g +Fp(not)h(exported)e(from)i Fk(machine)630 4682 y Fx(Occurs)29 +b(if)h(y)m(ou)f(attempt)i(to)f(moun)m(t)g(the)g(v)m(olume)g +Fo(v)m(olume)36 b Fx(from)29 b(a)h(mac)m(hine)g(whic)m(h)f(has)630 +4792 y(not)i(declared)f(itself)i(to)f(ha)m(v)m(e)g(suc)m(h)f(a)h +(\014lesystem)g(a)m(v)-5 b(ailable.)p eop end +%%Page: 93 95 +TeXDict begin 93 94 bop 150 -116 a Fx(Chapter)30 b(9:)41 +b(Hlfsd)2836 b(93)150 299 y Fu(9)80 b(Hlfsd)150 507 y +Ft(Hlfsd)35 b Fx(is)25 b(a)h(daemon)g(whic)m(h)f(implemen)m(ts)h(a)f +(\014lesystem)h(con)m(taining)h(a)f(sym)m(b)s(olic)g(link)f(to)h(sub)s +(directory)150 617 y(within)39 b(a)i(user's)e(home)h(directory)-8 +b(,)43 b(dep)s(ending)38 b(on)i(the)g(user)f(whic)m(h)h(accessed)h +(that)g(link.)69 b(It)40 b(w)m(as)150 726 y(primarily)35 +b(designed)f(to)i(redirect)f(incoming)h(mail)g(to)f(users')g(home)g +(directories,)i(so)e(that)h(it)f(can)h(b)s(e)150 836 +y(read)e(from)g(an)m(ywhere.)53 b(It)35 b(w)m(as)g(designed)f(and)g +(implemen)m(ted)h(b)m(y)g(Erez)f(Zadok)h(\()p Fp(http:)s(/)s(/)s(www)s +(.)s(cs)s(.)150 945 y(sunysb.edu/~ezk)p Fx(\))28 b(and)i(Alexander)h +(Dupuy)e(\()p Fp(dupuy)h(AT)f(cs.columbia.edu)p Fx(\),)f(at)k(the)f +(Computer)150 1055 y(Science)k(Departmen)m(t)h(\()p Fp(http:)s(/)s(/)s +(www)s(.)s(cs)s(.)s(columbia)s(.)s(e)o(du)s(/)r Fx(\))29 +b(of)35 b(Colum)m(bia)f(Univ)m(ersit)m(y)i(\()p Fp(http:)s(/)s(/)150 +1165 y(www)t(.)s(columbia)t(.)s(edu)t(/)s Fx(\).)49 b(A)35 +b(pap)s(er)f(\()p Fp(http:)t(/)t(/)s(www)t(.)s(fsl)t(.)s(cs)t(.)r(suny) +o(sb)t(.)r(edu)s(/)s(d)o(ocs)s(/)s(hl)o(fsd)s(/)s(hl)o(fsd)s(.)150 +1274 y(html)p Fx(\))c(on)g Ft(Hlfsd)40 b Fx(w)m(as)31 +b(presen)m(ted)f(at)h(the)g(Usenix)f(LISA)g(VI)s(I)f(conference)j(in)e +(1993.)275 1403 y Ft(Hlfsd)i Fx(op)s(erates)23 b(b)m(y)g(moun)m(ting)g +(itself)g(as)g(an)g(NFS)g(serv)m(er)g(for)f(the)h(directory)h(con)m +(taining)g Ft(linkname)p Fx(,)150 1513 y(whic)m(h)30 +b(defaults)h(to)g Fp(/hlfs/home)p Fx(.)39 b(Lo)s(okups)30 +b(within)g(that)h(directory)g(are)g(handled)f(b)m(y)g +Ft(Hlfsd)p Fx(,)h(whic)m(h)150 1623 y(uses)42 b(the)h(passw)m(ord)e +(map)h(to)h(determine)g(ho)m(w)f(to)h(resolv)m(e)h(the)f(lo)s(okup.)76 +b(The)42 b(directory)h(will)g(b)s(e)150 1732 y(created)35 +b(if)f(it)g(do)s(esn't)f(already)i(exist.)52 b(The)33 +b(sym)m(b)s(olic)h(link)g(will)g(b)s(e)f(to)h(the)g(accessing)i(user's) +d(home)150 1842 y(directory)-8 b(,)36 b(with)e Ft(sub)-5 +b(dir)45 b Fx(app)s(ended)32 b(to)j(it.)53 b(If)33 b(not)i(sp)s +(eci\014ed,)f Ft(sub)-5 b(dir)45 b Fx(defaults)34 b(to)h +Fp(.hlfsdir)p Fx(.)50 b(This)150 1951 y(directory)31 +b(will)g(also)g(b)s(e)f(created)h(if)f(it)h(do)s(es)f(not)h(already)g +(exist.)275 2081 y(A)h(`)p Fp(SIGTERM)p Fx(')g(sen)m(t)h(to)g +Ft(Hlfsd)43 b Fx(will)33 b(cause)g(it)g(to)h(sh)m(utdo)m(wn.)47 +b(A)33 b(`)p Fp(SIGHUP)p Fx(')e(will)i(\015ush)e(the)i(in)m(ternal)150 +2190 y(cac)m(hes,)k(and)d(reload)h(the)g(passw)m(ord)f(map.)53 +b(It)34 b(will)h(also)g(close)h(and)e(reop)s(en)g(the)h(log)g(\014le,)h +(to)f(enable)150 2300 y(the)27 b(original)h(log)g(\014le)e(to)i(b)s(e)e +(remo)m(v)m(ed)i(or)e(rotated.)41 b(A)27 b(`)p Fp(SIGUSR1)p +Fx(')e(will)i(cause)g(it)h(to)f(dump)e(its)i(in)m(ternal)150 +2410 y(table)k(of)g(user)e(IDs)i(and)f(home)g(directories)i(to)f(the)f +(\014le)h Fp(/tmp/hlfsddump)p Fx(.)150 2632 y Fw(9.1)68 +b(In)l(tro)t(duction)45 b(to)g(Hlfsd)150 2791 y Fx(Electronic)27 +b(mail)f(has)f(b)s(ecome)h(one)g(of)f(the)h(ma)5 b(jor)25 +b(applications)i(for)e(man)m(y)h(computer)f(net)m(w)m(orks,)j(and)150 +2901 y(use)38 b(of)g(this)g(service)h(is)f(exp)s(ected)h(to)f(increase) +h(o)m(v)m(er)h(time,)h(as)d(net)m(w)m(orks)h(proliferate)g(and)f(b)s +(ecome)150 3010 y(faster.)j(Pro)m(viding)29 b(a)h(con)m(v)m(enien)m(t)h +(en)m(vironmen)m(t)f(for)f(users)g(to)h(read,)g(comp)s(ose,)g(and)e +(send)h(electronic)150 3120 y(mail)i(has)f(b)s(ecome)h(a)g(requiremen)m +(t)f(for)g(systems)h(administrators)f(\(SAs\).)275 3249 +y(Widely)i(used)f(metho)s(ds)h(for)f(handling)h(mail)g(usually)g +(require)g(users)f(to)h(b)s(e)g(logged)h(in)m(to)g(a)f(desig-)150 +3359 y(nated)24 b(\\home")i(mac)m(hine,)g(where)e(their)g(mailb)s(o)m +(x)h(\014les)f(reside.)38 b(Only)24 b(on)g(that)h(one)f(mac)m(hine)h +(can)g(they)150 3468 y(read)k(newly)h(arriv)m(ed)g(mail.)41 +b(Since)29 b(users)g(ha)m(v)m(e)i(to)f(b)s(e)f(logged)i(in)m(to)g(that) +f(system)g(to)g(read)f(their)h(mail,)150 3578 y(they)23 +b(often)g(\014nd)e(it)i(con)m(v)m(enien)m(t)h(to)g(run)d(all)i(of)g +(their)g(other)f(pro)s(cesses)h(on)f(that)h(system)g(as)g(w)m(ell,)i +(includ-)150 3687 y(ing)35 b(memory)g(and)g(CPU-in)m(tensiv)m(e)h +(jobs.)54 b(F)-8 b(or)36 b(example,)h(in)e(our)f(departmen)m(t,)j(w)m +(e)f(ha)m(v)m(e)g(allo)s(cated)150 3797 y(and)42 b(con\014gured)g(sev)m +(eral)i(m)m(ulti-pro)s(cessor)g(serv)m(ers)f(to)g(handle)f(suc)m(h)h +(demanding)f(CPU/memory)150 3907 y(applications,)g(but)c(these)h(w)m +(ere)g(underutilized,)h(in)e(large)i(part)f(due)e(to)j(the)f(incon)m(v) +m(enience)h(of)f(not)150 4016 y(b)s(eing)g(able)g(to)h(read)f(mail)h +(on)f(those)h(mac)m(hines.)67 b(\(No)40 b(home)f(directories)h(w)m(ere) +g(lo)s(cated)g(on)f(these)150 4126 y(designated)34 b(CPU-serv)m(ers,)h +(since)f(w)m(e)g(did)e(not)i(w)m(an)m(t)g(NFS)g(service)g(for)f(users') +g(home)h(directories)g(to)150 4235 y(ha)m(v)m(e)k(to)f(comp)s(ete)g +(with)f(CPU-in)m(tensiv)m(e)i(jobs.)58 b(A)m(t)38 b(the)e(same)h(time,) +i(w)m(e)e(discouraged)g(users)e(from)150 4345 y(running)29 +b(demanding)g(applications)j(on)e(their)h(home)f(mac)m(hines.\))275 +4474 y(Man)m(y)37 b(di\013eren)m(t)h(solutions)g(ha)m(v)m(e)g(b)s(een)f +(prop)s(osed)e(to)j(allo)m(w)h(users)d(to)i(read)f(their)h(mail)g(on)f +(an)m(y)150 4584 y(host.)k(Ho)m(w)m(ev)m(er,)32 b(all)g(of)e(these)h +(solutions)g(fail)g(in)f(one)h(or)f(more)h(of)f(sev)m(eral)i(w)m(a)m +(ys:)225 4713 y Fv(\017)60 b Fx(they)31 b(in)m(tro)s(duce)f(new)g +(single)h(p)s(oin)m(ts)f(of)h(failure)225 4842 y Fv(\017)60 +b Fx(they)31 b(require)f(using)f(di\013eren)m(t)i(mail)g(transfer)f +(agen)m(ts)i(\(MT)-8 b(As\))31 b(or)g(user)f(agen)m(ts)h(\(UAs\))225 +4972 y Fv(\017)60 b Fx(they)29 b(do)g(not)g(solv)m(e)h(the)f(problem)f +(for)h(all)h(cases,)g(i.e.)41 b(the)29 b(solution)g(is)g(only)g +(partially)h(successful)330 5081 y(for)g(a)h(particular)g(en)m +(vironmen)m(t.)275 5230 y(W)-8 b(e)41 b(ha)m(v)m(e)h(designed)e(a)h +(simple)g(\014lesystem,)i(called)f(the)f Fo(Home-Link)g(File)g(System)p +Fx(,)j(to)d(pro)m(vide)150 5340 y(the)33 b(abilit)m(y)i(to)f(deliv)m +(er)g(mail)g(to)g(users')e(home)h(directories,)i(without)f(mo)s +(di\014cation)f(to)h(mail-related)p eop end +%%Page: 94 96 +TeXDict begin 94 95 bop 150 -116 a Fx(94)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y(applications.)42 +b(W)-8 b(e)31 b(ha)m(v)m(e)h(endea)m(v)m(ored)f(to)g(mak)m(e)g(it)g(as) +f(stable)h(as)g(p)s(ossible.)40 b(Of)29 b(great)j(imp)s(ortance)e(to) +150 408 y(us)g(w)m(as)h(to)g(mak)m(e)g(sure)f(the)h(HLFS)f(daemon,)h +Fp(hlfsd)e Fx(,)i(w)m(ould)f(not)h(hang)f(under)f(an)m(y)i +(circumstances,)150 518 y(and)j(w)m(ould)f(tak)m(e)j(the)f(next-b)s +(est)f(action)h(when)e(faced)i(with)f(problems.)51 b(Compared)34 +b(to)h(alternativ)m(e)150 628 y(metho)s(ds,)27 b Ft(Hlfsd)37 +b Fx(is)27 b(a)h(stable,)h(more)e(general)h(solution,)h(and)d(easier)j +(to)e(install/use.)41 b(In)27 b(fact,)i(in)e(some)150 +737 y(w)m(a)m(ys,)k(w)m(e)g(ha)m(v)m(e)h(ev)m(en)f(managed)g(to)g +(impro)m(v)m(e)g(the)g(reliabilit)m(y)h(and)e(securit)m(y)h(of)f(mail)h +(service.)275 896 y(Our)i(serv)m(er)i(implemen)m(ts)h(a)f(small)g +(\014lesystem)g(con)m(taining)i(a)e(sym)m(b)s(olic)g(link)g(to)h(a)f +(sub)s(directory)150 1005 y(of)c(the)f(in)m(v)m(oking)i(user's)e(home)g +(directory)-8 b(,)31 b(and)f(named)g(sym)m(b)s(olic)h(links)f(to)h +(users')f(mailb)s(o)m(x)h(\014les.)275 1164 y(The)f Ft(Hlfsd)41 +b Fx(serv)m(er)31 b(\014nds)e(out)j(the)f Fo(uid)j Fx(of)d(the)g(pro)s +(cess)f(that)i(is)f(accessing)i(its)e(moun)m(t)g(p)s(oin)m(t,)h(and)150 +1273 y(resolv)m(es)38 b(the)f(pathname)f(comp)s(onen)m(t)h(`)p +Fp(home)p Fx(')g(as)f(a)i(sym)m(b)s(olic)f(link)f(to)i(a)f(sub)s +(directory)f(within)g(the)150 1383 y(home)31 b(directory)g(giv)m(en)h +(b)m(y)f(the)g Fo(uid)t Fx('s)e(en)m(try)i(in)g(the)g(passw)m(ord)f +(\014le.)42 b(If)30 b(the)h Fo(gid)k Fx(of)c(the)g(pro)s(cess)f(that) +150 1493 y(attempts)f(to)h(access)f(a)g(mailb)s(o)m(x)g(\014le)g(is)f +(a)h(sp)s(ecial)g(one)g(\(called)h(HLFS)p 2625 1493 28 +4 v 39 w(GID\),)g(then)e(the)h(serv)m(er)f(maps)150 1602 +y(the)e(name)g(of)h(the)f Ft(next)35 b Fx(pathname)26 +b(comp)s(onen)m(t)g(directly)h(to)g(the)f(user's)f(mailb)s(o)m(x.)40 +b(This)25 b(is)i(necessary)150 1712 y(so)k(that)g(access)h(to)f(a)g +(mailb)s(o)m(x)g(\014le)g(b)m(y)f(users)g(other)h(than)f(the)h(o)m +(wner)g(can)g(succeed.)41 b(The)30 b(serv)m(er)h(has)150 +1821 y(safet)m(y)26 b(features)f(in)g(case)h(of)f(failures)g(suc)m(h)f +(as)i(h)m(ung)e(\014lesystems)h(or)g(home)g(directory)g(\014lesystems)g +(that)150 1931 y(are)31 b(inaccessible)h(or)e(full.)275 +2090 y(On)e(most)h(of)g(our)g(mac)m(hines,)h(mail)f(gets)h(deliv)m +(ered)g(to)g(the)f(directory)g Fp(/var/spool/mail)p Fx(.)36 +b(Man)m(y)150 2199 y(programs,)23 b(including)e(UAs,)j(dep)s(end)c(on)h +(that)h(path.)38 b Ft(Hlfsd)31 b Fx(creates)23 b(a)f(directory)g +Fp(/mail)p Fx(,)g(and)f(moun)m(ts)150 2309 y(itself)35 +b(on)e(top)h(of)g(that)h(directory)-8 b(.)52 b Ft(Hlfsd)43 +b Fx(implemen)m(ts)35 b(the)f(path)f(name)h(comp)s(onen)m(t)g(called)h +(`)p Fp(home)p Fx(',)150 2418 y(p)s(oin)m(ting)e(to)g(a)g(sub)s +(directory)f(of)h(the)g(user's)f(home)h(directory)-8 +b(.)48 b(W)-8 b(e)34 b(ha)m(v)m(e)g(made)f Fp(/var/spool/mail)150 +2528 y Fx(a)f(sym)m(b)s(olic)g(link)g(to)h Fp(/mail/home)p +Fx(,)c(so)j(that)h(accessing)g Fp(/var/spool/mail)28 +b Fx(actually)33 b(causes)g(access)150 2637 y(to)e(a)g(sub)s(directory) +e(within)h(a)h(user's)f(home)g(directory)-8 b(.)275 2796 +y(The)30 b(follo)m(wing)j(table)f(sho)m(ws)f(an)g(example)h(of)g(ho)m +(w)f(resolving)h(the)g(pathname)f Fp(/var/mail/)p Fk(NAME)150 +2906 y Fx(to)g Fp(/users/ezk/.mailspool/)p Fk(NAM)o(E)24 +b Fx(pro)s(ceeds.)150 3174 y Fn(Resolving)32 b(Comp)s(onen)m(t)123 +b(P)m(athname)31 b(left)g(to)g(resolv)m(e)123 b(V)-8 +b(alue)30 b(if)h(sym)m(b)s(olic)f(link)150 3391 y Fp(/)955 +b(var/mail/)p Ft(NAME)150 3609 y Fp(var/)811 b(mail/)p +Ft(NAME)150 3827 y Fp(mail)p Fx(@)740 b Fp(/mail/home/)p +Ft(NAME)294 b Fp(mail)p Fx(@)28 b(-)p Fp(>)j(/mail/home)150 +4044 y(/)955 b(mail/home/)p Ft(NAME)150 4262 y Fp(mail/)763 +b(home/)p Ft(NAME)150 4480 y Fp(home)p Fx(@)740 b Ft(NAME)822 +b Fp(home)p Fx(@)550 b(-)p Fp(>)2255 4589 y(/users/ezk/.mailspool)150 +4807 y(/)955 b(users/ezk/.mailspool/)p Ft(NA)o(ME)150 +5025 y Fp(users/)715 b(ezk/.mailspool/)p Ft(NAME)150 +5242 y Fp(ezk/)811 b(.mailspool/)p Ft(NAME)p eop end +%%Page: 95 97 +TeXDict begin 95 96 bop 150 -116 a Fx(Chapter)30 b(9:)41 +b(Hlfsd)2836 b(95)150 299 y Fp(.mailspool/)475 b Ft(NAME)150 +517 y(NAME)150 846 y Fw(9.2)68 b(Bac)l(kground)45 b(to)g(Mail)g(Deliv)l +(ery)150 1005 y Fx(This)34 b(section)i(pro)m(vides)f(an)f(in-depth)g +(discussion)g(of)h(wh)m(y)g(a)m(v)-5 b(ailable)37 b(metho)s(ds)d(for)g +(deliv)m(ering)i(mail)150 1115 y(to)31 b(home)g(directories)g(are)g +(not)f(as)h(go)s(o)s(d)f(as)h(the)f(one)h(used)f(b)m(y)g +Ft(Hlfsd)p Fx(.)150 1317 y Fm(9.2.1)63 b(Single-Host)42 +b(Mail)f(Sp)s(o)s(ol)i(Directory)150 1464 y Fx(The)25 +b(most)g(common)g(metho)s(d)g(for)f(mail)i(deliv)m(ery)g(is)f(for)g +(mail)g(to)h(b)s(e)f(app)s(ended)e(to)j(a)f(mailb)s(o)m(x)h(\014le)f +(in)g(a)150 1574 y(standard)j(sp)s(o)s(ol)h(directory)g(on)g(the)g +(designated)h(\\mail)g(home")f(mac)m(hine)h(of)f(the)g(user.)40 +b(The)28 b(greatest)150 1683 y(adv)-5 b(an)m(tage)34 +b(of)e(this)f(metho)s(d)g(is)h(that)h(it)f(is)g(the)g(default)g(metho)s +(d)f(most)h(v)m(endors)g(pro)m(vide)f(with)h(their)150 +1793 y(systems,)27 b(th)m(us)e(v)m(ery)g(little)i(\(if)f(an)m(y\))g +(con\014guration)g(is)f(required)g(on)g(the)h(SA's)f(part.)39 +b(All)26 b(they)f(need)g(to)150 1903 y(set)g(up)f(are)i(mail)f(aliases) +i(directing)e(mail)h(to)g(the)f(host)g(on)g(whic)m(h)f(the)i(user's)e +(mailb)s(o)m(x)h(\014le)g(is)g(assigned.)150 2012 y(\(Otherwise,)31 +b(mail)g(is)f(deliv)m(ered)h(lo)s(cally)-8 b(,)33 b(and)d(users)f +(\014nd)g(mailb)s(o)m(xes)i(on)f(man)m(y)h(mac)m(hines.\))275 +2150 y(As)g(users)f(b)s(ecome)h(more)h(sophisticated,)g(and)f(aided)g +(b)m(y)g(windo)m(wing)f(systems,)i(they)f(\014nd)f(them-)150 +2259 y(selv)m(es)e(logging)g(in)f(on)f(m)m(ultiple)i(hosts)f(at)g +(once,)h(p)s(erforming)e(sev)m(eral)i(tasks)f(concurren)m(tly)-8 +b(.)41 b(They)26 b(ask)150 2369 y(to)36 b(b)s(e)f(able)h(to)h(read)e +(their)h(mail)g(on)f(an)m(y)h(host)g(on)f(the)h(net)m(w)m(ork,)i(not)e +(just)f(the)h(one)f(designated)i(as)150 2478 y(their)30 +b(\\mail)i(home".)150 2681 y Fm(9.2.2)63 b(Cen)m(tralized)39 +b(Mail)j(Sp)s(o)s(ol)g(Directory)150 2828 y Fx(A)28 b(p)s(opular)e +(metho)s(d)h(for)g(pro)m(viding)g(mail)h(readabilit)m(y)h(from)e(an)m +(y)h(host)f(is)h(to)g(ha)m(v)m(e)h(all)f(mail)g(deliv)m(ered)150 +2937 y(to)i(a)f(mail)h(sp)s(o)s(ol)f(directory)g(on)g(a)h(designated)f +(\\mail-serv)m(er")j(whic)m(h)c(is)i(exp)s(orted)e(via)i(NFS)f(to)h +(all)g(of)150 3047 y(the)j(hosts)g(on)g(the)g(net)m(w)m(ork.)49 +b(Con\014guring)32 b(suc)m(h)g(a)i(system)f(is)g(relativ)m(ely)i(easy) +-8 b(.)49 b(On)32 b(most)i(systems,)150 3157 y(the)f(bulk)f(of)h(the)f +(w)m(ork)h(is)g(a)g(one-time)h(addition)f(to)g(one)g(or)g(t)m(w)m(o)h +(con\014guration)f(\014les)g(in)f Fp(/etc)p Fx(.)46 b(The)150 +3266 y(\014le-serv)m(er's)24 b(sp)s(o)s(ol)f(directory)g(is)g(then)g +(hard-moun)m(ted)g(across)g(ev)m(ery)h(mac)m(hine)g(on)f(the)g(lo)s +(cal)i(net)m(w)m(ork.)150 3376 y(In)32 b(small)h(en)m(vironmen)m(ts)g +(with)g(only)f(a)h(handful)e(of)i(hosts)g(this)f(can)h(b)s(e)f(an)h +(acceptable)i(solution.)48 b(In)150 3485 y(our)40 b(departmen)m(t,)k +(with)c(a)h(couple)g(of)g(h)m(undred)e(activ)m(e)k(hosts)d(and)g +(thousands)g(of)h(mail)g(messages)150 3595 y(pro)s(cessed)27 +b(daily)-8 b(,)30 b(this)e(w)m(as)g(deemed)g(completely)i +(unacceptable,)f(as)g(it)f(in)m(tro)s(duced)f(sev)m(eral)j(t)m(yp)s(es) +e(of)150 3705 y(problems:)150 3869 y Fn(Scalabilit)m(y)k(and)e(P)m +(erformance)630 3978 y Fx(As)e(more)g(and)g(more)g(mac)m(hines)h(get)g +(added)e(to)i(the)f(net)m(w)m(ork,)i(more)e(mail)h(tra\016c)f(has)g(to) +630 4088 y(go)j(o)m(v)m(er)g(NFS)f(to)h(and)f(from)f(the)h(mail-serv)m +(er.)42 b(Users)30 b(lik)m(e)i(to)e(run)f(mail-w)m(atc)m(hers,)k(and) +630 4197 y(read)38 b(their)f(mail)h(often.)63 b(The)37 +b(stress)h(on)f(the)h(shared)f(infrastructure)g(increases)h(with)630 +4307 y(ev)m(ery)f(user)f(and)g(host)g(added;)j(loads)e(on)f(the)h(mail) +g(serv)m(er)f(w)m(ould)g(most)h(certainly)h(b)s(e)630 +4417 y(high)25 b(since)g(all)h(mail)g(deliv)m(ery)g(go)s(es)g(through)f +(that)g(one)h(mac)m(hine.)2935 4384 y Fs(1)3012 4417 +y Fx(This)e(leads)i(to)g(lo)m(w)m(er)630 4526 y(reliabilit)m(y)37 +b(and)e(p)s(erformance.)54 b(T)-8 b(o)35 b(reduce)g(the)h(n)m(um)m(b)s +(er)d(of)j(concurren)m(t)f(connections)630 4636 y(b)s(et)m(w)m(een)f +(clien)m(ts)h(and)d(the)i(serv)m(er)f(host,)i(some)e(SAs)g(ha)m(v)m(e)i +(resorted)e(to)h(automoun)m(ting)630 4745 y(the)26 b(mail-sp)s(o)s(ol)g +(directory)-8 b(.)40 b(But)26 b(this)g(solution)g(only)g(mak)m(es)g +(things)g(w)m(orse:)39 b(since)26 b(users)630 4855 y(often)i(run)f +(mail)i(w)m(atc)m(hers,)h(and)d(man)m(y)h(p)s(opular)f(applications)i +(suc)m(h)f(as)g(`)p Fp(trn)p Fx(',)h(`)p Fp(emacs)p Fx(',)630 +4964 y(`)p Fp(csh)p Fx(')24 b(or)h(`)p Fp(ksh)p Fx(')f(c)m(hec)m(k)i(p) +s(erio)s(dically)f(for)g(new)f(mail,)j(the)e(automoun)m(ted)g +(directory)g(w)m(ould)p 150 5066 1200 4 v 199 5134 a +Fs(1)307 5166 y Fr(Deliv)n(ery)32 b(via)g(NFS-moun)n(ted)f +(\014lesystems)i(ma)n(y)f(require)g(usage)h(of)h(`)p +Fq(rpc.lockd)p Fr(')h(and)d(`)p Fq(rpc.statd)p Fr(')j(to)d(pro)n(vide) +275 5253 y(distributed)23 b(\014le-lo)r(c)n(king,)h(b)r(oth)g(of)g +(whic)n(h)f(are)i(widely)e(regarded)h(as)h(unstable)e(and)g +(unreliable.)35 b(F)-6 b(urthermore,)24 b(this)275 5340 +y(will)j(degrade)f(p)r(erformance,)h(as)f(lo)r(cal)h(pro)r(cesses)h(as) +e(w)n(ell)h(as)f(remote)g(`)p Fq(nfsd)p Fr(')h(pro)r(cesses)g(are)g(k)n +(ept)d(busy)-6 b(.)p eop end +%%Page: 96 98 +TeXDict begin 96 97 bop 150 -116 a Fx(96)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))630 299 y(b)s(e)40 +b(e\013ectiv)m(ely)k(p)s(ermanen)m(tly)d(moun)m(ted.)72 +b(If)41 b(it)g(gets)h(unmoun)m(ted)e(automatically)k(b)m(y)630 +408 y(the)31 b(automoun)m(ter)h(program,)f(it)g(is)g(most)g(lik)m(ely)h +(to)g(get)g(moun)m(ted)f(shortly)g(afterw)m(ards,)630 +518 y(consuming)42 b(more)g(I/O)g(resources)g(b)m(y)f(the)h(constan)m +(t)i(cycle)f(of)f(moun)m(t)g(and)f(umoun)m(t)630 628 +y(calls.)150 791 y Fn(Reliabilit)m(y)630 927 y Fx(The)24 +b(mail-serv)m(er)h(host)g(and)e(its)i(net)m(w)m(ork)g(connectivit)m(y)h +(m)m(ust)f(b)s(e)e(v)m(ery)i(reliable.)40 b(W)-8 b(orse,)630 +1037 y(since)24 b(the)g(sp)s(o)s(ol)f(directory)i(has)e(to)i(b)s(e)e +(hard-moun)m(ted,)2569 1004 y Fs(2)2631 1037 y Fx(man)m(y)h(pro)s +(cesses)f(whic)m(h)h(access)630 1146 y(the)g(sp)s(o)s(ol)e(directory)i +(\(v)-5 b(arious)24 b(shells,)h(`)p Fp(login)p Fx(',)f(`)p +Fp(emacs)p Fx(',)g(etc.\))40 b(w)m(ould)23 b(b)s(e)g(h)m(ung)g(as)g +(long)630 1256 y(as)35 b(connectivit)m(y)i(to)f(the)e(mail-serv)m(er)j +(is)d(sev)m(ered.)55 b(T)-8 b(o)35 b(impro)m(v)m(e)h(reliabilit)m(y)-8 +b(,)38 b(SAs)c(ma)m(y)630 1366 y(c)m(ho)s(ose)40 b(to)g(bac)m(kup)f +(the)g(mail-serv)m(er's)h(sp)s(o)s(ol)f(partition)h(sev)m(eral)g(times) +g(a)f(da)m(y)-8 b(.)68 b(This)630 1475 y(ma)m(y)37 b(mak)m(e)h(things)e +(w)m(orse)h(since)g(reading)f(or)h(deliv)m(ering)g(mail)h(while)e(bac)m +(kups)g(are)h(in)630 1585 y(progress)g(ma)m(y)h(cause)g(bac)m(kups)f +(to)i(b)s(e)d(inconsisten)m(t;)43 b(more)37 b(bac)m(kups)g(consume)h +(more)630 1694 y(bac)m(kup-media)31 b(resources,)f(and)g(increase)h +(the)g(load)g(on)f(the)h(mail-serv)m(er)g(host.)150 1897 +y Fm(9.2.3)63 b(Distributed)41 b(Mail)g(Sp)s(o)s(ol)i(Service)150 +2044 y Fx(Despite)f(the)e(existence)i(of)f(a)g(few)f(systems)g(that)h +(supp)s(ort)e(deliv)m(ery)i(to)g(users')f(home)h(directories,)150 +2154 y(mail)f(deliv)m(ery)h(to)f(home)g(directories)h(hasn't)f(caugh)m +(t)g(on.)69 b(W)-8 b(e)41 b(b)s(eliev)m(e)g(the)f(main)g(reason)g(is)f +(that)150 2264 y(there)32 b(are)g(to)s(o)h(man)m(y)e(programs)h(that)g +(\\kno)m(w")h(where)e(mailb)s(o)m(x)i(\014les)e(reside.)45 +b(Besides)33 b(the)f(ob)m(vious)150 2373 y(\(the)g(deliv)m(ery)f +(program)g Fp(/bin/mail)d Fx(and)j(mail)g(readers)g(lik)m(e)h +Fp(/usr/ucb/Mail)p Fx(,)c(`)p Fp(mush)p Fx(',)j(`)p Fp(mm)p +Fx(',)g(etc.\),)150 2483 y(other)40 b(programs)f(that)h(kno)m(w)f +(mailb)s(o)m(x)h(lo)s(cation)h(are)f(login,)j(from,)f(almost)e(ev)m +(ery)g(shell,)j(`)p Fp(xbiff)p Fx(',)150 2592 y(`)p Fp(xmailbox)p +Fx(',)25 b(and)g(ev)m(en)h(some)g(programs)f(not)h(directly)g(related)h +(to)f(mail,)h(suc)m(h)f(as)g(`)p Fp(emacs)p Fx(')e(and)h(`)p +Fp(trn)p Fx('.)150 2702 y(Although)39 b(some)h(of)f(these)h(programs)f +(can)g(b)s(e)g(con\014gured)f(to)i(lo)s(ok)g(in)e(di\013eren)m(t)i +(directories)g(with)150 2812 y(the)c(use)g(of)h(en)m(vironmen)m(t)f(v) +-5 b(ariables)37 b(and)f(other)g(resources,)i(man)m(y)f(of)f(them)g +(cannot.)59 b(The)36 b(o)m(v)m(erall)150 2921 y(p)s(orting)30 +b(w)m(ork)g(is)h(signi\014can)m(t.)275 3059 y(Other)25 +b(metho)s(ds)g(that)h(ha)m(v)m(e)h(y)m(et)g(to)g(catc)m(h)g(on)f +(require)f(the)h(use)g(of)g(a)g(sp)s(ecial)g(mail-reading)h(serv)m(er,) +150 3169 y(suc)m(h)37 b(as)h(IMAP)g(or)g(POP)-8 b(.)37 +b(The)h(main)f(disadv)-5 b(an)m(tage)39 b(of)f(these)g(systems)g(is)g +(that)g(UAs)g(need)f(to)i(b)s(e)150 3279 y(mo)s(di\014ed)23 +b(to)j(use)e(these)h(services)g(|)f(a)h(long)g(and)f(in)m(v)m(olv)m(ed) +i(task.)40 b(That)24 b(is)h(wh)m(y)f(they)h(are)f(not)h(p)s(opular)150 +3388 y(at)31 b(this)f(time.)275 3527 y(Sev)m(eral)36 +b(other)h(ideas)f(ha)m(v)m(e)h(b)s(een)e(prop)s(osed)g(and)g(ev)m(en)i +(used)e(in)h(v)-5 b(arious)36 b(en)m(vironmen)m(ts.)57 +b(None)150 3636 y(of)35 b(them)h(is)f(robust.)54 b(They)35 +b(are)g(mostly)h(v)m(ery)g(sp)s(ecialized,)i(in\015exible,)e(and)f(do)g +(not)h(extend)f(to)h(the)150 3746 y(general)31 b(case.)42 +b(Some)31 b(of)f(the)h(ideas)f(are)h(plain)g(bad,)f(p)s(oten)m(tially)i +(leading)f(to)g(lost)g(or)f(corrupt)g(mail:)150 3911 +y Fn(automoun)m(ters)630 4020 y Fx(Using)e(an)g(automoun)m(ter)h(suc)m +(h)f(as)g Ft(A)n(md)38 b Fx(to)29 b(pro)m(vide)f(a)h(set)f(of)h(sym)m +(b)s(olic)f(links)g(from)g(the)630 4130 y(normal)j(sp)s(o)s(ol)g +(directory)h(to)h(user)d(home)i(directories)g(is)g(not)g(su\016cien)m +(t.)44 b(UAs)32 b(rename,)630 4240 y(unlink,)k(and)g(recreate)h(the)f +(mailb)s(o)m(x)h(as)f(a)g(regular)g(\014le,)h(therefore)g(it)f(m)m(ust) +g(b)s(e)f(a)h(real)630 4349 y(\014le,)c(not)g(a)g(sym)m(b)s(olic)g +(link.)43 b(F)-8 b(urthermore,)32 b(it)g(m)m(ust)g(reside)f(in)g(a)h +(real)g(directory)g(whic)m(h)630 4459 y(is)i(writable)g(b)m(y)g(the)h +(UAs)f(and)f(MT)-8 b(As.)52 b(This)33 b(metho)s(d)h(ma)m(y)h(also)g +(require)e(p)s(opulating)630 4568 y Fp(/var/spool/mail)19 +b Fx(with)j(sym)m(b)s(olic)h(links)g(and)f(making)i(sure)e(they)h(are)g +(up)s(dated.)37 b(Mak-)630 4678 y(ing)26 b Ft(A)n(md)35 +b Fx(manage)26 b(that)h(directory)f(directly)g(fails,)i(since)e(man)m +(y)f(v)-5 b(arious)26 b(lo)s(c)m(k)h(\014les)e(need)630 +4788 y(to)32 b(b)s(e)f(managed)h(as)f(w)m(ell.)45 b(Also,)33 +b Ft(A)n(md)41 b Fx(do)s(es)31 b(not)g(pro)m(vide)h(all)g(of)g(the)f +(NFS)h(op)s(erations)630 4897 y(whic)m(h)e(are)h(required)e(to)j(write) +e(mail)h(suc)m(h)f(as)h(write,)g(create,)h(remo)m(v)m(e,)g(and)e +(unlink.)150 5060 y Fp($MAIL)p 150 5154 1200 4 v 199 +5221 a Fs(2)275 5253 y Fr(No)c(SA)f(in)h(their)g(righ)n(t)h(minds)f(w)n +(ould)g(soft-moun)n(t)h(read/write)g(partitions)g(|)f(the)g(c)n(hances) +g(for)i(data)e(loss)h(are)g(to)r(o)275 5340 y(great.)p +eop end +%%Page: 97 99 +TeXDict begin 97 98 bop 150 -116 a Fx(Chapter)30 b(9:)41 +b(Hlfsd)2836 b(97)630 299 y(Setting)37 b(this)e(v)-5 +b(ariable)37 b(to)f(an)g(automoun)m(ted)g(directory)h(p)s(oin)m(ting)f +(to)g(the)g(user's)f(mail)630 408 y(sp)s(o)s(ol)41 b(host)h(only)g +(solv)m(es)h(the)g(problem)e(for)h(those)g(programs)f(whic)m(h)h(kno)m +(w)g(and)f(use)630 518 y Fp($MAIL)p Fx(.)51 b(Man)m(y)35 +b(programs)f(don't,)i(therefore)e(this)h(solution)g(is)f(partial)h(and) +f(of)g(limited)630 628 y(\015exibilit)m(y)-8 b(.)40 b(Also,)26 +b(it)e(requires)f(the)h(SAs)f(or)h(the)g(users)f(to)h(set)g(it)h +(themselv)m(es)g(|)e(an)h(added)630 737 y(lev)m(el)32 +b(of)f(incon)m(v)m(enience)h(and)e(p)s(ossible)g(failures.)150 +906 y Fp(/bin/mail)630 1016 y Fx(Using)i(a)g(di\013eren)m(t)g(mail)g +(deliv)m(ery)g(agen)m(t)i(could)d(b)s(e)g(the)h(solution.)45 +b(One)31 b(suc)m(h)g(example)630 1125 y(is)42 b(`)p Fp(hdmail)p +Fx('.)73 b(Ho)m(w)m(ev)m(er,)46 b(`)p Fp(hdmail)p Fx(')41 +b(still)h(requires)f(mo)s(difying)g(all)i(UAs,)i(the)c(MT)-8 +b(A's)630 1235 y(con\014guration,)32 b(installing)g(new)f(daemons,)g +(and)f(c)m(hanging)i(login)g(scripts.)43 b(This)30 b(mak)m(es)630 +1345 y(the)e(system)f(less)h(upgradable)g(or)f(compatible)i(with)e +(others,)i(and)e(adds)f(one)i(more)g(com-)630 1454 y(plicated)35 +b(system)f(for)f(SAs)g(to)i(deal)f(with.)51 b(It)33 b(is)h(not)g(a)g +(complete)h(solution)g(b)s(ecause)e(it)630 1564 y(still)27 +b(requires)e(eac)m(h)i(user)e(ha)m(v)m(e)i(their)f Fp($MAIL)e +Fx(v)-5 b(ariable)27 b(setup)e(correctly)-8 b(,)29 b(and)c(that)h(ev)m +(ery)630 1673 y(program)k(use)g(this)g(v)-5 b(ariable.)150 +1882 y Fm(9.2.4)63 b(Wh)m(y)40 b(Deliv)m(er)g(In)m(to)h(the)g(Home)g +(Directory?)150 2029 y Fx(There)26 b(are)h(sev)m(eral)h(ma)5 +b(jor)26 b(reasons)h(wh)m(y)f(SAs)f(migh)m(t)j(w)m(an)m(t)f(to)g(deliv) +m(er)g(mail)g(directly)g(in)m(to)h(the)f(users')150 2139 +y(home)j(directories:)150 2312 y Fn(Lo)s(cation)630 2452 +y Fx(Man)m(y)21 b(mail)g(readers)f(need)g(to)h(mo)m(v)m(e)h(mail)f +(from)f(the)g(sp)s(o)s(ol)g(directory)h(to)g(the)f(user's)g(home)630 +2561 y(directory)-8 b(.)45 b(It)31 b(sp)s(eeds)f(up)h(this)g(op)s +(eration)h(if)f(the)h(t)m(w)m(o)g(are)g(on)f(the)h(same)f +(\014lesystem.)44 b(If)630 2671 y(for)30 b(some)g(reason)g(the)h +(user's)e(home)h(directory)h(is)f(inaccessible,)i(it)e(isn't)g(that)h +(useful)e(to)630 2781 y(b)s(e)d(able)h(to)g(read)g(mail,)h(since)f +(there)g(is)g(no)f(place)i(to)f(mo)m(v)m(e)h(it)f(to.)40 +b(In)26 b(some)h(cases,)i(trying)630 2890 y(to)i(mo)m(v)m(e)h(mail)f +(to)g(a)g(non-existen)m(t)h(or)e(h)m(ung)g(\014lesystem)g(ma)m(y)h +(result)g(in)f(mail)h(loss.)150 3059 y Fn(Distribution)630 +3169 y Fx(Ha)m(ving)25 b(all)g(mail)g(sp)s(o)s(ol)e(directories)i +(spread)e(among)i(the)f(man)m(y)g(more)g(\014lesystems)g(mini-)630 +3278 y(mizes)h(the)g(c)m(hances)h(that)f(complete)h(en)m(vironmen)m(ts) +f(will)g(grind)f(to)h(a)g(halt)h(when)d(a)i(single)630 +3388 y(serv)m(er)34 b(is)f(do)m(wn.)49 b(It)34 b(do)s(es)f(increase)h +(the)f(c)m(hance)i(that)f(there)f(will)h(b)s(e)f(someone)h(who)f(is)630 +3497 y(not)23 b(able)g(to)g(read)g(their)f(mail)i(when)d(a)i(mac)m +(hine)h(is)e(do)m(wn,)i(but)e(that)h(is)g(usually)f(preferred)630 +3607 y(to)30 b(ha)m(ving)f(no)g(one)g(b)s(e)f(able)i(to)g(read)e(their) +h(mail)h(b)s(ecause)f(a)g(cen)m(tralized)i(mail)f(serv)m(er)f(is)630 +3717 y(do)m(wn.)38 b(The)25 b(problem)f(of)g(losing)i(some)f(mail)g +(due)f(to)i(the)f(\(presumably\))f(higher)g(c)m(hances)630 +3826 y(that)31 b(a)g(user's)f(mac)m(hine)h(is)f(do)m(wn)g(is)g +(minimized)h(in)f(HLFS.)150 3995 y Fn(Securit)m(y)630 +4134 y Fx(Deliv)m(ering)35 b(mail)e(to)g(users')f(home)h(directories)g +(has)g(another)f(adv)-5 b(an)m(tage)35 b(|)d(enhanced)630 +4244 y(securit)m(y)43 b(and)e(priv)-5 b(acy)d(.)76 b(Since)42 +b(a)g(shared)f(system)h(mail)h(sp)s(o)s(ol)e(directory)h(has)g(to)h(b)s +(e)630 4354 y(w)m(orld-readable)28 b(and)f(searc)m(hable,)i(an)m(y)f +(user)e(can)i(see)g(whether)f(other)g(users)g(ha)m(v)m(e)h(mail,)630 +4463 y(when)g(they)h(last)g(receiv)m(ed)h(new)e(mail,)i(or)f(when)e +(they)i(last)h(read)e(their)h(mail.)41 b(Programs)630 +4573 y(suc)m(h)26 b(as)h(`)p Fp(finger)p Fx(')f(displa)m(y)h(this)f +(information,)i(whic)m(h)f(some)g(consider)f(an)h(infringemen)m(t)630 +4682 y(of)e(priv)-5 b(acy)d(.)40 b(While)26 b(it)g(is)f(p)s(ossible)f +(to)i(disable)g(this)f(feature)g(of)h(`)p Fp(finger)p +Fx(')e(so)h(that)h(remote)630 4792 y(users)36 b(cannot)h(see)g(a)g +(mailb)s(o)m(x)g(\014le's)g(status,)i(this)d(do)s(esn't)h(prev)m(en)m +(t)g(lo)s(cal)h(users)d(from)630 4902 y(getting)25 b(the)f +(information.)39 b(F)-8 b(urthermore,)25 b(there)f(are)g(more)g +(programs)f(whic)m(h)h(mak)m(e)g(use)630 5011 y(of)j(this)h +(information.)40 b(In)26 b(shared)h(en)m(vironmen)m(ts,)h(disabling)g +(suc)m(h)f(programs)g(has)g(to)h(b)s(e)630 5121 y(done)d(on)g(a)g +(system-wide)g(basis,)h(but)f(with)f(mail)i(deliv)m(ered)g(to)f(users') +g(home)g(directories,)630 5230 y(users)35 b(less)h(concerned)g(with)f +(priv)-5 b(acy)36 b(who)f(do)g(w)m(an)m(t)i(to)f(let)h(others)e(kno)m +(w)h(when)f(they)630 5340 y(last)c(receiv)m(ed)h(or)e(read)h(mail)g +(can)f(easily)i(do)e(so)h(using)f(\014le)g(protection)i(bits.)p +eop end +%%Page: 98 100 +TeXDict begin 98 99 bop 150 -116 a Fx(98)1855 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(In)d(summary)-8 +b(,)28 b(deliv)m(ering)h(mail)f(to)h(home)f(directories)h(pro)m(vides)f +(users)f(the)h(functionalit)m(y)h(sough)m(t,)150 408 +y(and)h(also)h(a)m(v)m(oids)h(most)f(of)f(the)h(problems)e(just)h +(discussed.)150 636 y Fw(9.3)68 b(Using)46 b(Hlfsd)150 +857 y Fm(9.3.1)63 b(Con)m(trolling)41 b(Hlfsd)150 1004 +y Fx(Muc)m(h)f(the)f(same)h(w)m(a)m(y)h Ft(A)n(md)49 +b Fx(is)39 b(con)m(trolled)i(b)m(y)f Fp(ctl-amd)p Fx(,)g(so)f(do)s(es)g +Ft(Hlfsd)50 b Fx(get)40 b(con)m(trolled)h(b)m(y)f(the)150 +1114 y Fp(ctl-hlfsd)28 b Fx(script:)150 1268 y Fp(ctl-hlfsd)45 +b(start)630 1377 y Fx(Start)31 b(a)f(new)g Ft(Hlfsd)p +Fx(.)150 1532 y Fp(ctl-hlfsd)45 b(stop)630 1641 y Fx(Stop)30 +b(a)h(running)e Ft(Hlfsd)p Fx(.)150 1795 y Fp(ctl-hlfsd)45 +b(restart)630 1905 y Fx(Stop)c(a)h(running)e Ft(Hlfsd)p +Fx(,)45 b(w)m(ait)d(for)g(10)g(seconds,)j(and)c(then)g(start)h(a)g(new) +f(one.)74 b(It)42 b(is)630 2014 y(hop)s(ed)24 b(that)i(within)e(10)i +(seconds,)h(the)e(previously)g(running)e Ft(Hlfsd)35 +b Fx(terminate)26 b(prop)s(erly;)630 2124 y(otherwise,)31 +b(starting)g(a)g(second)f(one)h(could)f(cause)h(system)g(lo)s(c)m(kup.) +275 2278 y(F)-8 b(or)35 b(example,)j(on)d(our)f(systems,)j(w)m(e)e +(start)h Ft(Hlfsd)45 b Fx(within)34 b Fp(ctl-hlfsd)f +Fx(as)i(follo)m(ws)h(on)f(Solaris)h(2)150 2388 y(systems:)390 +2520 y Fp(hlfsd)46 b(-a)i(/var/alt_mail)c(-x)j(all)g(-l)g +(/var/log/hlfsd)d(/mail/home)h(.mailspool)275 2651 y +Fx(The)33 b(directory)h Fp(/var/alt_mail)c Fx(is)k(a)h(directory)f(in)g +(the)g(ro)s(ot)g(partition)g(where)g(alternate)h(mail)150 +2761 y(will)c(b)s(e)e(deliv)m(ered)j(in)m(to,)f(when)f(it)g(cannot)h(b) +s(e)f(deliv)m(ered)h(in)m(to)h(the)e(user's)g(home)g(directory)-8 +b(.)275 2893 y(Normal)30 b(mail)h(gets)h(deliv)m(ered)f(in)m(to)g +Fp(/var/mail)p Fx(,)d(but)i(on)g(our)g(systems,)g(that)h(is)g(a)f(sym)m +(b)s(olic)h(link)150 3002 y(to)46 b Fp(/mail/home)p Fx(.)82 +b Fp(/mail)44 b Fx(is)h(managed)h(b)m(y)f Ft(Hlfsd)p +Fx(,)k(whic)m(h)c(creates)h(a)g(dynamic)f(symlink)f(named)150 +3112 y(`)p Fp(home)p Fx(',)54 b(p)s(oin)m(ting)49 b(to)h(the)g(sub)s +(directory)e Fp(.mailspool)e Ft(within)58 b Fx(the)49 +b(accessing)i(user's)e(home)g(di-)150 3222 y(rectory)-8 +b(.)83 b(This)43 b(results)h(in)g(mail)h(whic)m(h)f(normally)g(should)f +(go)i(to)g Fp(/var/mail/$USER)p Fx(,)e(to)i(go)g(to)150 +3331 y Fp($HOME/.mailspool/$USER)p Fx(.)275 3463 y Ft(Hlfsd)36 +b Fx(do)s(es)27 b(not)g(create)i(the)e Fp(/var/mail)d +Fx(symlink.)39 b(This)26 b(needs)h(to)h(b)s(e)e(created)i(\(man)m +(ually\))g(once)150 3573 y(on)i(eac)m(h)i(host,)f(b)m(y)f(the)g(system) +h(administrators,)g(as)f(follo)m(ws:)390 3705 y Fp(mv)47 +b(/var/mail)e(/var/alt_mail)390 3814 y(ln)i(-s)g(/mail/home)e +(/var/mail)275 3946 y Ft(Hlfsd)40 b Fx(also)31 b(resp)s(onds)d(to)k +(the)e(follo)m(wing)i(signals:)275 4078 y(A)e(`)p Fp(SIGHUP)p +Fx(')f(signal)i(sen)m(t)g(to)g Ft(Hlfsd)40 b Fx(will)31 +b(force)g(it)g(to)g(reload)g(the)g(passw)m(ord)e(map)h(immediately)-8 +b(.)275 4210 y(A)40 b(`)p Fp(SIGUSR1)p Fx(')f(signal)i(sen)m(t)f(to)h +Ft(Hlfsd)50 b Fx(will)41 b(cause)g(it)g(to)g(dump)d(its)j(in)m(ternal)g +(passw)m(ord)e(map)h(to)150 4319 y(the)26 b(\014le)g +Fp(/usr/tmp/hlfsd.dump.XXXXX)o(X)p Fx(,)21 b(where)26 +b(`)p Fp(XXXXXX)p Fx(')e(will)j(b)s(e)e(replaced)i(b)m(y)e(a)i(random)e +(string)150 4429 y(generated)31 b(b)m(y)g Fn(mktemp)p +Fx(\(3\))g(or)f(\(the)h(more)g(secure\))g Fn(mkstemp)p +Fx(\(3\).)150 4623 y Fm(9.3.2)63 b(Hlfsd)42 b(Options)150 +4792 y Fp(-a)47 b Fk(alt_dir)630 4902 y Fx(Alternate)e(directory)-8 +b(.)80 b(The)43 b(name)h(of)f(the)h(directory)g(to)g(whic)m(h)f(the)g +(sym)m(b)s(olic)h(link)630 5011 y(returned)27 b(b)m(y)i +Ft(Hlfsd)38 b Fx(will)29 b(p)s(oin)m(t,)g(if)f(it)h(cannot)g(access)h +(the)f(home)f(directory)h(of)g(the)f(user.)630 5121 y(This)d(defaults)h +(to)h Fp(/var/hlfs)p Fx(.)36 b(This)25 b(directory)i(will)f(b)s(e)f +(created)i(if)f(it)g(do)s(esn't)g(exist.)40 b(It)630 +5230 y(is)31 b(exp)s(ected)g(that)g(either)h(users)e(will)h(read)g +(these)g(\014les,)g(or)g(the)g(system)g(administrators)630 +5340 y(will)g(run)e(a)h(script)h(to)g(resend)e(this)i(\\lost)g(mail")h +(to)f(its)g(o)m(wner.)p eop end +%%Page: 99 101 +TeXDict begin 99 100 bop 150 -116 a Fx(Chapter)30 b(9:)41 +b(Hlfsd)2836 b(99)150 299 y Fp(-c)47 b Fk(cache-interval)630 +408 y Fx(Cac)m(hing)26 b(in)m(terv)-5 b(al.)41 b Ft(Hlfsd)35 +b Fx(will)26 b(cac)m(he)h(the)f(v)-5 b(alidit)m(y)27 +b(of)f(home)f(directories)i(for)f(this)f(in)m(ter-)630 +518 y(v)-5 b(al,)32 b(in)e(seconds.)42 b(En)m(tries)32 +b(whic)m(h)e(ha)m(v)m(e)i(b)s(een)e(v)m(eri\014ed)h(within)f(the)i +(last)f Fo(cac)m(he-in)m(terv)-5 b(al)630 628 y Fx(seconds)31 +b(will)h(not)g(b)s(e)f(v)m(eri\014ed)g(again,)i(since)f(the)g(op)s +(eration)g(could)f(b)s(e)g(exp)s(ensiv)m(e,)i(and)630 +737 y(the)e(en)m(tries)h(are)g(most)f(lik)m(ely)i(still)f(v)-5 +b(alid.)43 b(After)31 b(the)h(in)m(terv)-5 b(al)32 b(has)f(expired,)g +Ft(Hlfsd)41 b Fx(will)630 847 y(re-v)m(erify)f(the)g(v)-5 +b(alidit)m(y)41 b(of)f(the)g(user's)f(home)h(directory)-8 +b(,)43 b(and)c(reset)i(the)f(cac)m(he)h(time-)630 956 +y(coun)m(ter.)g(The)30 b(default)h(v)-5 b(alue)31 b(for)f +Fo(cac)m(he-in)m(terv)-5 b(al)37 b Fx(is)30 b(300)i(seconds)e(\(5)h +(min)m(utes\).)150 1106 y Fp(-f)384 b Fx(F)-8 b(orce)44 +b(fast)f(startup.)77 b(This)42 b(option)h(tells)h Ft(Hlfsd)52 +b Fx(to)44 b(skip)e(startup-time)h(consistency)630 1215 +y(c)m(hec)m(ks)32 b(suc)m(h)f(as)h(existence)g(of)f(moun)m(t)g +(directory)-8 b(,)33 b(alternate)f(sp)s(o)s(ol)f(directory)-8 +b(,)32 b(symlink)630 1325 y(to)f(b)s(e)f(hidden)f(under)g(the)h(moun)m +(t)h(directory)-8 b(,)31 b(their)g(p)s(ermissions)e(and)g(v)-5 +b(alidit)m(y)d(.)150 1474 y Fp(-g)47 b Fk(group)97 b +Fx(Set)32 b(the)h(sp)s(ecial)f(group)g(HLFS)p 1745 1474 +28 4 v 40 w(GID)h(to)g Fo(group)p Fx(.)45 b(Programs)32 +b(suc)m(h)g(as)h Fp(/usr/ucb/from)630 1584 y Fx(or)g +Fp(/usr/sbin/in.comsat)p Fx(,)28 b(whic)m(h)33 b(access)h(the)f(mailb)s +(o)m(xes)g(of)g(other)g(users,)g(m)m(ust)g(b)s(e)630 +1694 y(setgid)d(`)p Fp(HLFS_GID)p Fx(')d(to)j(w)m(ork)f(prop)s(erly)-8 +b(.)39 b(The)29 b(default)g(group)f(is)h(`)p Fp(hlfs)p +Fx('.)40 b(If)29 b(no)f(group)h(is)630 1803 y(pro)m(vided,)h(and)g +(there)h(is)f(no)g(group)g(`)p Fp(hlfs)p Fx(',)g(this)g(feature)h(is)g +(disabled.)150 1953 y Fp(-h)384 b Fx(Help.)41 b(Prin)m(t)30 +b(a)h(brief)f(help)g(message,)i(and)d(exit.)150 2102 +y Fp(-i)47 b Fk(reload-interval)630 2212 y Fx(Map-reloading)g(in)m +(terv)-5 b(al.)87 b(Eac)m(h)46 b Fo(reload-in)m(terv)-5 +b(al)51 b Fx(seconds,)e Ft(Hlfsd)55 b Fx(will)46 b(reload)g(the)630 +2321 y(passw)m(ord)35 b(map.)56 b Ft(Hlfsd)46 b Fx(needs)35 +b(the)h(passw)m(ord)f(map)g(for)h(the)g(UIDs)g(and)f(home)h(direc-)630 +2431 y(tory)c(pathnames.)46 b Ft(Hlfsd)41 b Fx(sc)m(hedules)33 +b(a)f(`)p Fp(SIGALRM)p Fx(')f(to)h(reload)h(the)f(passw)m(ord)g(maps.) +45 b(A)630 2540 y(`)p Fp(SIGHUP)p Fx(')24 b(sen)m(t)j(to)f +Ft(Hlfsd)35 b Fx(will)26 b(force)g(it)g(to)h(reload)f(the)g(maps)f +(immediately)-8 b(.)41 b(The)25 b(default)630 2650 y(v)-5 +b(alue)31 b(for)f Fo(reload-in)m(terv)-5 b(al)36 b Fx(is)30 +b(900)i(seconds)e(\(15)i(min)m(utes.\))150 2800 y Fp(-l)47 +b Fk(logfile)630 2909 y Fx(Sp)s(ecify)20 b(a)h(log)g(\014le)g(to)g +(whic)m(h)g Ft(Hlfsd)30 b Fx(will)21 b(record)f(ev)m(en)m(ts.)39 +b(If)20 b Fo(log\014le)27 b Fx(is)21 b(the)g(string)f(`)p +Fp(syslog)p Fx(')630 3019 y(then)26 b(the)g(log)i(messages)f(will)g(b)s +(e)e(sen)m(t)i(to)g(the)g(system)f(log)i(daemon)e(b)m(y)g +Fn(syslog)p Fx(\(3\),)j(using)630 3128 y(the)i(`)p Fp(LOG_DAEMON)p +Fx(')d(facilit)m(y)-8 b(.)43 b(This)30 b(is)g(also)h(the)g(default.)150 +3278 y Fp(-n)384 b Fx(No)44 b(v)m(erify)-8 b(.)82 b Ft(Hlfsd)53 +b Fx(will)44 b(not)g(v)m(erify)g(the)g(v)-5 b(alidit)m(y)45 +b(of)f(the)g(sym)m(b)s(olic)g(link)f(it)i(will)f(b)s(e)630 +3387 y(returning,)38 b(or)f(that)g(the)h(user's)e(home)h(directory)g +(con)m(tains)h(su\016cien)m(t)g(disk-space)f(for)630 +3497 y(sp)s(o)s(oling.)56 b(This)35 b(can)h(sp)s(eed)f(up)f +Ft(Hlfsd)45 b Fx(at)37 b(the)f(cost)g(of)g(p)s(ossibly)f(returning)g +(sym)m(b)s(olic)630 3606 y(links)42 b(to)h(home)g(directories)g(whic)m +(h)f(are)h(not)g(curren)m(tly)f(accessible)i(or)e(are)h(full.)77 +b(By)630 3716 y(default,)41 b Ft(Hlfsd)49 b Fx(v)-5 b(alidates)40 +b(the)f(sym)m(b)s(olic-link)h(in)f(the)g(bac)m(kground.)66 +b(The)38 b Fp(-n)g Fx(option)630 3826 y(o)m(v)m(errides)31 +b(the)g(meaning)g(of)f(the)h Fp(-c)e Fx(option,)i(since)g(no)f(cac)m +(hing)i(is)f(necessary)-8 b(.)150 3975 y Fp(-o)47 b Fk(mount-options) +630 4085 y Fx(Moun)m(t)42 b(options)g(whic)m(h)f Ft(Hlfsd)52 +b Fx(will)41 b(use)h(to)g(moun)m(t)g(itself)g(on)f(top)h(of)g +Fo(dirname)p Fx(.)74 b(By)630 4194 y(default,)49 b Fo(moun)m(t-options) +g Fx(is)c(set)h(to)f(`)p Fp(ro)p Fx('.)85 b(If)44 b(the)h(system)g +(supp)s(orts)e(sym)m(b)s(olic-link)630 4304 y(cac)m(hing,)32 +b(default)f(options)f(are)h(set)g(to)g(`)p Fp(ro,nocache)p +Fx('.)150 4453 y Fp(-p)384 b Fx(Prin)m(t)29 b(PID.)g(Outputs)e(the)i +(pro)s(cess-id)f(of)h Ft(Hlfsd)38 b Fx(to)29 b(standard)f(output)g +(where)g(it)i(can)f(b)s(e)630 4563 y(sa)m(v)m(ed)i(in)m(to)h(a)f +(\014le.)150 4712 y Fp(-v)384 b Fx(V)-8 b(ersion.)41 +b(Displa)m(ys)32 b(v)m(ersion)f(information)f(to)h(standard)f(error.) +150 4862 y Fp(-x)47 b Fk(log-options)630 4971 y Fx(Sp)s(ecify)29 +b(run-time)g(logging)i(options.)41 b(The)29 b(options)h(are)g(a)f +(comma)i(separated)f(list)g(c)m(ho-)630 5081 y(sen)g(from:)40 +b(`)p Fp(fatal)p Fx(',)30 b(`)p Fp(error)p Fx(',)g(`)p +Fp(user)p Fx(',)g(`)p Fp(warn)p Fx(',)g(`)p Fp(info)p +Fx(',)g(`)p Fp(map)p Fx(',)g(`)p Fp(stats)p Fx(',)g(`)p +Fp(all)p Fx('.)150 5230 y Fp(-C)384 b Fx(F)-8 b(orce)38 +b Ft(Hlfsd)47 b Fx(to)37 b(run)f(on)h(systems)f(that)i(cannot)f(turn)f +(o\013)h(the)g(NFS)g(attribute-cac)m(he.)630 5340 y(Use)d(of)h(this)e +(option)i(on)f(those)g(systems)g(is)g(discouraged,)i(as)e(it)g(ma)m(y)h +(result)f(in)g(loss)g(or)p eop end +%%Page: 100 102 +TeXDict begin 100 101 bop 150 -116 a Fx(100)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))630 299 y(misdeliv)m(ery)40 +b(of)f(mail.)68 b(The)39 b(option)g(is)g(ignored)h(on)f(systems)g(that) +h(can)f(turn)f(o\013)i(the)630 408 y(attribute-cac)m(he.)150 +568 y Fp(-D)47 b Fk(log-options)630 677 y Fx(Select)30 +b(from)f(a)g(v)-5 b(ariet)m(y)31 b(of)e(debugging)g(options.)41 +b(Pre\014xing)28 b(an)h(option)h(with)f(the)g(string)630 +787 y(`)p Fp(no)p Fx(')d(rev)m(erses)h(the)f(e\013ect)i(of)e(that)h +(option.)40 b(Options)26 b(are)g(cum)m(ulativ)m(e.)41 +b(The)26 b(most)h(useful)630 897 y(option)33 b(is)g(`)p +Fp(all)p Fx('.)49 b(Since)33 b(this)g(option)g(is)g(only)g(used)f(for)h +(debugging)g(other)g(options)h(are)630 1006 y(not)d(do)s(cumen)m(ted)f +(here.)40 b(A)31 b(fuller)f(description)g(is)h(a)m(v)-5 +b(ailable)32 b(in)e(the)h(program)f(source.)150 1166 +y Fp(-P)47 b Fk(password-file)630 1275 y Fx(Read)f(the)f(user-name,)50 +b(user-id,)f(and)c(home)g(directory)h(information)g(from)f(the)h +(\014le)630 1385 y Fo(passw)m(ord-\014le)p Fx(.)40 b(Normally)-8 +b(,)30 b Ft(Hlfsd)38 b Fx(will)29 b(use)f Fn(getp)m(w)m(en)m(t)p +Fx(\(3\))k(to)d(read)f(the)g(passw)m(ord)g(data-)630 +1494 y(base.)49 b(This)33 b(option)g(allo)m(ws)i(y)m(ou)f(to)f(o)m(v)m +(erride)i(the)e(default)h(database,)h(and)d(is)i(useful)e(if)630 +1604 y(y)m(ou)k(w)m(an)m(t)g(to)g(map)f(users')f(mail)i(\014les)g(to)g +(a)f(directory)h(other)g(than)f(their)g(home)h(direc-)630 +1714 y(tory)-8 b(.)40 b(Only)24 b(the)h(username,)g(uid,)h(and)e +(home-directory)i(\014elds)e(of)h(the)g(\014le)g Fo(passw)m(ord-\014le) +630 1823 y Fx(are)32 b(read)f(and)g(c)m(hec)m(k)m(ed.)46 +b(All)32 b(other)g(\014elds)f(are)h(ignored.)44 b(The)31 +b(\014le)h Fo(passw)m(ord-\014le)k Fx(m)m(ust)630 1933 +y(otherwise)29 b(b)s(e)f(complian)m(t)i(with)e(Unix)h(V)-8 +b(ersion)29 b(7)g(colon-delimited)i(format)e Fn(passwd)p +Fx(\(4\).)150 2132 y Fm(9.3.3)63 b(Hlfsd)42 b(Files)150 +2279 y Fx(The)30 b(follo)m(wing)i(\014les)e(are)h(used)e(b)m(y)i +Ft(Hlfsd)9 b Fx(:)150 2438 y Fp(/hlfs)240 b Fx(directory)27 +b(under)e(whic)m(h)h Ft(Hlfsd)36 b Fx(moun)m(ts)26 b(itself)i(and)e +(manages)h(the)g(sym)m(b)s(olic)f(link)h Fp(home)p Fx(.)150 +2598 y Fp(.hlfsdir)96 b Fx(default)31 b(sub-directory)f(in)g(the)h +(user's)f(home)g(directory)-8 b(,)32 b(to)f(whic)m(h)f(the)h +Fp(home)f Fx(sym)m(b)s(olic)630 2707 y(link)g(returned)f(b)m(y)i +Ft(Hlfsd)40 b Fx(p)s(oin)m(ts.)150 2867 y Fp(/var/hlfs)630 +2976 y Fx(directory)34 b(to)h(whic)m(h)f Fp(home)e Fx(sym)m(b)s(olic)j +(link)e(returned)g(b)m(y)h Ft(Hlfsd)43 b Fx(p)s(oin)m(ts)34 +b(if)g(it)g(is)g(unable)630 3086 y(to)d(v)m(erify)g(the)f(that)h +(user's)f(home)h(directory)g(is)f(accessible.)150 3245 +y Fp(/usr/tmp/hlfsd.dump.XXXX)o(XX)630 3355 y Fx(\014le)37 +b(to)h(whic)m(h)e Ft(Hlfsd)47 b Fx(will)37 b(dump)e(its)i(in)m(ternal)h +(passw)m(ord)e(map)h(when)f(it)h(receiv)m(es)i(the)630 +3465 y(`)p Fp(SIGUSR1)p Fx(')d(signal.)61 b(`)p Fp(XXXXXX)p +Fx(')36 b(will)h(b)s(e)f(replaced)i(b)m(y)f(a)g(random)f(string)h +(generated)h(b)m(y)630 3574 y Fn(mktemp)p Fx(\(3\))31 +b(or)g(\(the)g(more)f(secure\))h Fn(mkstemp)p Fx(\(3\).)275 +3733 y(F)-8 b(or)30 b(discussion)e(on)h(other)h(\014les)f(used)g(b)m(y) +g Ft(Hlfsd)p Fx(,)h(see)g(See)f(Section)h(10.11)h([lostaltmail],)i +(page)d(103,)150 3843 y(and)g(Section)h(10.12)h +([lostaltmail.conf-sample],)j(page)c(103.)p eop end +%%Page: 101 103 +TeXDict begin 101 102 bop 150 -116 a Fx(Chapter)30 b(10:)41 +b(Assorted)31 b(T)-8 b(o)s(ols)2364 b(101)150 299 y Fu(10)80 +b(Assorted)52 b(T)-13 b(o)t(ols)150 549 y Fx(The)30 b(follo)m(wing)i +(are)e(additional)i(utilities)g(and)d(scripts)h(included)g(with)g +(am-utils,)h(and)f(get)i(installed.)150 789 y Fw(10.1)68 +b(am-eject)150 949 y Fx(A)33 b(shell)f(script)g(unmoun)m(ts)g(a)g +(\015opp)m(y)g(or)h(CD-R)m(OM)g(that)g(is)f(automoun)m(ted,)i(and)e +(then)g(attempts)h(to)150 1058 y(eject)f(the)e(remo)m(v)-5 +b(able)32 b(device.)150 1299 y Fw(10.2)68 b(amd.conf-sample)150 +1458 y Fx(A)30 b(sample)h Ft(A)n(md)40 b Fx(con\014guration)31 +b(\014le.)40 b(See)31 b(Chapter)f(6)h([Amd)f(Con\014guration)g(File],)i +(page)f(59.)150 1698 y Fw(10.3)68 b(amd2ldif)150 1858 +y Fx(A)30 b(script)h(to)g(con)m(v)m(ert)h Ft(A)n(md)40 +b Fx(maps)29 b(to)j(LD)m(AP)f(input)e(\014les.)41 b(Use)31 +b(it)f(as)h(follo)m(ws:)390 1998 y Fp(amd2ldif)46 b Fk(mapname)f(base)i +Fp(<)g Fk(amd.mapfile)e Fp(>)j Fk(mapfile.ldif)150 2238 +y Fw(10.4)68 b(amd2sun)150 2397 y Fx(A)30 b(script)h(to)g(con)m(v)m +(ert)h Ft(A)n(md)40 b Fx(maps)29 b(to)j(Sun)c(Automoun)m(ter)j(maps.)40 +b(Use)31 b(it)g(as)g(follo)m(ws)390 2537 y Fp(amd2sun)46 +b(<)h Fk(amd.mapfile)e Fp(>)i Fk(auto_mapfile)150 2777 +y Fw(10.5)68 b(automoun)l(t2amd)150 2937 y Fx(A)30 b(script)h(to)g(con) +m(v)m(ert)h(old)e(Sun)f(Automoun)m(ter)i(maps)f(to)h +Ft(A)n(md)40 b Fx(maps.)275 3077 y(Sa)m(y)30 b(y)m(ou)h(ha)m(v)m(e)h +(the)e(Sun)f(automoun)m(t)i(\014le)g Ft(auto.fo)-5 b(o)p +Fx(,)32 b(with)e(these)h(t)m(w)m(o)h(lines:)390 3216 +y Fp(home)858 b(earth:/home)390 3326 y(moon)94 b(-ro,intr)380 +b(server:/proj/images)275 3466 y Fx(Running)390 3606 +y Fp(automount2amd)44 b(auto.foo)i(>)h(amd.foo)275 3745 +y Fx(will)30 b(pro)s(duce)f(the)i Ft(A)n(md)40 b Fx(map)30 +b Ft(amd.fo)-5 b(o)38 b Fx(with)30 b(this)h(con)m(ten)m(t:)390 +3885 y Fp(#)47 b(generated)f(by)h(automount2amd)d(on)j(Sat)g(Aug)g(14)g +(17:59:32)f(US/Eastern)f(1999)390 4104 y(/defaults)g(\\\\)485 +4214 y(type:=nfs;opts:=rw,grpid,n)o(osui)o(d,u)o(time)o(out=)o(600)390 +4433 y(home)i(\\)485 4543 y(host==earth;type:=link;fs:)o(=/ho)o(me)41 +b(\\\\)485 4652 y(rhost:=earth;rfs:=/home)390 4871 y(moon)47 +b(\\)485 4981 y(-addopts:=ro,intr)d(\\\\)485 5091 y +(host==server;type:=link;fs)o(:=/p)o(roj)o(/ima)o(ges)d(\\\\)485 +5200 y(rhost:=server;rfs:=/proj/i)o(mage)o(s)275 5340 +y Fx(This)29 b(p)s(erl)h(script)g(will)h(use)f(the)g(follo)m(wing)i +Ft(/default)40 b Fx(en)m(try)p eop end +%%Page: 102 104 +TeXDict begin 102 103 bop 150 -116 a Fx(102)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))390 299 y Fp +(type:=nfs;opts:=rw,grpid)o(,nos)o(uid,)o(uti)o(meou)o(t=60)o(0)275 +453 y Fx(If)36 b(y)m(ou)h(wish)f(to)i(o)m(v)m(erride)g(that,)h +(de\014ne)d(the)i Fn($DEF)-10 b(A)m(UL)i(TS)36 b Fx(en)m(vironmen)m(t)h +(v)-5 b(ariable,)40 b(or)d(mo)s(dify)150 563 y(the)31 +b(script.)275 717 y(If)i(y)m(ou)i(wish)e(to)i(generate)g(Amd)f(maps)f +(using)h(the)g Ft(hostd)45 b Fx(\(see)35 b(Section)g(3.3.3.8)i([hostd)d +(Selector)150 826 y(V)-8 b(ariable],)35 b(page)f(27\))g +Ft(A)n(md)42 b Fx(map)33 b(syn)m(tax,)h(then)e(de\014ne)g(the)h(en)m +(vironmen)m(t)h(v)-5 b(ariable)33 b Fn($DOMAIN)h Fx(or)150 +936 y(mo)s(dify)c(the)g(script.)275 1090 y(Note)39 b(that)g(automoun)m +(t2amd)g(do)s(es)f(not)h(understand)d(the)j(syn)m(tax)f(in)g(new)m(er)h +(Sun)d(Automoun)m(t)150 1200 y(maps,)30 b(those)h(used)f(with)g +(autofs.)150 1462 y Fw(10.6)68 b(ctl-amd)150 1621 y Fx(A)30 +b(script)h(to)g(start,)g(stop,)g(or)f(restart)h Ft(A)n(md)p +Fx(.)41 b(Use)31 b(it)f(as)h(follo)m(ws:)150 1810 y Fp(ctl-amd)46 +b(start)630 1920 y Fx(Start)31 b(a)f(new)g Ft(A)n(md)40 +b Fx(pro)s(cess.)150 2099 y Fp(ctl-amd)46 b(stop)630 +2208 y Fx(Stop)30 b(the)h(running)d Ft(A)n(md)p Fx(.)150 +2387 y Fp(ctl-amd)46 b(restart)630 2497 y Fx(Stop)32 +b(the)h(running)e Ft(A)n(md)42 b Fx(\(if)32 b(an)m(y\),)j(safely)e(w)m +(ait)g(for)g(it)g(to)g(terminate,)h(and)e(then)g(start)630 +2607 y(a)f(new)f(pro)s(cess)g(|)g(only)g(if)h(the)f(previous)g(one)h +(died)f(cleanly)-8 b(.)275 2795 y(See)30 b(Chapter)g(7)h([Run-time)f +(Administration],)h(page)g(73,)h(for)e(more)h(details.)150 +3057 y Fw(10.7)68 b(ctl-hlfsd)150 3217 y Fx(A)28 b(script)f(for)g(con)m +(trolling)j Ft(Hlfsd)p Fx(,)e(m)m(uc)m(h)g(the)f(same)h(w)m(a)m(y)h +Fp(ctl-amd)c Fx(con)m(trols)k Ft(A)n(md)p Fx(.)40 b(Use)28 +b(it)g(as)g(follo)m(ws:)150 3406 y Fp(ctl-hlfsd)45 b(start)630 +3515 y Fx(Start)31 b(a)f(new)g Ft(Hlfsd)40 b Fx(pro)s(cess.)150 +3694 y Fp(ctl-hlfsd)45 b(stop)630 3804 y Fx(Stop)30 b(the)h(running)d +Ft(Hlfsd)p Fx(.)150 3983 y Fp(ctl-hlfsd)45 b(restart)630 +4093 y Fx(Stop)37 b(the)h(running)e Ft(Hlfsd)47 b Fx(\(if)38 +b(an)m(y\),)i(w)m(ait)e(for)g(10)g(seconds)f(for)h(it)g(to)g +(terminate,)j(and)630 4202 y(then)30 b(start)h(a)g(new)f(pro)s(cess)g +(|)g(only)g(if)h(the)f(previous)g(one)h(died)f(cleanly)-8 +b(.)275 4391 y(See)30 b(Chapter)g(9)h([Hlfsd],)f(page)h(93,)h(for)e +(more)h(details.)150 4653 y Fw(10.8)68 b(\014x-amd-map)150 +4812 y Fx(Am-utils)36 b(c)m(hanged)h(some)f(of)g(the)g(syn)m(tax)h(and) +e(default)h(v)-5 b(alues)36 b(of)g(some)g(v)-5 b(ariables.)58 +b(F)-8 b(or)37 b(example,)150 4922 y(the)c(default)g(v)-5 +b(alue)33 b(for)g(`)p Fp(${os})p Fx(')e(for)i(Solaris)g(2.x)g(\(ak)-5 +b(a)34 b(SunOS)d(5.x\))i(systems)g(used)f(to)h(b)s(e)f(`)p +Fp(sos5)p Fx(',)h(it)150 5032 y(is)d(no)m(w)h(more)f(automatically)k +(generated)d(from)f Fp(config.guess)d Fx(and)j(its)g(v)-5 +b(alue)31 b(is)g(`)p Fp(sunos5)p Fx('.)275 5186 y(This)e(script)h(con)m +(v)m(erts)i(older)f Ft(A)n(md)39 b Fx(maps)30 b(to)h(new)f(ones.)41 +b(Use)31 b(it)g(as)g(follo)m(ws:)390 5340 y Fp(fix-amd-map)45 +b(<)i Fk(old.map)f Fp(>)h Fk(new.map)p eop end +%%Page: 103 105 +TeXDict begin 103 104 bop 150 -116 a Fx(Chapter)30 b(10:)41 +b(Assorted)31 b(T)-8 b(o)s(ols)2364 b(103)150 299 y Fw(10.9)68 +b(\014xmoun)l(t)150 458 y Fx(`)p Fp(fixmount)p Fx(')38 +b(is)h(a)h(v)-5 b(arian)m(t)41 b(of)f Fn(sho)m(wmoun)m(t)p +Fx(\(8\))g(that)g(can)g(delete)h(b)s(ogus)e(moun)m(t)g(en)m(tries)i(in) +e(remote)150 568 y Fn(moun)m(td)p Fx(\(8\))32 b(daemons.)43 +b(This)31 b(is)g(useful)f(to)i(clean)m(up)g(otherwise)g(ev)m(er-accum)m +(ulating)i(\\junk".)43 b(Use)31 b(it)150 677 y(for)f(example:)390 +811 y Fp(fixmount)46 b(-r)h Fk(host)275 945 y Fx(See)30 +b(the)h(online)f(man)m(ual)h(page)g(for)f(`)p Fp(fixmount)p +Fx(')f(for)h(more)h(details)g(of)g(its)f(usage.)150 1175 +y Fw(10.10)69 b(\014xrm)l(tab)150 1335 y Fx(A)26 b(script)g(to)g(in)m +(v)-5 b(alidate)28 b Fp(/etc/rmtab)23 b Fx(en)m(tries)j(for)g(hosts)g +(named.)38 b(Also)27 b(restart)f(moun)m(td)f(for)h(c)m(hanges)150 +1444 y(to)31 b(tak)m(e)h(e\013ect.)42 b(Use)31 b(it)g(for)f(example:) +390 1578 y Fp(fixrmtab)46 b Fk(host1)g(host2)g(...)150 +1808 y Fw(10.11)69 b(lostaltmail)150 1968 y Fx(A)34 b(script)g(used)f +(with)g Ft(Hlfsd)44 b Fx(to)35 b(resend)e(an)m(y)h(\\lost")h(mail.)52 +b Ft(Hlfsd)44 b Fx(redirects)34 b(mail)g(whic)m(h)g(cannot)h(b)s(e)150 +2077 y(written)d(in)m(to)g(the)g(user's)e(home)i(directory)g(to)g(an)g +(alternate)h(directory)-8 b(.)45 b(This)30 b(is)i(useful)e(to)j(con)m +(tin)m(ue)150 2187 y(deliv)m(ering)g(mail,)f(ev)m(en)h(if)e(the)h +(user's)f(\014le)h(system)f(w)m(as)h(una)m(v)-5 b(ailable,)34 +b(full,)e(or)f(o)m(v)m(er)i(quota.)45 b(But,)33 b(the)150 +2297 y(mail)24 b(whic)m(h)f(gets)i(deliv)m(ered)f(to)g(the)f(alternate) +i(directory)f(needs)f(to)h(b)s(e)f(resen)m(t)h(to)g(its)g(resp)s(ectiv) +m(e)h(users.)150 2406 y(This)30 b(is)g(what)g(the)h(`)p +Fp(lostaltmail)p Fx(')d(script)i(do)s(es.)275 2540 y(Use)g(it)h(as)g +(follo)m(ws:)390 2673 y Fp(lostaltmail)275 2807 y Fx(This)f(script)h +(needs)g(a)g(con\014guration)h(\014le)f(`)p Fp(lostaltmail.conf)p +Fx(')c(set)32 b(up)e(with)h(the)g(righ)m(t)h(param-)150 +2916 y(eters)f(to)g(prop)s(erly)e(w)m(ork.)41 b(See)31 +b(Chapter)e(9)i([Hlfsd],)g(page)g(93,)g(for)g(more)f(details.)150 +3147 y Fw(10.12)69 b(lostaltmail.conf-sample)150 3306 +y Fx(This)30 b(is)h(a)h(text)g(\014le)f(with)g(con\014guration)h +(parameters)f(needed)g(for)g(the)g(`)p Fp(lostaltmail)p +Fx(')e(script.)42 b(The)150 3416 y(script)d(includes)f(commen)m(ts)i +(explaining)f(eac)m(h)h(of)f(the)g(con\014guration)g(v)-5 +b(ariables.)66 b(See)39 b(it)g(for)g(more)150 3526 y(information.)i +(Also)31 b(see)g(Chapter)f(9)h([Hlfsd],)f(page)h(93)h(for)e(general)h +(information.)150 3756 y Fw(10.13)69 b(mk-amd-map)150 +3916 y Fx(This)26 b(program)h(con)m(v)m(erts)h(a)g(normal)f +Ft(A)n(md)36 b Fx(map)27 b(\014le)g(in)m(to)h(an)f(ndbm)e(database)j +(with)e(the)i(same)f(pre\014x)150 4025 y(as)k(the)f(named)g(\014le.)41 +b(Use)31 b(it)g(as)f(follo)m(ws:)390 4159 y Fp(mk-amd-map)45 +b Fk(mapname)150 4389 y Fw(10.14)69 b(pa)l(wd)150 4549 +y Ft(Pawd)43 b Fx(is)33 b(used)f(to)h(prin)m(t)f(the)h(curren)m(t)g(w)m +(orking)g(directory)-8 b(,)34 b(adjusted)e(to)i(re\015ect)f(prop)s(er)e +(paths)h(that)150 4658 y(can)e(b)s(e)g(reused)f(to)i(go)g(through)f +(the)g(automoun)m(ter)h(for)f(the)g(shortest)h(p)s(ossible)f(path.)40 +b(In)29 b(particular,)150 4768 y(the)37 b(path)f(prin)m(ted)g(bac)m(k)h +(do)s(es)f(not)h(include)f(an)m(y)h(of)g Ft(A)n(md)9 +b Fx('s)37 b(lo)s(cal)g(moun)m(t)g(p)s(oin)m(ts.)59 b(Using)36 +b(them)h(is)150 4878 y(unsafe,)29 b(b)s(ecause)f Ft(A)n(md)39 +b Fx(ma)m(y)29 b(unmoun)m(t)f(managed)h(\014le)g(systems)f(from)g(the)h +(moun)m(t)g(p)s(oin)m(ts,)g(and)f(th)m(us)150 4987 y(including)i(them)g +(in)g(paths)g(ma)m(y)h(not)g(alw)m(a)m(ys)h(\014nd)d(the)h(\014les)h +(within.)275 5121 y(Without)43 b(an)m(y)g(argumen)m(ts,)k +Ft(Pawd)53 b Fx(will)43 b(prin)m(t)f(the)h(automoun)m(ter)h(adjusted)e +(curren)m(t)h(w)m(orking)150 5230 y(directory)-8 b(.)41 +b(With)27 b(an)m(y)g(n)m(um)m(b)s(er)f(of)h(argumen)m(ts,)h(it)g(will)f +(prin)m(t)g(the)g(adjusted)f(path)h(of)g(eac)m(h)h(one)g(of)f(the)150 +5340 y(argumen)m(ts.)p eop end +%%Page: 104 106 +TeXDict begin 104 105 bop 150 -116 a Fx(104)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fw(10.15)69 +b(redhat-ctl-amd)150 458 y Fx(This)33 b(script)g(is)h(similar)g(to)g +Ft(ctl-amd)44 b Fx(\(see)35 b(Section)f(10.6)h([ctl-amd],)i(page)d +(102\))h(but)e(is)h(in)m(tended)f(for)150 568 y(Red)c(Hat)h(Lin)m(ux)f +(systems.)41 b(Y)-8 b(ou)29 b(can)h(safely)g(cop)m(y)g +Ft(r)-5 b(e)g(dhat-ctl-amd)42 b Fx(on)m(to)30 b Fp +(/etc/rc.d/init.d/amd)p Fx(.)150 677 y(The)22 b(script)h(supplied)f(b)m +(y)h Ft(A)n(m-utils)30 b Fx(is)22 b(usually)h(b)s(etter)g(than)g(the)g +(one)g(pro)m(vided)g(b)m(y)g(Red)f(Hat,)k(b)s(ecause)150 +787 y(the)32 b(Red)g(Hat)g(script)g(do)s(es)f(not)h(correctly)i(kill)e +Ft(A)n(md)41 b Fx(pro)s(cesses:)i(it)33 b(is)f(to)s(o)g(quic)m(k)g(to)h +(kill)f(the)g(wrong)150 897 y(pro)s(cesses,)e(lea)m(ving)j(stale)e(or)g +(h)m(ung)e(moun)m(t)i(p)s(oin)m(ts)f(b)s(ehind.)150 1137 +y Fw(10.16)69 b(w)l(ait4amd)150 1296 y Fx(A)44 b(script)g(to)h(w)m(ait) +g(for)e Ft(A)n(md)54 b Fx(to)44 b(start)h(on)f(a)g(particular)g(host)g +(b)s(efore)g(p)s(erforming)e(an)i(arbitrary)150 1406 +y(command.)i(The)32 b(command)g(is)g(executed)h(rep)s(eatedly)-8 +b(,)34 b(with)e(1)g(second)g(in)m(terv)-5 b(als)34 b(in)e(b)s(et)m(w)m +(een.)46 b(Y)-8 b(ou)150 1515 y(ma)m(y)32 b(in)m(terrupt)f(the)g +(script)h(using)e(`)p Fp(^C)p Fx(')i(\(or)f(whatev)m(er)h(k)m(eyb)s +(oard)g(sequence)f(y)m(our)h(terminal's)g(`)p Fp(intr)p +Fx(')150 1625 y(function)e(is)g(b)s(ound)f(to\).)275 +1764 y(Examples:)150 1931 y Fp(wait4amd)46 b(saturn)g(amq)h(-p)g(-h)g +(saturn)630 2041 y Fx(When)30 b Ft(A)n(md)40 b Fx(is)30 +b(up)g(on)g(host)g(`)p Fp(saturn)p Fx(',)g(get)h(the)g(pro)s(cess)f(ID) +g(of)h(that)g(running)e Ft(A)n(md)p Fx(.)150 2205 y Fp(wait4amd)46 +b(pluto)g(rlogin)g(pluto)630 2315 y Fx(Remote)41 b(login)f(to)g(host)g +(`)p Fp(pluto)p Fx(')f(when)f Ft(A)n(md)49 b Fx(is)40 +b(up)e(on)i(that)g(host.)68 b(It)40 b(is)g(generally)630 +2424 y(necessary)h(to)g(w)m(ait)h(for)e Ft(A)n(md)50 +b Fx(to)41 b(prop)s(erly)e(start)i(and)f(initialize)i(on)f(a)f(remote)i +(host)630 2534 y(b)s(efore)f(logging)i(in)d(to)i(it,)j(b)s(ecause)c +(otherwise)h(user)e(home)h(directories)h(ma)m(y)g(not)g(b)s(e)630 +2643 y(accessible)32 b(across)f(the)g(net)m(w)m(ork.)150 +2808 y Fp(wait4amd)46 b(pluto)630 2917 y Fx(A)37 b(short-hand)f(v)m +(ersion)i(of)f(the)g(previous)g(command,)h(since)g(the)f(most)g(useful) +g(reason)630 3027 y(for)30 b(this)g(script)g(is)g(to)h(login)g(to)f(a)h +(remote)g(host.)40 b(I)30 b(use)g(it)h(v)m(ery)f(often)g(when)g +(testing)h(out)630 3137 y(new)f(v)m(ersions)h(of)f Ft(A)n(md)p +Fx(,)h(and)e(need)i(to)g(reb)s(o)s(ot)f(h)m(ung)g(hosts.)150 +3377 y Fw(10.17)69 b(w)l(ait4amd2die)150 3536 y Fx(This)30 +b(script)h(is)g(used)f(in)m(ternally)i(b)m(y)e(`)p Fp(ctl-amd)p +Fx(')g(when)f(used)h(to)i(restart)f Ft(A)n(md)p Fx(.)43 +b(It)31 b(w)m(aits)g(for)g Ft(A)n(md)40 b Fx(to)150 3645 +y(terminate.)g(If)25 b(it)h(detected)g(that)g Ft(A)n(md)35 +b Fx(terminated)26 b(cleanly)-8 b(,)28 b(this)d(script)g(will)h(return) +e(an)i(exist)g(status)150 3755 y(of)31 b(zero.)41 b(Otherwise,)30 +b(it)h(will)g(return)e(a)i(non-zero)g(exit)g(status.)275 +3895 y(The)k(script)i(tests)g(for)f Ft(A)n(md)9 b Fx('s)36 +b(existence)i(once)f(ev)m(ery)g(5)g(seconds,)h(six)e(times,)j(for)d(a)h +(total)h(of)e(30)150 4004 y(seconds.)41 b(It)30 b(will)h(return)e(a)i +(zero)g(exist)g(status)g(as)g(so)s(on)f(as)g(it)h(detects)h(that)f +Ft(A)n(md)39 b Fx(dies.)150 4244 y Fw(10.18)69 b(wire-test)150 +4403 y Fx(A)26 b(simple)g(program)g(to)g(test)h(if)f(some)g(of)h(the)f +(most)g(basic)g(net)m(w)m(orking)h(functions)f(in)f(am-util's)i +(library)150 4513 y Fp(libamu)32 b Fx(w)m(ork.)51 b(It)34 +b(also)h(tests)f(the)g(com)m(bination)h(of)f(NFS)g(proto)s(col)g(and)g +(v)m(ersion)g(n)m(um)m(b)s(er)e(that)j(are)150 4623 y(supp)s(orted)29 +b(from)g(the)i(curren)m(t)f(host,)h(to)g(a)g(remote)g(one.)275 +4762 y(F)-8 b(or)32 b(example,)h(in)e(this)h(test)g(a)g(mac)m(hine)h +(whic)m(h)e(only)h(supp)s(orts)e(NFS)h(V)-8 b(ersion)33 +b(2)f(is)f(con)m(tacting)k(a)150 4872 y(remote)e(host)f(that)h(can)g +(supp)s(ort)d(the)i(same)h(v)m(ersion,)g(but)f(using)f(b)s(oth)h(UDP)h +(and)e(TCP)-8 b(.)32 b(If)g(no)g(host)150 4981 y(name)e(is)h(sp)s +(eci\014ed,)f(`)p Fp(wire-test)p Fx(')e(will)j(try)f +Fp(localhost)p Fx(.)390 5121 y Fp($)47 b(wire-test)f(moisil)390 +5230 y(Network)g(name)g(is)i("mcl-lab-net.cs.columbi)o(a.ed)o(u")390 +5340 y(Network)e(number)g(is)h("128.59.13")p eop end +%%Page: 105 107 +TeXDict begin 105 106 bop 150 -116 a Fx(Chapter)30 b(10:)41 +b(Assorted)31 b(T)-8 b(o)s(ols)2364 b(105)390 299 y Fp(Network)46 +b(name)g(is)i("old-net.cs.columbia.ed)o(u")390 408 y(Network)e(number)g +(is)h("128.59.16")390 518 y(My)g(IP)g(address)f(is)h(0x7f000001.)390 +628 y(NFS)g(Version)f(and)h(protocol)e(tests)i(to)g(host)f("moisil"...) +772 737 y(testing)g(vers=2,)f(proto="udp")g(->)i(found)g(version)f(2.) +772 847 y(testing)g(vers=3,)f(proto="udp")g(->)i(failed!)772 +956 y(testing)f(vers=2,)f(proto="tcp")g(->)i(found)g(version)f(2.)772 +1066 y(testing)g(vers=3,)f(proto="tcp")g(->)i(failed!)p +eop end +%%Page: 106 108 +TeXDict begin 106 107 bop eop end +%%Page: 107 109 +TeXDict begin 107 108 bop 150 -116 a Fx(Chapter)30 b(11:)41 +b(Examples)2571 b(107)150 299 y Fu(11)80 b(Examples)150 +617 y Fw(11.1)68 b(User)46 b(Filesystems)150 776 y Fx(With)e(more)f +(than)g(one)h(\014leserv)m(er,)j(the)d(directories)g(most)g(frequen)m +(tly)f(cross-moun)m(ted)h(are)f(those)150 886 y(con)m(taining)g(user)e +(home)h(directories.)75 b(A)42 b(common)g(con)m(v)m(en)m(tion)i(used)d +(at)h(Imp)s(erial)f(College)j(is)d(to)150 995 y(moun)m(t)30 +b(the)h(user)f(disks)f(under)g Fp(/home/)p Ft(machine)p +Fx(.)275 1127 y(T)m(ypically)-8 b(,)32 b(the)e(`)p Fp(/etc/fstab)p +Fx(')e(\014le)j(con)m(tained)g(a)g(long)g(list)g(of)g(en)m(tries)g(suc) +m(h)f(as:)390 1260 y Fk(machine)p Fp(:/home/)p Fk(machine)42 +b Fp(/home/)p Fk(machine)i Fp(nfs)j(...)275 1392 y Fx(for)30 +b(eac)m(h)h(\014leserv)m(er)g(on)f(the)h(net)m(w)m(ork.)275 +1524 y(There)e(are)i(n)m(umerous)e(problems)h(with)g(this)g(system.)41 +b(The)30 b(moun)m(t)g(list)h(can)f(b)s(ecome)h(quite)g(large)150 +1633 y(and)i(some)h(of)g(the)g(mac)m(hines)h(ma)m(y)f(b)s(e)f(do)m(wn)g +(when)g(a)h(system)g(is)g(b)s(o)s(oted.)51 b(When)33 +b(a)h(new)g(\014leserv)m(er)150 1743 y(is)c(installed,)g(`)p +Fp(/etc/fstab)p Fx(')e(m)m(ust)h(b)s(e)g(up)s(dated)g(on)g(ev)m(ery)i +(mac)m(hine,)f(the)g(moun)m(t)g(directory)g(created)150 +1853 y(and)g(the)g(\014lesystem)h(moun)m(ted.)275 1985 +y(In)f(man)m(y)i(en)m(vironmen)m(ts)g(most)g(p)s(eople)g(use)f(the)h +(same)g(few)g(w)m(orkstations,)h(but)e(it)h(is)g(con)m(v)m(enien)m(t) +150 2094 y(to)g(go)g(to)g(a)g(colleague's)i(mac)m(hine)e(and)f(access)h +(y)m(our)f(o)m(wn)h(\014les.)43 b(When)31 b(a)h(serv)m(er)g(go)s(es)f +(do)m(wn,)h(it)g(can)150 2204 y(cause)38 b(a)g(pro)s(cess)f(on)g(a)h +(clien)m(t)h(mac)m(hine)f(to)g(hang.)62 b(By)38 b(minimizing)g(the)f +(moun)m(ted)h(\014lesystems)f(to)150 2313 y(only)25 b(include)f(those)i +(activ)m(ely)h(b)s(eing)d(used,)i(there)f(is)f(less)h(c)m(hance)h(that) +g(a)f(\014lesystem)g(will)g(b)s(e)f(moun)m(ted)150 2423 +y(when)29 b(a)i(serv)m(er)g(go)s(es)g(do)m(wn.)275 2555 +y(The)d(follo)m(wing)j(is)f(a)g(short)f(extract)i(from)e(a)h(map)f(tak) +m(en)h(from)f(a)h(researc)m(h)g(\014leserv)m(er)g(at)g(Imp)s(erial)150 +2665 y(College.)275 2797 y(Note)h(the)e(en)m(try)h(for)g(`)p +Fp(localhost)p Fx(')d(whic)m(h)j(is)f(used)g(for)h(users)e(suc)m(h)i +(as)g(the)f(op)s(erator)h(\(`)p Fp(opr)p Fx('\))g(who)150 +2906 y(ha)m(v)m(e)i(a)e(home)h(directory)g(on)f(most)h(mac)m(hine)g(as) +f(`)p Fp(/home/localhost/opr)p Fx('.)390 3039 y Fp(/defaults)332 +b(opts:=rw,intr,grpid,nos)o(uid)390 3148 y(charm)524 +b(host!=${key};type:=nfs;)o(rhos)o(t:=)o(${ke)o(y};r)o(fs:)o(=/ho)o +(me/$)o({ke)o(y})42 b(\\)1154 3258 y(host==${key};type:=ufs;)o(dev:)o +(=/d)o(ev/x)o(d0g)390 3367 y(#)390 3477 y(...)390 3696 +y(#)390 3806 y(localhost)332 b(type:=link;fs:=${host})390 +3915 y(...)390 4025 y(#)390 4134 y(#)47 b(dylan)g(has)g(two)g(user)f +(disks)h(so)g(have)f(a)390 4244 y(#)h(top)g(directory)f(in)h(which)f +(to)h(mount)g(them.)390 4354 y(#)390 4463 y(dylan)524 +b(type:=auto;fs:=${map};p)o(ref:)o(=${)o(key})o(/)390 +4573 y(#)390 4682 y(dylan/dk2)332 b(host!=dylan;type:=nfs;r)o(host)o +(:=d)o(ylan)o(;rfs)o(:=/)o(home)o(/${k)o(ey})41 b(\\)1154 +4792 y(host==dylan;type:=ufs;d)o(ev:=)o(/de)o(v/ds)o(k/2s)o(0)390 +4902 y(#)390 5011 y(dylan/dk5)332 b(host!=dylan;type:=nfs;r)o(host)o +(:=d)o(ylan)o(;rfs)o(:=/)o(home)o(/${k)o(ey})41 b(\\)1154 +5121 y(host==dylan;type:=ufs;d)o(ev:=)o(/de)o(v/ds)o(k/5s)o(0)390 +5230 y(...)390 5340 y(#)p eop end +%%Page: 108 110 +TeXDict begin 108 109 bop 150 -116 a Fx(108)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))390 299 y Fp(toytown)428 +b(host!=${key};type:=nfs;)o(rhos)o(t:=)o(${ke)o(y};r)o(fs:)o(=/ho)o +(me/$)o({ke)o(y})42 b(\\)1154 408 y(host==${key};type:=ufs;)o(dev:)o +(=/d)o(ev/x)o(y1g)390 518 y(...)390 628 y(#)390 737 y(zebedee)428 +b(host!=${key};type:=nfs;)o(rhos)o(t:=)o(${ke)o(y};r)o(fs:)o(=/ho)o +(me/$)o({ke)o(y})42 b(\\)1154 847 y(host==${key};type:=ufs;)o(dev:)o +(=/d)o(ev/d)o(sk/1)o(s0)390 956 y(#)390 1066 y(#)47 b(Just)g(for)g +(access...)390 1176 y(#)390 1285 y(gould)524 b(type:=auto;fs:=${map};p) +o(ref:)o(=${)o(key})o(/)390 1395 y(gould/staff)236 b +(host!=gould;type:=nfs;r)o(host)o(:=g)o(ould)o(;rfs)o(:=/)o(home)o +(/${k)o(ey})390 1504 y(#)390 1614 y(gummo)524 b +(host!=${key};type:=nfs;)o(rhos)o(t:=)o(${ke)o(y};r)o(fs:)o(=/ho)o +(me/$)o({ke)o(y})390 1724 y(...)275 1859 y Fx(This)31 +b(map)h(is)h(shared)e(b)m(y)i(most)f(of)h(the)g(mac)m(hines)f(listed)h +(so)g(on)f(those)h(systems)g(an)m(y)f(of)h(the)g(user)150 +1969 y(disks)d(is)g(accessible)i(via)f(a)g(consisten)m(t)h(name.)41 +b Ft(A)n(md)e Fx(is)31 b(started)g(with)f(the)g(follo)m(wing)i(command) +390 2105 y Fp(amd)47 b(/home)f(amd.home)275 2241 y Fx(Note)36 +b(that)f(when)f(moun)m(ting)h(a)h(remote)f(\014lesystem,)i(the)e +Fo(automoun)m(ted)k Fx(moun)m(t)c(p)s(oin)m(t)g(is)g(refer-)150 +2351 y(enced,)25 b(so)f(that)h(the)f(\014lesystem)g(will)g(b)s(e)f +(moun)m(ted)h(if)f(it)i(is)e(not)h(y)m(et)h(\(at)g(the)f(time)h(the)e +(remote)i(`)p Fp(mountd)p Fx(')150 2460 y(obtains)31 +b(the)f(\014le)h(handle\).)150 2695 y Fw(11.2)68 b(Home)46 +b(Directories)150 2854 y Fx(One)41 b(con)m(v)m(en)m(tion)j(for)d(home)h +(directories)g(is)g(to)g(lo)s(cate)i(them)d(in)h(`)p +Fp(/homes)p Fx(')e(so)i(user)f(`)p Fp(jsp)p Fx(''s)g(home)150 +2964 y(directory)f(is)g(`)p Fp(/homes/jsp)p Fx('.)68 +b(With)40 b(more)g(than)g(a)g(single)h(\014leserv)m(er)f(it)h(is)f(con) +m(v)m(enien)m(t)i(to)f(spread)150 3073 y(user)28 b(\014les)g(across)h +(sev)m(eral)g(mac)m(hines.)41 b(All)29 b(that)g(is)f(required)g(is)g(a) +h(moun)m(t-map)f(whic)m(h)g(con)m(v)m(erts)i(login)150 +3183 y(names)g(to)h(an)g(automoun)m(ted)g(directory)-8 +b(.)275 3319 y(Suc)m(h)29 b(a)i(map)f(migh)m(t)h(b)s(e)f(started)h(b)m +(y)f(the)h(command:)390 3455 y Fp(amd)47 b(/homes)f(amd.homes)275 +3591 y Fx(where)29 b(the)i(map)f(`)p Fp(amd.homes)p Fx(')e(con)m +(tained)k(the)f(en)m(tries:)390 3727 y Fp(/defaults)141 +b(type:=link)f(#)48 b(All)f(the)f(entries)g(are)h(of)g(type:=link)390 +3836 y(jsp)429 b(fs:=/home/charm/jsp)390 3946 y(njw)g +(fs:=/home/dylan/dk5/njw)390 4055 y(...)390 4165 y(phjk)381 +b(fs:=/home/toytown/ai/ph)o(jk)390 4275 y(sjv)429 b +(fs:=/home/ganymede/sjv)275 4411 y Fx(Whenev)m(er)32 +b(a)g(login)h(name)f(is)f(accessed)i(in)f(`)p Fp(/homes)p +Fx(')e(a)i(sym)m(b)s(olic)h(link)e(app)s(ears)g(p)s(oin)m(ting)h(to)h +(the)150 4520 y(real)38 b(lo)s(cation)h(of)f(that)f(user's)g(home)h +(directory)-8 b(.)62 b(In)37 b(this)g(example,)j(`)p +Fp(/homes/jsp)p Fx(')35 b(w)m(ould)j(app)s(ear)150 4630 +y(to)32 b(b)s(e)e(a)i(sym)m(b)s(olic)f(link)g(p)s(oin)m(ting)h(to)g(`)p +Fp(/home/charm/jsp)p Fx('.)39 b(Of)31 b(course,)g(`)p +Fp(/home)p Fx(')g(w)m(ould)f(also)j(b)s(e)d(an)150 4739 +y(automoun)m(t)h(p)s(oin)m(t.)275 4875 y(This)d(system)h(causes)g(an)g +(extra)g(lev)m(el)i(of)e(sym)m(b)s(olic)g(links)f(to)i(b)s(e)e(used.)40 +b(Although)29 b(that)g(turns)f(out)150 4985 y(to)k(b)s(e)f(relativ)m +(ely)j(inexp)s(ensiv)m(e,)e(an)g(alternativ)m(e)h(is)f(to)g(directly)h +(moun)m(t)e(the)h(required)f(\014lesystems)g(in)150 5094 +y(the)25 b(`)p Fp(/homes)p Fx(')e(map.)38 b(The)24 b(required)g(map)g +(is)g(simple,)i(but)d(long,)k(and)d(its)g(creation)i(is)f(b)s(est)f +(automated.)150 5204 y(The)30 b(en)m(try)g(for)h(`)p +Fp(jsp)p Fx(')f(could)g(b)s(e:)390 5340 y Fp(jsp)142 +b(-sublink:=${key};rfs:=/hom)o(e/c)o(harm)41 b(\\)p eop +end +%%Page: 109 111 +TeXDict begin 109 110 bop 150 -116 a Fx(Chapter)30 b(11:)41 +b(Examples)2571 b(109)1106 299 y Fp(host==charm;type:=ufs;de)o(v:=/)o +(dev)o(/xd0)o(g)42 b(\\)1106 408 y(host!=charm;type:=nfs;rh)o(ost:)o +(=ch)o(arm)275 544 y Fx(This)32 b(map)h(can)h(b)s(ecome)g(quite)g(big)f +(if)h(it)g(con)m(tains)h(a)e(large)i(n)m(um)m(b)s(er)d(of)i(en)m +(tries.)51 b(By)33 b(com)m(bining)150 654 y(t)m(w)m(o)f(other)e +(features)h(of)g Ft(A)n(md)39 b Fx(it)31 b(can)g(b)s(e)f(greatly)h +(simpli\014ed.)275 790 y(First)i(the)f(UFS)h(partitions)g(should)f(b)s +(e)g(moun)m(ted)h(under)e(the)i(con)m(trol)h(of)f(`)p +Fp(/etc/fstab)p Fx(',)e(taking)150 900 y(care)d(that)g(they)f(are)h +(moun)m(ted)f(in)g(the)g(same)g(place)i(that)e Ft(A)n(md)37 +b Fx(w)m(ould)27 b(ha)m(v)m(e)h(automoun)m(ted)g(them.)40 +b(In)150 1009 y(most)c(cases)h(this)f(w)m(ould)g(b)s(e)f(something)h +(lik)m(e)h(`)p Fp(/a/)p Fk(host)p Fp(/home/)p Fk(host)p +Fx(')32 b(and)j(`)p Fp(/etc/fstab)p Fx(')f(on)i(host)150 +1119 y(`)p Fp(charm)p Fx(')29 b(w)m(ould)i(ha)m(v)m(e)g(a)g(line:)390 +1255 y Fp(/dev/xy0g)45 b(/a/charm/home/charm)e(4.2)k(rw,nosuid,grpid)c +(1)48 b(5)275 1391 y Fx(The)29 b(map)h(can)h(then)f(b)s(e)g(c)m(hanged) +h(to:)390 1527 y Fp(/defaults)188 b(type:=nfs;sublink:=${key};)o(opts)o +(:=r)o(w,in)o(tr,n)o(osu)o(id,g)o(rpid)390 1636 y(jsp)476 +b(rhost:=charm;rfs:=/home/ch)o(arm)390 1746 y(njw)g +(rhost:=dylan;rfs:=/home/dy)o(lan/)o(dk5)390 1855 y(...)390 +1965 y(phjk)428 b(rhost:=toytown;rfs:=/home/)o(toyt)o(own)o(;sub)o +(link)o(:=a)o(i/${)o(key})390 2074 y(sjv)476 b +(rhost:=ganymede;rfs:=/home)o(/gan)o(yme)o(de)275 2210 +y Fx(This)31 b(map)i(op)s(erates)g(as)g(usual)f(on)g(a)h(remote)h(mac)m +(hine)f(\()p Ft(ie)40 b Fp(${host})30 b Fx(not)j(equal)g(to)h +Fp(${rhost})p Fx(\).)150 2320 y(On)e(the)h(mac)m(hine)h(where)e(the)h +(\014lesystem)h(is)f(stored)g(\()p Ft(ie)39 b Fp(${host})31 +b Fx(equal)j(to)f Fp(${rhost})p Fx(\),)f Ft(A)n(md)43 +b Fx(will)150 2430 y(construct)i(a)g(lo)s(cal)g(\014lesystem)g(moun)m +(t)f(p)s(oin)m(t)h(whic)m(h)f(corresp)s(onds)f(to)i(the)g(name)f(of)h +(the)f(lo)s(cally)150 2539 y(moun)m(ted)33 b(UFS)h(partition.)50 +b(If)33 b Ft(A)n(md)43 b Fx(is)33 b(started)h(with)f(the)h +Fp(-r)e Fx(option)i(then)f(instead)h(of)g(attempting)150 +2649 y(an)42 b(NFS)g(moun)m(t,)k Ft(A)n(md)52 b Fx(will)42 +b(simply)g(inherit)g(the)h(UFS)f(moun)m(t)g(\(see)i(Section)f(5.25)h +([Inheritance)150 2758 y(Filesystem],)39 b(page)d(56\).)58 +b(If)36 b Fp(-r)f Fx(is)g(not)h(used)f(then)h(a)g(lo)s(opbac)m(k)g(NFS) +g(moun)m(t)g(will)g(b)s(e)f(made.)57 b(This)150 2868 +y(t)m(yp)s(e)31 b(of)f(moun)m(t)g(is)h(kno)m(wn)f(to)h(cause)g(a)g +(deadlo)s(c)m(k)g(on)f(man)m(y)h(systems.)150 3103 y +Fw(11.3)68 b(Arc)l(hitecture)46 b(Sharing)150 3262 y +Fx(Often)41 b(a)g(\014lesystem)h(will)f(b)s(e)g(shared)f(b)m(y)h(mac)m +(hines)h(of)f(di\013eren)m(t)h(arc)m(hitectures.)75 b(Separate)41 +b(trees)150 3372 y(can)g(b)s(e)f(main)m(tained)i(for)f(the)g +(executable)h(images)g(for)e(eac)m(h)i(arc)m(hitecture,)k(but)40 +b(it)h(ma)m(y)h(b)s(e)e(more)150 3481 y(con)m(v)m(enien)m(t)32 +b(to)g(ha)m(v)m(e)f(a)g(shared)f(tree,)h(with)f(distinct)h(sub)s +(directories.)275 3617 y(A)k(shared)f(tree)i(migh)m(t)f(ha)m(v)m(e)i +(the)e(follo)m(wing)h(structure)f(on)g(the)g(\014leserv)m(er)g +(\(called)i(`)p Fp(fserver)p Fx(')c(in)150 3727 y(the)e(example\):)390 +3863 y Fp(local/tex)390 3972 y(local/tex/fonts)390 4082 +y(local/tex/lib)390 4191 y(local/tex/bin)390 4301 y(local/tex/bin/sun3) +390 4411 y(local/tex/bin/sun4)390 4520 y(local/tex/bin/hp9000)390 +4630 y(...)275 4766 y Fx(In)d(this)h(example,)h(the)f(sub)s +(directories)g(of)g(`)p Fp(local/tex/bin)p Fx(')d(should)i(b)s(e)g +(hidden)g(when)g(accessed)150 4875 y(via)34 b(the)g(automoun)m(t)h(p)s +(oin)m(t)f(\(con)m(v)m(en)m(tionally)j(`)p Fp(/vol)p +Fx('\).)51 b(A)34 b(moun)m(t-map)g(for)f(`)p Fp(/vol)p +Fx(')g(to)i(ac)m(hiev)m(e)h(this)150 4985 y(w)m(ould)30 +b(lo)s(ok)h(lik)m(e:)390 5121 y Fp(/defaults)141 b +(sublink:=${/key};rhost:)o(=fse)o(rver)o(;ty)o(pe:=)o(link)390 +5230 y(tex)429 b(type:=auto;fs:=${map};p)o(ref:)o(=${k)o(ey})o(/)390 +5340 y(tex/fonts)141 b(host!=fserver;type:=nfs)o(;rfs)o(:=/v)o(ol/)o +(tex)41 b(\\)p eop end +%%Page: 110 112 +TeXDict begin 110 111 bop 150 -116 a Fx(110)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))963 299 y Fp +(host==fserver;fs:=/usr/)o(loca)o(l/te)o(x)390 408 y(tex/lib)237 +b(host!=fserver;type:=nfs)o(;rfs)o(:=/v)o(ol/)o(tex)41 +b(\\)963 518 y(host==fserver;fs:=/usr/)o(loca)o(l/te)o(x)390 +628 y(tex/bin)237 b(-sublink:=${/key}/${arc)o(h})42 b(\\)963 +737 y(host!=fserver;type:=nfs)o(;rfs)o(:=/v)o(ol/)o(tex)f(\\)963 +847 y(host:=fserver;fs:=/usr/)o(loca)o(l/te)o(x)275 991 +y Fx(When)34 b(`)p Fp(/vol/tex/bin)p Fx(')e(is)j(referenced,)h(the)f +(curren)m(t)g(mac)m(hine)h(arc)m(hitecture)g(is)f(automatically)150 +1100 y(app)s(ended)48 b(to)i(the)f(path)g(b)m(y)g(the)h +Fp(${sublink})d Fx(v)-5 b(ariable.)98 b(This)48 b(means)i(that)g(users) +e(can)i(ha)m(v)m(e)150 1210 y(`)p Fp(/vol/tex/bin)p Fx(')28 +b(in)i(their)g(`)p Fp(PATH)p Fx(')g(without)g(concern)h(for)f(arc)m +(hitecture)i(dep)s(endencies.)150 1457 y Fw(11.4)68 b(Wildcard)45 +b(Names)h(&)f(Replicated)h(Serv)l(ers)150 1616 y Fx(By)22 +b(using)g(the)g(wildcard)g(facilit)m(y)-8 b(,)26 b Ft(A)n(md)31 +b Fx(can)23 b Fo(o)m(v)m(erla)m(y)32 b Fx(an)22 b(existing)h(directory) +f(with)g(additional)h(en)m(tries.)150 1726 y(The)30 b(system)i(\014les) +e(are)i(usually)e(moun)m(ted)h(under)f(`)p Fp(/usr)p +Fx('.)41 b(If)31 b(instead,)g Ft(A)n(md)41 b Fx(is)31 +b(moun)m(ted)g(on)f(`)p Fp(/usr)p Fx(',)150 1835 y(additional)h(names)f +(can)g(b)s(e)f(o)m(v)m(erla)m(y)m(ed)k(to)e(augmen)m(t)g(or)f(replace)h +(names)f(in)f(the)i(\\master")g(`)p Fp(/usr)p Fx('.)40 +b(A)150 1945 y(map)30 b(to)h(do)f(this)h(w)m(ould)f(ha)m(v)m(e)h(the)g +(form:)390 2089 y Fp(local)94 b(type:=auto;fs:=local-map)390 +2198 y(share)g(type:=auto;fs:=share-map)390 2308 y(*)286 +b(-type:=nfs;rfs:=/export/e)o(xec)o(/${a)o(rch})o(;su)o(blin)o(k:=")o +(${k)o(ey}")41 b(\\)772 2418 y(rhost:=fserv1)92 b(rhost:=fserv2)g +(rhost:=fserv3)275 2562 y Fx(Note)43 b(that)f(the)g(assignmen)m(t)g(to) +h Fp(${sublink})c Fx(is)j(surrounded)d(b)m(y)i(double)h(quotes)g(to)g +(prev)m(en)m(t)150 2671 y(the)35 b(incoming)h(k)m(ey)f(from)g(causing)g +(the)g(map)g(to)g(b)s(e)f(misin)m(terpreted.)55 b(This)34 +b(map)h(has)f(the)h(e\013ect)i(of)150 2781 y(directing)31 +b(an)m(y)g(access)g(to)h(`)p Fp(/usr/local)p Fx(')c(or)i(`)p +Fp(/usr/share)p Fx(')e(to)j(another)g(automoun)m(t)g(p)s(oin)m(t.)275 +2925 y(In)71 b(this)g(example,)83 b(it)73 b(is)f(assumed)f(that)h(the)g +(`)p Fp(/usr)p Fx(')f(\014les)h(are)g(replicated)h(on)f(three)150 +3034 y(\014leserv)m(ers:)145 b(`)p Fp(fserv1)p Fx(',)95 +b(`)p Fp(fserv2)p Fx(')81 b(and)h(`)p Fp(fserv3)p Fx('.)196 +b(F)-8 b(or)83 b(an)m(y)g(references)f(other)h(than)150 +3144 y(to)i(`)p Fp(local)p Fx(')f(and)g(`)p Fp(share)p +Fx(')g(one)g(of)h(the)g(serv)m(ers)g(is)f(used)g(and)g(a)h(sym)m(b)s +(olic)g(link)f(to)150 3254 y Fp(${autodir}/${rhost}/expo)o(rt/e)o(xec/) +o(${a)o(rch})o(/)p Fk(wha)o(tev)o(er)153 b Fx(is)159 +b(returned)f(once)i(an)150 3363 y(appropriate)30 b(\014lesystem)h(has)f +(b)s(een)g(moun)m(ted.)150 3610 y Fw(11.5)68 b(`)p Fi(rwho)p +Fw(')44 b(serv)l(ers)150 3769 y Fx(The)e(`)p Fp(/usr/spool/rwho)p +Fx(')d(directory)j(is)h(a)g(go)s(o)s(d)f(candidate)h(for)f(automoun)m +(ting.)78 b(F)-8 b(or)43 b(e\016ciency)150 3879 y(reasons)29 +b(it)f(is)h(b)s(est)f(to)h(capture)g(the)f(rwho)g(data)h(on)f(a)h +(small)g(n)m(um)m(b)s(er)e(of)i(mac)m(hines)g(and)f(then)g(moun)m(t)150 +3988 y(that)e(information)h(on)m(to)g(a)f(large)h(n)m(um)m(b)s(er)d(of) +i(clien)m(ts.)41 b(The)25 b(data)i(written)f(in)m(to)h(the)f(rwho)f +(\014les)g(is)h(b)m(yte)150 4098 y(order)k(dep)s(enden)m(t)f(so)i(only) +f(serv)m(ers)h(with)f(the)h(correct)g(b)m(yte)g(ordering)f(can)h(b)s(e) +f(used)f(b)m(y)h(a)h(clien)m(t:)390 4242 y Fp(/defaults)427 +b(type:=nfs)390 4352 y(usr/spool/rwho)187 b(-byte==little;rfs:=/usr/s)o +(poo)o(l/rw)o(ho)42 b(\\)1440 4461 y(rhost:=vaxA)92 b(rhost:=vaxB)45 +b(\\)1249 4571 y(||)i(-rfs:=/usr/spool/rwho)42 b(\\)1440 +4680 y(rhost:=sun4)92 b(rhost:=hp300)150 4927 y Fw(11.6)68 +b(`)p Fi(/vol)p Fw(')150 5086 y Fx(`)p Fp(/vol)p Fx(')30 +b(is)g(used)g(as)g(a)h(catc)m(h-all)i(for)d(v)m(olumes)h(whic)m(h)f(do) +h(not)f(ha)m(v)m(e)i(other)f(con)m(v)m(en)m(tional)i(names.)275 +5230 y(Belo)m(w)f(is)g(part)f(of)g(the)h(`)p Fp(/vol)p +Fx(')e(map)h(for)g(the)g(domain)g(`)p Fp(doc.ic.ac.uk)p +Fx('.)41 b(The)31 b(`)p Fp(r+d)p Fx(')g(tree)g(is)h(used)150 +5340 y(for)h(new)g(or)g(exp)s(erimen)m(tal)h(soft)m(w)m(are)g(that)g +(needs)f(to)h(b)s(e)f(a)m(v)-5 b(ailable)35 b(ev)m(erywhere)f(without)f +(installing)p eop end +%%Page: 111 113 +TeXDict begin 111 112 bop 150 -116 a Fx(Chapter)30 b(11:)41 +b(Examples)2571 b(111)150 299 y(it)41 b(on)f(all)i(the)e(\014leserv)m +(ers.)71 b(Users)41 b(wishing)f(to)h(try)f(out)h(the)f(new)g(soft)m(w)m +(are)i(then)e(simply)g(include)150 408 y(`)p Fp(/vol/r+d/{bin,ucb})p +Fx(')26 b(in)k(their)g(path.)275 605 y(The)66 b(main)i(tree)g(resides)f +(on)g(one)h(host)f(`)p Fp(gould.doc.ic.ac.uk)p Fx(',)72 +b(whic)m(h)67 b(has)g(di\013eren)m(t)150 714 y(`)p Fp(bin)p +Fx(',)80 b(`)p Fp(etc)p Fx(',)g(`)p Fp(lib)p Fx(')70 +b(and)g(`)p Fp(ucb)p Fx(')f(sub-directories)i(for)f(eac)m(h)h(mac)m +(hine)g(arc)m(hitecture.)162 b(F)-8 b(or)150 824 y(example,)51 +b(`)p Fp(/vol/r+d/bin)p Fx(')44 b(for)i(a)h(Sun-4)f(w)m(ould)g(b)s(e)g +(stored)h(in)f(the)h(sub-directory)f(`)p Fp(bin/sun4)p +Fx(')150 933 y(of)64 b(the)f(\014lesystem)h(`)p Fp(/usr/r+d)p +Fx('.)138 b(When)63 b(it)h(w)m(as)g(accessed)h(a)e(sym)m(b)s(olic)h +(link)g(p)s(oin)m(ting)f(to)150 1043 y(`)p Fp +(/a/gould/usr/r+d/bin/sun4)o Fx(')25 b(w)m(ould)30 b(b)s(e)g(returned.) +390 1239 y Fp(/defaults)188 b(type:=nfs;opts:=rw,grpid,n)o(osui)o(d,i)o +(ntr,)o(soft)390 1349 y(wp)524 b(-opts:=rw,grpid,nosuid;rho)o(st:=)o +(cha)o(rm)42 b(\\)1010 1458 y(host==charm;type:=link;fs:)o(=/us)o(r/l)o +(ocal)o(/wp)f(\\)1010 1568 y(host!=charm;type:=nfs;rfs:)o(=/vo)o(l/w)o +(p)390 1678 y(...)390 1787 y(#)390 1897 y(src)476 b +(-opts:=rw,grpid,nosuid;rho)o(st:=)o(cha)o(rm)42 b(\\)1010 +2006 y(host==charm;type:=link;fs:)o(=/us)o(r/s)o(rc)g(\\)1010 +2116 y(host!=charm;type:=nfs;rfs:)o(=/vo)o(l/s)o(rc)390 +2225 y(#)390 2335 y(r+d)476 b(type:=auto;fs:=${map};pref)o(:=r+)o(d/) +390 2445 y(#)47 b(per)g(architecture)e(bin,etc,lib&ucb...)390 +2554 y(r+d/bin)284 b(rhost:=gould.doc.ic.ac.uk;)o(rfs:)o(=/u)o(sr/r)o +(+d;s)o(ubl)o(ink:)o(=${/)o(key)o(}/${)o(arch)o(})p 4065 +2574 42 84 v 390 2664 a(r+d/etc)g(rhost:=gould.doc.ic.ac.uk;)o(rfs:)o +(=/u)o(sr/r)o(+d;s)o(ubl)o(ink:)o(=${/)o(key)o(}/${)o(arch)o(})p +4065 2684 V 390 2773 a(r+d/include)92 b(rhost:=gould.doc.ic.ac.uk;)o +(rfs:)o(=/u)o(sr/r)o(+d;s)o(ubl)o(ink:)o(=${/)o(key)o(})390 +2883 y(r+d/lib)284 b(rhost:=gould.doc.ic.ac.uk;)o(rfs:)o(=/u)o(sr/r)o +(+d;s)o(ubl)o(ink:)o(=${/)o(key)o(}/${)o(arch)o(})p 4065 +2903 V 390 2993 a(r+d/man)g(rhost:=gould.doc.ic.ac.uk;)o(rfs:)o(=/u)o +(sr/r)o(+d;s)o(ubl)o(ink:)o(=${/)o(key)o(})390 3102 y(r+d/src)g +(rhost:=gould.doc.ic.ac.uk;)o(rfs:)o(=/u)o(sr/r)o(+d;s)o(ubl)o(ink:)o +(=${/)o(key)o(})390 3212 y(r+d/ucb)g(rhost:=gould.doc.ic.ac.uk;)o(rfs:) +o(=/u)o(sr/r)o(+d;s)o(ubl)o(ink:)o(=${/)o(key)o(}/${)o(arch)o(})p +4065 3232 V 390 3321 a(#)47 b(hades)g(pictures)390 3431 +y(pictures)236 b(-opts:=rw,grpid,nosuid;rho)o(st:=)o(thp)o(fs)42 +b(\\)1010 3541 y(host==thpfs;type:=link;fs:)o(=/nb)o(sd/)o(pict)o(ures) +f(\\)1010 3650 y(host!=thpfs;type:=nfs;rfs:)o(=/nb)o(sd;)o(subl)o(ink:) +o(=pi)o(ctur)o(es)390 3760 y(#)47 b(hades)g(tools)390 +3869 y(hades)380 b(-opts:=rw,grpid,nosuid;rho)o(st:=)o(thp)o(fs)42 +b(\\)1010 3979 y(host==thpfs;type:=link;fs:)o(=/nb)o(sd/)o(hade)o(s)g +(\\)1010 4088 y(host!=thpfs;type:=nfs;rfs:)o(=/nb)o(sd;)o(subl)o(ink:)o +(=ha)o(des)390 4198 y(#)47 b(bsd)g(tools)g(for)g(hp.)390 +4308 y(bsd)476 b(-opts:=rw,grpid,nosuid;arc)o(h==h)o(p90)o(00;r)o(host) +o(:=t)o(hpfs)41 b(\\)1010 4417 y(host==thpfs;type:=link;fs:)o(=/nb)o +(sd/)o(bsd)g(\\)1010 4527 y(host!=thpfs;type:=nfs;rfs:)o(=/nb)o(sd;)o +(subl)o(ink:)o(=bs)o(d)150 4852 y Fw(11.7)68 b(`)p Fi(/defaults)p +Fw(')42 b(with)j(selectors)150 5011 y Fx(It)e(is)g(sometimes)i(useful)d +(to)i(ha)m(v)m(e)g(di\013eren)m(t)g(defaults)f(for)g(a)g(giv)m(en)i +(map.)78 b(T)-8 b(o)44 b(ac)m(hiev)m(e)h(this,)i(the)150 +5121 y(`)p Fp(/defaults)p Fx(')40 b(en)m(try)j(m)m(ust)f(b)s(e)g(able)h +(to)g(pro)s(cess)f(normal)h(selectors.)78 b(This)42 b(feature)g(is)h +(turned)e(on)150 5230 y(b)m(y)34 b(setting)i(`)p Fp +(selectors_in_defaults)25 b(=)30 b(yes)p Fx(')k(in)g(the)g +Fp(amd.conf)f Fx(\014le.)53 b(See)35 b(Section)g(6.4.8)h([selec-)150 +5340 y(tors)p 308 5340 28 4 v 40 w(in)p 424 5340 V 40 +w(defaults)30 b(P)m(arameter],)j(page)e(61.)p eop end +%%Page: 112 114 +TeXDict begin 112 113 bop 150 -116 a Fx(112)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 299 y(In)h(this)h +(example,)i(I)e(set)h(di\013eren)m(t)g(default)g(NFS)f(moun)m(t)h +(options)f(for)g(hosts)h(whic)m(h)f(are)h(running)150 +408 y(o)m(v)m(er)26 b(a)g(slo)m(w)m(er)g(net)m(w)m(ork)g(link.)39 +b(By)25 b(setting)h(a)g(smaller)f(size)h(for)f(the)g(NFS)g(read)g(and)g +(write)g(bu\013er)f(sizes,)150 518 y(y)m(ou)31 b(can)f(greatly)i(impro) +m(v)m(e)f(remote)h(\014le)e(service)h(p)s(erformance.)390 +650 y Fp(/defaults)45 b(\\)485 760 y(wire==slip-net;opts:=rw,in)o(tr,r) +o(siz)o(e=10)o(24,w)o(siz)o(e=10)o(24,t)o(ime)o(o=20)o(,ret)o(ran)o +(s=10)c(\\)p 3922 780 42 84 v 485 869 a(wire!=slip-net;opts:=rw,in)o +(tr)150 1097 y Fw(11.8)68 b(`)p Fi(/tftpboot)p Fw(')42 +b(in)i(a)i(c)l(hro)t(ot-ed)f(en)l(vironmen)l(t)150 1256 +y Fx(In)35 b(this)g(complex)h(example,)h(w)m(e)f(attempt)g(to)g(run)e +(an)h Ft(A)n(md)45 b Fx(pro)s(cess)34 b Ft(inside)43 +b Fx(a)35 b(c)m(hro)s(ot-ed)i(en)m(viron-)150 1366 y(men)m(t.)66 +b(`)p Fp(tftpd)p Fx(')37 b(\(T)-8 b(rivial)40 b(FTP\))f(is)f(used)g(to) +h(trivially)h(retriev)m(e)g(\014les)f(used)e(to)j(b)s(o)s(ot)e(X-T)-8 +b(erminals,)150 1476 y(Net)m(w)m(ork)35 b(Prin)m(ters,)g(Net)m(w)m(ork) +g(routers,)f(diskless)g(w)m(orkstations,)i(and)d(other)h(suc)m(h)f +(devices.)51 b(F)-8 b(or)34 b(se-)150 1585 y(curit)m(y)d(reasons,)f(`)p +Fp(tftpd)p Fx(')g(\(and)g(also)h(`)p Fp(ftpd)p Fx('\))f(pro)s(cesses)g +(are)h(run)e(using)h(the)g Fn(c)m(hro)s(ot)p Fx(\(2\))j(system)d(call.) +150 1695 y(This)41 b(pro)m(vides)i(an)f(en)m(vironmen)m(t)h(for)e +(these)i(pro)s(cesses,)i(where)d(access)i(to)f(an)m(y)f(\014les)g +(outside)h(the)150 1804 y(directory)31 b(where)f(the)g(c)m(hro)s(ot-ed) +i(pro)s(cess)e(runs)e(is)j(denied.)275 1937 y(F)-8 b(or)31 +b(example,)g(if)f(y)m(ou)h(start)g(`)p Fp(tftpd)p Fx(')e(on)i(y)m(our)f +(system)h(with)390 2069 y Fp(chroot)46 b(/tftpboot)f(/usr/sbin/tftpd) +150 2201 y Fx(then)24 b(the)g(`)p Fp(tftpd)p Fx(')g(pro)s(cess)f(will)i +(not)f(b)s(e)g(able)h(to)g(access)g(an)m(y)g(\014les)f(outside)g +Fp(/tftpboot)p Fx(.)36 b(This)24 b(ensures)150 2310 y(that)31 +b(no)f(one)h(can)g(retriev)m(e)g(\014les)g(suc)m(h)f(as)g +Fp(/etc/passwd)e Fx(and)h(run)g(passw)m(ord)h(crac)m(k)m(ers)i(on)e +(it.)275 2443 y(Since)i(the)g(TFTP)g(service)h(w)m(orks)f(b)m(y)h +(broadcast,)g(it)g(is)f(necessary)h(to)g(ha)m(v)m(e)g(at)g(least)h(one) +e(TFTP)150 2552 y(serv)m(er)38 b(running)e(on)i(eac)m(h)h(subnet.)62 +b(If)38 b(y)m(ou)g(ha)m(v)m(e)h(lots)g(of)f(\014les)g(that)g(y)m(ou)g +(need)g(to)h(mak)m(e)g(a)m(v)-5 b(ailable)150 2662 y(for)32 +b(`)p Fp(tftp)p Fx(',)f(and)g(man)m(y)h(subnets,)g(it)g(could)g(tak)m +(e)h(signi\014can)m(t)g(amoun)m(ts)f(of)g(disk)f(space)h(on)g(eac)m(h)h +(host)150 2771 y(serving)d(them.)275 2903 y(A)f(solution)h(w)m(e)g +(implemen)m(ted)g(at)g(Colum)m(bia)f(Univ)m(ersit)m(y)i(w)m(as)f(to)g +(ha)m(v)m(e)g(ev)m(ery)g(host)g(run)e(`)p Fp(tftpd)p +Fx(',)150 3013 y(but)i(ha)m(v)m(e)i(those)g(serv)m(ers)f(retriev)m(e)h +(the)f(b)s(o)s(ot)g(\014les)g(from)f(t)m(w)m(o)j(replicated)f(serv)m +(ers.)42 b(Those)31 b(replicated)150 3123 y(serv)m(ers)f(ha)m(v)m(e)i +(sp)s(ecial)f(partitions)g(dedicated)g(to)g(the)g(man)m(y)f(net)m(w)m +(ork)h(b)s(o)s(ot)g(\014les.)275 3255 y(W)-8 b(e)31 b(start)g +Ft(A)n(md)40 b Fx(as)30 b(follo)m(ws:)390 3387 y Fp(amd)47 +b(/tftpboot/.amd)d(amd.tftpboot)275 3519 y Fx(That)35 +b(is,)i Ft(A)n(md)45 b Fx(is)35 b(serving)h(the)g(directory)g +Fp(/tftpboot/.amd)p Fx(.)52 b(The)35 b(`)p Fp(tftp)p +Fx(')g(serv)m(er)g(runs)f(inside)150 3629 y Fp(/tftpboot)28 +b Fx(and)i(is)g(c)m(hro)s(ot-ed)h(in)f(that)h(directory)g(to)s(o.)42 +b(The)30 b Fp(amd.tftpboot)d Fx(map)j(lo)s(oks)g(lik)m(e:)390 +3761 y Fp(#)390 3870 y(#)47 b(Amd)g(/tftpboot)f(directory)f(->)i(host)g +(map)390 3980 y(#)390 4199 y(/defaults)93 b(opts:=nosuid,ro,intr,sof)o +(t;fs)o(:=/t)o(ftp)o(boot)o(/imp)o(ort)o(;typ)o(e:=n)o(fs)390 +4418 y(tp)429 b(host==lol;rfs:=/n/lol/im)o(port)o(/tft)o(pbo)o(ot;t)o +(ype:)o(=lo)o(fs)42 b(\\)915 4528 y(host==ober;rfs:=/n/ober/)o(misc)o +(/win)o(/tf)o(tpbo)o(ot;t)o(ype)o(:=lo)o(fs)g(\\)915 +4637 y(rhost:=ober;rfs:=/n/ober)o(/mis)o(c/wi)o(n/t)o(ftpb)o(oot)f(\\) +915 4747 y(rhost:=lol;rfs:=/n/lol/i)o(mpor)o(t/tf)o(tpb)o(oot)275 +4879 y Fx(T)-8 b(o)34 b(help)g(understand)e(this)j(example,)h(I)e(list) +h(a)f(few)g(of)h(the)f(\014le)g(en)m(tries)h(that)g(are)g(created)g +(inside)150 4989 y Fp(/tftpboot)p Fx(:)390 5121 y Fp($)47 +b(ls)h(-la)f(/tftpboot)390 5230 y(dr-xr-xr-x)140 b(2)48 +b(root)142 b(512)47 b(Aug)g(30)g(23:11)f(.amd)390 5340 +y(drwxrwsr-x)93 b(12)47 b(root)142 b(512)47 b(Aug)g(30)g(08:00)f +(import)p eop end +%%Page: 113 115 +TeXDict begin 113 114 bop 150 -116 a Fx(Chapter)30 b(11:)41 +b(Examples)2571 b(113)390 299 y Fp(lrwxrwxrwx)140 b(1)48 +b(root)190 b(33)47 b(Feb)g(27)95 b(1997)46 b(adminpr.cfg)f(->)i +(./.amd/tp/hplj/adminpr.cf)o(g)p 4208 319 42 84 v 390 +408 a(lrwxrwxrwx)140 b(1)48 b(root)190 b(22)47 b(Dec)95 +b(5)g(1996)46 b(tekxp)h(->)g(./.amd/tp/xterms/tekxp)390 +518 y(lrwxrwxrwx)140 b(1)48 b(root)237 b(1)48 b(Dec)95 +b(5)g(1996)46 b(tftpboot)g(->)h(.)275 653 y Fx(Here)30 +b(is)h(an)f(explanation)i(of)e(eac)m(h)i(of)e(the)h(en)m(tries)g +(listed)g(ab)s(o)m(v)m(e:)150 812 y Fp(.amd)288 b Fx(This)23 +b(is)g(the)h Ft(A)n(md)32 b Fx(moun)m(t)24 b(p)s(oin)m(t.)38 +b(Note)25 b(that)f(y)m(ou)g(do)f(not)h(need)f(to)h(run)e(a)i(separate)g +Ft(A)n(md)630 922 y Fx(pro)s(cess)30 b(for)h(the)f(TFTP)g(service.)43 +b(The)30 b Fn(c)m(hro)s(ot)p Fx(\(2\))j(system)e(call)g(only)g +(protects)h(against)630 1031 y(\014le)h(access,)i(but)e(the)g(same)h +(pro)s(cess)e(can)i(still)f(serv)m(e)h(\014les)f(and)g(directories)h +(inside)f(and)630 1141 y(outside)24 b(the)h(c)m(hro)s(ot-ed)g(en)m +(vironmen)m(t,)h(b)s(ecause)e Ft(A)n(md)33 b Fx(itself)25 +b(w)m(as)f(not)h(run)d(in)i(c)m(hro)s(ot-ed)630 1250 +y(mo)s(de.)150 1410 y Fp(import)192 b Fx(This)32 b(is)h(the)g(moun)m(t) +g(p)s(oin)m(t)g(where)g Ft(A)n(md)42 b Fx(will)33 b(moun)m(t)g(the)g +(directories)h(con)m(taining)h(the)630 1519 y(b)s(o)s(ot)25 +b(\014les.)39 b(The)25 b(map)g(is)h(designed)f(so)g(that)h(remote)h +(directories)f(will)g(b)s(e)f(NFS)g(moun)m(ted)630 1629 +y(\(ev)m(en)40 b(if)e(they)h(are)g(already)g(moun)m(ted)f(elsewhere\),) +k(and)c(lo)s(cal)i(directories)g(are)f(lo)s(op-)630 1738 +y(bac)m(k)c(moun)m(ted)g(\(since)g(they)g(are)g(not)f(accessible)j +(outside)d(the)h(c)m(hro)s(ot-ed)g Fp(/tftpboot)630 1848 +y Fx(directory\).)150 2007 y Fp(adminpr.cfg)150 2117 +y(tekxp)240 b Fx(Tw)m(o)38 b(man)m(ually)g(created)g(sym)m(b)s(olic)g +(links)f(to)h(directories)h Ft(inside)44 b Fx(the)38 +b Ft(A)n(md)p Fx(-managed)630 2227 y(directory)-8 b(.)41 +b(The)27 b(crossing)i(of)f(the)g(comp)s(onen)m(t)g Fp(tp)g +Fx(will)g(cause)h Ft(A)n(md)37 b Fx(to)29 b(automoun)m(t)g(one)630 +2336 y(of)36 b(the)h(remote)g(replicas.)59 b(Once)36 +b(crossed,)i(access)g(to)f(\014les)f(inside)g(pro)s(ceeds)g(as)g +(usual.)630 2446 y(The)c(`)p Fp(adminpr.cfg)p Fx(')f(is)i(a)g +(con\014guration)g(\014le)g(for)g(an)f(HP)h(Laser-Jet)h(4si)f(prin)m +(ter,)h(and)630 2555 y(the)d(`)p Fp(tekxp)p Fx(')e(is)h(a)h(directory)g +(for)f(T)-8 b(ektronix)31 b(X-T)-8 b(erminal)31 b(b)s(o)s(ot)f +(\014les.)150 2715 y Fp(tftpboot)96 b Fx(This)24 b(inno)s(cen)m(t)i(lo) +s(oking)g(symlink)f(is)g(imp)s(ortan)m(t.)39 b(Usually)-8 +b(,)28 b(when)c(devices)i(b)s(o)s(ot)f(via)h(the)630 +2824 y(TFTP)g(service,)j(they)e(p)s(erform)f(the)h(`)p +Fp(get)i(file)p Fx(')d(command)h(to)h(retriev)m(e)g Fo(\014le)p +Fx(.)40 b(Ho)m(w)m(ev)m(er,)630 2934 y(some)h(devices)g(assume)g(that)g +(`)p Fp(tftpd)p Fx(')f(do)s(es)g(not)h(run)e(in)h(a)i(c)m(hro)s(ot-ed)f +(en)m(vironmen)m(t,)630 3044 y(but)e(rather)g(\\unprotected",)j(and)d +(th)m(us)g(use)g(a)h(full)f(pathname)g(for)g(\014les)g(to)h(retriev)m +(e,)630 3153 y(as)i(in)f(`)p Fp(get)30 b(/tftpboot/file)p +Fx('.)71 b(This)41 b(symlink)g(e\013ectiv)m(ely)j(strips)d(out)h(the)g +(leading)630 3263 y Fp(/tftpboot/)p Fx(.)p eop end +%%Page: 114 116 +TeXDict begin 114 115 bop eop end +%%Page: 115 117 +TeXDict begin 115 116 bop 150 -116 a Fx(Chapter)30 b(12:)41 +b(In)m(ternals)2605 b(115)150 299 y Fu(12)80 b(In)l(ternals)150 +508 y Fx(Note)31 b(that)f(there)g(are)g(more)f(error)h(and)f(logging)i +(messages)f(p)s(ossible)g(than)f(are)h(listed)g(here.)40 +b(Most)31 b(of)150 618 y(them)f(are)h(self-explanatory)-8 +b(.)43 b(Refer)30 b(to)h(the)g(program)f(sources)g(for)g(more)h +(details)g(on)g(the)f(rest.)150 840 y Fw(12.1)68 b(Log)45 +b(Messages)150 999 y Fx(In)32 b(the)h(follo)m(wing)h(sections)g(a)f +(brief)f(explanation)i(is)f(giv)m(en)h(of)f(some)g(of)g(the)g(log)g +(messages)h(made)f(b)m(y)150 1109 y Ft(A)n(md)p Fx(.)59 +b(Where)37 b(the)g(message)g(is)g(in)f(`)p Fp(typewriter)p +Fx(')e(fon)m(t,)39 b(it)e(corresp)s(onds)f(exactly)i(to)f(the)g +(message)150 1219 y(pro)s(duced)22 b(b)m(y)i Ft(A)n(md)p +Fx(.)38 b(W)-8 b(ords)24 b(in)g Fo(italic)31 b Fx(are)24 +b(replaced)g(b)m(y)g(an)f(appropriate)h(string.)39 b(V)-8 +b(ariables,)26 b Fp(${)p Fk(var)p Fp(})p Fx(,)150 1328 +y(indicate)31 b(that)g(the)g(v)-5 b(alue)31 b(of)f(the)h(appropriate)f +(v)-5 b(ariable)31 b(is)g(output.)275 1458 y(Log)36 b(messages)h(are)f +(either)g(sen)m(t)h(directly)f(to)h(a)f(\014le,)i(or)e(logged)h(via)g +(the)f Fn(syslog)p Fx(\(3\))h(mec)m(hanism.)150 1567 +y(See)30 b(Section)h(6.5.23)i([log)p 1038 1567 28 4 v +41 w(\014le)d(P)m(arameter],)i(page)f(65.)41 b(In)30 +b(either)g(case,)i(en)m(tries)f(in)f(the)g(\014le)g(are)g(of)h(the)150 +1677 y(form:)390 1806 y Fk(date-string)92 b(hostname)46 +b Fp(amd[)p Fk(pid)p Fp(])93 b Fk(message)150 1995 y +Fm(12.1.1)63 b(F)-10 b(atal)40 b(errors)150 2142 y Ft(A)n(md)34 +b Fx(attempts)25 b(to)g(deal)g(with)f(un)m(usual)g(ev)m(en)m(ts.)40 +b(Whenev)m(er)25 b(it)g(is)f(not)h(p)s(ossible)f(to)h(deal)g(with)f +(suc)m(h)g(an)150 2252 y(error,)33 b Ft(A)n(md)42 b Fx(will)32 +b(log)i(an)e(appropriate)g(message)i(and,)f(if)f(it)h(cannot)g(p)s +(ossibly)e(con)m(tin)m(ue,)k(will)d(either)150 2362 y(exit)42 +b(or)f(ab)s(ort.)72 b(These)41 b(messages)h(are)f(selected)h(b)m(y)f(`) +p Fp(-x)30 b(fatal)p Fx(')40 b(on)h(the)g(command)f(line.)73 +b(When)150 2471 y Fn(syslog)p Fx(\(3\))34 b(is)f(b)s(eing)f(used,)g +(they)g(are)h(logged)h(with)e(lev)m(el)i(`)p Fp(LOG_FATAL)p +Fx('.)44 b(Ev)m(en)33 b(if)f Ft(A)n(md)42 b Fx(con)m(tin)m(ues)33 +b(to)150 2581 y(op)s(erate)j(it)f(is)g(lik)m(ely)h(to)g(remain)f(in)f +(a)i(precarious)f(state)h(and)e(should)g(b)s(e)g(restarted)i(at)f(the)g +(earliest)150 2690 y(opp)s(ortunit)m(y)-8 b(.)150 2840 +y Fp(Attempting)45 b(to)i(inherit)f(not-a-filesystem)630 +2949 y Fx(The)29 b(protot)m(yp)s(e)h(moun)m(t)g(p)s(oin)m(t)f(created)i +(during)d(a)i(\014lesystem)g(restart)g(did)f(not)h(con)m(tain)630 +3059 y(a)h(reference)g(to)g(the)f(restarted)h(\014lesystem.)41 +b(This)30 b(error)g(\\should)g(nev)m(er)g(happ)s(en".)150 +3208 y Fp(Can't)46 b(bind)h(to)g(domain)f(")p Fk(NIS-domain)p +Fp(")630 3318 y Fx(A)35 b(sp)s(eci\014c)g(NIS)f(domain)g(w)m(as)i +(requested)e(on)h(the)g(command)g(line,)h(but)e(no)h(serv)m(er)g(for) +630 3427 y(that)c(domain)f(is)h(a)m(v)-5 b(ailable)32 +b(on)f(the)f(lo)s(cal)i(net.)150 3577 y Fp(Can't)46 b(determine)g(IP)h +(address)f(of)h(this)f(host)h(\()p Fk(hostname)p Fp(\))630 +3686 y Fx(When)36 b Ft(A)n(md)46 b Fx(starts)37 b(it)g(determines)f +(its)h(o)m(wn)f(IP)g(address.)58 b(If)36 b(this)g(lo)s(okup)g(fails)h +(then)630 3796 y Ft(A)n(md)k Fx(cannot)32 b(con)m(tin)m(ue.)46 +b(The)32 b(hostname)f(it)i(lo)s(oks)f(up)e(is)i(that)g(obtained)h +(returned)d(b)m(y)630 3906 y Fn(gethostname)p Fx(\(2\))j(system)e +(call.)150 4055 y Fp(Can't)46 b(find)h(root)g(file)f(handle)g(for)h +Fk(automount)f(point)630 4165 y Ft(A)n(md)g Fx(creates)38 +b(its)f(o)m(wn)f(\014le)h(handles)f(for)g(the)h(automoun)m(t)g(p)s(oin) +m(ts.)59 b(When)36 b(it)h(moun)m(ts)630 4274 y(itself)43 +b(as)f(a)g(serv)m(er,)j(it)e(m)m(ust)f(pass)f(these)h(\014le)g(handles) +g(to)g(the)g(lo)s(cal)i(k)m(ernel.)75 b(If)42 b(the)630 +4384 y(\014lehandle)g(is)g(not)g(obtainable)h(the)f(moun)m(t)g(p)s(oin) +m(t)g(is)f(ignored.)76 b(This)41 b(error)g(\\should)630 +4493 y(nev)m(er)31 b(happ)s(en".)150 4643 y Fp(Must)47 +b(be)g(root)f(to)i(mount)e(filesystems)f(\(euid)h(=)i +Fk(euid)p Fp(\))630 4752 y Fx(T)-8 b(o)36 b(prev)m(en)m(t)h(em)m +(barrassmen)m(t,)h Ft(A)n(md)45 b Fx(mak)m(es)36 b(sure)f(it)i(has)e +(appropriate)h(system)g(privi-)630 4862 y(leges.)42 b(This)29 +b(amoun)m(ts)h(to)h(ha)m(ving)f(an)g(euid)f(of)h(0.)41 +b(The)30 b(c)m(hec)m(k)h(is)f(made)g(after)g(argumen)m(t)630 +4971 y(pro)s(cessing)g(complete)i(to)f(giv)m(e)h(non-ro)s(ot)e(users)g +(a)h(c)m(hance)g(to)g(access)h(the)f Fp(-v)e Fx(option.)150 +5121 y Fp(No)47 b(work)g(to)g(do)g(-)h(quitting)630 5230 +y Fx(No)31 b(automoun)m(t)f(p)s(oin)m(ts)g(w)m(ere)g(giv)m(en)h(on)f +(the)g(command)g(line)g(and)g(so)g(there)g(is)g(no)g(w)m(ork)630 +5340 y(to)h(do.)p eop end +%%Page: 116 118 +TeXDict begin 116 117 bop 150 -116 a Fx(116)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fp(Out)47 +b(of)g(memory)630 408 y Fx(While)28 b(attempting)g(to)g(mallo)s(c)g +(some)g(memory)-8 b(,)28 b(the)g(memory)f(space)h(a)m(v)-5 +b(ailable)29 b(to)f Ft(A)n(md)630 518 y Fx(w)m(as)j(exhausted.)40 +b(This)30 b(is)g(an)h(unreco)m(v)m(erable)g(error.)150 +682 y Fp(Out)47 b(of)g(memory)f(in)h(realloc)630 792 +y Fx(While)28 b(attempting)g(to)g(reallo)s(c)h(some)e(memory)-8 +b(,)29 b(the)e(memory)g(space)h(a)m(v)-5 b(ailable)29 +b(to)f Ft(A)n(md)630 901 y Fx(w)m(as)j(exhausted.)40 +b(This)30 b(is)g(an)h(unreco)m(v)m(erable)g(error.)150 +1066 y Fp(cannot)46 b(create)g(rpc/udp)g(service)630 +1175 y Fx(Either)30 b(the)h(NFS)f(or)h(AMQ)f(endp)s(oin)m(t)g(could)g +(not)h(b)s(e)f(created.)150 1340 y Fp(gethostname:)44 +b Fk(description)630 1449 y Fx(The)30 b Fn(gethostname)p +Fx(\(2\))j(system)d(call)i(failed)f(during)e(startup.)150 +1613 y Fp(host)47 b(name)f(is)h(not)g(set)630 1723 y +Fx(The)36 b Fn(gethostname)p Fx(\(2\))j(system)e(call)h(returned)d(a)i +(zero)h(length)f(host)f(name.)60 b(This)36 b(can)630 +1833 y(happ)s(en)29 b(if)h Ft(A)n(md)40 b Fx(is)30 b(started)h(in)f +(single)h(user)f(mo)s(de)g(just)g(after)g(b)s(o)s(oting)h(the)f +(system.)150 1997 y Fp(ifs_match)45 b(called!)630 2106 +y Fx(An)22 b(in)m(ternal)h(error)f(o)s(ccurred)g(while)g(restarting)h +(a)g(pre-moun)m(ted)f(\014lesystem.)39 b(This)21 b(error)630 +2216 y(\\should)30 b(nev)m(er)h(happ)s(en".)150 2380 +y Fp(mount_afs:)45 b Fk(description)630 2490 y Fx(An)30 +b(error)g(o)s(ccurred)g(while)g Ft(A)n(md)40 b Fx(w)m(as)31 +b(moun)m(ting)f(itself.)150 2654 y Fp(run_rpc)46 b(failed)630 +2764 y Fx(Someho)m(w)31 b(the)f(main)g(NFS)h(serv)m(er)f(lo)s(op)h +(failed.)41 b(This)30 b(error)g(\\should)g(nev)m(er)g(happ)s(en".)150 +2928 y Fp(unable)46 b(to)h(free)g(rpc)g(arguments)e(in)i(amqprog_1)630 +3037 y Fx(The)30 b(incoming)h(argumen)m(ts)f(to)i(the)e(AMQ)h(serv)m +(er)f(could)h(not)f(b)s(e)g(free'ed.)150 3202 y Fp(unable)46 +b(to)h(free)g(rpc)g(arguments)e(in)i(nfs_program_1)630 +3311 y Fx(The)30 b(incoming)h(argumen)m(ts)f(to)i(the)e(NFS)g(serv)m +(er)h(could)g(not)f(b)s(e)g(free'ed.)150 3475 y Fp(unable)46 +b(to)h(register)f(\(AMQ_PROGRAM,)e(AMQ_VERSION,)g(udp\))630 +3585 y Fx(The)f(AMQ)h(serv)m(er)f(could)h(not)g(b)s(e)f(registered)h +(with)f(the)h(lo)s(cal)h(p)s(ortmapp)s(er)c(or)j(the)630 +3695 y(in)m(ternal)31 b(RPC)f(dispatc)m(her.)150 3859 +y Fp(unable)46 b(to)h(register)f(\(NFS_PROGRAM,)e(NFS_VERSION,)g(0\)) +630 3968 y Fx(The)30 b(NFS)g(serv)m(er)h(could)f(not)h(b)s(e)f +(registered)h(with)f(the)g(in)m(ternal)i(RPC)d(dispatc)m(her.)275 +4135 y(XXX:)i(This)e(section)j(needs)e(to)h(b)s(e)f(up)s(dated)150 +4339 y Fm(12.1.2)63 b(Info)42 b(messages)150 4486 y Ft(A)n(md)e +Fx(generates)32 b(information)f(messages)h(to)f(record)g(state)h(c)m +(hanges.)42 b(These)31 b(messages)g(are)g(selected)150 +4596 y(b)m(y)25 b(`)p Fp(-x)31 b(info)p Fx(')24 b(on)i(the)f(command)h +(line.)39 b(When)26 b Fn(syslog)p Fx(\(3\))h(is)f(b)s(eing)f(used,)h +(they)g(are)g(logged)h(with)e(lev)m(el)150 4705 y(`)p +Fp(LOG_INFO)p Fx('.)275 4845 y(The)j(messages)j(listed)e(b)s(elo)m(w)h +(can)f(b)s(e)g(generated)h(and)f(are)h(in)f(a)g(format)h(suitable)g +(for)f(simple)g(sta-)150 4954 y(tistical)e(analysis.)40 +b Fo(moun)m(t-info)30 b Fx(is)25 b(the)h(string)f(that)h(is)f(displa)m +(y)m(ed)h(b)m(y)f Fo(Amq)j Fx(in)d(its)g(moun)m(t)h(information)150 +5064 y(column)k(and)g(placed)h(in)f(the)g(system)h(moun)m(t)f(table.) +150 5230 y Fp("${)p Fk(path)p Fp(}")45 b(forcibly)h(timed)g(out)630 +5340 y Fx(An)30 b(automoun)m(t)h(p)s(oin)m(t)f(has)h(b)s(een)e(timed)i +(out)f(b)m(y)h(the)f Ft(A)n(mq)38 b Fx(command.)p eop +end +%%Page: 117 119 +TeXDict begin 117 118 bop 150 -116 a Fx(Chapter)30 b(12:)41 +b(In)m(ternals)2605 b(117)150 299 y Fp("${)p Fk(path)p +Fp(}")45 b(has)i(timed)g(out)630 408 y Fx(No)31 b(access)h(to)f(the)f +(automoun)m(t)h(p)s(oin)m(t)g(has)f(b)s(een)g(made)g(within)g(the)g +(timeout)i(p)s(erio)s(d.)150 568 y Fp(Filehandle)45 b(denied)h(for)h +("${)p Fk(rhost)p Fp(}:${)p Fk(rfs)p Fp(}")630 677 y +Fx(The)28 b(moun)m(t)h(daemon)f(refused)g(to)h(return)e(a)i(\014le)g +(handle)f(for)g(the)h(requested)f(\014lesystem.)150 837 +y Fp(Filehandle)45 b(error)h(for)h("${)p Fk(rhost)p Fp(}:${)p +Fk(rfs)p Fp(}":)c Fk(description)630 946 y Fx(The)30 +b(moun)m(t)g(daemon)h(ga)m(v)m(e)h(some)f(other)g(error)f(for)g(the)g +(requested)h(\014lesystem.)150 1106 y Fp(Finishing)45 +b(with)i(status)f Fk(exit-status)630 1215 y Ft(A)n(md)40 +b Fx(is)30 b(ab)s(out)g(to)h(exit)h(with)e(the)g(giv)m(en)i(exit)f +(status.)150 1375 y Fp(Re-synchronizing)43 b(cache)k(for)g(map)g(${)p +Fk(map)p Fp(})630 1484 y Fx(The)73 b(named)f(map)h(has)g(b)s(een)f(mo)s +(di\014ed)g(and)g(the)i(in)m(ternal)g(cac)m(he)g(is)f(b)s(eing)630 +1594 y(re-sync)m(hronized.)150 1753 y Fp(file)47 b(server)f(${)p +Fk(rhost)p Fp(})f(is)i(down)g(-)h(timeout)d(of)j("${)p +Fk(path)p Fp(}")d(ignored)630 1863 y Fx(An)30 b(automoun)m(t)h(p)s(oin) +m(t)f(has)g(timed)g(out,)h(but)f(the)g(corresp)s(onding)f(\014le)i +(serv)m(er)f(is)g(kno)m(wn)630 1973 y(to)25 b(b)s(e)f(do)m(wn.)39 +b(This)23 b(message)j(is)f(only)f(pro)s(duced)f(once)j(for)e(eac)m(h)i +(moun)m(t)e(p)s(oin)m(t)h(for)f(whic)m(h)630 2082 y(the)31 +b(serv)m(er)f(is)h(do)m(wn.)150 2242 y Fp(file)47 b(server)f(${)p +Fk(rhost)p Fp(})f(type)i(nfs)g(is)g(down)630 2351 y Fx(An)30 +b(NFS)g(\014le)h(serv)m(er)f(that)h(w)m(as)g(previously)f(up)g(is)g(no) +m(w)g(do)m(wn.)150 2511 y Fp(file)47 b(server)f(${)p +Fk(rhost)p Fp(})f(type)i(nfs)g(is)g(up)630 2620 y Fx(An)30 +b(NFS)g(\014le)h(serv)m(er)f(that)h(w)m(as)g(previously)f(do)m(wn)g(is) +h(no)m(w)f(up.)150 2780 y Fp(file)47 b(server)f(${)p +Fk(rhost)p Fp(})f(type)i(nfs)g(starts)f(down)630 2889 +y Fx(A)30 b(new)g(NFS)h(\014le)f(serv)m(er)h(has)f(b)s(een)g +(referenced)g(and)g(is)g(kno)m(wn)g(to)h(b)s(e)f(do)m(wn.)150 +3049 y Fp(file)47 b(server)f(${)p Fk(rhost)p Fp(})f(type)i(nfs)g +(starts)f(up)630 3158 y Fx(A)30 b(new)g(NFS)h(\014le)f(serv)m(er)h(has) +f(b)s(een)g(referenced)g(and)g(is)g(kno)m(wn)g(to)h(b)s(e)f(up.)150 +3318 y Fp(mount)46 b(of)i("${)p Fk(path)p Fp(}")d(on)i(${)p +Fk(fs)p Fp(})f(timed)h(out)630 3427 y Fx(A)m(ttempts)36 +b(to)g(moun)m(t)f(a)h(\014lesystem)f(for)g(the)h(giv)m(en)g(automoun)m +(t)g(p)s(oin)m(t)f(ha)m(v)m(e)h(failed)g(to)630 3537 +y(complete)c(within)e(30)h(seconds.)150 3696 y Fk(mount-info)45 +b Fp(mounted)h(fstype)g(${)p Fk(type)p Fp(})g(on)h(${)p +Fk(fs)p Fp(})630 3806 y Fx(A)30 b(new)g(\014le)h(system)f(has)g(b)s +(een)g(moun)m(ted.)150 3965 y Fk(mount-info)45 b Fp(restarted)g(fstype) +h(${)p Fk(type)p Fp(})g(on)h(${)p Fk(fs)p Fp(})630 4075 +y Ft(A)n(md)40 b Fx(is)30 b(using)g(a)h(pre-moun)m(ted)f(\014lesystem)h +(to)g(satisfy)g(a)f(moun)m(t)h(request.)150 4234 y Fk(mount-info)45 +b Fp(unmounted)g(fstype)h(${)p Fk(type)p Fp(})g(from)h(${)p +Fk(fs)p Fp(})630 4344 y Fx(A)30 b(\014le)h(system)f(has)h(b)s(een)e +(unmoun)m(ted.)150 4503 y Fk(mount-info)45 b Fp(unmounted)g(fstype)h +(${)p Fk(type)p Fp(})g(from)h(${)p Fk(fs)p Fp(})f(link)h(${)p +Fk(fs)p Fp(}/${)p Fk(sublink)p Fp(})630 4613 y Fx(A)30 +b(\014le)h(system)f(of)h(whic)m(h)f(only)h(a)f(sub-directory)g(w)m(as)h +(in)f(use)g(has)g(b)s(een)g(unmoun)m(ted.)150 4772 y +Fp(restarting)45 b Fk(mount-info)g Fp(on)i(${)p Fk(fs)p +Fp(})630 4882 y Fx(A)30 b(pre-moun)m(ted)h(\014le)f(system)h(has)f(b)s +(een)f(noted.)275 5041 y(XXX:)i(This)e(section)j(needs)e(to)h(b)s(e)f +(up)s(dated)p eop end +%%Page: 118 120 +TeXDict begin 118 119 bop eop end +%%Page: 119 121 +TeXDict begin 119 120 bop 150 -116 a Fx(Ac)m(kno)m(wledgmen)m(ts)32 +b(&)e(T)-8 b(rademarks)2152 b(119)150 299 y Fu(Ac)l(kno)l(wledgmen)l +(ts)49 b(&)k(T)-13 b(rademarks)150 533 y Fx(Man)m(y)35 +b(thanks)f(to)g(the)h(Am-Utils)g(Users)f(mailing)h(list)g(through)e +(the)i(mon)m(ths)f(dev)m(eloping)h(am-utils.)150 643 +y(These)h(mem)m(b)s(ers)f(ha)m(v)m(e)j(con)m(tributed)e(to)h(the)f +(discussions,)i(ideas,)g(co)s(de)e(and)g(do)s(cumen)m(tation,)j(and)150 +752 y(sub)5 b(jected)26 b(their)h(systems)g(to)g(alpha)g(qualit)m(y)h +(co)s(de.)39 b(Sp)s(ecial)27 b(thanks)f(go)i(to)f(those)g(authors)g(\() +p Fp(http://)150 862 y(www)12 b(.)d(am-utils)j(.)d(org)j(/)d(docs)j(/)c +(am-u)o(til)o(s)k(/)d(A)o(UTHO)o(RS)j(.)c(txt)p Fx(\))39 +b(who)44 b(ha)m(v)m(e)i(submitted)e(patc)m(hes,)50 b(and)150 +971 y(esp)s(ecially)32 b(to)f(the)f(main)m(tainers:)225 +1106 y Fv(\017)60 b Fx(Erez)31 b(Zadok)f(\()p Fp +(http://www.cs.sunysb.edu/)o(~ezk)o Fx(\))225 1240 y +Fv(\017)60 b Fx(Ion)30 b(Badulescu)h(\()p Fp(ionut)e(AT)h(badula.org)p +Fx(\))225 1375 y Fv(\017)60 b Fx(Rainer)30 b(Orth)g(\()p +Fp(ro)g(AT)g(techfak.uni-bielefeld.de)o Fx(\))225 1509 +y Fv(\017)60 b Fx(Nic)m(k)32 b(Williams)f(\()p Fp(nick.williams)d(AT)h +(morganstanley.com)p Fx(\))275 1669 y(Thanks)i(to)i(the)f(F)-8 +b(ormal)34 b(Metho)s(ds)e(Group)g(at)h(Imp)s(erial)f(College)i(for)e +(su\013ering)g(patien)m(tly)i(while)150 1778 y Ft(A)n(md)40 +b Fx(w)m(as)31 b(b)s(eing)e(dev)m(elop)s(ed)i(on)f(their)h(mac)m +(hines.)275 1913 y(Thanks)h(to)i(the)g(man)m(y)f(p)s(eople)h(who)f(ha)m +(v)m(e)h(help)s(ed)f(with)g(the)h(dev)m(elopmen)m(t)h(of)e +Ft(A)n(md)p Fx(,)i(esp)s(ecially)150 2022 y(Piete)h(Bro)s(oks)e(at)h +(the)g(Cam)m(bridge)f(Univ)m(ersit)m(y)i(Computing)d(Lab)h(for)g(man)m +(y)h(hours)e(of)i(testing,)h(ex-)150 2132 y(p)s(erimen)m(tation)31 +b(and)f(discussion.)275 2267 y(Thanks)22 b(to)i(the)f(older)g(Amd)g(W) +-8 b(ork)m(ers)24 b(\()p Fp(amd-workers)k(AT)i(majordomo.glue.umd.edu)p +Fx(\))17 b(mailing)150 2376 y(list)31 b(\(no)m(w)g(defunct\))f(mem)m(b) +s(ers)f(for)i(man)m(y)f(suggestions)h(and)f(bug)g(rep)s(orts)g(to)h +Ft(A)n(md)p Fx(.)225 2511 y Fv(\017)60 b Fn(DEC)p Fx(,)30 +b Fn(V)-10 b(AX)29 b Fx(and)h Fn(Ultrix)h Fx(are)f(registered)i +(trademarks)e(of)g(Digital)j(Equipmen)m(t)d(Corp)s(oration.)225 +2645 y Fv(\017)60 b Fn(AIX)30 b Fx(and)g Fn(IBM)h Fx(are)g(registered)g +(trademarks)g(of)g(In)m(ternational)g(Business)g(Mac)m(hines)g(Corp)s +(ora-)330 2755 y(tion.)225 2889 y Fv(\017)60 b Fn(Sun)p +Fx(,)29 b Fn(NFS)h Fx(and)g Fn(SunOS)e Fx(are)j(registered)g +(trademarks)g(of)f(Sun)f(Microsystems,)j(Inc.)225 3024 +y Fv(\017)60 b Fn(UNIX)34 b Fx(is)h(a)f(registered)i(trademark)e(in)g +(the)h(USA)f(and)f(other)i(coun)m(tries,)h(exclusiv)m(ely)g(licensed) +330 3133 y(through)30 b(X/Op)s(en)f(Compan)m(y)-8 b(,)31 +b(Ltd.)225 3268 y Fv(\017)60 b Fx(All)31 b(other)g(registered)g +(trademarks)f(are)h(o)m(wned)f(b)m(y)g(their)h(resp)s(ectiv)m(e)g(o)m +(wners.)p eop end +%%Page: 120 122 +TeXDict begin 120 121 bop eop end +%%Page: 121 123 +TeXDict begin 121 122 bop 150 -116 a Fx(Index)3241 b(121)150 +299 y Fu(Index)150 610 y Fw(!)150 727 y Fr(!exists,)27 +b(b)r(o)r(olean)g(moun)n(t)e(selector)10 b Fd(:)k(:)g(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)37 b Fr(29)150 +815 y(!false,)28 b(b)r(o)r(olean)f(moun)n(t)e(selector)13 +b Fd(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)39 b Fr(29)150 903 y(!in)p 240 903 24 4 v 34 w(net)n(w)n(ork,)26 +b(b)r(o)r(olean)h(moun)n(t)e(selector)7 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)33 b Fr(30)150 991 y(!netgrp,)26 +b(b)r(o)r(olean)h(moun)n(t)e(selector)12 b Fd(:)i(:)f(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)38 b Fr(29)150 +1078 y(!netgrp)r(d,)26 b(b)r(o)r(olean)h(moun)n(t)e(selector)6 +b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)33 +b Fr(29)150 1166 y(!true,)26 b(b)r(o)r(olean)h(moun)n(t)e(selector)18 +b Fd(:)d(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)44 b Fr(30)150 1254 y(!xhost,)26 b(b)r(o)r(olean)h(moun)n(t)e +(selector)13 b Fd(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)39 b Fr(30)150 1514 y Fw(/)150 1631 y +Fr(/defaults)27 b(with)f(selectors)14 b Fd(:)g(:)f(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40 +b Fr(111)150 1719 y(/etc/passwd)27 b(maps)15 b Fd(:)e(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)41 b Fr(21)150 1807 y(/etc/rc.lo)r(cal)29 +b(additions)16 b Fd(:)e(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)42 b Fr(73)150 +1894 y(/tftpb)r(o)r(ot)26 b(in)g(a)g(c)n(hro)r(ot-ed)g(en)n(vironmen)n +(t)17 b Fd(:)12 b(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b +Fr(112)150 1982 y(/v)n(ol)13 b Fd(:)h(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)40 +b Fr(110)150 2239 y Fw(A)150 2356 y Fr(Additions)25 b(to)h(/etc/rc.lo)r +(cal)11 b Fd(:)16 b(:)d(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fr(73)150 2444 y(addopts,)26 +b(moun)n(t)f(option)8 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)34 +b Fr(30)150 2532 y(Aliased)26 b(hostnames)11 b Fd(:)k(:)e(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)38 b Fr(41)150 2619 y(Alternate)26 +b(lo)r(cations)21 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)46 +b Fr(14)150 2707 y Fq(am-eject)10 b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)37 b +Fr(101)150 2795 y(Am-utils)25 b(b)r(o)r(ok)15 b Fd(:)f(:)f(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)42 b Fr(8)150 +2883 y(Amd)25 b(b)r(o)r(ok)11 b Fd(:)i(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)38 b Fr(8)150 +2970 y(Amd)25 b(command)h(line)g(options)12 b Fd(:)h(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)38 +b Fr(39)150 3058 y(Amd)25 b(con\014guration)h(\014le)14 +b Fd(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)40 b Fr(44)150 3146 y(Amd)25 +b(Con\014guration)h(File)6 b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)32 +b Fr(59)150 3234 y(Amd)25 b(con\014guration)h(\014le;)g(sp)r(ecifying)h +(name)13 b Fd(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)39 b Fr(44)150 +3321 y(Amd's)25 b(PID)13 b Fd(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b Fr(76)150 3409 y(Amd's)25 +b(pro)r(cess)i(ID)8 b Fd(:)k(:)h(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)34 b Fr(76)150 3497 y(amd.conf)16 b Fd(:)f(:)e(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 +b Fr(59)150 3585 y(amd.conf)27 b(common)f(parameters)d +Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)49 b Fr(59)150 3672 y(amd.conf)27 b(examples)22 b +Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fr(71)150 +3760 y(amd.conf)27 b(\014le)c Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fr(44)150 3848 y(amd.conf)27 +b(\014le)e(format)17 b Fd(:)e(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44 +b Fr(59)150 3936 y(amd.conf)27 b(global)g(parameters)12 +b Fd(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)38 b Fr(61)150 4024 y(amd.conf)27 b(global)g(section)14 +b Fd(:)g(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)40 b Fr(59)150 4111 y(amd.conf)27 +b(regular)f(map)g(parameters)12 b Fd(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)38 b Fr(70)150 4199 y(amd.conf)27 +b(regular)f(map)g(sections)16 b Fd(:)e(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)42 b Fr(59)150 4287 y +Fq(amd.conf-sample)9 b Fd(:)17 b(:)c(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)36 b Fr(101)150 4375 y Fq(amd2ldif)10 b Fd(:)15 b(:)e(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)37 +b Fr(101)150 4462 y Fq(amd2sun)12 b Fd(:)j(:)e(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)39 b +Fr(101)150 4550 y(Amq)25 b(command)15 b Fd(:)e(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)42 b Fr(73)150 4638 y(arc)n(h)26 +b(P)n(arameter)12 b Fd(:)i(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)39 b Fr(61)150 4726 y(arc)n(h)26 b(Selector)g(V)-6 +b(ariable)23 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b +Fr(26)150 4813 y(arc)n(h,)26 b(FSinfo)g(host)g(attribute)9 +b Fd(:)k(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)35 b Fr(82)150 4901 y(arc)n(h,)26 b(moun)n(t)f +(selector)15 b Fd(:)g(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)41 +b Fr(26)150 4989 y(Arc)n(hitecture)25 b(dep)r(enden)n(t)f(v)n(olumes)17 +b Fd(:)d(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44 +b Fr(109)150 5077 y(Arc)n(hitecture)25 b(sharing)11 b +Fd(:)j(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)37 b Fr(109)150 5164 +y(Arc)n(hitecture)25 b(sp)r(eci\014c)h(moun)n(ts)13 b +Fd(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)39 b Fr(110)150 5252 y(Assorted)26 b(T)-6 b(o)r(ols)21 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)47 +b Fr(101)150 5340 y(A)n(tomic)26 b(NFS)f(moun)n(ts)11 +b Fd(:)i(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)38 b Fr(48)2025 +610 y(auto,)26 b(\014lesystem)g(t)n(yp)r(e)8 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35 b Fr(54)2025 697 +y(auto)p 2179 697 V 34 w(attrcac)n(he)26 b(P)n(arameter)8 +b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)35 b Fr(61)2025 785 y(auto)p 2179 +785 V 34 w(dir)26 b(P)n(arameter)14 b Fd(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)40 b Fr(62)2025 872 y(auto)r(dir)26 b(Selector)g(V)-6 +b(ariable)23 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fr(26)2025 959 +y(auto)r(dir,)26 b(moun)n(t)f(selector)15 b Fd(:)g(:)e(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +41 b Fr(26)2025 1047 y(autofs)p 2232 1047 V 35 w(use)p +2374 1047 V 34 w(lofs)27 b(P)n(arameter)9 b Fd(:)14 b(:)f(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)35 +b Fr(60)2025 1134 y(Automatic)26 b(generation)g(of)h(user)e(maps)d +Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)48 +b Fr(21)2025 1221 y(Automoun)n(t)24 b(directory)18 b +Fd(:)c(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)45 b Fr(39)2025 1308 +y(Automoun)n(t)24 b(\014lesystem)f Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)49 +b Fr(54)2025 1396 y Fq(automount2amd)14 b Fd(:)i(:)d(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)41 b Fr(101)2025 1483 y(Automoun)n(ter)25 +b(b)r(o)r(ok)d Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)50 +b Fr(8)2025 1570 y(Automoun)n(ter)25 b(con\014guration)h(maps)21 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)48 +b Fr(19)2025 1657 y(Automoun)n(ter)25 b(fundamen)n(tals)15 +b Fd(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)42 b Fr(13)2025 1891 y Fw(B)2025 2007 y Fr(Bac)n(kground)26 +b(moun)n(ts)20 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)47 +b Fr(14)2025 2094 y(Bac)n(kground)26 b(to)f(Mail)i(Deliv)n(ery)c +Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)49 b Fr(95)2025 2181 y(Binding)26 b(names)g(to)g(\014lesystems)d +Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)49 b Fr(14)2025 2269 y(b)r(o)r(ok)21 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fr(8)2025 2356 y(b)r(o)r(otparams,)27 +b(FSinfo)f(pre\014x)19 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)46 b Fr(88)2025 +2443 y(bro)n(wsable)p 2360 2443 V 35 w(dirs)26 b(P)n(arameter)10 +b Fd(:)k(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)36 b Fr(60)2025 2530 y(Bug)26 b(rep)r(orts)d +Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)50 b Fr(7)2025 2618 y(b)n(yte)24 b(Selector)j(V)-6 +b(ariable)22 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)48 b +Fr(26)2025 2705 y(b)n(yte,)25 b(moun)n(t)g(selector)14 +b Fd(:)g(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)40 b Fr(26)2025 +2955 y Fw(C)2025 3071 y Fr(Cac)n(he)26 b(in)n(terv)l(al)14 +b Fd(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)41 +b Fr(39)2025 3158 y(cac)n(he,)26 b(moun)n(t)f(map)h(option)15 +b Fd(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)42 b Fr(54)2025 3246 y(cac)n(he)p +2211 3246 V 34 w(duration)26 b(P)n(arameter)c Fd(:)13 +b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)48 b Fr(63)2025 3333 y(cac)n(hedir,)26 b(moun)n(t)f(option) +20 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)46 b Fr(49)2025 3420 +y(cac)n(hefs,)27 b(\014lesystem)f(t)n(yp)r(e)17 b Fd(:)12 +b(:)h(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)43 b Fr(49)2025 3507 y(Cac)n(hing)26 +b(Filesystem)13 b Fd(:)i(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)40 +b Fr(49)2025 3595 y(Catc)n(h-all)26 b(moun)n(t)f(p)r(oin)n(t)15 +b Fd(:)f(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)42 b Fr(110)2025 3682 y(CD-R)n(OM)25 +b(Filesystem)c Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)47 +b Fr(50)2025 3769 y(cdfs,)26 b(\014lesystem)g(t)n(yp)r(e)18 +b Fd(:)12 b(:)h(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44 b Fr(50)2025 +3856 y(Cen)n(tralized)26 b(Mail)h(Sp)r(o)r(ol)g(Directory)21 +b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)47 +b Fr(95)2025 3944 y(Changing)26 b(the)g(in)n(terv)l(al)f(b)r(efore)i(a) +f(\014lesystem)g(times)g(out)2185 4031 y Fd(:)13 b(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)33 b Fr(39)2025 4118 y(c)n(hro)r(ot;)26 b(/tftpb)r(o)r(ot)h +(example)17 b Fd(:)c(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)44 b Fr(112)2025 4205 y(Cluster)26 +b(names)15 b Fd(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)41 b Fr(43)2025 4293 y(cluster)26 b(P)n(arameter)7 +b Fd(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)33 +b Fr(63)2025 4380 y(cluster)26 b(Selector)g(V)-6 b(ariable)17 +b Fd(:)d(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)43 b Fr(26)2025 4467 y(cluster,)26 +b(FSinfo)g(host)g(attribute)21 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fr(82)2025 +4555 y(cluster,)26 b(moun)n(t)f(selector)9 b Fd(:)15 +b(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)36 b Fr(26)2025 4642 y(CNAMEs)7 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)34 b Fr(30)2025 4729 y(Command)26 b(line)g(options,)h +(Amd)8 b Fd(:)k(:)h(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)34 b Fr(39)2025 4816 y(Command)26 b(line)g(options,)h +(FSinfo)15 b Fd(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)41 b Fr(88)2025 4904 y(con\014g,)26 b(FSinfo)g(host)g +(attribute)17 b Fd(:)c(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)43 b Fr(81)2025 4991 y(Con\014guration)26 +b(\014le;)g(tags)6 b Fd(:)15 b(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 +b Fr(45)2025 5078 y(Con\014guration)26 b(map)g(t)n(yp)r(es)8 +b Fd(:)k(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)34 b Fr(19)2025 5165 y(Con)n(trolling)27 +b(Amd)21 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)48 +b Fr(74)2025 5253 y(Con)n(trolling)27 b(Hlfsd)16 b Fd(:)e(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 b Fr(98)2025 5340 +y(Creating)27 b(a)f(pid)f(\014le)17 b Fd(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)44 b Fr(41)p eop end +%%Page: 122 124 +TeXDict begin 122 123 bop 150 -116 a Fx(122)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fr(ctl-amd)7 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)33 b Fr(73)150 389 y Fq(ctl-amd)12 +b Fd(:)j(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)39 b Fr(102)150 479 y Fq(ctl-hlfsd)14 +b Fd(:)h(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40 +b Fr(98,)27 b(102)150 745 y Fw(D)150 867 y Fr(Debug)e(options)11 +b Fd(:)j(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)38 +b Fr(44)150 958 y(debug)p 356 958 24 4 v 33 w(m)n(tab)p +562 958 V 34 w(\014le)26 b(P)n(arameter)20 b Fd(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)45 b Fr(63)150 1048 y(debug)p 356 1048 V 33 w(options)27 +b(P)n(arameter)16 b Fd(:)d(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42 b Fr(63)150 +1138 y(Debugging)26 b(a)g(new)g(Amd)f(con\014guration)13 +b Fd(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)39 b Fr(76)150 +1229 y(debugging)26 b(hesio)r(d)g(resolv)n(er)h(service)c +Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)49 +b Fr(44)150 1319 y(Debugging)26 b(options)g(via)g(Amq)6 +b Fd(:)12 b(:)h(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)32 b Fr(77)150 1409 y(De\014ning)25 b(a)h(host,)g +(FSinfo)20 b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(80)150 +1499 y(De\014ning)25 b(an)h(Amd)f(moun)n(t)g(map,)h(FSinfo)20 +b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46 b Fr(86)150 +1590 y(De\014ning)25 b(host)h(attributes,)g(FSinfo)11 +b Fd(:)i(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 +b Fr(80)150 1680 y(dela)n(y)-6 b(,)25 b(moun)n(t)h(option)c +Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)48 b Fr(31)150 +1770 y(Dela)n(ying)26 b(moun)n(ts)f(from)i(sp)r(eci\014c)f(lo)r +(cations)13 b Fd(:)i(:)e(:)g(:)g(:)g(:)h(:)f(:)39 b Fr(31)150 +1860 y(Determining)26 b(the)f(map)h(t)n(yp)r(e)13 b Fd(:)f(:)h(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)39 +b Fr(19)150 1951 y(dev,)25 b(moun)n(t)g(option)9 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)36 b Fr(49,)27 b(50,)f(51)150 2041 y(Direct)g(automoun)n +(t)f(\014lesystem)17 b Fd(:)d(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)44 b Fr(55)150 2131 y(direct,)26 +b(\014lesystem)g(t)n(yp)r(e)20 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)47 +b Fr(55)150 2222 y(Disco)n(v)n(ering)26 b(v)n(ersion)g(information)13 +b Fd(:)i(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 +b Fr(41)150 2312 y(Disco)n(v)n(ering)26 b(what)g(is)g(going)h(on)f(at)g +(run-time)10 b Fd(:)i(:)h(:)g(:)h(:)f(:)g(:)36 b Fr(74)150 +2402 y(Disk)25 b(\014lesystems)d Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)48 b Fr(49)150 2492 y(dismoun)n(t)p +465 2492 V 34 w(in)n(terv)l(al)25 b(P)n(arameter)8 b +Fd(:)14 b(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)34 b Fr(63)150 2583 y(Displa)n(ying)26 b(brief)g(help)14 +b Fd(:)g(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)41 b Fr(45,)26 b(75)150 2673 +y(Displa)n(ying)g(the)f(pro)r(cess)i(id)21 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)47 b Fr(41)150 2763 y(Distributed)25 b(Mail)i(Sp)r(o)r +(ol)f(Service)9 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)35 b Fr(96)150 2854 y(dollar)27 b(Selector)f(V)-6 +b(ariable)15 b Fd(:)f(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)41 b Fr(27)150 +2944 y(Domain)26 b(name)20 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)46 b Fr(40)150 3034 y(domain)26 +b(Selector)g(V)-6 b(ariable)22 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 +b Fr(26)150 3124 y(Domain)26 b(stripping)11 b Fd(:)j(:)f(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)38 b Fr(25)150 3215 y(domain,)26 +b(moun)n(t)f(selector)14 b Fd(:)h(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40 +b Fr(26)150 3305 y(domain)p 402 3305 V 34 w(strip)26 +b(P)n(arameter)21 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)46 b Fr(63)150 +3395 y(Domainname)26 b(op)r(erators)17 b Fd(:)d(:)f(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)43 +b Fr(25)150 3485 y(dumpset,)25 b(FSinfo)h(\014lesystems)h(option)9 +b Fd(:)k(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fr(85)150 3576 y(dumpset,)25 b(FSinfo)h(pre\014x)7 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)33 b Fr(88)150 3666 +y(Duplicated)25 b(v)n(olumes)9 b Fd(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)36 b Fr(13)150 3932 y Fw(E)150 4054 y Fr(EFS)11 +b Fd(:)i(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)37 b Fr(49)150 4144 +y(efs,)27 b(\014lesystem)f(t)n(yp)r(e)21 b Fd(:)13 b(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)48 b Fr(49)150 4235 y(En)n(vironmen)n(t)25 +b(v)l(ariables)14 b Fd(:)g(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)41 +b Fr(25)150 4325 y(Error)26 b(\014lesystem)c Fd(:)13 +b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)48 +b Fr(56)150 4415 y(error,)27 b(\014lesystem)e(t)n(yp)r(e)19 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)45 b Fr(56)150 +4505 y(Example)26 b(of)g(arc)n(hitecture)g(sp)r(eci\014c)g(moun)n(ts)7 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)33 b Fr(110)150 4596 +y(Example)26 b(of)g(moun)n(ting)g(home)g(directories)11 +b Fd(:)j(:)f(:)h(:)f(:)g(:)g(:)g(:)38 b Fr(108)150 4686 +y(exec)p 298 4686 V 34 w(map)p 477 4686 V 34 w(timeout)25 +b(P)n(arameter)15 b Fd(:)g(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)41 b Fr(63)150 4776 y(Executable)26 +b(maps)20 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 +b Fr(23)150 4867 y(exists)26 b(Selector)g(F)-6 b(unction)9 +b Fd(:)k(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b Fr(29)150 4957 y(exists,)26 +b(b)r(o)r(olean)h(moun)n(t)e(selector)e Fd(:)13 b(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)47 b Fr(29)150 +5047 y(exp)r(ort,)26 b(FSinfo)g(sp)r(ecial)h(fst)n(yp)r(e)13 +b Fd(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)39 b Fr(84)150 5137 y(exp)r(ortfs,)26 b(FSinfo)h(moun)n(t)e +(option)19 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)45 b Fr(84)150 5228 y(exp)r(orts,)26 b(FSinfo)g +(pre\014x)9 b Fd(:)k(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 b +Fr(89)2025 299 y Fw(F)2025 416 y Fr(false)27 b(Selector)f(F)-6 +b(unction)11 b Fd(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)38 b Fr(29)2025 +504 y(false,)27 b(b)r(o)r(olean)g(moun)n(t)e(selector)6 +b Fd(:)15 b(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)33 b Fr(29)2025 592 y(File)26 b(map)g(syn)n(tactic)g(con)n +(v)n(en)n(tions)9 b Fd(:)j(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)36 b Fr(19)2025 680 y(File)26 b(maps)d +Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)49 b Fr(19)2025 768 y(Fileserv)n(er)7 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)33 b Fr(13)2025 856 y(Filesystem)8 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)34 b Fr(13)2025 944 y(Filesystem)26 b(info)h(pac)n(k)l(age)11 +b Fd(:)i(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)38 b Fr(79)2025 1032 y(Filesystem)26 +b(t)n(yp)r(e;)g(auto)11 b Fd(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)38 +b Fr(54)2025 1120 y(Filesystem)26 b(t)n(yp)r(e;)g(cac)n(hefs)20 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)46 b Fr(49)2025 1208 y(Filesystem)26 +b(t)n(yp)r(e;)g(cdfs)21 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 +b Fr(50)2025 1296 y(Filesystem)26 b(t)n(yp)r(e;)g(direct)7 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)33 b Fr(55)2025 1383 +y(Filesystem)26 b(t)n(yp)r(e;)g(efs)8 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)34 b Fr(49)2025 1471 y(Filesystem)26 +b(t)n(yp)r(e;)g(error)c Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)48 +b Fr(56)2025 1559 y(Filesystem)26 b(t)n(yp)r(e;)g(host)15 +b Fd(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)42 b Fr(47)2025 1647 +y(Filesystem)26 b(t)n(yp)r(e;)g(inherit)9 b Fd(:)k(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +35 b Fr(56)2025 1735 y(Filesystem)26 b(t)n(yp)r(e;)g(link)c +Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)49 b Fr(52)2025 +1823 y(Filesystem)26 b(t)n(yp)r(e;)g(linkx)19 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fr(53)2025 1911 y(Filesystem)26 +b(t)n(yp)r(e;)g(lofs)12 b Fd(:)i(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 +b Fr(50)2025 1999 y(Filesystem)26 b(t)n(yp)r(e;)g(mfs)10 +b Fd(:)j(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)36 b Fr(51)2025 +2087 y(Filesystem)26 b(t)n(yp)r(e;)g(nfs)21 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fr(47)2025 2175 +y(Filesystem)26 b(t)n(yp)r(e;)g(nfsl)10 b Fd(:)j(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)36 b Fr(53)2025 2263 y(Filesystem)26 b(t)n(yp)r(e;)g(nfsx)17 +b Fd(:)c(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fr(48)2025 2351 +y(Filesystem)26 b(t)n(yp)r(e;)g(n)n(ullfs)13 b Fd(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)40 b Fr(51)2025 2439 y(Filesystem)26 b(t)n(yp)r(e;)g(p)r(cfs)20 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)46 b Fr(51)2025 +2526 y(Filesystem)26 b(t)n(yp)r(e;)g(program)13 b Fd(:)h(:)f(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40 +b Fr(52)2025 2614 y(Filesystem)26 b(t)n(yp)r(e;)g(ro)r(ot)16 +b Fd(:)e(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)43 b Fr(56)2025 2702 +y(Filesystem)26 b(t)n(yp)r(e;)g(tfs)10 b Fd(:)j(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)36 b Fr(51)2025 2790 y(Filesystem)26 b(t)n(yp)r(e;)g(tmpfs) +8 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fr(51)2025 +2878 y(Filesystem)26 b(t)n(yp)r(e;)g(toplvl)d Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)49 b Fr(56)2025 2966 y(Filesystem)26 +b(t)n(yp)r(e;)g(udf)14 b Fd(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41 +b Fr(50)2025 3054 y(Filesystem)26 b(t)n(yp)r(e;)g(ufs)21 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fr(49)2025 +3142 y(Filesystem)26 b(t)n(yp)r(e;)g(umapfs)16 b Fd(:)d(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +43 b Fr(51)2025 3230 y(Filesystem)26 b(t)n(yp)r(e;)g(union)9 +b Fd(:)j(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)36 b Fr(55)2025 3318 +y(Filesystem)26 b(t)n(yp)r(e;)g(xfs)21 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)48 b Fr(49)2025 3406 y(Filesystem)26 b(t)n(yp)r(es)9 +b Fd(:)k(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 +b Fr(47)2025 3494 y Fq(fix-amd-map)22 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fr(102)2025 +3582 y Fq(fixmount)10 b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b Fr(103)2025 +3669 y Fq(fixrmtab)10 b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b Fr(103)2025 +3757 y(Flat)26 b(\014le)g(maps)c Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)49 b Fr(19)2025 3845 y(Flopp)n(y)25 +b(Filesystem)15 b Fd(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)41 +b Fr(51)2025 3933 y(Flushing)26 b(the)f(map)h(cac)n(he)8 +b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)35 b Fr(75)2025 4021 y(forced)p +2232 4021 V 34 w(unmoun)n(ts)25 b(P)n(arameter)e Fd(:)13 +b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)48 b Fr(63)2025 4109 y(F)-6 b(orcing)26 b(Amq)f(to)h(use)f(a)h(TCP)h +(transp)r(ort)19 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)45 +b Fr(76)2025 4197 y(F)-6 b(orcing)26 b(Amq)f(to)h(use)f(a)h(UDP)f +(transp)r(ort)16 b Fd(:)e(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)43 +b Fr(77)2025 4285 y(F)-6 b(orcing)26 b(\014lesystem)g(to)g(time)g(out)7 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)33 b Fr(77)2025 4373 y(freq,)26 b(FSinfo)g(\014lesystems)g +(option)20 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)46 b Fr(84)2025 4461 y(fs,)26 b(moun)n(t)f(option)11 +b Fd(:)j(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)37 +b Fr(31)2025 4549 y(FSinfo)8 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fr(79)2025 4637 y(FSinfo)26 b(arc)n(h)g(host)g(attribute)19 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)46 b Fr(82)2025 4725 y(FSinfo)26 b(automoun)n(t)f +(de\014nitions)20 b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)46 b Fr(86)2025 4812 y(FSinfo)26 +b(cluster)g(host)g(attribute)14 b Fd(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)41 b Fr(82)2025 +4900 y(FSinfo)26 b(command)g(line)g(options)19 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)45 +b Fr(88)2025 4988 y(FSinfo)26 b(con\014g)g(host)g(attribute)10 +b Fd(:)j(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)37 b Fr(81)2025 5076 y(FSinfo)26 b(dumpset)f(\014lesystems) +h(option)20 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +46 b Fr(85)2025 5164 y(FSinfo)26 b(error)g(messages)7 +b Fd(:)16 b(:)d(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)34 b Fr(90)2025 +5252 y(FSinfo)26 b(\014lesystems)c Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)48 b Fr(82)2025 5340 y(FSinfo)26 b(freq)g(\014lesystems) +g(option)13 b Fd(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)40 b Fr(84)p eop end +%%Page: 123 125 +TeXDict begin 123 124 bop 150 -116 a Fx(Index)3241 b(123)150 +299 y Fr(FSinfo)26 b(fst)n(yp)r(e)g(\014lesystems)g(option)11 +b Fd(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 +b Fr(84)150 387 y(FSinfo)26 b(grammar)15 b Fd(:)f(:)f(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)41 b Fr(80)150 474 y(FSinfo)26 +b(host)g(attributes)21 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 +b Fr(80)150 562 y(FSinfo)26 b(host)g(de\014nitions)12 +b Fd(:)h(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b Fr(80)150 650 y(FSinfo)26 +b(log)h(\014lesystems)f(option)11 b Fd(:)j(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)37 b Fr(85)150 +738 y(FSinfo)26 b(moun)n(t)f(\014lesystems)h(option)21 +b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47 +b Fr(84)150 826 y(FSinfo)26 b(opts)g(\014lesystems)g(option)6 +b Fd(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)33 b Fr(84)150 913 y(FSinfo)26 b(os)h(host)e(attribute)e +Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fr(82)150 1001 y(FSinfo)26 +b(o)n(v)n(erview)c Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)47 b Fr(79)150 1089 y(FSinfo)26 b(passno)h(\014lesystems)f +(option)17 b Fd(:)c(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)43 b Fr(84)150 1177 y(FSinfo)26 b(static)h(moun)n(ts)7 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)33 b Fr(85)150 +1265 y(fstab,)27 b(FSinfo)f(pre\014x)17 b Fd(:)12 b(:)h(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)43 b Fr(89)150 1352 y(fst)n(yp)r(e,)26 +b(FSinfo)g(\014lesystems)g(option)17 b Fd(:)d(:)f(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fr(84)150 1440 y(full)p +263 1440 24 4 v 35 w(os)26 b(P)n(arameter)12 b Fd(:)j(:)e(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)39 b Fr(64)150 1528 y(full)p +263 1528 V 35 w(os)26 b(Selector)g(V)-6 b(ariable)23 +b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fr(27)150 1616 y(full)p +263 1616 V 35 w(os,)26 b(moun)n(t)f(selector)15 b Fd(:)g(:)e(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)41 b Fr(27)150 1703 y(fully)p 304 1703 V 34 +w(quali\014ed)p 622 1703 V 34 w(hosts)26 b(P)n(arameter)c +Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 +b Fr(64)150 1956 y Fw(G)150 2073 y Fr(Generic)26 b(v)n(olume)g(name)9 +b Fd(:)k(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b Fr(110)150 2161 +y(Getting)26 b(Additional)g(Information)16 b Fd(:)e(:)f(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)43 b Fr(7)150 +2249 y(Getting)26 b(real)h(w)n(orking)f(directory)16 +b Fd(:)d(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +42 b Fr(77)150 2337 y(gid)26 b(Selector)g(V)-6 b(ariable)9 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35 b Fr(29)150 +2424 y(gid,)26 b(moun)n(t)f(selector)18 b Fd(:)d(:)e(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)44 b Fr(29)150 2512 y(Global)27 b(statistics)17 +b Fd(:)d(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)43 +b Fr(76)150 2600 y(Grammar,)27 b(FSinfo)10 b Fd(:)k(:)f(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)36 b Fr(80)150 2853 y Fw(H)150 +2970 y Fr(Help;)26 b(sho)n(wing)g(from)h(Amd)21 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)48 b Fr(45)150 3058 y(Help;)26 b(sho)n(wing)g(from)h +(Amq)21 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fr(75)150 3145 y(Hesio)r(d)26 +b(maps)6 b Fd(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)33 b Fr(21)150 3233 y(Hesio)r(d;)26 b(turning)g(on)f +(RES)p 960 3233 V 34 w(DEBUG)18 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)44 b Fr(44)150 3321 y(hesio)r(d)p +366 3321 V 34 w(base)27 b(P)n(arameter)8 b Fd(:)14 b(:)f(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)34 b Fr(64)150 3409 y(History)11 b Fd(:)i(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 +b Fr(11)150 3496 y Fq(Hlfsd)21 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46 +b Fr(93)150 3584 y(Hlfsd)26 b(Files)d Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49 b Fr(100)150 +3672 y(Hlfsd)26 b(Options)21 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)48 b Fr(98)150 3760 y(Hlfsd;)26 +b(bac)n(kground)17 b Fd(:)c(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)43 +b Fr(95)150 3848 y(Hlfsd;)26 b(con)n(trolling)16 b Fd(:)f(:)e(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)42 b Fr(98)150 3935 y(Hlfsd;)26 +b(Files)11 b Fd(:)k(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)38 b Fr(100)150 4023 y(Hlfsd;)26 b(in)n(tro)r(duction)c +Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fr(93)150 +4111 y(Hlfsd;)26 b(Options)11 b Fd(:)i(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)37 b Fr(98)150 4199 y(Hlfsd;)26 +b(using)c Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)48 b Fr(98)150 4287 y(Hlfsd;)26 b(Wh)n(y)f(Deliv)n(er)h(In) +n(to)f(the)g(Home)h(Directory?)14 b Fd(:)f(:)40 b Fr(97)150 +4374 y(Home)26 b(directories)21 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)47 b Fr(108)150 4462 y(Home-Link)25 b(Filesystem)14 +b Fd(:)g(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)40 b Fr(93)150 4550 y(host)26 +b(Selector)g(V)-6 b(ariable)6 b Fd(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +33 b Fr(27)150 4638 y(host,)26 b(\014lesystem)g(t)n(yp)r(e)13 +b Fd(:)f(:)h(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)39 b Fr(47)150 +4725 y(host,)26 b(moun)n(t)f(selector)16 b Fd(:)f(:)e(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)42 b Fr(27)150 4813 y(hostd)25 b(Selector)i(V)-6 +b(ariable)20 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)45 b Fr(27)150 +4901 y(hostd,)26 b(moun)n(t)f(selector)12 b Fd(:)i(:)f(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)38 b Fr(27)150 4989 y(Hostname)26 b(normalization)14 +b Fd(:)h(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)40 b Fr(41)150 5077 y(hostname,)26 +b(FSinfo)h(command)e(line)i(option)21 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h +(:)f(:)47 b Fr(89)150 5164 y(Ho)n(w)26 b(k)n(eys)f(are)h(lo)r(ok)n(ed)g +(up)9 b Fd(:)j(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 b Fr(23)150 5252 +y(Ho)n(w)26 b(lo)r(cations)h(are)g(parsed)20 b Fd(:)13 +b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)46 b Fr(24)150 5340 y(Ho)n(w)26 b(to)g(access)h(en)n +(vironmen)n(t)e(v)l(ariables)h(in)g(maps)d Fd(:)13 b(:)49 +b Fr(25)2025 299 y(Ho)n(w)26 b(to)g(disco)n(v)n(er)f(y)n(our)h(v)n +(ersion)f(of)i(Amd)21 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 +b Fr(41)2025 387 y(Ho)n(w)26 b(to)g(moun)n(t)f(a)h(lo)r(cal)h(disk)14 +b Fd(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)41 b Fr(49)2025 474 y(Ho)n(w)26 b(to)g(moun)n(t)f(a)h +(UFS)f(\014lesystems)8 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)34 b Fr(49)2025 562 y(Ho)n(w)26 b(to)g(moun)n(t)f +(all)h(NFS)f(exp)r(orted)g(\014lesystems)14 b Fd(:)g(:)f(:)g(:)41 +b Fr(47)2025 650 y(Ho)n(w)26 b(to)g(moun)n(t)f(an)g(atomic)i(group)f +(of)g(NFS)f(\014lesystems)2185 737 y Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)33 b Fr(48)2025 825 y(Ho)n(w)26 b(to)g(moun)n(t)f(and)g(NFS)g +(\014lesystem)14 b Fd(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)41 b Fr(47)2025 913 y(Ho)n(w)25 b(to)h(reference)g(an)f(existing)h +(part)f(of)h(the)f(lo)r(cal)i(name)2178 1000 y(space)20 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)46 b Fr(53)2025 1088 y(Ho)n(w)26 b(to)g(reference)g(part)g +(of)g(the)f(lo)r(cal)j(name)e(space)12 b Fd(:)h(:)38 +b Fr(52)2025 1175 y(Ho)n(w)26 b(to)g(select)g(log)h(messages)8 +b Fd(:)15 b(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)35 b Fr(42)2025 1263 y(Ho)n(w)26 b(to)g(set)f +(default)i(map)e(parameters)18 b Fd(:)c(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)44 b Fr(25)2025 1351 y(Ho)n(w)26 b(to)g(set)f(map)h(cac)n +(he)g(parameters)9 b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)36 b Fr(54)2025 1439 y(Ho)n(w)26 b(to)g(start)g(a)g(direct)f +(automoun)n(t)h(p)r(oin)n(t)14 b Fd(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +40 b Fr(55)2025 1527 y(Ho)n(w)26 b(to)g(start)g(an)f(indirect)h +(automoun)n(t)f(p)r(oin)n(t)12 b Fd(:)h(:)g(:)g(:)h(:)f(:)38 +b Fr(54)2025 1614 y(Ho)n(w)26 b(v)l(ariables)g(are)g(expanded)6 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)33 b Fr(25)2025 1867 y Fw(I)2025 1984 +y Fr(in)p 2094 1984 V 34 w(net)n(w)n(ork)25 b(Selector)h(F)-6 +b(unction)22 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)49 b Fr(30)2025 2072 y(in)p 2094 +2072 V 34 w(net)n(w)n(ork,)25 b(b)r(o)r(olean)i(moun)n(t)e(selector)17 +b Fd(:)e(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)44 +b Fr(30)2025 2160 y(inherit,)26 b(\014lesystem)g(t)n(yp)r(e)6 +b Fd(:)12 b(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)33 b Fr(56)2025 2247 +y(Inheritance)25 b(\014lesystem)8 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)35 b Fr(56)2025 2335 y(In)n(terv)l(al)25 b(b)r(efore)h(a)g +(\014lesystem)g(times)g(out)d Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)50 b Fr(39)2025 2423 y(In)n(tro)r(duction)12 b Fd(:)g(:)h(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)39 +b Fr(9)2025 2511 y(In)n(tro)r(duction)25 b(to)h(Hlfsd)16 +b Fd(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 b Fr(93)2025 2747 +y Fw(K)2025 2864 y Fr(k)l(arc)n(h)25 b(P)n(arameter)11 +b Fd(:)j(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)38 +b Fr(64)2025 2951 y(k)l(arc)n(h)25 b(Selector)h(V)-6 +b(ariable)22 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)48 b Fr(27)2025 +3039 y(k)l(arc)n(h,)25 b(moun)n(t)g(selector)14 b Fd(:)g(:)g(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)40 b Fr(27)2025 3127 y(Keep-aliv)n(es)13 +b Fd(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)39 b Fr(15)2025 3215 y(Key)25 b(lo)r(okup)10 b +Fd(:)j(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)37 b Fr(23)2025 3303 y(k)n(ey)24 b(Selector)j(V)-6 +b(ariable)21 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 +b Fr(28)2025 3390 y(k)n(ey)-6 b(,)24 b(moun)n(t)h(selector)16 +b Fd(:)f(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 b Fr(28)2025 +3478 y(Killing)26 b(and)g(starting)g(Amd)16 b Fd(:)d(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 +b Fr(73)2025 3731 y Fw(L)2025 3848 y Fr(LD)n(AP)25 b(maps)12 +b Fd(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)39 b Fr(22)2025 3936 y(ldap)p 2175 3936 V 34 w(base)26 +b(P)n(arameter)7 b Fd(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)34 +b Fr(64)2025 4023 y(ldap)p 2175 4023 V 34 w(cac)n(he)p +2390 4023 V 34 w(maxmem)25 b(P)n(arameter)7 b Fd(:)15 +b(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)34 +b Fr(65)2025 4111 y(ldap)p 2175 4111 V 34 w(cac)n(he)p +2390 4111 V 34 w(seconds)26 b(P)n(arameter)17 b Fd(:)d(:)f(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)43 b Fr(65)2025 +4199 y(ldap)p 2175 4199 V 34 w(hostp)r(orts)26 b(P)n(arameter)8 +b Fd(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)34 b Fr(65)2025 4287 y(ldap)p +2175 4287 V 34 w(proto)p 2388 4287 V 34 w(v)n(ersion)26 +b(P)n(arameter)9 b Fd(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)36 b Fr(65)2025 4374 y(License)26 +b(Information)8 b Fd(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 +b Fr(3)2025 4462 y(Ligh)n(t)n(w)n(eigh)n(t)26 b(Directory)g(Access)g +(Proto)r(col)17 b Fd(:)e(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)44 +b Fr(22)2025 4550 y(link,)26 b(\014lesystem)f(t)n(yp)r(e)20 +b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47 b Fr(52)2025 +4638 y(linkx,)25 b(\014lesystem)h(t)n(yp)r(e)17 b Fd(:)12 +b(:)h(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)44 b Fr(53)2025 4726 y(Listing)26 +b(curren)n(tly)f(moun)n(ted)g(\014lesystems)16 b Fd(:)e(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)42 b Fr(74)2025 4813 y(lo)r(cal)p +2184 4813 V 35 w(domain)26 b(P)n(arameter)21 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)46 b Fr(65)2025 4901 y(lo)r(calhost)p +2325 4901 V 35 w(address)27 b(P)n(arameter)16 b Fd(:)e(:)f(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 +b Fr(65)2025 4989 y(Lo)r(cation)27 b(format)17 b Fd(:)d(:)f(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fr(24)2025 5077 +y(Lo)r(cation)27 b(lists)11 b Fd(:)j(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)38 b Fr(14)2025 5164 y(lo)r(c)n(king)26 +b(executable)g(pages)g(in)g(memory)8 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)34 b Fr(45)2025 5252 y(lofs,)27 b(\014lesystem)f(t) +n(yp)r(e)9 b Fd(:)k(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)36 +b Fr(50)2025 5340 y(Log)26 b(\014le,)g(resetting)12 b +Fd(:)i(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)39 +b Fr(75)p eop end +%%Page: 124 126 +TeXDict begin 124 125 bop 150 -116 a Fx(124)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fr(Log)c +(\014lename)6 b Fd(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)33 b Fr(40)150 387 y(Log)26 b(message)i(selection)8 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)34 b Fr(42)150 +475 y(log,)27 b(FSinfo)f(\014lesystems)g(option)17 b +Fd(:)d(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)44 b Fr(85)150 563 y(log)p 252 563 24 4 v 35 w(\014le)26 +b(P)n(arameter)21 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +46 b Fr(65)150 651 y(log)p 252 651 V 35 w(options)26 +b(P)n(arameter)16 b Fd(:)e(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42 +b Fr(65)150 739 y(Logging)27 b(options)f(via)g(Amq)18 +b Fd(:)12 b(:)h(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)44 b Fr(77)150 827 y(Lo)r(oking)26 +b(up)f(k)n(eys)14 b Fd(:)e(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)40 b Fr(23)150 916 y(Lo)r(opbac)n(k)26 b(Filesystem)c +Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)48 b Fr(50)150 +1004 y Fq(lostaltmail)22 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)46 b Fr(103)150 1092 y Fq +(lostaltmail.conf-sample)28 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)50 b Fr(103)150 +1180 y(lostaltmail;)28 b(con\014guration)f(\014le)9 b +Fd(:)k(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)35 b Fr(103)150 1434 y Fw(M)150 1552 y Fr(Mailing)27 +b(lists)16 b Fd(:)f(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)43 b Fr(7)150 1640 y(Map)26 b(cac)n(he)g(options)9 +b Fd(:)k(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35 b +Fr(54)150 1728 y(Map)26 b(cac)n(he)g(sync)n(hronizing)c +Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)48 b Fr(54)150 1816 y(Map)26 b(cac)n(he)g(t)n +(yp)r(es)8 b Fd(:)k(:)h(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)34 +b Fr(54)150 1904 y(Map)26 b(cac)n(he,)g(\015ushing)7 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)33 b Fr(75)150 +1992 y(Map)26 b(defaults)17 b Fd(:)d(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)44 b Fr(25)150 2080 y(Map)26 +b(en)n(try)f(format)d Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +48 b Fr(24)150 2169 y(Map)26 b(lo)r(okup)19 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)45 +b Fr(23)150 2257 y(Map)26 b(options)10 b Fd(:)k(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36 b Fr(30)150 +2345 y(map)26 b(Selector)g(V)-6 b(ariable)22 b Fd(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fr(28)150 2433 y(Map)26 +b(t)n(yp)r(es)9 b Fd(:)j(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)35 b Fr(19)150 2521 y(map,)26 +b(moun)n(t)f(selector)14 b Fd(:)g(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40 +b Fr(28)150 2609 y(map)p 300 2609 V 34 w(defaults)26 +b(P)n(arameter)17 b Fd(:)d(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)43 b Fr(60)150 +2697 y(map)p 300 2697 V 34 w(name)26 b(P)n(arameter)7 +b Fd(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)34 b Fr(70)150 +2785 y(map)p 300 2785 V 34 w(options)26 b(P)n(arameter)9 +b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)36 b Fr(60)150 2873 y(map)p +300 2873 V 34 w(reload)p 538 2873 V 35 w(in)n(terv)l(al)25 +b(P)n(arameter)f Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)49 b Fr(66)150 2961 y(map)p 300 2961 V +34 w(t)n(yp)r(e)25 b(P)n(arameter)6 b Fd(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)33 b Fr(60)150 3050 y(maps,)26 b(FSinfo)h(command)e(line)h +(option)8 b Fd(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)34 +b Fr(89)150 3138 y(Memory/RAM)26 b(Filesystem)18 b Fd(:)c(:)f(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)44 +b Fr(51)150 3226 y(mfs,)27 b(\014lesystem)f(t)n(yp)r(e)7 +b Fd(:)12 b(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fr(51)150 +3314 y Fq(mk-amd-map)24 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)49 b Fr(103)150 3402 y(mlo)r(c)n(k)l(all;)27 +b(using)c Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +49 b Fr(45)150 3490 y(Moun)n(t)25 b(a)h(\014lesystem)g(under)f(program) +i(con)n(trol)21 b Fd(:)13 b(:)h(:)f(:)g(:)47 b Fr(52)150 +3578 y(Moun)n(t)25 b(\015ags;)i(acdirmax)14 b Fd(:)g(:)f(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)40 b Fr(32)150 3666 y(Moun)n(t)25 b(\015ags;)i(acdirmin)22 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fr(32)150 3754 +y(Moun)n(t)25 b(\015ags;)i(acregmax)10 b Fd(:)k(:)f(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +36 b Fr(32)150 3842 y(Moun)n(t)25 b(\015ags;)i(acregmin)17 +b Fd(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fr(32)150 3930 y(Moun)n(t)25 +b(\015ags;)i(actimeo)c Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 +b Fr(32)150 4019 y(Moun)n(t)25 b(\015ags;)i(auto)9 b +Fd(:)k(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35 +b Fr(32)150 4107 y(Moun)n(t)25 b(\015ags;)i(cac)n(he)10 +b Fd(:)j(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36 b +Fr(32)150 4195 y(Moun)n(t)25 b(\015ags;)i(closesession)10 +b Fd(:)16 b(:)d(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)36 b Fr(32)150 4283 y(Moun)n(t)25 +b(\015ags;)i(compress)17 b Fd(:)d(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)43 +b Fr(32)150 4371 y(Moun)n(t)25 b(\015ags;)i(defp)r(erm)15 +b Fd(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)41 b Fr(32)150 4459 +y(Moun)n(t)25 b(\015ags;)i(dev)8 b Fd(:)k(:)h(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)34 b Fr(32)150 4547 y(Moun)n(t)25 +b(\015ags;)i(dirmask)18 b Fd(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)44 +b Fr(32)150 4635 y(Moun)n(t)25 b(\015ags;)i(dum)n(btimr)18 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)45 b Fr(32)150 4723 y(Moun)n(t)25 +b(\015ags;)i(extatt)16 b Fd(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)42 +b Fr(32)150 4811 y(Moun)n(t)25 b(\015ags;)i(fsid)7 b +Fd(:)14 b(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)34 +b Fr(32)150 4900 y(Moun)n(t)25 b(\015ags;)i(gens)11 b +Fd(:)i(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 +b Fr(32)150 4988 y(Moun)n(t)25 b(\015ags;)i(gm)n(to\013)11 +b Fd(:)i(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)37 b Fr(32)150 +5076 y(Moun)n(t)25 b(\015ags;)i(group)22 b Fd(:)13 b(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)48 b Fr(33)150 5164 y(Moun)n(t)25 +b(\015ags;)i(grpid)13 b Fd(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +39 b Fr(33)150 5252 y(Moun)n(t)25 b(\015ags;)i(ignore)15 +b Fd(:)f(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)41 b Fr(32)150 +5340 y(Moun)n(t)25 b(\015ags;)i(in)n(t)20 b Fd(:)13 b(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47 b Fr(33)2025 299 y(Moun)n(t)25 +b(\015ags;)i(in)n(tr)22 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)49 b Fr(33)2025 387 y(Moun)n(t)25 b(\015ags;)i(lo)r(c)n(k)16 +b Fd(:)e(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)43 +b Fr(33)2025 476 y(Moun)n(t)25 b(Flags;)j(longname)18 +b Fd(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)44 b Fr(33,)27 b(35)2025 564 y(Moun)n(t)e(\015ags;)i(mask) +14 b Fd(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)40 +b Fr(33)2025 653 y(Moun)n(t)25 b(\015ags;)i(maxgroups)20 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)47 b Fr(33)2025 741 y(Moun)n(t)25 +b(\015ags;)i(m)n(ulti)12 b Fd(:)h(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)38 b Fr(33)2025 830 y(Moun)n(t)25 b(\015ags;)i(nfsv3)13 +b Fd(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b +Fr(33)2025 918 y(Moun)n(t)25 b(\015ags;)i(noac)7 b Fd(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)33 b Fr(33)2025 +1006 y(Moun)n(t)25 b(\015ags;)i(noauto)20 b Fd(:)13 b(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)46 b Fr(33)2025 1095 y(Moun)n(t)25 b(\015ags;)i(no)r +(cac)n(he)20 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46 +b Fr(33)2025 1183 y(Moun)n(t)25 b(\015ags;)i(no)r(casetrans)7 +b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)34 b Fr(33)2025 1272 y(Moun)n(t)25 +b(\015ags;)i(no)r(conn)14 b Fd(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)41 +b Fr(33)2025 1360 y(Moun)n(t)25 b(\015ags;)i(no)r(cto)8 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34 +b Fr(33)2025 1449 y(Moun)n(t)25 b(\015ags;)i(no)r(defp)r(erm)8 +b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)34 b Fr(33)2025 1537 y(Moun)n(t)25 +b(\015ags;)i(no)r(dev)17 b Fd(:)c(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +44 b Fr(33)2025 1625 y(Moun)n(t)25 b(\015ags;)i(no)r(devs)19 +b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(33)2025 +1714 y(Moun)n(t)25 b(\015ags;)i(no)r(exec)22 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)48 b Fr(33)2025 1802 +y(Moun)n(t)25 b(\015ags;)i(noin)n(t)14 b Fd(:)f(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)41 b Fr(33)2025 1891 y(Moun)n(t)25 b(\015ags;)i(no)t +(joliet)8 b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34 +b Fr(33)2025 1979 y(Moun)n(t)25 b(\015ags;)i(nolo)r(c)n(k)10 +b Fd(:)j(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)36 b Fr(33)2025 +2068 y(Moun)n(t)25 b(\015ags;)i(nomn)n(ttab)22 b Fd(:)13 +b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)49 b Fr(33)2025 2156 y(Moun)n(t)25 +b(\015ags;)i(norrip)15 b Fd(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)41 +b Fr(34)2025 2245 y(Moun)n(t)25 b(\015ags;)i(nosub)19 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(34)2025 +2333 y(Moun)n(t)25 b(\015ags;)i(nosuid)9 b Fd(:)k(:)g(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)35 b Fr(34)2025 2421 y(Moun)n(t)25 b(\015ags;)i +(nounmoun)n(t)12 b Fd(:)g(:)h(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)38 b Fr(35)2025 +2510 y(Moun)n(t)25 b(\015ags;)i(no)n(v)n(ersion)12 b +Fd(:)h(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)38 b Fr(34)2025 2598 y(Moun)n(t)25 +b(Flags;)j(no)n(win95)17 b Fd(:)d(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)43 +b Fr(34)2025 2687 y(Moun)n(t)25 b(\015ags;)i(optionstr)17 +b Fd(:)c(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fr(34)2025 2775 +y(Moun)n(t)25 b(\015ags;)i(o)n(v)n(erla)n(y)16 b Fd(:)d(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)43 b Fr(34)2025 2864 y(Moun)n(t)25 b(\015ags;)i +(pgthresh)6 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)33 +b Fr(34)2025 2952 y(Moun)n(t)25 b(\015ags;)i(ping)11 +b Fd(:)i(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)37 +b Fr(35)2025 3041 y(Moun)n(t)25 b(\015ags;)i(p)r(ort)12 +b Fd(:)h(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)38 +b Fr(34)2025 3129 y(Moun)n(t)25 b(\015ags;)i(p)r(osix)13 +b Fd(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b +Fr(34)2025 3217 y(Moun)n(t)25 b(\015ags;)i(priv)l(ate)18 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)45 b Fr(34)2025 +3306 y(Moun)n(t)25 b(\015ags;)i(proplist)6 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)33 b Fr(34)2025 3394 +y(Moun)n(t)25 b(\015ags;)i(proto)11 b Fd(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)37 b Fr(34)2025 3483 y(Moun)n(t)25 b(\015ags;)i(public) +15 b Fd(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)42 b Fr(35)2025 +3571 y(Moun)n(t)25 b(\015ags;)i(quota)22 b Fd(:)13 b(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)49 b Fr(34)2025 3660 y(Moun)n(t)25 +b(\015ags;)i(rdonly)10 b Fd(:)i(:)h(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)36 +b Fr(34)2025 3748 y(Moun)n(t)25 b(\015ags;)i(resvp)r(ort)13 +b Fd(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)39 b Fr(34)2025 3836 +y(Moun)n(t)25 b(\015ags;)i(retrans)17 b Fd(:)c(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)43 b Fr(34)2025 3925 y(Moun)n(t)25 b(\015ags;)i(retry)18 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 +b Fr(34)2025 4013 y(Moun)n(t)25 b(\015ags;)i(retry=)p +Fc(n)18 b Fd(:)12 b(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fr(36)2025 +4102 y(Moun)n(t)25 b(\015ags;)i(ro)15 b Fd(:)e(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)42 b Fr(34)2025 4190 y(Moun)n(t)25 +b(\015ags;)i(rrcaseins)d Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)50 +b Fr(34)2025 4279 y(Moun)n(t)25 b(\015ags;)i(rrip)21 +b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)48 +b Fr(34)2025 4367 y(Moun)n(t)25 b(\015ags;)i(rsize)8 +b Fd(:)14 b(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fr(34)2025 4456 y(Moun)n(t)25 b(\015ags;)i(rw)7 b Fd(:)13 +b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 +b Fr(34)2025 4544 y(Moun)n(t)25 b(Flags;)j(sessionnr)22 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)48 b Fr(35)2025 4632 y(Moun)n(t)25 +b(\015ags;)i(soft)c Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)49 b Fr(35)2025 4721 y(Moun)n(t)25 b(\015ags;)i(softlo)r(okup)12 +b Fd(:)i(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)38 b Fr(36)2025 4809 y(Moun)n(t)25 +b(\015ags;)i(sp)r(ongy)17 b Fd(:)c(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)44 +b Fr(35)2025 4898 y(Moun)n(t)25 b(\015ags;)i(suid)15 +b Fd(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)41 +b Fr(35)2025 4986 y(Moun)n(t)25 b(\015ags;)i(sym)n(ttl)11 +b Fd(:)h(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)37 b Fr(35)2025 +5075 y(Moun)n(t)25 b(\015ags;)i(sync)10 b Fd(:)i(:)h(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)36 b Fr(35)2025 5163 y(Moun)n(t)25 +b(\015ags;)i(tcp)13 b Fd(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)40 b Fr(35)2025 5252 y(Moun)n(t)25 b(\015ags;)i(timeo)7 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)33 +b Fr(35)2025 5340 y(Moun)n(t)25 b(\015ags;)i(unmoun)n(t)18 +b Fd(:)12 b(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)45 b Fr(36)p eop end +%%Page: 125 127 +TeXDict begin 125 126 bop 150 -116 a Fx(Index)3241 b(125)150 +299 y Fr(Moun)n(t)25 b(\015ags;)i(user)15 b Fd(:)e(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)41 b Fr(35)150 387 y(Moun)n(t)25 +b(\015ags;)i(utimeout=)p Fc(n)17 b Fd(:)c(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)44 +b Fr(36)150 476 y(Moun)n(t)25 b(\015ags;)i(v)n(ers)17 +b Fd(:)c(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)43 +b Fr(35)150 564 y(Moun)n(t)25 b(\015ags;)i(wsize)13 b +Fd(:)h(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)39 b Fr(35)150 +653 y(Moun)n(t)25 b(\015ags;)i(xlateco)r(okie)16 b Fd(:)f(:)e(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)42 b Fr(36)150 741 y(Moun)n(t)25 b(home)h(directories)6 +b Fd(:)15 b(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)33 b Fr(108)150 830 y(Moun)n(t)25 +b(information)e Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 +b Fr(19)150 918 y(Moun)n(t)25 b(map)h(option;)g(cac)n(he)12 +b Fd(:)i(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)38 b Fr(54)150 1006 y(Moun)n(t)25 +b(map)h(t)n(yp)r(es)8 b Fd(:)k(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)34 b Fr(19)150 1095 y(Moun)n(t)25 b(maps)9 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35 +b Fr(19)150 1183 y(Moun)n(t)25 b(option;)i(addopts)21 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fr(30)150 1272 y(Moun)n(t)25 +b(option;)i(cac)n(hedir)16 b Fd(:)e(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 +b Fr(49)150 1360 y(Moun)n(t)25 b(option;)i(dela)n(y)15 +b Fd(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)42 b Fr(31)150 +1449 y(Moun)n(t)25 b(option;)i(dev)22 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)50 +b Fr(49,)27 b(50,)f(51)150 1537 y(Moun)n(t)f(option;)i(fs)8 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)34 +b Fr(31)150 1625 y(Moun)n(t)25 b(option;)i(moun)n(t)12 +b Fd(:)g(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)38 b Fr(52)150 1714 +y(Moun)n(t)25 b(option;)i(opts)15 b Fd(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)41 b Fr(31)150 1802 y(Moun)n(t)25 b(option;)i(remopts)19 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(36)150 1891 y(Moun)n(t)25 +b(option;)i(rfs)16 b Fd(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)43 +b Fr(47,)26 b(51)150 1979 y(Moun)n(t)f(option;)i(rhost)17 +b Fd(:)c(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fr(47)150 +2068 y(Moun)n(t)25 b(option;)i(sublink)16 b Fd(:)c(:)i(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)42 b Fr(37)150 2156 y(Moun)n(t)25 b(option;)i(t)n(yp)r(e)12 +b Fd(:)g(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)38 b Fr(37)150 +2245 y(Moun)n(t)25 b(option;)i(umoun)n(t)8 b Fd(:)k(:)h(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)34 b Fr(52)150 2333 y(Moun)n(t)25 b(option;)i(unmoun)n(t)19 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)47 b Fr(52)150 2421 y(Moun)n(t)25 +b(retries)9 b Fd(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)35 b Fr(14)150 2510 y(Moun)n(t)25 b(selector;)j(arc)n(h)12 +b Fd(:)h(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)38 b Fr(26)150 +2598 y(Moun)n(t)25 b(selector;)j(auto)r(dir)12 b Fd(:)h(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)38 b Fr(26)150 2687 y(Moun)n(t)25 b(selector;)j(b)n(yte)11 +b Fd(:)h(:)h(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fr(26)150 +2775 y(Moun)n(t)25 b(selector;)j(cluster)6 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)32 b Fr(26)150 2864 y(Moun)n(t)25 +b(selector;)j(domain)11 b Fd(:)i(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 +b Fr(26)150 2952 y(Moun)n(t)25 b(selector;)j(exists)7 +b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fr(29)150 +3041 y(Moun)n(t)25 b(selector;)j(false)9 b Fd(:)15 b(:)e(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)36 b Fr(29)150 3129 y(Moun)n(t)25 b(selector;)j(full)p +810 3129 24 4 v 34 w(os)12 b Fd(:)i(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)38 +b Fr(27)150 3217 y(Moun)n(t)25 b(selector;)j(gid)15 b +Fd(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)41 b Fr(29)150 +3306 y(Moun)n(t)25 b(selector;)j(host)13 b Fd(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)39 b Fr(27)150 3394 y(Moun)n(t)25 b(selector;)j(hostd)8 +b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)35 b Fr(27)150 +3483 y(Moun)n(t)25 b(selector;)j(in)p 766 3483 V 34 w(net)n(w)n(ork)20 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)47 b Fr(30)150 3571 y(Moun)n(t)25 b(selector;)j(k)l(arc) +n(h)11 b Fd(:)h(:)h(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 b Fr(27)150 +3660 y(Moun)n(t)25 b(selector;)j(k)n(ey)10 b Fd(:)i(:)h(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)36 b Fr(28)150 3748 y(Moun)n(t)25 b(selector;)j(map)11 +b Fd(:)i(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37 b Fr(28)150 +3836 y(Moun)n(t)25 b(selector;)j(netgrp)9 b Fd(:)j(:)h(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)35 b Fr(29)150 3925 y(Moun)n(t)25 b(selector;)j(netgrp)r(d)20 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)47 b Fr(29)150 4013 y(Moun)n(t)25 +b(selector;)j(netn)n(um)n(b)r(er)21 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 +b Fr(28)150 4102 y(Moun)n(t)25 b(selector;)j(net)n(w)n(ork)18 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)44 b Fr(28)150 4190 y(Moun)n(t)25 +b(selector;)j(os)15 b Fd(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41 +b Fr(27)150 4279 y(Moun)n(t)25 b(selector;)j(osv)n(er)15 +b Fd(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41 b Fr(27)150 4367 +y(Moun)n(t)25 b(selector;)j(path)6 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)33 b Fr(28)150 4456 y(Moun)n(t)25 b(selector;)j(true)15 +b Fd(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)41 b Fr(30)150 +4544 y(Moun)n(t)25 b(selector;)j(uid)13 b Fd(:)f(:)i(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)39 b Fr(28)150 4632 y(Moun)n(t)25 b(selector;)j(v)n +(endor)20 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)48 b Fr(27)150 +4721 y(Moun)n(t)25 b(selector;)j(wire)13 b Fd(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)39 b Fr(28)150 4809 y(Moun)n(t)25 b(selector;)j(xhost)9 +b Fd(:)k(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 b Fr(30)150 4898 +y(moun)n(t)25 b(system)h(call)17 b Fd(:)d(:)f(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)43 b Fr(31)150 4986 y(moun)n(t)25 b(system)h(call)h +(\015ags)15 b Fd(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41 b Fr(31)150 +5075 y(Moun)n(t)25 b(t)n(yp)r(es)8 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)34 b Fr(47)150 +5163 y(moun)n(t,)25 b(FSinfo)i(\014lesystems)f(option)10 +b Fd(:)j(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)36 +b Fr(84)150 5252 y(moun)n(t,)25 b(moun)n(t)g(option)15 +b Fd(:)f(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)42 b Fr(52)150 5340 +y(moun)n(t)p 371 5340 V 33 w(t)n(yp)r(e)25 b(P)n(arameter)e +Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49 b Fr(61)2025 299 y(Moun)n(ting)26 +b(a)g(lo)r(cal)h(disk)9 b Fd(:)k(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 +b Fr(49)2025 387 y(Moun)n(ting)24 b(a)h(remote)g(part)f(of)h(the)f +(name)g(space)h(if)g(target)2178 474 y(is)i(missing)15 +b Fd(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)41 +b Fr(53)2025 562 y(Moun)n(ting)26 b(a)g(UFS)f(\014lesystem)18 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)44 b Fr(49)2025 650 y(Moun)n(ting)26 b(a)g(v)n(olume)13 +b Fd(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)40 b Fr(14)2025 +739 y(Moun)n(ting)25 b(an)h(atomic)h(group)e(of)i(NFS)d(\014lesystems) +10 b Fd(:)k(:)37 b Fr(48)2025 827 y(Moun)n(ting)26 b(an)f(existing)h +(part)g(of)g(the)g(lo)r(cal)h(name)f(space)2185 914 y +Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)33 b Fr(53)2025 1002 +y(Moun)n(ting)26 b(an)f(NFS)g(\014lesystem)13 b Fd(:)h(:)f(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)40 +b Fr(47)2025 1090 y(Moun)n(ting)26 b(en)n(tire)f(exp)r(ort)h(trees)9 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)36 b Fr(47)2025 1178 y(Moun)n(ting)26 b(part)f(of)i(the)e +(lo)r(cal)i(name)f(space)13 b Fd(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)39 +b Fr(52)2025 1266 y(Moun)n(ting)26 b(user)f(\014lesystems)e +Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)49 b Fr(107)2025 1354 y(Multiple)26 b(Amd)f(pro)r +(cesses)f Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49 b Fr(76)2025 1443 +y(Multiple-threaded)25 b(serv)n(er)12 b Fd(:)h(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)38 +b Fr(16)2025 1697 y Fw(N)2025 1815 y Fr(Namespace)16 +b Fd(:)e(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)43 b Fr(14)2025 1903 y(ndbm)24 b(maps)7 b Fd(:)13 +b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +33 b Fr(20)2025 1991 y(netgrp)25 b(Selector)h(F)-6 b(unction)10 +b Fd(:)j(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)37 b Fr(29)2025 2079 y(netgrp,)25 +b(b)r(o)r(olean)i(moun)n(t)e(selector)f Fd(:)13 b(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)49 b Fr(29)2025 +2167 y(netgrp)r(d)25 b(Selector)h(F)-6 b(unction)22 b +Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)49 b Fr(29)2025 2256 y(netgrp)r(d,)25 +b(b)r(o)r(olean)i(moun)n(t)e(selector)17 b Fd(:)e(:)e(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)44 b Fr(29)2025 2344 +y(netn)n(um)n(b)r(er)24 b(Selector)i(V)-6 b(ariable)16 +b Fd(:)e(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)43 b Fr(28)2025 2432 y(netn)n(um)n(b)r(er,)24 +b(moun)n(t)h(selector)9 b Fd(:)14 b(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)35 b Fr(28)2025 +2520 y(Net)n(w)n(ork)25 b(\014lesystem)h(group)16 b Fd(:)d(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +42 b Fr(48)2025 2608 y(Net)n(w)n(ork)25 b(host)h(\014lesystem)7 +b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)34 b Fr(47)2025 2696 y(net)n(w)n(ork)25 +b(Selector)i(V)-6 b(ariable)12 b Fd(:)h(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)38 +b Fr(28)2025 2784 y(net)n(w)n(ork,)26 b(moun)n(t)f(selector)d +Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fr(28)2025 2872 y(Net)n(w)n(ork-wide)25 +b(naming)7 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)33 +b Fr(13)2025 2961 y(NFS)8 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fr(47)2025 3049 y(NFS)25 b(ping)8 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fr(15)2025 3137 y(NFS)25 b(V.3)h(supp)r(ort)17 b Fd(:)12 +b(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)43 b Fr(17)2025 +3225 y(nfs,)26 b(\014lesystem)g(t)n(yp)r(e)18 b Fd(:)12 +b(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44 b Fr(47)2025 +3313 y(NFS-Link)24 b(\014lesystem)i(I)r(I)9 b Fd(:)j(:)h(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)35 b Fr(53)2025 3401 y(nfs)p 2126 3401 V 34 w(allo)n(w)p +2331 3401 V 36 w(an)n(y)p 2487 3401 V 33 w(in)n(terface)26 +b(P)n(arameter)c Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)47 b Fr(66)2025 3489 y(nfs)p 2126 3489 V 34 w(allo)n(w)p +2331 3489 V 36 w(insecure)p 2636 3489 V 34 w(p)r(ort)25 +b(P)n(arameter)17 b Fd(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)43 b Fr(66)2025 3577 y(nfs)p 2126 3577 V 34 w(proto)26 +b(P)n(arameter)14 b Fd(:)h(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41 +b Fr(66)2025 3666 y(nfs)p 2126 3666 V 34 w(retransmit)p +2510 3666 V 34 w(coun)n(ter)26 b(P)n(arameter)9 b Fd(:)14 +b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)35 +b Fr(67)2025 3754 y(nfs)p 2126 3754 V 34 w(retransmit)p +2510 3754 V 34 w(coun)n(ter)p 2794 3754 V 34 w(tcp)25 +b(P)n(arameter)7 b Fd(:)14 b(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)33 +b Fr(67)2025 3842 y(nfs)p 2126 3842 V 34 w(retransmit)p +2510 3842 V 34 w(coun)n(ter)p 2794 3842 V 34 w(toplvl)26 +b(P)n(arameter)14 b Fd(:)g(:)g(:)f(:)g(:)g(:)g(:)41 b +Fr(67)2025 3930 y(nfs)p 2126 3930 V 34 w(retransmit)p +2510 3930 V 34 w(coun)n(ter)p 2794 3930 V 34 w(udp)25 +b(P)n(arameter)13 b Fd(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)40 +b Fr(67)2025 4018 y(nfs)p 2126 4018 V 34 w(retry)p 2325 +4018 V 33 w(in)n(terv)l(al)26 b(P)n(arameter)16 b Fd(:)e(:)f(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)42 +b Fr(67)2025 4106 y(nfs)p 2126 4106 V 34 w(retry)p 2325 +4106 V 33 w(in)n(terv)l(al)p 2610 4106 V 34 w(tcp)25 +b(P)n(arameter)14 b Fd(:)g(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)40 b Fr(67)2025 4194 y(nfs)p 2126 4194 V 34 +w(retry)p 2325 4194 V 33 w(in)n(terv)l(al)p 2610 4194 +V 34 w(toplvl)26 b(P)n(arameter)c Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)48 b Fr(67)2025 4282 y(nfs)p 2126 4282 +V 34 w(retry)p 2325 4282 V 33 w(in)n(terv)l(al)p 2610 +4282 V 34 w(udp)25 b(P)n(arameter)c Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)46 b Fr(67)2025 4371 y(nfs)p +2126 4371 V 34 w(v)n(ers)25 b(P)n(arameter)d Fd(:)13 +b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fr(68)2025 +4459 y(nfsl,)26 b(\014lesystem)g(t)n(yp)r(e)7 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)34 b Fr(53)2025 +4547 y(nfsx,)26 b(\014lesystem)g(t)n(yp)r(e)15 b Fd(:)d(:)h(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)41 b Fr(48)2025 4635 y(NIS)24 b(\(YP\))h(domain)i(name) +7 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)34 b Fr(43)2025 4723 +y(NIS)24 b(\(YP\))h(maps)9 b Fd(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)36 b Fr(20)2025 4811 y(NIS)p Fq(+)25 +b Fr(maps)19 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(21)2025 4899 y(nis)p 2124 +4899 V 34 w(domain)26 b(P)n(arameter)16 b Fd(:)e(:)f(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)42 b Fr(68)2025 4987 y(No)r(des)26 b(generated)g(on)f(a)h(restart)6 +b Fd(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)33 b Fr(56)2025 5076 y(Non-blo)r(c)n(king)25 +b(op)r(eration)14 b Fd(:)g(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)41 b Fr(16)2025 +5164 y(normalize)p 2353 5164 V 35 w(hostnames)26 b(P)n(arameter)21 +b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)46 +b Fr(68)2025 5252 y(normalize)p 2353 5252 V 35 w(slashes)27 +b(P)n(arameter)13 b Fd(:)h(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)39 b Fr(68)2025 5340 y(Normalizing)27 +b(hostnames)16 b Fd(:)e(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)42 b Fr(41)p +eop end +%%Page: 126 128 +TeXDict begin 126 127 bop 150 -116 a Fx(126)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fr(Null)c +(Filesystem)9 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)35 b Fr(51)150 389 y(n)n(ullfs,)27 b(\014lesystem)e(t)n(yp)r(e) +10 b Fd(:)j(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)37 b Fr(51)150 +653 y Fw(O)150 774 y Fr(Obtaining)26 b(the)f(source)h(co)r(de)21 +b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)47 b Fr(5)150 864 y(Op)r(erating)26 +b(System)f(name)20 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(45)150 +954 y(Op)r(erating)26 b(System)f(v)n(ersion)8 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)35 b Fr(41)150 1044 y(Op)r(erational)27 +b(principles)18 b Fd(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44 b +Fr(14)150 1134 y(opts,)26 b(FSinfo)g(\014lesystems)h(option)13 +b Fd(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +39 b Fr(84)150 1224 y(opts,)26 b(moun)n(t)f(option)18 +b Fd(:)c(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fr(31)150 +1314 y(os)26 b(P)n(arameter)15 b Fd(:)g(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)42 b Fr(68)150 1404 y(os)26 +b(Selector)h(V)-6 b(ariable)9 b Fd(:)k(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)35 b Fr(27)150 1494 y(os,)27 b(FSinfo)f(host)g(attribute)12 +b Fd(:)h(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)38 b Fr(82)150 1584 y(os,)27 +b(moun)n(t)e(selector)18 b Fd(:)c(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)44 b Fr(27)150 1674 y(osv)n(er)26 b(P)n(arameter)15 +b Fd(:)g(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)42 +b Fr(68)150 1764 y(osv)n(er)26 b(Selector)g(V)-6 b(ariable)8 +b Fd(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)35 b Fr(27)150 1854 +y(osv)n(er,)26 b(moun)n(t)f(selector)18 b Fd(:)d(:)e(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)44 b Fr(27)150 1944 y(Ov)n(erriding)25 b(defaults)i(on)e(the)h +(command)g(line)7 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)34 +b Fr(39)150 2034 y(Ov)n(erriding)25 b(or)h(adding)g(options)g(to)g(a)g +(moun)n(t)12 b Fd(:)g(:)i(:)f(:)g(:)g(:)g(:)38 b Fr(30)150 +2124 y(Ov)n(erriding)25 b(the)h(default)g(moun)n(t)f(p)r(oin)n(t)17 +b Fd(:)c(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)44 +b Fr(31)150 2214 y(Ov)n(erriding)25 b(the)h(lo)r(cal)h(domain)f(name)21 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47 +b Fr(40)150 2304 y(Ov)n(erriding)25 b(the)h(NIS)e(\(YP\))h(domain)h +(name)d Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)48 b Fr(43)150 +2572 y Fw(P)150 2693 y Fr(P)n(assing)27 b(parameters)g(to)f(the)f(moun) +n(t)g(system)h(call)10 b Fd(:)k(:)f(:)37 b Fr(31)150 +2783 y(passno,)27 b(FSinfo)f(\014lesystems)g(option)6 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)33 +b Fr(84)150 2873 y(P)n(assw)n(ord)27 b(\014le)f(maps)21 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47 b Fr(21)150 +2963 y(path)25 b(Selector)i(V)-6 b(ariable)17 b Fd(:)c(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)44 b Fr(28)150 3053 y(path,)26 b(moun)n(t)f(selector)10 +b Fd(:)k(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)36 b Fr(28)150 +3143 y(P)n(athname)26 b(op)r(erators)17 b Fd(:)d(:)f(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)43 b Fr(25)150 3233 y Fq(pawd)21 b Fd(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)47 b Fr(103)150 3323 y(p)r(cfs,)27 +b(\014lesystem)f(t)n(yp)r(e)17 b Fd(:)12 b(:)h(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)43 b Fr(51)150 3413 y(Pic)n(king)26 b(up)f(existing)h(moun)n(ts)19 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)45 b Fr(41)150 3503 y(pid)25 b(\014le,)h(creating)h +(with)f(-p)f(option)17 b Fd(:)d(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)44 b Fr(41)150 3593 y(PID;)26 b(Amd)11 +b Fd(:)h(:)h(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)37 b Fr(76)150 3683 y(pid)p 262 3683 24 4 +v 33 w(\014le)26 b(P)n(arameter)16 b Fd(:)e(:)f(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)42 b Fr(68)150 3773 y(plo)r(c)n(k)26 b(P)n(arameter)12 +b Fd(:)i(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)39 +b Fr(69)150 3863 y(plo)r(c)n(k;)26 b(using)21 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47 +b Fr(45)150 3953 y(p)r(ortmap)p 443 3953 V 34 w(program)26 +b(P)n(arameter)d Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)47 b Fr(69)150 4043 y(preferred)p +456 4043 V 34 w(amq)p 633 4043 V 34 w(p)r(ort)26 b(P)n(arameter)12 +b Fd(:)i(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +39 b Fr(69)150 4133 y(Primary)26 b(serv)n(er)c Fd(:)13 +b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)48 +b Fr(31)150 4223 y(prin)n(t)p 320 4223 V 33 w(pid)25 +b(P)n(arameter)17 b Fd(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)43 +b Fr(69)150 4313 y(prin)n(t)p 320 4313 V 33 w(v)n(ersion)26 +b(P)n(arameter)c Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fr(69)150 +4403 y(Pro)r(cess)27 b(id)15 b Fd(:)f(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)42 b Fr(41)150 +4492 y(pro)r(cess)27 b(id)e(of)i(Amd)e(daemon)12 b Fd(:)h(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)38 +b Fr(41)150 4582 y(Pro)r(cess)27 b(ID;)f(Amd)18 b Fd(:)12 +b(:)h(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)44 b Fr(76)150 +4672 y(Program)27 b(\014lesystem)17 b Fd(:)d(:)f(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)44 b Fr(52)150 4762 y(program,)27 b(\014lesystem)f(t)n(yp)r +(e)10 b Fd(:)j(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b Fr(52)150 5026 y +Fw(Q)150 5148 y Fr(Querying)25 b(an)h(alternate)g(host)d +Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)49 b Fr(75)150 5238 y(quiet,)25 b(FSinfo)i(command)f +(line)g(option)12 b Fd(:)h(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)38 b Fr(89)2025 299 y Fw(R)2025 416 y Fq(redhat-ctl-amd)12 +b Fd(:)k(:)d(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)39 +b Fr(104)2025 504 y(Referencing)26 b(an)g(existing)g(part)f(of)i(the)e +(lo)r(cal)j(name)2178 591 y(space)20 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46 +b Fr(53)2025 679 y(Referencing)26 b(an)g(existing)g(part)f(of)i(the)e +(name)h(space)g(if)2178 766 y(target)h(exists)22 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fr(53)2025 +854 y(Referencing)26 b(part)g(of)g(the)f(lo)r(cal)j(name)d(space)13 +b Fd(:)i(:)e(:)g(:)g(:)g(:)g(:)40 b Fr(52)2025 942 y(Regular)26 +b(expressions)g(in)g(maps)17 b Fd(:)c(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fr(54)2025 +1030 y(remopts,)26 b(moun)n(t)f(option)e Fd(:)13 b(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +49 b Fr(36)2025 1118 y(Replacemen)n(t)25 b(v)n(olumes)11 +b Fd(:)j(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)38 b Fr(13)2025 1206 +y(Replicated)26 b(v)n(olumes)15 b Fd(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)41 b Fr(13)2025 1294 y(Resetting)26 b(the)f(Amd)g(log)h(\014le) +16 b Fd(:)d(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)42 b Fr(75)2025 1382 y(Resolving)26 +b(aliased)h(hostnames)17 b Fd(:)d(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44 b Fr(41)2025 1470 +y(restart)p 2252 1470 V 34 w(moun)n(ts)26 b(P)n(arameter)21 +b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)47 b Fr(69)2025 1558 y(Restarting)26 +b(Amd)18 b Fd(:)12 b(:)h(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)44 +b Fr(73)2025 1646 y(Restarting)26 b(existing)g(moun)n(ts)c +Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)49 b Fr(41)2025 1733 y(rfs,)26 b(moun)n(t)g(option)19 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(47,)27 +b(51)2025 1821 y(rhost,)f(moun)n(t)f(option)c Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 b Fr(47)2025 1909 +y(Ro)r(ot)26 b(\014lesystem)12 b Fd(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)39 b Fr(56)2025 1997 y(ro)r(ot,)27 +b(\014lesystem)e(t)n(yp)r(e)14 b Fd(:)e(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +40 b Fr(56)2025 2085 y(RPC)26 b(Program)h(n)n(um)n(b)r(ers;)e(Amd)9 +b Fd(:)j(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)36 b Fr(76)2025 2173 y(RPC)26 b(retries)21 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47 +b Fr(16)2025 2261 y(Run-time)24 b(administration)8 b +Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)35 b Fr(73)2025 2349 y(Running)24 +b(m)n(ultiple)i(Amd)18 b Fd(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)46 +b Fr(76)2025 2437 y(rwho)26 b(serv)n(ers)8 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 +b Fr(110)2025 2673 y Fw(S)2025 2791 y Fr(searc)n(h)p +2237 2791 V 34 w(path)25 b(P)n(arameter)f Fd(:)14 b(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +50 b Fr(61)2025 2879 y(Secondary)25 b(serv)n(er)d Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fr(31)2025 +2967 y(sel,)26 b(FSinfo)h(moun)n(t)e(option)9 b Fd(:)k(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +36 b Fr(84)2025 3054 y(Selecting)26 b(sp)r(eci\014c)g(log)h(messages)22 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)46 b Fr(42)2025 3142 y(Selector;)26 b(arc)n(h)10 b +Fd(:)j(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)36 +b Fr(26)2025 3230 y(Selector;)26 b(auto)r(dir)10 b Fd(:)k(:)f(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)36 b Fr(26)2025 3318 +y(Selector;)26 b(b)n(yte)9 b Fd(:)j(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)35 b Fr(26)2025 3406 y(Selector;)26 +b(cluster)c Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +48 b Fr(26)2025 3494 y(Selector;)26 b(domain)9 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 +b Fr(26)2025 3582 y(Selector;)26 b(exists)d Fd(:)13 b(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fr(29)2025 3670 +y(Selector;)26 b(false)8 b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)34 b Fr(29)2025 3758 y(Selector;)26 +b(full)p 2449 3758 V 35 w(os)10 b Fd(:)k(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)36 b Fr(27)2025 3846 y(Selector;)26 +b(gid)13 b Fd(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)40 b Fr(29)2025 3933 y(Selector;)26 b(host)11 +b Fd(:)j(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)37 +b Fr(27)2025 4021 y(Selector;)26 b(hostd)6 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 +b Fr(27)2025 4109 y(Selector;)26 b(in)p 2405 4109 V 34 +w(net)n(w)n(ork)19 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)45 +b Fr(30)2025 4197 y(Selector;)26 b(k)l(arc)n(h)9 b Fd(:)k(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 b Fr(27)2025 +4285 y(Selector;)26 b(k)n(ey)8 b Fd(:)k(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fr(28)2025 4373 +y(Selector;)26 b(map)9 b Fd(:)k(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)35 b Fr(28)2025 4461 y(Selector;)26 +b(netgrp)7 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)33 b Fr(29)2025 4549 y(Selector;)26 b(netgrp)r(d)18 +b Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)45 +b Fr(29)2025 4637 y(Selector;)26 b(netn)n(um)n(b)r(er)20 +b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 b Fr(28)2025 +4725 y(Selector;)26 b(net)n(w)n(ork)16 b Fd(:)e(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)43 b Fr(28)2025 4813 y(Selector;)26 +b(os)13 b Fd(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)39 b Fr(27)2025 4900 y(Selector;)26 b(osv)n(er)13 +b Fd(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 +b Fr(27)2025 4988 y(Selector;)26 b(path)c Fd(:)13 b(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)48 b Fr(28)2025 5076 +y(Selector;)26 b(true)13 b Fd(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)40 b Fr(30)2025 5164 y(Selector;)26 +b(uid)11 b Fd(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)37 b Fr(28)2025 5252 y(Selector;)26 b(v)n(endor)19 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46 +b Fr(27)2025 5340 y(Selector;)26 b(wire)11 b Fd(:)j(:)g(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)37 b Fr(28)p +eop end +%%Page: 127 129 +TeXDict begin 127 128 bop 150 -116 a Fx(Index)3241 b(127)150 +299 y Fr(Selector;)27 b(xhost)8 b Fd(:)k(:)h(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)34 b Fr(30)150 387 y(Selectors)22 +b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)48 b Fr(26)150 476 y(selectors)27 b(on)f(default)14 +b Fd(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)40 b Fr(111)150 +564 y(selectors)p 436 564 24 4 v 35 w(in)p 535 564 V +34 w(defaults)27 b(P)n(arameter)18 b Fd(:)c(:)g(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)45 b Fr(61)150 653 y(Serv)n(er)25 +b(crashes)17 b Fd(:)d(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)43 b Fr(15)150 742 y(Setting)26 b(a)g(dela)n(y)f(on)h(a)g(moun) +n(t)f(lo)r(cation)9 b Fd(:)14 b(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)35 b Fr(31)150 830 y(Setting)26 b(additional)g(options)g(on)g(a)g +(moun)n(t)f(lo)r(cation)310 917 y Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 +b Fr(30)150 1006 y(Setting)26 b(Amd's)f(RPC)h(parameters)10 +b Fd(:)k(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 +b Fr(41)150 1094 y(Setting)26 b(debug)f(\015ags)20 b +Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(44)150 +1183 y(Setting)26 b(default)g(map)f(parameters)12 b Fd(:)i(:)f(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)38 b Fr(25)150 +1271 y(Setting)26 b(map)f(cac)n(he)h(parameters)21 b +Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)47 b Fr(54)150 1360 y(Setting)26 b(map)f(options)17 +b Fd(:)d(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)44 b Fr(30)150 +1448 y(Setting)26 b(system)f(moun)n(t)g(options)8 b Fd(:)14 +b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)35 +b Fr(31)150 1537 y(Setting)26 b(system)f(moun)n(t)g(options)i(for)f +(non-lo)r(cal)304 1624 y(net)n(w)n(orks)12 b Fd(:)h(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)38 b Fr(36)150 +1713 y(Setting)26 b(the)f(Amd)g(log)h(\014le)g(via)g(Amq)17 +b Fd(:)c(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)44 +b Fr(75)150 1801 y(Setting)26 b(the)f(cluster)h(name)13 +b Fd(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)39 b Fr(43)150 1890 y(Setting)26 +b(the)f(default)h(moun)n(t)f(directory)14 b Fd(:)f(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)40 b Fr(39)150 1978 y(Setting)26 +b(the)f(\014lesystem)h(t)n(yp)r(e)f(option)11 b Fd(:)i(:)g(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)37 b Fr(37)150 2067 +y(Setting)26 b(the)f(in)n(terv)l(al)g(b)r(efore)i(a)f(\014lesystem)g +(times)g(out)310 2154 y Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 +b Fr(39)150 2243 y(Setting)26 b(the)f(in)n(terv)l(al)g(b)r(et)n(w)n +(een)h(unmoun)n(t)e(attempts)310 2330 y Fd(:)14 b(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)33 b Fr(42)150 2418 y(Setting)26 b(the)f(Kernel)g(arc)n +(hitecture)e Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)49 b Fr(40)150 2507 y(Setting)26 b(the)f(lo)r(cal)i(domain)f +(name)12 b Fd(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)g(:)h(:)38 b Fr(40)150 2595 y(Setting)26 b(the)f(lo)r(cal)i(moun)n +(t)e(p)r(oin)n(t)13 b Fd(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)39 b Fr(31)150 2684 y(Setting)26 +b(the)f(log)i(\014le)13 b Fd(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)39 b Fr(40)150 2772 y(Setting)26 b(the)f(NIS)f(\(YP\))i(domain)g +(name)14 b Fd(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)40 +b Fr(43)150 2861 y(Setting)26 b(the)f(op)r(erating)h(system)g(arc)n +(hitecture)18 b Fd(:)13 b(:)h(:)f(:)g(:)g(:)44 b Fr(43)150 +2950 y(Setting)26 b(the)f(Op)r(erating)h(System)f(name)9 +b Fd(:)k(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fr(45)150 3038 y(Setting)26 b(the)f(Op)r(erating)h(System)f(v)n +(ersion)15 b Fd(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41 +b Fr(41)150 3127 y(Setting)26 b(the)f(sublink)g(option)c +Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)47 b Fr(37)150 3215 y(shared)26 b(libraries)15 +b Fd(:)f(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41 +b Fr(17)150 3304 y(Shared)25 b(Memory)h(and)g(Sw)n(ap)f(Filesystem)13 +b Fd(:)i(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)39 b Fr(51)150 +3392 y(Sharing)26 b(a)g(\014leserv)n(er)g(b)r(et)n(w)n(een)f(arc)n +(hitectures)17 b Fd(:)c(:)h(:)f(:)g(:)43 b Fr(109)150 +3481 y(sho)n(w)p 319 3481 V 34 w(statfs)p 534 3481 V +35 w(en)n(tries)26 b(P)n(arameter)e Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fr(69)150 +3569 y(SIGHUP)25 b(signal)13 b Fd(:)h(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)40 b Fr(54)150 3658 y(SIGINT)25 b(signal)10 +b Fd(:)k(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 +b Fr(73)150 3746 y(SIGTERM)26 b(signal)14 b Fd(:)g(:)f(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)h(:)f(:)g(:)g(:)40 b Fr(73)150 3835 y(Single-Host)26 +b(Mail)h(Sp)r(o)r(ol)f(Directory)21 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fr(95)150 3923 y(Source)26 +b(co)r(de)g(distribution)18 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)45 +b Fr(5)150 4012 y(Starting)26 b(Amd)c Fd(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fr(73)150 4100 y(Statically)26 +b(moun)n(ts)g(\014lesystems,)g(FSinfo)11 b Fd(:)j(:)f(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)37 b Fr(85)150 4189 y(Statistics)15 +b Fd(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)41 b Fr(76)150 4278 y(Stopping)25 b(Amd)10 +b Fd(:)j(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)36 +b Fr(73)150 4366 y(Stripping)25 b(the)h(lo)r(cal)h(domain)f(name)10 +b Fd(:)j(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)36 +b Fr(25)150 4455 y(sublink)14 b Fd(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40 +b Fr(13)150 4543 y(sublink,)25 b(moun)n(t)g(option)20 +b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(37)150 4632 +y(sun)p 271 4632 V 33 w(map)p 449 4632 V 34 w(syn)n(tax)25 +b(P)n(arameter)15 b Fd(:)f(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)41 b Fr(61)150 4720 y(Supp)r(orted)25 +b(Platforms)f Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)49 +b Fr(17)150 4809 y(Sym)n(b)r(olic)26 b(link)f(\014lesystem)c +Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)47 b Fr(52)150 4897 y(Sym)n(b)r(olic)26 +b(link)f(\014lesystem)h(I)r(I)13 b Fd(:)f(:)i(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)39 +b Fr(53)150 4986 y(Symlink)25 b(if)h(target)g(exists,)h(NFS)e +(otherwise)c Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)47 b +Fr(53)150 5074 y(symlink,)26 b(link)f(\014lesystem)h(t)n(yp)r(e)14 +b Fd(:)e(:)h(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)40 b Fr(52)150 5163 y(symlink,)26 b(linkx)f(\014lesystem)g(t)n +(yp)r(e)10 b Fd(:)j(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)37 b Fr(53)150 5251 y(symlink,)26 b(nfsl)g(\014lesystem) +g(t)n(yp)r(e)18 b Fd(:)12 b(:)h(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fr(53)150 5340 y(Sync)n(hronizing)25 +b(the)g(map)h(cac)n(he)21 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 b Fr(54)2025 299 +y(syslog)18 b Fd(:)c(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fr(40)2025 +386 y(syslog)27 b(facilit)n(y;)g(sp)r(ecifying)f(an)g(alternate)16 +b Fd(:)e(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)42 b Fr(40)2025 +474 y(syslog)27 b(priorities)9 b Fd(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)36 b Fr(42)2025 725 y Fw(T)2025 +842 y Fr(tag)26 b(P)n(arameter)14 b Fd(:)g(:)f(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:) +g(:)g(:)g(:)h(:)f(:)g(:)g(:)40 b Fr(70)2025 929 y(T)-6 +b(ags)27 b(for)f(Amd)f(con\014guration)h(\014le)18 b +Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 +b Fr(45)2025 1017 y(TCP)20 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)46 +b Fr(67)2025 1104 y(TCP;)27 b(using)f(with)g(Amq)17 b +Fd(:)12 b(:)h(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)43 b Fr(76)2025 1192 +y(tfs,)26 b(\014lesystem)g(t)n(yp)r(e)7 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)34 b Fr(51)2025 1279 y(The)26 b(moun)n(t)f(system)g +(call)6 b Fd(:)15 b(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)33 b Fr(31)2025 +1367 y(tmpfs,)26 b(\014lesystem)g(t)n(yp)r(e)21 b Fd(:)13 +b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b Fr(51)2025 1454 y(T)-6 +b(op)25 b(lev)n(el)h(\014lesystem)11 b Fd(:)i(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)37 b Fr(56)2025 1542 y(toplvl,)26 b(\014lesystem)g(t)n(yp)r +(e)19 b Fd(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47 b Fr(56)2025 +1629 y(T)-6 b(ranslucen)n(t)25 b(Filesystem)d Fd(:)13 +b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)47 b Fr(51)2025 1717 y(true)25 +b(Selector)h(F)-6 b(unction)17 b Fd(:)c(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)43 +b Fr(30)2025 1804 y(true,)25 b(b)r(o)r(olean)i(moun)n(t)e(selector)12 +b Fd(:)j(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)38 b Fr(30)2025 1892 y(truncate)p 2312 1892 V +33 w(log)27 b(P)n(arameter)14 b Fd(:)g(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40 +b Fr(70)2025 1979 y(t)n(yp)r(e,)25 b(moun)n(t)g(option)15 +b Fd(:)f(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42 b Fr(37)2025 +2067 y(T)n(yp)r(es)25 b(of)i(con\014guration)f(map)13 +b Fd(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:) +g(:)g(:)h(:)39 b Fr(19)2025 2154 y(T)n(yp)r(es)25 b(of)i(\014lesystem) +18 b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44 +b Fr(47)2025 2242 y(T)n(yp)r(es)25 b(of)i(moun)n(t)e(map)e +Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 b Fr(19)2025 +2493 y Fw(U)2025 2610 y Fr(udf,)25 b(\014lesystem)h(t)n(yp)r(e)12 +b Fd(:)g(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)38 b Fr(50)2025 +2697 y(UDP)16 b Fd(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)43 b Fr(67)2025 +2785 y(UDP;)25 b(using)h(with)g(Amq)14 b Fd(:)e(:)i(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +41 b Fr(77)2025 2872 y(UFS)8 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fr(49)2025 2960 y(ufs,)26 b(\014lesystem)g(t)n(yp)r(e)18 +b Fd(:)12 b(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44 b Fr(49)2025 +3047 y(uid)25 b(Selector)h(V)-6 b(ariable)7 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)33 b Fr(28)2025 3135 +y(uid,)25 b(moun)n(t)g(selector)16 b Fd(:)f(:)e(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)43 b Fr(28)2025 3222 y(umapfs,)26 b(\014lesystem)g(t)n(yp)r(e) +14 b Fd(:)e(:)h(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40 b Fr(51)2025 3310 y(umoun)n(t,)25 +b(moun)n(t)g(option)11 b Fd(:)i(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)38 +b Fr(52)2025 3397 y(Union)25 b(\014le)h(maps)8 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34 +b Fr(22)2025 3485 y(Union)25 b(\014lesystem)11 b Fd(:)i(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)37 b Fr(55)2025 3572 +y(union,)25 b(\014lesystem)h(t)n(yp)r(e)6 b Fd(:)13 b(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)33 b Fr(55)2025 3660 y(Unix)24 b(\014lesystem)14 +b Fd(:)g(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40 +b Fr(49)2025 3747 y(Unix)24 b(namespace)15 b Fd(:)g(:)e(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)g(:)g(:)g(:)42 b Fr(14)2025 3835 y(unmoun)n(t)24 +b(attempt)i(bac)n(k)n(o\013)f(in)n(terv)l(al)12 b Fd(:)h(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b Fr(42)2025 3922 +y(unmoun)n(t,)24 b(moun)n(t)i(option)7 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +33 b Fr(52)2025 4010 y(unmoun)n(t)p 2332 4010 V 32 w(on)p +2445 4010 V 34 w(exit)26 b(P)n(arameter)18 b Fd(:)c(:)f(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 +b Fr(70)2025 4097 y(Unmoun)n(ting)24 b(a)i(\014lesystem)14 +b Fd(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)40 b Fr(76,)27 b(77)2025 4185 y(use)p 2137 4185 +V 34 w(tcp)n(wrapp)r(ers)f(P)n(arameter)13 b Fd(:)h(:)f(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)40 +b Fr(70)2025 4272 y(User)25 b(\014lesystems)20 b Fd(:)13 +b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)46 b Fr(107)2025 +4360 y(User)25 b(ID)g(Mapping)i(Filesystem)9 b Fd(:)14 +b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)36 b Fr(51)2025 4447 y(User)25 b(maps,)i(automatic)f(generation)e +Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 +b Fr(21)2025 4535 y(Using)26 b(FSinfo)20 b Fd(:)13 b(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)46 b Fr(79)2025 +4622 y(Using)26 b(Hlfsd)7 b Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)34 b Fr(98)2025 4710 +y(Using)26 b(syslog)g(to)g(log)h(errors)16 b Fd(:)f(:)e(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)43 +b Fr(40)2025 4797 y(Using)26 b(the)f(passw)n(ord)i(\014le)e(as)i(a)f +(map)8 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)35 b Fr(21)2025 5048 y Fw(V)2025 5165 y Fr(V)-6 b(ariable)26 +b(expansion)c Fd(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)49 +b Fr(25)2025 5252 y(v)n(endor)25 b(P)n(arameter)e Fd(:)13 +b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b Fr(70)2025 +5340 y(v)n(endor)25 b(Selector)h(V)-6 b(ariable)15 b +Fd(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)42 b Fr(27)p eop end +%%Page: 128 130 +TeXDict begin 128 129 bop 150 -116 a Fx(128)1810 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 299 y Fr(v)n(endor,)25 +b(moun)n(t)g(selector)7 b Fd(:)15 b(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)34 +b Fr(27)150 386 y(v)n(erb)r(ose,)26 b(FSinfo)g(command)g(line)g(option) +d Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)48 b Fr(89)150 +474 y(V)-6 b(ersion)26 b(information)7 b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)34 b Fr(41)150 561 y(V)-6 b(ersion)26 +b(information)h(at)f(run-time)7 b Fd(:)12 b(:)i(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)34 b Fr(77)150 649 y(v)n(olname,)26 +b(FSinfo)h(moun)n(t)e(option)16 b Fd(:)d(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)42 b Fr(84)150 737 y(V)-6 +b(olume)9 b Fd(:)k(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b Fr(13)150 824 y(V)-6 +b(olume)25 b(binding)7 b Fd(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)g(:)33 b Fr(14)150 912 y(V)-6 b(olume)25 +b(names)11 b Fd(:)j(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:) +g(:)37 b Fr(13)150 1146 y Fw(W)150 1263 y Fq(wait4amd)10 +b Fd(:)15 b(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)g(:)g(:)37 b Fr(104)150 1350 y Fq(wait4amd2die)17 +b Fd(:)f(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:) +f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 +b Fr(104)150 1438 y(Wh)n(y)25 b(Deliv)n(er)g(In)n(to)g(the)h(Home)f +(Directory?)e Fd(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)49 +b Fr(97)150 1526 y(Wildcards)26 b(in)g(maps)7 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)34 b Fr(23)2025 +299 y(wire)26 b(Selector)h(V)-6 b(ariable)6 b Fd(:)14 +b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 b Fr(28)2025 390 y(wire,)27 +b(moun)n(t)e(selector)16 b Fd(:)e(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g +(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)43 +b Fr(28)2025 481 y Fq(wire-test)7 b Fd(:)15 b(:)e(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:) +g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34 b Fr(104)2025 +734 y Fw(X)2025 858 y Fr(XFS)8 b Fd(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h +(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:) +g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 +b Fr(49)2025 949 y(xfs,)26 b(\014lesystem)g(t)n(yp)r(e)18 +b Fd(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g +(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)45 b Fr(49)2025 +1041 y(xhost)25 b(Selector)h(F)-6 b(unction)11 b Fd(:)i(:)g(:)h(:)f(:)g +(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:) +g(:)38 b Fr(30)2025 1132 y(xhost,)25 b(b)r(o)r(olean)i(moun)n(t)e +(selector)6 b Fd(:)15 b(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f +(:)g(:)g(:)g(:)g(:)33 b Fr(30)2025 1402 y Fw(Y)2025 1526 +y Fr(YP)25 b(domain)h(name)12 b Fd(:)h(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g +(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:) +h(:)f(:)g(:)38 b Fr(43)p eop end +%%Page: -1 131 +TeXDict begin -1 130 bop 3725 -116 a Fx(i)150 299 y Fu(T)-13 +b(able)53 b(of)h(Con)l(ten)l(ts)150 639 y Fw(Preface)30 +b Fb(:)20 b(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)74 b +Fw(1)150 908 y(License)34 b Fb(:)19 b(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g +(:)h(:)78 b Fw(3)150 1177 y(Source)45 b(Distribution)10 +b Fb(:)20 b(:)g(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)55 +b Fw(5)150 1447 y(Getting)46 b(Additional)f(Information)25 +b Fb(:)d(:)d(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:) +h(:)f(:)70 b Fw(7)275 1584 y Fx(Bug)30 b(Rep)s(orts)25 +b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)55 b Fx(7)275 1693 y(Mailing)31 b(Lists)17 +b Fa(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)47 b Fx(7)275 1803 y(Am-utils)30 b(Bo)s(ok)d +Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)56 b Fx(8)150 2044 y Fw(In)l(tro)t(duction)35 +b Fb(:)20 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)80 b Fw(9)150 2314 y(History)20 +b Fb(:)g(:)g(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)65 b Fw(11)150 +2583 y(1)135 b(Ov)l(erview)21 b Fb(:)g(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)66 b +Fw(13)275 2720 y Fx(1.1)92 b(F)-8 b(undamen)m(tals)14 +b Fa(:)i(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)44 +b Fx(13)275 2829 y(1.2)92 b(Filesystems)31 b(and)f(V)-8 +b(olumes)15 b Fa(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)44 b Fx(13)275 2939 y(1.3)92 +b(V)-8 b(olume)31 b(Naming)13 b Fa(:)j(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)42 b Fx(13)275 3048 y(1.4)92 b(V)-8 b(olume)31 +b(Binding)12 b Fa(:)j(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)42 +b Fx(14)275 3158 y(1.5)92 b(Op)s(erational)30 b(Principles)d +Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)56 b Fx(14)275 3268 y(1.6)92 +b(Moun)m(ting)31 b(a)g(V)-8 b(olume)19 b Fa(:)d(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)49 b Fx(14)275 3377 y(1.7)92 b(Automatic)32 b(Unmoun)m(ting)20 +b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)50 b Fx(15)275 3487 y(1.8)92 b(Keep-aliv)m(es)28 +b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)56 +b Fx(15)275 3596 y(1.9)92 b(Non-blo)s(c)m(king)31 b(Op)s(eration)15 +b Fa(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)45 b Fx(16)150 3838 y Fw(2)135 b(Supp)t(orted)44 +b(Platforms)21 b Fb(:)g(:)e(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)66 +b Fw(17)150 4107 y(3)135 b(Moun)l(t)44 b(Maps)23 b Fb(:)c(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)67 +b Fw(19)275 4244 y Fx(3.1)92 b(Map)30 b(T)m(yp)s(es)c +Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)56 +b Fx(19)399 4354 y(3.1.1)93 b(File)31 b(maps)20 b Fa(:)c(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)50 b Fx(19)399 4463 y(3.1.2)93 +b(ndbm)28 b(maps)22 b Fa(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)52 +b Fx(20)399 4573 y(3.1.3)93 b(NIS)30 b(maps)20 b Fa(:)14 +b(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)49 b +Fx(20)399 4682 y(3.1.4)93 b(NIS+)29 b(maps)c Fa(:)15 +b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)54 b Fx(21)399 +4792 y(3.1.5)93 b(Hesio)s(d)30 b(maps)22 b Fa(:)15 b(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)51 b Fx(21)399 4902 y(3.1.6)93 b(P)m(assw)m(ord)30 +b(maps)11 b Fa(:)k(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)40 b Fx(21)399 +5011 y(3.1.7)93 b(Union)30 b(maps)16 b Fa(:)f(:)g(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)45 b Fx(22)399 5121 y(3.1.8)93 b(LD)m(AP)31 +b(maps)9 b Fa(:)15 b(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)38 +b Fx(22)399 5230 y(3.1.9)93 b(Executable)31 b(maps)18 +b Fa(:)d(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)47 b Fx(23)275 5340 y(3.2)92 +b(Ho)m(w)31 b(k)m(eys)g(are)f(lo)s(ok)m(ed)i(up)21 b +Fa(:)14 b(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)51 b Fx(23)p eop end +%%Page: -2 132 +TeXDict begin -2 131 bop 150 -116 a Fx(ii)1895 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 83 y(3.3)92 +b(Lo)s(cation)31 b(F)-8 b(ormat)19 b Fa(:)e(:)e(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)48 b Fx(24)399 193 y(3.3.1)93 b(Map)30 b(Defaults)d +Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)55 b Fx(25)399 +302 y(3.3.2)93 b(V)-8 b(ariable)32 b(Expansion)10 b Fa(:)k(:)i(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)40 +b Fx(25)399 412 y(3.3.3)93 b(Selectors)19 b Fa(:)e(:)e(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)49 b Fx(26)524 521 y(3.3.3.1)93 +b(arc)m(h)31 b(Selector)h(V)-8 b(ariable)25 b Fa(:)16 +b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)54 +b Fx(26)524 631 y(3.3.3.2)93 b(auto)s(dir)30 b(Selector)i(V)-8 +b(ariable)25 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)54 +b Fx(26)524 741 y(3.3.3.3)93 b(b)m(yte)31 b(Selector)h(V)-8 +b(ariable)23 b Fa(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)53 b Fx(26)524 850 y(3.3.3.4)93 b(cluster)31 b(Selector)g(V)-8 +b(ariable)18 b Fa(:)f(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)47 +b Fx(26)524 960 y(3.3.3.5)93 b(domain)30 b(Selector)i(V)-8 +b(ariable)23 b Fa(:)17 b(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)53 +b Fx(26)524 1069 y(3.3.3.6)93 b(dollar)31 b(Selector)h(V)-8 +b(ariable)15 b Fa(:)i(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)45 +b Fx(27)524 1179 y(3.3.3.7)93 b(host)31 b(Selector)g(V)-8 +b(ariable)27 b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)55 b Fx(27)524 1289 y(3.3.3.8)93 b(hostd)30 b(Selector)i(V)-8 +b(ariable)20 b Fa(:)d(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)50 +b Fx(27)524 1398 y(3.3.3.9)93 b(k)-5 b(arc)m(h)31 b(Selector)g(V)-8 +b(ariable)23 b Fa(:)17 b(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)52 +b Fx(27)524 1508 y(3.3.3.10)94 b(os)30 b(Selector)i(V)-8 +b(ariable)27 b Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)55 b Fx(27)524 1617 y(3.3.3.11)94 b(osv)m(er)31 +b(Selector)g(V)-8 b(ariable)27 b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)55 b Fx(27)524 1727 y(3.3.3.12)94 b(full)p +1053 1727 28 4 v 39 w(os)31 b(Selector)h(V)-8 b(ariable)22 +b Fa(:)16 b(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)51 b Fx(27)524 +1836 y(3.3.3.13)94 b(v)m(endor)30 b(Selector)h(V)-8 b(ariable)13 +b Fa(:)k(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)42 b Fx(27)524 +1946 y(3.3.3.14)94 b(k)m(ey)31 b(Selector)g(V)-8 b(ariable)19 +b Fa(:)e(:)f(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)49 +b Fx(28)524 2056 y(3.3.3.15)94 b(map)30 b(Selector)h(V)-8 +b(ariable)20 b Fa(:)e(:)d(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)50 +b Fx(28)524 2165 y(3.3.3.16)94 b(netn)m(um)m(b)s(er)29 +b(Selector)j(V)-8 b(ariable)14 b Fa(:)i(:)g(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)44 +b Fx(28)524 2275 y(3.3.3.17)94 b(net)m(w)m(ork)31 b(Selector)g(V)-8 +b(ariable)9 b Fa(:)17 b(:)f(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)39 +b Fx(28)524 2384 y(3.3.3.18)94 b(path)30 b(Selector)h(V)-8 +b(ariable)15 b Fa(:)j(:)d(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)45 +b Fx(28)524 2494 y(3.3.3.19)94 b(wire)30 b(Selector)h(V)-8 +b(ariable)23 b Fa(:)17 b(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)52 +b Fx(28)524 2604 y(3.3.3.20)94 b(uid)29 b(Selector)j(V)-8 +b(ariable)23 b Fa(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)53 b Fx(28)524 2713 y(3.3.3.21)94 b(gid)30 b(Selector)i(V)-8 +b(ariable)27 b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)55 b Fx(29)524 2823 y(3.3.3.22)94 b(exists)31 b(Selector)g(F)-8 +b(unction)27 b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)55 +b Fx(29)524 2932 y(3.3.3.23)94 b(false)31 b(Selector)g(F)-8 +b(unction)8 b Fa(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)38 +b Fx(29)524 3042 y(3.3.3.24)94 b(netgrp)30 b(Selector)h(F)-8 +b(unction)28 b Fa(:)16 b(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)57 +b Fx(29)524 3152 y(3.3.3.25)94 b(netgrp)s(d)29 b(Selector)i(F)-8 +b(unction)21 b Fa(:)c(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)51 +b Fx(29)524 3261 y(3.3.3.26)94 b(in)p 1000 3261 V 39 +w(net)m(w)m(ork)32 b(Selector)f(F)-8 b(unction)21 b Fa(:)c(:)e(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)51 b Fx(30)524 3371 y(3.3.3.27)94 b(true)30 b(Selector)h(F)-8 +b(unction)15 b Fa(:)h(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)44 +b Fx(30)524 3480 y(3.3.3.28)94 b(xhost)30 b(Selector)i(F)-8 +b(unction)8 b Fa(:)16 b(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)38 +b Fx(30)399 3590 y(3.3.4)93 b(Map)30 b(Options)13 b Fa(:)j(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)43 b Fx(30)524 3699 y(3.3.4.1)93 +b(addopts)30 b(Option)e Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)58 b Fx(30)524 3809 +y(3.3.4.2)93 b(dela)m(y)31 b(Option)21 b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)50 +b Fx(31)524 3919 y(3.3.4.3)93 b(fs)30 b(Option)12 b Fa(:)j(:)g(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)41 b Fx(31)524 4028 y(3.3.4.4)93 b(opts)31 +b(Option)20 b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)50 b Fx(31)524 +4138 y(3.3.4.5)93 b(remopts)30 b(Option)25 b Fa(:)16 +b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)55 b Fx(36)524 4247 y(3.3.4.6)93 b(sublink)29 b(Option)22 +b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)51 b Fx(37)524 4357 y(3.3.4.7)93 b(t)m(yp)s(e)31 +b(Option)17 b Fa(:)e(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)47 b Fx(37)p eop +end +%%Page: -3 133 +TeXDict begin -3 132 bop 3674 -116 a Fx(iii)150 83 y +Fw(4)135 b Fg(A)l(md)58 b Fw(Command)45 b(Line)g(Options)25 +b Fb(:)c(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)70 +b Fw(39)275 220 y Fx(4.1)92 b Fp(-a)29 b Fo(directory)35 +b Fa(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)56 +b Fx(39)275 330 y(4.2)92 b Fp(-c)29 b Fo(cac)m(he-in)m(terv)-5 +b(al)20 b Fa(:)f(:)c(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)46 +b Fx(39)275 439 y(4.3)92 b Fp(-d)29 b Fo(domain)22 b +Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)51 b Fx(40)275 549 y(4.4)92 b Fp(-k)29 b Fo(k)m(ernel-arc)m +(hitecture)23 b Fa(:)18 b(:)d(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)47 b Fx(40)275 +658 y(4.5)92 b Fp(-l)29 b Fo(log-option)9 b Fa(:)18 b(:)d(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)39 b Fx(40)275 +768 y(4.6)92 b Fp(-n)22 b Fa(:)14 b(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)51 +b Fx(41)275 878 y(4.7)92 b Fp(-o)29 b Fo(op-sys-v)m(er)34 +b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)56 +b Fx(41)275 987 y(4.8)92 b Fp(-p)22 b Fa(:)14 b(:)i(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +51 b Fx(41)275 1097 y(4.9)92 b Fp(-r)22 b Fa(:)14 b(:)i(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)51 b Fx(41)275 1206 y(4.10)92 b Fp(-t)30 b Fo(timeout.retransmit)15 +b Fa(:)h(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)42 b Fx(41)275 1316 y(4.11)92 +b Fp(-v)19 b Fa(:)c(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)49 b Fx(41)275 +1425 y(4.12)92 b Fp(-w)30 b Fo(w)m(ait-timeout)14 b Fa(:)k(:)d(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)42 b Fx(42)275 1535 y(4.13)92 +b Fp(-x)30 b Fo(opts)23 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)49 b Fx(42)275 1645 +y(4.14)92 b Fp(-y)30 b Fo(NIS-domain)9 b Fa(:)15 b(:)g(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)39 b Fx(43)275 1754 y(4.15)92 +b Fp(-A)30 b Fo(arc)m(hitecture)k Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)57 b Fx(43)275 1864 y(4.16)92 b Fp(-C)30 b +Fo(cluster-name)16 b Fa(:)g(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)41 +b Fx(43)275 1973 y(4.17)92 b Fp(-D)30 b Fo(opts)23 b +Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)49 b Fx(44)275 2083 y(4.18)92 b Fp(-F)30 b +Fo(conf-\014le)k Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)58 b Fx(44)275 2193 y(4.19)92 b Fp(-H)19 b +Fa(:)c(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)49 b Fx(45)275 2302 y(4.20)92 +b Fp(-O)30 b Fo(op-sys-name)25 b Fa(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)50 b Fx(45)275 2412 y(4.21)92 b Fp(-S)19 b +Fa(:)c(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)49 b Fx(45)275 2521 y(4.22)92 +b Fp(-T)30 b Fo(tag)d Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)47 b Fx(45)150 2764 +y Fw(5)135 b(Filesystem)46 b(T)l(yp)t(es)22 b Fb(:)d(:)g(:)h(:)f(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)67 b Fw(47)275 2901 y Fx(5.1)92 +b(Net)m(w)m(ork)31 b(Filesystem)h(\(`)p Fp(nfs)p Fx('\))14 +b Fa(:)i(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)44 b Fx(47)275 3010 y(5.2)92 b(Net)m(w)m(ork)31 +b(Host)h(Filesystem)f(\(`)p Fp(host)p Fx('\))25 b Fa(:)15 +b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)54 b Fx(47)275 +3120 y(5.3)92 b(Net)m(w)m(ork)31 b(Filesystem)h(Group)e(\(`)p +Fp(nfsx)p Fx('\))10 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)40 +b Fx(48)275 3230 y(5.4)92 b(Unix)30 b(Filesystem)i(\(`)p +Fp(ufs)p Fx(',)e(`)p Fp(xfs)p Fx(',)g(or)h(`)p Fp(efs)p +Fx('\))23 b Fa(:)15 b(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)52 b Fx(49)275 +3339 y(5.5)92 b(Cac)m(hing)31 b(Filesystem)g(\(`)p Fp(cachefs)p +Fx('\))26 b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +56 b Fx(49)275 3449 y(5.6)92 b(CD-R)m(OM)31 b(Filesystem)h(\(`)p +Fp(cdfs)p Fx('\))26 b Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)56 b Fx(50)275 3558 y(5.7)92 b(CD-R)m(OM)31 +b(Filesystem)h(\(`)p Fp(udf)p Fx('\))9 b Fa(:)16 b(:)f(:)g(:)h(:)f(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)39 b Fx(50)275 +3668 y(5.8)92 b(Lo)s(opbac)m(k)30 b(Filesystem)i(\(`)p +Fp(lofs)p Fx('\))27 b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)56 b Fx(50)275 3778 y(5.9)92 b(Memory/RAM)31 +b(Filesystem)h(\(`)p Fp(mfs)p Fx('\))27 b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)56 b Fx(51)275 3887 y(5.10)92 b(Null)31 +b(Filesystem)g(\(`)p Fp(nullfs)p Fx('\))22 b Fa(:)16 +b(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)52 +b Fx(51)275 3997 y(5.11)92 b(Flopp)m(y)31 b(Filesystem)h(\(`)p +Fp(pcfs)p Fx('\))16 b Fa(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)46 b Fx(51)275 4106 y(5.12)92 +b(T)-8 b(ranslucen)m(t)31 b(Filesystem)h(\(`)p Fp(tfs)p +Fx('\))27 b Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +56 b Fx(51)275 4216 y(5.13)92 b(Shared)29 b(Memory+Sw)m(ap)h +(Filesystem)i(\(`)p Fp(tmpfs)p Fx('\))18 b Fa(:)e(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)48 b Fx(51)275 +4325 y(5.14)92 b(User)30 b(ID)h(Mapping)f(Filesystem)i(\(`)p +Fp(umapfs)p Fx('\))23 b Fa(:)15 b(:)g(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)52 b Fx(51)275 +4435 y(5.15)92 b(Program)31 b(Filesystem)g(\(`)p Fp(program)p +Fx('\))12 b Fa(:)j(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)41 +b Fx(52)275 4545 y(5.16)92 b(Sym)m(b)s(olic)30 b(Link)g(Filesystem)i +(\(`)p Fp(link)p Fx('\))10 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)40 b Fx(52)275 4654 y(5.17)92 b(Sym)m(b)s(olic)30 +b(Link)g(Filesystem)i(I)s(I)e(\(`)p Fp(linkx)p Fx('\))18 +b Fa(:)d(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)47 b Fx(53)275 4764 y(5.18)92 +b(NFS-Link)30 b(Filesystem)i(\(`)p Fp(nfsl)p Fx('\))21 +b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)50 +b Fx(53)275 4873 y(5.19)92 b(Automoun)m(t)31 b(Filesystem)h(\(`)p +Fp(auto)p Fx('\))8 b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)38 b Fx(54)275 4983 y(5.20)92 b(Direct)32 b(Automoun)m(t)f +(Filesystem)g(\(`)p Fp(direct)p Fx('\))24 b Fa(:)16 b(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)54 +b Fx(55)275 5093 y(5.21)92 b(Union)30 b(Filesystem)i(\(`)p +Fp(union)p Fx('\))11 b Fa(:)k(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)41 b Fx(55)275 5202 y(5.22)92 +b(Error)30 b(Filesystem)h(\(`)p Fp(error)p Fx('\))24 +b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)53 b Fx(56)275 5312 y(5.23)92 b(T)-8 b(op-lev)m(el)32 +b(Filesystem)g(\(`)p Fp(toplvl)p Fx('\))27 b Fa(:)16 +b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)57 b Fx(56)p +eop end +%%Page: -4 134 +TeXDict begin -4 133 bop 150 -116 a Fx(iv)1872 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))275 83 y(5.24)92 +b(Ro)s(ot)31 b(Filesystem)h(\(`)p Fp(root)p Fx('\))16 +b Fa(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)46 b Fx(56)275 193 y(5.25)92 b(Inheritance)31 +b(Filesystem)g(\(`)p Fp(inherit)p Fx('\))21 b Fa(:)15 +b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)51 b Fx(56)150 435 +y Fw(6)135 b(Amd)44 b(Con\014guration)i(File)13 b Fb(:)20 +b(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)h(:)f(:)58 b Fw(59)275 572 y Fx(6.1)92 b(File)31 +b(F)-8 b(ormat)16 b Fa(:)h(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)46 b Fx(59)275 682 y(6.2)92 b(The)29 b(Global)j(Section) +9 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)38 b Fx(59)275 +791 y(6.3)92 b(Regular)31 b(Map)f(Sections)17 b Fa(:)f(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)46 b Fx(59)275 901 y(6.4)92 b(Common)29 b(P)m(arameters)14 +b Fa(:)j(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)44 b Fx(59)399 1010 y(6.4.1)93 +b Fp(autofs_use_lofs)26 b Fx(P)m(arameter)18 b Fa(:)f(:)f(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)48 b Fx(60)399 1120 y(6.4.2)93 +b Fp(browsable_dirs)26 b Fx(P)m(arameter)c Fa(:)17 b(:)e(:)h(:)f(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)52 b Fx(60)399 1230 y(6.4.3)93 +b Fp(map_defaults)27 b Fx(P)m(arameter)9 b Fa(:)17 b(:)e(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)39 b Fx(60)399 +1339 y(6.4.4)93 b Fp(map_options)27 b Fx(P)m(arameter)13 +b Fa(:)k(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)42 +b Fx(60)399 1449 y(6.4.5)93 b Fp(map_type)28 b Fx(P)m(arameter)d +Fa(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)53 b Fx(60)399 1558 y(6.4.6)93 b Fp(mount_type)27 +b Fx(P)m(arameter)16 b Fa(:)i(:)d(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)46 b Fx(61)399 1668 y(6.4.7)93 +b Fp(search_path)27 b Fx(P)m(arameter)13 b Fa(:)k(:)e(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)42 b Fx(61)399 +1778 y(6.4.8)93 b Fp(selectors_in_defaults)24 b Fx(P)m(arameter)17 +b Fa(:)g(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)46 b Fx(61)399 1887 y(6.4.9)93 b +Fp(sun_map_syntax)26 b Fx(P)m(arameter)c Fa(:)17 b(:)e(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)52 b Fx(61)275 1997 y(6.5)92 +b(Global)31 b(P)m(arameters)21 b Fa(:)c(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)51 +b Fx(61)399 2106 y(6.5.1)93 b Fp(arch)29 b Fx(P)m(arameter)18 +b Fa(:)f(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)48 b Fx(61)399 2216 y(6.5.2)93 +b Fp(auto_attrcache)26 b Fx(P)m(arameter)c Fa(:)17 b(:)e(:)h(:)f(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)52 b Fx(61)399 2325 y(6.5.3)93 +b Fp(auto_dir)28 b Fx(P)m(arameter)d Fa(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)53 b +Fx(62)399 2435 y(6.5.4)93 b Fp(cache_duration)26 b Fx(P)m(arameter)c +Fa(:)17 b(:)e(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)52 +b Fx(63)399 2545 y(6.5.5)93 b Fp(cluster)28 b Fx(P)m(arameter)h +Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)57 b Fx(63)399 2654 y(6.5.6)93 b Fp(debug_mtab_file)26 +b Fx(P)m(arameter)18 b Fa(:)f(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +48 b Fx(63)399 2764 y(6.5.7)93 b Fp(debug_options)27 +b Fx(P)m(arameter)g Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)55 b Fx(63)399 2873 y(6.5.8)93 b Fp(dismount_interval)26 +b Fx(P)m(arameter)11 b Fa(:)16 b(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)41 +b Fx(63)399 2983 y(6.5.9)93 b Fp(domain_strip)27 b Fx(P)m(arameter)9 +b Fa(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)39 +b Fx(63)399 3093 y(6.5.10)93 b Fp(exec_map_timeout)26 +b Fx(P)m(arameter)12 b Fa(:)17 b(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)42 +b Fx(63)399 3202 y(6.5.11)93 b Fp(forced_unmounts)27 +b Fx(P)m(arameter)16 b Fa(:)g(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)45 +b Fx(63)399 3312 y(6.5.12)93 b Fp(full_os)29 b Fx(P)m(arameter)d +Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)55 b Fx(64)399 3421 y(6.5.13)93 b Fp(fully_qualified_hosts) +25 b Fx(P)m(arameter)14 b Fa(:)j(:)e(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)44 b Fx(64)399 +3531 y(6.5.14)93 b Fp(hesiod_base)28 b Fx(P)m(arameter)10 +b Fa(:)17 b(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)40 +b Fx(64)399 3641 y(6.5.15)93 b Fp(karch)29 b Fx(P)m(arameter)12 +b Fa(:)17 b(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)42 b Fx(64)399 3750 y(6.5.16)93 +b Fp(ldap_base)28 b Fx(P)m(arameter)18 b Fa(:)e(:)g(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)47 b Fx(64)399 +3860 y(6.5.17)93 b Fp(ldap_cache_maxmem)26 b Fx(P)m(arameter)8 +b Fa(:)17 b(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)38 b Fx(65)399 +3969 y(6.5.18)93 b Fp(ldap_cache_seconds)26 b Fx(P)m(arameter)g +Fa(:)15 b(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)55 b Fx(65)399 4079 y(6.5.19)93 +b Fp(ldap_hostports)27 b Fx(P)m(arameter)19 b Fa(:)e(:)e(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)49 b Fx(65)399 4188 y(6.5.20)93 +b Fp(ldap_proto_version)26 b Fx(P)m(arameter)g Fa(:)15 +b(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)55 b Fx(65)399 4298 y(6.5.21)93 +b Fp(local_domain)27 b Fx(P)m(arameter)h Fa(:)16 b(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)56 b Fx(65)399 4408 y(6.5.22)93 +b Fp(localhost_address)26 b Fx(P)m(arameter)8 b Fa(:)17 +b(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)38 b Fx(65)399 4517 y(6.5.23)93 +b Fp(log_file)28 b Fx(P)m(arameter)21 b Fa(:)c(:)f(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)51 b Fx(65)399 +4627 y(6.5.24)93 b Fp(log_options)28 b Fx(P)m(arameter)10 +b Fa(:)17 b(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)40 +b Fx(65)399 4736 y(6.5.25)93 b Fp(map_reload_interval)25 +b Fx(P)m(arameter)c Fa(:)d(:)d(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)51 b Fx(66)399 +4846 y(6.5.26)93 b Fp(nfs_allow_any_interface)24 b Fx(P)m(arameter)29 +b Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)57 b Fx(66)399 4956 y(6.5.27)93 b Fp(nfs_allow_insecure_port)24 +b Fx(P)m(arameter)29 b Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)57 b Fx(66)399 5065 y(6.5.28)93 +b Fp(nfs_proto)28 b Fx(P)m(arameter)18 b Fa(:)e(:)g(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)47 b Fx(66)399 +5175 y(6.5.29)93 b Fp(nfs_retransmit_counter)25 b Fx(P)m(arameter)10 +b Fa(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)40 b Fx(67)399 5284 y(6.5.30)93 b Fp +(nfs_retransmit_counter_ud)o(p)24 b Fx(P)m(arameter)16 +b Fa(:)h(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)46 +b Fx(67)p eop end +%%Page: -5 135 +TeXDict begin -5 134 bop 3702 -116 a Fx(v)399 83 y(6.5.31)93 +b Fp(nfs_retransmit_counter_tc)o(p)24 b Fx(P)m(arameter)16 +b Fa(:)h(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)46 +b Fx(67)399 193 y(6.5.32)93 b Fp(nfs_retransmit_counter_to)o(plvl)24 +b Fx(P)m(arameter)i Fa(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)55 +b Fx(67)399 302 y(6.5.33)93 b Fp(nfs_retry_interval)26 +b Fx(P)m(arameter)g Fa(:)15 b(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)55 +b Fx(67)399 412 y(6.5.34)93 b Fp(nfs_retry_interval_udp)25 +b Fx(P)m(arameter)10 b Fa(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)40 b Fx(67)399 521 +y(6.5.35)93 b Fp(nfs_retry_interval_tcp)25 b Fx(P)m(arameter)10 +b Fa(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)40 b Fx(67)399 631 y(6.5.36)93 b Fp +(nfs_retry_interval_toplvl)24 b Fx(P)m(arameter)c Fa(:)c(:)g(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)49 b Fx(67)399 +741 y(6.5.37)93 b Fp(nfs_vers)28 b Fx(P)m(arameter)21 +b Fa(:)c(:)f(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)51 b Fx(68)399 850 y(6.5.38)93 b Fp(nis_domain)28 +b Fx(P)m(arameter)14 b Fa(:)j(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)44 b Fx(68)399 960 y(6.5.39)93 b +Fp(normalize_hostnames)25 b Fx(P)m(arameter)c Fa(:)d(:)d(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)51 +b Fx(68)399 1069 y(6.5.40)93 b Fp(normalize_slashes)26 +b Fx(P)m(arameter)8 b Fa(:)17 b(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)38 +b Fx(68)399 1179 y(6.5.41)93 b Fp(os)30 b Fx(P)m(arameter)23 +b Fa(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)53 b Fx(68)399 1289 +y(6.5.42)93 b Fp(osver)29 b Fx(P)m(arameter)12 b Fa(:)17 +b(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)42 b Fx(68)399 1398 y(6.5.43)93 b Fp(pid_file)28 +b Fx(P)m(arameter)21 b Fa(:)c(:)f(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)51 b Fx(68)399 1508 y(6.5.44)93 +b Fp(plock)29 b Fx(P)m(arameter)12 b Fa(:)17 b(:)e(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)42 +b Fx(69)399 1617 y(6.5.45)93 b Fp(portmap_program)27 +b Fx(P)m(arameter)16 b Fa(:)g(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)45 +b Fx(69)399 1727 y(6.5.46)93 b Fp(preferred_amq_port)26 +b Fx(P)m(arameter)g Fa(:)15 b(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)55 +b Fx(69)399 1836 y(6.5.47)93 b Fp(print_pid)28 b Fx(P)m(arameter)18 +b Fa(:)e(:)g(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)47 b Fx(69)399 1946 y(6.5.48)93 b Fp(print_version)27 +b Fx(P)m(arameter)c Fa(:)17 b(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)53 b Fx(69)399 2056 y(6.5.49)93 b Fp(restart_mounts)27 +b Fx(P)m(arameter)19 b Fa(:)e(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +49 b Fx(69)399 2165 y(6.5.50)93 b Fp(show_statfs_entries)25 +b Fx(P)m(arameter)c Fa(:)d(:)d(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)51 b Fx(69)399 +2275 y(6.5.51)93 b Fp(truncate_log)27 b Fx(P)m(arameter)h +Fa(:)16 b(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)56 +b Fx(70)399 2384 y(6.5.52)93 b Fp(unmount_on_exit)27 +b Fx(P)m(arameter)16 b Fa(:)g(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)45 +b Fx(70)399 2494 y(6.5.53)93 b Fp(use_tcpwrappers)27 +b Fx(P)m(arameter)16 b Fa(:)g(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)45 +b Fx(70)399 2604 y(6.5.54)93 b Fp(vendor)29 b Fx(P)m(arameter)8 +b Fa(:)17 b(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)38 b Fx(70)275 2713 y(6.6)92 b(Regular)31 +b(Map)f(P)m(arameters)15 b Fa(:)h(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)44 b Fx(70)399 +2823 y(6.6.1)93 b(map)p 855 2823 28 4 v 40 w(name)30 +b(P)m(arameter)23 b Fa(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)53 b Fx(70)399 2932 y(6.6.2)93 +b(tag)31 b(P)m(arameter)10 b Fa(:)17 b(:)f(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)40 +b Fx(70)275 3042 y(6.7)92 b(amd.conf)30 b(Examples)c +Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)55 b Fx(71)150 3284 +y Fw(7)135 b(Run-time)45 b(Administration)20 b Fb(:)h(:)e(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)65 +b Fw(73)275 3421 y Fx(7.1)92 b(Starting)30 b Ft(A)n(md)d +Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)47 +b Fx(73)275 3531 y(7.2)92 b(Stopping)29 b Ft(A)n(md)j +Fa(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)52 +b Fx(73)275 3641 y(7.3)92 b(Restarting)31 b Ft(A)n(md)21 +b Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)41 +b Fx(73)275 3750 y(7.4)92 b(Con)m(trolling)31 b Ft(A)n(md)25 +b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)45 b +Fx(74)399 3860 y(7.4.1)93 b Ft(A)n(mq)38 b Fx(default)30 +b(information)24 b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)h(:)f(:)53 b Fx(74)399 3969 y(7.4.2)93 b Ft(A)n(mq)38 +b Fp(-f)29 b Fx(option)16 b Fa(:)h(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)46 +b Fx(75)399 4079 y(7.4.3)93 b Ft(A)n(mq)38 b Fp(-h)29 +b Fx(option)16 b Fa(:)h(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)46 b +Fx(75)399 4188 y(7.4.4)93 b Ft(A)n(mq)38 b Fp(-H)29 b +Fx(option)16 b Fa(:)h(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)46 b +Fx(75)399 4298 y(7.4.5)93 b Ft(A)n(mq)38 b Fp(-l)29 b +Fx(option)16 b Fa(:)h(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)46 b +Fx(75)399 4408 y(7.4.6)93 b Ft(A)n(mq)38 b Fp(-m)29 b +Fx(option)16 b Fa(:)h(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)46 b +Fx(75)399 4517 y(7.4.7)93 b Ft(A)n(mq)38 b Fp(-p)29 b +Fx(option)16 b Fa(:)h(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)46 b +Fx(76)399 4627 y(7.4.8)93 b Ft(A)n(mq)38 b Fp(-P)29 b +Fx(option)16 b Fa(:)h(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)46 b +Fx(76)399 4736 y(7.4.9)93 b Ft(A)n(mq)38 b Fp(-q)29 b +Fx(option)16 b Fa(:)h(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)46 b +Fx(76)399 4846 y(7.4.10)93 b Ft(A)n(mq)38 b Fp(-s)30 +b Fx(option)14 b Fa(:)h(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)43 b Fx(76)399 +4956 y(7.4.11)93 b Ft(A)n(mq)38 b Fp(-T)30 b Fx(option)14 +b Fa(:)h(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)43 b Fx(76)399 5065 y(7.4.12)93 +b Ft(A)n(mq)38 b Fp(-U)30 b Fx(option)14 b Fa(:)h(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)43 b Fx(77)399 5175 y(7.4.13)93 b Ft(A)n(mq)38 b Fp(-u)30 +b Fx(option)14 b Fa(:)h(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)43 b Fx(77)399 +5284 y(7.4.14)93 b Ft(A)n(mq)38 b Fp(-v)30 b Fx(option)14 +b Fa(:)h(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)43 b Fx(77)p eop end +%%Page: -6 136 +TeXDict begin -6 135 bop 150 -116 a Fx(vi)1872 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))399 83 y(7.4.15)93 +b Ft(A)n(mq)38 b Fp(-w)30 b Fx(option)14 b Fa(:)h(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)43 b Fx(77)399 193 y(7.4.16)93 b(Other)30 b Ft(A)n(mq)38 +b Fx(options)8 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)38 b Fx(77)150 435 y +Fw(8)135 b(FSinfo)28 b Fb(:)19 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)73 +b Fw(79)275 572 y Fx(8.1)92 b Ft(FSinfo)36 b Fx(o)m(v)m(erview)10 +b Fa(:)18 b(:)d(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)40 +b Fx(79)275 682 y(8.2)92 b(Using)30 b Ft(FSinfo)15 b +Fa(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)39 +b Fx(79)275 791 y(8.3)92 b Ft(FSinfo)36 b Fx(grammar)23 +b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)52 b +Fx(80)275 901 y(8.4)92 b Ft(FSinfo)36 b Fx(host)31 b(de\014nitions)20 +b Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)50 b Fx(80)275 1010 y(8.5)92 +b Ft(FSinfo)36 b Fx(host)31 b(attributes)10 b Fa(:)16 +b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)39 b Fx(80)399 1120 y(8.5.1)93 b(netif)30 +b(Option)11 b Fa(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)41 +b Fx(81)399 1230 y(8.5.2)93 b(con\014g)30 b(Option)25 +b Fa(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)55 b Fx(81)399 +1339 y(8.5.3)93 b(arc)m(h)31 b(Option)16 b Fa(:)f(:)g(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)46 b Fx(82)399 1449 y(8.5.4)93 b(os)30 +b(Option)20 b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)49 +b Fx(82)399 1558 y(8.5.5)93 b(cluster)31 b(Option)9 b +Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)39 b Fx(82)275 +1668 y(8.6)92 b Ft(FSinfo)36 b Fx(\014lesystems)11 b +Fa(:)16 b(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)41 b Fx(82)399 +1778 y(8.6.1)93 b(fst)m(yp)s(e)30 b(Option)22 b Fa(:)15 +b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)52 b Fx(84)399 1887 y(8.6.2)93 +b(opts)30 b(Option)17 b Fa(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)47 +b Fx(84)399 1997 y(8.6.3)93 b(passno)30 b(Option)9 b +Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)39 b Fx(84)399 +2106 y(8.6.4)93 b(freq)30 b(Option)24 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)54 b Fx(84)399 2216 y(8.6.5)93 b(moun)m(t)30 +b(Option)14 b Fa(:)h(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)43 +b Fx(84)399 2325 y(8.6.6)93 b(dumpset)29 b(Option)12 +b Fa(:)j(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)42 b Fx(85)399 2435 y(8.6.7)93 +b(log)31 b(Option)22 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)52 b Fx(85)275 2545 y(8.7)92 b Ft(FSinfo)36 b Fx(static)c(moun)m +(ts)14 b Fa(:)h(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)43 b Fx(85)275 2654 +y(8.8)92 b(De\014ning)30 b(an)g Ft(A)n(md)40 b Fx(Moun)m(t)31 +b(Map)g(in)f Ft(FSinfo)d Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)50 +b Fx(86)275 2764 y(8.9)92 b Ft(FSinfo)36 b Fx(Command)30 +b(Line)g(Options)d Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)57 b Fx(88)399 2873 y(8.9.1)93 b Fp(-a)30 b Fo(auto)s(dir)f +Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)53 +b Fx(88)399 2983 y(8.9.2)93 b Fp(-b)30 b Fo(b)s(o)s(otparams)19 +b Fa(:)c(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)45 b Fx(88)399 3093 +y(8.9.3)93 b Fp(-d)30 b Fo(dumpsets)25 b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)52 b Fx(88)399 3202 y(8.9.4)93 b Fp(-e)30 +b Fo(exp)s(ortfs)13 b Fa(:)h(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +39 b Fx(89)399 3312 y(8.9.5)93 b Fp(-f)30 b Fo(fstab)15 +b Fa(:)f(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)42 +b Fx(89)399 3421 y(8.9.6)93 b Fp(-h)30 b Fo(hostname)25 +b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)49 b Fx(89)399 +3531 y(8.9.7)93 b Fp(-m)30 b Fo(moun)m(t-maps)e Fa(:)15 +b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)54 b Fx(89)399 3641 y(8.9.8)93 +b Fp(-q)24 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)55 b Fx(89)399 3750 y(8.9.9)93 +b Fp(-v)24 b Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)55 b Fx(89)399 3860 y(8.9.10)93 +b Fp(-D)30 b Fo(name)5 b Ft([=defn])20 b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)40 +b Fx(89)399 3969 y(8.9.11)93 b Fp(-I)30 b Fo(directory)36 +b Fa(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)57 b Fx(90)399 +4079 y(8.9.12)93 b Fp(-U)30 b Fo(name)25 b Fa(:)16 b(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)h(:)f(:)g(:)50 b Fx(90)275 4188 y(8.10)92 +b(Errors)29 b(pro)s(duced)g(b)m(y)h Ft(FSinfo)21 b Fa(:)c(:)e(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)45 +b Fx(90)p eop end +%%Page: -7 137 +TeXDict begin -7 136 bop 3652 -116 a Fx(vii)150 83 y +Fw(9)135 b(Hlfsd)10 b Fb(:)20 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)55 +b Fw(93)275 220 y Fx(9.1)92 b(In)m(tro)s(duction)30 b(to)h(Hlfsd)10 +b Fa(:)k(:)i(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)39 b Fx(93)275 330 y(9.2)92 +b(Bac)m(kground)31 b(to)g(Mail)g(Deliv)m(ery)17 b Fa(:)h(:)d(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)47 b Fx(95)399 +439 y(9.2.1)93 b(Single-Host)32 b(Mail)f(Sp)s(o)s(ol)f(Directory)19 +b Fa(:)d(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)48 b Fx(95)399 549 y(9.2.2)93 +b(Cen)m(tralized)31 b(Mail)h(Sp)s(o)s(ol)e(Directory)19 +b Fa(:)d(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)48 b Fx(95)399 658 y(9.2.3)93 +b(Distributed)30 b(Mail)i(Sp)s(o)s(ol)d(Service)d Fa(:)15 +b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)55 b Fx(96)399 768 +y(9.2.4)93 b(Wh)m(y)31 b(Deliv)m(er)h(In)m(to)f(the)f(Home)h +(Directory?)21 b Fa(:)c(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)50 b Fx(97)275 878 y(9.3)92 b(Using)30 +b(Hlfsd)20 b Fa(:)15 b(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)49 b Fx(98)399 987 y(9.3.1)93 b(Con)m(trolling)31 +b(Hlfsd)13 b Fa(:)i(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)43 b Fx(98)399 1097 +y(9.3.2)93 b(Hlfsd)30 b(Options)19 b Fa(:)c(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)49 b Fx(98)399 1206 y(9.3.3)93 b(Hlfsd)30 b(Files)20 +b Fa(:)c(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)50 b Fx(100)150 +1449 y Fw(10)135 b(Assorted)45 b(T)-11 b(o)t(ols)29 b +Fb(:)19 b(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)73 +b Fw(101)275 1586 y Fx(10.1)92 b(am-eject)18 b Fa(:)f(:)e(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)48 b Fx(101)275 +1695 y(10.2)92 b(amd.conf-sample)15 b Fa(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)45 b Fx(101)275 1805 y(10.3)92 b(amd2ldif)13 b Fa(:)i(:)g(:)h(:)f +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)43 +b Fx(101)275 1914 y(10.4)92 b(amd2sun)9 b Fa(:)14 b(:)i(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)39 b Fx(101)275 +2024 y(10.5)92 b(automoun)m(t2amd)23 b Fa(:)16 b(:)g(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)53 b Fx(101)275 2134 y(10.6)92 b(ctl-amd)14 b +Fa(:)i(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)44 b Fx(102)275 2243 y(10.7)92 b(ctl-hlfsd)25 b Fa(:)16 +b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)55 +b Fx(102)275 2353 y(10.8)92 b(\014x-amd-map)15 b Fa(:)g(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)45 b Fx(102)275 2462 y(10.9)92 +b(\014xmoun)m(t)9 b Fa(:)15 b(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)39 b Fx(103)275 2572 y(10.10)93 +b(\014xrm)m(tab)14 b Fa(:)g(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)44 b Fx(103)275 2682 y(10.11)93 b(lostaltmail)14 +b Fa(:)j(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)44 +b Fx(103)275 2791 y(10.12)93 b(lostaltmail.conf-sample)10 +b Fa(:)18 b(:)e(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)40 b Fx(103)275 2901 y(10.13)93 b(mk-amd-map)20 +b Fa(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)50 b +Fx(103)275 3010 y(10.14)93 b(pa)m(wd)18 b Fa(:)c(:)i(:)f(:)g(:)h(:)f(:) +h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)48 b +Fx(103)275 3120 y(10.15)93 b(redhat-ctl-amd)9 b Fa(:)16 +b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)39 b Fx(104)275 3230 +y(10.16)93 b(w)m(ait4amd)10 b Fa(:)16 b(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)40 b Fx(104)275 3339 y(10.17)93 +b(w)m(ait4amd2die)10 b Fa(:)17 b(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +40 b Fx(104)275 3449 y(10.18)93 b(wire-test)11 b Fa(:)16 +b(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)41 +b Fx(104)150 3691 y Fw(11)135 b(Examples)27 b Fb(:)20 +b(:)g(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +71 b Fw(107)275 3828 y Fx(11.1)92 b(User)30 b(Filesystems)13 +b Fa(:)18 b(:)d(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)43 b Fx(107)275 +3938 y(11.2)92 b(Home)31 b(Directories)23 b Fa(:)17 b(:)f(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:) +g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f +(:)h(:)f(:)53 b Fx(108)275 4047 y(11.3)92 b(Arc)m(hitecture)32 +b(Sharing)14 b Fa(:)g(:)h(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)44 b Fx(109)275 4157 +y(11.4)92 b(Wildcard)31 b(Names)g(&)f(Replicated)i(Serv)m(ers)27 +b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)58 b Fx(110)275 4266 y(11.5)92 +b(`)p Fp(rwho)p Fx(')30 b(serv)m(ers)16 b Fa(:)g(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:) +f(:)h(:)f(:)g(:)h(:)46 b Fx(110)275 4376 y(11.6)92 b(`)p +Fp(/vol)p Fx(')24 b Fa(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)55 b Fx(110)275 4486 y(11.7)92 +b(`)p Fp(/defaults)p Fx(')28 b(with)i(selectors)25 b +Fa(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +53 b Fx(111)275 4595 y(11.8)92 b(`)p Fp(/tftpboot)p Fx(')28 +b(in)i(a)h(c)m(hro)s(ot-ed)h(en)m(vironmen)m(t)17 b Fa(:)f(:)f(:)h(:)f +(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)47 +b Fx(112)150 4838 y Fw(12)135 b(In)l(ternals)22 b Fb(:)f(:)e(:)g(:)h(:) +f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)66 +b Fw(115)275 4975 y Fx(12.1)92 b(Log)31 b(Messages)16 +b Fa(:)h(:)f(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)46 +b Fx(115)399 5084 y(12.1.1)93 b(F)-8 b(atal)33 b(errors)19 +b Fa(:)14 b(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:) +h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)49 b Fx(115)399 +5194 y(12.1.2)93 b(Info)30 b(messages)19 b Fa(:)e(:)e(:)h(:)f(:)g(:)h +(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h +(:)49 b Fx(116)p eop end +%%Page: -8 138 +TeXDict begin -8 137 bop 150 -116 a Fx(viii)1822 b(Am-utils)30 +b(\(4.4BSD)j(Automoun)m(ter)d(Utilities\))150 83 y Fw(Ac)l(kno)l +(wledgmen)l(ts)46 b(&)f(T)-11 b(rademarks)21 b Fb(:)f(:)f(:)h(:)f(:)h +(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)65 b Fw(119)150 +353 y(Index)15 b Fb(:)k(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f +(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:) +f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)59 +b Fw(121)p eop end +%%Trailer + +userdict /end-hook known{end-hook}if +%%EOF diff --git a/doc/am-utils.texi b/doc/am-utils.texi index 1cc46b608ba..2430bafa482 100644 --- a/doc/am-utils.texi +++ b/doc/am-utils.texi @@ -1,6 +1,6 @@ \input texinfo @c -*-texinfo-*- @c -@c Copyright (c) 1997-2006 Erez Zadok +@c Copyright (c) 1997-2014 Erez Zadok @c Copyright (c) 1989 Jan-Simon Pendry @c Copyright (c) 1989 Imperial College of Science, Technology & Medicine @c Copyright (c) 1989 The Regents of the University of California. @@ -17,11 +17,7 @@ @c 2. Redistributions in binary form must reproduce the above copyright @c notice, this list of conditions and the following disclaimer in the @c documentation and/or other materials provided with the distribution. -@c 3. All advertising materials mentioning features or use of this software -@c must display the following acknowledgment: -@c This product includes software developed by the University of -@c California, Berkeley and its contributors. -@c 4. Neither the name of the University nor the names of its contributors +@c 3. Neither the name of the University nor the names of its contributors @c may be used to endorse or promote products derived from this software @c without specific prior written permission. @c @@ -60,14 +56,14 @@ (Originally by Jan-Simon Pendry and Nick Williams) @page -Copyright @copyright{} 1997-2006 Erez Zadok +Copyright @copyright{} 1997-2014 Erez Zadok @* Copyright @copyright{} 1989 Jan-Simon Pendry @* Copyright @copyright{} 1989 Imperial College of Science, Technology & Medicine @* Copyright @copyright{} 1989 The Regents of the University of California. -@sp +@sp 1 All Rights Reserved. @vskip 1ex Permission to copy this document, or any portion of it, as @@ -93,7 +89,7 @@ For version @value{VERSION}, @value{UPDATED} @* (Originally by Jan-Simon Pendry and Nick Williams) -Copyright @copyright{} 1997-2006 Erez Zadok +Copyright @copyright{} 1997-2014 Erez Zadok @* Copyright @copyright{} 1989 Jan-Simon Pendry @* @@ -178,16 +174,6 @@ 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. -@item -All advertising materials mentioning features or use of this software -must display the following acknowledgment: - -@cartouche -``This product includes software developed by the University of -California, Berkeley and its contributors, as well as the Trustees of -Columbia University.'' -@end cartouche - @item Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software @@ -234,7 +220,7 @@ Revision 5.3bsdnet, a late alpha version of 5.3, was part of the BSD network version 2 distribution Revision 6.0 was made independently by -@email{ezk@@cs.columbia.edu,Erez Zadok} at the Computer Science +Erez Zadok at the Computer Science Department of @uref{http://www.cs.columbia.edu/,Columbia University}, as part of his @uref{http://www.fsl.cs.sunysb.edu/docs/zadok-thesis-proposal/,PhD @@ -262,7 +248,8 @@ If you find a problem and hopefully you can reproduce it, please describe it in detail and @uref{https://bugzilla.filesystems.org/,submit a bug report} via @uref{http://www.bugzilla.org/,Bugzilla}. Alternatively, you can send -your bug report to @email{am-utils@@am-utils.org} quoting the details +your bug report to the ``am-utils'' list (see +@url{http://www.am-utils.org/} under ``Mailing Lists'') quoting the details of the release and your configuration. These details can be obtained by running the command @samp{amd -v}. It would greatly help if you could provide a reproducible procedure for detecting the bug you are @@ -297,11 +284,10 @@ discussions of new features for am-utils implementation and porting issues @end itemize -To subscribe, visit -@url{http://lists.am-utils.org/mailman/listinfo/am-utils}. After -subscribing, you can post a message to this list at -@email{am-utils@@am-utils.org}. To avoid as much spam as -possible, only subscribers to this list may post to it. +To subscribe, visit @url{http://www.am-utils.org/} under ``Mailing +Lists.'' After subscribing, you can post a message to this list. To +avoid as much spam as possible, only subscribers to this list may post +to it. Subscribers of @samp{am-utils} are most helpful if they have the time and resources to test new and development versions of amd, on as many @@ -318,7 +304,7 @@ before January 1st, 2004. Please use the new name, @samp{am-utils}. @item The announcements mailing list, @samp{am-utils-announce} is for announcements only (mostly new releases). To subscribe, visit -@url{http://lists.am-utils.org/mailman/listinfo/am-utils-announce}. +@url{http://www.am-utils.org/} under ``Mailing Lists.'' This list is read-only: only am-utils developers may post to it. @item @@ -326,17 +312,18 @@ We distribute nightly CVS snapshots in @url{ftp://ftp.am-utils.org/pub/am-utils/snapshots/daily/}. If you like to get email notices of commits to the am-utils CVS repository, subscribe to the CVS logs mailing list, @samp{am-utils-cvs} at -@url{http://lists.am-utils.org/mailman/listinfo/am-utils-cvs}. +@url{http://www.am-utils.org/} under ``Mailing Lists.'' @item The older list which was used to user discussions, @samp{amd-workers}, is defunct as of January 2004. (Its last address was -@email{amd-workers@@majordomo.glue.umd.edu}.) Don't use +@email{amd-workers AT majordomo.glue.umd.edu}.) Don't use @samp{amd-workers}: use the newer, more active @samp{am-utils} list. @item For completeness, there's a developers-only closed list called -@samp{am-utils-developers@@am-utils.org}. +@samp{am-utils-developers} (see @url{http://www.am-utils.org/} under +``Mailing Lists''). @end enumerate @@ -346,7 +333,7 @@ For completeness, there's a developers-only closed list called @cindex Automounter book @cindex book -@email{ezk@@cs.sunysb.edu,Erez Zadok} wrote a +@uref{http://www.cs.sunysb.edu/~ezk,Erez Zadok} wrote a @uref{http://www.fsl.cs.sunysb.edu/docs/amd-book/,book}, titled @i{Linux NFS and Automounter Administration}, ISBN 0-7821-2739-8, (Sybex, 2001). The book is full of details and examples that go beyond what this manual @@ -389,7 +376,7 @@ numerous flavors of Unix. The @i{Amd} package has been without an official maintainer since 1992. Several people have stepped in to maintain it unofficially. Most notable were the `upl' (Unofficial Patch Level) releases of @i{Amd}, -created by me (@email{ezk@@cs.sunysb.edu,Erez Zadok}), and available from +created by me (@uref{http://www.cs.sunysb.edu/~ezk,Erez Zadok}), and available from @url{ftp://ftp.am-utils.org/pub/amd/}. The last such unofficial release was `upl102'. @@ -428,7 +415,7 @@ end-user, aside from the fact that @code{/bin/pwd} now always returns the correct amd-ified path. The administrator can easily switch between NFS and autofs mounts by changing one parameter in @code{amd.conf}. Autofs support and maintenance was developed in -conjunction with @email{ionut@@badula.org,Ion Badulescu}. +conjunction with @email{ionut AT badula.org,Ion Badulescu}. @c ################################################################ @node Overview, Supported Platforms, History, Top @@ -1040,7 +1027,7 @@ Similarly, if the password file entry was the map entry used by @i{Amd} would be @example -rfs:=/home/sugar;rhost:=sugar.cc;sublink:=jsp +rfs:=/home/sugar;rhost:=sugar.cc;sublink:=mhj @end example @c ---------------------------------------------------------------- @@ -1795,8 +1782,8 @@ Always evaluates to false. @i{ARG} is ignored. The argument @i{ARG} of this selector is a netgroup name followed optionally by a comma and a host name. If the host name is not specified, it defaults to @code{$@{host@}}. If the host name (short -name) is a member of the netgroup, this selector evaluates to -true. Otherwise it evaluates to false. +name) is a member of the netgroup, this selector evaluates to true. +Otherwise it evaluates to false. For example, suppose you have a netgroup @samp{ppp-hosts}, and for reasons of performance, these have a local @file{/home} partition, @@ -2098,6 +2085,10 @@ Ignore this mount by @b{df}(1). @cindex Mount flags; cache Allow data to be cached from a remote server for this mount. +@item closesession +@cindex Mount flags; closesession +For UDF mounts, close the session when unmounting. + @item compress @cindex Mount flags; compress Use NFS compression protocol. @@ -2137,10 +2128,16 @@ Set ID of filesystem. Enable generations in ISO-9660 file systems. Generations allow you to see all versions of a given file. +@item gmtoff=@var{n} +@cindex Mount flags; gmtoff +For UDF mounts, set the time zone offset from UTC to @var{n} seconds, +with positive values indicating east of the Prime Meridian. If not +set, the user's current time zone will be used. + @item group=@var{n} @cindex Mount flags; group -For PCFS mounts, set the group of the files in the file system to -@var{n} (which can either be a group name or a GID number). The +For PCFS and UDF mounts, set the group of the files in the file system +to @var{n} (which can either be a group name or a GID number). The default group is the group of the directory on which the file system is being mounted. @@ -2199,6 +2196,11 @@ is used. Do not allow data to be cached from a remote server for this mount. +@item nocasetrans +@cindex Mount flags; nocasetrans +Don't do case translation. Useful for CD-ROMS formatted as +ISO-9660. + @item noconn @cindex Mount flags; noconn Don't make a connection on datagram transports. @@ -2226,6 +2228,10 @@ Don't allow program execution. @cindex Mount flags; noint Do not allow keyboard interrupts for this mount +@item nojoliet +@cindex Mount flags; nojoliet +Turn off the Joliet extensions. Useful for CD-ROMS formatted as ISO-9660. + @item nolock @cindex Mount flags; nolock Do not use the NFS locking protocol @@ -2320,6 +2326,11 @@ trying}. @cindex Mount flags; retry Set the NFS retry counter. +@item rrcaseins +@cindex Mount flags; rrcaseins +Enable the Rock Ridge Interchange Protocol (RRIP) case insensitive extensions. +Useful for CD-ROMS formatted as ISO-9660. + @item rrip @cindex Mount flags; rrip Uses the Rock Ridge Interchange Protocol (RRIP) extensions to ISO-9660. @@ -2333,6 +2344,10 @@ NFS/UDP through a gateway or a slow link. @cindex Mount flags; rw Allow reads and writes on this filesystem. +@item sessionnr=@var{n} +@cindex Mount Flags; sessionnr +For multisession UDF mounts, use session number @var{n} when mounting. + @item shortname @cindex Mount Flags; longname For PCFS mounts, force old DOS short names only. @@ -2368,8 +2383,8 @@ The NFS timeout, in tenth-seconds, before a request is retransmitted. @item user=@var{n} @cindex Mount flags; user -For PCFS mounts, set the owner of the files in the file system to -@var{n} (which can either be a user name or a UID number). The +For PCFS and UDF mounts, set the owner of the files in the file system +to @var{n} (which can either be a user name or a UID number). The default owner is the owner of the directory on which the file system is being mounted. @@ -2824,13 +2839,13 @@ Copyright (c) 1990 Jan-Simon Pendry Copyright (c) 1990 Imperial College of Science, Technology & Medicine Copyright (c) 1990 The Regents of the University of California. am-utils version 6.0a15 (build 61). -Built by ezk@@cs.columbia.edu on date Wed Oct 22 15:21:03 EDT 1997. +Built by ezk@@example.com on date Wed Oct 22 15:21:03 EDT 1997. cpu=sparc (big-endian), arch=sun4, karch=sun4u. full_os=solaris2.5.1, os=sos5, osver=5.5.1, vendor=sun. Map support for: root, passwd, union, nisplus, nis, ndbm, file, error. AMFS: nfs, link, nfsx, nfsl, host, linkx, program, union, inherit, ufs, lofs, hsfs, pcfs, auto, direct, toplvl, error. -FS: autofs, cachefs, cdfs, lofs, nfs, nfs3, pcfs, tfs, tmpfs, ufs. +FS: autofs, cachefs, cdfs, lofs, nfs, nfs3, pcfs, tfs, tmpfs, udf, ufs. Network 1: wire="mcl-lab-net.cs.columbia.edu" (netnumber=128.59.13). Network 2: wire="14-net.cs.columbia.edu" (netnumber=128.59.14). Network 3: wire="old-net.cs.columbia.edu" (netnumber=128.59.16). @@ -2879,9 +2894,9 @@ a comma separated list selected from the following options: @table @code @item fatal -Fatal errors +Fatal errors (cannot be turned off) @item error -Non-fatal errors +Non-fatal errors (cannot be turned off) @item user Non-fatal user errors @item warn @@ -2896,10 +2911,15 @@ Mount map usage Additional statistics @item all All of the above +@item defaults +An alias for "fatal,error,user,warning,info". @end table Initially a set of default logging flags is enabled. This is as if -@samp{-x all,nomap,nostats} had been selected. The command line is +@samp{-x defaults} +or +@samp{-x fatal,error,user,warning,info} +had been selected. The command line is parsed and logging is controlled by the @code{-x} option. The very first set of logging flags is saved and can not be subsequently disabled using @i{Amq}. This default set of options is useful for general production @@ -2932,7 +2952,6 @@ of the message types.@refill @samp{LOG_INFO} @end table - The options can be prefixed by the string @samp{no} to indicate that this option should be turned off. For example, to obtain all but @samp{info} messages the option @samp{-x all,noinfo} would be used. @@ -3011,13 +3030,17 @@ can be prefixed with @samp{no} to turn it off. @table @code @item all -all ``reasonable'' options (currently trace|str|full|mem|info|readdir) +all options (excluding hrtime and mtab) +@item defaults +``sensible'' default options (all--excluding hrtime, mtab, and xdrtrace) +@item test +full debug options plus mtab,nodaemon,nofork,noamq @item amq -do not register for amq +register @i{Amd} with the RPC portmapper, for @i{Amq} @item daemon -do not enter daemon mode +enter daemon mode @item fork -do not fork child worker (hlfsd only) +fork child worker (hlfsd only) @item full program trace @item hrtime @@ -3028,16 +3051,14 @@ print high resolution time stamps (only if @b{syslog}(3) is not used) info service specific debugging (hesiod, nis, etc.) In the case of hesiod maps, turns on the hesiod RES_DEBUG internal debugging option. @item mem -trace memory allocations. Needs to be explicitly enabled at compile +trace memory allocations. Needs to be explicitly enabled at compile time with --enable-debug=mem. @item mtab -use local @file{./mtab} file +use local mount-table file (defaults to @file{/tmp/mtab}, @pxref{debug_mtab_file Parameter}) @item readdir show readdir progress @item str debug string munging -@item test -full debug but no daemon @item trace trace RPC protocol and NFS mount arguments @item xdrtrace @@ -3150,6 +3171,7 @@ effect visible to the user.@refill * Unix Filesystem:: Native disk filesystem. * Caching Filesystem:: Caching from remote server filesystem. * CD-ROM Filesystem:: ISO9660 CD ROM. +* UDF Filesystem:: Universal Disk Format filesystem. * Loopback Filesystem:: Local loopback-mount filesystem. * Memory/RAM Filesystem:: A memory or RAM-based filesystem. * Null Filesystem:: 4.4BSD's loopback-mount filesystem. @@ -3475,7 +3497,7 @@ inconsistent, requiring running the command @file{fsck -F cachefs @end enumerate @c ---------------------------------------------------------------- -@node CD-ROM Filesystem, Loopback Filesystem, Caching Filesystem, Filesystem Types +@node CD-ROM Filesystem, UDF Filesystem, Caching Filesystem, Filesystem Types @comment node-name, next, previous, up @section CD-ROM Filesystem (@samp{cdfs}) @cindex CD-ROM Filesystem @@ -3504,7 +3526,36 @@ cdfs os==sunos4;type:=cdfs;dev:=/dev/sr0 \ @end example @c ---------------------------------------------------------------- -@node Loopback Filesystem, Memory/RAM Filesystem, CD-ROM Filesystem, Filesystem Types +@node UDF Filesystem, Loopback Filesystem, CD-ROM Filesystem, Filesystem Types +@comment node-name, next, previous, up +@section CD-ROM Filesystem (@samp{udf}) +@cindex CD-ROM Filesystem +@cindex udf, filesystem type +@cindex Filesystem type; udf + +The @dfn{udf} (@samp{type:=udf}) filesystem mounts media with a +Universal Disk Format (UDF) filesystem on it, e.g., a video DVD. + +@noindent +The following option must be specified: + +@table @code +@cindex dev, mount option +@cindex Mount option; dev +@item dev +the block special device to be mounted. +@end table + +Some operating systems will fail to mount read-only media unless the +@samp{ro} option is specified. A udf entry might be: + +@example +udf os==sunos4;type:=udf;dev:=/dev/sr0 \ + os==sunos5;addopts:=ro;type:=udf;dev:=/dev/dsk/c0t6d0s2 +@end example + +@c ---------------------------------------------------------------- +@node Loopback Filesystem, Memory/RAM Filesystem, UDF Filesystem, Filesystem Types @comment node-name, next, previous, up @section Loopback Filesystem (@samp{lofs}) @cindex Loopback Filesystem @@ -4203,6 +4254,7 @@ sections that follow. * mount_type Parameter:: * search_path Parameter:: * selectors_in_defaults Parameter:: +* sun_map_syntax Parameter:: @end menu @c ---------------------------------------------------------------- @@ -4326,7 +4378,7 @@ sites can allow for local map customizations and overrides, and can distributed maps in several locations as needed. @c ---------------------------------------------------------------- -@node selectors_in_defaults Parameter, , search_path Parameter, Common Parameters +@node selectors_in_defaults Parameter, sun_map_syntax Parameter, search_path Parameter, Common Parameters @comment node-name, next, previous, up @subsection @t{selectors_in_defaults} Parameter @cindex selectors_in_defaults Parameter @@ -4346,6 +4398,15 @@ performance over slow slip-based networks as follows: Deprecated form: selectors_on_default. +@c ---------------------------------------------------------------- +@node sun_map_syntax Parameter, , selectors_in_defaults Parameter, Common Parameters +@comment node-name, next, previous, up +@subsection @t{sun_map_syntax} Parameter +@cindex sun_map_syntax Parameter + +(type=boolean, default=@samp{no}). If @samp{yes}, then @i{Amd} will +parse the map according to the Sun Automount syntax. + @c ================================================================ @node Global Parameters, Regular Map Parameters, Common Parameters, Amd Configuration File @@ -4527,14 +4588,14 @@ remain in the cache. (type=string, default no cluster). Same as the @code{-C} option to @i{Amd}. Specifies the alternate HP-UX cluster to use. -@c ---------------------------------------------------------------- -@node debug_mtab_file Parameter, debug_options Parameter, cluster Parameter, Global Parameters -@comment node-name, next, previous, up -@subsection @t{debug_mtab_file} Parameter -@cindex debug_mtab_file Parameter +@c ---------------------------------------------------------------- +@node debug_mtab_file Parameter, debug_options Parameter, cluster Parameter, Global Parameters +@comment node-name, next, previous, up +@subsection @t{debug_mtab_file} Parameter +@cindex debug_mtab_file Parameter -(type=string, default="/tmp/mnttab"). Path to mtab file that is used -by @i{Amd} to store a list of mounted file systems during debug-mtab mode. +(type=string, default="/tmp/mtab"). Path to mtab file that is used +by @i{Amd} to store a list of mounted file systems during debug-mtab mode. This option only applies to systems that store mtab information on disk. @c ---------------------------------------------------------------- @@ -4774,7 +4835,7 @@ is generally a bad idea to use those reserved for other services such as @subsection @t{log_options} Parameter @cindex log_options Parameter -(type=string, default no logging options). Same as the @code{-x} +(type=string, default=``defaults''). Same as the @code{-x} option to @i{Amd}. Specify any logging options for @i{Amd}. Options are comma delimited, and can be preceded by the string @samp{no} to negate their meaning. The @samp{debug} logging option is only available @@ -4785,12 +4846,14 @@ values are: @table @samp @item all all messages +@item defaults +an alias for "fatal,error,user,warning,info" @item debug debug messages @item error -non-fatal system errors +non-fatal system errors (cannot be turned off) @item fatal -fatal errors +fatal errors (cannot be turned off) @item info information @item map @@ -5271,7 +5334,7 @@ restart_mounts = yes auto_dir = /n log_file = /var/log/amd log_options = all -#debug_options = all +#debug_options = defaults plock = no selectors_in_defaults = yes # config.guess picks up "sunos5" and I don't want to edit my maps yet @@ -5436,6 +5499,7 @@ mount point. * Amq -m option:: Obtaining mount statistics. * Amq -p option:: Getting Amd's process ID. * Amq -P option:: Contacting alternate Amd processes. +* Amq -q option:: Suppress synchronous unmounting errors. * Amq -s option:: Obtaining global statistics. * Amq -T option:: Use TCP transport. * Amq -U option:: Use UDP transport. @@ -5641,7 +5705,7 @@ rather not have to search through the process table. This option is used in the @file{ctl-amd} script. @c ---------------------------------------------------------------- -@node Amq -P option, Amq -s option, Amq -p option, Controlling Amd +@node Amq -P option, Amq -q option, Amq -p option, Controlling Amd @comment node-name, next, previous, up @subsection @i{Amq} @code{-P} option @cindex Multiple Amd processes @@ -5664,7 +5728,16 @@ kill `amq -p -P 300020` @end example @c ---------------------------------------------------------------- -@node Amq -s option, Amq -T option, Amq -P option, Controlling Amd +@node Amq -q option, Amq -s option, Amq -P option, Controlling Amd +@comment node-name, next, previous, up +@subsection @i{Amq} @code{-q} option +@cindex Unmounting a filesystem + +Suppress any error messages produced when a synchronous unmount fails. +See @ref{Amq -u option}. + +@c ---------------------------------------------------------------- +@node Amq -s option, Amq -T option, Amq -q option, Controlling Amd @comment node-name, next, previous, up @subsection @i{Amq} @code{-s} option @cindex Global statistics @@ -5729,11 +5802,19 @@ and if that failed, will try UDP. @cindex Forcing filesystem to time out @cindex Unmounting a filesystem -The @code{-u} option causes the time-to-live interval of the named mount -points to be expired, thus causing an unmount attempt. This is the only -safe way to unmount an automounted filesystem. It is not possible to -unmount a filesystem which has been mounted with the @samp{nounmount} -flag. +The @code{-u} option causes the time-to-live interval of the named +mount points to be expired, thus causing an unmount attempt. This is +the only safe way to unmount an automounted filesystem. If @code{-u} +is repeated, then @i{Amd} will attempt to unmount the filesystem +synchronously. This makes things like + +@example +amq -uu /t/cd0d && eject cd0 +@end example + +@noindent +work as expected. Any error messages this might produce can be +suppressed with the @code{-q} option. See @ref{Amq -q option}. @c The @code{-H} option informs @i{Amd} that the specified mount point @c has hung - as if its keepalive timer had expired. @@ -5769,11 +5850,10 @@ as a whole, rather than any particular filesystem. The @code{-x} and @code{-D} options have exactly the same effect as @i{Amd}'s corresponding command line options. -When @i{Amd} receives a @code{-x} flag it limits the log options being -modified to those which were not enabled at startup. This prevents a -user turning @emph{off} any logging option which was specified at -startup, though any which have been turned on since then can still be -turned off. The @code{-D} option has a similar behavior. +When @i{Amd} receives the @code{-x} flag, it disallows turning off the +@samp{fatal} or @samp{error} flags. Both are on by default. They are +mandatory so that @i{Amd} could report important errors, including +errors relating to turning flags on/off. @c ################################################################ @node FSinfo, Hlfsd, Run-time Administration, Top @@ -6904,8 +6984,8 @@ symbolic link to subdirectory within a user's home directory, depending on the user which accessed that link. It was primarily designed to redirect incoming mail to users' home directories, so that it can be read from anywhere. It was designed and implemented by -@email{ezk@@cs.columbia.edu,Erez Zadok} and -@email{dupuy@@cs.columbia.edu,Alexander Dupuy}, at the +@uref{http://www.cs.sunysb.edu/~ezk,Erez Zadok} and +@email{dupuy AT cs.columbia.edu,Alexander Dupuy}, at the @uref{http://www.cs.columbia.edu/,Computer Science Department} of @uref{http://www.columbia.edu/,Columbia University}. A @uref{http://www.fsl.cs.sunysb.edu/docs/hlfsd/hlfsd.html,paper} @@ -7522,7 +7602,6 @@ am-utils, and get installed. * automount2amd:: * ctl-amd:: * ctl-hlfsd:: -* expn:: * fix-amd-map:: * fixmount:: * fixrmtab:: @@ -7649,7 +7728,7 @@ then start a new process --- only if the previous one died cleanly. @xref{Run-time Administration}, for more details. @c ---------------------------------------------------------------- -@node ctl-hlfsd, expn, ctl-amd, Assorted Tools +@node ctl-hlfsd, fix-amd-map, ctl-amd, Assorted Tools @comment node-name, next, previous, up @section ctl-hlfsd @pindex ctl-hlfsd @@ -7671,27 +7750,7 @@ died cleanly. @xref{Hlfsd}, for more details. @c ---------------------------------------------------------------- -@node expn, fix-amd-map, ctl-hlfsd, Assorted Tools -@comment node-name, next, previous, up -@section expn -@pindex expn - -A script to expand email addresses into their full name. It is -generally useful when using with the @file{lostaltmail} script, but is a -useful tools otherwise. - -@example -$ expn -v ezk@@cs.columbia.edu -ezk@@cs.columbia.edu -> - ezk@@shekel.mcl.cs.columbia.edu -ezk@@shekel.mcl.cs.columbia.edu -> - Erez Zadok <"| /usr/local/mh/lib/slocal -user ezk || exit 75> - Erez Zadok <\ezk> - Erez Zadok -@end example - -@c ---------------------------------------------------------------- -@node fix-amd-map, fixmount, expn, Assorted Tools +@node fix-amd-map, fixmount, ctl-hlfsd, Assorted Tools @comment node-name, next, previous, up @section fix-amd-map @pindex fix-amd-map @@ -8581,7 +8640,7 @@ XXX: This section needs to be updated @comment node-name, next, previous, up @unnumbered Acknowledgments & Trademarks -Many thanks to the @email{am-utils@@am-utils.org,Am-Utils Users} +Many thanks to the Am-Utils Users mailing list through the months developing am-utils. These members have contributed to the discussions, ideas, code and documentation, and subjected their systems to alpha quality code. Special thanks go @@ -8589,10 +8648,10 @@ to those @uref{http://www.am-utils.org/docs/am-utils/AUTHORS.txt,authors} who ha submitted patches, and especially to the maintainers: @itemize @bullet -@item @email{ezk@@cs.sunysb.edu,Erez Zadok} -@item @email{ib42@@cs.columbia.edu,Ion Badulescu} -@item @email{ro@@techfak.uni-bielefeld.de,Rainer Orth} -@item @email{nick.williams@@morganstanley.com,Nick Williams} +@item @uref{http://www.cs.sunysb.edu/~ezk,Erez Zadok} +@item @email{ionut AT badula.org,Ion Badulescu} +@item @email{ro AT techfak.uni-bielefeld.de,Rainer Orth} +@item @email{nick.williams AT morganstanley.com,Nick Williams} @end itemize Thanks to the Formal Methods Group at Imperial College for suffering @@ -8602,7 +8661,7 @@ Thanks to the many people who have helped with the development of @i{Amd}, especially Piete Brooks at the Cambridge University Computing Lab for many hours of testing, experimentation and discussion. -Thanks to the older @email{amd-workers@@majordomo.glue.umd.edu,Amd +Thanks to the older @email{amd-workers AT majordomo.glue.umd.edu,Amd Workers} mailing list (now defunct) members for many suggestions and bug reports to @i{Amd}. diff --git a/doc/hlfsd.ps b/doc/hlfsd.ps new file mode 100644 index 00000000000..18c257d993a --- /dev/null +++ b/doc/hlfsd.ps @@ -0,0 +1,2718 @@ +%!PS-Adobe-2.0 +%%Creator: dvips 5.47 Copyright 1986-91 Radical Eye Software +%%Title: hlfsd.dvi +%%Pages: 15 1 +%%BoundingBox: 0 0 612 792 +%%EndComments +%%BeginProcSet: /usr/local/lib/tex/ps/psfig.pro +/TeXscale { 65536 div } def + +/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap +currentlinejoin currentdash currentgray currentmiterlimit ] cvx def + +/startTexFig { + /SavedState save def + userdict maxlength dict begin + currentpoint transform + + DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap + setlinewidth setmatrix + + itransform moveto + + /ury exch TeXscale def + /urx exch TeXscale def + /lly exch TeXscale def + /llx exch TeXscale def + /y exch TeXscale def + /x exch TeXscale def + + currentpoint /cy exch def /cx exch def + + /sx x urx llx sub div def % scaling for x + /sy y ury lly sub div def % scaling for y + + sx sy scale % scale by (sx,sy) + + cx sx div llx sub + cy sy div ury sub translate + + /DefFigCTM matrix currentmatrix def + + /initmatrix { + DefFigCTM setmatrix + } def + /defaultmatrix { + DefFigCTM exch copy + } def + + /initgraphics { + DocumentInitState setmiterlimit setgray setdash + setlinejoin setlinecap setlinewidth setmatrix + DefFigCTM setmatrix + } def + + /showpage { + initgraphics + } def + /erasepage { + initgraphics + } def + /copypage {} def + +} def +/clipFig { + currentpoint 6 2 roll + newpath 4 copy + 4 2 roll moveto + 6 -1 roll exch lineto + exch lineto + exch lineto + closepath clip + newpath + moveto +} def +/doclip { llx lly urx ury clipFig } def +/endTexFig { + end SavedState restore +} def +%%EndProcSet +%%BeginProcSet: tex.pro +/TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch +load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{ +isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale +Resolution VResolution vsize neg mul TR matrix currentmatrix dup dup 4 get +round 4 exch put dup dup 5 get round 5 exch put setmatrix}N /@letter{/vsize 10 +N}B /@landscape{/isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@a3{ +/vsize 15.5531 N}B /@ledger{/vsize 16 N}B /@legal{/vsize 13 N}B /@manualfeed{ +statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0 0]N +/FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{/nn 8 dict N nn begin +/FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array +/BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2 +array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx FMat N df-tail} +B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{pop nn dup definefont +setfont}B /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup +length 4 sub get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{ +ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B +/ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 +N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S +dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 +ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice +ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]{ch-image} +imagemask restore}B /D{/cc X dup type /stringtype ne{]}if nn /base get cc ctr +put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf +div put}if put /ctr ctr 1 add N}B /I{cc 1 add D}B /bop{userdict /bop-hook +known{bop-hook}if /SI save N @rigin 0 0 moveto}N /eop{clear SI restore +showpage userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook +known{start-hook}if /VResolution X /Resolution X 1000 div /DVImag X /IE 256 +array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for}N /p /show load N +/RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X +/rulex X V}B /V statusdict begin /product where{pop product dup length 7 ge{0 +7 getinterval(Display)eq}{pop false}ifelse}{false}ifelse end{{gsave TR -.1 -.1 +TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1 +-.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /a{ +moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{ +S p tail}B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B +/j{3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w +}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p +a}B /bos{/SS save N}B /eos{clear SS restore}B end +%%EndProcSet +%%BeginProcSet: special.pro +TeXDict begin /SDict 200 dict N SDict begin /@SpecialDefaults{/hs 612 N /vs +792 N /ho 0 N /vo 0 N /hsc 1 N /vsc 1 N /ang 0 N /CLIP false N /BBcalc false N +/p 3 def}B /@scaleunit 100 N /@hscale{@scaleunit div /hsc X}B /@vscale{ +@scaleunit div /vsc X}B /@hsize{/hs X /CLIP true N}B /@vsize{/vs X /CLIP true +N}B /@hoffset{/ho X}B /@voffset{/vo X}B /@angle{/ang X}B /@rwi{10 div /rwi X} +B /@llx{/llx X}B /@lly{/lly X}B /@urx{/urx X}B /@ury{/ury X /BBcalc true N}B +/magscale true def end /@MacSetUp{userdict /md known{userdict /md get type +/dicttype eq{md begin /letter{}N /note{}N /legal{}N /od{txpose 1 0 mtx +defaultmatrix dtransform S atan/pa X newpath clippath mark{transform{ +itransform moveto}}{transform{itransform lineto}}{6 -2 roll transform 6 -2 +roll transform 6 -2 roll transform{itransform 6 2 roll itransform 6 2 roll +itransform 6 2 roll curveto}}{{closepath}}pathforall newpath counttomark array +astore /gc xdf pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{ +PaintBlack}if}N /txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR +pop 1 -1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 +get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip +not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if +yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{noflips{TR pop pop 270 +rotate 1 -1 scale}if xflip yflip and{TR pop pop 90 rotate 1 -1 scale ppr 3 get +ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip not +and{TR pop pop 90 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if yflip xflip +not and{TR pop pop 270 rotate ppr 2 get ppr 0 get neg sub neg 0 S TR}if} +ifelse scaleby96{ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy +TR .96 dup scale neg S neg S TR}if}N /cp{pop pop showpage pm restore}N end}if} +if}N /normalscale{Resolution 72 div VResolution 72 div neg scale magscale{ +DVImag dup scale}if}N /psfts{S 65536 div N}N /startTexFig{/psf$SavedState save +N userdict maxlength dict begin /magscale false def normalscale currentpoint +TR /psf$ury psfts /psf$urx psfts /psf$lly psfts /psf$llx psfts /psf$y psfts +/psf$x psfts currentpoint /psf$cy X /psf$cx X /psf$sx psf$x psf$urx psf$llx +sub div N /psf$sy psf$y psf$ury psf$lly sub div N psf$sx psf$sy scale psf$cx +psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub TR /showpage{}N +/erasepage{}N /copypage{}N /p 3 def @MacSetUp}N /doclip{psf$llx psf$lly +psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll +S lineto S lineto S lineto closepath clip newpath moveto}N /endTexFig{end +psf$SavedState restore}N /@beginspecial{SDict begin /SpecialSave save N gsave +normalscale currentpoint TR @SpecialDefaults}N /@setspecial{CLIP{newpath 0 0 +moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto closepath clip}if ho vo TR +hsc vsc scale ang rotate BBcalc{rwi urx llx sub div dup scale llx neg lly neg +TR}if /showpage{}N /erasepage{}N /copypage{}N newpath}N /@endspecial{grestore +clear SpecialSave restore end}N /@defspecial{SDict begin}N /@fedspecial{end}B +/li{lineto}B /rl{rlineto}B /rc{rcurveto}B /np{/SaveX currentpoint /SaveY X N 1 +setlinecap newpath}N /st{stroke SaveX SaveY moveto}N /fil{fill SaveX SaveY +moveto}N /ellipse{/endangle X /startangle X /yrad X /xrad X /savematrix matrix +currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc savematrix +setmatrix}N end +%%EndProcSet +TeXDict begin 1000 300 300 @start /Fa 2 117 df<3E0006000C000C000C000C00180019 +E01E30183038303030303030306060606460C460C4C0C8C0700E147E9313>104 +D<02000600060006000C00FF800C000C001800180018001800300031003100320032001C000912 +7F910D>116 D E /Fb 5 116 df<001FC0001FC0001FC00001C00001C00001C00001C00001C000 +01C001F1C007FDC00FFFC01E0FC03C07C07803C07001C0E001C0E001C0E001C0E001C0E001C0E0 +01C0E001C07003C07003C03807C03E0FC01FFFFC07FDFC01F1FC161E7E9D1A>100 +D<0007E0001FF0003FF800787800F03000E00000E00000E00000E0007FFFF0FFFFF0FFFFF000E0 +0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E0 +0000E0003FFF807FFFC03FFF80151E7F9D1A>102 D104 D108 D<07FB801FFF807FFF80780780E003 +80E00380E003807800007FC0003FFC0007FE00003F800007806001C0E001C0E001C0F003C0FC07 +80FFFF00EFFE00E3F80012157C941A>115 D E /Fc 13 118 df<000180000180000380000380 +000780000780000B800013800013800023C00021C00041C000C1C00081C00101C001FFC00201C0 +0201C00401C00801C00801C01801C0FE0FF815177E961A>65 D<03FFFE00E00E00E00400E00400 +E00401C00401C00401C10001C10003820003820003FE000386000704000704080704080700100E +00100E00300E00200E00601C01C0FFFFC017177E9618>69 D<03F0003F8000F000780000B80078 +0000B800B80000B80138000138017000013802700001380270000138047000023808E000021C08 +E000021C10E000021C10E000041C21C000041C41C000041C41C000041C81C000081D038000081D +038000080E038000080E038000180C070000FE083FE00021177E9620>77 +D<03F00FE000F0030000F0020000B8020000B80200011C0400011C0400011C0400010E0400020E +0800020E080002070800020708000403900004039000040390000401D0000801E0000800E00008 +00E0000800E00018004000FE0040001B177E961A>I<03FFE000E03800E01C00E01C00E01C01C0 +1C01C01C01C01C01C0380380700381C003FF000381800700C00700E00700E00700E00E01C00E01 +C00E01C20E01C21C00C4FF807817177E961A>82 D<007C400182800301800601800601800C0100 +0C01000C00000E00000FC00007F80003FC00007C00000E00000E00000600200600400C00400C00 +600800601000D8600087C00012177D9614>I<7FC1FC1C00601C00401C00401C00403800803800 +80380080380080700100700100700100700100E00200E00200E00200E00200E00400E00800E008 +006030003040001F8000161779961A>85 D<007C00180018001800180030003000300030076008 +E018E0306030C060C060C060C0C180C188C1884388659038E00E177C9612>100 +D<030706000000000000384C4C4C8C18181830326262243808177D960B>105 +D<078018C0304060606060C060C060C06080C080C08180C10046003C000B0E7B8D12>111 +D<38F04518463846308C000C000C000C001800180018001800300030000D0E7D8D0F>114 +D<07800C4018E018E038001E001F8007C000C060C0E0C0C180C3003E000B0E7D8D0F>I<1C0826 +184618461886300C300C300C30186018621862186208E407380F0E7D8D13>117 +D E /Fd 25 127 df<60F0F0600404798312>46 D<0018003800380070007000E000E001C001C0 +01C003800380070007000E000E001C001C001C003800380070007000E000E000C0000D1A7E9612 +>I<07C00FE01C703838701C701CE00EE00EE00EE00EE00EE00EE00EE01E701C701C38381C700F +E007C00F147F9312>I61 +D<3F807FC070E0207000700FF03FF07870E070E070E07070F03FFE1F3E0F0E7E8D12>97 +DI<07F01FF8383870106000E000E000E000E0006000703838381FF007E00D0E +7E8D12>I<00F800F8003800380038003807B81FF8387870386038E038E038E038E03860387078 +38781FFE0FBE0F147F9312>I<07801FE0387070706038E038FFF8FFF8E0006000703838381FF0 +07C00D0E7E8D12>I<007E00FF01C70382038003807FFEFFFE0380038003800380038003800380 +0380038003803FF83FF81014809312>I104 D<06000F000F00060000000000 +0000FF00FF000700070007000700070007000700070007000700FFF0FFF00C157D9412>I107 DIII<0F803FE038E07070E038E038E038E038E0 +38F078707038E03FE00F800D0E7E8D12>II114 D<1FF03FF06070C070E0007F003F +E00FF000786018E018F030FFE0DFC00D0E7E8D12>I<06000E000E000E007FF8FFF80E000E000E +000E000E000E000E000E380E380E3807F003C00D127F9112>III<3FFC7FFC7038707000E001C0038007000E001C1C38 +1C701CFFFCFFFC0E0E7F8D12>122 D<18403CE0E78043000B047D9312>126 +D E /Fe 64 125 df<00FCF807839C0E079C1C07081C07001C07001C07001C07001C0700FFFFE0 +1C07001C07001C07001C07001C07001C07001C07001C07001C07001C07001C07001C0700FF1FE0 +1617809615>11 D<00FC000782000E07001C07001C02001C00001C00001C00001C0000FFFF001C +07001C07001C07001C07001C07001C07001C07001C07001C07001C07001C07001C0700FF1FE013 +17809614>I<00FC7E000703C1000E0783801C0703801C0701001C0700001C0700001C0700001C +070000FFFFFF801C0703801C0703801C0703801C0703801C0703801C0703801C0703801C070380 +1C0703801C0703801C0703801C070380FF1FCFF01C1780961D>14 D<60F0F07010102020404004 +0A7D960A>39 D<0102040C1818303070606060E0E0E0E0E0E0E0E0E0E060606070303018180C04 +020108227D980E>I<8040203018180C0C0E060606070707070707070707070606060E0C0C1818 +3020408008227E980E>I<60F0F070101020204040040A7D830A>44 DI< +60F0F06004047D830A>I<0008001800300030003000600060006000C000C000C0018001800180 +030003000600060006000C000C000C00180018001800300030003000600060006000C000C0000D +217E9812>I<03000700FF00070007000700070007000700070007000700070007000700070007 +000700070007007FF00C157E9412>49 D<0F8030E040708030C038E03840380038007000700060 +00C00180030006000C08080810183FF07FF0FFF00D157E9412>I<0FE030306018701C701C001C +00180038006007E000300018000C000E000EE00EE00EC00C401830300FE00F157F9412>I<0030 +0030007000F001F001700270047008701870107020704070C070FFFE0070007000700070007003 +FE0F157F9412>I<01F00608080C181C301C70006000E000E3E0EC30F018F00CE00EE00EE00E60 +0E600E300C3018183007C00F157F9412>54 D<40007FFE7FFC7FF8C00880108020004000800080 +0100010003000200060006000E000E000E000E000E0004000F167E9512>I<07E018302018600C +600C700C78183E101F600FC00FF018F8607C601EC00EC006C006C004600C38300FE00F157F9412 +>I<07C0183030186018E00CE00CE00EE00EE00E601E301E186E0F8E000E000C001C7018701860 +3020C01F800F157F9412>I<60F0F06000000000000060F0F07010102020404004147D8D0A>59 +D<001000003800003800003800005C00005C00005C00008E00008E00008E000107000107000307 +8002038002038007FFC00401C00401C00800E00800E01800E03800F0FE03FE17177F961A>65 +DI<00 +FC100383300E00B01C0070380030300030700010600010E00010E00000E00000E00000E00000E0 +0000E000106000107000103000203800201C00400E008003830000FC0014177E9619>II70 +D72 +DI76 DII<00FC00030300 +0E01C01C00E0380070300030700038600018E0001CE0001CE0001CE0001CE0001CE0001CE0001C +7000387000383000303800701C00E00E01C003030000FC0016177E961B>II82 D<0FC4302C601C400CC004C0 +04C004E00070007F003FE00FF801FC001C000E0006800680068006C004E008D81087E00F177E96 +14>I<7FFFF8603818403808403808803804803804803804003800003800003800003800003800 +00380000380000380000380000380000380000380000380000380000380007FFC016177F9619> +III88 +D91 D93 D<1FC0386038301038003803F81E3830387038E039E039E07970FF1F1E100E7F8D12> +97 D +I<07F01838303870106000E000E000E000E000600070083008183007C00D0E7F8D10>I<007E00 +000E00000E00000E00000E00000E00000E00000E00000E0007CE001C3E00300E00700E00600E00 +E00E00E00E00E00E00E00E00600E00700E00301E00182E0007CFC012177F9614>I<0FC0186030 +307038E018FFF8E000E000E000600070083010183007C00D0E7F8D10>I<03E006700E701C201C +001C001C001C001C00FF801C001C001C001C001C001C001C001C001C001C001C001C00FF800C17 +80960B>I<0F9E18E33060707070707070306018C02F80200060003FE03FF83FFC600EC006C006 +C006600C38380FE010157F8D12>II<183C3C1800000000007C1C1C1C1C1C1C1C1C1C1C1C1CFF081780 +960A>I107 DIII<07C018303018600C600CE00EE00EE00EE00EE00E701C30181830 +07C00F0E7F8D12>II<07C2 +001C2600381E00700E00600E00E00E00E00E00E00E00E00E00600E00700E00301E001C2E0007CE +00000E00000E00000E00000E00000E00007FC012147F8D13>II<1F4060C0C040C040E000FF007F801FC001 +E080608060C060E0C09F000B0E7F8D0E>I<080008000800180018003800FF8038003800380038 +0038003800380038403840384038401C800F000A147F930E>IIIIII124 D E /Ff 10 58 df<1F00318060C04040C060C060 +C060C060C060C060C060C060404060C031801F000B107F8F0F>48 D<0C003C00CC000C000C000C +000C000C000C000C000C000C000C000C000C00FF8009107E8F0F>I<1F00618040C08060C06000 +60006000C00180030006000C00102020207FC0FFC00B107F8F0F>I<1F00218060C060C000C000 +8001800F00008000400060C060C060804060801F000B107F8F0F>I<0300030007000F000B0013 +00330023004300C300FFE003000300030003001FE00B107F8F0F>I<20803F002C002000200020 +002F0030802040006000600060C06080C061801F000B107F8F0F>I<0780184030C060C06000C0 +00CF00F080E040C060C060C060406060C030801F000B107F8F0F>I<40007FE07FC08080808001 +000200040004000C0008000800180018001800180018000B117E900F>I<1F00318060C060C060 +C071803F000F00338061C0C060C060C060404060801F000B107F8F0F>I<1F00318060C0C040C0 +60C060C06040E021E01E600060004060C0608043003E000B107F8F0F>I +E /Fg 10 58 df<0F0030C0606060604020C030C030C030C030C030C030C030C030C030402060 +60606030C00F000C137E9211>48 D<0C001C00EC000C000C000C000C000C000C000C000C000C00 +0C000C000C000C000C000C00FFC00A137D9211>I<1F0060C06060F070F0306030007000700060 +00C001C00180020004000810101020207FE0FFE00C137E9211>I<0FC030707038703870380038 +003000E00FC0007000380018001C601CF01CF018E03860701FC00E137F9211>I<006000E000E0 +0160026006600C600860106020606060C060FFFC0060006000600060006003FC0E137F9211>I< +60607FC07F8044004000400040004F0070C040E0006000700070E070E070E06040E021C01F000C +137E9211>I<07C00C201070207060006000C000CF00D0C0E060C020C030C030C0304030602020 +6010C00F000C137E9211>I<40007FFC7FF8401080108020004000800100010003000200060006 +000E000E000E000E000E0004000E147E9311>I<0FC0107020186018601870183C303F600F800F +E031F06078C01CC00CC00CC00C601830300FC00E137F9211>I<0F00308060404060C020C030C0 +30C0304030607030B00F30003000200060E040E08041003E000C137E9211>I +E /Fh 59 122 df<183C3C3C0404080810204080060C779C0D>39 D<1838783808081010204040 +80050C7D830D>44 DI<3078F06005047C830D>I<003C0000C60001 +83000303000603000603800E03800C03801C03801C0300380700380700380700380700700E0070 +0E00700E00700E00E01C00E01C00E01C00E03800E03800E03000C06000E0600060C0007180001E +0000111D7B9B15>48 D<00020006000C001C007C039C0038003800380038007000700070007000 +E000E000E000E001C001C001C001C003800380038003800780FFF00F1C7C9B15>I<003C0000C3 +000101800201800201C00441C00441C00841C00841C00841C01083801083801107000E0600000C +0000180000300000C0000100000600000800001001001002002002004006007E0C00C7F80083F8 +0080E000121D7C9B15>I<0001800001C000038000038000038000030000070000070000060000 +0E00000C00001C0000180000180000300000300000600000400000C600018E00010E00020E0006 +1C000C1C00181C003F1C0040F800803F0000380000380000700000700000700000700000E00000 +600012247E9B15>52 D<00C06000FFC001FF8001FE000100000100000200000200000200000200 +00047800058C00060600040600080600000700000700000600000E00000E00700E00700C00E01C +0080180080380040300040600021C0001F0000131D7C9B15>I<09C04017E0801FE0803C610030 +2700601A00400600400400800C0080080000180000100000300000600000600000600000C00000 +C00001C0000180000380000380000300000700000700000700000E00000E00000C0000121D799B +15>55 D<001E000061000081800180800300C00300C006018006018006018007030007860003CC +0003F00001F000037800063C00081E00180E00300E00600600600600600600C00C00C00C00C018 +0060100060200030C0000F0000121D7C9B15>I<003C0000C6000183000303000603000E03000C +03801C03801C03001C0300380700380700380700380F00380E00181E00181E000C6C00079C0000 +1C00001800003800003000006000E0C000E0C0008180008600007C0000111D7B9B15>I<060F0F +06000000000000000000003078F06008127C910D>I<0000180000001800000038000000380000 +007800000078000000B8000001B800000138000002380000023C0000041C0000041C0000081C00 +00181C0000101C0000201C0000201C00007FFC0000401C0000801C0001801C0001001C0002001C +0002001C0004000E000C000E001C001E00FF00FFC01A1D7E9C1F>65 D<01FFFE00003C07800038 +03C0003801C0003801C0003801C0007001C0007003C0007003C00070078000E0070000E00E0000 +E03C0000FFF80001C01C0001C00E0001C00F0001C00F0003800F0003800F0003800F0003800F00 +07001E0007001C0007003C00070078000E01E000FFFF80001A1C7D9B1D>I<0003F020001E0C60 +003002E000E003C001C001C0038001C0070000C00E0000801E0000801C0000803C0000803C0000 +00780000007800000078000000F0000000F0000000F0000000F0000000F0000400F0000400F000 +0400F0000800700008007000100038002000180040000C0180000706000001F800001B1E7A9C1E +>I<01FFFE00003C0780003801C0003801C0003800E0003800E0007000F0007000700070007000 +7000F000E000F000E000F000E000F000E000F001C001E001C001E001C001E001C001C0038003C0 +03800380038007800380070007000E0007001C0007003800070070000E01C000FFFF00001C1C7D +9B1F>I<01FFFFE0003C00E0003800600038004000380040003800400070004000700040007020 +400070200000E0400000E0400000E0C00000FFC00001C0800001C0800001C0800001C080000381 +0100038001000380020003800200070004000700040007000C00070018000E007800FFFFF0001B +1C7D9B1C>I<01FFFFC0003C01C0003800C0003800800038008000380080007000800070008000 +7020800070200000E0400000E0400000E0C00000FFC00001C0800001C0800001C0800001C08000 +03810000038000000380000003800000070000000700000007000000070000000F000000FFF000 +001A1C7D9B1B>I<0003F020001E0C60003002E000E003C001C001C0038001C0070000C00E0000 +801E0000801C0000803C0000803C000000780000007800000078000000F0000000F0000000F001 +FFC0F0001E00F0001C00F0001C00F0001C00F0001C00700038007000380038003800180078000C +0090000707100001F800001B1E7A9C20>I<01FFCFFE003C01E0003801C0003801C0003801C000 +3801C00070038000700380007003800070038000E0070000E0070000E0070000FFFF0001C00E00 +01C00E0001C00E0001C00E0003801C0003801C0003801C0003801C000700380007003800070038 +00070038000F007800FFE7FF001F1C7D9B1F>I<01FFC0003C0000380000380000380000380000 +700000700000700000700000E00000E00000E00000E00001C00001C00001C00001C00003800003 +80000380000380000700000700000700000700000F0000FFE000121C7E9B10>I<007FF0000780 +000700000700000700000700000E00000E00000E00000E00001C00001C00001C00001C00003800 +00380000380000380000700000700000700000700060E000E0E000C0C00081C000838000470000 +3C0000141D7B9B16>I<01FFC0FF003C003C003800300038004000380080003801000070020000 +700400007010000070200000E0400000E0C00000E1C00000E5C00001C8E00001D0E00001E0E000 +01C07000038070000380700003803800038038000700380007001C0007001C0007001C000F001E +00FFE0FF80201C7D9B20>I<01FFE0003C00003800003800003800003800007000007000007000 +00700000E00000E00000E00000E00001C00001C00001C00001C000038008038008038008038010 +0700100700300700600700E00E03C0FFFFC0151C7D9B1A>I<01FE0007F8003E000780002E000F +00002E001700002E001700002E002700004E002E00004E004E00004E004E00004E008E00008E01 +1C00008E011C00008E021C00008E021C0001070438000107043800010708380001071038000207 +107000020720700002072070000207407000040740E000040780E000040700E0000C0700E0001C +0601E000FF861FFC00251C7D9B25>I<01FC03FE001C0070003C0060002E0040002E0040002E00 +40004700800047008000470080004380800083810000838100008181000081C1000101C2000101 +C2000100E2000100E2000200E4000200740002007400020074000400380004003800040038000C +0018001C001000FF8010001F1C7D9B1F>I<0007F000001C1C0000700E0000E0070001C0038003 +800380070003800E0003C01E0003C01C0003C03C0003C03C0003C0780003C0780003C0780003C0 +F0000780F0000780F0000780F0000F00F0000F00F0000E00F0001E00F0003C0070003800700070 +007800E0003801C0001C0380000E0E000003F800001A1E7A9C20>I<01FFFC00003C0700003803 +80003801C0003801C0003801C0007003C0007003C0007003C00070038000E0078000E0070000E0 +0E0000E0380001FFE00001C0000001C0000001C000000380000003800000038000000380000007 +0000000700000007000000070000000F000000FFE000001A1C7D9B1C>I<01FFF800003C0E0000 +38070000380380003803800038038000700780007007800070078000700F0000E00E0000E01C00 +00E0700000FFC00001C0C00001C0600001C0700001C07000038070000380700003807000038070 +000700F0000700F0400700F0400700F0800F007880FFE0790000001E001A1D7D9B1E>82 +D<000F8400304C00403C00801801001803001803001806001006001006000007000007000003E0 +0003FC0001FF00007F800007C00001C00001C00000C00000C02000C02000C06001806001806003 +00600200F00400CC180083E000161E7D9C17>I<1FFFFFC01C0701C0300E00C0200E0080600E00 +80400E0080401C0080801C0080801C0080001C0000003800000038000000380000003800000070 +000000700000007000000070000000E0000000E0000000E0000000E0000001C0000001C0000001 +C0000001C0000003C000007FFE00001A1C799B1E>I<7FF0FF800F001C000E0018000E0010000E +0010000E0010001C0020001C0020001C0020001C00200038004000380040003800400038004000 +70008000700080007000800070008000E0010000E0010000E0010000E0020000E0020000E00400 +00E00400006008000030300000104000000F800000191D779B1F>I87 D<01FF81FE001E00F0001C0060001E +0080000E0180000E0100000F02000007040000070800000790000003A0000003C0000001C00000 +01C0000001E0000002E0000004E0000008F0000010700000207000006038000040380000803C00 +01001C0002001C0006001E001E001E00FF80FFC01F1C7E9B1F>I<00FFFF8000F0070001C00E00 +01801E0001001C0001003800020070000200E0000201C0000001C0000003800000070000000E00 +00001C0000001C0000003800000070000000E0080001C0100001C0100003801000070020000E00 +20001C0060003C00C0003801C00070078000FFFF8000191C7D9B19>90 D<03CC063C0C3C181C38 +38303870387038E070E070E070E070E0E2C0E2C0E261E462643C380F127B9115>97 +D<3F00070007000E000E000E000E001C001C001C001C0039C03E60383038307038703870387038 +E070E070E070E060E0E0C0C0C1C0618063003C000D1D7B9C13>I<01F007080C08181C38383000 +70007000E000E000E000E000E000E008E010602030C01F000E127B9113>I<001F800003800003 +80000700000700000700000700000E00000E00000E00000E0003DC00063C000C3C00181C003838 +00303800703800703800E07000E07000E07000E07000E0E200C0E200C0E20061E4006264003C38 +00111D7B9C15>I<01E007100C1018083810701070607F80E000E000E000E000E000E008601060 +2030C01F000D127B9113>I<0003C0000670000C70001C60001C00001C00003800003800003800 +00380000380003FF8000700000700000700000700000700000E00000E00000E00000E00000E000 +01C00001C00001C00001C00001C000038000038000038000030000030000070000C60000E60000 +CC00007800001425819C0D>I<00F3018F030F06070E0E0C0E1C0E1C0E381C381C381C381C3838 +30383038187818F00F700070007000E000E0C0C0E1C0C3007E00101A7D9113>I<0FC00001C000 +01C0000380000380000380000380000700000700000700000700000E78000E8C000F0E000E0E00 +1C0E001C0E001C0E001C0E00381C00381C00381C00383800703880703880707080707100E03200 +601C00111D7D9C15>I<01800380010000000000000000000000000000001C002600470047008E +008E000E001C001C001C0038003800710071007100720072003C00091C7C9B0D>I<0FC00001C0 +0001C0000380000380000380000380000700000700000700000700000E0F000E11000E23800E43 +801C83001C80001D00001E00003F800039C00038E00038E00070E20070E20070E20070E400E064 +00603800111D7D9C13>107 D<1F800380038007000700070007000E000E000E000E001C001C00 +1C001C0038003800380038007000700070007000E400E400E400E40068003800091D7C9C0B>I< +3C1E0780266318C04683A0E04703C0E08E0380E08E0380E00E0380E00E0380E01C0701C01C0701 +C01C0701C01C070380380E0388380E0388380E0708380E0710701C0320300C01C01D127C9122> +I<3C3C002646004687004707008E07008E07000E07000E07001C0E001C0E001C0E001C1C00381C +40381C40383840383880701900300E0012127C9117>I<01E007180C0C180C380C300E700E700E +E01CE01CE01CE018E038E030E06060C031801E000F127B9115>I<07870004D98008E0C008E0C0 +11C0E011C0E001C0E001C0E00381C00381C00381C00381800703800703000707000706000E8C00 +0E70000E00000E00001C00001C00001C00001C00003C0000FF8000131A7F9115>I<3C3C26C246 +8747078E068E000E000E001C001C001C001C0038003800380038007000300010127C9112>114 +D<01F006080C080C1C18181C001F001FC00FF007F0007800386030E030C030806060C01F000E12 +7D9111>I<00C001C001C001C00380038003800380FFE00700070007000E000E000E000E001C00 +1C001C001C00384038403840388019000E000B1A7D990E>I<1E0300270700470700470700870E +00870E000E0E000E0E001C1C001C1C001C1C001C1C003838803838801838801839001C5900078E +0011127C9116>I<1E06270E470E4706870287020E020E021C041C041C041C0818083808181018 +200C4007800F127C9113>I<1E01832703874703874703838707018707010E07010E07011C0E02 +1C0E021C0E021C0E04180C04181C04181C081C1C100C263007C3C018127C911C>I<070E001991 +0010E38020E38041C30041C00001C00001C000038000038000038000038000070200670200E704 +00CB04008B080070F00011127D9113>I<1E03270747074707870E870E0E0E0E0E1C1C1C1C1C1C +1C1C38383838183818381C7007F00070007000E0E0C0E1C0818047003C00101A7C9114>I +E /Fi 5 104 df<03C00FF01FF83FFC7FFE7FFEFFFFFFFFFFFFFFFF7FFE7FFE3FFC1FF80FF003 +C010107E9115>15 D<0000030000000003000000000180000000018000000000C0000000006000 +7FFFFFF000FFFFFFF8000000000E00000000070000000001E0000000007800000001E000000003 +8000000006000000001C00FFFFFFF8007FFFFFF0000000006000000000C0000000018000000001 +80000000030000000003000025187E952A>41 D<0000600000600000C00000C000018000018000 +0180000300000300000600000600000C00000C0000180000180000180000300000300000600000 +600000C00000C0000180000180000300000300000300000600000600000C00000C000018000018 +0000300000300000300000600000600000C0000040000013287A9D00>54 +D<003C00E001C00180038003800380038003800380038003800380038003800380038003000700 +1C00F0001C00070003000380038003800380038003800380038003800380038003800380018001 +C000E0003C0E297D9E15>102 DI E /Fj 57 123 +df<3803807C07C0FE0FE0FF0FF0FF0FF07F07F03B03B00300300300300700700600600600600C +00C01C01C018018070070020020014117EA21D>34 D<387CFEFFFF7F3B03030706060C1C187020 +08117C8610>44 DI<387CFEFEFE7C3807077C8610>I<00FE00 +07FFC00F83E01F01F03E00F83E00F87C007C7C007C7C007CFC007CFC007EFC007EFC007EFC007E +FC007EFC007EFC007EFC007EFC007EFC007EFC007EFC007EFC007E7C007C7C007C7C007C3E00F8 +3E00F81F01F00F83E007FFC000FE0017207E9F1C>48 D<00180000780001F800FFF800FFF80001 +F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001 +F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F8007FFFE07F +FFE013207C9F1C>I<03FC000FFF003C1FC07007E07C07F0FE03F0FE03F8FE03F8FE01F87C01F8 +3803F80003F80003F00003F00007E00007C0000F80001F00003E0000380000700000E01801C018 +0380180700180E00380FFFF01FFFF03FFFF07FFFF0FFFFF0FFFFF015207D9F1C>I<00FE0007FF +C00F07E01E03F03F03F03F81F83F81F83F81F81F03F81F03F00003F00003E00007C0001F8001FE +0001FF000007C00001F00001F80000FC0000FC3C00FE7E00FEFF00FEFF00FEFF00FEFF00FC7E01 +FC7801F81E07F00FFFC001FE0017207E9F1C>I<0000E00001E00003E00003E00007E0000FE000 +1FE0001FE00037E00077E000E7E001C7E00187E00307E00707E00E07E00C07E01807E03807E070 +07E0E007E0FFFFFEFFFFFE0007E00007E00007E00007E00007E00007E00007E000FFFE00FFFE17 +207E9F1C>I<1000201E01E01FFFC01FFF801FFF001FFE001FF8001BC000180000180000180000 +18000019FC001FFF001E0FC01807E01803E00003F00003F00003F80003F83803F87C03F8FE03F8 +FE03F8FC03F0FC03F07007E03007C01C1F800FFF0003F80015207D9F1C>I<001F8000FFE003F0 +7007C0F00F01F81F01F83E01F83E01F87E00F07C00007C0000FC0800FC7FC0FCFFE0FD80F0FF00 +F8FE007CFE007CFC007EFC007EFC007EFC007E7C007E7C007E7C007E3C007C3E007C1E00F80F00 +F00783E003FFC000FF0017207E9F1C>I<6000007800007FFFFE7FFFFE7FFFFC7FFFF87FFFF87F +FFF0E00060E000C0C00180C00300C00300000600000C00001C0000180000380000780000780000 +F00000F00000F00001F00001F00001F00003F00003F00003F00003F00003F00003F00003F00001 +E00017227DA11C>I<00FE0003FFC00703E00E00F01C00F01C00783C00783E00783F00783F8078 +3FE0F01FF9E01FFFC00FFF8007FFC003FFE007FFF01E7FF83C1FFC7807FC7801FEF000FEF0003E +F0001EF0001EF0001CF8001C7800383C00381F01F00FFFC001FF0017207E9F1C>I<01FE0007FF +800F83E01E01F03E00F07C00F87C0078FC007CFC007CFC007CFC007EFC007EFC007EFC007E7C00 +FE7C00FE3E01FE1E037E0FFE7E07FC7E00207E00007C00007C1E007C3F00F83F00F83F00F03F01 +E01E03C01C0F800FFE0003F80017207E9F1C>I<07FC001FFF00380F807007C0F807E0FC07E0FC +07E0FC07E07807E0000FC0001F80001F00003C0000780000700000E00000E00000C00000C00000 +C00000C00000C00000C00000000000000000000000000000000001C00003E00007F00007F00007 +F00003E00001C00013237DA21A>63 D<000070000000007000000000F800000000F800000000F8 +00000001FC00000001FC00000003FE00000003FE00000003FE00000006FF000000067F0000000E +7F8000000C3F8000000C3F800000183FC00000181FC00000381FE00000300FE00000300FE00000 +600FF000006007F00000E007F80000FFFFF80000FFFFF800018001FC00018001FC00038001FE00 +030000FE00030000FE000600007F000600007F00FFE00FFFF8FFE00FFFF825227EA12A>65 +DI<0003FE0080001FFF818000FF01E38001F8 +003F8003E0001F8007C0000F800F800007801F800007803F000003803F000003807F000001807E +000001807E00000180FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000 +FE00000000FE000000007E000000007E000001807F000001803F000001803F000003801F800003 +000F8000030007C000060003F0000C0001F800380000FF00F000001FFFC0000003FE000021227D +A128>IIII72 DI76 +DI<0007FC0000003FFF800000FC07E00003F001F80007E0 +00FC000FC0007E001F80003F001F80003F003F00001F803F00001F807F00001FC07E00000FC07E +00000FC0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0 +FE00000FE0FE00000FE07E00000FC07F00001FC07F00001FC03F00001F803F80003F801F80003F +000FC0007E0007E000FC0003F001F80000FC07E000003FFF80000007FC000023227DA12A>79 +DI82 D<01FC0407FF8C1F03FC3C007C7C003C78001C78001CF8000CF8000CFC00 +0CFC0000FF0000FFE0007FFF007FFFC03FFFF01FFFF80FFFFC03FFFE003FFE0003FF00007F0000 +3F00003FC0001FC0001FC0001FE0001EE0001EF0003CFC003CFF00F8C7FFE080FF8018227DA11F +>I<7FFFFFFF807FFFFFFF807E03F80F807803F807807003F803806003F80180E003F801C0E003 +F801C0C003F800C0C003F800C0C003F800C0C003F800C00003F800000003F800000003F8000000 +03F800000003F800000003F800000003F800000003F800000003F800000003F800000003F80000 +0003F800000003F800000003F800000003F800000003F800000003F800000003F800000003F800 +000003F8000003FFFFF80003FFFFF80022227EA127>II87 D<0400400E00E0180180380380300300600600600600E0 +0E00C00C00C00C00DC0DC0FE0FE0FF0FF0FF0FF07F07F03E03E01C01C014117AA21D>92 +D<07FC001FFF803F07C03F03E03F01E03F01F01E01F00001F00001F0003FF003FDF01FC1F03F01 +F07E01F0FC01F0FC01F0FC01F0FC01F07E02F07E0CF81FF87F07E03F18167E951B>97 +DI<00FF8007FFE00F83 +F01F03F03E03F07E03F07C01E07C0000FC0000FC0000FC0000FC0000FC0000FC00007C00007E00 +007E00003E00301F00600FC0E007FF8000FE0014167E9519>I<0001FE000001FE0000003E0000 +003E0000003E0000003E0000003E0000003E0000003E0000003E0000003E0000003E0000003E00 +01FC3E0007FFBE000F81FE001F007E003E003E007E003E007C003E00FC003E00FC003E00FC003E +00FC003E00FC003E00FC003E00FC003E00FC003E007C003E007C003E003E007E001E00FE000F83 +BE0007FF3FC001FC3FC01A237EA21F>I<00FE0007FF800F87C01E01E03E01F07C00F07C00F8FC +00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC00007C00007C00007E00003E00181F00300FC07003 +FFC000FF0015167E951A>I<003F8000FFC001E3E003C7E007C7E00F87E00F83C00F80000F8000 +0F80000F80000F80000F8000FFFC00FFFC000F80000F80000F80000F80000F80000F80000F8000 +0F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80007FF8007FF800 +13237FA211>I<03FC1E0FFF7F1F0F8F3E07CF3C03C07C03E07C03E07C03E07C03E07C03E03C03 +C03E07C01F0F801FFF0013FC003000003000003800003FFF801FFFF00FFFF81FFFFC3800FC7000 +3EF0001EF0001EF0001EF0001E78003C7C007C3F01F80FFFE001FF0018217E951C>II<1C003E007F007F007F003E001C +000000000000000000000000000000FF00FF001F001F001F001F001F001F001F001F001F001F00 +1F001F001F001F001F001F001F001F00FFE0FFE00B247EA310>I107 DIII<00FE0007FFC00F83E01E00F03E00F87C007C7C00 +7C7C007CFC007EFC007EFC007EFC007EFC007EFC007EFC007E7C007C7C007C3E00F81F01F00F83 +E007FFC000FE0017167E951C>II114 D<0FF3003FFF00781F0060 +0700E00300E00300F00300FC00007FE0007FF8003FFE000FFF0001FF00000F80C00780C00380E0 +0380E00380F00700FC0E00EFFC00C7F00011167E9516>I<018000018000018000018000038000 +0380000780000780000F80003F8000FFFF00FFFF000F80000F80000F80000F80000F80000F8000 +0F80000F80000F80000F80000F80000F81800F81800F81800F81800F81800F830007C30003FE00 +00F80011207F9F16>IIIII +I<7FFFF07FFFF07C03E07007C0600FC0E01F80C01F00C03E00C07E0000FC0000F80001F00003F0 +3007E03007C0300F80701F80703F00603E00E07C03E0FFFFE0FFFFE014167E9519>I +E /Fk 44 127 df34 +D<00C00001C00001C00001C00007F0001FFC003FFE007DCF0071C780E1C380E1C780E1C780F1C3 +0079C0003FC0001FF00007FC0001FE0001CF0001C70061C380F1C380F1C380E1C38071C70079DF +003FFE001FF80007E00001C00001C00000C00011207E9C16>36 D<00E001E0038007000E001C00 +1C0038003800700070007000E000E000E000E000E000E000E000E000E000700070007000380038 +001C001C000E000700038001E000E00B217A9C16>40 DI45 +D<70F8F8F8700505788416>I<000180000380000380000700000700000E00000E00001C00001C +0000380000380000700000700000E00000E00001C00001C0000380000380000700000700000E00 +000E00001C00001C0000380000380000700000700000E00000E00000C0000011207E9C16>I<03 +E0000FF8001FFC001E3C00380E00780F00700700700700E00380E00380E00380E00380E00380E0 +0380E00380E00380F00780700700700700780F003C1E001E3C001FFC000FF80003E00011197E98 +16>I<70F8F8F870000000000000000070F8F8F8700512789116>58 D<7FFF00FFFF80FFFF8000 +0000000000000000000000000000FFFF80FFFF807FFF00110B7E9116>61 +D<00F80003FC0007FE000F07001C3F80387F8078FF8071C3C071C3C0E381C0E381C0E381C0E381 +C0E381C0E381C0E381C071C38071C38078FF00387E001C3C000F03C007FFC003FF0000FC001219 +7E9816>64 D<00E00001F00001F00001B00001B00003B80003B80003B800031800071C00071C00 +071C00071C00071C000E0E000E0E000FFE000FFE001FFF001C07001C07001C07007F1FC0FF1FE0 +7F1FC013197F9816>I<7FFFC0FFFFC07FFFC01C01C01C01C01C01C01C01C01C00001C00001C1C +001C1C001FFC001FFC001FFC001C1C001C1C001C00001C00E01C00E01C00E01C00E01C00E07FFF +E0FFFFE07FFFE013197F9816>69 D<7F1FC0FFBFE07F1FC01C07001C07001C07001C07001C0700 +1C07001C07001FFF001FFF001FFF001C07001C07001C07001C07001C07001C07001C07001C0700 +1C07007F1FC0FFBFE07F1FC013197F9816>72 D77 D<7FE000FFF8007FFC001C1E001C0F +001C07001C07001C07001C07001C0F001C1E001FFC001FF8001FFC001C1C001C0E001C0E001C0E +001C0E001C0E201C0E701C0E707F07E0FF87E07F03C014197F9816>82 D<07E3001FFF003FFF00 +781F00F00700E00700E00700E00000F000007800003F80001FF00007FC0000FE00000F00000700 +000380000380600380E00380E00700F80F00FFFE00FFFC00C7F00011197E9816>I<7F07F0FF8F +F87F07F01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01 +C01C01C01C01C01C01C01C01C00E03800E038007070007FF0003FE0000F8001519809816>85 +D89 D<1FE0003FF0007FF800783C00300E00000E00000E0003FE001FFE003E0E00700E00 +E00E00E00E00E00E00783E007FFFE03FE7E00F83E013127E9116>97 D<7E0000FE00007E00000E +00000E00000E00000E00000E3E000EFF000FFF800F83C00F00E00E00E00E00700E00700E00700E +00700E00700E00700E00E00F01E00F83C00FFF800EFF00063C001419809816>I<03F80FFC1FFE +3C1E780C7000E000E000E000E000E000F000700778073E0E1FFC0FF803F010127D9116>I<003F +00007F00003F0000070000070000070000070003C7000FF7001FFF003C1F00780F00700700E007 +00E00700E00700E00700E00700E00700700F00700F003C1F001FFFE00FE7F007C7E014197F9816 +>I<03E00FF81FFC3C1E780E7007E007FFFFFFFFFFFFE000E000700778073C0F1FFE0FFC03F010 +127D9116>I<001F00007F8000FF8001E78001C30001C00001C0007FFF00FFFF00FFFF0001C000 +01C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0003FFE007FFF00 +3FFE0011197F9816>I<03E3C007F7E00FFFE01C1CC0380E00380E00380E00380E00380E001C1C +000FF8001FF0001BE0003800001800001FFC001FFF003FFF807803C0E000E0E000E0E000E0E000 +E07001C07C07C03FFF800FFE0003F800131C7F9116>I<7E0000FE00007E00000E00000E00000E +00000E00000E3C000EFE000FFF000F87800F03800E03800E03800E03800E03800E03800E03800E +03800E03800E03800E03807FC7F0FFE7F87FC7F01519809816>I<018003C003C0018000000000 +000000007FC07FC07FC001C001C001C001C001C001C001C001C001C001C001C001C07FFFFFFF7F +FF101A7D9916>I<7E0000FE00007E00000E00000E00000E00000E00000E7FE00E7FE00E7FE00E +0F000E1E000E3C000E78000EF0000FF0000FF8000FBC000F1E000E0E000E07000E07807F87F0FF +CFF07F87F01419809816>107 DI +I<7E3C00FEFE007FFF000F87800F03800E03800E03800E03800E03800E03800E03800E03800E03 +800E03800E03807FC7F0FFE7F87FC7F01512809116>I<03E0000FF8001FFC003C1E00780F0070 +0700E00380E00380E00380E00380E00380F00780700700780F003C1E001FFC000FF80003E00011 +127E9116>I<7E3E00FEFF007FFF800F83C00F00E00E00E00E00700E00700E00700E00700E0070 +0E00700E00E00F01E00F83C00FFF800EFF000E3C000E00000E00000E00000E00000E00000E0000 +7FC000FFE0007FC000141B809116>I114 +D<0FEC3FFC7FFCF03CE01CE01C70007F801FF007F8003C600EE00EF00EF81EFFFCFFF8C7E00F12 +7D9116>I<0300000700000700000700000700007FFF00FFFF00FFFF0007000007000007000007 +000007000007000007000007010007038007038007038007870003FE0001FC0000F80011177F96 +16>I<7E1F80FE3F807E1F800E03800E03800E03800E03800E03800E03800E03800E03800E0380 +0E03800E03800E0F800FFFF007FBF803E3F01512809116>I<7F1FC0FF1FE07F1FC01C07001E0F +000E0E000E0E000E0E00071C00071C00071C00071C0003B80003B80003B80001F00001F00000E0 +0013127F9116>II<7F1FC07F3FC07F1FC0 +0F1C00073C0003B80003F00001F00000E00001E00001F00003B800073C00071C000E0E007F1FC0 +FF3FE07F1FC013127F9116>I<7F1FC0FF9FE07F1FC01C07000E07000E0E000E0E00070E00071C +00071C00039C00039C0003980001B80001B80000F00000F00000F00000E00000E00000E00001C0 +0079C0007BC0007F80003F00003C0000131B7F9116>I<3FFFC07FFFC07FFFC0700780700F0070 +1E00003C0000780001F00003E0000780000F00001E01C03C01C07801C0FFFFC0FFFFC0FFFFC012 +127F9116>I<1C303F78FFF8F7E061C00D057C9816>126 D E /Fl 86 125 +df<007E1F0001C1B1800303E3C00703C3C00E03C1800E01C0000E01C0000E01C0000E01C0000E +01C0000E01C000FFFFFC000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C000 +0E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0007F87FC +001A1D809C18>11 D<007E0001C1800301800703C00E03C00E01800E00000E00000E00000E0000 +0E0000FFFFC00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C0 +0E01C00E01C00E01C00E01C00E01C07F87F8151D809C17>I<007FC001C1C00303C00703C00E01 +C00E01C00E01C00E01C00E01C00E01C00E01C0FFFFC00E01C00E01C00E01C00E01C00E01C00E01 +C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C07FCFF8151D809C17 +>I<003F07E00001C09C18000380F018000701F03C000E01E03C000E00E018000E00E000000E00 +E000000E00E000000E00E000000E00E00000FFFFFFFC000E00E01C000E00E01C000E00E01C000E +00E01C000E00E01C000E00E01C000E00E01C000E00E01C000E00E01C000E00E01C000E00E01C00 +0E00E01C000E00E01C000E00E01C000E00E01C000E00E01C007FC7FCFF80211D809C23>I20 D<60F0F0F0F0F0F0F06060606060606060606060606000000000 +0060F0F060041E7C9D0C>33 D<6060F0F0F8F86868080808080808101010102020404080800D0C +7F9C15>I<0080008007E01898308460824081C087C08FC08FC086E080F0807E803FC01FF00FF8 +03FC00BE008E00876087F083F083E0838082408240842088189007E00080008010217E9E15>36 +D<00E0000001900000030800000308000007080000070800000708000007080000071000000710 +0000072000000740000003C03FE003800F00038006000380040005C0040009C0080010E0100030 +E010006070200060702000E0384000E03C4000E01C8000E00F0020E0070020700780403009C040 +1830E18007C03E001B1F7E9D20>38 D<60F0F8680808081010204080050C7C9C0C>I<00400080 +0100020006000C000C0018001800300030007000600060006000E000E000E000E000E000E000E0 +00E000E000E000E000E000600060006000700030003000180018000C000C000600020001000080 +00400A2A7D9E10>I<800040002000100018000C000C0006000600030003000380018001800180 +01C001C001C001C001C001C001C001C001C001C001C001C0018001800180038003000300060006 +000C000C00180010002000400080000A2A7E9E10>I<60F0F0701010101020204080040C7C830C> +44 DI<60F0F06004047C830C>I<00010003000600060006000C000C00 +0C0018001800180030003000300060006000C000C000C001800180018003000300030006000600 +0C000C000C00180018001800300030003000600060006000C000C00010297E9E15>I<03C00C30 +1818300C300C700E60066006E007E007E007E007E007E007E007E007E007E007E007E007E00760 +066006700E300C300C18180C3007E0101D7E9B15>I<030007003F00C700070007000700070007 +00070007000700070007000700070007000700070007000700070007000700070007000F80FFF8 +0D1C7C9B15>I<07C01830201C400C400EF00FF80FF807F8077007000F000E000E001C001C0038 +0070006000C00180030006010C01180110023FFE7FFEFFFE101C7E9B15>I<07E01830201C201C +781E780E781E381E001C001C00180030006007E00030001C001C000E000F000F700FF80FF80FF8 +0FF00E401C201C183007E0101D7E9B15>I<000C00000C00001C00003C00003C00005C0000DC00 +009C00011C00031C00021C00041C000C1C00081C00101C00301C00201C00401C00C01C00FFFFC0 +001C00001C00001C00001C00001C00001C00001C0001FFC0121C7F9B15>I<300C3FF83FF03FC0 +20002000200020002000200023E024302818301C200E000E000F000F000F600FF00FF00FF00F80 +0E401E401C2038187007C0101D7E9B15>I<00F0030C06040C0E181E301E300C700070006000E3 +E0E430E818F00CF00EE006E007E007E007E007E007600760077006300E300C18180C3003E0101D +7E9B15>I<4000007FFF807FFF007FFF0040020080040080040080080000100000100000200000 +600000400000C00000C00001C00001800001800003800003800003800003800007800007800007 +8000078000078000078000030000111D7E9B15>I<03E00C301008200C20066006600660067006 +780C3E083FB01FE007F007F818FC307E601E600FC007C003C003C003C00360026004300C1C1007 +E0101D7E9B15>I<03C00C301818300C700C600EE006E006E007E007E007E007E0076007700F30 +0F18170C2707C700060006000E300C780C78187010203030C00F80101D7E9B15>I<60F0F06000 +00000000000000000060F0F06004127C910C>I<60F0F0600000000000000000000060F0F07010 +10101020204080041A7C910C>I<7FFFFFC0FFFFFFE00000000000000000000000000000000000 +000000000000000000000000000000FFFFFFE07FFFFFC01B0C7E8F20>61 +D<003F800000C0600003001800040004000800020010000100201F00802070808040E0404040C0 +384041C038408180382083803820838038208380382083803820838038208180382041C0382040 +C0384040E0784020709880201F0F00100000000800000004000000030001E000C01F80003FF000 +1B1D7E9C20>64 D<000600000006000000060000000F0000000F0000000F000000178000001780 +00001780000023C0000023C0000023C0000041E0000041E0000041E0000080F0000080F0000180 +F8000100780001FFF80003007C0002003C0002003C0006003E0004001E0004001E000C001F001E +001F00FF80FFF01C1D7F9C1F>II<001F808000E0618001801980 +070007800E0003801C0003801C00018038000180780000807800008070000080F0000000F00000 +00F0000000F0000000F0000000F0000000F0000000F00000007000008078000080780000803800 +00801C0001001C0001000E000200070004000180080000E03000001FC000191E7E9C1E>II< +FFFFFC0F003C0F000C0F00040F00040F00060F00020F00020F02020F02000F02000F02000F0600 +0FFE000F06000F02000F02000F02000F02010F00010F00020F00020F00020F00060F00060F000C +0F003CFFFFFC181C7E9B1C>II<001F808000E061800180198007 +0007800E0003801C0003801C00018038000180780000807800008070000080F0000000F0000000 +F0000000F0000000F0000000F0000000F000FFF0F0000F80700007807800078078000780380007 +801C0007801C0007800E00078007000B800180118000E06080001F80001C1E7E9C21>III<1FFF00F8007800780078007800780078 +00780078007800780078007800780078007800780078007800787078F878F878F878F0F040E021 +C01F00101D7F9B15>IIIII<003F800000E0E0000380380007001C000E000E001C +0007003C00078038000380780003C0780003C0700001C0F00001E0F00001E0F00001E0F00001E0 +F00001E0F00001E0F00001E0F00001E0700001C0780003C0780003C0380003803C0007801C0007 +000E000E0007001C000380380000E0E000003F80001B1E7E9C20>II82 D<07E0801C1980300580700380600180E00180E00080E00080E00080F00000 +F800007C00007FC0003FF8001FFE0007FF0000FF80000F800007C00003C00001C08001C08001C0 +8001C0C00180C00180E00300D00200CC0C0083F800121E7E9C17>I<7FFFFFC0700F01C0600F00 +C0400F0040400F0040C00F0020800F0020800F0020800F0020000F0000000F0000000F0000000F +0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000 +0F0000000F0000000F0000000F0000001F800003FFFC001B1C7F9B1E>IIII<7F +F0FFC00FC03E000780180003C0180003E0100001E0200001F0600000F0400000788000007D8000 +003D0000001E0000001F0000000F0000000F8000000F80000013C0000023E0000021E0000041F0 +0000C0F8000080780001007C0003003C0002001E0006001F001F003F80FFC0FFF01C1C7F9B1F> +II<7FFFF07C01F07001E06003C06003C0400780400F80400F00401E00001E00003C00007C00 +00780000F00000F00001E00003E00003C0100780100780100F00101F00301E00203C00203C0060 +7800E0F803E0FFFFE0141C7E9B19>II<0808101020204040404080808080 +8080B0B0F8F8787830300D0C7A9C15>II<1FC000307000783800781C0030 +1C00001C00001C0001FC000F1C00381C00701C00601C00E01C40E01C40E01C40603C40304E801F +870012127E9115>97 DI<07E00C301878307870306000E0 +00E000E000E000E000E00060007004300418080C3007C00E127E9112>I<003F00000700000700 +00070000070000070000070000070000070000070000070003E7000C1700180F00300700700700 +600700E00700E00700E00700E00700E00700E00700600700700700300700180F000C370007C7E0 +131D7E9C17>I<03E00C301818300C700E6006E006FFFEE000E000E000E0006000700230021804 +0C1803E00F127F9112>I<00F8018C071E061E0E0C0E000E000E000E000E000E00FFE00E000E00 +0E000E000E000E000E000E000E000E000E000E000E000E000E000E007FE00F1D809C0D>I<0003 +8003C4C00C38C01C3880181800381C00381C00381C00381C001818001C38000C300013C0001000 +003000001800001FF8001FFF001FFF803003806001C0C000C0C000C0C000C06001803003001C0E +0007F800121C7F9215>II<18003C003C00180000000000 +00000000000000000000FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C +001C001C00FF80091D7F9C0C>I<00C001E001E000C000000000000000000000000000000FE000 +E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E0 +60E0F0C0F1C061803E000B25839C0D>IIII< +FC7C001C87001D03001E03801C03801C03801C03801C03801C03801C03801C03801C03801C0380 +1C03801C03801C03801C0380FF9FF014127F9117>I<03F0000E1C001806003003007003806001 +80E001C0E001C0E001C0E001C0E001C0E001C06001807003803003001806000E1C0003F0001212 +7F9115>II<03C1000C3300180B00300F00700700700700E00700E00700E00700 +E00700E00700E00700600700700700300F00180F000C370007C700000700000700000700000700 +000700000700000700003FE0131A7E9116>II<1F9030704030C010C010E010F8007F80 +3FE00FF000F880388018C018C018E010D0608FC00D127F9110>I<04000400040004000C000C00 +1C003C00FFE01C001C001C001C001C001C001C001C001C001C101C101C101C101C100C100E2003 +C00C1A7F9910>IIII<7F8FF00F03800F030007020003840001C80001D80000F00000 +700000780000F800009C00010E00020E000607000403801E07C0FF0FF81512809116>II<7FFC70386038407040F040E041C003C0038007000F040E041C043C0C380870087038FF +F80E127F9112>III +E /Fm 42 127 df<00C00000C00007F0001FFC003CCE0070C30060C300E0C780E0CF80E0CF80F0 +CF80F8C700FEC0007FE0007FF8003FFC001FFE000FFF0003FF0000DF8020CF8070C780F8C380F8 +C380F0C380C0C30060C70070C60038DE001FF80007E00000C00000C00011217D9E18>36 +D45 D<000180000380000380000700000700000700000E0000 +0E00001C00001C00001C0000380000380000380000700000700000E00000E00000E00001C00001 +C00001C0000380000380000380000700000700000E00000E00000E00001C00001C00001C000038 +0000380000700000700000700000E00000E00000C0000011297D9E18>47 +D<00600001E0000FE000FFE000F3E00003E00003E00003E00003E00003E00003E00003E00003E0 +0003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E0007FFF +807FFF80111B7D9A18>49 D<00038000000380000007C0000007C0000007C000000FE000000FE0 +00001FF000001BF000001BF0000031F8000031F8000061FC000060FC0000E0FE0000C07E0000C0 +7E0001803F0001FFFF0003FFFF8003001F8003001F8006000FC006000FC00E000FE00C0007E0FF +C07FFEFFC07FFE1F1C7E9B24>65 DI<001FE02000FFF8E003F80FE007C003E00F8001E01F00 +00E03E0000E03E0000607E0000607C000060FC000000FC000000FC000000FC000000FC000000FC +000000FC000000FC0000007C0000607E0000603E0000603E0000C01F0000C00F80018007C00300 +03F80E0000FFFC00001FE0001B1C7D9B22>III73 D76 DI80 D82 D<07F8201FFEE03C07E07801E07000E0F000E0F00060F00060F80000FE0000 +FFE0007FFE003FFF003FFF800FFFC007FFE0007FE00003F00001F00000F0C000F0C000F0C000E0 +E000E0F001C0FC03C0EFFF0083FC00141C7D9B1B>I<7FFFFFE07FFFFFE0781F81E0701F80E060 +1F8060E01F8070C01F8030C01F8030C01F8030C01F8030001F8000001F8000001F8000001F8000 +001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F8000001F80 +00001F8000001F800007FFFE0007FFFE001C1C7E9B21>I86 D<7FFFFC7FFFFC7E01F87803F87003F0E007E0E007E0C00F +C0C01FC0C01F80003F00007F00007E0000FC0000FC0001F80003F80603F00607E0060FE0060FC0 +0E1F800E1F801C3F001C7F003C7E00FCFFFFFCFFFFFC171C7D9B1D>90 D<0FF8001C1E003E0F80 +3E07803E07C01C07C00007C0007FC007E7C01F07C03C07C07C07C0F807C0F807C0F807C0780BC0 +3E13F80FE1F815127F9117>97 DI<03FC000E0E001C1F00 +3C1F00781F00780E00F80000F80000F80000F80000F80000F800007800007801803C01801C0300 +0E0E0003F80011127E9115>I<000FF0000FF00001F00001F00001F00001F00001F00001F00001 +F00001F00001F001F9F00F07F01C03F03C01F07801F07801F0F801F0F801F0F801F0F801F0F801 +F0F801F07801F07801F03C01F01C03F00F0FFE03F9FE171D7E9C1B>I<01FC000F07001C03803C +01C07801C07801E0F801E0F801E0FFFFE0F80000F80000F800007800007C00603C00601E00C00F +038001FC0013127F9116>I<007F0001E38003C7C00787C00F87C00F83800F80000F80000F8000 +0F80000F8000FFF800FFF8000F80000F80000F80000F80000F80000F80000F80000F80000F8000 +0F80000F80000F80000F80000F80007FF8007FF800121D809C0F>I<03F8F00E0F381E0F381C07 +303C07803C07803C07803C07801C07001E0F000E0E001BF8001000001800001800001FFF001FFF +C00FFFE01FFFF07801F8F00078F00078F000787000707800F01E03C007FF00151B7F9118>II<1E003F003F003F003F001E00000000000000000000000000 +FF00FF001F001F001F001F001F001F001F001F001F001F001F001F001F001F00FFE0FFE00B1E7F +9D0E>I107 DIII<01FC000F07801C01C03C01E07800F07800F0F800F8F800F8F800F8F8 +00F8F800F8F800F87800F07800F03C01E01E03C00F078001FC0015127F9118>I +I114 D<1FD830786018E018E018F000FF80 +7FE07FF01FF807FC007CC01CC01CE01CE018F830CFC00E127E9113>I<03000300030003000700 +07000F000F003FFCFFFC1F001F001F001F001F001F001F001F001F001F0C1F0C1F0C1F0C0F0807 +9803F00E1A7F9913>III120 +DI<3FFF803C1F00303F00303E00607C0060FC0060F80001F00003F00007E00007 +C1800F81801F81801F03803E03007E07007C0F00FFFF0011127F9115>I<1E023FFC7FF880F00F +047C9C18>126 D E /Fn 32 123 df<0E1E1E1E1E02020404080810204080070F7D840F>44 +D<0000030000000300000007000000070000000F0000000F0000001F0000002F0000002F000000 +4F0000004F80000087800000878000010780000207800002078000040780000407800008078000 +080780001007800030078000200780007FFF80004007C0008007C0008003C0010003C0030003C0 +020003C0040003C0040003C00C0003C03C0007C0FF003FFC1E237DA224>65 +D<00007F00800003808100000E00630000380027000070001F0000E0000E0001C0000E00038000 +0E000700000E000F000004000E000004001E000004003C000004003C0000080078000000007800 +0000007800000000F000000000F000000000F000000000F000000000F000000000E000000000E0 +00002000E000002000E000004000E000004000F000008000700000800070000100003800020000 +18000400001C0008000006003000000381C0000000FE000000212479A223>67 +D<00FFFFF000000F003C00000F000E00000F000700001E000380001E000380001E0001C0001E00 +01C0003C0001C0003C0001E0003C0001E0003C0001E000780001E000780001E000780001E00078 +0001E000F00003C000F00003C000F00003C000F00003C001E000078001E000078001E000070001 +E0000F0003C0000E0003C0001C0003C0003C0003C00038000780007000078000E000078001C000 +07800700000F801C0000FFFFF0000023227DA125>I<00FFFFFF80000F000780000F000180000F +000180001E000180001E000180001E000100001E000100003C000100003C000100003C01010000 +3C01000000780200000078020000007806000000780E000000FFFC000000F00C000000F00C0000 +00F00C000001E008000001E008000001E008040001E000080003C000080003C000080003C00010 +0003C000100007800020000780006000078000C000078001C0000F8007C000FFFFFF800021227D +A121>I<00FF800007FC000F80000F80000F80001780000F80001780001780002F000013C0002F +000013C0004F000013C0008F000023C0009E000023C0011E000023C0011E000023C0021E000043 +C0043C000043C0043C000043C0083C000041E0083C000081E01078000081E02078000081E02078 +000081E04078000101E040F0000101E080F0000101E100F0000101E100F0000200F201E0000200 +F201E0000200F401E0000200F801E0000400F803C0000400F003C0000400F003C0000C00E003C0 +001E00C007C000FFC0C07FFC002E227DA12C>77 D<00FFFFC0000F0070000F003C000F001C001E +000E001E000E001E000F001E000F003C001E003C001E003C001E003C003C007800380078007000 +7801E00078078000FFFC0000F00E0000F0070000F0038001E003C001E003C001E003C001E003C0 +03C0078003C0078003C0078003C0078007800F0007800F0107800F01078007020F800702FFF803 +8C000000F020237DA124>82 D<0001F020000E0C40001802C0003001C0006001C000E0018000C0 +018001C0018001C0018003C0010003C0010003C0000003C0000003E0000001F8000001FF000000 +FFE000007FF000001FF8000003FC0000007C0000003C0000001E0000001E0000001E0020001C00 +20001C0020001C00200018006000380060003000700060007000C000C8018000C607000081FC00 +001B247DA21B>I<1FFFFFF81E03C0381803C0183003C018200780182007801840078010400780 +10400F0010800F0010800F0010000F0000001E0000001E0000001E0000001E0000003C0000003C +0000003C0000003C00000078000000780000007800000078000000F0000000F0000000F0000000 +F0000001E0000001E0000001E0000001E0000003E00000FFFF00001D2277A123>I<3FFE03FF03 +C0007803C0006003C00020078000400780004007800040078000400F0000800F0000800F000080 +0F0000801E0001001E0001001E0001001E0001003C0002003C0002003C0002003C000200780004 +0078000400780004007800040070000800F0000800F00010007000100070002000700040003000 +400038018000180200000E0C000003F00000202377A124>I<007FFFFE007E001E0078003C0060 +007800C000F000C001E0008003E0008003C00100078001000F0001001E0000003C0000007C0000 +0078000000F0000001E0000003C00000078000000F8000000F0000001E0000003C004000780040 +00F0008001F0008001E0008003C00100078001000F0003001E0006001E0006003C001E0078007C +00FFFFFC001F227DA11E>90 D<00F8C00185C00705C00E03800E03801C03803C03803807007807 +00780700780700F00E00F00E00F00E00F00E10F01C20701C20703C20305C40308C400F07801415 +7B9419>97 D<03C03F8003800380038007000700070007000E000E000E000E001C001CF81D0C1E +0E3C0638073807380F700F700F700F700FE01EE01EE01EE03CE038E038607060E031C01F001023 +7BA216>I<007E0001C1000301800703800E07801C07803C0000380000780000780000780000F0 +0000F00000F00000F00000F00100700100700200300C001830000FC00011157B9416>I<00003C +0003F80000380000380000380000700000700000700000700000E00000E00000E00000E00001C0 +00F9C00185C00705C00E03800E03801C03803C0380380700780700780700780700F00E00F00E00 +F00E00F00E10F01C20701C20703C20305C40308C400F078016237BA219>I<00F803840E021C02 +3C0238027804F018FFE0F000F000E000E000E000E000E002E0026004701830600F800F157A9416 +>I<001F180030B800E0B801C07001C0700380700780700700E00F00E00F00E00F00E01E01C01E +01C01E01C01E01C01E03800E03800E0780060B8006170001E700000700000700000E00000E0000 +0E00701C00F01800F0300060E0003F8000151F7E9416>103 D<00C001E001C001C00000000000 +00000000000000000000001C002300430043008700870087000E000E001C001C001C0038003800 +3840708070807080710032001C000B217BA00F>105 D<00F0000FE00000E00000E00000E00001 +C00001C00001C00001C0000380000380000380000380000700000701E0070210070C700E10F00E +10F00E20600E40001D80001E00001FC0001C7000383800383800381C00381C2070384070384070 +3840701880E01880600F0014237DA216>107 D<01E01FC001C001C001C0038003800380038007 +000700070007000E000E000E000E001C001C001C001C0038003800380038007000700070007100 +E200E200E200E200640038000B237CA20C>I<1C0F80F8002610C10C0047606606008780780700 +8780780700870070070087007007000E00E00E000E00E00E000E00E00E000E00E00E001C01C01C +001C01C01C001C01C01C001C01C038203803803840380380704038038070803803803080700700 +31003003001E0023157B9428>I<1C0F002631C04740C08780E08780E08700E08700E00E01C00E +01C00E01C00E01C01C03801C03801C03801C0704380708380E08380E103806107006203003C016 +157B941B>I<007E0001C3000381800701C00E01C01C01E03C01E03801E07801E07801E07801E0 +F003C0F003C0F00380F00780700700700E00700C0030180018700007C00013157B9419>I<01C1 +F002621804741C08780C08700E08700E08701E00E01E00E01E00E01E00E01E01C03C01C03C01C0 +3C01C07803807003807003C0E003C1C0072380071E000700000700000E00000E00000E00000E00 +001C00001C00001C0000FFC000171F7F9419>I<1C1F002620804741C08783C08703C087018087 +00000E00000E00000E00000E00001C00001C00001C00001C000038000038000038000038000070 +000030000012157B9415>114 D<00FC000183000200800401800C03800C03000C00000F00000F +F00007FC0003FE00003E00000F00000700700700F00600F00600E004004008002030001FC00011 +157D9414>I<00C001C001C001C001C003800380038003800700FFF8070007000E000E000E000E +001C001C001C001C003800380038003810702070207040708031001E000D1F7C9E10>I<1E0060 +2300E04380E04381C08381C08701C08701C00703800E03800E03800E03801C07001C07001C0700 +1C07081C0E10180E101C0E101C1E200C262007C3C015157B941A>I<1E03802307C04387C04383 +C08381C08700C08700C00700800E00800E00800E00801C01001C01001C01001C02001C02001C04 +001C08001C08000C300003C00012157B9416>I<03C1E0046210083470103CF02038F020386020 +380000700000700000700000700000E00000E00000E00000E02061C040F1C040F1C080E2C10044 +6200383C0014157D9416>120 D<1E00302300704380704380E08380E08700E08700E00701C00E +01C00E01C00E01C01C03801C03801C03801C03801C07001C07001C07001C0F000C3E0003CE0000 +0E00000E00001C00601C00F03800F03000E0600080C0004380003E0000141F7B9418>I<01E020 +03F06007F8C0041F80080100080200000400000800001000002000004000008000010000020000 +0400800801001003003F060061FC0040F80080700013157D9414>I E /Fo +23 119 df<00038000000380000003800000038000001FF00000FFFE0003FFFF0007E38FC00F03 +83E01E0380F03C0380703C038038780380F8780381FCF80383FCF80387FCF80387FCFC0387FCFC +0387FCFE0383F8FF0381F0FFC380007FFB80007FFFC0003FFFF8003FFFFE001FFFFF000FFFFF80 +07FFFFC003FFFFE001FFFFF0007FFFF0000FFFF80003FFF800038FF8000383FC3E0381FC7F0380 +FCFF8380FCFF83807CFF83807CFF83807CFF03807CFE0380787C038078700380F8780380F03803 +80E01C0381E00F0387C007E39F8003FFFF0000FFFC00001FE00000038000000380000003800000 +0380001E3A7BB529>36 D<1F003F807FC0FFE0FFE0FFE0FFE0FFE07FC03F801F00000000000000 +00000000000000000000000000001F003F807FC0FFE0FFE0FFE0FFE0FFE07FC03F801F000B207A +9F17>58 D68 DII72 D76 +DI<00000FFE0000000000 +FFFFE000000007FFFFFC0000001FFC07FF0000003FE000FF800000FF80003FE00001FF00001FF0 +0003FE00000FF80007FC000007FC0007FC000007FC000FF8000003FE001FF8000003FF001FF000 +0001FF003FF0000001FF803FF0000001FF803FF0000001FF807FE0000000FFC07FE0000000FFC0 +7FE0000000FFC0FFE0000000FFE0FFE0000000FFE0FFE0000000FFE0FFE0000000FFE0FFE00000 +00FFE0FFE0000000FFE0FFE0000000FFE0FFE0000000FFE0FFE0000000FFE0FFE0000000FFE0FF +E0000000FFE07FE0000000FFC07FE0000000FFC07FF0000001FFC07FF0000001FFC03FF0000001 +FF803FF0000001FF801FF8000003FF001FF8000003FF000FFC000007FE000FFC000007FE0007FE +00000FFC0003FF00001FF80001FF80003FF00000FFC0007FE000003FE000FF8000001FFC07FF00 +000007FFFFFC00000000FFFFE0000000000FFE00000033317BB03E>79 D<001FF0018000FFFF03 +8003FFFFC78007F00FFF800F8001FF801F00007F803F00001F803E00000F807E00000F807E0000 +0780FE00000780FE00000780FE00000380FF00000380FF00000380FF80000000FFE00000007FFC +0000007FFFE000007FFFFE00003FFFFFC0001FFFFFF0001FFFFFF8000FFFFFFC0003FFFFFE0001 +FFFFFF00007FFFFF80001FFFFF800000FFFFC0000007FFC0000000FFE00000003FE00000003FE0 +0000001FE06000001FE0E000000FE0E000000FE0E000000FE0E000000FC0F000000FC0F000000F +C0F800001F80FC00001F80FF00003F00FFC0007E00FFFC01FC00F1FFFFF800E03FFFE000C007FF +000023317BB02E>83 D89 D<007FF8000003FFFF000007FFFFC0000FE01FE0 +001FF007F0001FF003F8001FF003FC001FF001FE000FE001FE0007C001FE00010001FE00000001 +FE00000001FE000001FFFE00003FFFFE0001FFF1FE0007FE01FE000FF001FE001FC001FE003F80 +01FE007F8001FE00FF0001FE00FF0001FE00FF0001FE00FF0001FE00FF0003FE007F8003FE007F +C00EFE003FF03CFF000FFFF87FF807FFF03FF800FF800FF825207E9F28>97 +D<0007FC0000003FFF800000FFFFE00003FC07F00007F801F8000FE000FC001FE0007E003FC000 +7E003FC0003F007FC0003F007F80003F007F80003F80FF80003F80FF80003F80FFFFFFFF80FFFF +FFFF80FFFFFFFF80FF80000000FF80000000FF800000007F800000007F800000003FC00000003F +C00003801FC00003801FE00007800FF0000F0007F8001E0003FE00FC0000FFFFF800003FFFE000 +0003FF000021207E9F26>101 D<001FF007E000FFFE3FF001FFFF7FF807F83FF1F80FE00FE1F8 +0FE00FE0F01FC007F0601FC007F0003FC007F8003FC007F8003FC007F8003FC007F8003FC007F8 +001FC007F0001FC007F0000FE00FE0000FE00FE00007F83FC00007FFFF000006FFFE00000E1FF0 +00000E000000001E000000001E000000001F000000001F800000001FFFFFC0000FFFFFF8000FFF +FFFE0007FFFFFF0003FFFFFF8007FFFFFFC01FFFFFFFE03F00007FE07E00000FF0FC000007F0FC +000003F0FC000003F0FC000003F0FC000003F07E000007E03F00000FC01FC0003F800FF801FF00 +07FFFFFE0000FFFFF000001FFF8000252F7E9F29>103 D<01C00007F0000FF8000FF8001FFC00 +1FFC001FFC000FF8000FF80007F00001C000000000000000000000000000000000000000000000 +00000001F800FFF800FFF800FFF8000FF80007F80007F80007F80007F80007F80007F80007F800 +07F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F800 +07F80007F80007F80007F800FFFF80FFFF80FFFF8011337DB217>105 D<01F800FFF800FFF800 +FFF8000FF80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F800 +07F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F800 +07F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F800 +07F80007F80007F80007F80007F800FFFFC0FFFFC0FFFFC012327DB117>108 +D<03F007F8000FF000FFF03FFF007FFE00FFF07FFF80FFFF00FFF0F03FC1E07F800FF1C01FE380 +3FC007F3000FE6001FC007F6000FFC001FE007FE000FFC001FE007FC000FF8001FE007FC000FF8 +001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000F +F0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F800 +0FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8 +000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE0FF +FFC1FFFF83FFFFFFFFC1FFFF83FFFFFFFFC1FFFF83FFFF40207D9F45>I<03F007F80000FFF03F +FF0000FFF07FFF8000FFF0F03FC0000FF1C01FE00007F3000FE00007F6000FF00007FE000FF000 +07FC000FF00007FC000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F800 +0FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF000 +07F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F800 +0FF00007F8000FF000FFFFC1FFFF80FFFFC1FFFF80FFFFC1FFFF8029207D9F2E>I<0007FE0000 +003FFFC00000FFFFF00003FC03FC0007F000FE000FE0007F001FC0003F803FC0003FC03FC0003F +C07F80001FE07F80001FE07F80001FE0FF80001FF0FF80001FF0FF80001FF0FF80001FF0FF8000 +1FF0FF80001FF0FF80001FF0FF80001FF07F80001FE07F80001FE07F80001FE03FC0003FC03FC0 +003FC01FE0007F800FE0007F0007F801FE0003FE07FC0001FFFFF800003FFFC0000007FE000024 +207E9F29>I<03F03F00FFF07FC0FFF1FFE0FFF3C7F00FF38FF807F70FF807F60FF807FE0FF807 +FC07F007FC03E007FC008007F8000007F8000007F8000007F8000007F8000007F8000007F80000 +07F8000007F8000007F8000007F8000007F8000007F8000007F8000007F8000007F8000007F800 +0007F80000FFFFE000FFFFE000FFFFE0001D207E9F22>114 D<00380000380000380000380000 +380000780000780000780000F80000F80001F80003F80007F8001FF800FFFFFEFFFFFEFFFFFE07 +F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007 +F80007F80007F80007F80707F80707F80707F80707F80707F80707F80703F80E03FC0E01FE1C00 +FFF8007FF0000FE0182E7EAD20>116 D<01F80003F000FFF801FFF000FFF801FFF000FFF801FF +F0000FF8001FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007 +F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000F +F00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007 +F8000FF00007F8001FF00007F8001FF00003F8003FF00003F8006FF00001FE03CFF80000FFFF8F +FF80007FFF0FFF80000FFC0FFF8029207D9F2E>II +E end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 300 +TeXDict begin +%%EndSetup +%%Page: 1 1 +bop 193 216 a Fo(HLFSD:)26 b(Deliv)n(ering)h(Email)g(to)h(Y)-7 +b(our)28 b($HOME)280 336 y Fn(Er)n(ez)17 b(Zadok,)g(Computer)h(Scienc)n(e)h +(Dep)n(artment,)e(Columbia)h(University)482 394 y(A)o(lexander)h(Dupuy,)e +(System)h(Management)h(AR)l(TS)841 541 y Fm(ABSTRA)o(CT)241 +628 y Fl(W)m(e)12 b(consider)h(the)g(problem)e(of)h(enabling)g(users)i(to)e +(access)i(their)f(mailb)q(o)o(x)d(\014les)i(from)f(an)o(y)h(host)179 +678 y(on)k(our)h(lo)q(cal)f(net)o(w)o(ork,)h(and)f(not)h(only)f(on)g(one)h +(designated)g(\\home)f(mac)o(hine".)25 b(W)m(e)16 b(require)h(a)179 +728 y(solution)11 b(whic)o(h)g(will)f(not)i(in)o(tro)q(duce)g(an)o(y)f(new)h +(single)g(p)q(oin)o(ts)f(of)g(failure,)g(force)h(us)g(to)g(mo)q(dify)d(mail) +179 778 y(transfer)16 b(agen)o(ts)f(and)g(user)i(agen)o(ts,)e(or)g(require)h +(c)o(hanges)g(to)f(the)h(op)q(erating)f(system)g(k)o(ernels.)22 +b(In)179 828 y(other)15 b(w)o(ords,)g(minim)o(ize)e(the)i(amoun)o(t)e(of)h(w) +o(ork)h(needed)h(b)o(y)e(system-administrators)g(and)g(users.)179 +877 y(Our)i(solution)e(is)h(to)h(deliv)o(er)f(mail)e(in)o(to)h(the)i(users')h +(home)d(directories,)i(whic)o(h)g(are)f(exp)q(orted)i(via)179 +927 y(NFS[20)o(,)g(25])f(to)i(all)e(of)h(the)h(mac)o(hines)e(on)h(our)h(net)o +(w)o(ork.)29 b(W)m(e)17 b(wrote)h(a)f(small)e(user-lev)o(el)j(NFS)179 +977 y(serv)o(er)d(implemen)o(ting)c(a)j(single)f(sym)o(b)q(olic)f(link)h +(that)h(references)j(the)e(home)e(directory)h(of)g(a)g(user,)179 +1027 y(either)h(the)g(one)g(who)f(accessed)j(it,)c(or)i(b)o(y)f(name,)f(with) +h(a)g(fallbac)o(k)f(reference)k(in)d(case)h(of)f(failures.)179 +1077 y(This)d(enables)h(electronic)g(mail)d(to)i(b)q(e)h(deliv)o(ered)g +(directly)g(in)o(to)e(the)i(user's)g(home)f(directory)m(,)g(whic)o(h)179 +1126 y(is)f(already)h(accessible)h(from)d(an)o(y)h(mac)o(hine)g(on)h(the)g +(net)o(w)o(ork.)17 b(Although)10 b(w)o(e)i(ha)o(v)o(e)e(used)i(our)f(serv)o +(er)179 1176 y(primarily)f(for)i(mail)e(deliv)o(ery)j(redirection,)g(it)f +(can)h(b)q(e)g(used)h(to)e(redirect)i(sp)q(o)q(oled)f(faxes,)g(access)h(to) +179 1226 y Fk(/tmp)p Fl(,)e(etc.)75 1345 y Fj(1)56 b(In)n(tro)r(duction)175 +1420 y Fl(Electronic)16 b(mail)e(has)i(b)q(ecome)g(one)g(of)f(the)i(ma)r(jor) +d(applications)h(for)h(man)o(y)e(computer)i(net)o(w)o(orks,)g(and)75 +1470 y(use)k(of)f(this)g(service)h(is)f(exp)q(ected)j(to)d(increase)h(o)o(v)o +(er)f(time,)g(as)g(net)o(w)o(orks)h(proliferate)f(and)g(b)q(ecome)g(faster.) +75 1520 y(Pro)o(viding)10 b(a)h(con)o(v)o(enien)o(t)h(en)o(vironmen)o(t)f +(for)g(users)i(to)e(read,)h(comp)q(ose,)f(and)g(send)h(electronic)h(mail)c +(has)i(b)q(ecome)75 1570 y(a)j(requiremen)o(t)f(for)h(systems)g +(administrators)e(\(SAs\).)175 1644 y(Widely)j(used)j(metho)q(ds)d(for)i +(handling)e(mail)f(usually)h(require)j(users)f(to)g(b)q(e)g(logged)e(in)o(to) +h(a)g(designated)75 1694 y(\\home")e(mac)o(hine,)f(where)k(their)e(mailb)q(o) +o(x)e(\014les)i(reside.)23 b(Only)15 b(on)g(that)h(one)f(mac)o(hine)f(can)i +(they)f(read)h(newly)75 1744 y(arriv)o(ed)i(mail.)28 b(Since)19 +b(users)g(ha)o(v)o(e)f(to)g(b)q(e)h(logged)e(in)o(to)g(that)h(system)g(to)g +(read)h(their)f(mail,)e(they)j(often)f(\014nd)75 1794 y(it)h(con)o(v)o(enien) +o(t)h(to)g(run)g(all)f(of)g(their)h(other)g(pro)q(cesses)j(on)c(that)h +(system)f(as)h(w)o(ell,)g(including)f(memory)e(and)75 1844 +y(CPU-in)o(tensiv)o(e)j(jobs.)34 b(F)m(or)19 b(example,)g(in)g(our)g +(departmen)o(t,)h(w)o(e)g(ha)o(v)o(e)f(allo)q(cated)g(and)g(con\014gured)h +(sev)o(eral)75 1893 y(m)o(ulti-pro)q(cessor)11 b(serv)o(ers)i(to)e(handle)g +(suc)o(h)i(demanding)c(CPU)q(/memory)f(applications,)j(but)g(these)i(w)o(ere) +f(under-)75 1943 y(utilized,)k(in)g(large)g(part)g(due)h(to)f(the)g(incon)o +(v)o(enience)i(of)d(not)h(b)q(eing)g(able)g(to)g(read)h(mail)c(on)j(those)h +(mac)o(hines.)75 1993 y(\(No)h(home)e(directories)j(w)o(ere)g(lo)q(cated)f +(on)f(these)i(designated)g(CPU-serv)o(ers,)h(since)f(w)o(e)e(did)h(not)f(w)o +(an)o(t)h(NFS)75 2043 y(service)g(for)f(users')g(home)f(directories)i(to)f +(ha)o(v)o(e)f(to)h(comp)q(ete)g(with)f(in)o(tensiv)o(e)h(jobs.)27 +b(A)o(t)17 b(the)g(same)f(time,)g(w)o(e)75 2093 y(discouraged)e(users)i(from) +c(running)h(demanding)g(applications)f(on)i(their)g(home)f(mac)o(hines.\))175 +2167 y(Man)o(y)k(di\013eren)o(t)h(solutions)f(ha)o(v)o(e)h(b)q(een)h(prop)q +(osed)f(to)f(allo)o(w)f(users)j(to)f(read)g(their)g(mail)d(on)i(an)o(y)g +(host.)75 2217 y(Ho)o(w)o(ev)o(er,)d(all)e(of)i(these)h(solutions)f(fail)e +(in)h(one)h(or)g(more)f(of)g(sev)o(eral)i(w)o(a)o(ys:)137 2328 +y Fi(\017)21 b Fl(they)14 b(in)o(tro)q(duce)h(new)f(single)g(p)q(oin)o(ts)f +(of)h(failure)137 2409 y Fi(\017)21 b Fl(they)14 b(require)h(using)f +(di\013eren)o(t)g(mail)e(transfer)i(agen)o(ts)h(\(MT)m(As\)[15)o(])e(or)h +(user)h(agen)o(ts)g(\(UAs\))137 2490 y Fi(\017)21 b Fl(they)16 +b(do)f(not)g(solv)o(e)g(the)h(problem)e(for)h(all)f(cases,)i(i.e.)22 +b(the)16 b(solution)e(is)h(only)g(partially)e(successful)k(for)e(a)179 +2539 y(particular)e(en)o(vironmen)o(t.)175 2650 y(W)m(e)e(ha)o(v)o(e)h +(designed)g(a)f(simple)g(\014lesystem,)g(called)h(the)g Fh(Home-Link)h(File)f +(System)p Fl(,)g(to)g(pro)o(vide)f(the)i(abilit)o(y)75 2700 +y(to)d(deliv)o(er)h(mail)d(to)i(users')h(home)e(directories,)j(without)e(mo)q +(di\014cation)f(to)h(mail-related)e(applications.)16 b(W)m(e)10 +b(ha)o(v)o(e)p eop +%%Page: 2 2 +bop 75 42 a Fl(endea)o(v)o(ored)15 b(to)e(mak)o(e)f(it)i(as)f(stable)h(as)g +(p)q(ossible.)k(Of)c(great)g(imp)q(ortance)f(to)g(us)h(w)o(as)g(to)f(mak)o(e) +g(sure)h(the)h(HLFS)75 91 y(daemon,)10 b Fk(hlfsd)o Fl(,)h(w)o(ould)g(not)g +(hang)g(under)h(an)o(y)f(circumstances,)h(and)f(w)o(ould)f(tak)o(e)i(the)g +(next-b)q(est)h(action)d(when)75 141 y(faced)16 b(with)g(problems.)24 +b(Compared)15 b(to)g(alternativ)o(e)h(metho)q(ds,)g Fk(hlfsd)f +Fl(is)h(a)g(stable,)g(more)f(general)h(solution,)75 191 y(and)g(easier)h(to)f +(install/use.)25 b(In)16 b(fact,)g(in)g(some)f(w)o(a)o(ys,)i(w)o(e)f(ha)o(v)o +(e)g(ev)o(en)h(managed)e(to)h(impro)o(v)o(e)e(the)j(reliabilit)o(y)75 +241 y(and)d(securit)o(y)h(of)e(mail)e(service.)175 315 y(Our)k(serv)o(er)i +(implemen)o(ts)c(a)i(small)e(\014lesystem)i(con)o(taining)f(a)h(sym)o(b)q +(olic)f(link)g(to)h(a)g(sub)q(directory)i(of)d(the)75 365 y(in)o(v)o(oking)c +(user's)j(home)e(directory)m(,)i(and)f(named)e(sym)o(b)q(olic)h(links)g(to)h +(users')h(mailb)q(o)o(x)c(\014les.)18 b(An)13 b(example,)d(using)75 +415 y(pathnames)j(from)f(our)i(en)o(vironmen)o(t,)e(is)i(depicted)h(in)f +(Figure)g(1.)1128 400 y Fg(1)p 75 477 1800 5 v 75 1424 a @beginspecial +0 @llx 0 @lly 599 @urx 311 @ury 4320 @rwi @setspecial +%%BeginDocument: hlfs-flowchart.eps +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/l {lineto} bind def +/m {moveto} bind def +/s {stroke} bind def +/n {newpath} bind def +/gs {gsave} bind def +/gr {grestore} bind def +/clp {closepath} bind def +/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul +4 -2 roll mul setrgbcolor} bind def +/col-1 {} def +/col0 {0 0 0 setrgbcolor} bind def +/col1 {0 0 1 setrgbcolor} bind def +/col2 {0 1 0 setrgbcolor} bind def +/col3 {0 1 1 setrgbcolor} bind def +/col4 {1 0 0 setrgbcolor} bind def +/col5 {1 0 1 setrgbcolor} bind def +/col6 {1 1 0 setrgbcolor} bind def +/col7 {1 1 1 setrgbcolor} bind def + end +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +0 setlinecap 0 setlinejoin +-4.0 329.0 translate 0.900 -0.900 scale +0.500 setlinewidth +n 319 19 m 312 19 312 32 7 arcto 4 {pop} repeat 312 39 350 39 7 arcto 4 {pop} repeat 357 39 357 26 7 arcto 4 {pop} repeat 357 19 319 19 7 arcto 4 {pop} repeat clp gs col-1 s gr +/Times-Roman findfont 12.00 scalefont setfont +317 34 m +gs 1 -1 scale (START) col-1 show gr +/Times-Roman findfont 18.00 scalefont setfont +269 360 m +gs 1 -1 scale (".") col-1 show gr +/Times-Roman findfont 18.00 scalefont setfont +254 335 m +gs 1 -1 scale (Return) col-1 show gr +n 256 320 m 249 320 249 358 7 arcto 4 {pop} repeat 249 365 302 365 7 arcto 4 {pop} repeat 309 365 309 327 7 arcto 4 {pop} repeat 309 320 256 320 7 arcto 4 {pop} repeat clp gs col-1 s gr +n 274 100 m 199 100 l 199 170 l gs col-1 s gr +n 201.000 162.000 m 199.000 170.000 l 197.000 162.000 l gs 2 setlinejoin col-1 s gr +n 394 100 m 479 100 l 479 120 l gs col-1 s gr +n 481.000 112.000 m 479.000 120.000 l 477.000 112.000 l gs 2 setlinejoin col-1 s gr +n 139 210 m 124 210 l 124 320 l gs col-1 s gr +n 126.000 312.000 m 124.000 320.000 l 122.000 312.000 l gs 2 setlinejoin col-1 s gr +n 479 200 m 479 220 l gs col-1 s gr +n 481.000 212.000 m 479.000 220.000 l 477.000 212.000 l gs 2 setlinejoin col-1 s gr +n 539 260 m 569 260 l 569 320 l gs col-1 s gr +n 571.000 312.000 m 569.000 320.000 l 567.000 312.000 l gs 2 setlinejoin col-1 s gr +n 334 40 m 334 60 l gs col-1 s gr +n 336.000 52.000 m 334.000 60.000 l 332.000 52.000 l gs 2 setlinejoin col-1 s gr +n 334 60 m 274 100 l 334 140 l 394 100 l 334 60 l gs col-1 s gr +n 199 170 m 139 210 l 199 250 l 259 210 l 199 170 l gs col-1 s gr +n 479 120 m 419 160 l 479 200 l 539 160 l 479 120 l gs col-1 s gr +n 479 220 m 419 260 l 479 300 l 539 260 l 479 220 l gs col-1 s gr +n 326 319 m 319 319 319 357 7 arcto 4 {pop} repeat 319 364 467 364 7 arcto 4 {pop} repeat 474 364 474 326 7 arcto 4 {pop} repeat 474 319 326 319 7 arcto 4 {pop} repeat clp gs col-1 s gr +n 419 159 m 364 159 l 364 179 l gs col-1 s gr +n 366.000 171.000 m 364.000 179.000 l 362.000 171.000 l gs 2 setlinejoin col-1 s gr +n 306 179 m 299 179 299 212 7 arcto 4 {pop} repeat 299 219 427 219 7 arcto 4 {pop} repeat 434 219 434 186 7 arcto 4 {pop} repeat 434 179 306 179 7 arcto 4 {pop} repeat clp gs col-1 s gr +n 491 319 m 484 319 484 357 7 arcto 4 {pop} repeat 484 364 662 364 7 arcto 4 {pop} repeat 669 364 669 326 7 arcto 4 {pop} repeat 669 319 491 319 7 arcto 4 {pop} repeat clp gs col-1 s gr +n 11 319 m 4 319 4 357 7 arcto 4 {pop} repeat 4 364 237 364 7 arcto 4 {pop} repeat 244 364 244 326 7 arcto 4 {pop} repeat 244 319 11 319 7 arcto 4 {pop} repeat clp gs col-1 s gr +n 259 210 m 279 210 l 279 320 l gs col-1 s gr +n 281.000 312.000 m 279.000 320.000 l 277.000 312.000 l gs 2 setlinejoin col-1 s gr +n 419 259 m 389 259 l 389 319 l gs col-1 s gr +n 391.000 311.000 m 389.000 319.000 l 387.000 311.000 l gs 2 setlinejoin col-1 s gr +/Times-BoldItalic findfont 12.00 scalefont setfont +399 90 m +gs 1 -1 scale (No) col-1 show gr +/Times-BoldItalic findfont 12.00 scalefont setfont +254 90 m +gs 1 -1 scale (Yes) col-1 show gr +/Times-BoldItalic findfont 12.00 scalefont setfont +259 200 m +gs 1 -1 scale (Yes) col-1 show gr +/Times-BoldItalic findfont 12.00 scalefont setfont +124 200 m +gs 1 -1 scale (No) col-1 show gr +/Times-BoldItalic findfont 12.00 scalefont setfont +399 150 m +gs 1 -1 scale (Yes) col-1 show gr +/Times-BoldItalic findfont 12.00 scalefont setfont +489 215 m +gs 1 -1 scale (No) col-1 show gr +/Times-BoldItalic findfont 12.00 scalefont setfont +544 250 m +gs 1 -1 scale (Yes) col-1 show gr +/Times-BoldItalic findfont 12.00 scalefont setfont +404 250 m +gs 1 -1 scale (No) col-1 show gr +/Times-Roman findfont 12.00 scalefont setfont +459 280 m +gs 1 -1 scale (Writable?) col-1 show gr +/Times-Roman findfont 18.00 scalefont setfont +102 335 m +gs 1 -1 scale (Return) col-1 show gr +/Times-Roman findfont 18.00 scalefont setfont +547 335 m +gs 1 -1 scale (Return) col-1 show gr +/Times-Italic findfont 12.00 scalefont setfont +454 164 m +gs 1 -1 scale (uid) col-1 show gr +/Times-Roman findfont 12.00 scalefont setfont +474 164 m +gs 1 -1 scale (== 0?) col-1 show gr +/Times-Roman findfont 12.00 scalefont setfont +192 215 m +gs 1 -1 scale (==) col-1 show gr +/Times-Roman findfont 18.00 scalefont setfont +369 335 m +gs 1 -1 scale (Return) col-1 show gr +/Times-BoldItalic findfont 18.00 scalefont setfont +487 355 m +gs 1 -1 scale (~USER) col-1 show gr +/Courier-Bold findfont 18.00 scalefont setfont +549 354 m +gs 1 -1 scale (.mailspool/) col-1 show gr +/Courier-Bold findfont 18.00 scalefont setfont +542 354 m +gs 1 -1 scale (/) col-1 show gr +/Courier findfont 11.00 scalefont setfont +461 264 m +gs 1 -1 scale (.mailspool/) col-1 show gr +/Courier findfont 12.00 scalefont setfont +459 263 m +gs 1 -1 scale (/) col-1 show gr +/Times-Italic findfont 12.00 scalefont setfont +424 264 m +gs 1 -1 scale (~USER) col-1 show gr +/Courier findfont 12.00 scalefont setfont +207 215 m +gs 1 -1 scale (home) col-1 show gr +/Times-Roman findfont 12.00 scalefont setfont +239 215 m +gs 1 -1 scale (?) col-1 show gr +/Times-Italic findfont 12.00 scalefont setfont +155 215 m +gs 1 -1 scale (NAME) col-1 show gr +/Times-Roman findfont 18.00 scalefont setfont +341 194 m +gs 1 -1 scale (Return) col-1 show gr +/Times-Italic findfont 12.00 scalefont setfont +284 102 m +gs 1 -1 scale (gid) col-1 show gr +/Times-Roman findfont 12.00 scalefont setfont +302 103 m +gs 1 -1 scale (== HLFS_GID?) col-1 show gr +/Times-Roman findfont 12.00 scalefont setfont +474 249 m +gs 1 -1 scale (Is) col-1 show gr +/Courier-Bold findfont 18.00 scalefont setfont +322 354 m +gs 1 -1 scale (/var/alt_mail/) col-1 show gr +/Times-BoldItalic findfont 18.00 scalefont setfont +189 354 m +gs 1 -1 scale (NAME) col-1 show gr +/Times-BoldItalic findfont 18.00 scalefont setfont +6 353 m +gs 1 -1 scale (~NAME) col-1 show gr +/Courier-Bold findfont 18.00 scalefont setfont +69 353 m +gs 1 -1 scale (/) col-1 show gr +/Courier-Bold findfont 18.00 scalefont setfont +73 353 m +gs 1 -1 scale (.mailspool/) col-1 show gr +/Courier-Bold findfont 18.00 scalefont setfont +300 214 m +gs 1 -1 scale (/.mailspool/) col-1 show gr +$F2psEnd +%%EndDocument + @endspecial 371 1515 a Fl(Figure)g(1:)j Fk(Hlfsd)c Fl(resolving)h(the)g +Fh(NAME)g Fl(comp)q(onen)o(t)f(of)h Fk(/mail/)p Fh(NAME)p 75 +1565 V 175 1707 a Fl(The)c Fk(hlfsd)f Fl(serv)o(er)j(\014nds)f(out)f(the)h +Fh(uid)782 1692 y Fg(2)810 1707 y Fl(of)f(the)h(pro)q(cess)h(that)e(is)g +(accessing)h(its)g(moun)o(t)d(p)q(oin)o(t,)i(and)g(resolv)o(es)75 +1756 y(the)j(pathname)e(comp)q(onen)o(t)g Fk(home)g Fl(as)i(a)f(sym)o(b)q +(olic)e(link)h(to)h(a)g(sub)q(directory)h(within)f(the)h(home)e(directory)h +(giv)o(en)75 1806 y(b)o(y)18 b(the)h Fh(uid)p Fl('s)f(en)o(try)h(in)e(the)i +(passw)o(ord)g(\014le.)30 b(See)19 b(T)m(able)f(1.)30 b(If)18 +b(the)h Fh(gid)f Fl(of)f(the)i(pro)q(cess)h(that)e(attempts)g(to)75 +1856 y(access)c(a)f(mailb)q(o)o(x)d(\014le)i(is)h(a)f(sp)q(ecial)h(one)g +(\(called)f(HLFS)p 976 1856 13 2 v 16 w(GID\),)f(then)j(the)f(serv)o(er)h +(maps)d(the)j(name)d(of)h(the)h(next)p 1795 1863 80 2 v 75 +1906 a(pathname)h(comp)q(onen)o(t)h(directly)h(to)g(the)g(user's)g(mailb)q(o) +o(x)d(\(T)m(able)i(2\).)23 b(This)15 b(is)h(necessary)h(so)f(that)g(access)h +(to)75 1956 y(a)d(mailb)q(o)o(x)e(\014le)i(b)o(y)h(users)h(other)f(than)g +(the)g(o)o(wner)g(can)f(succeed.)23 b(The)15 b(serv)o(er)h(has)f(safet)o(y)f +(features)i(in)e(case)i(of)75 2006 y(failures)d(suc)o(h)i(as)f(h)o(ung)g +(\014lesystems)g(or)g(home)e(directory)j(\014lesystems)f(that)g(are)g +(inaccessible)h(or)f(full.)175 2080 y(On)20 b(most)f(of)g(our)h(mac)o(hines,) +g(mail)e(gets)j(deliv)o(ered)f(to)g(the)h(directory)f Fk(/var/spool/mail)p +Fl(.)1720 2065 y Fg(3)1772 2080 y Fl(Man)o(y)75 2130 y(programs,)12 +b(including)g(UAs,)i(dep)q(end)h(on)e(that)h(path.)k Fk(Hlfsd)12 +b Fl(creates)k(a)d(directory)h Fk(/mail)p Fl(,)f(and)g(moun)o(ts)f(itself)75 +2180 y(on)18 b(top)h(of)f(that)h(directory)m(.)32 b Fk(Hlfsd)18 +b Fl(implem)o(en)o(ts)f(the)i(path)g(name)e(comp)q(onen)o(t)h(called)g +Fk(home)p Fl(,)h(p)q(oin)o(ting)e(to)75 2230 y(a)f(sub)q(directory)j(of)d +(the)h(user's)h(home)e(directory)m(.)27 b(W)m(e)16 b(ha)o(v)o(e)h(made)e +Fk(/var/spool/mail)f Fl(a)i(sym)o(b)q(olic)f(link)h(to)75 2280 +y Fk(/mail/home)p Fl(,)d(so)i(that)g(accessing)h Fk(/var/spool/mail)c +Fl(actually)i(causes)i(access)h(to)e(a)g(sub)q(directory)h(within)e(a)75 +2329 y(user's)h(home)e(directory)m(.)175 2404 y(The)20 b(rest)h(of)f(this)g +(pap)q(er)g(is)g(organized)g(as)g(follo)o(ws.)35 b(Section)21 +b(2)e(discusses)j(in)e(detail)f(the)i(problems)75 2454 y(and)e(limitations)d +(of)j(other)h(home-mai)o(l-deli)o(v)o(ery)d(metho)q(ds.)34 +b(Section)19 b(3)g(detail)g(the)h(design)f(of)g(the)h Fh(Home-)p +75 2488 720 2 v 121 2515 a Ff(1)139 2527 y Fe(In)10 b(Figure)g(1,)h +Fd(~)p Fc(NAME)h Fe(is)f(the)g(home)f(directory)e(of)j(the)g(user)f(whose)h +(user-name)d(is)j Fc(NAME)p Fe(;)i Fd(~)p Fc(USER)e Fe(is)h(the)e(home)g +(directory)75 2566 y(of)h(the)g(user)g(with)g(user-id)f Fc(uid)p +Fe(.)121 2594 y Ff(2)139 2606 y Fe(NFS)h(uses)g(e\013ectiv)o(e)e +Fc(uids)p Fe(.)121 2634 y Ff(3)139 2646 y Fe(Other)i(directories)f(used)h +(for)g(this)h(purp)q(ose)e(are)h Fd(/var/mail)f Fe(on)h(SVR4,)h +Fd(/usr/mail)d Fe(on)j(other)f(System)f(V-based)h(op)q(erating-)75 +2685 y(systems,)f(and)g Fd(/usr/spool/)o(mai)o(l)f Fe(on)i(BSD-based)e +(systems.)965 2825 y Fl(2)p eop +%%Page: 3 3 +bop 75 4 1800 5 v 229 58 a Fl(Conditions:)17 b Fh(uid)p Fl(=)p +Fk(ezk)p Fl(,)c Fh(gid)p Fi(6)p Fl(=HLFS)p 828 58 13 2 v 16 +w(GID,)f(and)i Fk(/users/ezk/.mailsp)o(ool/)c Fl(is)k(writable.)p +157 77 1636 2 v 156 127 2 50 v 165 127 V 190 112 a Fm(Resolving)p +453 127 V 1088 127 V 1784 127 V 1793 127 V 156 177 V 165 177 +V 190 162 a(comp)q(onen)o(t)p 453 177 V 58 w(P)o(athname)g(left)p +1088 177 V 337 w(V)l(alue)h(if)g(sym)o(b)q(olic)f(link)p 1784 +177 V 1793 177 V 157 179 1636 2 v 157 189 V 156 238 2 50 v +165 238 V 190 223 a Fk(/)p 453 238 V 267 w(var/mail/)p Fh(NAME)p +1088 238 V 1784 238 V 1793 238 V 157 240 1636 2 v 156 290 2 +50 v 165 290 V 190 275 a Fk(var)p Fl(/)p 453 290 V 202 w Fk(mail/)p +Fh(NAME)p 1088 290 V 1784 290 V 1793 290 V 157 291 1636 2 v +156 341 2 50 v 165 341 V 190 326 a Fk(mail)p Fl(@)p 453 341 +V 169 w Fk(/mail/home/)p Fh(NAME)p 1088 341 V 265 w Fk(mail)p +Fl(@)g Fi(\))f Fk(/mail/home)p 1784 341 V 1793 341 V 157 343 +1636 2 v 156 393 2 50 v 165 393 V 190 378 a(/)p 453 393 V 267 +w(mail/home/)p Fh(NAME)p 1088 393 V 1784 393 V 1793 393 V 157 +394 1636 2 v 156 444 2 50 v 165 444 V 190 429 a Fk(mail)p Fl(/)p +453 444 V 180 w Fk(home/)p Fh(NAME)p 1088 444 V 1784 444 V +1793 444 V 157 446 1636 2 v 156 496 2 50 v 165 496 V 190 481 +a Fk(home)p Fl(@)p 453 496 V 169 w Fh(NAME)p 1088 496 V 507 +w Fk(home)p Fl(@)h Fi(\))f Fk(/users/ezk/.mailsp)o(ool)p 1784 +496 V 1793 496 V 157 497 1636 2 v 156 547 2 50 v 165 547 V +190 532 a(/)p 453 547 V 267 w(users/ezk/.mailsp)o(ool/)o Fh(NAME)p +1088 547 V 1784 547 V 1793 547 V 157 549 1636 2 v 156 599 2 +50 v 165 599 V 190 584 a Fk(users)p Fl(/)p 453 599 V 158 w +Fk(ezk/.mailspool/)p Fh(NA)o(ME)p 1088 599 V 1784 599 V 1793 +599 V 157 600 1636 2 v 156 650 2 50 v 165 650 V 190 635 a Fk(ezk)p +Fl(/)p 453 650 V 202 w Fk(.mailspool/)p Fh(NAME)p 1088 650 +V 1784 650 V 1793 650 V 157 652 1636 2 v 156 702 2 50 v 165 +702 V 190 687 a Fk(.mailspool)p Fl(/)p 453 702 V 48 w Fh(NAME)p +1088 702 V 1784 702 V 1793 702 V 157 703 1636 2 v 156 753 2 +50 v 165 753 V 190 738 a(NAME)p 453 753 V 1088 753 V 1784 753 +V 1793 753 V 157 755 1636 2 v 290 829 a Fl(T)m(able)g(1:)18 +b(Resolving)13 b Fk(/var/mail/)p Fh(NAME)f Fl(to)h Fk(/users/ezk/.mailspo)o +(ol/)p Fh(NAME)p 75 879 1800 5 v 75 1000 a(Link)19 b(File)f(System)h +Fl(and)f(Section)g(4)g(describ)q(es)i(the)f(implemen)o(tation)c(of)i +Fk(hlfsd)o Fl(.)31 b(Section)19 b(5)f(ev)n(aluates)g(our)75 +1050 y(implemen)o(tatio)o(n.)e(Related)d(systems,)h(conclusions,)g(future)g +(directions,)g(and)g(alternativ)o(e)g(uses)h(are)f(describ)q(ed)75 +1100 y(in)f(Sections)i(6)f(and)f(7.)75 1208 y Fj(2)56 b(Bac)n(kground)175 +1283 y Fl(This)16 b(section)h(pro)o(vides)f(an)g(in-depth)g(discussion)h(of)f +(wh)o(y)g(a)o(v)n(ailable)d(metho)q(ds)j(for)g(deliv)o(ering)g(mail)d(to)75 +1333 y(home)g(directories)i(are)f(not)g(as)g(go)q(o)q(d)f(as)h(the)h(one)f +(used)h(b)o(y)e Fk(hlfsd)o Fl(.)75 1441 y Fj(2.1)56 b(Single-Host)17 +b(Mail)h(Sp)r(o)r(ol)g(Directory)175 1516 y Fl(The)d(most)e(common)f(metho)q +(d)i(for)g(mail)e(deliv)o(ery)i(is)h(for)f(mail)e(to)i(b)q(e)h(app)q(ended)h +(to)f(a)f(mailb)q(o)o(x)e(\014le)i(in)g(a)75 1566 y(standard)d(sp)q(o)q(ol)f +(directory)h(on)f(the)h(designated)g(\\mail)c(home")i(mac)o(hine)g(of)h(the)h +(user.)17 b(The)11 b(greatest)h(adv)n(an)o(tage)75 1616 y(of)i(this)h(metho)q +(d)f(is)g(that)h(it)f(is)h(the)g(default)f(metho)q(d)g(most)g(v)o(endors)h +(pro)o(vide)g(with)f(their)h(systems,)g(th)o(us)g(v)o(ery)75 +1665 y(little)h(\(if)g(an)o(y\))g(con\014guration)g(is)h(required)g(on)f(the) +i(SA's)e(part.)26 b(All)16 b(they)h(need)h(to)e(set)i(up)e(are)h(mail)d +(aliases)75 1715 y(directing)g(mail)c(to)j(the)h(host)g(on)f(whic)o(h)g(the)h +(user's)h(mailb)q(o)o(x)10 b(\014le)k(is)f(assigned.)18 b(\(Otherwise,)d +(mail)10 b(is)j(deliv)o(ered)75 1765 y(lo)q(cally)m(,)f(and)h(users)j(\014nd) +e(mailb)q(o)o(xes)d(on)j(man)o(y)e(mac)o(hines.\))175 1840 +y(As)k(users)i(b)q(ecome)e(more)f(sophisticated,)i(and)f(aided)g(b)o(y)g +(windo)o(wing)f(systems,)i(they)f(\014nd)h(themselv)o(es)75 +1890 y(logging)12 b(in)i(on)g(m)o(ultiple)e(hosts)j(at)f(once,)g(p)q +(erforming)f(sev)o(eral)i(tasks)g(concurren)o(tly)m(.)k(They)c(ask)f(to)g(b)q +(e)h(able)f(to)75 1939 y(read)g(their)h(mail)c(on)j(an)o(y)f(host)h(on)g(the) +g(net)o(w)o(ork,)g(not)g(just)g(the)g(one)g(designated)h(as)f(their)g(\\mail) +d(home.")75 2047 y Fj(2.2)56 b(Cen)n(tralized)18 b(Mail)g(Sp)r(o)r(ol)f +(Directory)175 2122 y Fl(A)f(p)q(opular)g(metho)q(d)f(for)h(pro)o(viding)f +(mail)f(readabilit)o(y)h(from)g(an)o(y)h(host)g(is)g(to)h(ha)o(v)o(e)f(all)f +(mail)e(deliv)o(ered)75 2172 y(to)18 b(a)g(mail)e(sp)q(o)q(ol)i(directory)h +(on)f(a)g(designated)h(\\mail-serv)o(er")e(whic)o(h)h(is)g(exp)q(orted)h(via) +f(NFS)g(to)h(all)e(of)g(the)75 2222 y(hosts)f(on)g(the)g(net)o(w)o(ork.)24 +b(Con\014guring)15 b(suc)o(h)h(a)f(system)h(is)f(relativ)o(ely)g(easy)m(.)24 +b(On)16 b(most)e(systems,)i(the)g(bulk)g(of)75 2272 y(the)i(w)o(ork)f(is)h(a) +f(one-time)f(addition)g(to)i(one)f(or)h(t)o(w)o(o)f(con\014guration)g +(\014les)h(in)f Fk(/etc)p Fl(.)28 b(The)17 b(\014le-serv)o(er's)i(sp)q(o)q +(ol)75 2322 y(directory)d(is)f(then)h(hard-moun)o(ted)e(across)i(ev)o(ery)g +(mac)o(hine)e(on)h(the)h(lo)q(cal)e(net)o(w)o(ork.)22 b(In)16 +b(small)d(en)o(vironmen)o(ts)75 2371 y(with)f(only)g(a)g(handful)g(of)g +(hosts)h(this)f(can)h(b)q(e)g(an)f(acceptable)i(solution.)i(In)d(our)f +(departmen)o(t,)h(with)f(a)g(couple)h(of)75 2421 y(h)o(undred)j(activ)o(e)f +(hosts)h(and)f(thousands)g(of)g(mail)d(messages)j(pro)q(cessed)j(daily)m(,)13 +b(this)i(w)o(as)g(deemed)g(completely)75 2471 y(unacceptable,)g(as)f(it)f(in) +o(tro)q(duced)i(sev)o(eral)f(t)o(yp)q(es)h(of)e(problems:)137 +2587 y Fi(\017)21 b Fm(Scalabili)o(t)o(y)12 b(and)i(P)o(erformance)p +Fl(:)h(as)d(more)g(and)h(more)f(mac)o(hines)g(get)h(added)g(to)g(the)g(net)o +(w)o(ork,)g(more)179 2637 y(mail)7 b(tra\016c)j(has)g(to)g(go)f(o)o(v)o(er)h +(NFS)g(to)g(and)g(from)e(the)j(mail-serv)o(er.)k(Users)c(lik)o(e)f(to)f(run)i +(mail-w)o(a)o(tc)o(hers[2)n(,)f(7)o(])179 2687 y(and)g(read)i(their)f(mail)d +(often.)17 b(The)11 b(stress)i(on)d(the)i(shared)g(infrastructure)g +(increases)g(with)f(ev)o(ery)g(user)h(and)965 2825 y(3)p eop +%%Page: 4 4 +bop 179 42 a Fl(host)14 b(added;)f(loads)g(on)h(the)g(mail)d(serv)o(er)k(w)o +(ould)e(most)f(certainly)i(b)q(e)g(high)f(since)i(all)d(mail)f(deliv)o(ery)j +(go)q(es)179 91 y(through)i(that)h(one)g(mac)o(hine.)672 76 +y Fg(4)715 91 y Fl(This)g(leads)g(to)f(lo)o(w)o(er)g(reliabilit)o(y)f(and)h +(p)q(erformance.)26 b(T)m(o)16 b(reduce)i(the)179 141 y(n)o(um)o(b)q(er)11 +b(of)g(concurren)o(t)j(connections)f(b)q(et)o(w)o(een)g(clien)o(ts)f(and)g +(the)h(serv)o(er)g(host,)f(some)f(SAs)i(ha)o(v)o(e)e(resorted)179 +191 y(to)16 b(automoun)o(ting)e(the)j(mail-sp)q(o)q(ol)c(directory)m(.)26 +b(But)17 b(this)g(solution)e(only)h(mak)o(es)f(things)h(w)o(orse:)24 +b(since)179 241 y(users)15 b(often)e(run)h(mail)d(w)o(atc)o(hers,)j(and)f +(man)o(y)e(p)q(opular)i(applications)g(suc)o(h)h(as)f Fk(trn)p +Fl(,)g Fk(emacs)p Fl(,)f Fk(csh)g Fl(or)i Fk(ksh)179 291 y +Fl(c)o(hec)o(k)h(p)q(erio)q(dically)f(for)g(new)h(mail,)d(the)j(automoun)o +(ted)e(directory)i(w)o(ould)f(b)q(e)h(e\013ectiv)o(ely)h(p)q(ermanen)o(tly) +179 340 y(moun)o(ted.)g(If)c(it)g(gets)i(unmoun)o(ted)d(automatically)e(b)o +(y)k(the)g(automoun)o(ter)e(program[3)n(],)h(it)g(is)g(most)f(lik)o(ely)179 +390 y(to)17 b(get)h(moun)o(ted)e(shortly)i(afterw)o(ards,)g(consuming)e(more) +h(I/O)g(resources)j(b)o(y)d(the)h(constan)o(t)g(cycle)h(of)179 +440 y Fk(mount)13 b Fl(and)g Fk(umount)g Fl(calls.)137 523 +y Fi(\017)21 b Fm(Reliabil)o(i)o(t)o(y)p Fl(:)16 b(the)f(mail-serv)o(er)f +(host)h(and)f(its)h(net)o(w)o(ork)f(connectivit)o(y)h(m)o(ust)f(b)q(e)h(v)o +(ery)g(reliable.)k(W)m(orse,)179 573 y(since)g(the)g(sp)q(o)q(ol)f(directory) +h(has)f(to)g(b)q(e)h(hard-moun)o(ted,)1117 558 y Fg(5)1153 +573 y Fl(man)o(y)d(pro)q(cesses)21 b(whic)o(h)d(access)i(the)f(sp)q(o)q(ol) +179 623 y(directory)f(\(v)n(arious)e(shells,)i Fk(login)p Fl(,)f +Fk(emacs)p Fl(,)f(etc.\))30 b(w)o(ould)16 b(b)q(e)i(h)o(ung)f(as)g(long)g(as) +g(connectivit)o(y)g(to)g(the)179 672 y(mail-serv)o(er)9 b(is)h(sev)o(ered.)19 +b(T)m(o)10 b(impro)o(v)o(e)f(reliabilit)o(y)m(,)f(SAs)j(ma)o(y)e(c)o(ho)q +(ose)i(to)f(bac)o(kup)h(the)g(mail-serv)o(er's)e(sp)q(o)q(ol)179 +722 y(partition)16 b(sev)o(eral)h(times)g(a)f(da)o(y)m(.)27 +b(This)17 b(ma)o(y)e(mak)o(e)g(things)i(w)o(orse)h(since)f(reading)g(or)g +(deliv)o(ering)g(mail)179 772 y(while)e(bac)o(kups)h(are)g(in)f(progress)i +(ma)o(y)d(cause)j(bac)o(kups)f(to)f(b)q(e)i(inconsisten)o(t;)f(more)f(bac)o +(kups)h(consume)179 822 y(more)d(bac)o(kup-media)f(resources,)k(and)d +(increase)j(the)e(load)f(on)h(the)g(mail-serv)o(er)f(host.)75 +946 y Fj(2.3)56 b(Distributed)17 b(Mail)h(Sp)r(o)r(ol)g(Service)175 +1022 y Fl(Despite)d(the)f(existence)i(of)e(a)g(few)g(systems)h(that)f(supp)q +(ort)h(deliv)o(ery)f(to)h(users')g(home)e(directories,)1763 +1007 y Fg(6)1797 1022 y Fl(mail)75 1071 y(deliv)o(ery)18 b(to)f(home)g +(directories)i(hasn't)e(caugh)o(t)h(on.)29 b(W)m(e)17 b(b)q(eliev)o(e)i(the)f +(main)d(reason)k(is)e(that)h(there)h(are)f(to)q(o)75 1121 y(man)o(y)12 +b(programs)h(that)h(\\kno)o(w")g(where)h(mailb)q(o)o(x)c(\014les)k(reside.)20 +b(Besides)15 b(the)g(ob)o(vious)f(\(the)h(deliv)o(ery)f(program)75 +1171 y Fk(/bin/mail)9 b Fl(and)i(mail)e(readers)k(lik)o(e)d +Fk(/usr/ucb/Mail)p Fl(,)f Fk(mush)p Fl(,)h Fk(mm)p Fl(,)h(etc.\),)h(other)g +(programs)e(that)h(kno)o(w)g(mailb)q(o)o(x)75 1221 y(lo)q(cation)g(are)g +Fk(login)p Fl(,)g Fk(from)p Fl(,)g(almost)e(ev)o(ery)j(shell,)g +Fk(xbiff)p Fl(,)e Fk(xmailbox)p Fl(,)g(and)h(ev)o(en)h(some)f(programs)f(not) +i(directly)75 1271 y(related)h(to)g(mail,)c(suc)o(h)14 b(as)f +Fk(emacs)e Fl(and)i Fk(trn)p Fl(.)k(Although)12 b(some)f(of)h(these)i +(programs)e(can)h(b)q(e)g(con\014gured)g(to)g(lo)q(ok)75 1320 +y(in)18 b(di\013eren)o(t)h(directories)g(with)f(the)g(use)h(of)e(en)o +(vironmen)o(t)g(v)n(ariables)h(and)g(other)g(resources,)j(man)o(y)16 +b(of)i(them)75 1370 y(cannot.)g(The)d(o)o(v)o(erall)d(p)q(orting)i(w)o(ork)f +(is)h(signi\014can)o(t.)175 1445 y(Other)g(metho)q(ds)f(that)g(ha)o(v)o(e)g +(y)o(et)g(to)g(catc)o(h)h(on)f(require)h(the)g(use)g(of)e(a)h(sp)q(ecial)h +(mail-reading)c(serv)o(er,)k(suc)o(h)75 1495 y(as)g(IMAP[16)o(])f(or)h(POP)q +([17)o(].)j(The)d(main)e(disadv)n(an)o(tage)h(of)g(these)i(systems)f(is)f +(that)h(UAs)g(need)h(to)e(b)q(e)h(mo)q(di\014ed)75 1545 y(to)i(use)h(these)g +(services)h(|)d(a)h(long)f(and)h(in)o(v)o(olv)o(ed)f(task.)24 +b(That)16 b(is)g(wh)o(y)f(they)i(are)f(not)g(p)q(opular)g(at)g(this)g(time.) +75 1594 y(See)f(Section)f(6.1)f(for)h(more)e(details.)175 1669 +y(Sev)o(eral)h(other)i(ideas)e(ha)o(v)o(e)h(b)q(een)g(prop)q(osed)h(and)e(ev) +o(en)h(used)h(in)e(v)n(arious)g(en)o(vironmen)o(ts.)k(None)d(of)f(them)75 +1719 y(is)g(robust.)18 b(They)c(are)g(mostly)d(v)o(ery)j(sp)q(ecialized,)f +(in\015exible,)g(and)g(do)g(not)g(extend)h(to)f(the)h(general)f(case.)19 +b(Some)75 1769 y(of)13 b(the)i(ideas)f(are)g(plain)f(bad,)g(p)q(oten)o +(tially)g(leading)g(to)h(lost)f(or)h(corrupt)h(mail:)137 1885 +y Fi(\017)21 b Fm(automoun)o(ter)o(s)p Fl(:)14 b(using)f(an)f(automoun)o(ter) +f(suc)o(h)i(as)g Fk(amd)p Fl([13)n(])f(to)g(pro)o(vide)g(a)g(set)i(of)d(sym)o +(b)q(olic)g(links)h(from)179 1935 y(the)h(normal)e(sp)q(o)q(ol)i(directory)g +(to)g(user)h(home)d(directories)j(is)f(not)g(su\016cien)o(t.)18 +b(UAs)13 b(rename,)f(unlink,)g(and)179 1985 y(recreate)20 b(the)f(mailb)q(o)o +(x)c(as)k(a)f(regular)g(\014le,)h(therefore)g(it)f(m)o(ust)f(b)q(e)i(a)f +(real)g(\014le,)h(not)f(a)g(sym)o(b)q(olic)e(link.)179 2034 +y(F)m(urthermore,)d(it)g(m)o(ust)f(reside)j(in)e(a)g(real)g(directory)i(whic) +o(h)e(is)g(writable)g(b)o(y)h(the)g(UAs)g(and)f(MT)m(As.)18 +b(This)179 2084 y(metho)q(d)c(ma)o(y)g(also)h(require)h(p)q(opulating)e +Fk(/var/spool/mail)e Fl(with)j(sym)o(b)q(olic)f(links)h(and)g(making)e(sure) +179 2134 y(they)j(are)g(up)q(dated.)24 b(Making)15 b Fk(amd)g +Fl(manage)f(that)i(directory)g(directly)g(fails,)f(since)i(man)o(y)c(v)n +(arious)i(lo)q(c)o(k)179 2184 y(\014les)g(need)g(to)g(b)q(e)g(managed)e(as)h +(w)o(ell)g(\(see)i(Section)f(4.6\).)k(Also,)14 b Fk(amd)g Fl(do)q(es)h(not)g +(pro)o(vide)f(all)g(of)g(the)h(NFS)179 2234 y(op)q(erations)f(whic)o(h)g(are) +g(required)h(to)f(write)g(mail)d(suc)o(h)k(as)f Fh(write)p +Fl(,)e Fh(cr)n(e)n(ate)p Fl(,)h Fh(r)n(emove)p Fl(,)g(and)g +Fh(unlink)p Fl(.)137 2317 y Fi(\017)21 b Fm($MAIL)p Fl(:)15 +b(setting)g(this)h(v)n(ariable)e(to)h(an)h(automoun)o(ted)e(directory)i(p)q +(oin)o(ting)e(to)h(the)h(user's)g(mail)d(sp)q(o)q(ol)179 2367 +y(host)g(only)f(solv)o(es)i(the)f(problem)f(for)h(those)g(programs)f(whic)o +(h)h(kno)o(w)f(and)h(use)h($MAIL.)f(Man)o(y)f(programs)179 +2416 y(don't,)j(therefore)i(this)e(solution)g(is)g(partial)g(and)g(of)g +(limited)e(\015exibilit)o(y)m(.)21 b(Also,)15 b(it)g(requires)i(the)f(SAs)g +(or)179 2466 y(the)e(users)i(to)d(set)i(it)f(themselv)o(es)g(|)f(an)h(added)g +(lev)o(el)f(of)h(incon)o(v)o(enience)g(and)g(p)q(ossible)g(failures.)p +75 2501 720 2 v 121 2528 a Ff(4)139 2539 y Fe(Deliv)o(ery)8 +b(via)i(NFS-moun)o(ted)e(\014lesystems)h(ma)o(y)g(require)g(usage)h(of)g +Fd(rpc.lockd)e Fe(and)i Fd(rpc.statd)d Fe(to)k(pro)o(vide)d(distributed)g +(\014le-)75 2579 y(lo)q(c)o(king,)j(b)q(oth)g(of)i(whic)o(h)f(are)g(widely)f +(regarded)g(as)h(unstable)f(and)g(unreliable.)16 b(F)m(urthermore,)10 +b(this)i(will)h(degrade)d(p)q(erformance)o(,)75 2618 y(as)h(lo)q(cal)g(pro)q +(cesses)e(as)i(w)o(ell)h(as)f(remote)f Fd(nfsd)g Fe(pro)q(cesses)g(are)h(k)o +(ept)f(busy)m(.)121 2646 y Ff(5)139 2658 y Fe(No)h(SA)h(in)f(their)g(righ)o +(t)f(minds)g(w)o(ould)h(soft-moun)o(t)e(read/write)g(partitions)g(|)j(the)f +(c)o(hances)e(for)i(data)g(loss)g(are)g(to)q(o)f(great.)121 +2686 y Ff(6)139 2697 y Fe(AIX)i(1.2's)e Fd(bellmail)f Fe(for)i(the)g(IBM)h +(PS/2)p Fc(s)p Fe([9)n(],)f Fd(/bin/mail)e Fe(on)i(SunOS)f(for)h(the)g(Sun)f +(386i)h(mac)o(hines,)e(and)h Fd(zmailer)p Fe([27)m(].)965 2825 +y Fl(4)p eop +%%Page: 5 5 +bop 137 42 a Fi(\017)21 b Fm(/bin/mail)o Fl(:)h(using)17 b(a)g(di\013eren)o +(t)h(mail)d(deliv)o(ery)i(agen)o(t)g(could)g(b)q(e)h(the)g(solution.)27 +b(One)18 b(suc)o(h)g(example)179 91 y(is)h Fk(hdmail)p Fl([6)n(].)34 +b(Ho)o(w)o(ev)o(er,)21 b Fk(hdmail)d Fl(still)h(requires)h(mo)q(difying)d +(all)h(UAs,)j(the)f(MT)m(A's)f(con\014guration,)179 141 y(installing)c(new)i +(daemons,)e(and)i(c)o(hanging)e(login)h(scripts.)27 b(This)16 +b(mak)o(es)g(the)h(system)f(less)h(upgradable)179 191 y(or)f(compatible)f +(with)i(others,)h(and)e(adds)h(one)g(more)f(complicated)f(system)h(for)h(SAs) +g(to)f(deal)h(with.)26 b(It)179 241 y(is)14 b(not)g(a)g(complete)g(solution)g +(b)q(ecause)i(it)e(still)f(requires)j(eac)o(h)f(user)g(ha)o(v)o(e)g(their)f +($MAIL)h(v)n(ariable)e(setup)179 291 y(correctly)m(,)h(and)g(that)g(ev)o(ery) +g(program)e(use)j(this)f(v)n(ariable.)75 415 y Fj(2.3.1)55 +b(Wh)n(y)19 b(Deliv)n(er)e(In)n(to)i(the)f(Home)f(Directory?)175 +490 y Fl(There)g(are)f(sev)o(eral)g(ma)r(jor)e(reasons)j(wh)o(y)f(SAs)g(migh) +o(t)e(w)o(an)o(t)h(to)h(deliv)o(er)g(mail)d(directly)j(in)o(to)f(the)i +(users')75 540 y(home)c(directories:)137 656 y Fi(\017)21 b +Fm(Lo)q(cation)p Fl(:)16 b(man)o(y)c(mail)g(readers)j(need)g(to)f(mo)o(v)o(e) +e(mail)f(from)h(the)j(sp)q(o)q(ol)e(directory)i(to)f(the)g(user's)h(home)179 +706 y(directory)m(.)j(It)13 b(sp)q(eeds)h(up)f(this)g(op)q(eration)g(if)e +(the)j(t)o(w)o(o)e(are)h(on)g(the)g(same)f(\014lesystem.)18 +b(If)12 b(for)g(some)g(reason)179 756 y(the)19 b(user's)g(home)e(directory)i +(is)g(inaccessible,)h(it)e(isn't)g(that)g(useful)g(to)h(b)q(e)g(able)f(to)g +(read)h(mail,)d(since)179 806 y(there)f(is)e(no)g(place)h(to)f(mo)o(v)o(e)f +(it)i(to.)737 791 y Fg(7)773 806 y Fl(In)f(some)g(cases,)i(trying)e(to)g(mo)o +(v)o(e)f(mail)f(to)i(a)h(non-existen)o(t)g(or)f(h)o(ung)179 +856 y(\014lesystem)g(ma)o(y)f(result)j(in)f(mail)d(loss.)137 +939 y Fi(\017)21 b Fm(Distrib)o(uti)o(on)o Fl(:)27 b(ha)o(ving)19 +b(all)f(mail)f(sp)q(o)q(ol)j(directories)h(spread)f(among)e(the)i(man)o(y)e +(more)h(\014lesystems)179 988 y(minim)o(izes)14 b(the)j(c)o(hances)h(that)f +(complete)f(en)o(vironmen)o(ts)g(will)f(grind)h(to)g(a)g(halt)g(when)h(a)f +(single)g(serv)o(er)179 1038 y(is)e(do)o(wn.)19 b(It)c(do)q(es)g(increase)g +(the)g(c)o(hance)h(that)e(there)i(will)d(b)q(e)i(someone)f(who)g(is)g(not)g +(able)g(to)h(read)g(their)179 1088 y(mail)d(when)j(a)g(mac)o(hine)e(is)i(do)o +(wn,)f(but)h(that)g(is)g(usually)f(preferred)j(to)d(ha)o(ving)g(no)h(one)g(b) +q(e)g(able)g(to)f(read)179 1138 y(their)j(mail)e(b)q(ecause)k(a)d(cen)o +(tralized)i(mail)d(serv)o(er)k(is)d(do)o(wn.)28 b(The)17 b(problem)f(of)h +(losing)f(some)g(mail)e(due)179 1188 y(to)i(the)h(\(presumably\))f(higher)g +(c)o(hances)i(that)e(a)g(user's)i(mac)o(hine)d(is)h(do)o(wn)g(is)g(minimi)o +(zed)e(in)i(HLFS)h(as)179 1237 y(describ)q(ed)e(in)f(Sections)h(4.3)d(and)i +(4.4.)137 1320 y Fi(\017)21 b Fm(Securit)o(y)p Fl(:)e(deliv)o(ering)d(mail)d +(to)j(users')g(home)f(directories)i(has)f(another)h(adv)n(an)o(tage)e(|)g +(enhanced)i(se-)179 1370 y(curit)o(y)e(and)g(priv)n(acy)m(.)21 +b(Since)15 b(a)g(shared)h(system)f(mail)d(sp)q(o)q(ol)j(directory)h(has)f(to) +g(b)q(e)h(w)o(orld-readable)e(and)179 1420 y(searc)o(hable,)376 +1405 y Fg(8)407 1420 y Fl(an)o(y)d(user)i(can)f(see)i(whether)f(other)f +(users)h(ha)o(v)o(e)f(mail,)d(when)k(they)f(last)g(receiv)o(ed)h(new)f(mail,) +179 1470 y(or)j(when)h(they)g(last)f(read)h(their)g(mail.)k(Programs)14 +b(suc)o(h)i(as)g Fk(finger)e Fl(displa)o(y)g(this)i(information,)c(whic)o(h) +179 1520 y(some)f(consider)i(an)f(infringemen)o(t)f(of)h(priv)n(acy)m(.)k +(While)c(it)g(is)g(p)q(ossible)g(to)g(disable)g(this)h(feature)g(of)e +Fk(finger)179 1570 y Fl(so)16 b(that)f(remote)g(users)j(cannot)d(see)i(a)f +(mailb)q(o)o(x)c(\014le's)k(status,)g(this)g(do)q(esn't)g(prev)o(en)o(t)h(lo) +q(cal)e(users)i(from)179 1619 y(getting)d(the)g(information.)i(F)m +(urthermore,)e(there)h(are)g(more)e(programs)g(whic)o(h)h(mak)o(e)e(use)j(of) +f(this)g(infor-)179 1669 y(mation.)24 b(In)17 b(shared)h(en)o(vironmen)o(ts,) +e(disabling)f(suc)o(h)j(programs)d(has)i(to)g(b)q(e)g(done)g(on)g(a)f +(system-wide)179 1719 y(basis,)i(but)g(with)g(mail)d(deliv)o(ered)j(to)g +(users')h(home)e(directories,)i(users)h(less)e(concerned)i(with)d(priv)n(acy) +179 1769 y(who)f Fh(do)g Fl(w)o(an)o(t)f(to)h(let)g(others)h(kno)o(w)f(when)g +(they)h(last)f(receiv)o(ed)h(or)f(read)g(mail)e(can)i(easily)f(do)h(so)g +(using)179 1819 y(\014le)e(protection)i(bits.)k(Lastly)m(,)14 +b(on)g(systems)h(that)g(do)f(not)h(exp)q(ort)g(their)g(NFS)g(\014lesystem)f +(with)h Fk(anon=0)p Fl(,)179 1868 y(sup)q(erusers)f(are)e(less)g(lik)o(ely)d +(to)j(sno)q(op)f(around)g(others')h(mail,)d(as)i(they)h(b)q(ecome)f(\\nob)q +(o)q(dies")g(across)h(NFS.)175 1985 y(In)j(summary)m(,)e(deliv)o(ering)i +(mail)d(to)k(home)e(directories)j(pro)o(vides)f(users)h(the)f(functionalit)o +(y)e(sough)o(t,)h(and)75 2034 y(also)e(a)o(v)o(oids)g(most)g(of)g(the)i +(problems)e(discussed)i(in)f(Section)g(2.2.)75 2142 y Fj(3)56 +b(Design)175 2218 y Fl(W)m(e)16 b(named)f(our)h(\014le)h(system)f(the)h +Fh(Home-Link)h(File)e(System)p Fl(,)h(b)q(ecause)h(that's)f(all)e(it)h(do)q +(es)h(|)f(pro)o(vide)75 2267 y(sym)o(b)q(olic)11 b(links)g(to)i(\014les)f +(and)h(directories)g(in)f(a)g(user's)i(home)d(directory)m(.)18 +b(The)13 b(soft)f(link)f(has)i(a)f(\014xed)h(name,)e(but)75 +2317 y(unlik)o(e)16 b(regular)h(soft)g(links,)f(what)h(it)f(p)q(oin)o(ts)h +(to)f(is)h(\\dynamic")e(dep)q(ending)i(on)f(who)h(accesses)i(the)f(sym)o(b)q +(olic)75 2367 y(link.)25 b(The)18 b(ideas)e(that)h(this)g(\014lesystem)f +(represen)o(ts)k(are)d(not)f(limited)f(just)i(to)f(handling)g(electronic)h +(mail)d(|)75 2417 y(that)g(is)g(only)f(one)h(application)e(of)i(this)g +(\014lesystem.)j(See)e(Sections)g(7.1)e(and)g(7.2)g(for)h(other)g(ideas.)175 +2491 y(Our)g(k)o(ey)g(goals)f(in)g(designing)h(HLFS)g(w)o(ere:)p +75 2526 720 2 v 121 2553 a Ff(7)139 2565 y Fe(This)e(assumes)f(that)h(they)g +(can)g(login)f(to)i(a)f(di\013eren)o(t)f(host.)18 b(Some)11 +b(systems,)g(suc)o(h)h(as)h(HP-UX,)h(do)e(not)g(allo)o(w)g(login)g(if)g(they) +75 2604 y(cannot)e Fd(chdir)g Fe(to)h(the)g(user's)f(home)g(directory)m(.)121 +2632 y Ff(8)139 2644 y Fe(System)g(V)i(has)g(the)f(mail)g(sp)q(o)q(ol)f +(directory)g(only)h(group)f(writable)h(but)g(that)g(mak)o(es)f(it)i(more)f +(di\016cult)g(to)g(install)g(other)f(UAs)75 2683 y(or)h(MT)m(As.)965 +2825 y Fl(5)p eop +%%Page: 6 6 +bop 126 42 a Fl(1.)20 b(T)m(o)13 b(pro)o(vide)h(ev)o(ery)g(user)h(with)f(the) +g(abilit)o(y)e(to)i(read)h(mail)c(from)h(an)o(y)h(host.)126 +125 y(2.)20 b(T)m(o)14 b(ensure)j(that)f(all)e(MT)m(As)h(and)g(UAs)h(in)f +(use,)h(as)f(w)o(ell)g(as)g(an)o(y)g(other)h(utilities)f(whic)o(h)g(dep)q +(end)h(on)f(the)179 174 y(standard)f(mail)d(sp)q(o)q(ol)i(directory)m(,)g +(face)h(no)g(problems)e(from)g(the)i(c)o(hange)g(in)f(the)h(underlying)g +(\014lesystem.)126 257 y(3.)20 b(T)m(o)13 b(minim)o(ize)e(the)k(p)q +(ossibilit)o(y)e(of)g(mail)e(b)q(eing)j(lost)g(or)f(b)q(ouncing)h(bac)o(k)g +(to)g(the)g(sender.)126 340 y(4.)20 b(T)m(o)13 b(pro)o(vide)h(more)e(priv)n +(acy)i(for)f(users')i(mail)d(\014les.)175 457 y(Since)g(most)f(sites)i(pro)o +(vide)f(access)i(to)e(users')i(home)c(directories)k(from)c(an)o(y)i(host,)g +(it)g(made)f(sense)j(to)e(store)75 506 y(incoming)f(mail)g(there)k(as)f(w)o +(ell.)j(That)c(w)o(a)o(y)m(,)f(as)i(long)f(as)g(users)i(could)f(log)e(in)o +(to)h(a)h(host)f(and)h(access)h(their)f(home)75 556 y(directories)f(via)e +(NFS,)h(their)g(mail)d(w)o(ould)i(b)q(e)h(accessible)h(as)f(w)o(ell.)17 +b(This)11 b(solv)o(ed)h(the)g(\014rst)h(problem.)j(Also,)11 +b(since)75 606 y(users)16 b(m)o(ust)e(login)f(in)i(order)g(to)g(read)g(their) +g(mail,)d(causing)i(their)i(home)d(directories)j(to)f(b)q(e)g(automoun)o +(ted,)e(no)75 656 y(extra)h(moun)o(ts)f(are)h(required)h(in)f(order)g(to)g(b) +q(egin)g(reading)f(mail.)175 731 y(The)f(second)g(problem)f(w)o(as)g(solv)o +(ed)h(b)o(y)f(making)e(sure)k(that)f(the)g(\014nal)f(access)j(of)d(the)h +(mail)d(sp)q(o)q(ol)i(directory)75 780 y(remains)17 b(a)g(\\real")h +(directory)g(\(not)g(a)g(read-only)f(pseudo-\014lesystem)i(pro)o(vided)f(b)o +(y)f(an)h(automoun)o(ter\).)29 b(All)75 830 y(UAs)20 b(access)h(the)f(sp)q(o) +q(ol)f(directory)h(for)f(reading)g(and)h(writing)e(the)i(user's)h(mail)16 +b(\014le)k(and)f(create)i(lo)q(c)o(k)e(\014les)75 880 y(there.)178 +865 y Fg(9)217 880 y Fl(That)14 b(means)f(that)h Fk(/var/spool/mail)d +Fl(needs)16 b(to)e(b)q(e)g(readable,)g(writable,)g(and)g(searc)o(hable)h(for) +e(UAs)75 930 y(and)i(MT)m(As)g(so)g(that)g(lo)q(c)o(k)f(\014les)h(can)g(b)q +(e)h(written)f(and)g(remo)o(v)o(ed.)20 b(See)c(also)e(Section)i(4.6.)k(F)m +(or)14 b(the)i(purp)q(ose)g(of)75 980 y(writing)g(the)i(mail)c(and)j(lo)q(c)o +(k)g(\014les,)g(a)g(sub)q(directory)h(inside)f(the)h(user's)g(home)e +(directory)i(is)e(su\016cien)o(t,)i(since)75 1029 y(it)d(is)f(already)h(o)o +(wned)g(b)o(y)g(that)g(user.)22 b(Ensuring)15 b(that)g(users)i(cannot)e +(access)i(other)e(users')h(\014les)g(can)f(easily)f(b)q(e)75 +1079 y(ac)o(hiev)o(ed)g(b)o(y)g(protecting)g(this)g(sub)q(directory)m(.)175 +1154 y(In)h(order)i(not)f(to)g(c)o(hange)g(the)g(b)q(eha)o(vior)g(of)f +(programs)g(lik)o(e)g Fk(comsat)p Fl([21)m(,)h(23)o(],)g Fk(from)f +Fl(or)g Fk(finger)p Fl(,)g(whic)o(h)75 1204 y(are)j(designed)g(to)g(read)g +(an)o(y)f(user's)h(mail,)e(w)o(e)i(implem)o(en)o(ted)e(a)h(sp)q(ecial)h(c)o +(hec)o(k)h(for)e(a)g(designated)h(group.)29 b(If)75 1254 y(the)17 +b(e\013ectiv)o(e)g Fh(gid)f Fl(of)g(the)g(pro)q(cess)i(is)e(the)h(designated) +g(group,)f(w)o(e)g(assume)g(that)g(suc)o(h)h(a)e(sp)q(ecial)i(program)d(is)75 +1303 y(executing,)20 b(and)e Fk(hlfsd)f Fl(arranges)i(to)f(do)g(the)h(lo)q +(okup)f(not)g(only)g(of)f(the)i(real)g(sp)q(o)q(ol)f(directory)m(,)h(but)g +(of)e(the)75 1353 y(mailb)q(o)o(x)f(itself.)34 b(See)20 b(T)m(able)e(2.)33 +b(Note)20 b(that)f(this)g(metho)q(d)g(only)f(supp)q(orts)i(read)g(access)h +(without)d(lo)q(c)o(king;)p 75 1415 1800 5 v 607 1469 a(Conditions:)f +Fh(gid)p Fl(=HLFS)p 1027 1469 13 2 v 15 w(GID)d(for)f(an)o(y)h +Fh(uid)p Fl(.)p 206 1487 1538 2 v 205 1537 2 50 v 214 1537 +V 239 1522 a Fm(Resolving)p 502 1537 V 919 1537 V 1735 1537 +V 1744 1537 V 205 1587 V 214 1587 V 239 1572 a(comp)q(onen)o(t)p +502 1587 V 58 w(P)o(athname)g(left)p 919 1587 V 120 w(V)l(alue)g(if)h(sym)o +(b)q(olic)f(link)p 1735 1587 V 1744 1587 V 206 1589 1538 2 +v 206 1599 V 205 1648 2 50 v 214 1648 V 239 1633 a Fk(/)p 502 +1648 V 267 w(var/mail/)p Fh(NAME)p 919 1648 V 1735 1648 V 1744 +1648 V 206 1650 1538 2 v 205 1700 2 50 v 214 1700 V 239 1685 +a Fk(var)p Fl(/)p 502 1700 V 202 w Fk(mail/)p Fh(NAME)p 919 +1700 V 1735 1700 V 1744 1700 V 206 1701 1538 2 v 205 1751 2 +50 v 214 1751 V 239 1736 a Fk(mail)p Fl(@)p 502 1751 V 169 +w Fk(/mail/home/)p Fh(NAME)p 919 1751 V 48 w Fk(mail)p Fl(@)f +Fi(\))g Fk(/mail/home)p 1735 1751 V 1744 1751 V 206 1753 1538 +2 v 205 1803 2 50 v 214 1803 V 239 1788 a(/)p 502 1803 V 267 +w(mail/home/)p Fh(NAME)p 919 1803 V 1735 1803 V 1744 1803 V +206 1804 1538 2 v 205 1854 2 50 v 214 1854 V 239 1839 a Fk(mail)p +Fl(/)p 502 1854 V 180 w Fk(home/)p Fh(NAME)p 919 1854 V 1735 +1854 V 1744 1854 V 206 1856 1538 2 v 205 1906 2 50 v 214 1906 +V 239 1891 a Fk(home)p Fl(@)p 502 1906 V 169 w Fh(NAME)p 919 +1906 V 290 w Fk(home)p Fl(@)g Fi(\))g Fk(.)p 1735 1906 V 1744 +1906 V 206 1907 1538 2 v 205 1957 2 50 v 214 1957 V 239 1942 +a(.)p Fl(/)p 502 1957 V 246 w Fh(NAME)p 919 1957 V 1735 1957 +V 1744 1957 V 206 1959 1538 2 v 206 1969 V 205 2019 2 50 v +214 2019 V 239 2004 a(NAME)p Fl(@)p 502 2019 V 919 2019 V 547 +w Fh(NAME)p Fl(@)h Fi(\))f Fk(~)p Fh(NAME)p Fk(/.mailspool/)p +Fh(NAME)p 1735 2019 V 1744 2019 V 206 2020 1538 2 v 205 2070 +2 50 v 214 2070 V 239 2055 a Fk(~)p Fh(NAME)p Fl(/)p 502 2070 +V 119 w Fk(.mailspool/)p Fh(NAME)p 919 2070 V 1735 2070 V 1744 +2070 V 206 2072 1538 2 v 205 2122 2 50 v 214 2122 V 239 2107 +a Fk(.mailspool)p Fl(/)p 502 2122 V 48 w Fh(NAME)p 919 2122 +V 1735 2122 V 1744 2122 V 206 2123 1538 2 v 205 2173 2 50 v +214 2173 V 239 2158 a(NAME)p 502 2173 V 919 2173 V 1735 2173 +V 1744 2173 V 206 2175 1538 2 v 243 2249 a Fl(T)m(able)g(2:)18 +b(Sp)q(ecially)13 b(resolving)h Fk(/var/mail/)p Fh(NAME)e Fl(to)h +Fm(~)p Fh(NAME)p Fk(/.mailspool/)p Fh(NAME)p 75 2299 1800 5 +v 75 2440 a Fl(ho)o(w)o(ev)o(er,)k(this)g(is)f(su\016cien)o(t)h(for)f(all)g +(programs)f(that)i(need)g(to)g(access)h(other)f(users')h(mailb)q(o)o(xes.)24 +b(All)15 b(that)i(is)75 2490 y(required)e(is)f(to)f(set)i(these)g(programs)e +(to)h(b)q(e)g Fh(setgid)g Fl(to)g(the)g(designated)h(group.)p +75 2525 720 2 v 121 2552 a Ff(9)139 2563 y Fe(Note)e(that,)g(in)g(order)g(to) +g(allo)o(w)g(mail)g(deliv)o(ery)e(to)i(NFS)q(-moun)o(ted)d(mail)j(sp)q(o)q +(ol)g(directories,)e(most)h(v)o(endors)g(ha)o(v)o(e)h(mo)q(di\014ed)75 +2603 y(the)d Fd(/bin/mail)e Fe(program)g(to)j(set)f(its)g Fc(uid)h +Fe(to)g(that)f(of)g(the)g(recipien)o(t)e(when)j(deliv)o(ering)d(mail.)13 +b(If)e(a)g(lo)q(cal)e(deliv)o(ery)g(agen)o(t)g(\(LD)o(A\))i(on)75 +2642 y(a)g(system)f(do)q(es)g(not)g(pro)o(vide)f(this)i(b)q(eha)o(vior,)d +(the)j(MT)m(A)i(m)o(ust)d(arrange)f(to)i(in)o(v)o(ok)o(e)e(it)i(with)g(the)f +Fc(uid)i Fe(of)f(the)f(recipien)o(t)f(|)j(this)e(can)75 2682 +y(b)q(e)h(done)f(b)o(y)h(a)h(wrapp)q(er)e(C)i(program.)965 +2825 y Fl(6)p eop +%%Page: 7 7 +bop 175 42 a Fl(The)14 b(third)h(problem)d(is)j(solv)o(ed)f(b)o(y)g(ensuring) +g(that)h(all)e(op)q(erations)h(whic)o(h)g(migh)o(t)f(hang)g +Fk(hlfsd)h Fl(are)g(p)q(er-)75 91 y(formed)e(in)h(the)h(bac)o(kground,)f +(while)g(still)g(pro)o(viding)f(service)j(in)e(the)h(paren)o(t)g(or)g(c)o +(hild)f(pro)q(cess.)20 b(F)m(urthermore,)75 141 y(if)12 b Fk(hlfsd)f +Fl(is)i(not)g(running)f(an)o(ymore,)f(or)i(if)f(the)h(user's)h(home)d +(\014lesystem)i(is)f(full,)f(mail)f(gets)k(deliv)o(ered)f(to)f(an)h(al-)75 +191 y(ternate)f(directory)g(\(See)g(also)f(Section)g(4.3\).)16 +b(A)11 b Fk(cron)f Fl(job)h(\(running)g(sev)o(eral)g(times)g(a)f(da)o(y)h(in) +f(our)i(departmen)o(t\),)75 241 y(lo)q(oks)h(at)h(the)h(alternate)g +(directory)m(,)f(and)g(attempts)f(to)h(resend)i(messages)e(in)g(it)f(to)h +(their)h(righ)o(tful)e(o)o(wners.)19 b(All)75 291 y(that)12 +b(is)h(incurred)g(is)g(a)f(dela)o(y)g(in)g(mail)d(deliv)o(ery)m(,)j(whic)o +(h,)g(in)g(most)f(cases,)j(is)e(no)g(longer)h(than)f(the)h(length)f(of)g +(time)75 340 y(b)q(et)o(w)o(een)j(consecutiv)o(e)h(in)o(v)o(o)q(cations)d(of) +g(the)h(lost-mail)d(remailing)h(script.)175 415 y(Ha)o(ving)h(a)h(sp)q(ecial) +g(mail-sp)q(o)q(ol)e(sub)q(directory)j(o)o(wned)g(and)f(con)o(trolled)g(b)o +(y)g(the)h(user)g(also)f(addresses)i(the)75 465 y(last)c(problem,)f(that)i +(of)f(priv)n(acy)m(.)k(Users)e(can)f(c)o(hange)g(the)g(protection)g(bits)g +(on)f(their)h(mailb)q(o)o(x)d(directory)j(inside)75 515 y(their)g(home)f +(directory)i(so)f(that)g(it)f(is)h(readable)g(and)g(searc)o(hable)h(only)e(b) +o(y)h(the)g(o)o(wner.)18 b(An)o(y)13 b(other)h(program)d(or)75 +565 y(user,)16 b(unless)f(running)g(as)g(the)g(sup)q(eruser)j(on)c(the)i +(same)e(host,)1091 549 y Fg(10)1141 565 y Fl(w)o(ould)g(not)h(b)q(e)g(able)g +(to)f(\014nd)h(out)g(whether)h(a)75 614 y(user)f(has)f(new)g(mail,)d(ho)o(w)j +(m)o(uc)o(h)e(of)i(it)f(there)i(is,)f(or)f(when)i(it)e(w)o(as)h(last)g(read.) +75 722 y Fj(4)56 b(Impleme)o(n)n(tation)16 b(of)j Fb(hlfsd)175 +797 y Fl(W)m(e)f(used)i(a)f(protot)o(yp)q(e)h(NFS)f(serv)o(er,)j(and)d +(implem)o(en)o(ted)e(only)i(the)g(op)q(erations)h(that)f(w)o(ere)h(needed.)75 +847 y(W)m(e)14 b(generated)i(NFS)e(stubs)i(using)e Fk(rpcgen)p +Fl(.)k(The)d(serv)o(er)h(w)o(as)e(dev)o(elop)q(ed)h(\014rst)g(under)h(SunOS)f +(v)o(ersion)f(4.1.2.)75 897 y(This)g(serv)o(er)i(w)o(as)e(incorp)q(orated)h +(in)o(to)e(the)i Fk(amd)e Fl(source)j(tree,)f(and)f(w)o(e)g(used)h(some)e(of) +h Fk(amd)p Fl('s)f(sources)j(as)e(utilit)o(y)75 947 y(functions,)k(since)g +(they)g(are)g(w)o(ell-written)f(to)h(handle)f(a)g(v)n(ariet)o(y)g(of)g(arc)o +(hitectures)j(and)d(op)q(erating)g(systems.)75 997 y(\(See)e(Section)f(4.7)f +(for)h(source)h(co)q(de)g(a)o(v)n(ailabil)o(it)o(y)l(.\))75 +1105 y Fj(4.1)56 b(The)18 b(\\Home-Link")d(File)j(Service)175 +1180 y Fl(This)10 b(subsection)i(includes)g(tec)o(hnical)f(details)f(of)h +(the)g(NFS)g(op)q(erations)g(and)g(ma)o(y)e(b)q(e)i(skipp)q(ed.)18 +b(Ho)o(w)o(ev)o(er,)75 1230 y(it)13 b(pro)o(vides)g(an)g(example)e(of)i(the)g +(design)h(and)f(implem)o(en)o(tation)d(of)i(a)h(small)e(sp)q(ecial-purp)q +(ose)j(NFS)g(serv)o(er)g(and)75 1279 y(ma)o(y)e(b)q(e)i(of)g(use)g(to)g +(others.)175 1354 y(HLFS)j(is)g(a)g(read-only)g(\014lesystem,)g(and)g(as)h +(suc)o(h,)g(all)e(op)q(erations)i(that)f(require)h(write)g(access)h(return)75 +1404 y(the)d(error)h(co)q(de)f(NFSERR)p 522 1404 13 2 v 14 +w(R)o(OFS)g(\(\\Read-Only)f(Filesystem"\):)20 b Fh(setattr,)c(write,)f(cr)n +(e)n(ate,)h(r)n(emove,)g(r)n(ename,)75 1454 y(link,)g(unlink,)g(symlink,)g +(mkdir,)f Fl(and)g Fh(rmdir)p Fl(.)21 b(T)m(rivially)13 b(implemen)o(ted)g(w) +o(ere)j(the)g Fh(nul)r(l)p Fl(,)f Fh(r)n(o)n(ot)p Fl(,)g(and)g +Fh(write)n(c)n(ache)75 1504 y Fl(op)q(erations.)i(W)m(e)11 +b(decided)h(to)e(ha)o(v)o(e)h Fh(statfs)f Fl(return)i(some)e(v)n(alue)h +(\(all)e(zeros)k(in)d(most)g(cases\).)18 b(The)11 b Fh(r)n(e)n(ad)g +Fl(op)q(eration)75 1553 y(simply)h(returns)j(NFSERR)p 524 1553 +V 15 w(A)o(CCES)f(\(\\P)o(ermission)f(Denied"\).)175 1628 y(The)e(remaining)e +(op)q(erations)i(are)h(the)f(heart)h(of)e(this)h(\014lesystem:)17 +b Fh(r)n(e)n(addir)p Fl(,)10 b Fh(getattr)p Fl(,)g Fh(lo)n(okup)p +Fl(,)i(and)f Fh(r)n(e)n(ad)r(link)p Fl(.)175 1703 y(Our)j(serv)o(er)h(m)o +(ust)d(distinguish)h(b)q(et)o(w)o(een)i(the)f(directory)g(and)g(the)g(link,)e +(so)i(w)o(e)f(assigned)h(them)f(di\013eren)o(t)75 1753 y(in)o(tegers)f(to)f +(serv)o(e)i(as)f(\014lehandles.)17 b(Note)12 b(that)f(these)i(need)g(not)e(b) +q(e)h(as)f(complicated)g(as)g(the)h(\014lehandles)g(usually)75 +1802 y(generated)j(b)o(y)f(NFS.)k(They)c(need)h(only)e(to)h(b)q(e)h(unique,)e +(and)h(their)g(v)n(alue)f(is)h(meaningful)d(only)i(to)h(the)h(serv)o(er.)75 +1910 y Fj(4.1.1)55 b(The)19 b(readdir)f(Op)r(eration)175 1985 +y Fl(Op)q(ening)h(this)g(directory)h(returns)h(the)f(\\.")33 +b(and)19 b(\\..")33 b(directories,)21 b(and)e(one)g(sym)o(b)q(olic)e(link,)i +Fk(home)p Fl(.)75 2035 y(A)o(ttempting)e(to)g(readdir)h(on)g(the)g(sym)o(b)q +(olic)e(link)h(results)i(in)f(an)f(NFSERR)p 1326 2035 V 15 +w(NOTDIR.)g(An)o(ything)g(else)i(is)e(a)75 2085 y(stale)d(\014lehandle.)75 +2193 y Fj(4.1.2)55 b(The)19 b(getattr)e(Op)r(eration)175 2268 +y Fh(Getattr)h Fl(returns)i(r-xr-xr-x)e(for)h(the)g(\\.")32 +b(and)18 b(\\..")32 b(directories.)h(The)19 b(link)f(itself,)h(named)e +Fk(home)h Fl(b)o(y)75 2318 y(default,)d(is)h(protected)h(as)f(rwxrwxrwx.)23 +b(It)16 b(do)q(es)g(not)g(matter)f(for)g(the)h(link)f(that)h(it)f(is)g(w)o +(orld-writable.)23 b(The)75 2368 y(mo)q(di\014cation)10 b(and)j(creation)f +(times)g(for)g(the)h(link)e(and)i(directories)g(are)g(the)g(startup)g(time)e +(of)h(the)h(serv)o(er.)19 b(If)12 b(the)75 2418 y(e\013ectiv)o(e)k +Fh(gid)f Fl(of)f(the)h(pro)q(cess)h(is)f(HLFS)p 721 2418 V +15 w(GID,)e(then)j(some)d(\014xed)i(v)n(alid)e(attributes)j(are)f(returned.) +22 b(An)o(y)14 b(other)75 2467 y(\014lehandle)i(giv)o(en)f(to)g +Fk(hlfsd)g Fl(is)g(considered)i(stale)f(and)f(the)i(NFSERR)p +1227 2467 V 14 w(ST)m(ALE)f(\(\\Stale)f(Filehandle"\))g(result)75 +2517 y(co)q(de)g(is)e(returned.)p 75 2544 720 2 v 106 2571 +a Ff(10)139 2582 y Fe(Or)e(as)h(the)f(sup)q(eruser)e(elsewhere,)h(if)h(the)g +(\014lesystem)e(is)i(NFS-exp)q(orted)e(with)j Fd(anon=0)p Fe(.)965 +2825 y Fl(7)p eop +%%Page: 8 8 +bop 75 42 a Fj(4.1.3)55 b(The)19 b(lo)r(okup)e(Op)r(eration)175 +117 y Fl(Ob)o(viously)m(,)c(w)o(e)i(only)f(allo)o(w)f(lo)q(oking)g(up)h(in)h +(the)g(\\.")20 b(and)14 b(\\..")20 b(directories,)15 b(b)q(oth)g(of)f(whic)o +(h)g(return)i(the)75 166 y(same)e(v)n(alues.)22 b(T)m(rying)15 +b(to)g(lo)q(okup)f(\\in")h(the)g(link)g(results)h(in)f(an)g(NFSERR)p +1312 166 13 2 v 15 w(NOTDIR)f(\(\\Not)i(a)f(Directory"\))75 +216 y(error)k(co)q(de.)32 b(An)o(y)18 b(link)g(not)g(kno)o(wn)g(to)g(the)h +(serv)o(er)g(returns)h(an)e(NFSERR)p 1338 216 V 15 w(NOENT)h(\(\\No)f(Suc)o +(h)h(En)o(try"\))75 266 y(error,)f(unless)f(the)g Fh(gid)g +Fl(of)e(the)j(requesting)f(pro)q(cess)h(is)f(HLFS)p 1088 266 +V 15 w(GID)f(and)g(the)h(name)e(corresp)q(onds)k(to)d(a)h(v)n(alid)75 +316 y(user.)i(In)12 b(this)g(case)h(the)g Fh(username)f Fl(for)g(that)g(user) +h(is)f(used)h(in)f(the)g(returned)i(\014lehandle,)e(allo)o(wing)e(the)i +(readlink)75 366 y(op)q(eration)i(to)f(return)j(the)e(correct)i(link.)h(An)o +(ything)c(else)i(is)e(a)h(stale)g(\014lehandle.)75 474 y Fj(4.1.4)55 +b(The)19 b(readlink)e(Op)r(eration)175 549 y Fl(This)d(is)h(the)g(most)f(imp) +q(ortan)o(t)e(op)q(eration,)j(the)g(cen)o(tral)g(p)q(oin)o(t)f(of)g(this)h(w) +o(ork.)20 b(W)m(e)15 b(get)g(the)g Fh(uid)g Fl(n)o(um)o(b)q(er)75 +599 y(from)c(the)j(creden)o(tials)g(sen)o(t)g(with)e(the)i(RPC)f(op)q +(eration.)k(W)m(e)c(mak)o(e)e(sure)j(that)f(Unix)g(Authen)o(tication)g(or)g +(DES)75 648 y(is)h(used)h(or)e(else)i(w)o(e)f(return)h(the)g(NFSERR)p +774 648 V 14 w(PERM)f(\(\\Not)g(Owner"\))h(co)q(de.)175 723 +y(If)j(the)h Fh(gid)g Fl(of)f(the)h(accessing)h(pro)q(cess)g(is)f(not)g(HLFS) +p 1064 723 V 15 w(GID,)e(the)i(v)n(alue)f(w)o(e)h(return)h(for)f(the)g(sym)o +(b)q(olic)75 773 y(link)13 b(named)g Fk(home)379 758 y Fg(11)427 +773 y Fl(is)h(a)g(string)g(represen)o(ting)i(the)f(home)e(directory)i(of)e +(the)i(user)g(whose)g Fh(uid)f Fl(w)o(e)h(just)f(found,)75 +823 y(concatenated)g(with)e(a)h(\014xed)g(comp)q(onen)o(t)e(name)h(represen)o +(ting)i(a)e(sub)q(directory)i(within)e(it.)17 b(W)m(e)c(used)g(a)f(binary)75 +873 y(searc)o(h)h(on)e(the)h(lo)q(okup)e(table)h(to)h(quic)o(kly)e(get)i(the) +g(righ)o(t)f(pathname.)16 b(Di\013eren)o(t)c(home)e(directories)i(for)f(m)o +(ultiple)75 922 y(passw)o(ord)i(database)f(en)o(tries)h(with)f(the)h(same)e +Fh(uid)i Fl(n)o(um)o(b)q(ers)f(ma)o(y)e(return)j(an)o(y)f(of)g(the)h(home)e +(directories.)18 b(Only)75 972 y Fh(uid)c Fl(0)g(is)f(guaran)o(teed)i(to)f +(return)h(\\)p Fk(/)p Fl(".)i(See)e(also)e(Section)h(5.3.)175 +1047 y(If)h(the)h(sym)o(b)q(olic)e(link)g(is)i(named)e Fk(home)h +Fl(and)g(the)h Fh(gid)g Fl(is)f(HLFS)p 1206 1047 V 15 w(GID,)g(w)o(e)h +(return)g(a)g(link)e(to)i(\\.",)e(whic)o(h)75 1097 y(causes)19 +b Fk(hlfsd)d Fl(to)h(b)q(e)h(used)g(to)f(resolv)o(e)h(the)g(next)g(pathname)e +(comp)q(onen)o(t.)27 b(This)17 b(is)h(designed)g(to)f(main)o(tain)75 +1147 y(functionalit)o(y)c(of)i(programs)f(suc)o(h)i(as)f Fk(from)p +Fl(.)20 b(If)15 b(the)h(sym)o(b)q(olic)d(link)h(is)h(not)g(named)f +Fk(home)g Fl(and)h(the)h Fh(gid)f Fl(of)f(the)75 1196 y(accessing)j(pro)q +(cess)g(is)e(HLFS)p 553 1196 V 16 w(GID,)f(w)o(e)i(return)g(a)f(v)n(alue)g(p) +q(oin)o(ting)g(to)g(the)h(user's)h(mailb)q(o)o(x)12 b(\014le)k(in)f(their)h +(mail)75 1246 y(sp)q(o)q(ol)c(directory)m(.)18 b(T)m(o)12 b(do)g(this,)g(w)o +(e)h(extract)g(the)h Fh(username)e Fl(from)f(the)i(\014lehandle,)f(whic)o(h)h +(w)o(as)f(returned)i(b)o(y)e(the)75 1296 y(lo)q(okup)h(op)q(eration.)18 +b(See)d(T)m(able)e(2.)175 1371 y(T)m(rying)c(to)i(readlink)f(on)h(one)g(of)f +(the)i(t)o(w)o(o)e(directories)i(results)g(in)e(an)h(NFSERR)p +1426 1371 V 15 w(ISDIR)f(\(\\Is)h(a)f(directory"\))75 1421 +y(error.)19 b(An)o(ything)13 b(else)i(is)f(a)f(stale)h(\014lehandle.)75 +1528 y Fj(4.2)56 b(Execution)17 b(Flo)n(w)175 1604 y Fl(A)o(t)12 +b(initialization)d(time,)i Fk(hlfsd)g Fl(creates)j(a)e(UDP)g(service,)i(and)e +(forks)g(a)g(c)o(hild.)17 b(The)c(c)o(hild)e(builds)h(the)h +Fh(uid)75 1653 y Fl(lo)q(okup)h(table,)g(sets)i(up)e(signal)g(handlers,)h +(and)f(in)o(terv)n(al)g(timers.)19 b(The)c(signal)e(handlers)i(are)g(mean)o +(t)f(to)g(reload)75 1703 y(the)i(lo)q(okup)f(table)g(at)g(expiration)g(time)f +(of)h(the)h(in)o(terv)n(al)f(timer,)f(or)i(when)g(a)f(SIGHUP)g(is)h(sen)o(t)g +(to)f(the)h(serv)o(er)75 1753 y(\(presumably)11 b(b)o(y)h(a)f(sup)q +(eruser\).)20 b(A)12 b(sp)q(ecial)g(clean)o(up)h(handler)f(is)f(setup)i(for)f +(SIGTERM,)f(to)g(ensure)j(the)e(serv)o(er)75 1803 y(terminates)i(cleanly)m(.) +j(Then)d(the)h Fk(svc)p 682 1803 14 2 v 15 w(run\(\))e Fl(routine)h(is)f(in)o +(v)o(ok)o(ed.)175 1878 y(Mean)o(while)i(the)i(paren)o(t)g(w)o(aits)f(for)f +(the)i(c)o(hild)f(to)g(initialize.)23 b(When)16 b(it)g(do)q(es,)h(the)g +(paren)o(t)f(moun)o(ts)f(the)75 1927 y(serv)o(er)g(on)f(the)g(moun)o(t)e(p)q +(oin)o(t.)18 b(Of)c(utmost)e(imp)q(ortance)h(is)h(to)g(mak)o(e)e(sure)j(the)f +(attribute)g(cac)o(he)h(is)f(turned)g(o\013.)75 1977 y(If)h(the)g(attribute)h +(cac)o(he)f(is)g(not)g(turned)h(o\013,)f(successiv)o(e)i(accesses)g(to)e +Fk(/mail/home)e Fl(w)o(ould)h(return)i(previously)75 2027 y(computed)f +(pathnames)g(p)q(oin)o(ting)f(to)i(another)g(user's)g(mail,)d(resulting)j(in) +f(mail)e(loss)i(or)h(misdeliv)o(ery)m(.)21 b(If)15 b(it)g(is)75 +2077 y(not)d(p)q(ossible)g(to)g(turn)h(o\013)e(the)i(attribute)g(cac)o(he,)f +Fk(hlfsd)f Fl(will)g(exit.)17 b(Ho)o(w)o(ev)o(er,)c(the)f(SA)g(has)h(the)f +(option)g(to)f(force)75 2127 y Fk(hlfsd)j Fl(to)h(con)o(tin)o(ue)g(running)g +(and)g(set)h(the)f(attribute)h(cac)o(he)g(to)f(as)g(short)g(an)g(in)o(terv)n +(al)f(as)h(p)q(ossible)h(\(See)g(also)75 2176 y(Section)e(5.3\).)j(A)o(t)d +(this)g(p)q(oin)o(t)g(the)g(paren)o(t)h(terminates,)e(lea)o(ving)f(the)j(c)o +(hild)e(to)h(run.)175 2251 y(When)j(an)f(in)o(terv)n(al)g(timer)g(go)q(es)h +(o\013)g(\(SIGALRM\))f(or)h(a)f(SIGHUP)h(is)g(sen)o(t)g(to)g(the)h(serv)o +(er,)g(the)f(serv)o(er)75 2301 y(forks)d(a)g(c)o(hild)g(that)g(con)o(tin)o +(ues)h(serving,)f(while)g(the)h(paren)o(t)g(reloads)f(the)h(lo)q(okup)f +(table.)19 b(When)14 b(the)h(paren)o(t)g(is)75 2351 y(\014nished)f(loading,)d +(it)i(sends)i(a)e(SIGKILL)g(to)g(the)h(c)o(hild)e(pro)q(cess,)j(and)e +(resumes)h(serving.)k(When)c(a)f(SIGTERM)75 2401 y(is)h(receiv)o(ed,)h(the)g +(serv)o(er)g(forks)f(a)g(c)o(hild)g(that)g(con)o(tin)o(ues)g(serving,)g +(while)g(it)g(tries)g(to)g(unmoun)o(t)f(the)i(\014lesystem.)75 +2450 y(If)f(and)f(when)i(that)f(succeeds,)i(b)q(oth)e(paren)o(t)g(and)g(c)o +(hild)f(exit.)175 2525 y(As)i(mail)d(service)k(is)e(v)o(ery)h(imp)q(ortan)o +(t,)d(w)o(e)j(w)o(an)o(ted)g(to)f(mak)o(e)g Fk(hlfsd)f Fl(as)i(robust)g(as)g +(p)q(ossible.)20 b(W)m(e)14 b(could)75 2575 y(ha)o(v)o(e)k(designed)g(it)f +(as)h(another)g Fk(amd)g Fl(\\\014lesystem)f(t)o(yp)q(e",)h(but)g(decided)h +(that)f(a)f(separate)i(daemon)e(pro)o(vides)75 2625 y(b)q(etter)i(reliabilit) +o(y)c(and)j(faster)g(service.)29 b(In)18 b(general,)g(w)o(e)f(try)h(to)f(do)g +(as)h(m)o(uc)o(h)e(as)h(p)q(ossible:)25 b(w)o(e)18 b(mak)o(e)e(sure)p +75 2659 720 2 v 106 2686 a Ff(11)139 2698 y Fe(The)11 b(name)f(of)h(the)g +(sym)o(b)q(olic)e(link)i(is)g(con\014gurable.)965 2825 y Fl(8)p +eop +%%Page: 9 9 +bop 75 42 a Fl(\014lesystems)10 b(are)h(accessible)h(and)e(con)o(tain)f(some) +h(disk)g(space)h(to)f(ha)o(v)o(e)g(mail)e(deliv)o(ered)j(there.)18 +b(Where)11 b(directories)75 91 y(are)j(exp)q(ected)h(w)o(e)f(mak)o(e)d(sure)k +(there)f(are)g(no)f(\014les)h(b)o(y)f(these)h(names;)f(where)h(sym)o(b)q +(olic)d(links)i(are)h(exp)q(ected,)h(w)o(e)75 141 y(mak)o(e)f(sure)i(there)h +(are)e(no)g(real)h(\014les)f(or)h(directories)g(with)f(the)h(same)e(name.)21 +b(Whenev)o(er)c(p)q(ossible,)e(w)o(e)g(create)75 191 y(directories,)f(with)f +(prop)q(er)i(o)o(wnership)f(and)f(p)q(ermissions.)k(W)m(e)c(ev)o(en)h(c)o +(hec)o(k)h(that)e(the)h(moun)o(t)e(p)q(oin)o(t)h(for)g Fk(hlfsd)75 +241 y Fl(is)h(w)o(orld)f(readable)h(and)g(executable,)h(since)f(if)f(it)h +(isn't,)f Fk(getwd\(".."\))e Fl(migh)o(t)h(fail.)75 349 y Fj(4.3)56 +b(Alternate)17 b(Mail)h(Sp)r(o)r(ol)g(Directories)175 424 y +Fk(Hlfsd)e Fl(tries)i(to)g(ensure)h(that)f(the)g(user's)g(home)f(directory)h +(is)f(accessible.)31 b(P)o(erio)q(dically)16 b(it)i(also)f(tests)75 +474 y(that)i(it)f(can)h(b)q(e)g(written)g(in)o(to)f(\(Section)h(4.5\).)31 +b(If)18 b(for)h(an)o(y)f(reason)h(a)f(failure)g(o)q(ccurs,)j +Fk(hlfsd)c Fl(rep)q(oin)o(ts)i(the)75 523 y(sym)o(b)q(olic)11 +b(link)h(for)g(that)h(user)h(to)f(an)f(alternate)h(lo)q(cal)f(directory)m(,)h +(whic)o(h)g(is)g(presumably)e(highly)h(a)o(v)n(ailable.)j(W)m(e)75 +573 y(use)g Fk(/var/spool/alt)p 457 573 14 2 v 13 w(mail)e +Fl(in)g(our)h(en)o(vironmen)o(t.)j(See)e(T)m(able)e(3.)1167 +558 y Fg(12)p 75 636 1800 5 v 238 690 a Fl(Conditions:)k(An)o(y)d +Fh(uid)p Fl(,)g Fh(gid)p Fi(6)p Fl(=HLFS)p 829 690 13 2 v 15 +w(GID,)f(and)g Fk(~)p Fh(USER)p Fk(/.mailspool/)f Fl(is)i(not)p +1479 697 60 2 v 14 w(writable.)p 343 710 1265 2 v 342 759 2 +50 v 351 759 V 376 744 a Fm(Resolving)p 629 759 V 1083 759 +V 1598 759 V 1607 759 V 342 809 V 351 809 V 376 794 a(comp)q(onen)o(t)p +629 809 V 47 w(P)o(athname)g(left)p 1083 809 V 157 w(V)l(alue)h(if)g(sym)o(b) +q(olic)f(link)p 1598 809 V 1607 809 V 343 811 1265 2 v 343 +821 V 342 871 2 50 v 351 871 V 376 856 a Fk(/)p 629 871 V 256 +w(var/mail/)p Fh(NAME)p 1083 871 V 1598 871 V 1607 871 V 343 +872 1265 2 v 342 922 2 50 v 351 922 V 376 907 a Fk(var)p Fl(/)p +629 922 V 191 w Fk(mail/)p Fh(NAME)p 1083 922 V 1598 922 V +1607 922 V 343 924 1265 2 v 342 974 2 50 v 351 974 V 376 959 +a Fk(mail)p Fl(@)p 629 974 V 158 w Fk(/mail/home/)p Fh(NAME)p +1083 974 V 85 w Fk(mail)p Fl(@)g Fi(\))f Fk(/mail/home)p 1598 +974 V 1607 974 V 343 975 1265 2 v 342 1025 2 50 v 351 1025 +V 376 1010 a(/)p 629 1025 V 256 w(mail/home/)p Fh(NAME)p 1083 +1025 V 1598 1025 V 1607 1025 V 343 1027 1265 2 v 342 1077 2 +50 v 351 1077 V 376 1062 a Fk(mail)p Fl(/)p 629 1077 V 169 +w Fk(home/)p Fh(NAME)p 1083 1077 V 1598 1077 V 1607 1077 V +343 1078 1265 2 v 342 1128 2 50 v 351 1128 V 376 1113 a Fk(home)p +Fl(@)p 629 1128 V 158 w Fh(NAME)p 1083 1128 V 327 w Fk(home)p +Fl(@)h Fi(\))f Fk(/var/alt)p 1476 1113 14 2 v 14 w(mail)p 1598 +1128 2 50 v 1607 1128 V 343 1130 1265 2 v 342 1180 2 50 v 351 +1180 V 376 1165 a(/)p 629 1180 V 256 w(var/alt)p 811 1165 14 +2 v 15 w(mail/)p Fh(NAME)p 1083 1180 2 50 v 1598 1180 V 1607 +1180 V 343 1181 1265 2 v 342 1231 2 50 v 351 1231 V 376 1216 +a Fk(var)p Fl(/)p 629 1231 V 191 w Fk(alt)p 723 1216 14 2 v +15 w(mail/)p Fh(NAME)p 1083 1231 2 50 v 1598 1231 V 1607 1231 +V 343 1233 1265 2 v 342 1282 2 50 v 351 1282 V 376 1268 a Fk(alt)p +445 1268 14 2 v 15 w(mail)p Fl(/)p 629 1282 2 50 v 88 w Fh(NAME)p +1083 1282 V 1598 1282 V 1607 1282 V 343 1284 1265 2 v 342 1334 +2 50 v 351 1334 V 376 1319 a(NAME)p 629 1334 V 1083 1334 V +1598 1334 V 1607 1334 V 343 1336 1265 2 v 380 1410 a Fl(T)m(able)g(3:)18 +b(Resolving)13 b Fk(/var/mail/)p Fh(NAME)f Fl(to)i Fk(/var/alt)p +1323 1410 14 2 v 14 w(mail/)p Fh(NAME)p 75 1460 1800 5 v 175 +1600 a Fl(When)f Fk(hlfsd)f Fl(starts)i(up,)f(and)g(b)q(efore)h(it)f(moun)o +(ts)f(itself)h(on)f(top)i(of)e(the)i(moun)o(t)d(p)q(oin)o(t,)i(hiding)f(an)o +(ything)75 1650 y(that)k(is)f(underneath,)i Fk(hlfsd)e Fl(creates)i(a)f +(\014xed)g(sym)o(b)q(olic)e(link)g(to)i(the)g(alternate)g(sp)q(o)q(ol)g +(directory)g(\(if)f(it)g(do)q(es)75 1700 y(not)e(exist)g(already\).)k(This)c +(is)g(done)g(so)g(that)f Fk(/var/spool/mail)e Fl(w)o(ould)i(not)h(b)q(e)g(a)g +(\\dangling")d(sym)o(b)q(olic)h(link,)75 1750 y(and)j(p)q(oin)o(ts)g(to)f(a)h +(real)g(directory)h(at)f(all)e(times,)h(ev)o(en)i(after)f Fk(hlfsd)f +Fl(terminates.)18 b(When)c Fk(hlfsd)f Fl(runs,)h(it)g(hides)75 +1799 y(this)h(sym)o(b)q(olic)e(link,)h(and)h(pro)o(vides)g(our)g(\\dynamic")e +(sym)o(b)q(olic)g(link.)20 b(This)15 b(tric)o(k)g(at)g(least)g(pro)o(vides)g +(us)g(with)75 1849 y(an)f(alternate)g(place)g(to)g(deliv)o(er)g(mail)d(when)j +(things)g(go)f(wrong,)h(rather)g(than)g(b)q(ounce)h(or)f(drop)g(the)g(mail.) +175 1924 y(A)g(cron)h(job)e(on)h(our)h(systems)f(c)o(hec)o(ks)i(the)f +(alternate)f(mail)e(sp)q(o)q(ol)i(directory)h(sev)o(eral)g(times)e(a)h(da)o +(y)m(.)k(An)o(y)75 1974 y(messages)12 b(found)g(there)i(are)f(resen)o(t)g(to) +g(their)f(righ)o(tful)f(o)o(wners.)19 b(The)12 b(remailing)e(script)j(can)g +(b)q(e)g(run)f(as)h(often)f(as)75 2024 y(needed.)19 b(Eac)o(h)14 +b(in)o(v)o(o)q(cation)e(of)h(the)g(script)h(deals)g(only)e(with)h(newly)g +(lost)g(mail)e(since)j(the)g(previous)g(in)o(v)o(o)q(cation;)75 +2073 y(the)f(script)g(lo)q(c)o(ks)g(and)f(renames)h(the)g(lost)f(mailb)q(o)o +(x)e(\014le)i(to)h(a)f(unique)h(name,)e(b)q(efore)i(parsing)f(and)h +(remailing)d(it.)175 2148 y(Similar)j(to)k Fk(amd)p Fl(,)f +Fk(hlfsd)f Fl(can)i(log)e(debugging)h(and)h(v)n(arious)e(status)j +(information)13 b(to)k(a)f(designated)h(log)75 2198 y(\014le)e(or)h(using)f +(the)h Fk(syslog)p Fl([22)n(])f(facilit)o(y)m(.)21 b(The)16 +b(SA)f(ma)o(y)f(c)o(ho)q(ose)i(to)g(w)o(atc)o(h)f(these)i(log)e(\014les)g +(and)h(facilities)e(and)75 2248 y(b)q(e)h(noti\014ed)e(when)i(serious)f +(problems)f(o)q(ccur)i(suc)o(h)g(as)f(a)g(full)e(\014lesystem.)75 +2356 y Fj(4.4)56 b(Av)n(oiding)18 b(Hangs)175 2431 y Fl(As)10 +b(describ)q(ed)i(in)e(Section)h(4.2,)e Fk(hlfsd)g Fl(forks)i(a)e(c)o(hild)h +(at)g(an)o(y)g(p)q(oin)o(t)g(where)h(w)o(e)g(susp)q(ect)h(that)e(an)g(op)q +(eration)75 2481 y(migh)o(t)h(hang.)17 b(If,)12 b(for)h(example,)e(the)j +(home)e(mac)o(hine)f(of)i(the)g(user)h(is)f(do)o(wn,)g(and)f(the)i +(\014lesystem)f(on)f(a)h(clien)o(t)g(is)75 2530 y(hard-moun)o(ted,)h +Fk(hlfsd)f Fl(will)h(hang)g(un)o(til)g(the)i(remote)e(serv)o(er)i(is)f(bac)o +(k)g(up.)21 b(P)o(erforming)13 b(these)j(op)q(erations)f(in)75 +2580 y(the)f(bac)o(kground)g(pro)o(vides)g(added)h(reliabilit)o(y)m(,)c(an)i +(idea)h(tak)o(en)g(from)e Fk(amd)p Fl(.)p 75 2615 720 2 v 106 +2642 a Ff(12)139 2653 y Fe(In)f(the)f(conditions)f(for)i(T)m(able)g(3,)g +Fd(~)p Fc(USER)h Fe(is)g(the)f(home)f(directory)f(of)i(the)g(user)f(with)i +(user-id)e Fc(uid)p Fe(.)965 2825 y Fl(9)p eop +%%Page: 10 10 +bop 75 42 a Fj(4.5)56 b(Disk)18 b(Space)g(Problems)175 117 +y Fk(Hlfsd)13 b Fl(c)o(hec)o(ks)j(if)e(the)h(user's)h(home)e(directory)h(is)g +(full)e(or)i(they)g(exceeded)i(their)e(quota.)20 b(It)15 b(attempts)f(to)75 +166 y(create)i(and)e(then)h(remo)o(v)o(e)e(a)h(simple)f(nonzero-length)i +(\014le)f(in)g(the)h(user's)g(sp)q(o)q(ol)f(directory)m(,)h(with)f(the)h +(e\013ectiv)o(e)75 216 y Fh(uid)j Fl(set)g(to)f(that)h(of)f(the)h(user.)30 +b(If)17 b(that)g(fails,)g(it)g(instead)h(returns)h(bac)o(k)e(the)h(name)e(of) +h(the)h(alternate)g(sp)q(o)q(ol)75 266 y(directory)d(as)f(the)g(v)n(alue)f +(of)h(the)g Fk(home)f Fl(sym)o(b)q(olic)f(link.)17 b(Otherwise)f(mail)11 +b(migh)o(t)h(b)q(e)i(dropp)q(ed)h(or)f(b)q(ounce.)175 341 y(An)o(y)j(success) +k(or)d(failure)f(state)h(is)g(recorded)i(in)d Fk(hlfsd)o Fl(.)30 +b(It)18 b(is)g(left)g(there)h(for)e(a)h(sp)q(eci\014ed)h(n)o(um)o(b)q(er)f +(of)75 391 y(seconds,)k(after)f(whic)o(h)e(the)i(en)o(try)g(\\times)d(out")i +(and)g(a)f(new)i(actual)e(bac)o(kgrounded)i(lo)q(okup)e(is)g(required.)75 +440 y(Otherwise,)14 b(the)g(cac)o(hed)g(result)g(is)f(used)g(and)g(no)g(exp)q +(ensiv)o(e)h Fk(fork)e Fl(is)h(required.)19 b(This)13 b(simple)e(cac)o(hing)i +(feature)75 490 y(of)g Fk(hlfsd)g Fl(has)h(greatly)g(impro)o(v)o(ed)e(its)i +(p)q(erformance)g(and)f(reliabilit)o(y)m(.)j(See)f(also)e(Section)h(5.3.)75 +598 y Fj(4.6)56 b(Lo)r(c)n(k)17 b(Files)175 673 y Fl(An)12 +b(alternativ)o(e)h(design)g(for)f Fk(hlfsd)f Fl(is)i(to)f(ha)o(v)o(e)h(it)f +(moun)o(t)f(on)h(top)h(of)f(the)h(mail)d(sp)q(o)q(ol)i(directory)i(directly)m +(,)75 723 y(instead)d(of)f(ha)o(ving)f(the)j(mail)c(sp)q(o)q(ol)i(directory)h +(b)q(e)g(a)g(sym)o(b)q(olic)e(link)g(to)i(another)g(link)e(\()p +Fk(home)p Fl(\))h(within)g(the)h(HLFS,)75 773 y(whic)o(h)k(p)q(oin)o(ts)g(to) +g(a)f(real)h(sub)q(directory)i(of)d(the)i(user's)g(home.)k(With)15 +b(some)f(mo)q(di\014cations)f(to)i(the)g(serv)o(er,)i(w)o(e)75 +823 y(could)d(ha)o(v)o(e)g(made)f(all)h(of)f(the)i(user's)h(mailb)q(o)o(x)11 +b(\014les)k(p)q(oin)o(t)f(to)g(the)h(righ)o(t)f(place,)g(but)g(it)g +(su\013ered)j(from)12 b(serious)75 873 y(dra)o(wbac)o(ks:)137 +977 y Fi(\017)21 b Fl(The)15 b(sp)q(o)q(ol)f(directory)i(w)o(ould)d(no)i +(longer)f(b)q(e)h(a)g(regular)f(directory)m(.)21 b(It)14 b(w)o(ould)g(ha)o(v) +o(e)h(to)f(b)q(e)h(managed)e(b)o(y)179 1027 y Fk(hlfsd)o Fl(.)18 +b(This)c(w)o(ould)f(require)h(the)h(implemen)o(tatio)o(n)c(of)i(more)g(NFS)h +(op)q(erations.)137 1105 y Fi(\017)21 b Fl(The)e(user's)h(sp)q(o)q(ol)f +(\014le)g(w)o(ould)g(not)g(b)q(e)g(a)g(regular)g(\014le,)h(but)f(a)g(sym)o(b) +q(olic)e(link)h(to)h(suc)o(h.)35 b(Some)18 b(mail)179 1155 +y(programs)e(remo)o(v)o(e)g(that)h(\014le,)g(not)g(c)o(hec)o(king)g(if)f +(it's)h(a)f(sym)o(b)q(olic)g(link.)26 b(Therefore)18 b(the)g(sym)o(b)q(olic)d +(link)179 1205 y(w)o(ould)10 b(b)q(e)i(remo)o(v)o(ed.)k(W)m(e)10 +b(w)o(ould)h(ha)o(v)o(e)g(had)f(to)h(c)o(hange)h(the)f(serv)o(er)i(so)e(that) +g(remo)o(ving)e(the)j(sym)o(b)q(olic)d(link)179 1255 y(w)o(ould)14 +b(\014rst)i(follo)o(w)d(it)i(and)g(remo)o(v)o(e)f(the)i(\014le)f(it)g(w)o(as) +g(p)q(oin)o(ting)f(to.)22 b(The)16 b(same)e(go)q(es)i(for)f(all)f(op)q +(erations)179 1304 y(whic)o(h)g(require)g(access)i(to)e(the)g(user's)h(mail)c +(sp)q(o)q(ol)j(\014le.)137 1383 y Fi(\017)21 b Fl(The)11 b(w)o(orst)f +(problem)f(w)o(as)h(that)h(di\013eren)o(t)g(UAs)g(and)f(MT)m(As)g(use)h +(di\013eren)o(t)h(metho)q(ds)d(for)h(lo)q(c)o(king)g(the)h(mail)179 +1432 y(\014le.)17 b(Some)12 b(of)g(them)h(create)h(temp)q(orary)e(\014les)h +(named)f Fk($)p Fi(f)p Fk(USER)p Fi(g)p Fk(.lock)p Fl(,)e(others)k(use)g(the) +f Fk(mktemp)f Fl(library)179 1482 y(call)17 b(to)h(generate)i(unique)e +(names.)31 b(Our)19 b(metho)q(d)e(a)o(v)o(oids)h(the)g(need)i(to)e(\014gure)h +(out)f(all)f(the)i(di\013eren)o(t)179 1532 y(metho)q(ds)13 +b(used)i(in)e(lo)q(c)o(king)g(mail)e(\014les,)j(and)g(usage)g(of)g(temp)q +(orary)f(\014les.)175 1636 y(An)g(alternate)h(w)o(a)o(y)e(to)h(a)o(v)o(oid)f +(the)i(need)g(for)f(lo)q(c)o(k)g(\014les)h(is)f(to)g(deliv)o(er)g(mail)e(one) +i(message)g(p)q(er)h(\014le)f(using)g(a)75 1686 y(di\013eren)o(t)i(system)g +(suc)o(h)g(as)f(with)h(INN[19)o(])f(and)g(NNTP[10];)f(ho)o(w)o(ev)o(er,)i +(this)f(w)o(ould)g(require)h(mo)q(di\014cations)e(to)75 1736 +y(all)g(UAs)h(and)g(MT)m(As.)75 1844 y Fj(4.7)56 b(Source)18 +b(Co)r(de)g(Size,)g(Av)m(ailabilit)n(y)-5 b(,)16 b(and)k(P)n(ortabilit)n(y) +175 1919 y Fk(Hlfsd)c Fl(is)h(less)h(than)f(2500)f(lines)h(of)f(C)h(co)q(de,) +i(including)d(commen)o(ts)f(and)i(white-spaces.)29 b(Ho)o(w)o(ev)o(er,)18 +b(it)75 1969 y(mak)o(es)13 b(use)h(of)g(almost)e(4000)h(lines)g(of)h(co)q(de) +g(from)f(the)h Fk(amd)f Fl(distribution)h(itself.)175 2044 +y Fk(Hlfsd)g Fl(is)h(a)o(v)n(ailable)e(in)i(source)i(form)c(as)j(part)f(of)g +(a)g(sp)q(ecial)h(distribution)e(of)h Fk(amd)p Fl(.)22 b(It)15 +b(can)h(b)q(e)g(retriev)o(ed)75 2094 y(via)d(anon)o(ymous)f +Fk(ftp)h Fl(from)f Fk(ftp.cs.columbia.edu)e Fl(in)k(the)g(directory)h +Fk(/pub/amd)p Fl(.)175 2168 y Fk(Hlfsd)h Fl(is)i(built)f(as)g(part)h(of)f +(the)h(sp)q(ecial)g(distribution)f(of)g Fk(amd)g Fl(a)o(v)n(ailable)f(from)g +(our)h(ftp)h(serv)o(er.)30 b(It)18 b(is)75 2218 y(almost)12 +b(as)j(p)q(ortable)f(as)g Fk(amd)g Fl(is.)k(It)c(is)h(only)e(the)i(lac)o(k)e +(of)h(access)i(to)e(certain)h(mac)o(hines)e(that)h(stopp)q(ed)h(us)g(from)75 +2268 y(p)q(orting)d Fk(hlfsd)f Fl(to)i(the)g(n)o(umerous)f(platforms)e +Fk(amd)i Fl(runs)h(on.)k(A)o(t)c(the)g(writing)f(of)f(this)i(pap)q(er,)g +Fk(hlfsd)e Fl(has)i(b)q(een)75 2318 y(successfully)h(p)q(orted)g(and)e +(running)h(on)f(SunOS)i(4.1.3,)c(HP-UX)k(9.0.1,)d(and)h(Solaris)g(2.2.)17 +b(Those)c(represen)o(t)i(the)75 2367 y(3)h(main)e(system)i(t)o(yp)q(es)h +Fk(amd)e Fl(runs)i(on)f(and)f(span)i(most)e(Unix)g(\015a)o(v)o(ors:)22 +b(a)16 b(BSD-st)o(yle)g(system,)g(an)g(SVR-BSD)75 2417 y(h)o(ybrid,)d(and)h +(a)f(system)h(v)o(ery)g(close)h(to)e(SVR4,)g(resp)q(ectiv)o(ely)m(.)75 +2525 y Fj(5)56 b(Ev)m(aluation)175 2600 y Fl(This)11 b(system)h(is)g(implem)o +(en)o(ted)e(and)i(has)g(b)q(een)h(in)e(use)i(on)e(a)h(n)o(um)o(b)q(er)f(of)g +(mac)o(hines)g(for)h(more)e(than)i(a)g(y)o(ear)75 2650 y(no)o(w.)20 +b(F)m(or)14 b(the)h(\014rst)g(nine)g(mon)o(ths)e Fk(hlfsd)h +Fl(w)o(as)g(in)g(exp)q(erimen)o(tal)g(use.)21 b(W)m(e)14 b(ha)o(v)o(e)h +(since)g(deplo)o(y)o(ed)g(it)f(on)g(most)75 2700 y(pro)q(duction)g(mac)o +(hines)f(in)h(our)f(departmen)o(t,)h(spanning)f(o)o(v)o(er)h(a)g(100)f(hosts) +h(and)g(3)g(di\013eren)o(t)g(arc)o(hitectures.)954 2825 y(10)p +eop +%%Page: 11 11 +bop 175 42 a Fl(The)11 b(goal)f(of)h(this)g(w)o(ork)g(is)f(to)h(expand)h(the) +f(accessibilit)o(y)g(of)g(electronic)h(mail,)d(impro)o(v)o(e)g(o)o(v)o(erall) +h(reliabilit)o(y)75 91 y(and)i(stabilit)o(y)f(of)g(this)h(vital)f(service,)j +(while)d(at)h(the)h(same)e(time)g(main)o(tain)e(the)k(sanit)o(y)f(of)f(our)h +(SAs)h(\(y)o(ours)f(truly)75 141 y(included\).)18 b(F)m(or)c(this)g(to)g +(really)f(w)o(ork,)g(it)g(m)o(ust)g(ha)o(v)o(e:)126 257 y(1.)20 +b(V)m(ery)14 b(high)f(a)o(v)n(ailabilit)o(y)l(.)126 340 y(2.)20 +b(Little)13 b(o)o(v)o(erhead.)126 423 y(3.)20 b(Little)14 b(hassle)g(for)g +(users)i(and)e(administrators)e(as)i(the)h(system)f(is)g(b)q(eing)g(used)h +(or)f(installed)g(for)f(the)i(\014rst)179 473 y(time.)75 598 +y Fj(5.1)56 b(P)n(erformance)175 673 y Fl(W)m(e)15 b(ha)o(v)o(e)g(carried)h +(out)g(some)e(measuremen)o(ts)h(to)h(quan)o(tify)e(the)i(ab)q(o)o(v)o(e)f +(requiremen)o(ts)h(and)g(more.)22 b(The)75 723 y(tests)15 b(w)o(ere)g(p)q +(erformed)f(on)f(a)h(Sun)g(SP)m(AR)o(Cstation-2)f(running)g(SunOS)i(4.1.3.) +175 797 y(Accessing)20 b(a)f(lo)q(cal)g(sp)q(o)q(ol)g(\014le)g(via)f +Fk(stat)h Fl(normally)d(tak)o(es)k(180)e(msec)h(without)g Fk(hlfsd)o +Fl(.)34 b(If)19 b Fk(hlfsd)f Fl(is)75 847 y(running)g(and)g(has)g(the)h +(user's)h(en)o(try)e(already)g(cac)o(hed,)i(it)e(tak)o(es)h(60)f(msec)g(more) +f(to)h(access)i(the)f(\014le.)31 b(This)75 897 y(o)o(v)o(erhead)19 +b(is)f(attributed)h(to)f(the)h(fact)g(that)f(the)h(k)o(ernel)g(has)g(to)f +(access)i(a)e(user-lev)o(el)h(NFS)g(serv)o(er,)h(making)75 +947 y(sev)o(eral)14 b(con)o(text)h(switc)o(hes.)175 1022 y(If)h(the)h(en)o +(try)h(is)e(not)h(cac)o(hed,)h Fk(hlfsd)e Fl(forks)g(a)h(c)o(hild)f(to)h(p)q +(erform)f(op)q(erations)h(whic)o(h)f(ma)o(y)f(cause)j(it)e(to)75 +1071 y(hang.)21 b(The)16 b(o)o(v)o(erhead)f(of)f(that)i Fk(fork)e +Fl(and)h(other)g(c)o(hec)o(ks)i(is)e(an)f(additional)g(70)g(msec)h(\(or)g +(130)f(msec)h(o)o(v)o(er)g(the)75 1121 y(regular)d(lo)q(okup)f(not)g(using)h +Fk(hlfsd)o Fl(\).)17 b(Ho)o(w)o(ev)o(er,)12 b(this)g(o)o(v)o(erhead)g(is)g +(incurred)h(only)d(once)j(in)e(5)h(min)o(utes,)e(b)q(ecause)75 +1171 y(the)k(result)h(of)e(eac)o(h)i(c)o(hec)o(k)g(is)e(cac)o(hed)i(for)f +(that)g(long)f(b)o(y)g(default.)175 1246 y(The)f(ab)q(o)o(v)o(e)g(times)f +(are)i(somewhat)e(signi\014can)o(t,)g(but)i(not)e(b)o(y)h(m)o(uc)o(h,)f +(considering)h(the)h(use)g(of)f(a)f(user-lev)o(el)75 1296 y(\014le-serv)o +(er.)19 b(\(By)12 b(comparison,)e(in)h(our)h(en)o(vironmen)o(t)f(it)g(tak)o +(es)h(ab)q(out)g(0.5)e(seconds)k(to)d(access)j(a)d(new)h(\014lesystem)75 +1345 y(using)h Fk(amd)p Fl(.\))18 b(Giv)o(en)13 b(the)h(b)q(ene\014ts)i(of)d +Fk(hlfsd)o Fl(,)g(w)o(e)h(feel)g(that)g(a)f(minima)o(l)e(access)k(slo)o(wdo)o +(wn)e(is)h(a)f(small)f(price)i(to)75 1395 y(pa)o(y)m(.)j(In)d(practice,)g(o)o +(v)o(er)g(12)g(mon)o(ths)e(of)i(usage)g(w)o(e)g(ha)o(v)o(e)g(noticed)g(no)g +(visible)f(degradation)g(of)h(service.)1734 1380 y Fg(13)175 +1470 y Fl(The)h(in)o(ternal)g(data)h(structures)h(\(tables)f(and)f(cac)o +(hes\))i(require)g(50)e(b)o(ytes)h(p)q(er)g(user)g(on)g(the)g(system.)22 +b(In)75 1520 y(our)16 b(en)o(vironmen)o(t,)e(with)i(750)f(users,)i(that)f +(translates)g(to)g(ab)q(out)f(37KB)h(|)f(rather)i(insigni\014can)o(t)e(giv)o +(en)g(that)75 1570 y(w)o(orkstations)f(these)h(da)o(ys)f(come)f(installed)g +(with)h(at)f(least)i(16-32MB)e(of)g(RAM.)75 1677 y Fj(5.1.1)55 +b(Remailing)16 b(Lost)i(Mail)175 1753 y Fl(The)h Fk(hlfsd)f +Fl(distribution)h(con)o(tains)g(a)f Fk(perl)p Fl([26)o(])g(script)i(called)f +Fk(lostaltmail)p Fl(.)31 b(Remailing)16 b(a)i(single)75 1802 +y(message)c(with)g(a)g(b)q(o)q(dy)g(size)h(of)f(1KB,)g(tak)o(es)h(an)f(a)o(v) +o(erage)g(of)g(1.2)f(seconds)j(\(total)d(time\).)18 b(In)c(our)h(departmen)o +(t,)75 1852 y(resending)g(an)e(a)o(v)o(erage)h(mailb)q(o)o(x)d(\014le)j(tak)o +(es)h(ab)q(out)e(20)h(seconds.)175 1927 y(Initially)f(w)o(e)j(ran)g(the)h +(script)f(once)h(a)e(da)o(y)m(,)g(but)h(found)g(ha)o(ving)f(to)g(w)o(ait)g +(up)h(to)g(24)f(hours)i(for)e(lost)h(mail)75 1977 y(redeliv)o(ery)f(to)q(o)g +(long.)k(W)m(e)14 b(then)i(exp)q(erimen)o(ted)f(with)f(running)g +Fk(lostaltmail)f Fl(once)i(an)f(hour.)21 b(Ho)o(w)o(ev)o(er,)15 +b(w)o(e)75 2027 y(found)c(that)g(frequency)h(to)q(o)f(fast.)17 +b(The)12 b(most)e(lik)o(ely)f(situation)i(in)g(whic)o(h)g Fk(hlfsd)f +Fl(will)f(rep)q(oin)o(t)j(its)f(sym)o(b)q(olic)e(link)75 2076 +y(to)14 b(the)g(alternate)g(sp)q(o)q(ol)g(directory)g(is)g(when)g(the)g +(user's)h(\014lesystem)f(is)f(full.)k(A)d(full)e(\014lesystem)i(is)g(a)f(p)q +(ersisten)o(t)75 2126 y(situation)18 b(that)h(in)f(most)f(cases)j(tak)o(es)f +(some)f(time)f(to)h(get)h(\014xed,)h(as)e(it)h(requires)g(h)o(uman)e(in)o +(terv)o(en)o(tion.)32 b(If)75 2176 y(the)19 b(situation)f(that)h(causes)h +Fk(hlfsd)e Fl(to)g(use)i(the)f(alternate)g(sp)q(o)q(ol)g(directory)g(is)g +(lik)o(ely)e(to)i(p)q(ersist,)h(running)75 2226 y(the)15 b +Fk(lostaltmail)e Fl(script)i(will)f(consume)g(unnecessary)j(resources,)g +(only)d(to)h(redeliv)o(er)g(the)h(mail)c(bac)o(k)j(to)f(the)75 +2276 y(alternate)f(sp)q(o)q(ol)f(directory)m(.)18 b(W)m(e)12 +b(\014nally)g(settled)h(on)g(running)f Fk(lostaltmail)e Fl(b)q(et)o(w)o(een)k +(6)e(and)h(12)f(times)f(a)h(da)o(y)m(.)75 2325 y(Dep)q(ending)i(on)g(the)g +(amoun)o(t)e(of)i(lost)f(mail)e(exp)q(ected,)16 b(the)e(script)h(could)f(b)q +(e)g(run)h(more)d(or)i(less)h(often.)75 2433 y Fj(5.1.2)55 +b(Reliabilit)n(y)175 2509 y Fl(W)m(e)11 b(ha)o(v)o(e)h(sim)o(ulated)f(w)o +(orst-case)i(scenarios)g(b)o(y)f(\014lling)e(up)i(a)g(user)h(\014lesystem)f +(and)g(letting)g Fk(hlfsd)f Fl(decide)75 2558 y(to)k(redirect)i(mail)12 +b(to)j(the)h(alternate)g(sp)q(o)q(ol)e(directory)m(.)22 b(A)o(t)16 +b(this)f(p)q(oin)o(t)f(w)o(e)i(\014lled)f(up)g(that)g(\014lesystem)g(as)g(w)o +(ell.)p 75 2593 720 2 v 106 2620 a Ff(13)139 2632 y Fe(The)g(SAs)h(group)e +(felt)h(so)g(con)o(vinced)e(that)i Fd(hlfsd)f Fe(w)o(as)i(w)o(orking)e(w)o +(ell,)j(that)d(w)o(e)i(w)o(ere)g(the)f(\014rst)g(to)g(use)g(it)g(on)g +Fc(our)i Fe(home)75 2671 y(mac)o(hines.)954 2825 y Fl(11)p +eop +%%Page: 12 12 +bop 75 42 a Fk(Hlfsd)16 b Fl(k)o(ept)i(on)e(p)q(oin)o(ting)g(to)h(the)h +(alternate)g(sp)q(o)q(ol)f(directory)g(during)g(the)h(cac)o(hed)g(en)o(try)g +(in)o(terv)n(al,)e(but)i(w)o(e)75 91 y(observ)o(ed)d(no)g(mail)c(lost.)19 +b(Instead,)c(the)g(sending)g(side)f(detected)j(that)d(the)h(\014lesystem)f(w) +o(as)h(full,)d(and)j(k)o(ept)f(the)75 141 y(message)g(in)f(the)i(remote)e +(\(priv)n(ate\))h(sp)q(o)q(ol)g(directory)m(.)k(This)c(is)f(the)i(default)e +(b)q(eha)o(vior)h Fk(sendmail)p Fl([1)n(])f(pro)o(vides.)175 +216 y Fk(Hlfsd)d Fl(do)q(es)i(not)g(in)o(tro)q(duce)g(an)o(y)f(new)h +(problems;)f(that)h(is,)f(if)g(a)h(\014lesystem)f(is)g(completely)g(full,)f +(whatev)o(er)75 266 y(b)q(eha)o(vior)j(y)o(our)g(curren)o(t)h(LD)o(A)f(pro)o +(vides)g(is)g(main)o(tained.)j(Since)e Fk(hlfsd)e Fl(uses)i(b)q(oth)f(the)h +(user's)g(\014lesystem)f(and)75 315 y(an)18 b(alternate)h(sp)q(o)q(ol)f +(directory)m(,)h(it)f(actually)g(increases)i(the)f(a)o(v)n(ailabili)o(t)o(y)c +(of)j(mail)e(services,)21 b(b)o(y)d(\\virtually")75 365 y(increasing)c(the)h +(disk)e(space)i(a)o(v)n(ailable)d(for)h(mail)f(sp)q(o)q(oling.)175 +440 y(Once)g(space)g(has)f(b)q(een)h(freed)g(in)f(the)g(user's)h +(\014lesystem,)f(and)g(the)h(cac)o(hed)g(en)o(try)f(expired,)h +Fk(hlfsd)e Fl(p)q(oin)o(ted)75 490 y(its)h(sym)o(b)q(olic)f(link)h(bac)o(k)g +(to)g(the)h(user's)h(home)d(directory)m(.)18 b(The)12 b(next)g(time)e(the)i +(remailing)d(script)j(ran,)f(all)g(\\lost")75 540 y(mail)g(got)j(resen)o(t)h +(to)f(its)g(o)o(wners.)175 614 y(Since)f(the)g(installation)d(of)i +Fk(hlfsd)f Fl(in)h(our)h(pro)q(duction)f(en)o(vironmen)o(t,)f(w)o(e)i(ha)o(v) +o(e)f(seen)i(a)e(few)h(cases)g(of)f(lost)75 664 y(mail)i(b)q(eing)i(resen)o +(t,)i(mostly)c(due)j(to)f(full)f(\014lesystems.)25 b(W)m(e)16 +b(kno)o(w)g(of)g(no)g(case)h(where)g(mail)d(w)o(as)i(completely)75 +714 y(lost.)75 822 y Fj(5.2)56 b(Installation)175 897 y Fl(Since)13 +b Fk(hlfsd)e Fl(w)o(as)i(written)g(b)o(y)f(SAs)h(for)f(other)h(SAs,)g(w)o(e)g +(ha)o(v)o(e)f(pro)o(vided)h(it)f(with)g(sev)o(eral)h(command-li)o(ne)75 +947 y(options)f(to)h(use)g(at)g(startup)g(time,)e(enabling)h +Fk(hlfsd)g Fl(to)g(b)q(e)h(tailored)g(for)f(a)g(particular)h(en)o(vironmen)o +(t.)j(Needless)75 997 y(to)g(sa)o(y)m(,)g(a)g(man)e(page)i(is)h(pro)o(vided,) +f(as)g(w)o(ell)g(as)g(complete)g(source)h(co)q(de.)26 b(F)m(urthermore,)16 +b(w)o(e)h(included)f(a)g(few)75 1046 y(scripts)f(written)f(in)f +Fk(sh)g Fl(and)h Fk(perl)e Fl(whic)o(h)i(w)o(e)g(use)g(in)f(our)h(en)o +(vironmen)o(t)e(to)i(re/start)h Fk(hlfsd)o Fl(,)e(test)h(for)g(p)q(ossible)75 +1096 y(con\014guration)f(anomalies,)f(and)h(resend)j(\\lost")d(mail.)175 +1171 y(The)e(most)f(signi\014can)o(t)h(w)o(ork)f(that)i(SAs)f(need)h(to)f(do) +g(is)g(iden)o(tify)f(programs)g(that)h(need)h(to)f(access)i(mailb)q(o)o(x)75 +1221 y(\014les)18 b(of)f(other)i(users,)h(and)d(\\)p Fh(setgid)p +Fl(")h(them)f(to)g(HLFS)p 967 1221 13 2 v 15 w(GID.)g(In)h(our)g(en)o +(vironmen)o(t)e(w)o(e)i(had)g(to)g(do)f(that)h(for)75 1271 +y Fk(comsat)p Fl(,)f Fk(from)p Fl(,)g Fk(finger)g Fl(and)g(a)h(few)g(others.) +30 b(Our)19 b(en)o(vironmen)o(t)d(uses)j(the)g Fk(rdist)p Fl([5)n(])e +(automatic)f(soft)o(w)o(are)75 1320 y(distribution)i(program,)g(and)g(th)o +(us)h(these)h(c)o(hanges)f(w)o(ere)h(required)f(only)f(in)g(one)h(place)f(|)g +(the)i(top)e(of)g(our)75 1370 y Fk(rdist)13 b Fl(tree.)75 1478 +y Fj(5.3)56 b(Problems)175 1553 y Fl(There)15 b(are)f(a)g(few)g(problems,)e +(some)h(of)g(whic)o(h)h(cannot)g(b)q(e)h(easily)e(resolv)o(ed:)137 +1670 y Fi(\017)21 b Fl(Some)15 b(programs)g(need)i(to)f(b)q(e)h +Fh(setgid)g Fl(to)f(the)h(sp)q(ecial)f(HLFS)p 1181 1670 V 15 +w(GID)g(group.)25 b(There)17 b(is)g(no)f(easy)g(w)o(a)o(y)g(to)179 +1719 y(lo)q(cate)f(them)g(other)h(than)g(kno)o(wing)e(ahead)i(of)f(time)f +(what)h(they)h(do.)23 b(Note)16 b(that)f(if)g(the)h(programs)f(are)179 +1769 y(not)c Fh(setgid)p Fl(,)g(the)h(only)f(consequence)i(is)e(that)h(these) +g(programs)f(are)g(unable)g(to)g(\014nd)h(mailb)q(o)o(xes.)j(Ho)o(w)o(ev)o +(er,)179 1819 y(with)e(other)i(metho)q(ds,)e(if)g($MAIL)h(is)f(not)h(used,)g +(mail)e(is)h(not)h(deliv)o(ered.)137 1902 y Fi(\017)21 b Fl(It)12 +b(is)f(p)q(ossible)h(that)g(the)h(status)f(of)g(a)f(home)g(directory)h +(access)i(will)c(c)o(hange)j(during)e(the)i(time)d(that)i Fk(hlfsd)179 +1952 y Fl(cac)o(hes)17 b(this)g(information.)23 b(Pic)o(king)15 +b(a)h(smaller)f(cac)o(he)i(expiration)f(time)f(can)i(alleviate)e(this)i +(problem,)179 2002 y(but)d(it)g(increases)h(the)g(resources)h(tak)o(en)e(b)o +(y)g Fk(hlfsd)f Fl(and)h(slo)o(ws)f(do)o(wn)h(access)i(to)e(mail.)h(It)f(is)g +(left)g(for)f(the)179 2051 y(individual)f(SAs)i(to)g(c)o(hange)g(this)g +(default)f(v)n(alue.)137 2134 y Fi(\017)21 b Fl(An)o(y)14 b(logins)e(with)i +(the)h(same)e Fh(uid)h Fl(and)f(a)h(di\013eren)o(t)h(home)e(directory)h(ma)o +(y)e(ha)o(v)o(e)i(mail)d(deliv)o(ered)k(or)e(read)179 2184 +y(from)c(an)o(y)i(of)f(their)h(home)f(directory)i(pathnames.)k +Fk(Hlfsd)10 b Fl(stores)j(pathnames)d(in)g(an)h(in)o(ternal)g(hash)g(table) +179 2234 y(k)o(ey)o(ed)i(b)o(y)g(the)g Fh(uid)p Fl(;)g(therefore,)h(it)f(is)g +(unde\014ned)h(whic)o(h)f(pathname)f(is)g(returned)j(in)d(the)i(case)g(of)e +(m)o(ultiple)179 2284 y(users)k(with)e(the)h(same)f Fh(uid)h +Fl(and)g(di\013eren)o(t)g(home)f(directories.)21 b(W)m(e)14 +b(pro)o(vide)h(a)f(script)i(whic)o(h)e(c)o(hec)o(ks)i(for)179 +2334 y(this)e(situation)f(and)h(w)o(arns)g(the)g(SAs.)137 2417 +y Fi(\017)21 b Fl(On)16 b(systems)g(that)g(cannot)g(turn)g(o\013)g(the)g(NFS) +g(attribute)g(cac)o(he,)h(the)g(k)o(ernel)f(migh)o(t)d(return)k(the)g(same) +179 2467 y(sym)o(b)q(olic)8 b(link)h(name)f(for)i(t)o(w)o(o)f(di\013eren)o(t) +i(users)g(who)f(access)h(the)g(sp)q(o)q(ol)e(directory)i(consecutiv)o(ely)m +(,)f(p)q(ossibly)179 2516 y(resulting)17 b(in)f(mail)e(getting)i(deliv)o +(ered)h(to)g(the)g(wrong)g(mailb)q(o)o(x!)23 b(On)17 b(these)h(systems,)f +Fk(hlfsd)f Fl(will)f(not)179 2566 y(run)h(unless)g(started)g(with)f(a)h(sp)q +(ecial)f(option.)22 b(In)16 b(that)f(case)i(it)e(will)f(set)i(the)g +(attribute)g(cac)o(he)g(v)n(alue)f(to)179 2616 y(the)f(shortest)i(p)q +(ossible)e(in)o(terv)n(al,)e(but)i(it)g(ma)o(y)e(not)i(b)q(e)g(su\016cien)o +(t.)954 2825 y(12)p eop +%%Page: 13 13 +bop 75 42 a Fj(6)56 b(Related)17 b(W)-5 b(ork)175 117 y Fl(The)18 +b(idea)f(of)h(dynamic)e(or)h(v)n(ariable)g(pathname)g(comp)q(onen)o(ts)g(is)h +(not)g(new.)30 b(HP-UX)18 b(do)q(es)g(this)g(with)75 166 y(con)o(text-dep)q +(enden)o(t)g(\014les[8],)d(and)g(Mac)o(h)h(with)f(the)h(\\)p +Fk(@SYS)p Fl(")f(v)n(ariables[4)n(].)23 b(Both)16 b(of)f(these)i(implemen)o +(tations)75 216 y(supp)q(ort)11 b(replacemen)o(t)f(of)f(pathname)g(comp)q +(onen)o(ts)h(b)o(y)g(k)o(ernel)g(v)n(ariables.)16 b(Ap)q(ollo's)9 +b(DOMAIN/OS)i(supp)q(orted)75 266 y(a)20 b(more)g(sophisticated)h(system)f +(where)i(arbitrary)e(user)i(en)o(vironmen)o(t)d(v)n(ariables)h(could)g(b)q(e) +h(referenced)i(in)75 316 y(pathnames[11)n(,)12 b(12].)k(On)d(the)g(issue)g +(of)e(ha)o(ving)g(a)h(user's)i(home)d(\014les)h(and)g(mailb)q(o)o(x)e(\014le) +i(reside)h(in)f(one)g(lo)q(cation,)75 366 y(Plan)h(9's)h Fh(attach)g +Fl(op)q(erator)h(can)f(b)q(e)g(used)h(to)f(unify)f(sev)o(eral)h(\014le)g +(serv)o(ers)i(in)o(to)d(one)h(user)h(name)e(space[14].)175 +440 y(What)f(is)h(new)g(ab)q(out)g(our)g(idea)g(is)g(that)g(w)o(e)g(do)f(not) +h(require)h(an)o(y)f(c)o(hange)g(to)g(an)o(y)f(part)h(of)g(the)g +(\014lesystem)75 490 y(implemen)o(tatio)o(n)c(in)i(the)i(k)o(ernel.)18 +b(All)10 b(that)i(is)g(required)h(are)f(RPC)f(and)h(NFS,)f(making)f(the)i +(system)f(m)o(uc)o(h)g(more)75 540 y(widely)i(applicable.)175 +615 y(Though)i(at)h(\014rst)h(it)e(ma)o(y)f(app)q(ear)i(that)g +Fk(amd)f Fl(can)i(do)e(what)h(hlfsd)f(do)q(es,)i(it)f(can't.)24 +b Fk(Amd)15 b Fl(cannot)h(return)75 665 y(di\013eren)o(t)d(pathnames)f(as)g +(a)g(v)n(alue)g(of)g(a)g(sym)o(b)q(olic)f(link)g(dep)q(ending)i(on)f(who)g +(accessed)j(it.)i(See)c(also)f(Section)h(2.3)75 714 y(for)h(more)e(details)i +(on)g(v)n(arious)f(w)o(a)o(ys)g(in)h(whic)o(h)g Fk(amd)f Fl(cannot)h(help)g +(the)g(w)o(a)o(y)g Fk(hlfsd)e Fl(can.)75 822 y Fj(6.1)56 b(Mail-reading)17 +b(Serv)n(ers)175 897 y Fl(The)11 b(future)g(of)g(mail)d(reading)i(and)h +(sending)g(ma)o(y)e(b)q(e)i(similar)e(to)h(that)h(used)h(b)o(y)f(the)g(NNTP)g +(proto)q(col)g(used)75 947 y(for)g(managing)d(NetNews[10)q(,)j(19)o(].)17 +b(That)11 b(is,)g(a)g(sp)q(ecial-purp)q(ose)h(serv)o(er)h(whic)o(h)e(pro)o +(vides)h(net)o(w)o(ork)f(connections)75 997 y(for)j(reading)f(and)h(writing)f +(mail)e(remotely)m(.)175 1072 y(Sev)o(eral)19 b(suc)o(h)g(programs)f(exist,)i +(most)e(notably)g(IMAP[16])g(and)h(POP[17].)32 b(Ho)o(w)o(ev)o(er,)20 +b(use)g(of)f(these)75 1122 y(serv)o(ers)14 b(is)e(limited)e(at)i(this)g(time) +e(b)q(ecause)k(most)d(MT)m(As)h(and)g(UAs)h(ha)o(v)o(e)f(not)g(b)q(een)h(con) +o(v)o(erted)g(to)f(use)h(them,)e(or)75 1171 y(they)i(require)h(sp)q(ecial)f +(en)o(vironmen)o(ts)f(\(the)i Fh(A)o(ndr)n(ew)f(Message)i(Delivery)e(System)p +Fl([18)o(])g(requires)h(AFS\).)e(P)o(orting)75 1221 y(those)18 +b(applications)f(for)h(most)e(p)q(opular)i(en)o(vironmen)o(ts)f(is)g(not)h +(going)f(to)g(b)q(e)i(an)e(easy)h(task.)30 b(Nev)o(ertheless,)75 +1271 y(the)15 b(b)q(ene\014ts)h(of)d(suc)o(h)i(services)h(o)o(v)o(er)e(that)g +(of)g Fk(hlfsd)f Fl(w)o(ould)g(include)h(faster)h(and)f(more)f(reliable)h +(service,)h(plus)75 1321 y(greatly)e(expanded)h(functionalit)o(y)e(\(p)q +(ossibly)h(pro)o(viding)f(threads)i(information)c(for)j(threaded)i(mail)10 +b(readers\).)75 1429 y Fj(7)56 b(Conclusion)175 1504 y Fl(W)m(e)16 +b(ha)o(v)o(e)h(describ)q(ed)i(the)f(b)q(ene\014ts)h(of)d(deliv)o(ering)h +(mail)d(to)j(users')h(home)e(directories,)j(the)e(traditional)75 +1554 y(w)o(a)o(ys)10 b(to)f(do)h(that)g(and)g(wh)o(y)f(w)o(e)i(think)e(they)h +(are)h(inadequate,)f(and)g(the)g(design,)h(implemen)o(tatio)o(n,)d(p)q +(erformance,)75 1604 y(and)14 b(con)o(v)o(enience)h(of)e(our)h(alternativ)o +(e.)175 1678 y(The)i(main)f(con)o(tribution)g(of)h(our)g(w)o(ork)g(is)h(the)g +(idea)f(mail)d(can)k(b)q(e)g(reliably)e(deliv)o(ered)i(to)f(user's)h(home)75 +1728 y(directories)12 b(for)e(easy)h(access)i(with)d(v)o(ery)h(little)f(o)o +(v)o(erhead,)h(user)g(hassle,)h(or)e(the)i(need)f(for)f(extensiv)o(e)i(in)o +(terv)o(en)o(tion)75 1778 y(on)i(the)g(part)g(of)f(SAs.)175 +1853 y(A)h(w)o(orking)f(protot)o(yp)q(e)i(v)o(ersion)f(of)g +Fk(hlfsd)f Fl(w)o(as)h(written)h(in)f(one)g(w)o(eek)o(end.)20 +b(Ho)o(w)o(ev)o(er,)15 b(the)f(ideas)h(repre-)75 1902 y(sen)o(ted)e(in)e(the) +i(w)o(ork)e(span)h(sev)o(eral)h(y)o(ears)f(of)f(exp)q(erience)j(in)d(net)o(w) +o(ork)h(programming)c(\(esp)q(ecially)13 b(RPC)o(\),)f(NFS,)75 +1952 y Fk(amd)p Fl(,)h(and)g(mail)f(systems.)75 2060 y Fj(7.1)56 +b(F)-5 b(uture)18 b(W)-5 b(ork)175 2135 y Fl(It)15 b(w)o(ould)e(b)q(e)j(p)q +(ossible)f(to)g(in)o(tegrate)g(some)f(of)g Fk(hlfsd)o Fl('s)g(functionalit)o +(y)g(in)o(to)g Fk(amd)p Fl(,)g(b)o(y)g(pro)o(viding)g(sp)q(ecial)75 +2185 y(k)o(eyw)o(ords)g(lik)o(e)f Fk($)p Fi(f)p Fk(home)p Fi(g)p +Fl(,)f Fk($)p Fi(f)p Fk(user)p Fi(g)g Fl(and)i Fk($)p Fi(f)p +Fk(group)p Fi(g)e Fl(for)i(use)h(in)e Fk(amd)p Fl('s)g(maps.)175 +2260 y(W)m(e)e(plan)g(on)g(making)e(sure)k Fk(hlfsd)d Fl(is)h(as)h(p)q +(ortable)g(as)f Fk(amd)g Fl(is,)g(and)h(impro)o(ving)d(its)i(p)q(erformance)h +(as)f(m)o(uc)o(h)75 2310 y(as)j(p)q(ossible.)k(An)c(RPC)g(in)o(terface)g(for) +g(querying)g Fk(hlfsd)o Fl('s)f(status)i(is)f(needed)h(as)f(w)o(ell.)75 +2418 y Fj(7.2)56 b(Alternativ)n(e)17 b(Uses)175 2493 y Fk(Hlfsd)o +Fl('s)g(primary)e(use)j(is)f(that)h(of)e(a)h(mail-sp)q(o)q(ol)e(redirector.) +29 b(Ho)o(w)o(ev)o(er,)18 b(it)f(can)h(b)q(e)g(used)g(to)f(p)q(erform)75 +2543 y(other)e(tasks.)j(All)13 b(it)h(tak)o(es)g(are)g(the)h(righ)o(t)e +(command-li)o(ne)f(options:)137 2650 y Fi(\017)21 b Fk(Hlfsd)10 +b Fl(can)h(manage)e(the)j Fk(/var/tmp)d Fl(directory)m(.)17 +b(Th)o(us)12 b(ev)o(ery)f(user)h(who)f(uses)h Fk(/var/tmp)e +Fl(w)o(ould)g(actually)179 2700 y(b)q(e)j(using)e(a)h(sub)q(directory)i +(within)d(their)i(o)o(wn)e(home)g(directory)m(,)i(rather)g(than)f(taking)f +(from)f(system-wide)954 2825 y(13)p eop +%%Page: 14 14 +bop 179 42 a Fl(resources.)137 124 y Fi(\017)21 b Fl(Other)13 +b(t)o(yp)q(es)g(of)e(user-sp)q(eci\014c)k(\014les)d(whic)o(h)g(get)h(sp)q(o)q +(oled)f(to)g(a)g(particular)g(host,)g(suc)o(h)h(as)f Fh(Se)n(cr)n(et)h(Mail)p +Fl([24)n(])179 173 y(or)h(electronic)h(faxes)f(can)g(also)f(b)q(e)h +(redirected)i(for)e(sp)q(o)q(oling)f(in)o(to)g(home)g(directories.)75 +296 y Fj(8)56 b(Ac)n(kno)n(wledgmen)n(ts)175 371 y Fl(Sp)q(ecial)10 +b(thanks)h(go)e(to)i(Daniel)e(Duc)o(hamp)g(for)h(his)g(in)o(v)n(aluable)f +(commen)o(ts)f(on)i(the)h(pap)q(er,)h(to)e(James)g(T)m(anis)75 +421 y(who)g(wrote)h(the)f(remailing)e(script)j(and)f(pro)o(vided)g(useful)g +(feedbac)o(k,)h(and)f(to)g(all)f(mem)o(b)q(ers)g(of)g(the)i(tec)o(hnical)g +(sta\013)75 471 y(who)e(help)q(ed)h(in)f(stress-testing)i Fk(hlfsd)o +Fl(.)17 b(W)m(e)9 b(also)f(thank)h(man)o(y)f(mem)o(b)q(ers)g(of)g(the)i +Fk(amd-workers@acl.lan)o(l.gov)75 520 y Fl(mailing)h(list)i(for)h(pro)o +(viding)e(v)n(aluable)h(discussion)h(on)g(the)g(sub)r(ject.)175 +595 y(This)f(w)o(ork)h(w)o(as)f(supp)q(orted)i(in)e(part)h(b)o(y)f(a)h +(National)e(Science)j(F)m(oundation)d(CISE)i(Institutional)f(Infras-)75 +645 y(tructure)j(gran)o(t,)d(n)o(um)o(b)q(er)g(CD)o(A-90-24735.)175 +720 y(As)i Fk(hlfsd)f Fl(uses)i(parts)f(of)f(the)i Fk(amd)e +Fl(distribution,)g(it)h(is)f(distributed)i(under)g(the)f(same)f(restrictions) +i(and)75 769 y(licenses)f(that)f Fk(amd)f Fl(is.)75 877 y Fj(9)56 +b(References)75 952 y Fl([1])20 b(E.)14 b(Allman.)k(SENDMAIL)d({)f(An)h(In)o +(ternet)o(w)o(ork)h(Mail)d(Router.)21 b(In)14 b Fh(UNIX)i(System)f(Manager's) +h(Manual.)140 1002 y Fl(Univ)o(ersit)o(y)d(of)h(California,)d(Berk)o(eley)m +(,)j(1986.)75 1084 y([2])20 b(F.)g(C.)g(Baran.)39 b(MW:)20 +b(Mail-W)m(atc)o(h.)37 b(An)21 b(unpublished)g(man)o(ual)d(page,)k(Academic)e +(Systems)h(Group,)140 1134 y(Colum)o(bia)11 b(Univ)o(ersit)o(y)i(Cen)o(ter)i +(for)f(Computing)e(Activities,)h(1987.)75 1216 y([3])20 b(B.)12 +b(Callaghan)f(and)h(T.)g(Ly)o(on.)j(The)e(Automoun)o(ter.)i(In)e +Fh(Pr)n(o)n(c.)g(1989)h(Winter)g(USENIX)g(Conf.)p Fl(,)e(pp.)g(43{51,)140 +1266 y(Jan)o(uary)h(1989.)75 1348 y([4])20 b(M.)13 b(N.)g(Condict.)18 +b(Con\014guring)13 b(and)g(Building)g(Mac)o(h)h(3.0.)i(OSF)e(Researc)o(h)h +(Institute,)f(Grenoble,)g(F)m(rance.)140 1398 y(Unpublished)g(notes)g(a)o(v)n +(ailable)e(via)h(ftp)h(from)e Fk(mach.cs.cmu.edu:d)o(oc/no)o(tes/k)o(ernel)p +1595 1398 14 2 v 12 w(build.doc)p Fl(.)75 1480 y([5])20 b(M.)13 +b(A.)g(Co)q(op)q(er.)18 b(Ov)o(erhauling)13 b(Rdist)g(for)h(the)g('90s.)j +Fh(L)n(ar)n(ge)d(Instal)r(lation)h(System)g(A)n(dministr)n(ators)e(Work-)140 +1530 y(shop)i(Pr)n(o)n(c)n(e)n(e)n(dings)p Fl(,)e(pp.)h(1-8,)f(USENIX,)h +(Long)f(Beac)o(h,)h(CA,)g(Octob)q(er)h(19-June)f(23,)f(1992.)75 +1612 y([6])20 b(A.)13 b(J.)h(Findla)o(y)m(.)i(The)e(Home-Directory)f(Mail)g +(System.)18 b(In)13 b Fh(EUUG)i(News)p Fl(,)e(Autumn)g(1988.)75 +1694 y([7])20 b(J.)13 b(F)m(ulton.)k(MIT)d(X)g(Consortium.)j(X11R5)12 +b(Reference)k(Man)o(ual)d(P)o(ages,)h(Section)g(1:)k(\\xbi\013\(1\)",)12 +b(1988.)75 1776 y([8])20 b(Hewlett-P)o(ac)o(k)n(ard)14 b(Compan)o(y)m(.)j +(HP-UX)e(Release)g(9.0)e(Reference)j(Man)o(ual,)d(Section)i(4:)k +(\\cdf\(4\)",)13 b(August)140 1826 y(1992.)75 1908 y([9])20 +b(IBM)11 b(Corp.)j(AIX)e(Comma)o(nds)d(Reference,)k(V)m(olume)d(1,)h(\\b)q +(ellmail\(1\)")o(,)e(pp.)i(1-84|1-87,)e(Decem)o(b)q(er)i(1989.)75 +1990 y([10])19 b(B.)14 b(Kan)o(tor)g(and)g(P)m(.)f(Lapsley)m(.)k(Net)o(w)o +(ork)e(News)f(T)m(ransfer)h(Proto)q(col.)j(RF)o(C)13 b(977,)f(F)m(ebruary)j +(1986;)d(27)h(p.)75 2073 y([11])19 b(P)m(.)14 b(J.)h(Leac)o(h,)g(P)m(.)f(H.)g +(Levine,)h(B.)f(P)m(.)g(Douros,)h(J.)f(A.)h(Hamilton,)c(D.L.)j(Nelson,)g(and) +h(B.)g(L.)f(Stumpf.)19 b Fh(The)140 2122 y(A)o(r)n(chite)n(ctur)n(e)14 +b(of)j(an)f(Inte)n(gr)n(ate)n(d)g(L)n(o)n(c)n(al)g(Network.)22 +b Fl(In)15 b Fh(IEEE)i(Journal)f(on)h(Sele)n(cte)n(d)f(A)o(r)n(e)n(as)g(in)g +(Communi-)140 2172 y(c)n(ations,)d Fm(SA)o(C-1)p Fl(\(5\),)g(pp.)h(842-856,)e +(No)o(v)o(em)o(b)q(er)h(1983.)75 2254 y([12])19 b(P)m(.)12 +b(H.)f(Levine.)16 b Fh(The)d(Ap)n(ol)r(lo)g(DOMAIN)g(Distribute)n(d)g(File)f +(System.)k Fl(In)c Fh(NA)m(TO)g(ASI)i(Series:)j(The)n(ory)c(and)140 +2304 y(Pr)n(actic)n(e)k(of)i(Distribute)n(d)f(Op)n(er)n(ating)g(Systems,)g +Fl(Y.)g(P)o(ak)o(er,)g(J-P)m(.)g(Banatre,)h(M.)e(Bozyi\024)-21 +b(git,)18 b(pp.)f(241-260,)140 2354 y(editors,)d(Springer-V)m(erlag,)f(1987.) +75 2436 y([13])19 b(J.)14 b(S.)g(P)o(endry)h(and)f(N.)g(William)o(s.)j +Fh(A)o(md)e(-)g(The)g(4.4)g(BSD)h(A)o(utomounter)p Fl(.)k(Imp)q(erial)12 +b(College)i(of)g(Science)140 2486 y(T)m(ec)o(hnology)f(and)g(Medicine,)h +(London.)f(Marc)o(h)h(1991.)75 2568 y([14])19 b(R.)14 b(Pik)o(e,)g(D.)f +(Presotto,)i(K.)f(Thompson,)f(and)h(H.)g(T)m(ric)o(k)o(ey)m(.)19 +b Fh(Plan)d(9)f(fr)n(om)g(Bel)r(l)g(L)n(abs)p Fl(.)k(In)c Fh(Pr)n(o)n(c)n(e)n +(e)n(dings)g(of)140 2618 y(the)g(Summer)f(1990)i(UKUUG)f(Conf.)p +Fl(,)e(London,)g(July)m(,)f(1990,)h(pp.)g(1-9.)75 2700 y([15])19 +b(J.)14 b(B.)g(P)o(ostel.)k(Simple)12 b(Mail)h(T)m(ransfer)h(Proto)q(col.)k +(RF)o(C)13 b(821,)g(August)h(1982;)f(68)g(p.)954 2825 y(14)p +eop +%%Page: 15 15 +bop 75 42 a Fl([16])19 b(J.)14 b(Rice.)k(In)o(teractiv)o(e)d(Mail)d(Access)k +(Proto)q(col.)i(RF)o(C)c(1203,)e(F)m(ebruary)i(1991;)f(49)g(p.)75 +125 y([17])19 b(M.)14 b(Rose.)k(P)o(ost)c(O\016ce)h(Proto)q(col.)j(RF)o(C)13 +b(1225,)f(Ma)o(y)i(1991;)e(16)h(p.)75 208 y([18])19 b(J.)f(Roseneb)q(erg,)h +(C.)f(F.)f(Ev)o(erhart,)i(and)f(N.)g(S.)f(Borenstein.)32 b +Fh(A)o(n)19 b(Overview)f(of)g(the)h(A)o(ndr)n(ew)f(Message)140 +257 y(System)p Fl(.)i(In)15 b Fh(Pr)n(o)n(c)n(e)n(e)n(dings)h(of)f(the)h(A)o +(CM)f(SIGCOMM)h('87)g(Workshop)p Fl(,)g(Sto)o(w)o(e,)e(V)m(ermon)o(t,)f +(August)j(11-13,)140 307 y(1987,)c(pp.)h(99-108.)75 390 y([19])19 +b(R.)d(Salz.)24 b Fh(InterNetNews:)e(Usenet)17 b(tr)n(ansp)n(ort)g(for)f +(Internet)h(sites)p Fl(.)24 b(In)17 b Fh(Pr)n(o)n(c.)f(1992)i(Summer)f +(USENIX)140 440 y(Conf.)p Fl(,)c(pages)h(93{98,)e(June)j(1992.)75 +523 y([20])k(R.)14 b(Sandb)q(erg)h(et)g(al.)k(Design)c(and)f(Implemen)o +(tation)e(of)i(the)h(Sun)f(Net)o(w)o(ork)h(Filesystem.)20 b(In)14 +b Fh(Pr)n(o)n(c.)h(1985)140 573 y(Summer)g(Usenix)g(Conf.)p +Fl(,)e(pages)h(119-130,)e(June)i(1985.)75 656 y([21])19 b(Sun)13 +b(Microsystems,)f(Inc.)k(SunOS)d(Reference)h(Man)o(ual,)e(V)m(olume)e(I,)i +(Section)h(1:)k(\\bi\013\(1\)",)12 b(Septem)o(b)q(er)h(9,)140 +706 y(1987.)75 789 y([22])19 b(Sun)11 b(Microsystems,)f(Inc.)j(SunOS)e +(Reference)i(Man)o(ual,)d(V)m(olume)e(I)q(I,)i(Section)h(3:)16 +b(\\syslog\(3\)",)10 b(Septem)o(b)q(er)140 839 y(9,)j(1987.)75 +922 y([23])19 b(Sun)g(Microsystems,)f(Inc.)33 b(SunOS)19 b(Reference)h(Man)o +(ual,)e(V)m(olume)f(I,)h(Section)h(1:)27 b(\\comsat\(8c\)",)18 +b(and)140 971 y(\\in.comsat\(8c\)",)11 b(Septem)o(b)q(er)k(9,)e(1987.)75 +1054 y([24])19 b(Sun)14 b(Microsystems,)f(Inc.)k(SunOS)d(Reference)h(Man)o +(ual,)d(V)m(olume)f(I,)i(Section)h(1:)j(\\xsend\(1\)",)d(\\xget\(1\)",)140 +1104 y(and)f(\\enroll\(1\)",)g(Septem)o(b)q(er)h(9,)f(1987.)75 +1187 y([25])19 b(Sun)f(Microsystems,)g(Inc.)31 b(NFS:)18 b(Net)o(w)o(ork)g +(File)g(System)f(Proto)q(col)h(sp)q(eci\014cation.)31 b(RF)o(C)17 +b(1094,)h(1989)140 1237 y(Marc)o(h;)13 b(27)h(p.)75 1320 y([26])19 +b(L.)c(W)m(all)f(and)h(R.)f(L.)h(Sc)o(h)o(w)o(artz.)23 b Fh(Pr)n(o)n(gr)n +(amming)16 b(Perl)p Fl(.)22 b(O'Reilly)14 b(&)h(Asso)q(ciates,)i(Inc.,)e +(Sebastop)q(ol,)h(CA)140 1370 y(\(1991\).)75 1453 y([27])j(R.)d(S.)g(Zac)o +(hariassen.)26 b Fh(ZMOG:)18 b(The)f(ZMailer)g(Op)n(er)n(ations)f(Guide)p +Fl(.)26 b(Av)n(ailable)15 b(via)g(ftp)i(as)f(part)h(of)e(the)140 +1503 y(ZMailer)e(distribution)h(from)e Fk(ftp.uu.net:/netwo)o(rkin)o(g/mai)o +(l/zma)o(iler)p Fl(.)75 1627 y Fj(10)56 b(Author)19 b(Information)175 +1702 y Fm(Erez)f(Zadok)e Fl(is)g(an)f(MS)h(candidate)g(and)g(full-time)d +(Sta\013)k(Asso)q(ciate)f(in)g(the)g(Computer)g(Science)h(De-)75 +1752 y(partmen)o(t)11 b(at)h(Colum)o(bia)d(Univ)o(ersit)o(y)m(.)16 +b(His)c(primary)e(in)o(terests)k(include)e(op)q(erating)f(systems,)h(\014le)g +(systems,)g(and)75 1802 y(w)o(a)o(ys)j(to)g(ease)h(system)f(administration)e +(tasks.)23 b(In)15 b(Ma)o(y)g(1991,)f(he)i(receiv)o(ed)g(his)f(B.S.)g(in)g +(Computer)g(Science)75 1852 y(from)g(Colum)o(bia's)f(Sc)o(ho)q(ol)i(of)g +(Engineering)h(and)f(Applied)h(Science.)28 b(Erez)18 b(came)e(to)g(the)i +(United)f(States)g(six)75 1902 y(y)o(ears)d(ago)e(and)i(has)f(liv)o(ed)g(in)g +(New)g(Y)m(ork)g(\\Sin")g(Cit)o(y)f(ev)o(er)j(since.)j(In)c(his)f(rare)h +(free)g(time)e(Erez)j(is)e(an)g(amateur)75 1951 y(photographer,)h(science)h +(\014ction)f(dev)o(otee,)h(and)e(ro)q(c)o(k-n-roll)g(fan.)175 +2026 y(Mailing)h(address:)25 b(500)16 b(W)m(est)h(120)747 2011 +y Fa(th)797 2026 y Fl(Street,)h(Colum)o(bia)c(Univ)o(ersit)o(y)m(,)i(New)h(Y) +m(ork,)g(NY)f(10027.)25 b(Email)75 2076 y(address:)19 b Fk +(ezk@cs.columbia.edu)o Fl(.)175 2151 y Fm(Alexander)10 b(Dupuy)g +Fl(has)h(b)q(een)h(a)e(Senior)h(Researc)o(h)i(Sta\013)e(Asso)q(ciate)h(for)e +(the)i(Distributed)f(Computing)75 2200 y(and)i(Comm)o(uni)o(cations)d(Lab)j +(in)f(the)i(Computer)e(Science)i(Departmen)o(t)f(at)f(Colum)o(bia)e(Univ)o +(ersit)o(y)j(for)g(the)g(last)75 2250 y(7)h(y)o(ears.)21 b(He)16 +b(has)f(recen)o(tly)g(tak)o(en)g(a)f(p)q(osition)h(at)f(System)g(Managemen)o +(t)g(AR)m(TS,)f(a)i(small)d(startup)k(compan)o(y)75 2300 y(dev)o(eloping)e +(net)o(w)o(ork)h(and)g(systems)g(managemen)o(t)d(tec)o(hnology)m(.)20 +b(A)15 b(nativ)o(e)g(b)q(orn)g(and)g(bred)g(New)h(Y)m(ork)o(er,)e(he)75 +2350 y(insists)g(that)g(w)o(orking)f(in)h(the)g(suburbs)h(is)f(not)g(the)g +(\014rst)h(step)g(to)o(w)o(ards)f(living)e(there.)175 2425 +y(Mailing)h(address:)23 b(System)15 b(Managemen)o(t)f(AR)m(TS,)g(199)h(Main)g +(Street,)h(Suite)g(900,)f(White)g(Plains,)g(NY)75 2474 y(10601.)i(Email)11 +b(address:)20 b Fk(dupuy@smarts.co)o(m)p Fl(.)954 2825 y(15)p +eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/doc/mdate-sh b/doc/mdate-sh new file mode 100755 index 00000000000..b3719cf7619 --- /dev/null +++ b/doc/mdate-sh @@ -0,0 +1,224 @@ +#!/bin/sh +# Get modification time of a file or directory and pretty-print it. + +scriptversion=2010-08-21.06; # UTC + +# Copyright (C) 1995-2013 Free Software Foundation, Inc. +# written by Ulrich Drepper , June 1995 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +fi + +case $1 in + '') + echo "$0: No file. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: mdate-sh [--help] [--version] FILE + +Pretty-print the modification day of FILE, in the format: +1 January 1970 + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "mdate-sh $scriptversion" + exit $? + ;; +esac + +error () +{ + echo "$0: $1" >&2 + exit 1 +} + + +# Prevent date giving response in another language. +LANG=C +export LANG +LC_ALL=C +export LC_ALL +LC_TIME=C +export LC_TIME + +# GNU ls changes its time format in response to the TIME_STYLE +# variable. Since we cannot assume 'unset' works, revert this +# variable to its documented default. +if test "${TIME_STYLE+set}" = set; then + TIME_STYLE=posix-long-iso + export TIME_STYLE +fi + +save_arg1=$1 + +# Find out how to get the extended ls output of a file or directory. +if ls -L /dev/null 1>/dev/null 2>&1; then + ls_command='ls -L -l -d' +else + ls_command='ls -l -d' +fi +# Avoid user/group names that might have spaces, when possible. +if ls -n /dev/null 1>/dev/null 2>&1; then + ls_command="$ls_command -n" +fi + +# A 'ls -l' line looks as follows on OS/2. +# drwxrwx--- 0 Aug 11 2001 foo +# This differs from Unix, which adds ownership information. +# drwxrwx--- 2 root root 4096 Aug 11 2001 foo +# +# To find the date, we split the line on spaces and iterate on words +# until we find a month. This cannot work with files whose owner is a +# user named "Jan", or "Feb", etc. However, it's unlikely that '/' +# will be owned by a user whose name is a month. So we first look at +# the extended ls output of the root directory to decide how many +# words should be skipped to get the date. + +# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. +set x`$ls_command /` + +# Find which argument is the month. +month= +command= +until test $month +do + test $# -gt 0 || error "failed parsing '$ls_command /' output" + shift + # Add another shift to the command. + command="$command shift;" + case $1 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; + esac +done + +test -n "$month" || error "failed parsing '$ls_command /' output" + +# Get the extended ls output of the file or directory. +set dummy x`eval "$ls_command \"\\\$save_arg1\""` + +# Remove all preceding arguments +eval $command + +# Because of the dummy argument above, month is in $2. +# +# On a POSIX system, we should have +# +# $# = 5 +# $1 = file size +# $2 = month +# $3 = day +# $4 = year or time +# $5 = filename +# +# On Darwin 7.7.0 and 7.6.0, we have +# +# $# = 4 +# $1 = day +# $2 = month +# $3 = year or time +# $4 = filename + +# Get the month. +case $2 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; +esac + +case $3 in + ???*) day=$1;; + *) day=$3; shift;; +esac + +# Here we have to deal with the problem that the ls output gives either +# the time of day or the year. +case $3 in + *:*) set `date`; eval year=\$$# + case $2 in + Jan) nummonthtod=1;; + Feb) nummonthtod=2;; + Mar) nummonthtod=3;; + Apr) nummonthtod=4;; + May) nummonthtod=5;; + Jun) nummonthtod=6;; + Jul) nummonthtod=7;; + Aug) nummonthtod=8;; + Sep) nummonthtod=9;; + Oct) nummonthtod=10;; + Nov) nummonthtod=11;; + Dec) nummonthtod=12;; + esac + # For the first six month of the year the time notation can also + # be used for files modified in the last year. + if (expr $nummonth \> $nummonthtod) > /dev/null; + then + year=`expr $year - 1` + fi;; + *) year=$3;; +esac + +# The result. +echo $day $month $year + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/doc/stamp-vti b/doc/stamp-vti index 41b19a30d5c..9a4feda60f5 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 20 April 2006 -@set UPDATED-MONTH April 2006 -@set EDITION 6.1.5 -@set VERSION 6.1.5 +@set UPDATED 28 October 2014 +@set UPDATED-MONTH October 2014 +@set EDITION 6.2 +@set VERSION 6.2 diff --git a/doc/texinfo.tex b/doc/texinfo.tex index e758cedae7e..85f184cc4cb 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -1,18 +1,18 @@ % texinfo.tex -- TeX macros to handle Texinfo files. -% +% % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2004-09-06.16} +\def\texinfoversion{2013-02-01.11} % -% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, -% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software -% Foundation, Inc. +% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. % -% This texinfo.tex file is free software; you can redistribute it and/or +% This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as -% published by the Free Software Foundation; either version 2, or (at -% your option) any later version. +% published by the Free Software Foundation, either version 3 of the +% License, or (at your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty @@ -20,19 +20,18 @@ % General Public License for more details. % % You should have received a copy of the GNU General Public License -% along with this texinfo.tex file; see the file COPYING. If not, write -% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -% Boston, MA 02111-1307, USA. +% along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without -% restriction. (This has been our intent since Texinfo was invented.) +% restriction. This Exception is an additional permission under section 7 +% of the GNU General Public License, version 3 ("GPLv3"). % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: -% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or -% ftp://tug.org/tex/texinfo.tex -% (and all CTAN mirrors, see http://www.ctan.org). +% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or +% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or +% http://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % @@ -67,7 +66,6 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} -\message{Basics,} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. @@ -89,15 +87,19 @@ \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent -\let\ptexnoindent=\noindent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< +\let\ptexnewwrite\newwrite +\let\ptexnoindent=\noindent \let\ptexplus=+ +\let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t +\let\ptextop=\top +{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. @@ -115,10 +117,11 @@ % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi -\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi -\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi @@ -152,20 +155,25 @@ \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi -% In some macros, we cannot use the `\? notation---the left quote is -% in some cases the escape char. +% Since the category of space is not known, we have to be careful. +\chardef\spacecat = 10 +\def\spaceisspace{\catcode`\ =\spacecat} + +% sometimes characters are active, so we need control sequences. +\chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, +\chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! +\chardef\hashChar = `\# +\chardef\lquoteChar= `\` \chardef\questChar = `\? +\chardef\rquoteChar= `\' \chardef\semiChar = `\; +\chardef\slashChar = `\/ \chardef\underChar = `\_ -\chardef\spaceChar = `\ % -\chardef\spacecat = 10 -\def\spaceisspace{\catcode\spaceChar=\spacecat} - % Ignore a token. % \def\gobble#1{} @@ -194,36 +202,7 @@ % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % -\def\finalout{\overfullrule=0pt} - -% @| inserts a changebar to the left of the current line. It should -% surround any changed text. This approach does *not* work if the -% change spans more than two lines of output. To handle that, we would -% have adopt a much more difficult approach (putting marks into the main -% vertical list for the beginning and end of each change). -% -\def\|{% - % \vadjust can only be used in horizontal mode. - \leavevmode - % - % Append this vertical mode material after the current line in the output. - \vadjust{% - % We want to insert a rule with the height and depth of the current - % leading; that is exactly what \strutbox is supposed to record. - \vskip-\baselineskip - % - % \vadjust-items are inserted at the left edge of the type. So - % the \llap here moves out into the left-hand margin. - \llap{% - % - % For a thicker or thinner bar, change the `1pt'. - \vrule height\baselineskip width1pt - % - % This is the space between the bar and the text. - \hskip 12pt - }% - }% -} +\def\finalout{\overfullrule=0pt } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, @@ -241,7 +220,7 @@ \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen - \ifx\eTeXversion\undefined\else % etex gives us more logging + \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 @@ -252,6 +231,13 @@ \errorcontextlines16 }% +% @errormsg{MSG}. Do the index-like expansions on MSG, but if things +% aren't perfect, it's not the end of the world, being an error message, +% after all. +% +\def\errormsg{\begingroup \indexnofonts \doerrormsg} +\def\doerrormsg#1{\errmessage{#1}} + % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % @@ -262,7 +248,6 @@ \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} -% For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks @@ -276,6 +261,50 @@ \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in +% Output a mark which sets \thischapter, \thissection and \thiscolor. +% We dump everything together because we only have one kind of mark. +% This works because we only use \botmark / \topmark, not \firstmark. +% +% A mark contains a subexpression of the \ifcase ... \fi construct. +% \get*marks macros below extract the needed part using \ifcase. +% +% Another complication is to let the user choose whether \thischapter +% (\thissection) refers to the chapter (section) in effect at the top +% of a page, or that at the bottom of a page. The solution is +% described on page 260 of The TeXbook. It involves outputting two +% marks for the sectioning macros, one before the section break, and +% one after. I won't pretend I can describe this better than DEK... +\def\domark{% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% + \toks4=\expandafter{\prevchapterdefs}% + \toks6=\expandafter{\prevsectiondefs}% + \toks8=\expandafter{\lastcolordefs}% + \mark{% + \the\toks0 \the\toks2 + \noexpand\or \the\toks4 \the\toks6 + \noexpand\else \the\toks8 + }% +} +% \topmark doesn't work for the very first chapter (after the title +% page or the contents), so we use \firstmark there -- this gets us +% the mark with the chapter defs, unless the user sneaks in, e.g., +% @setcolor (or @url, or @link, etc.) between @contents and the very +% first @chapter. +\def\gettopheadingmarks{% + \ifcase0\topmark\fi + \ifx\thischapter\empty \ifcase0\firstmark\fi \fi +} +\def\getbottomheadingmarks{\ifcase1\botmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} + +% Avoid "undefined control sequence" errors. +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\prevchapterdefs{} +\def\prevsectiondefs{} +\def\lastcolordefs{} + % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} @@ -293,7 +322,9 @@ % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). + \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% @@ -301,10 +332,14 @@ % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % - \escapechar = `\\ % use backslash in output files. \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if - % the page break happens to be in the middle of an example. + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi @@ -332,9 +367,9 @@ \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. - % (We lessened \vsize for it in \oddfootingxxx.) + % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. - \vskip 2\baselineskip + \vskip 24pt \unvbox\footlinebox \fi % @@ -355,7 +390,7 @@ \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox - }% end of group with \normalturnoffactive + }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } @@ -368,7 +403,7 @@ % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi -\dimen@=\dp#1 \unvbox#1 +\dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } @@ -390,7 +425,7 @@ % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% - \def\next{#2}% + \def\argtorun{#2}% \begingroup \obeylines \spaceisspace @@ -409,7 +444,7 @@ \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} -% Each occurence of `\^^M' or `\^^M' is replaced by a single space. +% Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo @@ -421,8 +456,7 @@ \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty - % We cannot use \next here, as it holds the macro to run; - % thus we reuse \temp. + % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces @@ -434,14 +468,14 @@ % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, -% just before passing the control to \next. -% (Similarily, we have to think about #3 of \argcheckspacesY above: it is +% just before passing the control to \argtorun. +% (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % -\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}} +\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to @@ -492,12 +526,12 @@ % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they -% are not treated as enviroments; they don't open a group. (The +% are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) -% At runtime, environments start with this: +% At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty @@ -515,7 +549,7 @@ \fi } -% Evironment mismatch, #1 expected: +% Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, @@ -523,7 +557,7 @@ } \def\inenvironment#1{% \ifx#1\empty - out of any environment% + outside of any environment% \else in environment \expandafter\string#1% \fi @@ -535,7 +569,7 @@ \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else - % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 + % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup @@ -545,85 +579,6 @@ \newhelp\EMsimple{Press RETURN to continue.} -%% Simple single-character @ commands - -% @@ prints an @ -% Kludge this until the fonts are right (grr). -\def\@{{\tt\char64}} - -% This is turned off because it was never documented -% and you can use @w{...} around a quote to suppress ligatures. -%% Define @` and @' to be the same as ` and ' -%% but suppressing ligatures. -%\def\`{{`}} -%\def\'{{'}} - -% Used to generate quoted braces. -\def\mylbrace {{\tt\char123}} -\def\myrbrace {{\tt\char125}} -\let\{=\mylbrace -\let\}=\myrbrace -\begingroup - % Definitions to produce \{ and \} commands for indices, - % and @{ and @} for the aux file. - \catcode`\{ = \other \catcode`\} = \other - \catcode`\[ = 1 \catcode`\] = 2 - \catcode`\! = 0 \catcode`\\ = \other - !gdef!lbracecmd[\{]% - !gdef!rbracecmd[\}]% - !gdef!lbraceatcmd[@{]% - !gdef!rbraceatcmd[@}]% -!endgroup - -% @comma{} to avoid , parsing problems. -\let\comma = , - -% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent -% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. -\let\, = \c -\let\dotaccent = \. -\def\ringaccent#1{{\accent23 #1}} -\let\tieaccent = \t -\let\ubaraccent = \b -\let\udotaccent = \d - -% Other special characters: @questiondown @exclamdown @ordf @ordm -% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. -\def\questiondown{?`} -\def\exclamdown{!`} -\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} -\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} - -% Dotless i and dotless j, used for accents. -\def\imacro{i} -\def\jmacro{j} -\def\dotless#1{% - \def\temp{#1}% - \ifx\temp\imacro \ptexi - \else\ifx\temp\jmacro \j - \else \errmessage{@dotless can be used only with i or j}% - \fi\fi -} - -% The \TeX{} logo, as in plain, but resetting the spacing so that a -% period following counts as ending a sentence. (Idea found in latex.) -% -\edef\TeX{\TeX \spacefactor=1000 } - -% @LaTeX{} logo. Not quite the same results as the definition in -% latex.ltx, since we use a different font for the raised A; it's most -% convenient for us to use an explicitly smaller font, rather than using -% the \scriptstyle font (since we don't reset \scriptstyle and -% \scriptscriptstyle). -% -\def\LaTeX{% - L\kern-.36em - {\setbox0=\hbox{T}% - \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% - \kern-.15em - \TeX -} - % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and @@ -640,19 +595,34 @@ \def\:{\spacefactor=1000 } % @* forces a line break. -\def\*{\hfil\break\hbox{}\ignorespaces} +\def\*{\unskip\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. -\def\.{.\spacefactor=3000 } +\def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. -\def\!{!\spacefactor=3000 } +\def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. -\def\?{?\spacefactor=3000 } +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. +% +\def\onword{on} +\def\offword{off} +% +\parseargdef\frenchspacing{% + \def\temp{#1}% + \ifx\temp\onword \plainfrenchspacing + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp = \EMsimple + \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% + \fi\fi +} % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would @@ -732,15 +702,6 @@ where each line of input produces a line of output.} \newdimen\mil \mil=0.001in -% Old definition--didn't work. -%\parseargdef\need{\par % -%% This method tries to make TeX break the page naturally -%% if the depth of the box does not fit. -%{\baselineskip=0pt% -%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak -%\prevdepth=-1000pt -%}} - \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. @@ -804,7 +765,7 @@ where each line of input produces a line of output.} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion -% class. WHICH is `l' or `r'. +% class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} @@ -851,15 +812,51 @@ where each line of input produces a line of output.} \temp } -% @include file insert text of that file as input. +% @| inserts a changebar to the left of the current line. It should +% surround any changed text. This approach does *not* work if the +% change spans more than two lines of output. To handle that, we would +% have adopt a much more difficult approach (putting marks into the main +% vertical list for the beginning and end of each change). This command +% is not documented, not supported, and doesn't work. +% +\def\|{% + % \vadjust can only be used in horizontal mode. + \leavevmode + % + % Append this vertical mode material after the current line in the output. + \vadjust{% + % We want to insert a rule with the height and depth of the current + % leading; that is exactly what \strutbox is supposed to record. + \vskip-\baselineskip + % + % \vadjust-items are inserted at the left edge of the type. So + % the \llap here moves out into the left-hand margin. + \llap{% + % + % For a thicker or thinner bar, change the `1pt'. + \vrule height\baselineskip width1pt + % + % This is the space between the bar and the text. + \hskip 12pt + }% + }% +} + +% @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% - \makevalueexpandable - \def\temp{\input #1 }% + \makevalueexpandable % we want to expand any @value in FILE. + \turnoffactive % and allow special characters in the expansion + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @include of #1^^J}% + \edef\temp{\noexpand\input #1 }% + % + % This trickery is to read FILE outside of a group, in case it makes + % definitions, etc. \expandafter }\temp \popthisfilestack @@ -874,6 +871,8 @@ where each line of input produces a line of output.} \catcode`>=\other \catcode`+=\other \catcode`-=\other + \catcode`\`=\other + \catcode`\'=\other } \def\pushthisfilestack{% @@ -889,7 +888,7 @@ where each line of input produces a line of output.} \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} - +% \def\thisfile{} % @center line @@ -897,36 +896,46 @@ where each line of input produces a line of output.} % \parseargdef\center{% \ifhmode - \let\next\centerH + \let\centersub\centerH \else - \let\next\centerV + \let\centersub\centerV \fi - \next{\hfil \ignorespaces#1\unskip \hfil}% + \centersub{\hfil \ignorespaces#1\unskip \hfil}% + \let\centersub\relax % don't let the definition persist, just in case } -\def\centerH#1{% - {% - \hfil\break - \advance\hsize by -\leftskip - \advance\hsize by -\rightskip - \line{#1}% - \break - }% +\def\centerH#1{{% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break +}} +% +\newcount\centerpenalty +\def\centerV#1{% + % The idea here is the same as in \startdefun, \cartouche, etc.: if + % @center is the first thing after a section heading, we need to wipe + % out the negative parskip inserted by \sectionheading, but still + % prevent a page break here. + \centerpenalty = \lastpenalty + \ifnum\centerpenalty>10000 \vskip\parskip \fi + \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi + \line{\kern\leftskip #1\kern\rightskip}% } -\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space - +% \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment - +% \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} - +% \let\c=\comment % @paragraphindent NCHARS @@ -1019,86 +1028,6 @@ where each line of input produces a line of output.} } -% @asis just yields its argument. Used with @table, for example. -% -\def\asis#1{#1} - -% @math outputs its argument in math mode. -% -% One complication: _ usually means subscripts, but it could also mean -% an actual _ character, as in @math{@var{some_variable} + 1}. So make -% _ active, and distinguish by seeing if the current family is \slfam, -% which is what @var uses. -{ - \catcode\underChar = \active - \gdef\mathunderscore{% - \catcode\underChar=\active - \def_{\ifnum\fam=\slfam \_\else\sb\fi}% - } -} -% Another complication: we want \\ (and @\) to output a \ character. -% FYI, plain.tex uses \\ as a temporary control sequence (why?), but -% this is not advertised and we don't care. Texinfo does not -% otherwise define @\. -% -% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. -\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} -% -\def\math{% - \tex - \mathunderscore - \let\\ = \mathbackslash - \mathactive - $\finishmath -} -\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. - -% Some active characters (such as <) are spaced differently in math. -% We have to reset their definitions in case the @math was an argument -% to a command which sets the catcodes (such as @item or @section). -% -{ - \catcode`^ = \active - \catcode`< = \active - \catcode`> = \active - \catcode`+ = \active - \gdef\mathactive{% - \let^ = \ptexhat - \let< = \ptexless - \let> = \ptexgtr - \let+ = \ptexplus - } -} - -% @bullet and @minus need the same treatment as @math, just above. -\def\bullet{$\ptexbullet$} -\def\minus{$-$} - -% @dots{} outputs an ellipsis using the current font. -% We do .5em per period so that it has the same spacing in a typewriter -% font as three actual period characters. -% -\def\dots{% - \leavevmode - \hbox to 1.5em{% - \hskip 0pt plus 0.25fil - .\hfil.\hfil.% - \hskip 0pt plus 0.5fil - }% -} - -% @enddots{} is an end-of-sentence ellipsis. -% -\def\enddots{% - \dots - \spacefactor=3000 -} - -% @comma{} is so commas can be inserted into text without messing up -% Texinfo's parsing. -% -\let\comma = , - % @refill is a no-op. \let\refill=\relax @@ -1163,9 +1092,8 @@ where each line of input produces a line of output.} \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 -% can be set). So we test for \relax and 0 as well as \undefined, -% borrowed from ifpdf.sty. -\ifx\pdfoutput\undefined +% can be set). So we test for \relax and 0 as well as being undefined. +\ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else @@ -1175,40 +1103,157 @@ where each line of input produces a line of output.} \fi \fi \fi -% + +% PDF uses PostScript string constants for the names of xref targets, +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. +% +% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and +% related messages. The final outcome is that it is up to the TeX user +% to double the backslashes and otherwise make the string valid, so +% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to +% do this reliably, so we use it. + +% #1 is a control sequence in which to do the replacements, +% which we \xdef. +\def\txiescapepdf#1{% + \ifx\pdfescapestring\thisisundefined + % No primitive available; should we give a warning or log? + % Many times it won't matter. + \else + % The expandable \pdfescapestring primitive escapes parentheses, + % backslashes, and other special chars. + \xdef#1{\pdfescapestring{#1}}% + \fi +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + \ifpdf - \input pdfcolor - \pdfcatalog{/PageMode /UseOutlines}% + % + % Color manipulation macros based on pdfcolor.tex, + % except using rgb instead of cmyk; the latter is said to render as a + % very dark gray on-screen and a very dark halftone in print, instead + % of actual black. + \def\rgbDarkRed{0.50 0.09 0.12} + \def\rgbBlack{0 0 0} + % + % k sets the color for filling (usual text, etc.); + % K sets the color for stroking (thin rules, e.g., normal _'s). + \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} + % + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\rgbBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip + } + % + % + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% - \def\imagewidth{#2}% - \def\imageheight{#3}% - % without \immediate, pdftex seg faults when the same image is + \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \else \gdef\pdfimgext{PDF}% + \fi + \else \gdef\pdfimgext{pdf}% + \fi + \closein 1 + \endgroup + % + % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi - \ifx\empty\imagewidth\else width \imagewidth \fi - \ifx\empty\imageheight\else height \imageheight \fi + \ifdim \wd0 >0pt width \pdfimagewidth \fi + \ifdim \wd2 >0pt height \pdfimageheight \fi \ifnum\pdftexversion<13 - #1.pdf% + #1.\pdfimgext \else - {#1.pdf}% + {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} + % \def\pdfmkdest#1{{% - % We have to set dummies so commands such as @code in a section title - % aren't expanded. - \atdummies - \normalturnoffactive - \pdfdest name{#1} xyz% + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. + \indexnofonts + \turnoffactive + \makevalueexpandable + \def\pdfdestname{#1}% + \txiescapepdf\pdfdestname + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} + % + % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} - \let\linkcolor = \Blue % was Cyan, but that seems light? - \def\endlink{\Black\pdfendlink} + % + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. + \def\urlcolor{\rgbDarkRed} + \def\linkcolor{\rgbDarkRed} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% @@ -1217,38 +1262,44 @@ where each line of input produces a line of output.} \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % - % #1 is the section text. #2 is the pdf expression for the number - % of subentries (or empty, for subsubsections). #3 is the node - % text, which might be empty if this toc entry had no - % corresponding node. #4 is the page number. + % #1 is the section text, which is what will be displayed in the + % outline by the pdf viewer. #2 is the pdf expression for the number + % of subentries (or empty, for subsubsections). #3 is the node text, + % which might be empty if this toc entry had no corresponding node. + % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't - % seem worthwhile, since most documents are normally structured. - \def\pdfoutlinedest{#3}% - \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi + % seem worth the trouble, since most documents are normally structured. + \edef\pdfoutlinedest{#3}% + \ifx\pdfoutlinedest\empty + \def\pdfoutlinedest{#4}% + \else + \txiescapepdf\pdfoutlinedest + \fi % - \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}% + % Also escape PDF chars in the display string. + \edef\pdfoutlinetext{#1}% + \txiescapepdf\pdfoutlinetext + % + \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup - % Thanh's hack / proper braces in bookmarks - \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace - \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace - % % Read toc silently, to get counts of subentries for \pdfoutline. + \def\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% - \let\thissecnum\empty - \let\thissubsecnum\empty + \def\thissecnum{0}% + \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% - \let\thissubsecnum\empty + \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% @@ -1257,9 +1308,9 @@ where each line of input produces a line of output.} \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% - \let\thischapnum\empty - \let\thissecnum\empty - \let\thissubsecnum\empty + \def\thischapnum{0}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. @@ -1271,7 +1322,7 @@ where each line of input produces a line of output.} \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% - \input \jobname.toc + \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of @@ -1293,64 +1344,63 @@ where each line of input produces a line of output.} % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % - % xx to do this right, we have to translate 8-bit characters to - % their "best" equivalent, based on the @documentencoding. Right - % now, I guess we'll just let the pdf reader have its way. + % TODO this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Too + % much work for too little return. Just use the ASCII equivalents + % we use for the index sort strings. + % \indexnofonts - \turnoffactive - \input \jobname.toc + \setupdatafile + % We can have normal brace characters in the PDF outlines, unlike + % Texinfo index files. So set that up. + \def\{{\lbracecharliteral}% + \def\}{\rbracecharliteral}% + \catcode`\\=\active \otherbackslash + \input \tocreadfilename \endgroup } + {\catcode`[=1 \catcode`]=2 + \catcode`{=\other \catcode`}=\other + \gdef\lbracecharliteral[{]% + \gdef\rbracecharliteral[}]% + ] % - \def\makelinks #1,{% - \def\params{#1}\def\E{END}% - \ifx\params\E - \let\nextmakelinks=\relax - \else - \let\nextmakelinks=\makelinks - \ifnum\lnkcount>0,\fi - \picknum{#1}% - \startlink attr{/Border [0 0 0]} - goto name{\pdfmkpgn{\the\pgn}}% - \linkcolor #1% - \advance\lnkcount by 1% - \endlink - \fi - \nextmakelinks - } - \def\picknum#1{\expandafter\pn#1} - \def\pn#1{% - \def\p{#1}% - \ifx\p\lbrace - \let\nextpn=\ppn - \else - \let\nextpn=\ppnn - \def\first{#1} - \fi - \nextpn - } - \def\ppn#1{\pgn=#1\gobble} - \def\ppnn{\pgn=\first} - \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces - \ifx\p\space\else\addtokens{\filename}{\PP}% - \advance\filenamelength by 1 - \fi + \addtokens{\filename}{\PP}% + \advance\filenamelength by 1 \fi \nextsp} - \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} + \def\getfilename#1{% + \filenamelength=0 + % If we don't expand the argument now, \skipspaces will get + % snagged on things like "@value{foo}". + \edef\temp{#1}% + \expandafter\skipspaces\temp|\relax + } \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi + % make a live url in pdf output. \def\pdfurl#1{% \begingroup - \normalturnoffactive\def\@{@}% + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty \makevalueexpandable - \leavevmode\Red + % do we want to go so far as to use \indexnofonts instead of just + % special-casing \var here? + \def\var##1{##1}% + % + \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} @@ -1377,13 +1427,15 @@ where each line of input produces a line of output.} {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} - \linkcolor #1\endlink} + \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else + % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax - \let\linkcolor = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput @@ -1406,9 +1458,13 @@ where each line of input produces a line of output.} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} -\def\bf{\fam=\bffam \setfontstyle{bf}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} +% Unfortunately, we have to override this for titles and the like, since +% in those cases "rm" is bold. Sigh. +\def\rmisbold{\rm\def\curfontstyle{bf}} + % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam @@ -1418,8 +1474,6 @@ where each line of input produces a line of output.} % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} -% Default leading. -\newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers @@ -1429,8 +1483,13 @@ where each line of input produces a line of output.} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % +% can get a sort of poor man's double spacing by redefining this. +\def\baselinefactor{1} +% +\newdimen\textleading \def\setleading#1{% - \normalbaselineskip = #1\relax + \dimen0 = #1\relax + \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% @@ -1439,20 +1498,295 @@ where each line of input produces a line of output.} }% } -% Set the font macro #1 to the font named #2, adding on the -% specified font prefix (normally `cm'). -% #3 is the font's design size, #4 is a scale factor -\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} +% PDF CMaps. See also LaTeX's t1.cmap. +% +% do nothing with this by default. +\expandafter\let\csname cmapOT1\endcsname\gobble +\expandafter\let\csname cmapOT1IT\endcsname\gobble +\expandafter\let\csname cmapOT1TT\endcsname\gobble + +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) +\ifpdf \ifx\pdffontattr\thisisundefined \else + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\fi\fi + + +% Set the font macro #1 to the font named \fontprefix#2. +% #3 is the font's design size, #4 is a scale factor, #5 is the CMap +% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). +% Example: +% #1 = \textrm +% #2 = \rmshape +% #3 = 10 +% #4 = \mainmagstep +% #5 = OT1 +% +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble +% +% (end of cmaps) % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. -\ifx\fontprefix\undefined +\ifx\fontprefix\thisisundefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} -\def\rmbshape{bx} %where the normal face is bold +\def\rmbshape{bx} % where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} @@ -1467,118 +1801,291 @@ where each line of input produces a line of output.} \def\scshape{csc} \def\scbshape{csc} +% Definitions for a main text size of 11pt. (The default in Texinfo.) +% +\def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). -\newcount\mainmagstep -\ifx\bigger\relax - % not really supported. - \mainmagstep=\magstep1 - \setfont\textrm\rmshape{12}{1000} - \setfont\texttt\ttshape{12}{1000} -\else - \mainmagstep=\magstephalf - \setfont\textrm\rmshape{10}{\mainmagstep} - \setfont\texttt\ttshape{10}{\mainmagstep} -\fi -\setfont\textbf\bfshape{10}{\mainmagstep} -\setfont\textit\itshape{10}{\mainmagstep} -\setfont\textsl\slshape{10}{\mainmagstep} -\setfont\textsf\sfshape{10}{\mainmagstep} -\setfont\textsc\scshape{10}{\mainmagstep} -\setfont\textttsl\ttslshape{10}{\mainmagstep} +\def\textnominalsize{11pt} +\edef\mainmagstep{\magstephalf} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1095} % A few fonts for @defun names and args. -\setfont\defbf\bfshape{10}{\magstep1} -\setfont\deftt\ttshape{10}{\magstep1} -\setfont\defttsl\ttslshape{10}{\magstep1} +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). -\setfont\smallrm\rmshape{9}{1000} -\setfont\smalltt\ttshape{9}{1000} -\setfont\smallbf\bfshape{10}{900} -\setfont\smallit\itshape{9}{1000} -\setfont\smallsl\slshape{9}{1000} -\setfont\smallsf\sfshape{9}{1000} -\setfont\smallsc\scshape{10}{900} -\setfont\smallttsl\ttslshape{10}{900} +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 +\def\smallecsize{0900} % Fonts for small examples (8pt). -\setfont\smallerrm\rmshape{8}{1000} -\setfont\smallertt\ttshape{8}{1000} -\setfont\smallerbf\bfshape{10}{800} -\setfont\smallerit\itshape{8}{1000} -\setfont\smallersl\slshape{8}{1000} -\setfont\smallersf\sfshape{8}{1000} -\setfont\smallersc\scshape{10}{800} -\setfont\smallerttsl\ttslshape{10}{800} +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 +\def\smallerecsize{0800} % Fonts for title page (20.4pt): -\setfont\titlerm\rmbshape{12}{\magstep3} -\setfont\titleit\itbshape{10}{\magstep4} -\setfont\titlesl\slbshape{10}{\magstep4} -\setfont\titlett\ttbshape{12}{\magstep3} -\setfont\titlettsl\ttslshape{10}{\magstep4} -\setfont\titlesf\sfbshape{17}{\magstep1} +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm -\setfont\titlesc\scbshape{10}{\magstep4} +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 -\def\authorrm{\secrm} -\def\authortt{\sectt} +\def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). -\setfont\chaprm\rmbshape{12}{\magstep2} -\setfont\chapit\itbshape{10}{\magstep3} -\setfont\chapsl\slbshape{10}{\magstep3} -\setfont\chaptt\ttbshape{12}{\magstep2} -\setfont\chapttsl\ttslshape{10}{\magstep3} -\setfont\chapsf\sfbshape{17}{1000} +\def\chapnominalsize{17pt} +\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm -\setfont\chapsc\scbshape{10}{\magstep3} +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 +\def\chapecsize{1728} % Section fonts (14.4pt). -\setfont\secrm\rmbshape{12}{\magstep1} -\setfont\secit\itbshape{10}{\magstep2} -\setfont\secsl\slbshape{10}{\magstep2} -\setfont\sectt\ttbshape{12}{\magstep1} -\setfont\secttsl\ttslshape{10}{\magstep2} -\setfont\secsf\sfbshape{12}{\magstep1} +\def\secnominalsize{14pt} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm -\setfont\secsc\scbshape{10}{\magstep2} +\setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 +\def\sececsize{1440} % Subsection fonts (13.15pt). -\setfont\ssecrm\rmbshape{12}{\magstephalf} -\setfont\ssecit\itbshape{10}{1315} -\setfont\ssecsl\slbshape{10}{1315} -\setfont\ssectt\ttbshape{12}{\magstephalf} -\setfont\ssecttsl\ttslshape{10}{1315} -\setfont\ssecsf\sfbshape{12}{\magstephalf} +\def\ssecnominalsize{13pt} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm -\setfont\ssecsc\scbshape{10}{1315} +\setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 +\def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). -\setfont\reducedrm\rmshape{10}{1000} -\setfont\reducedtt\ttshape{10}{1000} -\setfont\reducedbf\bfshape{10}{1000} -\setfont\reducedit\itshape{10}{1000} -\setfont\reducedsl\slshape{10}{1000} -\setfont\reducedsf\sfshape{10}{1000} -\setfont\reducedsc\scshape{10}{1000} -\setfont\reducedttsl\ttslshape{10}{1000} +\def\reducednominalsize{10pt} +\setfont\reducedrm\rmshape{10}{1000}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 +\def\reducedecsize{1000} + +\textleading = 13.2pt % line spacing for 11pt CM +\textfonts % reset the current fonts +\rm +} % end of 11pt text font size definitions, \definetextfontsizexi + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1000} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\titleecsize{2074} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 +\def\chapecsize{1440} + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} +\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 +\def\ssececsize{1000} + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 +\def\reducedecsize{0900} + +\divide\parskip by 2 % reduce space between paragraphs +\textleading = 12pt % line spacing for 10pt CM +\textfonts % reset the current fonts +\rm +} % end of 10pt text font size definitions, \definetextfontsizex + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +% +\def\xiword{11} +\def\xword{10} +\def\xwordpt{10pt} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + %\wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} + \fi\fi + \endgroup +} + % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since @@ -1608,6 +2115,7 @@ where each line of input produces a line of output.} \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl + \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% @@ -1615,13 +2123,16 @@ where each line of input produces a line of output.} \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl + \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% - \resetmathfonts \setleading{25pt}} -\def\titlefont#1{{\titlefonts\rm #1}} + \resetmathfonts \setleading{27pt}} +\def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc - \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl + \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy + \let\tenttsl=\chapttsl + \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% @@ -1629,6 +2140,7 @@ where each line of input produces a line of output.} \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl + \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% @@ -1636,6 +2148,7 @@ where each line of input produces a line of output.} \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl + \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts @@ -1644,6 +2157,7 @@ where each line of input produces a line of output.} \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl + \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% @@ -1651,6 +2165,7 @@ where each line of input produces a line of output.} \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl + \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% @@ -1658,9 +2173,20 @@ where each line of input produces a line of output.} \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl + \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} +% Fonts for short table of contents. +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +% Define these just so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts @@ -1674,55 +2200,219 @@ where each line of input produces a line of output.} % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 -% -% I wish the USA used A4 paper. % --karl, 24jan03. - % Set up the default fonts, so we can use them for creating boxes. % -\textfonts \rm +\definetextfontsizexi -% Define these so they can be easily changed for other fonts. -\def\angleleft{$\langle$} -\def\angleright{$\rangle$} + +\message{markup,} + +% Check if we are currently using a typewriter font. Since all the +% Computer Modern typewriter fonts have zero interword stretch (and +% shrink), and it is reasonable to expect all typewriter fonts to have +% this property, we can check that font parameter. +% +\def\ifmonospace{\ifdim\fontdimen3\font=0pt } + +% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will +% define and register \INITMACRO to be called on markup style changes. +% \INITMACRO can check \currentmarkupstyle for the innermost +% style and the set of \ifmarkupSTYLE switches for all styles +% currently in effect. +\newif\ifmarkupvar +\newif\ifmarkupsamp +\newif\ifmarkupkey +%\newif\ifmarkupfile % @file == @samp. +%\newif\ifmarkupoption % @option == @samp. +\newif\ifmarkupcode +\newif\ifmarkupkbd +%\newif\ifmarkupenv % @env == @code. +%\newif\ifmarkupcommand % @command == @code. +\newif\ifmarkuptex % @tex (and part of @math, for now). +\newif\ifmarkupexample +\newif\ifmarkupverb +\newif\ifmarkupverbatim + +\let\currentmarkupstyle\empty + +\def\setupmarkupstyle#1{% + \csname markup#1true\endcsname + \def\currentmarkupstyle{#1}% + \markupstylesetup +} + +\let\markupstylesetup\empty + +\def\defmarkupstylesetup#1{% + \expandafter\def\expandafter\markupstylesetup + \expandafter{\markupstylesetup #1}% + \def#1% +} + +% Markup style setup for left and right quotes. +\defmarkupstylesetup\markupsetuplq{% + \expandafter\let\expandafter \temp + \csname markupsetuplq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuplqdefault \else \temp \fi +} + +\defmarkupstylesetup\markupsetuprq{% + \expandafter\let\expandafter \temp + \csname markupsetuprq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuprqdefault \else \temp \fi +} + +{ +\catcode`\'=\active +\catcode`\`=\active + +\gdef\markupsetuplqdefault{\let`\lq} +\gdef\markupsetuprqdefault{\let'\rq} + +\gdef\markupsetcodequoteleft{\let`\codequoteleft} +\gdef\markupsetcodequoteright{\let'\codequoteright} +} + +\let\markupsetuplqcode \markupsetcodequoteleft +\let\markupsetuprqcode \markupsetcodequoteright +% +\let\markupsetuplqexample \markupsetcodequoteleft +\let\markupsetuprqexample \markupsetcodequoteright +% +\let\markupsetuplqkbd \markupsetcodequoteleft +\let\markupsetuprqkbd \markupsetcodequoteright +% +\let\markupsetuplqsamp \markupsetcodequoteleft +\let\markupsetuprqsamp \markupsetcodequoteright +% +\let\markupsetuplqverb \markupsetcodequoteleft +\let\markupsetuprqverb \markupsetcodequoteright +% +\let\markupsetuplqverbatim \markupsetcodequoteleft +\let\markupsetuprqverbatim \markupsetcodequoteright + +% Allow an option to not use regular directed right quote/apostrophe +% (char 0x27), but instead the undirected quote from cmtt (char 0x0d). +% The undirected quote is ugly, so don't make it the default, but it +% works for pasting with more pdf viewers (at least evince), the +% lilypond developers report. xpdf does work with the regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + % [Knuth] pp. 380,381,391 + % \relax disables Spanish ligatures ?` and !` of \tt font. + \relax`% + \else \char'22 \fi + \else \char'22 \fi +} + +% Commands to set the quote options. +% +\parseargdef\codequoteundirected{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% + \fi\fi +} +% +\parseargdef\codequotebacktick{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% + \fi\fi +} + +% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. +\def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 -% Fonts for short table of contents. -\setfont\shortcontrm\rmshape{12}{1000} -\setfont\shortcontbf\bfshape{10}{\magstep1} % no cmb12 -\setfont\shortcontsl\slshape{12}{1000} -\setfont\shortconttt\ttshape{12}{1000} +% Font commands. -%% Add scribe-like font environments, plus @l for inline lisp (usually sans -%% serif) and @ii for TeX italic +% #1 is the font command (\sl or \it), #2 is the text to slant. +% If we are in a monospaced environment, however, 1) always use \ttsl, +% and 2) do not add an italic correction. +\def\dosmartslant#1#2{% + \ifusingtt + {{\ttsl #2}\let\next=\relax}% + {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% + \next +} +\def\smartslanted{\dosmartslant\sl} +\def\smartitalic{\dosmartslant\it} -% \smartitalic{ARG} outputs arg in italics, followed by an italic correction -% unless the following character is such as not to need one. -\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else - \ptexslash\fi\fi\fi} -\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} -\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} +% Output an italic correction unless \next (presumed to be the following +% character) is such as not to need one. +\def\smartitaliccorrection{% + \ifx\next,% + \else\ifx\next-% + \else\ifx\next.% + \else\ptexslash + \fi\fi\fi + \aftersmartic +} -% like \smartslanted except unconditionally uses \ttsl. -% @var is set to this for defun arguments. -\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} +% Unconditional use \ttsl, and no ic. @var is set to this for defuns. +\def\ttslanted#1{{\ttsl #1}} -% like \smartslanted except unconditionally use \sl. We never want +% @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? -\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} +\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} + +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} \let\i=\smartitalic \let\slanted=\smartslanted -\let\var=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic +% Explicit font changes: @r, @sc, undocumented @ii. +\def\r#1{{\rm #1}} % roman font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b +% @sansserif, explicit sans. +\def\sansserif#1{{\sf #1}} + % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. @@ -1735,35 +2425,34 @@ where each line of input produces a line of output.} % sometimes \x has an active definition that messes things up. % \catcode`@=11 - \def\frenchspacing{% + \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m + \def\endofsentencespacefactor{1000}% for @. and friends + } + \def\plainnonfrenchspacing{% + \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 + \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 + \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other +\def\endofsentencespacefactor{3000}% default +% @t, explicit typewriter. \def\t#1{% - {\tt \rawbackslash \frenchspacing #1}% + {\tt \rawbackslash \plainfrenchspacing #1}% \null } -\def\samp#1{`\tclose{#1}'\null} -\setfont\keyrm\rmshape{8}{1000} -\font\keysy=cmsy9 -\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% - \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% - \vbox{\hrule\kern-0.4pt - \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% - \kern-0.4pt\hrule}% - \kern-.06em\raise0.4pt\hbox{\angleright}}}} -% The old definition, with no lozenge: -%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} -\def\ctrl #1{{\tt \rawbackslash \hat}#1} -% @file, @option are the same as @samp. -\let\file=\samp -\let\option=\samp +% @samp. +\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} -% @code is a modification of @t, -% which makes spaces the same size as normal in the surrounding text. +% @indicateurl is \samp, that is, with quotes. +\let\indicateurl=\samp + +% @code (and similar) prints in typewriter, but with spaces the same +% size as normal in the surrounding text, without hyphenation, etc. +% This is a subroutine for that. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. @@ -1779,33 +2468,44 @@ where each line of input produces a line of output.} \nohyphenation % \rawbackslash - \frenchspacing + \plainfrenchspacing #1% }% - \null + \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. - +% % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { - \catcode`\-=\active - \catcode`\_=\active + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active + \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup - \catcode`\-=\active \let-\codedash - \catcode`\_=\active \let_\codeunder + \setupmarkupstyle{code}% + % The following should really be moved into \setupmarkupstyle handlers. + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash + \let_\codeunder + \else + \let-\normaldash + \let_\realunder + \fi \codex } } -\def\realdash{-} +\def\codex #1{\tclose{#1}\endgroup} + +\def\normaldash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ @@ -1818,53 +2518,44 @@ where each line of input produces a line of output.} \discretionary{}{}{}}% {\_}% } -\def\codex #1{\tclose{#1}\endgroup} -% @kbd is like @code, except that if the argument is just one @key command, -% then @kbd has no effect. +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is bad. +% @allowcodebreaks provides a document-level way to turn breaking at - +% and _ on and off. +% +\newif\ifallowcodebreaks \allowcodebreakstrue -% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), -% `example' (@kbd uses ttsl only inside of @example and friends), -% or `code' (@kbd uses normal tty font always). -\parseargdef\kbdinputstyle{% - \def\arg{#1}% - \ifx\arg\worddistinct - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% - \else\ifx\arg\wordexample - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% - \else\ifx\arg\wordcode - \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% +\def\keywordtrue{true} +\def\keywordfalse{false} + +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue + \allowcodebreakstrue + \else\ifx\txiarg\keywordfalse + \allowcodebreaksfalse \else \errhelp = \EMsimple - \errmessage{Unknown @kbdinputstyle option `\arg'}% - \fi\fi\fi + \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% + \fi\fi } -\def\worddistinct{distinct} -\def\wordexample{example} -\def\wordcode{code} -% Default is `distinct.' -\kbdinputstyle distinct - -\def\xkey{\key} -\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% -\ifx\one\xkey\ifx\threex\three \key{#2}% -\else{\tclose{\kbdfont\look}}\fi -\else{\tclose{\kbdfont\look}}\fi} - -% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. -\let\indicateurl=\code -\let\env=\code +% For @command, @env, @file, @option quotes seem unnecessary, +% so use \code rather than \samp. \let\command=\code +\let\env=\code +\let\file=\code +\let\option=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url -% itself. First (mandatory) arg is the url. Perhaps eventually put in -% a hypertex \special here. -% -\def\uref#1{\douref #1,,,\finish} -\def\douref#1,#2,#3,#4\finish{\begingroup +% itself. First (mandatory) arg is the url. +% (This \urefnobreak definition isn't used now, leaving it for a while +% for comparison.) +\def\urefnobreak#1{\dourefnobreak #1,,,\finish} +\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% @@ -1885,6 +2576,103 @@ where each line of input produces a line of output.} \endlink \endgroup} +% This \urefbreak definition is the active one. +\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} +\let\uref=\urefbreak +\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} +\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url + \fi + \else + \urefcode{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% Allow line breaks around only a few characters (only). +\def\urefcatcodes{% + \catcode\ampChar=\active \catcode\dotChar=\active + \catcode\hashChar=\active \catcode\questChar=\active + \catcode\slashChar=\active +} +{ + \urefcatcodes + % + \global\def\urefcode{\begingroup + \setupmarkupstyle{code}% + \urefcatcodes + \let&\urefcodeamp + \let.\urefcodedot + \let#\urefcodehash + \let?\urefcodequest + \let/\urefcodeslash + \codex + } + % + % By default, they are just regular characters. + \global\def&{\normalamp} + \global\def.{\normaldot} + \global\def#{\normalhash} + \global\def?{\normalquest} + \global\def/{\normalslash} +} + +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretch{\urefprebreak \hskip0pt plus.13em } +\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } +% +\def\urefcodeamp{\urefprestretch \&\urefpoststretch} +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequest{\urefprestretch ?\urefpoststretch} +\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} +{ + \catcode`\/=\active + \global\def\urefcodeslashfinish{% + \urefprestretch \slashChar + % Allow line break only after the final / in a sequence of + % slashes, to avoid line break between the slashes in http://. + \ifx\next/\else \urefpoststretch \fi + } +} + +% One more complication: by default we'll break after the special +% characters, but some people like to break before the special chars, so +% allow that. Also allow no breaking at all, for manual control. +% +\parseargdef\urefbreakstyle{% + \def\txiarg{#1}% + \ifx\txiarg\wordnone + \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordbefore + \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordafter + \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} + \else + \errhelp = \EMsimple + \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\wordafter{after} +\def\wordbefore{before} +\def\wordnone{none} + +\urefbreakstyle after + % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref @@ -1906,34 +2694,81 @@ where each line of input produces a line of output.} \let\email=\uref \fi -% Check if we are currently using a typewriter font. Since all the -% Computer Modern typewriter fonts have zero interword stretch (and -% shrink), and it is reasonable to expect all typewriter fonts to have -% this property, we can check that font parameter. +% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +% `example' (@kbd uses ttsl only inside of @example and friends), +% or `code' (@kbd uses normal tty font always). +\parseargdef\kbdinputstyle{% + \def\txiarg{#1}% + \ifx\txiarg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% + \else\ifx\txiarg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% + \else\ifx\txiarg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\worddistinct{distinct} +\def\wordexample{example} +\def\wordcode{code} + +% Default is `distinct'. +\kbdinputstyle distinct + +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. +\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} + +\def\xkey{\key} +\def\kbdsub#1#2#3\par{% + \def\one{#1}\def\three{#3}\def\threex{??}% + \ifx\one\xkey\ifx\threex\three \key{#2}% + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +} + +% definition of @key that produces a lozenge. Doesn't adjust to text size. +%\setfont\keyrm\rmshape{8}{1000}{OT1} +%\font\keysy=cmsy9 +%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +% \vbox{\hrule\kern-0.4pt +% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +% \kern-0.4pt\hrule}% +% \kern-.06em\raise0.4pt\hbox{\angleright}}}} + +% definition of @key with no lozenge. If the current font is already +% monospace, don't change it; that way, we respect @kbdinputstyle. But +% if it isn't monospace, then use \tt. % -\def\ifmonospace{\ifdim\fontdimen3\font=0pt } +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} + +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} + +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} -\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} - % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} -% Explicit font changes: @r, @sc, undocumented @ii. -\def\r#1{{\rm #1}} % roman font -\def\sc#1{{\smallcaps#1}} % smallcaps font -\def\ii#1{{\it #1}} % italic font - % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. -% +% \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% @@ -1941,24 +2776,392 @@ where each line of input produces a line of output.} \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. -% +% \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% - {\frenchspacing #1}% + {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi + \null % reset \spacefactor=1000 } +% @asis just yields its argument. Used with @table, for example. +% +\def\asis#1{#1} + +% @math outputs its argument in math mode. +% +% One complication: _ usually means subscripts, but it could also mean +% an actual _ character, as in @math{@var{some_variable} + 1}. So make +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} +% Another complication: we want \\ (and @\) to output a math (or tt) \. +% FYI, plain.tex uses \\ as a temporary control sequence (for no +% particular reason), but this is not advertised and we don't care. +% +% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. +\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} +% +\def\math{% + \tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. + +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \catcode`' = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + \let' = \ptexquoteright + } +} + +% ctrl is no longer a Texinfo command, but leave this definition for fun. +\def\ctrl #1{{\tt \rawbackslash \hat}#1} + +% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. +% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, +% except specified as a normal braced arg, so no newlines to worry about. +% +\def\outfmtnametex{tex} +% +\long\def\inlinefmt#1{\doinlinefmt #1,\finish} +\long\def\doinlinefmt#1,#2,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi +} +% For raw, must switch into @tex before parsing the argument, to avoid +% setting catcodes prematurely. Doing it this way means that, for +% example, @inlineraw{html, foo{bar} gets a parse error instead of being +% ignored. But this isn't important because if people want a literal +% *right* brace they would have to use a command anyway, so they may as +% well use a command to get a left brace too. We could re-use the +% delimiter character idea from \verb, but it seems like overkill. +% +\long\def\inlineraw{\tex \doinlineraw} +\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} +\def\doinlinerawtwo#1,#2,\finish{% + \def\inlinerawname{#1}% + \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi + \endgroup % close group opened by \tex. +} + + +\message{glyphs,} +% and logos. + +% @@ prints an @, as does @atchar{}. +\def\@{\char64 } +\let\atchar=\@ + +% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. +% Unless we're in typewriter, use \ecfont because the CM text fonts do +% not have braces, and we don't want to switch into math. +\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} +\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} +\let\{=\mylbrace \let\lbracechar=\{ +\let\}=\myrbrace \let\rbracechar=\} +\begingroup + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux/toc files. + \catcode`\{ = \other \catcode`\} = \other + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup + +% @comma{} to avoid , parsing problems. +\let\comma = , + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. +\let\, = \ptexc +\let\dotaccent = \ptexdot +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \ptext +\let\ubaraccent = \ptexb +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown @ordf @ordm +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} + +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) +% +\edef\TeX{\TeX \spacefactor=1000 } + +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). +% +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{% + \ifx\textnominalsize\xwordpt + % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. + % Revert to plain's \scriptsize, which is 7pt. + \count255=\the\fam $\fam\count255 \scriptstyle A$% + \else + % For 11pt, we can use our lllsize. + \selectfonts\lllsize A% + \fi + }% + \vss + }}% + \kern-.15em + \TeX +} + +% Some math mode symbols. +\def\bullet{$\ptexbullet$} +\def\geq{\ifmmode \ge\else $\ge$\fi} +\def\leq{\ifmmode \le\else $\le$\fi} +\def\minus{\ifmmode -\else $-$\fi} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% +} + +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor +} + +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +% +% Since these characters are used in examples, they should be an even number of +% \tt widths. Each \tt character is 1en, so two makes it 1em. +% +\def\point{$\star$} +\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} +\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} +\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} + +% The @error{} command. +% Adapted from the TeXbook's \boxit. +% +\newbox\errorbox +% +{\tentt \global\dimen0 = 3em}% Width of the box. +\dimen2 = .55pt % Thickness of rules +% The text. (`r' is open on the right, `e' somewhat less so on the left.) +\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} +% +\setbox\errorbox=\hbox to \dimen0{\hfil + \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. + \advance\hsize by -2\dimen2 % Rules. + \vbox{% + \hrule height\dimen2 + \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. + \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. + \kern3pt\vrule width\dimen2}% Space to right. + \hrule height\dimen2} + \hfil} +% +\def\error{\leavevmode\lower.7ex\copy\errorbox} + % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} +% @euro{} comes from a separate font, depending on the current style. +% We use the free feym* fonts from the eurosym package by Henrik +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. +% +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. +% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted +% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. +% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. +% +% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. + % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. + % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. + % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % + \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize + \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + +% Glyphs from the EC fonts. We don't use \let for the aliases, because +% sometimes we redefine the original macro, and the alias should reflect +% the redefinition. +% +% Use LaTeX names for the Icelandic letters. +\def\DH{{\ecfont \char"D0}} % Eth +\def\dh{{\ecfont \char"F0}} % eth +\def\TH{{\ecfont \char"DE}} % Thorn +\def\th{{\ecfont \char"FE}} % thorn +% +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} +\def\guillemotright{\guillemetright} +\def\guilsinglleft{{\ecfont \char"0E}} +\def\guilsinglright{{\ecfont \char"0F}} +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% +% This positioning is not perfect (see the ogonek LaTeX package), but +% we have the precomposed glyphs for the most common cases. We put the +% tests to use those glyphs in the single \ogonek macro so we have fewer +% dummy definitions to worry about for index entries, etc. +% +% ogonek is also used with other letters in Lithuanian (IOU), but using +% the precomposed glyphs for those is not so easy since they aren't in +% the same EC font. +\def\ogonek#1{{% + \def\temp{#1}% + \ifx\temp\macrocharA\Aogonek + \else\ifx\temp\macrochara\aogonek + \else\ifx\temp\macrocharE\Eogonek + \else\ifx\temp\macrochare\eogonek + \else + \ecfont \setbox0=\hbox{#1}% + \ifdim\ht0=1ex\accent"0C #1% + \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% + \fi + \fi\fi\fi\fi + }% +} +\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} +\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} +\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} +\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} +% +% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. +\def\ecfont{% + % We can't distinguish serif/sans and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. + \edef\ecsize{\csname\curfontsize ecsize\endcsname}% + \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% + \ifmonospace + % typewriter: + \font\thisecfont = ectt\ecsize \space at \nominalsize + \else + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi + \fi + \thisecfont +} + % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. @@ -1969,14 +3172,24 @@ where each line of input produces a line of output.} }$% } +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. -% -\ifx\Orb\undefined +% +\ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi +% Quotes. +\chardef\quotedblleft="5C +\chardef\quotedblright=`\" +\chardef\quoteleft=`\` +\chardef\quoteright=`\' + \message{page headings,} @@ -1995,8 +3208,9 @@ where each line of input produces a line of output.} \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue -\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} +\parseargdef\shorttitlepage{% + \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. @@ -2056,17 +3270,28 @@ where each line of input produces a line of output.} \finishedtitlepagetrue } -%%% Macros to be used within @titlepage: +% Settings used for typesetting titles: no hyphenation, no indentation, +% don't worry much about spacing, ragged right. This should be used +% inside a \vbox, and fonts need to be set appropriately first. Because +% it is always used for titles, nothing else, we call \rmisbold. \par +% should be specified before the end of the \vbox, since a vbox is a group. +% +\def\raggedtitlesettings{% + \rmisbold + \hyphenpenalty=10000 + \parindent=0pt + \tolerance=5000 + \ptexraggedright +} + +% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} -\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines - \let\tt=\authortt} - \parseargdef\title{% \checkenv\titlepage - \leftline{\titlefonts\rm #1} + \vbox{\titlefonts \raggedtitlesettings #1\par}% % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt @@ -2087,12 +3312,12 @@ where each line of input produces a line of output.} \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi - {\authorfont \leftline{#1}}% + {\secfonts\rmisbold \leftline{#1}}% \fi } -%%% Set up page headings and footings. +% Set up page headings and footings. \let\thispage=\folio @@ -2140,12 +3365,39 @@ where each line of input produces a line of output.} % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. - \global\advance\pageheight by -\baselineskip - \global\advance\vsize by -\baselineskip + \global\advance\pageheight by -12pt + \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} +% @evenheadingmarks top \thischapter <- chapter at the top of a page +% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page +% +% The same set of arguments for: +% +% @oddheadingmarks +% @evenfootingmarks +% @oddfootingmarks +% @everyheadingmarks +% @everyfootingmarks + +\def\evenheadingmarks{\headingmarks{even}{heading}} +\def\oddheadingmarks{\headingmarks{odd}{heading}} +\def\evenfootingmarks{\headingmarks{even}{footing}} +\def\oddfootingmarks{\headingmarks{odd}{footing}} +\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} + \headingmarks{odd}{heading}{#1} } +\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} + \headingmarks{odd}{footing}{#1} } +% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. +\def\headingmarks#1#2#3 {% + \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname + \global\expandafter\let\csname get#1#2marks\endcsname \temp +} + +\everyheadingmarks bottom +\everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. @@ -2159,10 +3411,14 @@ where each line of input produces a line of output.} \def\headings #1 {\csname HEADINGS#1\endcsname} -\def\HEADINGSoff{% -\global\evenheadline={\hfil} \global\evenfootline={\hfil} -\global\oddheadline={\hfil} \global\oddfootline={\hfil}} -\HEADINGSoff +\def\headingsoff{% non-global headings elimination + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% +} + +\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting +\HEADINGSoff % it's the default + % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document @@ -2213,7 +3469,7 @@ where each line of input produces a line of output.} % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). -\ifx\today\undefined +\ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month @@ -2274,7 +3530,7 @@ where each line of input produces a line of output.} \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent - \advance\rightskip by0pt plus1fil + \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % @@ -2288,7 +3544,7 @@ where each line of input produces a line of output.} % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. - % + % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse @@ -2314,15 +3570,26 @@ where each line of input produces a line of output.} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble - \tablex + \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% - \tablex + \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% - \tablex + \tablecheck{vtable}% +} +\def\tablecheck#1{% + \ifnum \the\catcode`\^^M=\active + \endgroup + \errmessage{This command won't work in this context; perhaps the problem is + that we are \inenvironment\thisenv}% + \def\next{\doignore{#1}}% + \else + \let\next\tablex + \fi + \next } \def\tablex#1{% \def\itemindicate{#1}% @@ -2371,9 +3638,18 @@ where each line of input produces a line of output.} \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi + % + % Try typesetting the item mark that if the document erroneously says + % something like @itemize @samp (intending @table), there's an error + % right away at the @itemize. It's not the best error message in the + % world, but it's better than leaving it to the @item. This means if + % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% + \setbox0 = \hbox{\itemcontents}% + % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + % \let\item=\itemizeitem } @@ -2394,6 +3670,7 @@ where each line of input produces a line of output.} \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } @@ -2615,12 +3892,19 @@ where each line of input produces a line of output.} % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group -% of an alignment entry. Note that \everycr resets \everytab. -\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% +% of an alignment entry. \everycr resets \everytab so we don't have to +% undo it ourselves. +\def\headitemfont{\b}% for people to use in the template row; not changeable +\def\headitem{% + \checkenv\multitable + \crcr + \global\everytab={\bf}% can't use \headitemfont since the parsing differs + \the\everytab % for the first item +}% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until -% we encounter the problem it was intended to solve again. +% we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% @@ -2721,31 +4005,29 @@ where each line of input produces a line of output.} \global\setpercentfalse } -\def\setmultitablespacing{% test to see if user has set \multitablelinespace. -% If so, do nothing. If not, give it an appropriate dimension based on -% current baselineskip. +\def\setmultitablespacing{% + \def\multistrut{\strut}% just use the standard line spacing + % + % Compute \multitablelinespace (if not defined by user) for use in + % \multitableparskip calculation. We used define \multistrut based on + % this, but (ironically) that caused the spacing to be off. + % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 -%% strut to put in table in case some entry doesn't have descenders, -%% to keep lines equally spaced -\let\multistrut = \strut -\else -%% FIXME: what is \box0 supposed to be? -\gdef\multistrut{\vrule height\multitablelinespace depth\dp0 -width0pt\relax} \fi -%% Test to see if parskip is larger than space between lines of -%% table. If not, do nothing. -%% If so, set to same dimension as multitablelinespace. +\fi +% Test to see if parskip is larger than space between lines of +% table. If not, do nothing. +% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. \fi} @@ -2791,6 +4073,7 @@ width0pt\relax} \fi \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: + \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other @@ -2811,16 +4094,16 @@ width0pt\relax} \fi \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % - % Define a command to find the next `@end #1', which must be on a line - % by itself. - \long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}% + % Define a command to find the next `@end #1'. + \long\def\doignoretext##1^^M@end #1{% + \doignoretextyyy##1^^M@#1\_STOP_}% + % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. - \obeylines % \doignoretext ^^M% }% } @@ -2850,7 +4133,12 @@ width0pt\relax} \fi } % Finish off ignored text. -\def\enddoignore{\endgroup\ignorespaces} +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% +} % @set VAR sets the variable VAR to an empty value. @@ -2900,7 +4188,7 @@ width0pt\relax} \fi % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. - \let-\realdash \let_\normalunderscore + \let-\normaldash \let_\normalunderscore } } @@ -2940,7 +4228,7 @@ width0pt\relax} \fi } \def\ifsetfail{\doignore{ifset}} -% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been +% @ifclear VAR ... @end executes the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the @@ -2951,6 +4239,35 @@ width0pt\relax} \fi \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} +% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written +% without the @) is in fact defined. We can only feasibly check at the +% TeX level, so something like `mathcode' is going to considered +% defined even though it is not a Texinfo command. +% +\makecond{ifcommanddefined} +\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} +% +\def\doifcmddefined#1#2{{% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname #2\endcsname\relax + #1% If not defined, \let\next as above. + \fi + \expandafter + }\next +} +\def\ifcmddefinedfail{\doignore{ifcommanddefined}} + +% @ifcommandnotdefined CMD ... handled similar to @ifclear above. +\makecond{ifcommandnotdefined} +\def\ifcommandnotdefined{% + \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} +\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} + +% Set the `txicommandconditionals' variable, so documents have a way to +% test if the @ifcommand...defined conditionals are available. +\set txicommandconditionals + % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment @@ -2963,9 +4280,8 @@ width0pt\relax} \fi % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite -% except not \outer, so it can be used within \newindex. -{\catcode`\@=11 -\gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} +% except not \outer, so it can be used within macros and \if's. +\edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that @@ -3016,11 +4332,11 @@ width0pt\relax} \fi \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. - \expandafter \ifx\csname donesynindex#2\endcsname \undefined + \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname - \expandafter\let\csname\donesynindex#2\endcsname = 1 + \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname @@ -3051,18 +4367,73 @@ width0pt\relax} \fi % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% + \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% - % Need these in case \tex is in effect and \{ is a \delimiter again. - % But can't use \lbracecmd and \rbracecmd because texindex assumes - % braces and backslashes are used only as delimiters. - \let\{ = \mylbrace - \let\} = \myrbrace % - % \definedummyword defines \#1 as \realbackslash #1\space, thus - % effectively preventing its expansion. This is used only for control - % words, not control letters, because the \space would be incorrect - % for control characters, but is needed to separate the control word + % Need these unexpandable (because we define \tt as a dummy) + % definitions when @{ or @} appear in index entry text. Also, more + % complicated, when \tex is in effect and \{ is a \delimiter again. + % We can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. Perhaps we + % should define @lbrace and @rbrace commands a la @comma. + \def\{{{\tt\char123}}% + \def\}{{\tt\char125}}% + % + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts + % causes processing to be prematurely terminated. This is, + % apparently, because \indexsorttmp is fully expanded, and \endinput + % is an expandable command. The redefinition below makes \endinput + % disappear altogether for that purpose -- although logging shows that + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. + % + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} + % @findex xyz + % @end macro + % ... + % @funindex commtest + % + % The above is not enough to reproduce the bug, but it gives the flavor. + % + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} + % + % So: + \let\endinput = \empty + % + % Do the redefinitions. + \commondummies +} + +% For the aux and toc files, @ is the escape character. So we want to +% redefine everything using @ as the escape character (instead of +% \realbackslash, still used for index files). When everything uses @, +% this will be simpler. +% +\def\atdummies{% + \def\@{@@}% + \def\ {@ }% + \let\{ = \lbraceatcmd + \let\} = \rbraceatcmd + % + % Do the redefinitions. + \commondummies + \otherbackslash +} + +% Called from \indexdummies and \atdummies. +% +\def\commondummies{% + % + % \definedummyword defines \#1 as \string\#1\space, thus effectively + % preventing its expansion. This is used only for control words, + % not control letters, because the \space would be incorrect for + % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the @@ -3072,168 +4443,162 @@ width0pt\relax} \fi % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % - \def\definedummyword##1{% - \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}% - }% - \def\definedummyletter##1{% - \expandafter\def\csname ##1\endcsname{\realbackslash ##1}% - }% + \def\definedummyword ##1{\def##1{\string##1\space}}% + \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % - % Do the redefinitions. - \commondummies -} - -% For the aux file, @ is the escape character. So we want to redefine -% everything using @ instead of \realbackslash. When everything uses -% @, this will be simpler. -% -\def\atdummies{% - \def\@{@@}% - \def\ {@ }% - \let\{ = \lbraceatcmd - \let\} = \rbraceatcmd - % - % (See comments in \indexdummies.) - \def\definedummyword##1{% - \expandafter\def\csname ##1\endcsname{@##1\space}% - }% - \def\definedummyletter##1{% - \expandafter\def\csname ##1\endcsname{@##1}% - }% - \let\definedummyaccent\definedummyletter - % - % Do the redefinitions. - \commondummies -} - -% Called from \indexdummies and \atdummies. \definedummyword and -% \definedummyletter must be defined first. -% -\def\commondummies{% - % - \normalturnoffactive - % \commondummiesnofonts % - \definedummyletter{_}% + \definedummyletter\_% + \definedummyletter\-% % % Non-English letters. - \definedummyword{AA}% - \definedummyword{AE}% - \definedummyword{L}% - \definedummyword{OE}% - \definedummyword{O}% - \definedummyword{aa}% - \definedummyword{ae}% - \definedummyword{l}% - \definedummyword{oe}% - \definedummyword{o}% - \definedummyword{ss}% - \definedummyword{exclamdown}% - \definedummyword{questiondown}% - \definedummyword{ordf}% - \definedummyword{ordm}% + \definedummyword\AA + \definedummyword\AE + \definedummyword\DH + \definedummyword\L + \definedummyword\O + \definedummyword\OE + \definedummyword\TH + \definedummyword\aa + \definedummyword\ae + \definedummyword\dh + \definedummyword\exclamdown + \definedummyword\l + \definedummyword\o + \definedummyword\oe + \definedummyword\ordf + \definedummyword\ordm + \definedummyword\questiondown + \definedummyword\ss + \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. - \definedummyword{bf}% - \definedummyword{gtr}% - \definedummyword{hat}% - \definedummyword{less}% - \definedummyword{sf}% - \definedummyword{sl}% - \definedummyword{tclose}% - \definedummyword{tt}% + \definedummyword\bf + \definedummyword\gtr + \definedummyword\hat + \definedummyword\less + \definedummyword\sf + \definedummyword\sl + \definedummyword\tclose + \definedummyword\tt % - \definedummyword{LaTeX}% - \definedummyword{TeX}% + \definedummyword\LaTeX + \definedummyword\TeX % % Assorted special characters. - \definedummyword{bullet}% - \definedummyword{comma}% - \definedummyword{copyright}% - \definedummyword{registeredsymbol}% - \definedummyword{dots}% - \definedummyword{enddots}% - \definedummyword{equiv}% - \definedummyword{error}% - \definedummyword{expansion}% - \definedummyword{minus}% - \definedummyword{pounds}% - \definedummyword{point}% - \definedummyword{print}% - \definedummyword{result}% + \definedummyword\arrow + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots + \definedummyword\entrybreak + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro + \definedummyword\expansion + \definedummyword\geq + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright + \definedummyword\lbracechar + \definedummyword\leq + \definedummyword\minus + \definedummyword\ogonek + \definedummyword\pounds + \definedummyword\point + \definedummyword\print + \definedummyword\quotedblbase + \definedummyword\quotedblleft + \definedummyword\quotedblright + \definedummyword\quoteleft + \definedummyword\quoteright + \definedummyword\quotesinglbase + \definedummyword\rbracechar + \definedummyword\result + \definedummyword\textdegree + % + % We want to disable all macros so that they are not expanded by \write. + \macrolist + % + \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable - % - % Normal spaces, not active ones. - \unsepspaces - % - % No macro expansion. - \turnoffmacros } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % -% Better have this without active chars. -{ - \catcode`\~=\other - \gdef\commondummiesnofonts{% - % Control letters and accents. - \definedummyletter{!}% - \definedummyaccent{"}% - \definedummyaccent{'}% - \definedummyletter{*}% - \definedummyaccent{,}% - \definedummyletter{.}% - \definedummyletter{/}% - \definedummyletter{:}% - \definedummyaccent{=}% - \definedummyletter{?}% - \definedummyaccent{^}% - \definedummyaccent{`}% - \definedummyaccent{~}% - \definedummyword{u}% - \definedummyword{v}% - \definedummyword{H}% - \definedummyword{dotaccent}% - \definedummyword{ringaccent}% - \definedummyword{tieaccent}% - \definedummyword{ubaraccent}% - \definedummyword{udotaccent}% - \definedummyword{dotless}% - % - % Texinfo font commands. - \definedummyword{b}% - \definedummyword{i}% - \definedummyword{r}% - \definedummyword{sc}% - \definedummyword{t}% - % - % Commands that take arguments. - \definedummyword{acronym}% - \definedummyword{cite}% - \definedummyword{code}% - \definedummyword{command}% - \definedummyword{dfn}% - \definedummyword{emph}% - \definedummyword{env}% - \definedummyword{file}% - \definedummyword{kbd}% - \definedummyword{key}% - \definedummyword{math}% - \definedummyword{option}% - \definedummyword{samp}% - \definedummyword{strong}% - \definedummyword{tie}% - \definedummyword{uref}% - \definedummyword{url}% - \definedummyword{var}% - \definedummyword{verb}% - \definedummyword{w}% - } +\def\commondummiesnofonts{% + % Control letters and accents. + \definedummyletter\!% + \definedummyaccent\"% + \definedummyaccent\'% + \definedummyletter\*% + \definedummyaccent\,% + \definedummyletter\.% + \definedummyletter\/% + \definedummyletter\:% + \definedummyaccent\=% + \definedummyletter\?% + \definedummyaccent\^% + \definedummyaccent\`% + \definedummyaccent\~% + \definedummyword\u + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent + \definedummyword\ogonek + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent + \definedummyword\udotaccent + \definedummyword\dotless + % + % Texinfo font commands. + \definedummyword\b + \definedummyword\i + \definedummyword\r + \definedummyword\sansserif + \definedummyword\sc + \definedummyword\slanted + \definedummyword\t + % + % Commands that take arguments. + \definedummyword\abbr + \definedummyword\acronym + \definedummyword\anchor + \definedummyword\cite + \definedummyword\code + \definedummyword\command + \definedummyword\dfn + \definedummyword\dmn + \definedummyword\email + \definedummyword\emph + \definedummyword\env + \definedummyword\file + \definedummyword\image + \definedummyword\indicateurl + \definedummyword\inforef + \definedummyword\kbd + \definedummyword\key + \definedummyword\math + \definedummyword\option + \definedummyword\pxref + \definedummyword\ref + \definedummyword\samp + \definedummyword\strong + \definedummyword\tie + \definedummyword\uref + \definedummyword\url + \definedummyword\var + \definedummyword\verb + \definedummyword\w + \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index @@ -3243,14 +4608,10 @@ width0pt\relax} \fi % \def\indexnofonts{% % Accent commands should become @asis. - \def\definedummyaccent##1{% - \expandafter\let\csname ##1\endcsname\asis - }% + \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. - \def\definedummyletter##1{% - \expandafter\def\csname ##1\endcsname{}% - }% - % Hopefully, all control words can become @asis. + \def\definedummyletter##1{\let##1\empty}% + % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts @@ -3262,50 +4623,95 @@ width0pt\relax} \fi % \def\ { }% \def\@{@}% - % how to handle braces? \def\_{\normalunderscore}% + \def\-{}% @- shouldn't affect sorting + % + % Unfortunately, texindex is not prepared to handle braces in the + % content at all. So for index sorting, we map @{ and @} to strings + % starting with |, since that ASCII character is between ASCII { and }. + \def\{{|a}% + \def\lbracechar{|a}% + % + \def\}{|b}% + \def\rbracechar{|b}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% + \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% + \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% - \def\o{o}% - \def\ss{ss}% - \def\exclamdown{!}% - \def\questiondown{?}% \def\ordf{a}% \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) + \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% - \def\registeredsymbol{R}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% + \def\euro{euro}% \def\expansion{==>}% + \def\geq{>=}% + \def\guillemetleft{<<}% + \def\guillemetright{>>}% + \def\guilsinglleft{<}% + \def\guilsinglright{>}% + \def\leq{<=}% \def\minus{-}% - \def\pounds{pounds}% \def\point{.}% + \def\pounds{pounds}% \def\print{-|}% + \def\quotedblbase{"}% + \def\quotedblleft{"}% + \def\quotedblright{"}% + \def\quoteleft{`}% + \def\quoteright{'}% + \def\quotesinglbase{,}% + \def\registeredsymbol{R}% \def\result{=>}% + \def\textdegree{o}% % - % Don't write macro names. - \emptyusermacros + \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax + \else \indexlquoteignore \fi + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. + % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. + % + \macrolist } +% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us +% ignore left quotes in the sort term. +{\catcode`\`=\active + \gdef\indexlquoteignore{\let`=\empty}} + \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? @@ -3331,11 +4737,7 @@ width0pt\relax} \fi % \edef\writeto{\csname#1indfile\endcsname}% % - \ifvmode - \dosubindsanitize - \else - \dosubindwrite - \fi + \safewhatsit\dosubindwrite }% \fi } @@ -3350,7 +4752,6 @@ width0pt\relax} \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage - \escapechar=`\\ \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % @@ -3373,13 +4774,13 @@ width0pt\relax} \fi \temp } -% Take care of unwanted page breaks: +% Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the -% \write will make \lastskip zero. The result is that sequences -% like this: +% \write or \pdfdest will make \lastskip zero. The result is that +% sequences like this: % @end defun % @tindex whatever % @defun ... @@ -3403,25 +4804,30 @@ width0pt\relax} \fi % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % +\newskip\whatsitskip +\newcount\whatsitpenalty +% % ..., ready, GO: % -\def\dosubindsanitize{% +\def\safewhatsit#1{\ifhmode + #1% + \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. - \skip0 = \lastskip + \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% - \count255 = \lastpenalty + \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this - % -\skip0 glue we're inserting is preceded by a + % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else - \vskip-\skip0 + \vskip-\whatsitskip \fi % - \dosubindwrite + #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and @@ -3429,20 +4835,19 @@ width0pt\relax} \fi % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: - % % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. - \ifnum\count255>9999 \penalty\count255 \fi + \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. - \nobreak\vskip\skip0 + \nobreak\vskip\whatsitskip \fi -} +\fi} % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} @@ -3484,6 +4889,7 @@ width0pt\relax} \fi % \smallfonts \rm \tolerance = 9500 + \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. @@ -3557,10 +4963,9 @@ width0pt\relax} \fi % % A straightforward implementation would start like this: % \def\entry#1#2{... -% But this frozes the catcodes in the argument, and can cause problems to +% But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. -% % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% @@ -3597,10 +5002,17 @@ width0pt\relax} \fi % columns. \vskip 0pt plus1pt % + % When reading the text of entry, convert explicit line breaks + % from @* into spaces. The user might give these in long section + % titles, for instance. + \def\*{\unskip\space\ignorespaces}% + \def\entrybreak{\hfil\break}% + % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } +\def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent @@ -3613,11 +5025,8 @@ width0pt\relax} \fi % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. - \def\tempa{{\rm }}% - \def\tempb{#1}% - \edef\tempc{\tempa}% - \edef\tempd{\tempb}% - \ifx\tempc\tempd + \setbox\boxA = \hbox{#1}% + \ifdim\wd\boxA = 0pt \ % \else % @@ -3641,9 +5050,9 @@ width0pt\relax} \fi \endgroup } -% Like \dotfill except takes at least 1 em. +% Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders - \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} + \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} @@ -3753,6 +5162,34 @@ width0pt\relax} \fi % % All done with double columns. \def\enddoublecolumns{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \pageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. @@ -3808,7 +5245,22 @@ width0pt\relax} \fi \message{sectioning,} % Chapters, sections, etc. -% \unnumberedno is an oxymoron, of course. But we count the unnumbered +% Let's start with @part. +\outer\parseargdef\part{\partzzz{#1}} +\def\partzzz#1{% + \chapoddpage + \null + \vskip.3\vsize % move it down on the page a bit + \begingroup + \noindent \titlefonts\rmisbold #1\par % the text + \let\lastnode=\empty % no node to associate with + \writetocentry{part}{#1}{}% but put it in the toc + \headingsoff % no headline or footline on the part page + \chapoddpage + \endgroup +} + +% \unnumberedno is an oxymoron. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 @@ -3862,11 +5314,15 @@ width0pt\relax} \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} -% Each @chapter defines this as the name of the chapter. -% page headings and footings can use it. @section does likewise. -% However, they are not reliable, because we don't use marks. +% Each @chapter defines these (using marks) as the number+name, number +% and name of the chapter. Page headings and footings can use +% these. @section does likewise. \def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} \def\thissection{} +\def\thissectionnum{} +\def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count @@ -3883,8 +5339,8 @@ width0pt\relax} \fi \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. -% To achive this, remember the "biggest" unnum. sec. we are currently in: -\chardef\unmlevel = \maxseclevel +% To achieve this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. @@ -3909,8 +5365,8 @@ width0pt\relax} \fi % The heading type: \def\headtype{#1}% \if \headtype U% - \ifnum \absseclevel < \unmlevel - \chardef\unmlevel = \absseclevel + \ifnum \absseclevel < \unnlevel + \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: @@ -3922,10 +5378,10 @@ width0pt\relax} \fi \fi\fi \fi % Check for numbered within unnumbered: - \ifnum \absseclevel > \unmlevel + \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else - \chardef\unmlevel = 3 + \chardef\unnlevel = 3 \fi \fi % Now print the heading: @@ -3979,7 +5435,9 @@ width0pt\relax} \fi \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % - \message{\putwordChapter\space \the\chapno}% + % \putwordChapter can contain complex things in translations. + \toks0=\expandafter{\putwordChapter}% + \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% @@ -3990,15 +5448,17 @@ width0pt\relax} \fi \global\let\subsubsection = \numberedsubsubsec } -\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz +\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz +% \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % - \def\appendixnum{\putwordAppendix\space \appendixletter}% - \message{\appendixnum}% + % \putwordAppendix can contain complex things in translations. + \toks0=\expandafter{\putwordAppendix}% + \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % @@ -4007,7 +5467,8 @@ width0pt\relax} \fi \global\let\subsubsection = \appendixsubsubsec } -\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz +% normally unnmhead0 calls unnumberedzzz: +\outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 @@ -4051,40 +5512,47 @@ width0pt\relax} \fi \let\top\unnumbered % Sections. +% \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } -\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz +% normally calls appendixsectionzzz: +\outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection -\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz +% normally calls unnumberedseczzz: +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. -\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz +% +% normally calls numberedsubseczzz: +\outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } -\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz +% normally calls appendixsubseczzz: +\outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } -\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz +% normally calls unnumberedsubseczzz: +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% @@ -4092,21 +5560,25 @@ width0pt\relax} \fi } % Subsubsections. -\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz +% +% normally numberedsubsubseczzz: +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz +% normally appendixsubsubseczzz: +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz +% normally unnumberedsubsubseczzz: +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% @@ -4122,15 +5594,6 @@ width0pt\relax} \fi % Define @majorheading, @heading and @subheading -% NOTE on use of \vbox for chapter headings, section headings, and such: -% 1) We use \vbox rather than the earlier \line to permit -% overlong headings to fold. -% 2) \hyphenpenalty is set to 10000 because hyphenation in a -% heading is obnoxious; this forbids it. -% 3) Likewise, headings look best if no \parindent is used, and -% if justification is not attempted. Hence \raggedright. - - \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz @@ -4138,10 +5601,8 @@ width0pt\relax} \fi \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% - {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% - \bigskip \par\penalty 200\relax + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip \nobreak \suppressfirstparagraphindent } @@ -4157,17 +5618,28 @@ width0pt\relax} \fi % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. -%%% Args are the skip and penalty (usually negative) +% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} -%%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) - \newskip\chapheadingskip +% Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} -\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} +% Because \domark is called before \chapoddpage, the filler page will +% get the headings for the next chapter, which is wrong. But we don't +% care -- we just disable all headings on the filler page. +\def\chapoddpage{% + \chappager + \ifodd\pageno \else + \begingroup + \headingsoff + \null + \chappager + \endgroup + \fi +} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} @@ -4201,41 +5673,78 @@ width0pt\relax} \fi \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% + % Insert the first mark before the heading break (see notes for \domark). + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \gdef\thissection{}}% + % + \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{\thischaptername}}% + \else\ifx\temptype\Yomitfromtockeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{}}% + \else\ifx\temptype\Yappendixkeyword + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% + % \noexpand\putwordAppendix avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% + % \noexpand\putwordChapter avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordChapter{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert the chapter heading break. \pchapsepmacro + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \domark + % {% - \chapfonts \rm + \chapfonts \rmisbold % - % Have to define \thissection before calling \donoderef, because the + % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. - \gdef\thissection{#1}% - \gdef\thischaptername{#1}% + \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. - \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% - \def\thischapter{#1}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% - \xdef\thischapter{}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% - % We don't substitute the actual chapter name into \thischapter - % because we don't want its macros evaluated now. And we don't - % use \thissection because that changes with each section. - % - \xdef\thischapter{\putwordAppendix{} \appendixletter: - \noexpand\thischaptername}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% - \xdef\thischapter{\putwordChapter{} \the\chapno: - \noexpand\thischaptername}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the @@ -4251,8 +5760,8 @@ width0pt\relax} \fi \donoderef{#2}% % % Typeset the actual heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright - \hangindent=\wd0 \centerparametersmaybe + \nobreak % Avoid page breaks at the interline glue. + \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title @@ -4274,18 +5783,18 @@ width0pt\relax} \fi \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\nobreak + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt - \hfill {\rm #1}\hfill}}\bigskip \par\nobreak + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% + \nobreak\bigskip \nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen @@ -4313,47 +5822,110 @@ width0pt\relax} \fi % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % +\def\seckeyword{sec} +% \def\sectionheading#1#2#3#4{% {% + \checkenv{}% should not be in an environment. + % % Switch to the right set of fonts. - \csname #2fonts\endcsname \rm + \csname #2fonts\endcsname \rmisbold + % + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword + \ifx\sectionlevel\seckeyword + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\thissection{\thissectionname}}% + \fi + \else\ifx\temptype\Yomitfromtockeyword + % Don't redefine \thissection. + \else\ifx\temptype\Yappendixkeyword + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \else + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % + % Go into vertical mode. Usually we'll already be there, but we + % don't want the following whatsit to end up in a preceding paragraph + % if the document didn't happen to have a blank line. + \par + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % - % Only insert the space after the number if we have a section number. - \def\sectionlevel{#2}% - \def\temptype{#3}% + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevsectiondefs=\lastsectiondefs + \domark % + % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% - \gdef\thissection{#1}% + \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, - % and don't redefine \thissection. + % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% - \gdef\thissection{#1}% + \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% - \gdef\thissection{#1}% + \gdef\lastsection{#1}% \fi\fi\fi % - % Write the toc entry (before \donoderef). See comments in \chfplain. + % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). - % Again, see comments in \chfplain. + % Again, see comments in \chapmacro. \donoderef{#3}% % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % % Output the actual section heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% @@ -4367,15 +5939,15 @@ width0pt\relax} \fi % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a - % discardable item.) + % discardable item.) However, when a paragraph is not started next + % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out + % or the negative glue will cause weirdly wrong output, typically + % obscuring the section heading with something else. \vskip-\parskip - % - % This is purely so the last item on the list is a known \penalty > - % 10000. This is so \startdefun can avoid allowing breakpoints after - % section headings. Otherwise, it would insert a valid breakpoint between: - % - % @section sec-whatever - % @deffn def-whatever + % + % This is so the last item on the main vertical list is a known + % \penalty > 10000, so \startdefun, etc., can recognize the situation + % and do the needful. \penalty 10001 } @@ -4410,11 +5982,11 @@ width0pt\relax} \fi \fi % \iflinks - \toks0 = {#2}% - \toks2 = \expandafter{\lastnode}% - \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}{#3}% - {\the\toks2}{\noexpand\folio}}}% - \temp + {\atdummies + \edef\temp{% + \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% + \temp + }% \fi \fi % @@ -4427,6 +5999,31 @@ width0pt\relax} \fi \ifpdf \global\pdfmakepagedesttrue \fi } + +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. +% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active + \catcode`\<=\active + \catcode`\>=\active + \catcode`\\=\active + \catcode`\^=\active + \catcode`\_=\active + \catcode`\|=\active + \catcode`\~=\active +} + + +% Read the toc file, which is essentially Texinfo input. +\def\readtocfile{% + \setupdatafile + \activecatcodes + \input \tocreadfilename +} + \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 @@ -4443,29 +6040,29 @@ width0pt\relax} \fi % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. - \def\thischapter{}% \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. - \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 - % We can't do this, because then an actual ^ in a section - % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. - %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi - \raggedbottom % Worry more about breakpoints than the bottom. + \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} % Normal (long) toc. +% \def\contents{% \startcontents{\putwordTOC}% - \openin 1 \jobname.toc + \openin 1 \tocreadfilename\space \ifeof 1 \else - \input \jobname.toc + \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect @@ -4482,6 +6079,7 @@ width0pt\relax} \fi \def\summarycontents{% \startcontents{\putwordShortTOC}% % + \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry @@ -4501,9 +6099,9 @@ width0pt\relax} \fi \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry - \openin 1 \jobname.toc + \openin 1 \tocreadfilename\space \ifeof 1 \else - \input \jobname.toc + \readtocfile \fi \closein 1 \vfill \eject @@ -4537,6 +6135,19 @@ width0pt\relax} \fi % The last argument is the page number. % The arguments in between are the chapter number, section number, ... +% Parts, in the main contents. Replace the part number, which doesn't +% exist, with an empty box. Let's hope all the numbers have the same width. +% Also ignore the page number, which is conventionally not printed. +\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} +\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +% +% Parts, in the short toc. +\def\shortpartentry#1#2#3#4{% + \penalty-300 + \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip + \shortchapentry{{\bf #1}}{\numeralbox}{}{}% +} + % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % @@ -4626,45 +6237,12 @@ width0pt\relax} \fi \message{environments,} % @foo ... @end foo. -% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. -% -% Since these characters are used in examples, it should be an even number of -% \tt widths. Each \tt character is 1en, so two makes it 1em. -% -\def\point{$\star$} -\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} -\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} -\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} -\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} - -% The @error{} command. -% Adapted from the TeXbook's \boxit. -% -\newbox\errorbox -% -{\tentt \global\dimen0 = 3em}% Width of the box. -\dimen2 = .55pt % Thickness of rules -% The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} -% -\setbox\errorbox=\hbox to \dimen0{\hfil - \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. - \advance\hsize by -2\dimen2 % Rules. - \vbox{% - \hrule height\dimen2 - \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. - \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. - \kern3pt\vrule width\dimen2}% Space to right. - \hrule height\dimen2} - \hfil} -% -\def\error{\leavevmode\lower.7ex\copy\errorbox} - -% @tex ... @end tex escapes into raw Tex temporarily. +% @tex ... @end tex escapes into raw TeX temporarily. % One exception: @ is still an escape character, so that @end tex works. -% But \@ or @@ will get a plain tex @ character. +% But \@ or @@ will get a plain @ character. \envdef\tex{% + \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie @@ -4674,8 +6252,14 @@ width0pt\relax} \fi \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other + \catcode`\`=\other + \catcode`\'=\other \escapechar=`\\ % + % ' is active in math mode (mathcode"8000). So reset it, and all our + % other math active characters (just in case), to plain's definitions. + \mathactive + % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc @@ -4693,6 +6277,8 @@ width0pt\relax} \fi \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext + \expandafter \let\csname top\endcsname=\ptextop % outer + \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% @@ -4738,7 +6324,8 @@ width0pt\relax} \fi \let\afterenvbreak = \aboveenvbreak -% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. +% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will +% also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around @@ -4775,7 +6362,13 @@ width0pt\relax} \fi % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. - \let\nonarrowing=\comment + \let\nonarrowing = t% + % + % If this cartouche directly follows a sectioning command, we need the + % \parskip glue (backspaced over by default) or the cartouche can + % collide with the section heading. + \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi + % \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop @@ -4789,7 +6382,7 @@ width0pt\relax} \fi \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip - \comment % For explanation, see the end of \def\group. + \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi @@ -4806,6 +6399,7 @@ width0pt\relax} \fi % This macro is called at the beginning of all the @example variants, % inside a group. +\newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy @@ -4813,17 +6407,40 @@ width0pt\relax} \fi \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt + % Turn off paragraph indentation but redefine \indent to emulate + % the normal \indent. + \nonfillparindent=\parindent \parindent = 0pt + \let\indent\nonfillindent + % \emergencystretch = 0pt % don't try to avoid overfull boxes - % @cartouche defines \nonarrowing to inhibit narrowing - % at next level down. \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing + \else + \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } +\begingroup +\obeyspaces +% We want to swallow spaces (but not other tokens) after the fake +% @indent in our nonfill-environments, where spaces are normally +% active and set to @tie, resulting in them not being ignored after +% @indent. +\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% +\gdef\nonfillindentcheck{% +\ifx\temp % +\expandafter\nonfillindentgobble% +\else% +\leavevmode\nonfillindentbox% +\fi% +}% +\endgroup +\def\nonfillindentgobble#1{\nonfillindent} +\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} + % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: @@ -4834,53 +6451,59 @@ width0pt\relax} \fi \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else + \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. -% Let's do it by one command: -\def\makedispenv #1#2{ - \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} - \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} +% Let's do it in one command. #1 is the env name, #2 the definition. +\def\makedispenvdef#1#2{% + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } -% Define two synonyms: -\def\maketwodispenvs #1#2#3{ - \makedispenv{#1}{#3} - \makedispenv{#2}{#3} +% Define two environment synonyms (#1 and #2) for an environment. +\def\maketwodispenvdef#1#2#3{% + \makedispenvdef{#1}{#3}% + \makedispenvdef{#2}{#3}% } - -% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. +% +% @lisp: indented, narrowed, typewriter font; +% @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % -\maketwodispenvs {lisp}{example}{% +\maketwodispenvdef{lisp}{example}{% \nonfillstart - \tt + \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. - \gobble % eat return + \gobble % eat return } - % @display/@smalldisplay: same as @lisp except keep current font. % -\makedispenv {display}{% +\makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % -\makedispenv{format}{% +\makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble @@ -4899,27 +6522,47 @@ width0pt\relax} \fi \envdef\flushright{% \let\nonarrowing = t% \nonfillstart - \advance\leftskip by 0pt plus 1fill + \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak +% @raggedright does more-or-less normal line breaking but no right +% justification. From plain.tex. +\envdef\raggedright{% + \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax +} +\let\Eraggedright\par + +\envdef\raggedleft{% + \parindent=0pt \leftskip0pt plus2em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedleft\par + +\envdef\raggedcenter{% + \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedcenter\par + + % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % -\envdef\quotation{% - {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \parindent=0pt - % - % @cartouche defines \nonarrowing to inhibit narrowing at next level down. +\makedispenvdef{quotation}{\quotationstart} +% +\def\quotationstart{% + \indentedblockstart % same as \indentedblock, but increase right margin too. \ifx\nonarrowing\relax - \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing - \exdentamount = \lispnarrowing - \let\nonarrowing = \relax \fi \parsearg\quotationlabel } @@ -4929,12 +6572,13 @@ width0pt\relax} \fi % \def\Equotation{% \par - \ifx\quotationauthor\undefined\else + \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } +\def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% @@ -4944,6 +6588,32 @@ width0pt\relax} \fi \fi } +% @indentedblock is like @quotation, but indents only on the left and +% has no optional argument. +% +\makedispenvdef{indentedblock}{\indentedblockstart} +% +\def\indentedblockstart{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi +} + +% Keep a nonzero parskip for the environment, since we're doing normal filling. +% +\def\Eindentedblock{% + \par + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallindentedblock{\Eindentedblock} + % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, @@ -4959,18 +6629,16 @@ width0pt\relax} \fi \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% + % Don't do the quotes -- if we do, @set txicodequoteundirected and + % @set txicodequotebacktick will not have effect on @verb and + % @verbatim, and ?` and !` ligatures won't get disabled. + %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % -% [Knuth] pp. 380,381,391 -% Disable Spanish ligatures ?` and !` of \tt font -\begingroup - \catcode`\`=\active\gdef`{\relax\lq} -\endgroup -% % Setup for the @verb command. % % Eight spaces for a tab @@ -4982,7 +6650,7 @@ width0pt\relax} \fi \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% - \catcode`\`=\active + \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and @@ -4993,35 +6661,46 @@ width0pt\relax} \fi % Setup for the @verbatim environment % -% Real tab expansion +% Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % -\def\starttabbox{\setbox0=\hbox\bgroup} +% We typeset each line of the verbatim in an \hbox, so we can handle +% tabs. The \global is in case the verbatim line starts with an accent, +% or some other command that starts with a begin-group. Otherwise, the +% entire \verbbox would disappear at the corresponding end-group, before +% it is typeset. Meanwhile, we can't have nested verbatim commands +% (can we?), so the \global won't be overwriting itself. +\newbox\verbbox +\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} +% \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup - \dimen0=\wd0 % the width so far, or since the previous tab - \divide\dimen0 by\tabw - \multiply\dimen0 by\tabw % compute previous multiple of \tabw - \advance\dimen0 by\tabw % advance to next multiple of \tabw - \wd0=\dimen0 \box0 \starttabbox + \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab + \divide\dimen\verbbox by\tabw + \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw + \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw + \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup + +% start the verbatim environment. \def\setupverbatim{% + \let\nonarrowing = t% \nonfillstart - \advance\leftskip by -\defbodyindent - % Easiest (and conventionally used) font for verbatim - \tt - \def\par{\leavevmode\egroup\box0\endgraf}% - \catcode`\`=\active + \tt % easiest (and conventionally used) font for verbatim + % The \leavevmode here is for blank lines. Otherwise, we would + % never \starttabox and the \egroup would end verbatim mode. + \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand + \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and - % make each space count - % must do in this order: + % make each space count. + % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } @@ -5077,6 +6756,8 @@ width0pt\relax} \fi {% \makevalueexpandable \setupverbatim + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% @@ -5102,27 +6783,35 @@ width0pt\relax} \fi \endgroup } + \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt +\newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted - % by \defargscommonending, instead of 10000, since the sectioning + % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. - % - \ifnum\lastpenalty=10002 \penalty2000 \fi + % + % As a further refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. @@ -5140,7 +6829,7 @@ width0pt\relax} \fi % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. - \ifnum\lastpenalty=10002 \penalty3000 \fi + \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% @@ -5155,10 +6844,10 @@ width0pt\relax} \fi #1#2 \endheader % common ending: \interlinepenalty = 10000 - \advance\rightskip by 0pt plus 1fil + \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip - \penalty 10002 % signal to \startdefun and \dodefunx + \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts @@ -5168,7 +6857,7 @@ width0pt\relax} \fi \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; -% the only thing remainnig is to define \deffnheader. +% the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun @@ -5185,13 +6874,36 @@ width0pt\relax} \fi \def\domakedefun#1#2#3{% \envdef#1{% \startdefun + \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } -%%% Untyped functions: +\newif\ifdoingtypefn % doing typed function? +\newif\ifrettypeownline % typeset return type on its own line? + +% @deftypefnnewline on|off says whether the return type of typed functions +% are printed on their own line. This affects @deftypefn, @deftypefun, +% @deftypeop, and @deftypemethod. +% +\parseargdef\deftypefnnewline{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @txideftypefnnl value `\temp', + must be on|off}% + \fi\fi +} + +% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} @@ -5210,7 +6922,7 @@ width0pt\relax} \fi \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } -%%% Typed functions: +% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} @@ -5225,10 +6937,11 @@ width0pt\relax} \fi % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% + \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -%%% Typed variables: +% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} @@ -5246,7 +6959,7 @@ width0pt\relax} \fi \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -%%% Untyped variables: +% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } @@ -5257,7 +6970,8 @@ width0pt\relax} \fi % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } -%%% Type: +% Types: + % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% @@ -5285,25 +6999,49 @@ width0pt\relax} \fi % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% + \par % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % - % How we'll format the type name. Putting it in brackets helps + % Determine if we are typesetting the return type of a typed function + % on a line by itself. + \rettypeownlinefalse + \ifdoingtypefn % doing a typed function specifically? + % then check user option for putting return type on its own line: + \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else + \rettypeownlinetrue + \fi + \fi + % + % How we'll format the category name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % - % Figure out line sizes for the paragraph shape. + % Figure out line sizes for the paragraph shape. We'll always have at + % least two. + \tempnum = 2 + % % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % + % If doing a return type on its own line, we'll have another line. + \ifrettypeownline + \advance\tempnum by 1 + \def\maybeshapeline{0in \hsize}% + \else + \def\maybeshapeline{}% + \fi + % % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent - % (plain.tex says that \dimen1 should be used only as global.) - \parshape 2 0in \dimen0 \defargsindent \dimen2 % - % Put the type name to the right margin. + % The final paragraph shape: + \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 + % + % Put the category name at the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize @@ -5325,8 +7063,16 @@ width0pt\relax} \fi % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt - \def\temp{#2}% return value type - \ifx\temp\empty\else \tclose{\temp} \fi + \def\temp{#2}% text of the return type + \ifx\temp\empty\else + \tclose{\temp}% typeset the return type + \ifrettypeownline + % put return type on its own line; prohibit line break following: + \hfil\vadjust{\nobreak}\break + \else + \space % type on same line, so just followed by a space + \fi + \fi % no return type #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm @@ -5346,8 +7092,11 @@ width0pt\relax} \fi \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we - % want a way to get ttsl. Let's try @var for that. - \let\var=\ttslanted + % want a way to get ttsl. We used to recommend @var for that, so + % leave the code in, but it's strange for @var to lead to typewriter. + % Nowadays we recommend @code, since the difference between a ttsl hyphen + % and a tt hyphen is pretty tiny. @code also disables ?` !`. + \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } @@ -5427,12 +7176,14 @@ width0pt\relax} \fi \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } +% these should not use \errmessage; the glibc manual, at least, actually +% has such constructs (when documenting function pointers). \def\badparencount{% - \errmessage{Unbalanced parentheses in @def}% + \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% - \errmessage{Unbalanced square braces in @def}% + \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } @@ -5442,7 +7193,7 @@ width0pt\relax} \fi % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. -\ifx\eTeXversion\undefined +\ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% @@ -5453,26 +7204,30 @@ width0pt\relax} \fi } \fi -\def\scanmacro#1{% - \begingroup - \newlinechar`\^^M - \let\xeatspaces\eatspaces - % Undo catcode changes of \startcontents and \doprintindex - % When called from @insertcopying or (short)caption, we need active - % backslash to get it printed correctly. Previously, we had - % \catcode`\\=\other instead. We'll see whether a problem appears - % with macro expansion. --kasal, 19aug04 - \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ - % ... and \example - \spaceisspace - % - % Append \endinput to make sure that TeX does not see the ending newline. - % - % I've verified that it is necessary both for e-TeX and for ordinary TeX - % --kasal, 29nov03 - \scantokens{#1\endinput}% - \endgroup -} +\def\scanmacro#1{\begingroup + \newlinechar`\^^M + \let\xeatspaces\eatspaces + % + % Undo catcode changes of \startcontents and \doprintindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. Previously, we had + % \catcode`\\=\other instead. We'll see whether a problem appears + % with macro expansion. --kasal, 19aug04 + \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ + % + % ... and for \example: + \spaceisspace + % + % The \empty here causes a following catcode 5 newline to be eaten as + % part of reading whitespace after a control sequence. It does not + % eat a catcode 13 newline. There's no good way to handle the two + % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX + % would then have different behavior). See the Macro Details node in + % the manual for the workaround we recommend for macros and + % line-oriented commands. + % + \scantokens{#1\empty}% +\endgroup} \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% @@ -5482,14 +7237,25 @@ width0pt\relax} \fi \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? -\def\macrolist{} % List of all defined macros in the form - % \do\macro1\do\macro2... + +% List of all defined macros in the form +% \definedummyword\macro1\definedummyword\macro2... +% Currently is also contains all @aliases; the list can be split +% if there is a need. +\def\macrolist{} + +% Add the macro to \macrolist +\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} +\def\addtomacrolistxxx#1{% + \toks0 = \expandafter{\macrolist\definedummyword#1}% + \xdef\macrolist{\the\toks0}% +} % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). -% +% \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname @@ -5515,13 +7281,18 @@ width0pt\relax} \fi % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active -% (as in normal texinfo). It is necessary to change the definition of \. - +% (as in normal texinfo). It is necessary to change the definition of \ +% to recognize macro arguments; this is the job of \mbodybackslash. +% +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. +% % It's necessary to have hard CRs when the macro is executed. This is -% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. - -\def\scanctxt{% +% +\def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other @@ -5531,15 +7302,16 @@ width0pt\relax} \fi \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other + \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } -\def\scanargctxt{% +\def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } -\def\macrobodyctxt{% +\def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other @@ -5547,32 +7319,56 @@ width0pt\relax} \fi \usembodybackslash } -\def\macroargctxt{% +\def\macroargctxt{% used when scanning invocations \scanctxt - \catcode`\\=\other + \catcode`\\=0 } +% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" +% for the single characters \ { }. Thus, we end up with the "commands" +% that would be written @\ @{ @} in a Texinfo document. +% +% We already have @{ and @}. For @\, we define it here, and only for +% this purpose, to produce a typewriter backslash (so, the @\ that we +% define for @math can't be used with @macro calls): +% +\def\\{\normalbackslash}% +% +% We would like to do this for \, too, since that is what makeinfo does. +% But it is not possible, because Texinfo already has a command @, for a +% cedilla accent. Documents must use @comma{} instead. +% +% \anythingelse will almost certainly be an error of some kind. + % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. - +% {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} +\def\margbackslash#1{\char`\#1 } + \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% - \getargs{#1}% now \macname is the macname and \argl the arglist + \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments - \paramno=0% + \paramno=0\relax \else \expandafter\parsemargdef \argl;% + \if\paramno>256\relax + \ifx\eTeXversion\thisisundefined + \errhelp = \EMsimple + \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} + \fi + \fi \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% @@ -5581,10 +7377,7 @@ width0pt\relax} \fi \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% - % Add the macroname to \macrolist - \toks0 = \expandafter{\macrolist\do}% - \xdef\macrolist{\the\toks0 - \expandafter\noexpand\csname\the\macname\endcsname}% + \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody @@ -5598,7 +7391,7 @@ width0pt\relax} \fi % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax - \let\do\unmacrodo + \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else @@ -5610,10 +7403,10 @@ width0pt\relax} \fi % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% - \ifx#1\relax + \ifx #1\relax % remove this \else - \noexpand\do \noexpand #1% + \noexpand\definedummyword \noexpand#1% \fi } @@ -5622,46 +7415,269 @@ width0pt\relax} \fi % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} -\def\getmacname #1 #2\relax{\macname={#1}} +\def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} -% Parse the optional {params} list. Set up \paramno and \paramlist -% so \defmacro knows what to do. Define \macarg.blah for each blah -% in the params list, to be ##N where N is the position in that list. -% That gets used by \mbodybackslash (above). +% For macro processing make @ a letter so that we can make Texinfo private macro names. +\edef\texiatcatcode{\the\catcode`\@} +\catcode `@=11\relax +% Parse the optional {params} list. Set up \paramno and \paramlist +% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH +% in the params list to some hook where the argument si to be expanded. If +% there are less than 10 arguments that hook is to be replaced by ##N where N +% is the position in that list, that is to say the macro arguments are to be +% defined `a la TeX in the macro body. +% +% That gets used by \mbodybackslash (above). +% % We need to get `macro parameter char #' into several definitions. -% The technique used is stolen from LaTeX: let \hash be something +% The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. - -\def\parsemargdef#1;{\paramno=0\def\paramlist{}% - \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} +% +% If there are 10 or more arguments, a different technique is used, where the +% hook remains in the body, and when macro is to be expanded the body is +% processed again to replace the arguments. +% +% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the +% argument N value and then \edef the body (nothing else will expand because of +% the catcode regime underwhich the body was input). +% +% If you compile with TeX (not eTeX), and you have macros with 10 or more +% arguments, you need that no macro has more than 256 arguments, otherwise an +% error is produced. +\def\parsemargdef#1;{% + \paramno=0\def\paramlist{}% + \let\hash\relax + \let\xeatspaces\relax + \parsemargdefxxx#1,;,% + % In case that there are 10 or more arguments we parse again the arguments + % list to set new definitions for the \macarg.BLAH macros corresponding to + % each BLAH argument. It was anyhow needed to parse already once this list + % in order to count the arguments, and as macros with at most 9 arguments + % are by far more frequent than macro with 10 or more arguments, defining + % twice the \macarg.BLAH macros does not cost too much processing power. + \ifnum\paramno<10\relax\else + \paramno0\relax + \parsemmanyargdef@@#1,;,% 10 or more arguments + \fi +} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx - \advance\paramno by 1% + \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} +\def\parsemmanyargdef@@#1,{% + \if#1;\let\next=\relax + \else + \let\next=\parsemmanyargdef@@ + \edef\tempb{\eatspaces{#1}}% + \expandafter\def\expandafter\tempa + \expandafter{\csname macarg.\tempb\endcsname}% + % Note that we need some extra \noexpand\noexpand, this is because we + % don't want \the to be expanded in the \parsermacbody as it uses an + % \xdef . + \expandafter\edef\tempa + {\noexpand\noexpand\noexpand\the\toks\the\paramno}% + \advance\paramno by 1\relax + \fi\next} + % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) +% +\catcode `\@\texiatcatcode \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\catcode `\@=11\relax -% This defines the macro itself. There are six cases: recursive and -% nonrecursive macros of zero, one, and many arguments. +\let\endargs@\relax +\let\nil@\relax +\def\nilm@{\nil@}% +\long\def\nillm@{\nil@}% + +% This macro is expanded during the Texinfo macro expansion, not during its +% definition. It gets all the arguments values and assigns them to macros +% macarg.ARGNAME +% +% #1 is the macro name +% #2 is the list of argument names +% #3 is the list of argument values +\def\getargvals@#1#2#3{% + \def\macargdeflist@{}% + \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. + \def\paramlist{#2,\nil@}% + \def\macroname{#1}% + \begingroup + \macroargctxt + \def\argvaluelist{#3,\nil@}% + \def\@tempa{#3}% + \ifx\@tempa\empty + \setemptyargvalues@ + \else + \getargvals@@ + \fi +} + +% +\def\getargvals@@{% + \ifx\paramlist\nilm@ + % Some sanity check needed here that \argvaluelist is also empty. + \ifx\argvaluelist\nillm@ + \else + \errhelp = \EMsimple + \errmessage{Too many arguments in macro `\macroname'!}% + \fi + \let\next\macargexpandinbody@ + \else + \ifx\argvaluelist\nillm@ + % No more arguments values passed to macro. Set remaining named-arg + % macros to empty. + \let\next\setemptyargvalues@ + \else + % pop current arg name into \@tempb + \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% + \expandafter\@tempa\expandafter{\paramlist}% + % pop current argument value into \@tempc + \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% + \expandafter\@tempa\expandafter{\argvaluelist}% + % Here \@tempb is the current arg name and \@tempc is the current arg value. + % First place the new argument macro definition into \@tempd + \expandafter\macname\expandafter{\@tempc}% + \expandafter\let\csname macarg.\@tempb\endcsname\relax + \expandafter\def\expandafter\@tempe\expandafter{% + \csname macarg.\@tempb\endcsname}% + \edef\@tempd{\long\def\@tempe{\the\macname}}% + \push@\@tempd\macargdeflist@ + \let\next\getargvals@@ + \fi + \fi + \next +} + +\def\push@#1#2{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter#2% + \expandafter\expandafter\expandafter{% + \expandafter#1#2}% +} + +% Replace arguments by their values in the macro body, and place the result +% in macro \@tempa +\def\macvalstoargs@{% + % To do this we use the property that token registers that are \the'ed + % within an \edef expand only once. So we are going to place all argument + % values into respective token registers. + % + % First we save the token context, and initialize argument numbering. + \begingroup + \paramno0\relax + % Then, for each argument number #N, we place the corresponding argument + % value into a new token list register \toks#N + \expandafter\putargsintokens@\saveparamlist@,;,% + % Then, we expand the body so that argument are replaced by their + % values. The trick for values not to be expanded themselves is that they + % are within tokens and that tokens expand only once in an \edef . + \edef\@tempc{\csname mac.\macroname .body\endcsname}% + % Now we restore the token stack pointer to free the token list registers + % which we have used, but we make sure that expanded body is saved after + % group. + \expandafter + \endgroup + \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% + } + +\def\macargexpandinbody@{% + %% Define the named-macro outside of this group and then close this group. + \expandafter + \endgroup + \macargdeflist@ + % First the replace in body the macro arguments by their values, the result + % is in \@tempa . + \macvalstoargs@ + % Then we point at the \norecurse or \gobble (for recursive) macro value + % with \@tempb . + \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname + % Depending on whether it is recursive or not, we need some tailing + % \egroup . + \ifx\@tempb\gobble + \let\@tempc\relax + \else + \let\@tempc\egroup + \fi + % And now we do the real job: + \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% + \@tempd +} + +\def\putargsintokens@#1,{% + \if#1;\let\next\relax + \else + \let\next\putargsintokens@ + % First we allocate the new token list register, and give it a temporary + % alias \@tempb . + \toksdef\@tempb\the\paramno + % Then we place the argument value into that token list register. + \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname + \expandafter\@tempb\expandafter{\@tempa}% + \advance\paramno by 1\relax + \fi + \next +} + +% Save the token stack pointer into macro #1 +\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} +% Restore the token stack pointer from number in macro #1 +\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} +% newtoks that can be used non \outer . +\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} + +% Tailing missing arguments are set to empty +\def\setemptyargvalues@{% + \ifx\paramlist\nilm@ + \let\next\macargexpandinbody@ + \else + \expandafter\setemptyargvaluesparser@\paramlist\endargs@ + \let\next\setemptyargvalues@ + \fi + \next +} + +\def\setemptyargvaluesparser@#1,#2\endargs@{% + \expandafter\def\expandafter\@tempa\expandafter{% + \expandafter\def\csname macarg.#1\endcsname{}}% + \push@\@tempa\macargdeflist@ + \def\paramlist{#2}% +} + +% #1 is the element target macro +% #2 is the list macro +% #3,#4\endargs@ is the list value +\def\pop@#1#2#3,#4\endargs@{% + \def#1{#3}% + \def#2{#4}% +} +\long\def\longpop@#1#2#3,#4\endargs@{% + \long\def#1{#3}% + \long\def#2{#4}% +} + +% This defines a Texinfo @macro. There are eight cases: recursive and +% nonrecursive macros of zero, one, up to nine, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. +% \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive @@ -5676,17 +7692,25 @@ width0pt\relax} \fi \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \else + \ifnum\paramno<10\relax % at most 9 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \else % 10 or more + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble + \fi \fi \else \ifcase\paramno @@ -5703,63 +7727,57 @@ width0pt\relax} \fi \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \expandafter\noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{% - \egroup - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% + \else % at most 9 + \ifnum\paramno<10\relax + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \expandafter\noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % 10 or more: + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse + \fi \fi \fi} +\catcode `\@\texiatcatcode\relax + \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence -% as an argument (by \parsebrace or \parsearg) -\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} +% as an argument (by \parsebrace or \parsearg). +% +\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg - \fi \next} - -% We want to disable all macros during \shipout so that they are not -% expanded by \write. -\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% - \edef\next{\macrolist}\expandafter\endgroup\next} - -% For \indexnofonts, we need to get rid of all macros, leaving only the -% arguments (if present). Of course this is not nearly correct, but it -% is the best we can do for now. makeinfo does not expand macros in the -% argument to @deffn, which ends up writing an index entry, and texindex -% isn't prepared for an index sort entry that starts with \. -% -% Since macro invocations are followed by braces, we can just redefine them -% to take a single TeX argument. The case of a macro invocation that -% goes to end-of-line is not handled. -% -\def\emptyusermacros{\begingroup - \def\do##1{\let\noexpand##1=\noexpand\asis}% - \edef\next{\macrolist}\expandafter\endgroup\next} + \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal -% sign. Just make them active and then expand them all to nothing. +% sign. Make them active and then expand them all to nothing. +% \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty + \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next @@ -5769,13 +7787,13 @@ width0pt\relax} \fi \message{cross references,} \newwrite\auxfile - \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, +\def\inforefzzz #1,#2,#3,#4**{% + \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in @@ -5814,7 +7832,7 @@ width0pt\relax} \fi % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: -% 1) NAME-title - the current sectioning name taken from \thissection, +% 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. @@ -5829,20 +7847,39 @@ width0pt\relax} \fi \iflinks {% \atdummies % preserve commands, but don't expand them - \turnoffactive - \otherbackslash \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% - \toks0 = \expandafter{\thissection}% + \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. - \writexrdef{pg}{\folio}% will be written later, during \shipout + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } +% @xrefautosectiontitle on|off says whether @section(ing) names are used +% automatically in xrefs, if the third arg is not explicitly specified. +% This was provided as a "secret" @set xref-automatic-section-title +% variable, now it's official. +% +\parseargdef\xrefautomaticsectiontitle{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', + must be on|off}% + \fi\fi +} + +% % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed @@ -5851,26 +7888,41 @@ width0pt\relax} \fi \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} +% +\newbox\toprefbox +\newbox\printedrefnamebox +\newbox\infofilenamebox +\newbox\printedmanualbox +% \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces - \def\printedmanual{\ignorespaces #5}% + % + % Get args without leading/trailing spaces. \def\printedrefname{\ignorespaces #3}% - \setbox1=\hbox{\printedmanual\unskip}% - \setbox0=\hbox{\printedrefname\unskip}% - \ifdim \wd0 = 0pt + \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% + % + \def\infofilename{\ignorespaces #4}% + \setbox\infofilenamebox = \hbox{\infofilename\unskip}% + % + \def\printedmanual{\ignorespaces #5}% + \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% + % + % If the printed reference name (arg #3) was not explicitly given in + % the @xref, figure out what we want to use. + \ifdim \wd\printedrefnamebox = 0pt % No printed node name was explicitly given. - \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax - % Use the node name inside the square brackets. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax + % Not auto section-title: use node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else - % Use the actual chapter/section title appear inside - % the square brackets. Use the real section title if we have it. - \ifdim \wd1 > 0pt - % It is in another manual, so we don't have it. + % Auto section-title: use chapter/section title inside + % the square brackets if we have it. + \ifdim \wd\printedmanualbox > 0pt + % It is in another manual, so we don't have it; use node name. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs - % We know the real title if we have the xref values. + % We (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. @@ -5882,18 +7934,32 @@ width0pt\relax} \fi % % Make link in pdf output. \ifpdf - \leavevmode - \getfilename{#4}% - {\turnoffactive \otherbackslash - \ifnum\filenamelength>0 - \startlink attr{/Border [0 0 0]}% - goto file{\the\filename.pdf} name{#1}% + {\indexnofonts + \turnoffactive + \makevalueexpandable + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. + \getfilename{#4}% + % + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \edef\pdfxrefdest{#1}% + \ifx\pdfxrefdest\empty + \def\pdfxrefdest{Top}% no empty targets \else - \startlink attr{/Border [0 0 0]}% - goto name{\pdfmkpgn{#1}}% + \txiescapepdf\pdfxrefdest % escape PDF special chars + \fi + % + \leavevmode + \startlink attr{/Border [0 0 0]}% + \ifnum\filenamelength>0 + goto file{\the\filename.pdf} name{\pdfxrefdest}% + \else + goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% - \linkcolor + \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" @@ -5904,60 +7970,98 @@ width0pt\relax} \fi % include an _ in the xref name, etc. \indexnofonts \turnoffactive - \otherbackslash \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". - \ifdim\wd0 = 0pt - \refx{#1-snt}% + \ifdim\wd\printedrefnamebox = 0pt + \refx{#1-snt}{}% \else \printedrefname \fi % - % if the user also gave the printed manual name (fifth arg), append + % If the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". - \ifdim \wd1 > 0pt + \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. + % + % If we use \unhbox to print the node names, TeX does not insert + % empty discretionaries after hyphens, which means that it will not + % find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, + % this is a loss. Therefore, we give the text of the node name + % again, so it is as if TeX is seeing it for the first time. + % + \ifdim \wd\printedmanualbox > 0pt + % Cross-manual reference with a printed manual name. + % + \crossmanualxref{\cite{\printedmanual\unskip}}% + % + \else\ifdim \wd\infofilenamebox > 0pt + % Cross-manual reference with only an info filename (arg 4), no + % printed manual name (arg 5). This is essentially the same as + % the case above; we output the filename, since we have nothing else. + % + \crossmanualxref{\code{\infofilename\unskip}}% % - % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not - % insert empty discretionaries after hyphens, which means that it will - % not find a line break at a hyphen in a node names. Since some manuals - % are best written with fairly long node names, containing hyphens, this - % is a loss. Therefore, we give the text of the node name again, so it - % is as if TeX is seeing it for the first time. - \ifdim \wd1 > 0pt - \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% \else + % Reference within this manual. + % % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. - {\turnoffactive \otherbackslash + {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% - % output the `[mynode]' via a macro so it can be overridden. + % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. - \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}% - \fi + \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \fi\fi \fi \endlink \endgroup} +% Output a cross-manual xref to #1. Used just above (twice). +% +% Only include the text "Section ``foo'' in" if the foo is neither +% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply +% "see The Foo Manual", the idea being to refer to the whole manual. +% +% But, this being TeX, we can't easily compare our node name against the +% string "Top" while ignoring the possible spaces before and after in +% the input. By adding the arbitrary 7sp below, we make it much less +% likely that a real node name would have the same width as "Top" (e.g., +% in a monospaced font). Hopefully it will never happen in practice. +% +% For the same basic reason, we retypeset the "Top" at every +% reference, since the current font is indeterminate. +% +\def\crossmanualxref#1{% + \setbox\toprefbox = \hbox{Top\kern7sp}% + \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% + \ifdim \wd2 > 7sp % nonempty? + \ifdim \wd2 = \wd\toprefbox \else % same as Top? + \putwordSection{} ``\printedrefname'' \putwordin{}\space + \fi + \fi + #1% +} + % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly @@ -6008,7 +8112,8 @@ width0pt\relax} \fi \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs - \message{\linenumber Undefined cross reference `#1'.}% + {\toks0 = {#1}% avoid expansion of possibly-complex value + \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue @@ -6028,10 +8133,18 @@ width0pt\relax} \fi % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% - \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value. + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. + \indexnofonts + \turnoffactive + \xdef\safexrefname{#1}% + }% + % + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? - \expandafter\iffloat\csname XR#1\endcsname + \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname @@ -6046,7 +8159,8 @@ width0pt\relax} \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. - \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0{#1}}% + \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 + {\safexrefname}}% \fi } @@ -6055,13 +8169,13 @@ width0pt\relax} \fi \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else - \readauxfile + \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } -\def\readauxfile{\begingroup +\def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other @@ -6130,11 +8244,11 @@ width0pt\relax} \fi % % Make the characters 128-255 be printing characters. {% - \count 1=128 + \count1=128 \def\loop{% - \catcode\count 1=\other - \advance\count 1 by 1 - \ifnum \count 1<256 \loop \fi + \catcode\count1=\other + \advance\count1 by 1 + \ifnum \count1<256 \loop \fi }% }% % @@ -6142,8 +8256,12 @@ width0pt\relax} \fi \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 - % - \input \jobname.aux +} + +\def\readdatafile#1{% +\begingroup + \setupdatafile + \input\jobname.#1 \endgroup} @@ -6159,7 +8277,7 @@ width0pt\relax} \fi % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } -% @footnotestyle is meaningful for info output only. +% @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 @@ -6222,6 +8340,8 @@ width0pt\relax} \fi % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut + % + % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 @@ -6229,7 +8349,7 @@ width0pt\relax} \fi % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. -% Similarily, if a @footnote appears inside an alignment, save the footnote +% Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. @@ -6309,7 +8429,7 @@ width0pt\relax} \fi it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% - \ifx\epsfbox\undefined + \ifx\epsfbox\thisisundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% @@ -6325,7 +8445,7 @@ width0pt\relax} \fi % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. -% #6 is just the usual extra ignored arg for parsing this stuff. +% #6 is just the usual extra ignored arg for parsing stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example @@ -6333,15 +8453,30 @@ width0pt\relax} \fi % If the image is by itself, center it. \ifvmode \imagevmodetrue - \nobreak\bigskip + \else \ifx\centersub\centerV + % for @center @image, we need a vbox so we can have our vertical space + \imagevmodetrue + \vbox\bgroup % vbox has better behavior than vtop herev + \fi\fi + % + \ifimagevmode + \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak - \line\bgroup\hss \fi % + % Leave vertical mode so that indentation from an enclosing + % environment such as @quotation is respected. + % However, if we're at the top level, we don't want the + % normal paragraph indentation. + % On the other hand, if we are in the case of @center @image, we don't + % want to start a paragraph, which will create a hsize-width box and + % eradicate the centering. + \ifx\centersub\centerV\else \noindent \fi + % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% @@ -6352,7 +8487,10 @@ width0pt\relax} \fi \epsfbox{#1.eps}% \fi % - \ifimagevmode \hss \egroup \bigbreak \fi % space after the image + \ifimagevmode + \medskip % space after a standalone image + \fi + \ifx\centersub\centerV \egroup \fi \endgroup} @@ -6419,13 +8557,13 @@ width0pt\relax} \fi \global\advance\floatno by 1 % {% - % This magic value for \thissection is output by \setref as the + % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % - \edef\thissection{\floatmagic=\safefloattype}% + \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi @@ -6492,7 +8630,8 @@ width0pt\relax} \fi % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% - \atdummies \turnoffactive \otherbackslash + \atdummies + % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. @@ -6513,8 +8652,9 @@ width0pt\relax} \fi % % place the captured inserts % - % BEWARE: when the floats start float, we have to issue warning whenever an - % insert appears inside a float which could possibly float. --kasal, 26may04 + % BEWARE: when the floats start floating, we have to issue warning + % whenever an insert appears inside a float which could possibly + % float. --kasal, 26may04 % \checkinserts } @@ -6558,7 +8698,7 @@ width0pt\relax} \fi % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic -% \thissection value which we \setref above. +% \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % @@ -6619,39 +8759,909 @@ width0pt\relax} \fi \writeentry }} -\message{localization,} -% and i18n. -% @documentlanguage is usually given very early, just after -% @setfilename. If done too late, it may not override everything -% properly. Single argument is the language abbreviation. -% It would be nice if we could set up a hyphenation file here. +\message{localization,} + +% For single-language documents, @documentlanguage is usually given very +% early, just after @documentencoding. Single argument is the language +% (de) or locale (de_DE) abbreviation. % -\parseargdef\documentlanguage{% +{ + \catcode`\_ = \active + \globaldefs=1 +\parseargdef\documentlanguage{\begingroup + \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. - % Read the file if it exists. + % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 - \errhelp = \nolanghelp - \errmessage{Cannot read language file txi-#1.tex}% + \documentlanguagetrywithoutunderscore{#1_\finish}% \else + \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 - \endgroup -} -\newhelp\nolanghelp{The given language definition file cannot be found or -is empty. Maybe you need to install it? In the current directory -should work if nowhere else does.} - - -% @documentencoding should change something in TeX eventually, most -% likely, but for now just recognize it. -\let\documentencoding = \comment - - -% Page size parameters. + \endgroup % end raw TeX +\endgroup} % +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. +% +\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% + \openin 1 txi-#1.tex + \ifeof 1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% + \else + \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 +} +}% end of special _ catcode +% +\newhelp\nolanghelp{The given language definition file cannot be found or +is empty. Maybe you need to install it? Putting it in the current +directory should work if nowhere else does.} + +% This macro is called from txi-??.tex files; the first argument is the +% \language name to set (without the "\lang@" prefix), the second and +% third args are \{left,right}hyphenmin. +% +% The language names to pass are determined when the format is built. +% See the etex.log file created at that time, e.g., +% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. +% +% With TeX Live 2008, etex now includes hyphenation patterns for all +% available languages. This means we can support hyphenation in +% Texinfo, at least to some extent. (This still doesn't solve the +% accented characters problem.) +% +\catcode`@=11 +\def\txisetlanguage#1#2#3{% + % do not set the language if the name is undefined in the current TeX. + \expandafter\ifx\csname lang@#1\endcsname \relax + \message{no patterns for #1}% + \else + \global\language = \csname lang@#1\endcsname + \fi + % but there is no harm in adjusting the hyphenmin values regardless. + \global\lefthyphenmin = #2\relax + \global\righthyphenmin = #3\relax +} + +% Helpers for encodings. +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 + \catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\parseargdef\documentencoding{% + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \setnonasciicharscatcode\active + \utfeightchardefs + % + \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii +} + +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdef^^a0{\tie} + \gdef^^a1{\exclamdown} + \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} + \gdef^^aa{\ordf} + \gdef^^ab{\guillemetleft} + \gdef^^ac{$\lnot$} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} + \gdef^^b1{$\pm$} + \gdef^^b2{$^2$} + \gdef^^b3{$^3$} + \gdef^^b4{\'{}} + \gdef^^b5{$\mu$} + \gdef^^b6{\P} + % + \gdef^^b7{$^.$} + \gdef^^b8{\cedilla\ } + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % + \gdef^^bb{\guillemetright} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} + \gdef^^bf{\questiondown} + % + \gdef^^c0{\`A} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} + \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} + \gdef^^c9{\'E} + \gdef^^ca{\^E} + \gdef^^cb{\"E} + \gdef^^cc{\`I} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % + \gdef^^d0{\DH} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\~O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\O} + \gdef^^d9{\`U} + \gdef^^da{\'U} + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\TH} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\~a} + \gdef^^e4{\"a} + \gdef^^e5{\ringaccent a} + \gdef^^e6{\ae} + \gdef^^e7{\cedilla c} + \gdef^^e8{\`e} + \gdef^^e9{\'e} + \gdef^^ea{\^e} + \gdef^^eb{\"e} + \gdef^^ec{\`{\dotless i}} + \gdef^^ed{\'{\dotless i}} + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % + \gdef^^f0{\dh} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\~o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\o} + \gdef^^f9{\`u} + \gdef^^fa{\'u} + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\th} + \gdef^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdef^^a4{\euro} + \gdef^^a6{\v S} + \gdef^^a8{\v s} + \gdef^^b4{\v Z} + \gdef^^b8{\v z} + \gdef^^bc{\OE} + \gdef^^bd{\oe} + \gdef^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{\tie} + \gdef^^a1{\ogonek{A}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\v L} + \gdef^^a6{\'S} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\v S} + \gdef^^aa{\cedilla S} + \gdef^^ab{\v T} + \gdef^^ac{\'Z} + \gdef^^ad{\-} + \gdef^^ae{\v Z} + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} + \gdef^^b1{\ogonek{a}} + \gdef^^b2{\ogonek{ }} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} + \gdef^^b6{\'s} + \gdef^^b7{\v{}} + \gdef^^b8{\cedilla\ } + \gdef^^b9{\v s} + \gdef^^ba{\cedilla s} + \gdef^^bb{\v t} + \gdef^^bc{\'z} + \gdef^^bd{\H{}} + \gdef^^be{\v z} + \gdef^^bf{\dotaccent z} + % + \gdef^^c0{\'R} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\u A} + \gdef^^c4{\"A} + \gdef^^c5{\'L} + \gdef^^c6{\'C} + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} + \gdef^^ca{\ogonek{E}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % + \gdef^^d0{\DH} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\H O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} + \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\cedilla T} + \gdef^^df{\ss} + % + \gdef^^e0{\'r} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\u a} + \gdef^^e4{\"a} + \gdef^^e5{\'l} + \gdef^^e6{\'c} + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} + \gdef^^ea{\ogonek{e}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'{\dotless{i}}} + \gdef^^ee{\^{\dotless{i}}} + \gdef^^ef{\v d} + % + \gdef^^f0{\dh} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\H o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\v r} + \gdef^^f9{\ringaccent u} + \gdef^^fa{\'u} + \gdef^^fb{\H u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\cedilla t} + \gdef^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz + +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} +% +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +\begingroup + \catcode`\~13 + \catcode`\"12 + + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiTwoOctets\string~}} + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiThreeOctets\string~}} + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiFourOctets\string~}} + \UTFviiiLoop +\endgroup + +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax + %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% + \csname u8:##1\string ##2\endcsname}% + \def\UTFviiiThreeOctets##1##2##3{% + \csname u8:##1\string ##2\string ##3\endcsname}% + \def\UTFviiiFourOctets##1##2##3##4{% + \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \gdef\UTFviiiTmp{#2}% + \endgroup} + + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctets.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% + \fi\fi\fi + } + + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz + \multiply\countUTFz by 64 + \advance\countUTFx by -\countUTFz + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +\def\utfeightchardefs{% + \DeclareUnicodeCharacter{00A0}{\tie} + \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} + \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} + + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00BA}{\ordm} + \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} + \DeclareUnicodeCharacter{00C1}{\'A} + \DeclareUnicodeCharacter{00C2}{\^A} + \DeclareUnicodeCharacter{00C3}{\~A} + \DeclareUnicodeCharacter{00C4}{\"A} + \DeclareUnicodeCharacter{00C5}{\AA} + \DeclareUnicodeCharacter{00C6}{\AE} + \DeclareUnicodeCharacter{00C7}{\cedilla{C}} + \DeclareUnicodeCharacter{00C8}{\`E} + \DeclareUnicodeCharacter{00C9}{\'E} + \DeclareUnicodeCharacter{00CA}{\^E} + \DeclareUnicodeCharacter{00CB}{\"E} + \DeclareUnicodeCharacter{00CC}{\`I} + \DeclareUnicodeCharacter{00CD}{\'I} + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + + \DeclareUnicodeCharacter{00D0}{\DH} + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} + \DeclareUnicodeCharacter{00D4}{\^O} + \DeclareUnicodeCharacter{00D5}{\~O} + \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D8}{\O} + \DeclareUnicodeCharacter{00D9}{\`U} + \DeclareUnicodeCharacter{00DA}{\'U} + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DE}{\TH} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} + \DeclareUnicodeCharacter{00E1}{\'a} + \DeclareUnicodeCharacter{00E2}{\^a} + \DeclareUnicodeCharacter{00E3}{\~a} + \DeclareUnicodeCharacter{00E4}{\"a} + \DeclareUnicodeCharacter{00E5}{\aa} + \DeclareUnicodeCharacter{00E6}{\ae} + \DeclareUnicodeCharacter{00E7}{\cedilla{c}} + \DeclareUnicodeCharacter{00E8}{\`e} + \DeclareUnicodeCharacter{00E9}{\'e} + \DeclareUnicodeCharacter{00EA}{\^e} + \DeclareUnicodeCharacter{00EB}{\"e} + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + + \DeclareUnicodeCharacter{00F0}{\dh} + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} + \DeclareUnicodeCharacter{00F4}{\^o} + \DeclareUnicodeCharacter{00F5}{\~o} + \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F8}{\o} + \DeclareUnicodeCharacter{00F9}{\`u} + \DeclareUnicodeCharacter{00FA}{\'u} + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FE}{\th} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0104}{\ogonek{A}} + \DeclareUnicodeCharacter{0105}{\ogonek{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{0118}{\ogonek{E}} + \DeclareUnicodeCharacter{0119}{\ogonek{e}} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} + \DeclareUnicodeCharacter{010D}{\v{c}} + \DeclareUnicodeCharacter{010E}{\v{D}} + + \DeclareUnicodeCharacter{0112}{\=E} + \DeclareUnicodeCharacter{0113}{\=e} + \DeclareUnicodeCharacter{0114}{\u{E}} + \DeclareUnicodeCharacter{0115}{\u{e}} + \DeclareUnicodeCharacter{0116}{\dotaccent{E}} + \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{011A}{\v{E}} + \DeclareUnicodeCharacter{011B}{\v{e}} + \DeclareUnicodeCharacter{011C}{\^G} + \DeclareUnicodeCharacter{011D}{\^g} + \DeclareUnicodeCharacter{011E}{\u{G}} + \DeclareUnicodeCharacter{011F}{\u{g}} + + \DeclareUnicodeCharacter{0120}{\dotaccent{G}} + \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0124}{\^H} + \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0128}{\~I} + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} + \DeclareUnicodeCharacter{012A}{\=I} + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} + \DeclareUnicodeCharacter{012C}{\u{I}} + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + + \DeclareUnicodeCharacter{0130}{\dotaccent{I}} + \DeclareUnicodeCharacter{0131}{\dotless{i}} + \DeclareUnicodeCharacter{0132}{IJ} + \DeclareUnicodeCharacter{0133}{ij} + \DeclareUnicodeCharacter{0134}{\^J} + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0139}{\'L} + \DeclareUnicodeCharacter{013A}{\'l} + + \DeclareUnicodeCharacter{0141}{\L} + \DeclareUnicodeCharacter{0142}{\l} + \DeclareUnicodeCharacter{0143}{\'N} + \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0147}{\v{N}} + \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{014C}{\=O} + \DeclareUnicodeCharacter{014D}{\=o} + \DeclareUnicodeCharacter{014E}{\u{O}} + \DeclareUnicodeCharacter{014F}{\u{o}} + + \DeclareUnicodeCharacter{0150}{\H{O}} + \DeclareUnicodeCharacter{0151}{\H{o}} + \DeclareUnicodeCharacter{0152}{\OE} + \DeclareUnicodeCharacter{0153}{\oe} + \DeclareUnicodeCharacter{0154}{\'R} + \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0158}{\v{R}} + \DeclareUnicodeCharacter{0159}{\v{r}} + \DeclareUnicodeCharacter{015A}{\'S} + \DeclareUnicodeCharacter{015B}{\'s} + \DeclareUnicodeCharacter{015C}{\^S} + \DeclareUnicodeCharacter{015D}{\^s} + \DeclareUnicodeCharacter{015E}{\cedilla{S}} + \DeclareUnicodeCharacter{015F}{\cedilla{s}} + + \DeclareUnicodeCharacter{0160}{\v{S}} + \DeclareUnicodeCharacter{0161}{\v{s}} + \DeclareUnicodeCharacter{0162}{\cedilla{t}} + \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0164}{\v{T}} + + \DeclareUnicodeCharacter{0168}{\~U} + \DeclareUnicodeCharacter{0169}{\~u} + \DeclareUnicodeCharacter{016A}{\=U} + \DeclareUnicodeCharacter{016B}{\=u} + \DeclareUnicodeCharacter{016C}{\u{U}} + \DeclareUnicodeCharacter{016D}{\u{u}} + \DeclareUnicodeCharacter{016E}{\ringaccent{U}} + \DeclareUnicodeCharacter{016F}{\ringaccent{u}} + + \DeclareUnicodeCharacter{0170}{\H{U}} + \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0174}{\^W} + \DeclareUnicodeCharacter{0175}{\^w} + \DeclareUnicodeCharacter{0176}{\^Y} + \DeclareUnicodeCharacter{0177}{\^y} + \DeclareUnicodeCharacter{0178}{\"Y} + \DeclareUnicodeCharacter{0179}{\'Z} + \DeclareUnicodeCharacter{017A}{\'z} + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} + \DeclareUnicodeCharacter{017C}{\dotaccent{z}} + \DeclareUnicodeCharacter{017D}{\v{Z}} + \DeclareUnicodeCharacter{017E}{\v{z}} + + \DeclareUnicodeCharacter{01C4}{D\v{Z}} + \DeclareUnicodeCharacter{01C5}{D\v{z}} + \DeclareUnicodeCharacter{01C6}{d\v{z}} + \DeclareUnicodeCharacter{01C7}{LJ} + \DeclareUnicodeCharacter{01C8}{Lj} + \DeclareUnicodeCharacter{01C9}{lj} + \DeclareUnicodeCharacter{01CA}{NJ} + \DeclareUnicodeCharacter{01CB}{Nj} + \DeclareUnicodeCharacter{01CC}{nj} + \DeclareUnicodeCharacter{01CD}{\v{A}} + \DeclareUnicodeCharacter{01CE}{\v{a}} + \DeclareUnicodeCharacter{01CF}{\v{I}} + + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} + \DeclareUnicodeCharacter{01D1}{\v{O}} + \DeclareUnicodeCharacter{01D2}{\v{o}} + \DeclareUnicodeCharacter{01D3}{\v{U}} + \DeclareUnicodeCharacter{01D4}{\v{u}} + + \DeclareUnicodeCharacter{01E2}{\={\AE}} + \DeclareUnicodeCharacter{01E3}{\={\ae}} + \DeclareUnicodeCharacter{01E6}{\v{G}} + \DeclareUnicodeCharacter{01E7}{\v{g}} + \DeclareUnicodeCharacter{01E8}{\v{K}} + \DeclareUnicodeCharacter{01E9}{\v{k}} + + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} + \DeclareUnicodeCharacter{01F1}{DZ} + \DeclareUnicodeCharacter{01F2}{Dz} + \DeclareUnicodeCharacter{01F3}{dz} + \DeclareUnicodeCharacter{01F4}{\'G} + \DeclareUnicodeCharacter{01F5}{\'g} + \DeclareUnicodeCharacter{01F8}{\`N} + \DeclareUnicodeCharacter{01F9}{\`n} + \DeclareUnicodeCharacter{01FC}{\'{\AE}} + \DeclareUnicodeCharacter{01FD}{\'{\ae}} + \DeclareUnicodeCharacter{01FE}{\'{\O}} + \DeclareUnicodeCharacter{01FF}{\'{\o}} + + \DeclareUnicodeCharacter{021E}{\v{H}} + \DeclareUnicodeCharacter{021F}{\v{h}} + + \DeclareUnicodeCharacter{0226}{\dotaccent{A}} + \DeclareUnicodeCharacter{0227}{\dotaccent{a}} + \DeclareUnicodeCharacter{0228}{\cedilla{E}} + \DeclareUnicodeCharacter{0229}{\cedilla{e}} + \DeclareUnicodeCharacter{022E}{\dotaccent{O}} + \DeclareUnicodeCharacter{022F}{\dotaccent{o}} + + \DeclareUnicodeCharacter{0232}{\=Y} + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + + \DeclareUnicodeCharacter{02DB}{\ogonek{ }} + + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} + + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} + + \DeclareUnicodeCharacter{1E20}{\=G} + \DeclareUnicodeCharacter{1E21}{\=g} + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} + \DeclareUnicodeCharacter{1E26}{\"H} + \DeclareUnicodeCharacter{1E27}{\"h} + + \DeclareUnicodeCharacter{1E30}{\'K} + \DeclareUnicodeCharacter{1E31}{\'k} + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} + \DeclareUnicodeCharacter{1E3E}{\'M} + \DeclareUnicodeCharacter{1E3F}{\'m} + + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} + + \DeclareUnicodeCharacter{1E54}{\'P} + \DeclareUnicodeCharacter{1E55}{\'p} + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} + + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} + + \DeclareUnicodeCharacter{1E7C}{\~V} + \DeclareUnicodeCharacter{1E7D}{\~v} + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} + + \DeclareUnicodeCharacter{1E80}{\`W} + \DeclareUnicodeCharacter{1E81}{\`w} + \DeclareUnicodeCharacter{1E82}{\'W} + \DeclareUnicodeCharacter{1E83}{\'w} + \DeclareUnicodeCharacter{1E84}{\"W} + \DeclareUnicodeCharacter{1E85}{\"w} + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} + \DeclareUnicodeCharacter{1E8C}{\"X} + \DeclareUnicodeCharacter{1E8D}{\"x} + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} + + \DeclareUnicodeCharacter{1E90}{\^Z} + \DeclareUnicodeCharacter{1E91}{\^z} + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} + \DeclareUnicodeCharacter{1E97}{\"t} + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} + + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} + + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} + \DeclareUnicodeCharacter{1EBC}{\~E} + \DeclareUnicodeCharacter{1EBD}{\~e} + + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} + + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} + + \DeclareUnicodeCharacter{1EF2}{\`Y} + \DeclareUnicodeCharacter{1EF3}{\`y} + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} + + \DeclareUnicodeCharacter{1EF8}{\~Y} + \DeclareUnicodeCharacter{1EF9}{\~y} + + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} + \DeclareUnicodeCharacter{2018}{\quoteleft} + \DeclareUnicodeCharacter{2019}{\quoteright} + \DeclareUnicodeCharacter{201A}{\quotesinglbase} + \DeclareUnicodeCharacter{201C}{\quotedblleft} + \DeclareUnicodeCharacter{201D}{\quotedblright} + \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{2026}{\dots} + \DeclareUnicodeCharacter{2039}{\guilsinglleft} + \DeclareUnicodeCharacter{203A}{\guilsinglright} + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} + \DeclareUnicodeCharacter{21D2}{\result} + + \DeclareUnicodeCharacter{2212}{\minus} + \DeclareUnicodeCharacter{2217}{\point} + \DeclareUnicodeCharacter{2261}{\equiv} +}% end of \utfeightchardefs + + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt @@ -6661,10 +9671,10 @@ should work if nowhere else does.} % Prevent underfull vbox error messages. \vbadness = 10000 -% Don't be so finicky about underfull hboxes, either. -\hbadness = 2000 +% Don't be very finicky about underfull hboxes, either. +\hbadness = 6666 -% Following George Bush, just get rid of widows and orphans. +% Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 @@ -6682,9 +9692,9 @@ should work if nowhere else does.} \fi } -% Parameters in order: 1) textheight; 2) textwidth; 3) voffset; -% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8) -% physical page width. +% Parameters in order: 1) textheight; 2) textwidth; +% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; +% 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. @@ -6711,6 +9721,10 @@ should work if nowhere else does.} \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax + % if we don't reset these, they will remain at "1 true in" of + % whatever layout pdftex was dumped with. + \pdfhorigin = 1 true in + \pdfvorigin = 1 true in \fi % \setleading{\textleading} @@ -6725,19 +9739,19 @@ should work if nowhere else does.} \textleading = 13.2pt % % If page is nothing but text, make it come out even. - \internalpagesizes{46\baselineskip}{6in}% + \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} -% Use @smallbook to reset parameters for 7x9.5 (or so) format. +% Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% - {\voffset}{.25in}% + {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % @@ -6748,6 +9762,24 @@ should work if nowhere else does.} \defbodyindent = .5cm }} +% Use @smallerbook to reset parameters for 6x9 trim size. +% (Just testing, parameters still in flux.) +\def\smallerbook{{\globaldefs = 1 + \parskip = 1.5pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.4in}{4.8in}% + {-.2in}{-.4in}% + {0pt}{14pt}% + {9in}{6in}% + % + \lispnarrowing = 0.25in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .4cm +}} + % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt @@ -6763,7 +9795,7 @@ should work if nowhere else does.} % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex - \internalpagesizes{51\baselineskip}{160mm} + \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% @@ -6828,7 +9860,7 @@ should work if nowhere else does.} \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % - \dimen0 = #1 + \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize @@ -6847,25 +9879,21 @@ should work if nowhere else does.} \message{and turning on texinfo input format.} +\def^^L{\par} % remove \outer, so ^L can appear in an @comment + +% DEL is a comment character, in case @c does not suffice. +\catcode`\^^? = 14 + % Define macros to output various characters with catcode for normal text. -\catcode`\"=\other -\catcode`\~=\other -\catcode`\^=\other -\catcode`\_=\other -\catcode`\|=\other -\catcode`\<=\other -\catcode`\>=\other -\catcode`\+=\other -\catcode`\$=\other -\def\normaldoublequote{"} -\def\normaltilde{~} -\def\normalcaret{^} -\def\normalunderscore{_} -\def\normalverticalbar{|} -\def\normalless{<} -\def\normalgreater{>} -\def\normalplus{+} -\def\normaldollar{$}%$ font-lock fix +\catcode`\"=\other \def\normaldoublequote{"} +\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix +\catcode`\+=\other \def\normalplus{+} +\catcode`\<=\other \def\normalless{<} +\catcode`\>=\other \def\normalgreater{>} +\catcode`\^=\other \def\normalcaret{^} +\catcode`\_=\other \def\normalunderscore{_} +\catcode`\|=\other \def\normalverticalbar{|} +\catcode`\~=\other \def\normaltilde{~} % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, @@ -6900,6 +9928,7 @@ should work if nowhere else does.} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} +\let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } @@ -6922,6 +9951,13 @@ should work if nowhere else does.} % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, @@ -6929,43 +9965,55 @@ should work if nowhere else does.} \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +% In texinfo, backslash is an active character; it prints the backslash +% in fixed width font. +\catcode`\\=\active % @ for escape char from now on. + +% The story here is that in math mode, the \char of \backslashcurfont +% ends up printing the roman \ from the math symbol font (because \char +% in math mode uses the \mathcode, and plain.tex sets +% \mathcode`\\="026E). It seems better for @backslashchar{} to always +% print a typewriter backslash, hence we use an explicit \mathchar, +% which is the decimal equivalent of "715c (class 7, e.g., use \fam; +% ignored family value; char position "5C). We can't use " for the +% usual hex value because it has already been made active. +@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} +@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. + +% On startup, @fixbackslash assigns: +% @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with -% catcode other. -{\catcode`\\=\active - @gdef@rawbackslash{@let\=@backslashcurfont} - @gdef@otherbackslash{@let\=@realbackslash} -} - -% \realbackslash is an actual character `\' with catcode other. -{\catcode`\\=\other @gdef@realbackslash{\}} - -% \normalbackslash outputs one backslash in fixed width font. -\def\normalbackslash{{\tt\backslashcurfont}} - -\catcode`\\=\active - -% Used sometimes to turn off (effectively) the active characters -% even after parsing them. -@def@turnoffactive{% - @let"=@normaldoublequote - @let\=@realbackslash - @let~=@normaltilde - @let^=@normalcaret - @let_=@normalunderscore - @let|=@normalverticalbar - @let<=@normalless - @let>=@normalgreater - @let+=@normalplus - @let$=@normaldollar %$ font-lock fix - @unsepspaces -} +% catcode other. We switch back and forth between these. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of -% the literal character `\'. (Thus, \ is not expandable when this is in -% effect.) +% the literal character `\'. Also revert - to its normal character, in +% case the active - from code has slipped in. % -@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} +{@catcode`- = @active + @gdef@normalturnoffactive{% + @let-=@normaldash + @let"=@normaldoublequote + @let$=@normaldollar %$ font-lock fix + @let+=@normalplus + @let<=@normalless + @let>=@normalgreater + @let\=@normalbackslash + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let~=@normaltilde + @markupsetuplqdefault + @markupsetuprqdefault + @unsepspaces + } +} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @@ -6979,9 +10027,9 @@ should work if nowhere else does.} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then -% the first `\{ in the file would cause an error. This macro tries to fix +% the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. -% Also back turn on active characters that might appear in the input +% Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @@ -6993,11 +10041,28 @@ should work if nowhere else does.} % Say @foo, not \foo, in error messages. @escapechar = `@@ -% These look ok in all fonts, so just make them not special. -@catcode`@& = @other -@catcode`@# = @other -@catcode`@% = @other +% These (along with & and #) are made active for url-breaking, so need +% active definitions as the normal characters. +@def@normaldot{.} +@def@normalquest{?} +@def@normalslash{/} +% These look ok in all fonts, so just make them not special. +% @hashchar{} gets its own user-level command, because of #line. +@catcode`@& = @other @def@normalamp{&} +@catcode`@# = @other @def@normalhash{#} +@catcode`@% = @other @def@normalpercent{%} + +@let @hashchar = @normalhash + +@c Finally, make ` and ' active, so that txicodequoteundirected and +@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we +@c don't make ` and ' active, @code will not get them as active chars. +@c Do this last of all since we use ` in the previous @catcode assignments. +@catcode`@'=@active +@catcode`@`=@active +@markupsetuplqdefault +@markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/doc/version.texi b/doc/version.texi index 41b19a30d5c..9a4feda60f5 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 20 April 2006 -@set UPDATED-MONTH April 2006 -@set EDITION 6.1.5 -@set VERSION 6.1.5 +@set UPDATED 28 October 2014 +@set UPDATED-MONTH October 2014 +@set EDITION 6.2 +@set VERSION 6.2 diff --git a/fixmount/Makefile.am b/fixmount/Makefile.am new file mode 100644 index 00000000000..7f51c5798ff --- /dev/null +++ b/fixmount/Makefile.am @@ -0,0 +1,40 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Makefile for fixmount/ directory +# Author: Erez Zadok + +sbin_PROGRAMS = fixmount + +# man pages +man_MANS = fixmount.8 + +# headers this depends on, not to be installed +#noinst_HEADERS = + +fixmount_SOURCES = fixmount.c +EXTRA_fixmount_OBJECTS = check_mount.o +LDADD = $(EXTRA_fixmount_OBJECTS) ../libamu/libamu.la + +AM_CPPFLAGS = -I$(top_srcdir)/include + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) +DISTCLEANFILES = check_mount.c + +# dependencies +$(PROGRAMS): $(LDADD) +$(fixmount_OBJECTS) $(EXTRA_fixmount_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) diff --git a/fixmount/Makefile.in b/fixmount/Makefile.in new file mode 100644 index 00000000000..62873a060c2 --- /dev/null +++ b/fixmount/Makefile.in @@ -0,0 +1,740 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Makefile for fixmount/ directory +# Author: Erez Zadok + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +sbin_PROGRAMS = fixmount$(EXEEXT) +subdir = fixmount +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" +PROGRAMS = $(sbin_PROGRAMS) +am_fixmount_OBJECTS = fixmount.$(OBJEXT) +fixmount_OBJECTS = $(am_fixmount_OBJECTS) +fixmount_LDADD = $(LDADD) +fixmount_DEPENDENCIES = $(EXTRA_fixmount_OBJECTS) ../libamu/libamu.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(fixmount_SOURCES) +DIST_SOURCES = $(fixmount_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# man pages +man_MANS = fixmount.8 + +# headers this depends on, not to be installed +#noinst_HEADERS = +fixmount_SOURCES = fixmount.c +EXTRA_fixmount_OBJECTS = check_mount.o +LDADD = $(EXTRA_fixmount_OBJECTS) ../libamu/libamu.la +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) +DISTCLEANFILES = check_mount.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu fixmount/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu fixmount/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +fixmount$(EXEEXT): $(fixmount_OBJECTS) $(fixmount_DEPENDENCIES) $(EXTRA_fixmount_DEPENDENCIES) + @rm -f fixmount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fixmount_OBJECTS) $(fixmount_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fixmount.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man8: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-sbinPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man uninstall-sbinPROGRAMS + +uninstall-man: uninstall-man8 + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man8 install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-man uninstall-man8 uninstall-sbinPROGRAMS + + +# dependencies +$(PROGRAMS): $(LDADD) +$(fixmount_OBJECTS) $(EXTRA_fixmount_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/fixmount/fixmount.8 b/fixmount/fixmount.8 index e4b700b9eeb..0c61ffab268 100644 --- a/fixmount/fixmount.8 +++ b/fixmount/fixmount.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1990 Jan-Simon Pendry .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -36,9 +32,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %W% (Berkeley) %G% .\" -.\" $Id: fixmount.8,v 1.12.2.1 2006/01/02 18:48:25 ezk Exp $ +.\" File: am-utils/fixmount/fixmount.8 .\" .TH FIXMOUNT 8 "26 Feb 1993" .SH NAME @@ -61,7 +56,7 @@ fixmount \- fix remote mount entries is a variant of .BR showmount (8) that can delete bogus mount entries in remote -.BR mountd (8C) +.BR mountd (8) daemons. The actions specified by the options are performed for each .I host diff --git a/fixmount/fixmount.c b/fixmount/fixmount.c index c7c69102a55..9465f30d758 100644 --- a/fixmount/fixmount.c +++ b/fixmount/fixmount.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -115,7 +111,7 @@ is_same_host(char *name1, char *name2, struct in_addr addr2) } else if (!(he = gethostbyname(name1))) { return 0; } else { - xstrlcpy(lasthost, name1, MAXHOSTNAMELEN); + xstrlcpy(lasthost, name1, sizeof(lasthost)); memcpy(&addr1, he->h_addr, sizeof(addr1)); return (addr1.s_addr == addr2.s_addr); } @@ -176,7 +172,7 @@ remove_mount(CLIENT *client, char *host, mountlist ml, int fixit) (XDRPROC_T_TYPE) xdr_dirpath, (char *) &pathp, (XDRPROC_T_TYPE) xdr_void, - (char *) 0, + (char *) NULL, tv)) != RPC_SUCCESS) { fprintf(stderr, "%s:%s MOUNTPROC_UMNT: ", host, ml->ml_directory); @@ -235,9 +231,9 @@ remove_all(CLIENT *client, char *host) if ((estat = clnt_call(client, MOUNTPROC_UMNTALL, (XDRPROC_T_TYPE) xdr_void, - (char *) 0, + (char *) NULL, (XDRPROC_T_TYPE) xdr_void, - (char *) 0, + (char *) NULL, tv)) != RPC_SUCCESS) { /* * RPC_SYSTEMERROR is returned even if all went well @@ -389,7 +385,7 @@ main(int argc, char *argv[]) if ((estat = clnt_call(client, MOUNTPROC_DUMP, (XDRPROC_T_TYPE) xdr_void, - (char *) 0, + (char *) NULL, (XDRPROC_T_TYPE) xdr_mountlist, (char *) &mntdump, tv)) != RPC_SUCCESS) { @@ -403,7 +399,7 @@ main(int argc, char *argv[]) if ((estat = clnt_call(client, MOUNTPROC_EXPORT, (XDRPROC_T_TYPE) xdr_void, - (char *) 0, + (char *) NULL, (XDRPROC_T_TYPE) xdr_exports, (char *) &mntexports, tv)) != RPC_SUCCESS) { diff --git a/fsinfo/Makefile.am b/fsinfo/Makefile.am new file mode 100644 index 00000000000..a9051d50def --- /dev/null +++ b/fsinfo/Makefile.am @@ -0,0 +1,68 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Makefile for fsinfo/ directory +# Author: Erez Zadok + +sbin_PROGRAMS = fsinfo + +# man pages +man_MANS = fsinfo.8 + +YLWRAP = $(top_srcdir)/ylwrap.amd + +# headers this depends on, not to be installed +noinst_HEADERS = fsi_data.h fsinfo.h + +# sources needed: note .y and .l files have to be first +fsinfo_SOURCES = \ + fsi_gram.y \ + fsi_lex.l \ + null_lex.l \ + null_gram.y \ + \ + fsi_analyze.c \ + fsi_dict.c \ + fsi_util.c \ + fsinfo.c \ + wr_atab.c \ + wr_bparam.c \ + wr_dumpset.c \ + wr_exportfs.c \ + wr_fstab.c + +# sources which get auto-built (from yacc/lex) +BUILT_SOURCES = fsi_gram.c fsi_gram.h fsi_lex.c \ + null_gram.c null_gram.h null_lex.c + +EXTRA_DIST = $(man_MANS) +# do not distribute files that should be generated by lex/yacc locally +dist-hook: + (cd $(distdir) && rm -f fsi_gram.c fsi_gram.h fsi_lex.c) + +# clean these files, which get automatically generated by yacc/lex +CLEANFILES = $(BUILT_SOURCES) + +LDADD = $(EXTRA_fsinfo_OBJECTS) ../libamu/libamu.la +# must manually add f/lex library to LIBS, and not to LDADD. +LIBS = @LIBS@ @LEXLIB@ + +AM_CPPFLAGS = -I$(top_srcdir)/include + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AM_CFLAGS = $(AMU_CFLAGS) +AM_YFLAGS = -d + +# dependencies +$(PROGRAMS): $(LDADD) +$(fsinfo_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) diff --git a/fsinfo/Makefile.in b/fsinfo/Makefile.in new file mode 100644 index 00000000000..0d165b6da4d --- /dev/null +++ b/fsinfo/Makefile.in @@ -0,0 +1,830 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Makefile for fsinfo/ directory +# Author: Erez Zadok + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +sbin_PROGRAMS = fsinfo$(EXEEXT) +subdir = fsinfo +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs fsi_gram.h fsi_gram.c fsi_lex.c \ + null_lex.c null_gram.h null_gram.c $(top_srcdir)/depcomp \ + $(top_srcdir)/ylwrap $(noinst_HEADERS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" +PROGRAMS = $(sbin_PROGRAMS) +am_fsinfo_OBJECTS = fsi_gram.$(OBJEXT) fsi_lex.$(OBJEXT) \ + null_lex.$(OBJEXT) null_gram.$(OBJEXT) fsi_analyze.$(OBJEXT) \ + fsi_dict.$(OBJEXT) fsi_util.$(OBJEXT) fsinfo.$(OBJEXT) \ + wr_atab.$(OBJEXT) wr_bparam.$(OBJEXT) wr_dumpset.$(OBJEXT) \ + wr_exportfs.$(OBJEXT) wr_fstab.$(OBJEXT) +fsinfo_OBJECTS = $(am_fsinfo_OBJECTS) +fsinfo_LDADD = $(LDADD) +fsinfo_DEPENDENCIES = ../libamu/libamu.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) +AM_V_LEX = $(am__v_LEX_@AM_V@) +am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) +am__v_LEX_0 = @echo " LEX " $@; +am__v_LEX_1 = +@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_@AM_V@) +am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) +am__v_YACC_0 = @echo " YACC " $@; +am__v_YACC_1 = +SOURCES = $(fsinfo_SOURCES) +DIST_SOURCES = $(fsinfo_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +# must manually add f/lex library to LIBS, and not to LDADD. +LIBS = @LIBS@ @LEXLIB@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# man pages +man_MANS = fsinfo.8 +YLWRAP = $(top_srcdir)/ylwrap.amd + +# headers this depends on, not to be installed +noinst_HEADERS = fsi_data.h fsinfo.h + +# sources needed: note .y and .l files have to be first +fsinfo_SOURCES = \ + fsi_gram.y \ + fsi_lex.l \ + null_lex.l \ + null_gram.y \ + \ + fsi_analyze.c \ + fsi_dict.c \ + fsi_util.c \ + fsinfo.c \ + wr_atab.c \ + wr_bparam.c \ + wr_dumpset.c \ + wr_exportfs.c \ + wr_fstab.c + + +# sources which get auto-built (from yacc/lex) +BUILT_SOURCES = fsi_gram.c fsi_gram.h fsi_lex.c \ + null_gram.c null_gram.h null_lex.c + +EXTRA_DIST = $(man_MANS) + +# clean these files, which get automatically generated by yacc/lex +CLEANFILES = $(BUILT_SOURCES) +LDADD = $(EXTRA_fsinfo_OBJECTS) ../libamu/libamu.la +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(AMU_CFLAGS) +AM_YFLAGS = -d +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .l .lo .o .obj .y +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu fsinfo/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu fsinfo/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +fsi_gram.h: fsi_gram.c + @if test ! -f $@; then rm -f fsi_gram.c; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) fsi_gram.c; else :; fi +null_gram.h: null_gram.c + @if test ! -f $@; then rm -f null_gram.c; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) null_gram.c; else :; fi + +fsinfo$(EXEEXT): $(fsinfo_OBJECTS) $(fsinfo_DEPENDENCIES) $(EXTRA_fsinfo_DEPENDENCIES) + @rm -f fsinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsinfo_OBJECTS) $(fsinfo_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsi_analyze.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsi_dict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsi_gram.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsi_lex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsi_util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_gram.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_lex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wr_atab.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wr_bparam.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wr_dumpset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wr_exportfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wr_fstab.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +.l.c: + $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + +.y.c: + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man8: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f fsi_gram.c + -rm -f fsi_gram.h + -rm -f fsi_lex.c + -rm -f null_gram.c + -rm -f null_gram.h + -rm -f null_lex.c + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-sbinPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man uninstall-sbinPROGRAMS + +uninstall-man: uninstall-man8 + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ + dist-hook distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man8 install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-man uninstall-man8 uninstall-sbinPROGRAMS + +# do not distribute files that should be generated by lex/yacc locally +dist-hook: + (cd $(distdir) && rm -f fsi_gram.c fsi_gram.h fsi_lex.c) + +# dependencies +$(PROGRAMS): $(LDADD) +$(fsinfo_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/fsinfo/fsi_analyze.c b/fsinfo/fsi_analyze.c index 9da40978e62..78598b85464 100644 --- a/fsinfo/fsi_analyze.c +++ b/fsinfo/fsi_analyze.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -56,27 +52,27 @@ char *disk_fs_strings[] = { - "fstype", "opts", "dumpset", "passno", "freq", "mount", "log", 0, + "fstype", "opts", "dumpset", "passno", "freq", "mount", "log", NULL, }; char *mount_strings[] = { - "volname", "exportfs", 0, + "volname", "exportfs", NULL, }; char *fsmount_strings[] = { - "as", "volname", "fstype", "opts", "from", 0, + "as", "volname", "fstype", "opts", "from", NULL, }; char *host_strings[] = { - "host", "netif", "config", "arch", "cluster", "os", 0, + "host", "netif", "config", "arch", "cluster", "os", NULL, }; char *ether_if_strings[] = { - "inaddr", "netmask", "hwaddr", 0, + "inaddr", "netmask", "hwaddr", NULL, }; @@ -122,7 +118,7 @@ compute_hostpath(char *hn) do { d = strrchr(p, '.'); if (d) { - *d = 0; + *d = '\0'; xstrlcat(path, d + 1, sizeof(path)); xstrlcat(path, "/", sizeof(path)); } else { @@ -141,7 +137,7 @@ static dict_ent * find_volname(char *nn) { dict_ent *de; - char *p = strdup(nn); + char *p = xstrdup(nn); char *q; do { @@ -186,7 +182,7 @@ check_exportfs(qelem *q, fsi_mount *e) lwarning(mp->m_ioloc, "%s has duplicate exportfs data", mp->m_name); mp->m_exported = mp; if (!ISSET(mp->m_mask, DM_VOLNAME)) - set_mount(mp, DM_VOLNAME, strdup(mp->m_name)); + set_mount(mp, DM_VOLNAME, xstrdup(mp->m_name)); } else { mp->m_exported = e; } @@ -228,7 +224,7 @@ analyze_dkmount_tree(qelem *q, fsi_mount *parent, disk_fs *dk) lwarning(mp->m_ioloc, "sub-directory of %s is named \"default\"", parent->m_name); fsi_log("Changing name %s to %s", mp->m_name, n); XFREE(mp->m_name); - mp->m_name = strdup(n); + mp->m_name = xstrdup(n); } mp->m_name_len = strlen(mp->m_name); @@ -251,7 +247,7 @@ static int analyze_dkmounts(disk_fs *dk, qelem *q) { int errors = 0; - fsi_mount *mp, *mp2 = 0; + fsi_mount *mp, *mp2 = NULL; int i = 0; /* @@ -286,7 +282,7 @@ analyze_dkmounts(disk_fs *dk, qelem *q) char nbuf[1024]; compute_automount_point(nbuf, sizeof(nbuf), dk->d_host, mp2->m_volname); XFREE(mp2->m_name); - mp2->m_name = strdup(nbuf); + mp2->m_name = xstrdup(nbuf); fsi_log("%s:%s has default mount on %s", dk->d_host->h_hostname, dk->d_dev, mp2->m_name); } else { lerror(dk->d_ioloc, "no volname given for %s:%s", dk->d_host->h_hostname, dk->d_dev); @@ -298,19 +294,19 @@ analyze_dkmounts(disk_fs *dk, qelem *q) * Fill in the disk mount point */ if (!errors && mp2 && mp2->m_name) - dk->d_mountpt = strdup(mp2->m_name); + dk->d_mountpt = xstrdup(mp2->m_name); else - dk->d_mountpt = strdup("error"); + dk->d_mountpt = xstrdup("error"); /* * Analyze the mount tree */ - errors += analyze_dkmount_tree(q, 0, dk); + errors += analyze_dkmount_tree(q, NULL, dk); /* * Analyze the export tree */ - errors += check_exportfs(q, 0); + errors += check_exportfs(q, NULL); return errors; } @@ -353,7 +349,7 @@ fixup_required_disk_info(disk_fs *dp) * "opts" */ if (!ISSET(dp->d_mask, DF_OPTS)) - set_disk_fs(dp, DF_OPTS, strdup("swap")); + set_disk_fs(dp, DF_OPTS, xstrdup("swap")); /* * "mount" @@ -362,7 +358,7 @@ fixup_required_disk_info(disk_fs *dp) qelem *q = new_que(); fsi_mount *m = new_mount(); - m->m_name = strdup("swap"); + m->m_name = xstrdup("swap"); m->m_mount = new_que(); ins_que(&m->m_q, q->q_back); dp->d_mount = q; @@ -400,7 +396,7 @@ fixup_required_disk_info(disk_fs *dp) * "opts" */ if (!ISSET(dp->d_mask, DF_OPTS)) - set_disk_fs(dp, DF_OPTS, strdup("rw,defaults")); + set_disk_fs(dp, DF_OPTS, xstrdup("rw,defaults")); } } @@ -415,7 +411,7 @@ fixup_required_mount_info(fsmount *fp, dict_ent *de) lerror(fp->f_ioloc, "ambiguous mount: %s is a replicated filesystem", fp->f_volname); } else { dict_data *dd; - fsi_mount *mp = 0; + fsi_mount *mp = NULL; dd = AM_FIRST(dict_data, &de->de_q); mp = (fsi_mount *) dd->dd_data; if (!mp) @@ -427,18 +423,18 @@ fixup_required_mount_info(fsmount *fp, dict_ent *de) } if (!ISSET(fp->f_mask, FM_FSTYPE)) { - set_fsmount(fp, FM_FSTYPE, strdup("nfs")); + set_fsmount(fp, FM_FSTYPE, xstrdup("nfs")); fsi_log("set: fstype is %s", fp->f_fstype); } if (!ISSET(fp->f_mask, FM_OPTS)) { - set_fsmount(fp, FM_OPTS, strdup("rw,nosuid,grpid,defaults")); + set_fsmount(fp, FM_OPTS, xstrdup("rw,nosuid,grpid,defaults")); fsi_log("set: opts are %s", fp->f_opts); } if (!ISSET(fp->f_mask, FM_LOCALNAME)) { if (fp->f_ref) { - set_fsmount(fp, FM_LOCALNAME, strdup(fp->f_volname)); + set_fsmount(fp, FM_LOCALNAME, xstrdup(fp->f_volname)); fsi_log("set: localname is %s", fp->f_localname); } else { lerror(fp->f_ioloc, "cannot determine localname since volname %s is not uniquely defined", fp->f_volname); @@ -485,7 +481,7 @@ analyze_mounts(host *hp) ITER(fp, fsmount, q) { char *p; - char *nn = strdup(fp->f_volname); + char *nn = xstrdup(fp->f_volname); int req; dict_ent *de = (dict_ent *) NULL; int found = 0; @@ -496,7 +492,7 @@ analyze_mounts(host *hp) matched = 1; } else do { - p = 0; + p = NULL; de = find_volname(nn); fsi_log("Mount: %s (trying %s)", fp->f_volname, nn); @@ -511,7 +507,7 @@ analyze_mounts(host *hp) */ if (ISSET(fp->f_mask, FM_FROM) && !ISSET(fp->f_mask, FM_DIRECT)) { dict_data *dd; - fsi_mount *mp2 = 0; + fsi_mount *mp2 = NULL; ITER(dd, dict_data, &de->de_q) { fsi_mount *mp = (fsi_mount *) dd->dd_data; @@ -535,7 +531,7 @@ analyze_mounts(host *hp) } p = strrchr(nn, '/'); if (p) - *p = 0; + *p = '\0'; } while (de && p); XFREE(nn); @@ -635,7 +631,7 @@ analyze_automount_tree(qelem *q, char *pref, int lvl) lerror(ap->a_ioloc, "not allowed '/' in a directory name"); xsnprintf(nname, sizeof(nname), "%s/%s", pref, ap->a_name); XFREE(ap->a_name); - ap->a_name = strdup(nname[1] == '/' ? nname + 1 : nname); + ap->a_name = xstrdup(nname[1] == '/' ? nname + 1 : nname); fsi_log("automount point %s:", ap->a_name); show_new("ana-automount"); @@ -649,7 +645,7 @@ analyze_automount_tree(qelem *q, char *pref, int lvl) } else if (ap->a_symlink) { fsi_log("\tsymlink to %s", ap->a_symlink); } else { - ap->a_volname = strdup(ap->a_name); + ap->a_volname = xstrdup(ap->a_name); fsi_log("\timplicit automount from %s", ap->a_volname); analyze_automount(ap); } diff --git a/fsinfo/fsi_data.h b/fsinfo/fsi_data.h index 8276caf36cb..4cc341d85a6 100644 --- a/fsinfo/fsi_data.h +++ b/fsinfo/fsi_data.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/fsinfo/fsi_dict.c b/fsinfo/fsi_dict.c index 29cd1a3ed08..b909783b61e 100644 --- a/fsinfo/fsi_dict.c +++ b/fsinfo/fsi_dict.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/fsinfo/fsi_gram.y b/fsinfo/fsi_gram.y index 961a89f1af4..85d19aa5cda 100644 --- a/fsinfo/fsi_gram.y +++ b/fsinfo/fsi_gram.y @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -200,7 +196,7 @@ automount : opt_auto_opts : /* empty */ - { $$ = strdup(""); } + { $$ = xstrdup(""); } | tOPTS tSTR { $$ = $2; } @@ -233,7 +229,7 @@ filesystem : { $4->d_dev = $2; $$ = $4; } | tFS error '}' - { $$ = (disk_fs *) 0; } + { $$ = (disk_fs *) NULL; } ; /* diff --git a/fsinfo/fsi_lex.l b/fsinfo/fsi_lex.l index 6bca59b4dee..4d09e2c55e7 100644 --- a/fsinfo/fsi_lex.l +++ b/fsinfo/fsi_lex.l @@ -1,6 +1,6 @@ %{ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -17,11 +17,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -102,7 +98,7 @@ static int ayylineno; */ #ifdef FLEX_SCANNER # ifndef ECHO -# define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +# define ECHO __IGNORE(fwrite( yytext, yyleng, 1, yyout )) # endif /* not ECHO */ #endif /* FLEX_SCANNER */ @@ -111,9 +107,11 @@ static int ayylineno; * which automatically generates yywrap macros and symbols. So I must * distinguish between them and when yywrap is actually needed. */ -#ifndef yywrap +#if !defined(yywrap) || defined(yylex) int yywrap(void); -#endif /* not yywrap */ +#endif /* not yywrap or yylex */ + +int fsi_error(const char *, ...); YYSTYPE yylval; static char *fsi_filename; @@ -153,7 +151,7 @@ struct r { { "passno", tPASSNO }, { "sel", tSEL }, { "volname", tVOLNAME }, - { 0, 0 }, + { NULL, 0 }, }; #define NRES_WORDS (sizeof(rr)/sizeof(rr[0])-1) @@ -162,6 +160,7 @@ struct r { /* This option causes Solaris lex to fail. Use flex. See BUGS file */ /* no need to use yyunput() */ %option nounput +%option noinput /* allocate more output slots so lex scanners don't run out of mem */ %o 1024 @@ -177,7 +176,7 @@ struct r { [={}] { return *yytext; } \" { BEGIN Q; optr = ostr; quoted = 1; } -\n { ayylineno++; yyerror("\" expected"); BEGIN F; } +\n { ayylineno++; fsi_error("\" expected"); BEGIN F; } \\b { *optr++ = '\b'; /* escape */ } \\t { *optr++ = '\t'; /* escape */ } \\\" { *optr++ = '\"'; /* escape */ } @@ -187,11 +186,11 @@ struct r { \\n { *optr++ = '\n'; /* escape */ } \\f { *optr++ = '\f'; /* escape */ } "\\ " { *optr++ = ' '; /* force space */ } -\\. { yyerror("Unknown \\ sequence"); } +\\. { fsi_error("Unknown \\ sequence"); } ([ \t]|"\\\n"){2,} { char *p = (char *) yytext-1; while ((p = strchr(p+1, '\n'))) ayylineno++; } \" { BEGIN F; quoted = 0; *optr = '\0'; - yylval.s = strdup(ostr); + yylval.s = xstrdup(ostr); return tSTR; } . { *optr++ = *yytext; } @@ -224,11 +223,11 @@ find_resword(char *s) switch (tok) { case tLOCALHOST: s = "${host}"; - /* fall through... */ + /*FALLTHROUGH*/ case 0: - yylval.s = strdup(s); + yylval.s = xstrdup(s); tok = tSTR; - /* fall through... */ + /*FALLTHROUGH*/ default: return tok; } @@ -236,7 +235,7 @@ find_resword(char *s) int -yyerror(char *fmt, ...) +fsi_error(const char *fmt, ...) { va_list ap; @@ -266,9 +265,9 @@ current_location(void) * which automatically generates yywrap macros and symbols. So I must * distinguish between them and when yywrap is actually needed. */ -#ifndef yywrap +#if !defined(yywrap) || defined(yylex) int yywrap(void) { return 1; } -#endif /* not yywrap */ +#endif /* not yywrap or yylex */ diff --git a/fsinfo/fsi_util.c b/fsinfo/fsi_util.c index 5e7571fd4db..f8ff313cc42 100644 --- a/fsinfo/fsi_util.c +++ b/fsinfo/fsi_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -13,11 +13,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -201,7 +197,7 @@ gen_hdr(FILE *ef, char *hn) static void make_banner(FILE *fp) { - time_t t = time((time_t *) 0); + time_t t = time((time_t *) NULL); char *cp = ctime(&t); fprintf(fp, @@ -235,7 +231,7 @@ show_new(char *msg) void show_area_being_processed(char *area, int n) { - static char *last_area = 0; + static char *last_area = NULL; if (verbose < 0) return; @@ -316,9 +312,9 @@ new_automount(char *name) ap->a_ioloc = current_location(); ap->a_name = name; - ap->a_volname = 0; - ap->a_mount = 0; - ap->a_opts = 0; + ap->a_volname = NULL; + ap->a_mount = NULL; + ap->a_opts = NULL; show_new("automount"); return ap; } @@ -355,7 +351,7 @@ set_host(host *hp, int k, char *v) int m = 1 << k; if (hp->h_mask & m) { - yyerror("host field \"%s\" already set", host_strings[k]); + fsi_error("host field \"%s\" already set", host_strings[k]); return; } hp->h_mask |= m; @@ -363,11 +359,11 @@ set_host(host *hp, int k, char *v) switch (k) { case HF_HOST:{ - char *p = strdup(v); + char *p = xstrdup(v); dict_ent *de = dict_locate(dict_of_hosts, v); if (de) - yyerror("duplicate host %s!", v); + fsi_error("duplicate host %s!", v); else dict_add(dict_of_hosts, v, (char *) hp); hp->h_hostname = v; @@ -442,7 +438,7 @@ set_ether_if(ether_if *ep, int k, char *v) int m = 1 << k; if (ep->e_mask & m) { - yyerror("netif field \"%s\" already set", ether_if_strings[k]); + fsi_error("netif field \"%s\" already set", ether_if_strings[k]); return; } ep->e_mask |= m; @@ -452,7 +448,7 @@ set_ether_if(ether_if *ep, int k, char *v) case EF_INADDR:{ ep->e_inaddr.s_addr = inet_addr(v); if ((int) ep->e_inaddr.s_addr == (int) INADDR_NONE) - yyerror("malformed IP dotted quad: %s", v); + fsi_error("malformed IP dotted quad: %s", v); XFREE(v); } break; @@ -463,7 +459,7 @@ set_ether_if(ether_if *ep, int k, char *v) if ((sscanf(v, "0x%lx", &nm) == 1 || sscanf(v, "%lx", &nm) == 1) && nm != 0) ep->e_netmask = htonl(nm); else - yyerror("malformed netmask: %s", v); + fsi_error("malformed netmask: %s", v); XFREE(v); } break; @@ -485,7 +481,7 @@ set_disk_fs(disk_fs *dp, int k, char *v) int m = 1 << k; if (dp->d_mask & m) { - yyerror("fs field \"%s\" already set", disk_fs_strings[k]); + fsi_error("fs field \"%s\" already set", disk_fs_strings[k]); return; } dp->d_mask |= m; @@ -546,7 +542,7 @@ set_mount(fsi_mount *mp, int k, char *v) int m = 1 << k; if (mp->m_mask & m) { - yyerror("mount tree field \"%s\" already set", mount_strings[k]); + fsi_error("mount tree field \"%s\" already set", mount_strings[k]); return; } mp->m_mask |= m; @@ -590,7 +586,7 @@ set_fsmount(fsmount *fp, int k, char *v) int m = 1 << k; if (fp->f_mask & m) { - yyerror("mount field \"%s\" already set", fsmount_strings[k]); + fsi_error("mount field \"%s\" already set", fsmount_strings[k]); return; } fp->f_mask |= m; diff --git a/fsinfo/fsinfo.8 b/fsinfo/fsinfo.8 index f893eb24bd8..e47af86f768 100644 --- a/fsinfo/fsinfo.8 +++ b/fsinfo/fsinfo.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1993 Jan-Simon Pendry. .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -12,11 +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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -32,8 +28,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)fsinfo.8 8.1 (Berkeley) 6/28/93 -.\" $Id: fsinfo.8,v 1.13.2.1 2006/01/02 18:48:25 ezk Exp $ +.\" +.\" File: am-utils/fsinfo/fsinfo.8 .\" .TH FSINFO 8 "June 28, 1993" .SH NAME diff --git a/fsinfo/fsinfo.c b/fsinfo/fsinfo.c index e441a47fab4..93122eabbbb 100644 --- a/fsinfo/fsinfo.c +++ b/fsinfo/fsinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -213,7 +209,7 @@ find_username(void) if (!u) u = "root"; - return strdup(u); + return xstrdup(u); } @@ -258,7 +254,7 @@ main(int argc, char *argv[]) * Parse input */ show_area_being_processed("read config", 11); - if (yyparse()) + if (fsi_parse()) errors = 1; errors += file_io_errors + parse_errors; diff --git a/fsinfo/fsinfo.h b/fsinfo/fsinfo.h index 99b407b04bf..7a871631a0c 100644 --- a/fsinfo/fsinfo.h +++ b/fsinfo/fsinfo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -104,7 +100,7 @@ extern void show_area_being_processed(char *area, int n); extern void show_new(char *msg); extern void warning(void); -extern int yyerror(char *fmt, ...) +extern int fsi_error(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2))); extern void domain_strip(char *otherdom, char *localdom); /* @@ -115,7 +111,7 @@ extern void domain_strip(char *otherdom, char *localdom); #ifndef yywrap extern int yywrap(void); #endif /* not yywrap */ -extern int yyparse(void); +extern int fsi_parse(void); extern int write_atab(qelem *q); extern int write_bootparams(qelem *q); extern int write_dumpset(qelem *q); @@ -124,7 +120,7 @@ extern int write_fstab(qelem *q); extern void col_cleanup(int eoj); extern void set_host(host *hp, int k, char *v); extern void set_ether_if(ether_if *ep, int k, char *v); -extern int yylex(void); +extern int fsi_lex(void); #define BITSET(m,b) ((m) |= (1<<(b))) diff --git a/fsinfo/null_gram.c b/fsinfo/null_gram.c new file mode 100644 index 00000000000..9b4e9f4a1cc --- /dev/null +++ b/fsinfo/null_gram.c @@ -0,0 +1,1414 @@ +/* A Bison parser, made by GNU Bison 3.0.2. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "3.0.2" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + +/* Substitute the variable and function names. */ +#define yyparse null_parse +#define yylex null_lex +#define yyerror null_error +#define yydebug null_debug +#define yynerrs null_nerrs + +#define yylval null_lval +#define yychar null_char + +/* Copy the first part of user declarations. */ +#line 1 "../../fsinfo/null_gram.y" /* yacc.c:339 */ + +void yyerror(const char *fmt, ...); +extern int yylex(void); + +#line 79 "null_gram.c" /* yacc.c:339 */ + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "y.tab.h". */ +#ifndef YY_NULL_NULL_GRAM_H_INCLUDED +# define YY_NULL_NULL_GRAM_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int null_debug; +#endif + + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE null_lval; + +int null_parse (void); + +#endif /* !YY_NULL_NULL_GRAM_H_INCLUDED */ + +/* Copy the second part of user declarations. */ + +#line 126 "null_gram.c" /* yacc.c:358 */ + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 0 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 3 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 2 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 2 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 3 + +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 257 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_uint8 yyrline[] = +{ + 0, 8, 8 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 0 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "$accept", "token", YY_NULLPTR +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257 +}; +# endif + +#define YYPACT_NINF -1 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-1))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int8 yypact[] = +{ + -1, 0, -1 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 1 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -1, -1 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 1 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_uint8 yytable[] = +{ + 2 +}; + +static const yytype_uint8 yycheck[] = +{ + 0 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 4, 0 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 3, 4 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + YYUSE (yytype); +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +{ + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) +{ + unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +yystrlen (const char *yystr) +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +yystpcpy (char *yydest, const char *yysrc) +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +{ + YYUSE (yyvaluep); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (void) +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = yylex (); + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + +#line 1188 "null_gram.c" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + return yyresult; +} diff --git a/fsinfo/null_gram.h b/fsinfo/null_gram.h new file mode 100644 index 00000000000..77c4ac78ff4 --- /dev/null +++ b/fsinfo/null_gram.h @@ -0,0 +1,56 @@ +/* A Bison parser, made by GNU Bison 3.0.2. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_NULL_NULL_GRAM_H_INCLUDED +# define YY_NULL_NULL_GRAM_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int null_debug; +#endif + + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE null_lval; + +int null_parse (void); + +#endif /* !YY_NULL_NULL_GRAM_H_INCLUDED */ diff --git a/fsinfo/null_gram.y b/fsinfo/null_gram.y new file mode 100644 index 00000000000..d7313b9c49c --- /dev/null +++ b/fsinfo/null_gram.y @@ -0,0 +1,8 @@ +%{ +void yyerror(const char *fmt, ...); +extern int yylex(void); +%} + +%% + +token: diff --git a/fsinfo/null_lex.c b/fsinfo/null_lex.c new file mode 100644 index 00000000000..b890445686e --- /dev/null +++ b/fsinfo/null_lex.c @@ -0,0 +1,1716 @@ + +#line 3 "lex.null_.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer null__create_buffer +#define yy_delete_buffer null__delete_buffer +#define yy_flex_debug null__flex_debug +#define yy_init_buffer null__init_buffer +#define yy_flush_buffer null__flush_buffer +#define yy_load_buffer_state null__load_buffer_state +#define yy_switch_to_buffer null__switch_to_buffer +#define yyin null_in +#define yyleng null_leng +#define yylex null_lex +#define yylineno null_lineno +#define yyout null_out +#define yyrestart null_restart +#define yytext null_text +#define yywrap null_wrap +#define yyalloc null_alloc +#define yyrealloc null_realloc +#define yyfree null_free + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE null_restart(null_in ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +extern int null_leng; + +extern FILE *null_in, *null_out; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up null_text. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up null_text again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via null_restart()), so that the user can continue scanning by + * just pointing null_in at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when null_text is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int null_leng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow null_wrap()'s to do buffer switches + * instead of setting up a fresh null_in. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void null_restart (FILE *input_file ); +void null__switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE null__create_buffer (FILE *file,int size ); +void null__delete_buffer (YY_BUFFER_STATE b ); +void null__flush_buffer (YY_BUFFER_STATE b ); +void null_push_buffer_state (YY_BUFFER_STATE new_buffer ); +void null_pop_buffer_state (void ); + +static void null_ensure_buffer_stack (void ); +static void null__load_buffer_state (void ); +static void null__init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER null__flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE null__scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE null__scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE null__scan_bytes (yyconst char *bytes,int len ); + +void *null_alloc (yy_size_t ); +void *null_realloc (void *,yy_size_t ); +void null_free (void * ); + +#define yy_new_buffer null__create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + null_ensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + null__create_buffer(null_in,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + null_ensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + null__create_buffer(null_in,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +typedef unsigned char YY_CHAR; + +FILE *null_in = (FILE *) 0, *null_out = (FILE *) 0; + +typedef int yy_state_type; + +extern int null_lineno; + +int null_lineno = 1; + +extern char *null_text; +#define yytext_ptr null_text + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up null_text. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + null_leng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 1 +#define YY_END_OF_BUFFER 2 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[6] = + { 0, + 0, 0, 2, 1, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[2] = + { 0, + 1 + } ; + +static yyconst flex_int16_t yy_base[7] = + { 0, + 0, 0, 2, 3, 3, 0 + } ; + +static yyconst flex_int16_t yy_def[7] = + { 0, + 6, 6, 5, 5, 0, 5 + } ; + +static yyconst flex_int16_t yy_nxt[5] = + { 0, + 4, 5, 3, 5 + } ; + +static yyconst flex_int16_t yy_chk[5] = + { 0, + 6, 3, 5, 5 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int null__flex_debug; +int null__flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *null_text; +#line 1 "../../fsinfo/null_lex.l" +#line 2 "../../fsinfo/null_lex.l" +#include "null_gram.h" + +void null_error(const char *fmt, ...) {} +int null_wrap(void) { return 0; } +#define YY_NO_INPUT 1 +#line 481 "lex.null_.c" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int null_lex_destroy (void ); + +int null_get_debug (void ); + +void null_set_debug (int debug_flag ); + +YY_EXTRA_TYPE null_get_extra (void ); + +void null_set_extra (YY_EXTRA_TYPE user_defined ); + +FILE *null_get_in (void ); + +void null_set_in (FILE * in_str ); + +FILE *null_get_out (void ); + +void null_set_out (FILE * out_str ); + +int null_get_leng (void ); + +char *null_get_text (void ); + +int null_get_lineno (void ); + +void null_set_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int null_wrap (void ); +#else +extern int null_wrap (void ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( null_text, null_leng, 1, null_out )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( null_in )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( null_in ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, null_in))==0 && ferror(null_in)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(null_in); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int null_lex (void); + +#define YY_DECL int null_lex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after null_text and null_leng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 9 "../../fsinfo/null_lex.l" + +#line 668 "lex.null_.c" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! null_in ) + null_in = stdin; + + if ( ! null_out ) + null_out = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + null_ensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + null__create_buffer(null_in,YY_BUF_SIZE ); + } + + null__load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of null_text. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 6 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 3 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 10 "../../fsinfo/null_lex.l" +ECHO; + YY_BREAK +#line 756 "lex.null_.c" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed null_in at a new source and called + * null_lex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = null_in; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( null_wrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * null_text, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of null_lex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + null_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + null_restart(null_in ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) null_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 6 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 6 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 5); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + null_restart(null_in ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( null_wrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve null_text */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void null_restart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + null_ensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + null__create_buffer(null_in,YY_BUF_SIZE ); + } + + null__init_buffer(YY_CURRENT_BUFFER,input_file ); + null__load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void null__switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * null_pop_buffer_state(); + * null_push_buffer_state(new_buffer); + */ + null_ensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + null__load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (null_wrap()) processing, but the only time this flag + * is looked at is after null_wrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void null__load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + null_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE null__create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) null_alloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in null__create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) null_alloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in null__create_buffer()" ); + + b->yy_is_our_buffer = 1; + + null__init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with null__create_buffer() + * + */ + void null__delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + null_free((void *) b->yy_ch_buf ); + + null_free((void *) b ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a null_restart() or at EOF. + */ + static void null__init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + null__flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then null__init_buffer was _probably_ + * called from null_restart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void null__flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + null__load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void null_push_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + null_ensure_buffer_stack(); + + /* This block is copied from null__switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from null__switch_to_buffer. */ + null__load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void null_pop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + null__delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + null__load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void null_ensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)null_alloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in null_ensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)null_realloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in null_ensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE null__scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) null_alloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in null__scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + null__switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to null_lex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * null__scan_bytes() instead. + */ +YY_BUFFER_STATE null__scan_string (yyconst char * yystr ) +{ + + return null__scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to null_lex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE null__scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) null_alloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in null__scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = null__scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in null__scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up null_text. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + null_text[null_leng] = (yy_hold_char); \ + (yy_c_buf_p) = null_text + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + null_leng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int null_get_lineno (void) +{ + + return null_lineno; +} + +/** Get the input stream. + * + */ +FILE *null_get_in (void) +{ + return null_in; +} + +/** Get the output stream. + * + */ +FILE *null_get_out (void) +{ + return null_out; +} + +/** Get the length of the current token. + * + */ +int null_get_leng (void) +{ + return null_leng; +} + +/** Get the current token. + * + */ + +char *null_get_text (void) +{ + return null_text; +} + +/** Set the current line number. + * @param line_number + * + */ +void null_set_lineno (int line_number ) +{ + + null_lineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see null__switch_to_buffer + */ +void null_set_in (FILE * in_str ) +{ + null_in = in_str ; +} + +void null_set_out (FILE * out_str ) +{ + null_out = out_str ; +} + +int null_get_debug (void) +{ + return null__flex_debug; +} + +void null_set_debug (int bdebug ) +{ + null__flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from null_lex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + null_in = stdin; + null_out = stdout; +#else + null_in = (FILE *) 0; + null_out = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * null_lex_init() + */ + return 0; +} + +/* null_lex_destroy is for both reentrant and non-reentrant scanners. */ +int null_lex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + null__delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + null_pop_buffer_state(); + } + + /* Destroy the stack itself. */ + null_free((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * null_lex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *null_alloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *null_realloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void null_free (void * ptr ) +{ + free( (char *) ptr ); /* see null_realloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 10 "../../fsinfo/null_lex.l" diff --git a/fsinfo/null_lex.l b/fsinfo/null_lex.l new file mode 100644 index 00000000000..46bb46381e4 --- /dev/null +++ b/fsinfo/null_lex.l @@ -0,0 +1,9 @@ +%{ +#include "null_gram.h" + +void null_error(const char *fmt, ...) {} +int yywrap(void) { return 0; } +%} +%option nounput +%option noinput +%% diff --git a/fsinfo/wr_atab.c b/fsinfo/wr_atab.c index e02db07f05f..ac132aa76dc 100644 --- a/fsinfo/wr_atab.c +++ b/fsinfo/wr_atab.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/fsinfo/wr_bparam.c b/fsinfo/wr_bparam.c index 9220762f2b1..00befa9cf58 100644 --- a/fsinfo/wr_bparam.c +++ b/fsinfo/wr_bparam.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -56,7 +52,7 @@ static int write_nfsname(FILE *ef, fsmount *fp, char *hn) { int errors = 0; - char *h = strdup(fp->f_ref->m_dk->d_host->h_hostname); + char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname); domain_strip(h, hn); fprintf(ef, "%s:%s", h, fp->f_volname); diff --git a/fsinfo/wr_dumpset.c b/fsinfo/wr_dumpset.c index 69c1257e265..916f95a5a23 100644 --- a/fsinfo/wr_dumpset.c +++ b/fsinfo/wr_dumpset.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/fsinfo/wr_exportfs.c b/fsinfo/wr_exportfs.c index 818d893687c..c6e7936dd16 100644 --- a/fsinfo/wr_exportfs.c +++ b/fsinfo/wr_exportfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/fsinfo/wr_fstab.c b/fsinfo/wr_fstab.c index 52cebbf27e1..166353eb00f 100644 --- a/fsinfo/wr_fstab.c +++ b/fsinfo/wr_fstab.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -89,7 +85,7 @@ static struct os_fstab_type { "u4_0", write_ultrix_dkfstab, write_ultrix_dkrmount }, /* Ultrix */ { - 0, 0, 0 + NULL, NULL, NULL } }; @@ -102,7 +98,7 @@ static struct os_fstab_type { static void write_aix1_dkfstab(FILE *ef, disk_fs *dp) { - char *hp = strdup(dp->d_host->h_hostname); + char *hp = xstrdup(dp->d_host->h_hostname); char *p = strchr(hp, '.'); if (p) @@ -123,8 +119,8 @@ write_aix1_dkfstab(FILE *ef, disk_fs *dp) static void write_aix1_dkrmount(FILE *ef, char *hn, fsmount *fp) { - char *h = strdup(fp->f_ref->m_dk->d_host->h_hostname); - char *hp = strdup(h); + char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname); + char *hp = xstrdup(h); char *p = strchr(hp, '.'); if (p) @@ -172,7 +168,7 @@ write_aix3_dkfstab(FILE *ef, disk_fs *dp) static void write_aix3_dkrmount(FILE *ef, char *hn, fsmount *fp) { - char *h = strdup(fp->f_ref->m_dk->d_host->h_hostname); + char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname); domain_strip(h, hn); fprintf(ef, "\n%s:\n\tdev = %s:%s\n\tvfs = %s\n\ttype = %s\n\tvol = %s\n\topts = %s\n\tmount = true\n\tcheck = true\n\tfree = false\n", @@ -206,7 +202,7 @@ write_ultrix_dkfstab(FILE *ef, disk_fs *dp) static void write_ultrix_dkrmount(FILE *ef, char *hn, fsmount *fp) { - char *h = strdup(fp->f_ref->m_dk->d_host->h_hostname); + char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname); domain_strip(h, hn); fprintf(ef, "%s@%s:%s:%s:%s:0:0\n", @@ -243,9 +239,9 @@ write_generic_dkrmount(FILE *ef, char *hn, fsmount *fp) char *h; if (fp->f_ref) { - h = strdup(fp->f_ref->m_dk->d_host->h_hostname); + h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname); } else { - h = strdup(fp->f_from); + h = xstrdup(fp->f_from); } domain_strip(h, hn); fprintf(ef, "%s:%s %s %s %s 0 0\n", @@ -261,8 +257,8 @@ write_generic_dkrmount(FILE *ef, char *hn, fsmount *fp) static struct os_fstab_type * find_fstab_type(host *hp) { - struct os_fstab_type *op = 0; - char *os_name = 0; + struct os_fstab_type *op = NULL; + char *os_name = NULL; again:; if (os_name == 0) { diff --git a/hlfsd/Makefile.am b/hlfsd/Makefile.am new file mode 100644 index 00000000000..959cd8daede --- /dev/null +++ b/hlfsd/Makefile.am @@ -0,0 +1,43 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Makefile for hlfsd/ directory +# Author: Erez Zadok + +sbin_PROGRAMS = hlfsd + +# man pages +man_MANS = hlfsd.8 + +# headers this depends on, not to be installed +noinst_HEADERS = hlfsd.h + +hlfsd_SOURCES = \ + hlfsd.c \ + homedir.c \ + nfs_prot_svc.c \ + stubs.c + +LDADD = ../libamu/libamu.la + +AM_CPPFLAGS = -I$(top_srcdir)/include + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) + +# dependencies +$(PROGRAMS): $(LDADD) +$(hlfsd_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) diff --git a/hlfsd/Makefile.in b/hlfsd/Makefile.in new file mode 100644 index 00000000000..7640b3470bf --- /dev/null +++ b/hlfsd/Makefile.in @@ -0,0 +1,749 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Makefile for hlfsd/ directory +# Author: Erez Zadok + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +sbin_PROGRAMS = hlfsd$(EXEEXT) +subdir = hlfsd +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ + $(noinst_HEADERS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" +PROGRAMS = $(sbin_PROGRAMS) +am_hlfsd_OBJECTS = hlfsd.$(OBJEXT) homedir.$(OBJEXT) \ + nfs_prot_svc.$(OBJEXT) stubs.$(OBJEXT) +hlfsd_OBJECTS = $(am_hlfsd_OBJECTS) +hlfsd_LDADD = $(LDADD) +hlfsd_DEPENDENCIES = ../libamu/libamu.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(hlfsd_SOURCES) +DIST_SOURCES = $(hlfsd_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# man pages +man_MANS = hlfsd.8 + +# headers this depends on, not to be installed +noinst_HEADERS = hlfsd.h +hlfsd_SOURCES = \ + hlfsd.c \ + homedir.c \ + nfs_prot_svc.c \ + stubs.c + +LDADD = ../libamu/libamu.la +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hlfsd/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu hlfsd/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +hlfsd$(EXEEXT): $(hlfsd_OBJECTS) $(hlfsd_DEPENDENCIES) $(EXTRA_hlfsd_DEPENDENCIES) + @rm -f hlfsd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(hlfsd_OBJECTS) $(hlfsd_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hlfsd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/homedir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nfs_prot_svc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubs.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man8: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-sbinPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man uninstall-sbinPROGRAMS + +uninstall-man: uninstall-man8 + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man8 install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-man uninstall-man8 uninstall-sbinPROGRAMS + + +# dependencies +$(PROGRAMS): $(LDADD) +$(hlfsd_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/hlfsd/hlfsd.8 b/hlfsd/hlfsd.8 index 8c6fb49a989..aadc8e716f8 100644 --- a/hlfsd/hlfsd.8 +++ b/hlfsd/hlfsd.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1989 Jan-Simon Pendry .\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -36,7 +32,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: hlfsd.8,v 1.11.2.1 2006/01/02 18:48:25 ezk Exp $ +.\" +.\" File: am-utils/hlfsd/hlfsd.8 .\" .\" HLFSD was written at Columbia University Computer Science Department, by .\" Erez Zadok and Alexander Dupuy @@ -285,16 +282,16 @@ symbolic link returned by points if it is unable to verify the that user's home directory is accessible. .SH "SEE ALSO" +.BR mail(1), +.BR getgrent (3), +.BR getpwent (3), +.BR mnttab (4), +.BR passwd (4), +.BR mtab (5), .BR amd (8), .BR automount (8), .BR cron(8), -.BR getgrent (3), -.BR getpwent (3), -.BR mail(1), -.BR mnttab (4), .BR mount (8), -.BR mtab (5), -.BR passwd (4), .BR sendmail (8), .BR umount (8). .LP diff --git a/hlfsd/hlfsd.c b/hlfsd/hlfsd.c index 8703f5982c5..686bb63db23 100644 --- a/hlfsd/hlfsd.c +++ b/hlfsd/hlfsd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -82,7 +78,7 @@ char *alt_spooldir = ALT_SPOOLDIR; char *home_subdir = HOME_SUBDIR; char *logfile = DEFAULT_LOGFILE; char *passwdfile = NULL; /* alternate passwd file to use */ -char *slinkname = 0; +char *slinkname = NULL; char hostname[MAXHOSTNAMELEN + 1] = "localhost"; u_int cache_interval = DEFAULT_CACHE_INTERVAL; gid_t hlfs_gid = (gid_t) INVALIDID; @@ -102,6 +98,7 @@ char *mnttab_file_name = NULL; /* forward declarations */ void hlfsd_going_down(int rc); +void fatalerror(char *str); static void @@ -260,9 +257,6 @@ main(int argc, char *argv[]) opterrs++; } - /* set some default debugging options */ - if (xlog_level_init == ~0) - switch_option(""); /* need my pid before any dlog/plog */ am_set_mypid(); #ifdef DEBUG @@ -312,7 +306,11 @@ main(int argc, char *argv[]) } /* get hostname for logging and open log before we reset umask */ - gethostname(hostname, sizeof(hostname)); + if (gethostname(hostname, sizeof(hostname)) == -1) { + fprintf(stderr, "%s: gethostname failed \"%s\".\n", + am_get_progname(), strerror(errno)); + exit(1); + } hostname[sizeof(hostname) - 1] = '\0'; if ((dot = strchr(hostname, '.')) != NULL) *dot = '\0'; @@ -418,11 +416,8 @@ main(int argc, char *argv[]) /* * Register hlfsd as an nfs service with the portmapper. */ -#ifdef HAVE_TRANSPORT_TYPE_TLI - ret = create_nfs_service(&soNFS, &nfs_port, &nfsxprt, nfs_program_2); -#else /* not HAVE_TRANSPORT_TYPE_TLI */ - ret = create_nfs_service(&soNFS, &nfs_port, &nfsxprt, nfs_program_2); -#endif /* not HAVE_TRANSPORT_TYPE_TLI */ + ret = create_nfs_service(&soNFS, &nfs_port, &nfsxprt, nfs_program_2, + NFS_VERSION); if (ret != 0) fatal("cannot create NFS service"); @@ -450,10 +445,10 @@ main(int argc, char *argv[]) #endif /* not HAVE_SIGACTION */ /* - * In the parent, if -D daemon, we don't need to + * In the parent, if -D nodaemon, we don't need to * set this signal handler. */ - if (!amuDebug(D_DAEMON)) { + if (amuDebug(D_DAEMON)) { s = -99; while (stoplight != SIGUSR2) { plog(XLOG_INFO, "parent waits for child to setup (stoplight=%d)", stoplight); @@ -628,10 +623,10 @@ main(int argc, char *argv[]) plog(XLOG_INFO, "hlfsd ready to serve"); /* - * If asked not to fork a daemon (-D daemon), then hlfsd_init() + * If asked not to fork a daemon (-D nodaemon), then hlfsd_init() * will not run svc_run. We must start svc_run here. */ - if (amuDebug(D_DAEMON)) { + if (!amuDebug(D_DAEMON)) { plog(XLOG_DEBUG, "starting no-daemon debugging svc_run"); svc_run(); } @@ -656,9 +651,9 @@ hlfsd_init(void) hlfsd_init_filehandles(); /* - * If not -D daemon then we must fork. + * If -D daemon then we must fork. */ - if (!amuDebug(D_DAEMON)) + if (amuDebug(D_DAEMON)) child = fork(); if (child < 0) @@ -745,17 +740,17 @@ hlfsd_init(void) # endif /* not defined(DEBUG) || defined(DEBUG_PRINT) */ #endif /* not HAVE_SIGACTION */ - if (setitimer(ITIMER_REAL, &reloadinterval, (struct itimerval *) 0) < 0) + if (setitimer(ITIMER_REAL, &reloadinterval, (struct itimerval *) NULL) < 0) fatal("setitimer: %m"); clocktime(&startup); /* - * If not -D daemon, then start serving here in the child, - * and the parent will exit. But if -D daemon, then + * If -D daemon, then start serving here in the child, + * and the parent will exit. But if -D nodaemon, then * skip this code and make sure svc_run is entered elsewhere. */ - if (!amuDebug(D_DAEMON)) { + if (amuDebug(D_DAEMON)) { /* * Dissociate from the controlling terminal */ @@ -839,7 +834,7 @@ cleanup(int signum) struct stat stbuf; int umount_result; - if (!amuDebug(D_DAEMON)) { + if (amuDebug(D_DAEMON)) { if (getpid() != masterpid) return; @@ -865,7 +860,7 @@ cleanup(int signum) break; } - if (!amuDebug(D_DAEMON)) { + if (amuDebug(D_DAEMON)) { plog(XLOG_INFO, "cleanup(): killing processes and terminating"); kill(masterpid, SIGKILL); kill(serverpid, SIGKILL); diff --git a/hlfsd/hlfsd.h b/hlfsd/hlfsd.h index ed136b6f230..d5eefedfa61 100644 --- a/hlfsd/hlfsd.h +++ b/hlfsd/hlfsd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/hlfsd/homedir.c b/hlfsd/homedir.c index d60c39f2c2c..462b42380ca 100644 --- a/hlfsd/homedir.c +++ b/hlfsd/homedir.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -133,9 +129,10 @@ homedir(int userid, int groupid) } /* - * only run this forking code if did not ask for -D fork + * Only run this forking code if ask for -D fork (default). + * Disable forking using -D nofork. */ - if (!amuDebug(D_FORK)) { + if (amuDebug(D_FORK)) { /* fork child to process request if none in progress */ if (found->child && kill(found->child, 0)) found->child = 0; @@ -265,13 +262,14 @@ delay(uid2home_t *found, int secs) { struct timeval tv; - dlog("delaying on child %ld for %d seconds", (long) found->child, secs); + if (found) + dlog("delaying on child %ld for %d seconds", (long) found->child, secs); tv.tv_usec = 0; do { tv.tv_sec = secs; - if (select(0, 0, 0, 0, &tv) == 0) + if (select(0, NULL, NULL, NULL, &tv) == 0) break; } while (--secs && found->child); } @@ -292,7 +290,7 @@ interlock(int signum) #ifdef HAVE_WAITPID while ((child = waitpid((pid_t) -1, &status, WNOHANG)) > 0) { #else /* not HAVE_WAITPID */ - while ((child = wait3(&status, WNOHANG, (struct rusage *) 0)) > 0) { + while ((child = wait3(&status, WNOHANG, (struct rusage *) NULL)) > 0) { #endif /* not HAVE_WAITPID */ /* high chances this was the last child forked */ @@ -560,7 +558,7 @@ plt_init(void) int len; if (root_home) XFREE(root_home); - root_home = strdup(pent_p->pw_dir); + root_home = xstrdup(pent_p->pw_dir); len = strlen(root_home); /* remove any trailing '/' chars from root's home (even if just one) */ while (len > 0 && root_home[len - 1] == '/') { @@ -577,7 +575,7 @@ plt_init(void) unt_compare_fxn); if (!root_home) - root_home = strdup(""); + root_home = xstrdup(""); plog(XLOG_INFO, "password map read and sorted"); } @@ -672,14 +670,14 @@ table_add(u_int u, const char *h, const char *n) } /* add new password entry */ - pwtab[cur_pwtab_num].home = strdup(h); + pwtab[cur_pwtab_num].home = xstrdup(h); pwtab[cur_pwtab_num].child = 0; pwtab[cur_pwtab_num].last_access_time = 0; pwtab[cur_pwtab_num].last_status = 0; /* assume best: used homedir */ pwtab[cur_pwtab_num].uid = u; /* add new userhome entry */ - untab[cur_pwtab_num].username = strdup(n); + untab[cur_pwtab_num].username = xstrdup(n); /* just a second pointer */ pwtab[cur_pwtab_num].uname = untab[cur_pwtab_num].username; diff --git a/hlfsd/nfs_prot_svc.c b/hlfsd/nfs_prot_svc.c index 8cea0dca700..babaa846a22 100644 --- a/hlfsd/nfs_prot_svc.c +++ b/hlfsd/nfs_prot_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/hlfsd/stubs.c b/hlfsd/stubs.c index 3b31043efc2..b26e5f4dc63 100644 --- a/hlfsd/stubs.c +++ b/hlfsd/stubs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -137,7 +133,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) clocktime(&rootfattr.na_mtime); rootfattr.na_uid = uid; } -#endif +#endif /* 0 */ res.ns_status = NFS_OK; res.ns_u.ns_attr_u = rootfattr; } else if (eq_fh(argp, &slink)) { @@ -240,7 +236,7 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp) clocktime(&rootfattr.na_mtime); rootfattr.na_uid = uid; } -#endif +#endif /* 0 */ res.dr_u.dr_drok_u.drok_fhandle = root; res.dr_u.dr_drok_u.drok_attributes = rootfattr; res.dr_status = NFS_OK; @@ -306,7 +302,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) uid_t userid = (uid_t) INVALIDID; gid_t groupid = hlfs_gid + 1; /* anything not hlfs_gid */ int retval = 0; - char *path_val = (char *) NULL; + char *path_val = NULL; char *username; static uid_t last_uid = (uid_t) INVALIDID; @@ -327,7 +323,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) * processing, by getting a NULL returned as a * "special". Child returns result. */ - return (nfsreadlinkres *) NULL; + return NULL; } } else { /* check if asked for user mailbox */ @@ -373,14 +369,15 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) retval = 0; /* - * If asked for -D fork, then must return the value, + * If asked for -D nofork, then must return the value, * NOT exit, or else the main hlfsd server exits. + * If -D fork (default), then we do want to exit from the process. * Bug: where is that status information being collected? */ if (amuDebug(D_FORK)) + exit(retval); + else return &res; - - exit(retval); } @@ -478,7 +475,7 @@ nfsreaddirres * nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp) { static nfsreaddirres res; - static nfsentry slinkent = {SLINKID, 0, {SLINKCOOKIE}}; + static nfsentry slinkent = {SLINKID, NULL, {SLINKCOOKIE}}; static nfsentry dotdotent = {ROOTID, "..", {DOTDOTCOOKIE}, &slinkent}; static nfsentry dotent = {ROOTID, ".", {DOTCOOKIE}, &dotdotent}; @@ -501,7 +498,7 @@ nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp) res.rdr_u.rdr_reply_u.dl_entries = &slinkent; break; case SLINKCOOKIE: - res.rdr_u.rdr_reply_u.dl_entries = (nfsentry *) 0; + res.rdr_u.rdr_reply_u.dl_entries = (nfsentry *) NULL; break; } res.rdr_u.rdr_reply_u.dl_eof = TRUE; diff --git a/include/am_compat.h b/include/am_compat.h index dc3b71d7446..3463f3fa591 100644 --- a/include/am_compat.h +++ b/include/am_compat.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -90,6 +86,10 @@ # define MNTTAB_OPT_NOAC "noac" #endif /* defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC) */ +#if defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL) +# define MNTTAB_OPT_NOACL "noacl" +#endif /* defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL) */ + #if defined(MNT2_NFS_OPT_NOCONN) && !defined(MNTTAB_OPT_NOCONN) # define MNTTAB_OPT_NOCONN "noconn" # ifndef MNTTAB_OPT_CONN @@ -176,10 +176,30 @@ #if defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) # define MNTTAB_OPT_GENS "gens" #endif /* defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) */ + #if defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) # define MNTTAB_OPT_EXTATT "extatt" #endif /* defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) */ +#if defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) +# define MNTTAB_OPT_NOJOLIET "nojoliet" +#endif /* defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) */ + +#if defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) +# define MNTTAB_OPT_NOCASETRANS "nocasetrans" +#endif /* defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) */ + +#if defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) +# define MNTTAB_OPT_RRCASEINS "rrcaseins" +#endif /* defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) */ + +/* + * Complete MNTTAB_OPT_* options based on MNT2_UDF_OPT_* mount options. + */ +#if defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION) +# define MNTTAB_OPT_CLOSESESSION "closesession" +#endif /* defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION) */ + /* * Complete MNTTAB_OPT_* options based on MNT2_PCFS_OPT_* mount options. */ @@ -236,6 +256,29 @@ # define MNTTAB_OPT_SYNC "sync" #endif /* defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC) */ +#if defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG) +# define MNTTAB_OPT_LOG "log" +#endif /* defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG) */ + +#if defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) +# define MNTTAB_OPT_NOATIME "noatime" +#endif /* defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) */ + +#if defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) +# define MNTTAB_OPT_NODEVMTIME "nodevmtime" +#endif /* defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) */ + +#if defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) +# define MNTTAB_OPT_SOFTDEP "softdep" +#endif /* defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) */ + +#if defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) +# define MNTTAB_OPT_SYMPERM "symperm" +#endif /* defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) */ + +#if defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) +# define MNTTAB_OPT_UNION "union" +#endif /* defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) */ /* * Add missing MNTTAB_OPT_* options. @@ -298,6 +341,20 @@ # define MNTTAB_OPT_DIRMASK "dirmask" #endif /* not MNTTAB_OPT_DIRMASK */ +/* useful for udf mounts */ +#ifndef MNTTAB_OPT_USER +# define MNTTAB_OPT_USER "user" +#endif /* not MNTTAB_OPT_USER */ +#ifndef MNTTAB_OPT_GROUP +# define MNTTAB_OPT_GROUP "group" +#endif /* not MNTTAB_OPT_GROUP */ +#ifndef MNTTAB_OPT_GMTOFF +# define MNTTAB_OPT_GMTOFF "gmtoff" +#endif /* not MNTTAB_OPT_GMTOFF */ +#ifndef MNTTAB_OPT_SESSIONNR +# define MNTTAB_OPT_SESSIONNR "sessionnr" +#endif /* not MNTTAB_OPT_SESSIONNR */ + /* * Incomplete filesystem definitions (sunos4, irix6, solaris2) */ @@ -334,6 +391,13 @@ struct hsfs_args { # define ufs_args_t u_int #endif /* defined(HAVE_FS_UFS) && !defined(ufs_args_t) */ +/* + * if does not define struct udf_args, assume integer bit-field (linux) + */ +#if defined(HAVE_FS_UDF) && !defined(udf_args_t) +# define udf_args_t u_int +#endif /* defined(HAVE_FS_UDF) && !defined(udf_args_t) */ + /* * if does not define struct efs_args, assume integer bit-field (linux) */ @@ -341,12 +405,19 @@ struct hsfs_args { # define efs_args_t u_int #endif /* defined(HAVE_FS_EFS) && !defined(efs_args_t) */ +#if defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t) +# define tmpfs_args_t u_int +#endif /* defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t) */ + /* * if does not define struct xfs_args, assume integer bit-field (linux) */ #if defined(HAVE_FS_XFS) && !defined(xfs_args_t) # define xfs_args_t u_int #endif /* defined(HAVE_FS_XFS) && !defined(xfs_args_t) */ +#if defined(HAVE_FS_EXT) && !defined(ext_args_t) +# define ext_args_t u_int +#endif /* defined(HAVE_FS_EXT) && !defined(ext_args_t) */ #if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS) # define MNTTYPE_AUTOFS "autofs" @@ -365,6 +436,14 @@ struct hsfs_args { # endif /* not MNTTAB_OPT_PROTO */ #endif /* not HAVE_FS_NFS3 */ +/* + * If NFS4, then make sure that the "sec" mnttab option is available. + */ +#ifdef HAVE_FS_NFS4 +# ifndef MNTTAB_OPT_SEC +# define MNTTAB_OPT_SEC "sec" +# endif /* not MNTTAB_OPT_SEC */ +#endif /* not HAVE_FS_NFS4 */ /* * If loop device (header file) exists, define mount table option */ diff --git a/include/am_defs.h b/include/am_defs.h index c2185dbfd3e..0e7f0099517 100644 --- a/include/am_defs.h +++ b/include/am_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -65,7 +61,7 @@ # define strchr index # define strrchr rindex # endif /* not HAVE_STRCHR */ -char *strchr(), *strrchr(), *strdup(); +char *strchr(), *strrchr(); #endif /* not STDC_HEADERS */ /* @@ -86,6 +82,14 @@ char *strchr(), *strrchr(), *strdup(); # endif /* __GNUC__ < 2 ... */ #endif /* not __attribute__ */ +#define __IGNORE(result) \ + __ignore((unsigned long)result) + +static inline void +__ignore(unsigned long result) { + (void)&result; +} + /* * How to handle signals of any type */ @@ -132,11 +136,19 @@ struct sigevent; /* * Big-endian or little-endian? */ -#ifdef WORDS_BIGENDIAN -# define ARCH_ENDIAN "big" -#else /* not WORDS_BIGENDIAN */ -# define ARCH_ENDIAN "little" -#endif /* not WORDS_BIGENDIAN */ +#ifndef BYTE_ORDER +# if defined(WORDS_BIGENDIAN) +# define ARCH_ENDIAN "big" +# else /* not WORDS_BIGENDIAN */ +# define ARCH_ENDIAN "little" +# endif /* not WORDS_BIGENDIAN */ +#else +# if BYTE_ORDER == BIG_ENDIAN +# define ARCH_ENDIAN "big" +# else +# define ARCH_ENDIAN "little" +# endif +#endif /* * Actions to take if HAVE_SYS_TYPES_H is defined. @@ -207,12 +219,6 @@ struct sigevent; * Actions to take if HAVE_FCNTL_H is defined. */ #if HAVE_FCNTL_H -# ifdef HAVE_LINUX_LOOP_H -/* so I can mount large files as loop devices */ -/* XXX: need to move these two LARGEFILE defines to a better place */ -# define _LARGEFILE64_SOURCE -# define __USE_LARGEFILE64 -# endif /* HAVE_LINUX_LOOP_H */ # include #endif /* HAVE_FCNTL_H */ @@ -315,14 +321,6 @@ typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...)); # include #endif /* HAVE_MNTENT_H */ -/* - * Actions to take if exists. - */ -#ifdef HAVE_SYS_ERRNO_H -# include -extern int errno; -#endif /* HAVE_SYS_ERRNO_H */ - /* * Actions to take if exists. */ @@ -859,6 +857,10 @@ struct sockaddr_dl; #ifdef HAVE_SYS_FS_TMP_H # include #endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + /* * Actions to take if exists. @@ -879,6 +881,9 @@ struct sockaddr_dl; #ifdef HAVE_SYS_FS_EFS_CLNT_H # include #endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ /* * Actions to take if exists. @@ -920,6 +925,14 @@ struct sockaddr_dl; */ #ifdef HAVE_ERRNO_H # include +#else +/* + * Actions to take if exists. + */ +# ifdef HAVE_SYS_ERRNO_H +# include +extern int errno; +# endif /* HAVE_SYS_ERRNO_H */ #endif /* HAVE_ERRNO_H */ /* @@ -950,6 +963,13 @@ struct sockaddr_dl; # include #endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ +/* + * Actions to take if exists. + */ +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + /* * Actions to take if exists. */ @@ -1510,14 +1530,6 @@ extern unsigned int sleep(unsigned int seconds); extern int strcasecmp(const char *s1, const char *s2); #endif /* not HAVE_EXTERN_STRCASECMP */ -#ifndef HAVE_EXTERN_STRDUP -/* - * define this extern even if function does not exist, for it will - * be filled in by libamu/strdup.c - */ -extern char *strdup(const char *s); -#endif /* not HAVE_EXTERN_STRDUP */ - #ifndef HAVE_EXTERN_STRLCAT /* * define this extern even if function does not exist, for it will diff --git a/include/am_utils.h b/include/am_utils.h index b7e55ce33e2..0de881ad8c8 100644 --- a/include/am_utils.h +++ b/include/am_utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -109,8 +105,14 @@ #define XLOG_DEBUG 0x0020 #define XLOG_MAP 0x0040 #define XLOG_STATS 0x0080 -#define XLOG_DEFSTR "all,nomap,nostats" /* Default log options */ +/* log option compositions */ +#define XLOG_MASK 0x00ff /* mask for all flags */ +#define XLOG_MANDATORY (XLOG_FATAL|XLOG_ERROR) /* cannot turn these off */ #define XLOG_ALL (XLOG_FATAL|XLOG_ERROR|XLOG_USER|XLOG_WARNING|XLOG_INFO|XLOG_MAP|XLOG_STATS) +/* default: fatal + error + user + warning + info */ +#define XLOG_DEFAULT (XLOG_MASK & (XLOG_ALL & ~XLOG_MAP & ~XLOG_STATS)) + +/* default: no logging options */ #define NO_SUBNET "notknown" /* default subnet name for no subnet */ #define NEXP_AP (1022) /* gdmr: was 254 */ @@ -258,8 +260,6 @@ extern pid_t am_mypid; extern int foreground; /* Foreground process */ extern int orig_umask; /* umask() on startup */ -extern int xlog_level; /* Logging level */ -extern int xlog_level_init; extern serv_state amd_state; /* Should we go now */ extern struct in_addr myipaddr; /* (An) IP address of this host */ extern struct opt_tab xlog_opt[]; @@ -278,15 +278,17 @@ extern char *get_version_string(void); extern char *inet_dquad(char *, size_t, u_long); extern char *print_wires(void); extern char *str3cat(char *, char *, char *, char *); +extern char *strvcat(const char *, ...); extern char *strealloc(char *, char *); extern char *strip_selectors(char *, char *); extern char *strnsave(const char *, int); extern int amu_close(int fd); extern int bind_resv_port(int, u_short *); -extern int cmdoption(char *, struct opt_tab *, int *); +extern int cmdoption(char *, struct opt_tab *, u_int *); extern int compute_automounter_mount_flags(mntent_t *); extern int compute_mount_flags(mntent_t *); -extern int get_amd_program_number(void); +extern void discard_nfs_args(void *, u_long); +extern u_long get_amd_program_number(void); extern int getcreds(struct svc_req *, uid_t *, gid_t *, SVCXPRT *); extern int hasmntval(mntent_t *, char *); extern unsigned int hasmntvalerr(mntent_t *, char *, int *); @@ -300,6 +302,9 @@ extern int make_rpc_packet(char *, int, u_long, struct rpc_msg *, voidp, XDRPROC extern int mkdirs(char *, int); extern int mount_fs(mntent_t *, int, caddr_t, int, MTYPE_TYPE, u_long, const char *, const char *, int); extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp); +extern void nfs_program_3(struct svc_req *rqstp, SVCXPRT *transp); +#define get_nfs_dispatcher_version(a) \ + ((a) == nfs_program_2 ? NFS_VERSION : NFS_VERSION3) extern int pickup_rpc_reply(voidp, int, voidp, XDRPROC_T_TYPE); extern int switch_option(char *); extern int switch_to_logfile(char *logfile, int orig_umask, int truncate_log); @@ -320,14 +325,16 @@ extern void plog(int, const char *,...) __attribute__ ((__format__ (__printf__, 2, 3))); extern void rmdirs(char *); extern void rpc_msg_init(struct rpc_msg *, u_long, u_long, u_long); -extern void set_amd_program_number(int program); +extern void set_amd_program_number(u_long program); extern void show_opts(int ch, struct opt_tab *); extern void unregister_amq(void); extern voidp xmalloc(int); extern voidp xrealloc(voidp, int); extern voidp xzalloc(int); +extern char *xstrdup(const char *); extern int check_pmap_up(char *host, struct sockaddr_in* sin); -extern u_long get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const char *proto); +extern u_long get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const char *proto, u_long def); +extern int nfs_valid_version(u_long vers); extern long get_server_pid(void); extern void setup_sighandler(int signum, void (*handler)(int)); extern time_t clocktime(nfstime *nt); @@ -367,9 +374,10 @@ extern void write_mntent(mntent_t *, const char *); extern int syslogging; #endif /* defined(HAVE_SYSLOG_H) || defined(HAVE_SYS_SYSLOG_H) */ -extern void compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct netconfig *nfsncp, struct sockaddr_in *ip_addr, u_long nfs_version, char *nfs_proto, am_nfs_handle_t *fhp, char *host_name, char *fs_name); +extern void compute_nfs_args(void *nap, mntent_t *mntp, int genflags, struct netconfig *nfsncp, struct sockaddr_in *ip_addr, u_long nfs_version, char *nfs_proto, am_nfs_handle_t *fhp, char *host_name, char *fs_name); +extern void destroy_nfs_args(void *nap, u_long nfs_version); extern int create_amq_service(int *udp_soAMQp, SVCXPRT **udp_amqpp, struct netconfig **udp_amqncpp, int *tcp_soAMQp, SVCXPRT **tcp_amqpp, struct netconfig **tcp_amqncpp, u_short preferred_amq_port); -extern int create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp)); +extern int create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp), u_long nfs_version); extern int amu_svc_register(SVCXPRT *, u_long, u_long, void (*)(struct svc_req *, SVCXPRT *), u_long, struct netconfig *); #ifdef HAVE_TRANSPORT_TYPE_TLI @@ -392,8 +400,14 @@ extern int unregister_autofs_service(char *autofs_conftype); /* - * Network File System: the new generation - * NFS V.3 + * Network File System: the old faithful generation NFS V.2 + */ +#ifndef NFS_VERSION2 +# define NFS_VERSION2 ((u_int) 2) +#endif /* not NFS_VERSION2 */ + +/* + * Network File System: the not so new anymore generation NFS V.3 */ #ifdef HAVE_FS_NFS3 # ifndef NFS_VERSION3 @@ -401,6 +415,14 @@ extern int unregister_autofs_service(char *autofs_conftype); # endif /* not NFS_VERSION3 */ #endif /* HAVE_FS_NFS3 */ +/* + * Network File System: the new generation NFS V.4 + */ +#ifdef HAVE_FS_NFS4 +# ifndef NFS_VERSION4 +# define NFS_VERSION4 ((u_int) 4) +# endif /* not NFS_VERSION4 */ +#endif /* HAVE_FS_NFS4 */ /**************************************************************************/ /*** DEBUGGING ***/ @@ -412,30 +434,32 @@ extern int unregister_autofs_service(char *autofs_conftype); #ifdef DEBUG -# define D_ALL (~(D_MTAB|D_HRTIME|D_XDRTRACE|D_DAEMON|D_FORK|D_AMQ)) -# define D_DAEMON 0x0001 /* Don't enter daemon mode */ +# define D_DAEMON 0x0001 /* Enter daemon mode */ # define D_TRACE 0x0002 /* Do protocol trace */ # define D_FULL 0x0004 /* Do full trace */ # define D_MTAB 0x0008 /* Use local mtab */ -# define D_AMQ 0x0010 /* Don't register amq program */ +# define D_AMQ 0x0010 /* Register amq program */ # define D_STR 0x0020 /* Debug string munging */ # ifdef DEBUG_MEM # define D_MEM 0x0040 /* Trace memory allocations */ # else /* not DEBUG_MEM */ # define D_MEM 0x0000 /* Dummy */ # endif /* not DEBUG_MEM */ -# define D_FORK 0x0080 /* Don't fork server */ - /* info service specific debugging (hesiod, nis, etc) */ -# define D_INFO 0x0100 +# define D_FORK 0x0080 /* Fork server (hlfsd only) */ +# define D_INFO 0x0100 /* info service specific debugging (hesiod, nis, etc) */ # define D_HRTIME 0x0200 /* Print high resolution time stamps */ # define D_XDRTRACE 0x0400 /* Trace xdr routines */ # define D_READDIR 0x0800 /* Show browsable_dir progress */ - -/* - * Test mode is test mode: don't daemonize, don't register amq, don't fork, - * don't touch system mtab, etc. - */ -# define D_TEST (~(D_MEM|D_STR|D_XDRTRACE)) +/* debug option compositions */ +# define D_MASK 0x0fff /* mask of known flags */ +# define D_BASIC (D_TRACE|D_FULL|D_STR|D_MEM|D_INFO|D_XDRTRACE|D_READDIR) +# define D_CONTROL (D_DAEMON|D_AMQ|D_FORK) +/* immutable flags: cannot be changed via "amq -D" */ +# define D_IMMUTABLE (D_MTAB | D_CONTROL) +# define D_ALL (D_BASIC | D_CONTROL) +# define D_DEFAULT (D_MASK & D_ALL & ~D_XDRTRACE) +/* test mode: nodaemon, noamq, nofork, (local) mtab */ +# define D_TEST (D_BASIC | D_MTAB) # define amuDebug(x) (debug_flags & (x)) # define dlog if (amuDebug(D_FULL)) dplog @@ -460,34 +484,49 @@ extern void malloc_verify(void); # endif /* not DEBUG_MEM */ /* functions that depend solely on debugging */ -extern void print_nfs_args(const nfs_args_t *nap, u_long nfs_version); +extern void print_nfs_args(const void *, u_long nfs_version); extern int debug_option (char *opt); extern void dplog(const char *fmt, ...) __attribute__ ((__format__ (__printf__, 1, 2))); #else /* not DEBUG */ +/* set dummy flags to zero */ +# define D_DAEMON 0x0001 /* Enter daemon mode */ +# define D_TRACE 0x0000 /* dummy: Do protocol trace */ +# define D_FULL 0x0000 /* dummy: Do full trace */ +# define D_MTAB 0x0000 /* dummy: Use local mtab */ +# define D_AMQ 0x0010 /* Register amq program */ +# define D_STR 0x0000 /* dummy: Debug string munging */ +# define D_MEM 0x0000 /* dummy: Trace memory allocations */ +# define D_FORK 0x0080 /* Fork server (hlfsd only) */ +# define D_INFO 0x0000 /* dummy: info service debugging */ +# define D_HRTIME 0x0000 /* dummy: hi-res time stamps */ +# define D_XDRTRACE 0x0000 /* dummy: Trace xdr routines */ +# define D_READDIR 0x0000 /* dummy: browsable_dir progress */ +# define D_CONTROL (D_DAEMON|D_AMQ|D_FORK) +# define amuDebug(x) (debug_flags & (x)) /* * If not debugging, then also reset the pointer. * It's safer -- and besides, free() should do that anyway. */ -# define XFREE(x) do { free((voidp)x); x = NULL;} while (0) +# define XFREE(x) do { free((voidp)x); x = NULL;} while (0) -#define amuDebug(x) (0) - -#ifdef __GNUC__ -#define dlog(fmt...) -#else /* not __GNUC__ */ +# if defined(HAVE_GCC_VARARGS_MACROS) +# define dlog(fmt...) +# elif defined(HAVE_C99_VARARGS_MACROS) +# define dlog(...) +# else /* no c99 varargs */ /* this define means that we CCP leaves code behind the (list,of,args) */ -#define dlog -#endif /* not __GNUC__ */ +# define dlog +# endif /* no c99 varargs */ -#define print_nfs_args(nap, nfs_version) -#define debug_option(x) (1) +# define print_nfs_args(nap, nfs_version) +# define debug_option(x) (1) #endif /* not DEBUG */ -extern int debug_flags; /* Debug options */ +extern u_int debug_flags; /* Debug options */ extern struct opt_tab dbg_opt[]; /**************************************************************************/ diff --git a/include/am_xdr_func.h b/include/am_xdr_func.h index c4159188c79..3b6063025dd 100644 --- a/include/am_xdr_func.h +++ b/include/am_xdr_func.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -43,8 +39,28 @@ #ifdef HAVE_FS_NFS3 +#define AM_MOUNTVERS3 ((unsigned long)(3)) + #define AM_FHSIZE3 64 /* size in bytes of a file handle (v3) */ -#define AM_MOUNTVERS3 ((unsigned long)(3)) +#define AM_NFS3_WRITEVERFSIZE 8 +#define AM_NFS3_CREATEVERFSIZE 8 +#define AM_NFS3_COOKIEVERFSIZE 8 +#define AM_ACCESS3_READ 0x0001 +#define AM_ACCESS3_LOOKUP 0x0002 +#define AM_ACCESS3_MODIFY 0x0004 +#define AM_ACCESS3_EXTEND 0x0008 +#define AM_ACCESS3_DELETE 0x0010 +#define AM_ACCESS3_EXECUTE 0x0020 +#define AM_FSF3_LINK 0x0001 +#define AM_FSF3_SYMLINK 0x0002 +#define AM_FSF3_HOMOGENEOUS 0x0008 +#define AM_FSF3_CANSETTIME 0x0010 + +typedef char am_cookieverf3[AM_NFS3_COOKIEVERFSIZE]; + +typedef u_quad_t uint64; + +typedef uint64 am_cookie3; /* NFSv3 handle */ struct am_nfs_fh3 { @@ -131,37 +147,830 @@ struct am_diropargs3 { }; typedef struct am_diropargs3 am_diropargs3; +enum am_ftype3 { + AM_NF3REG = 1, + AM_NF3DIR = 2, + AM_NF3BLK = 3, + AM_NF3CHR = 4, + AM_NF3LNK = 5, + AM_NF3SOCK = 6, + AM_NF3FIFO = 7, +}; +typedef enum am_ftype3 am_ftype3; + +typedef u_int am_mode3; + +typedef u_int am_uid3; + +typedef u_int am_gid3; + +typedef uint64 am_size3; + +typedef uint64 am_fileid3; + +struct am_specdata3 { + u_int specdata1; + u_int specdata2; +}; +typedef struct am_specdata3 am_specdata3; + +struct am_nfstime3 { + u_int seconds; + u_int nseconds; +}; +typedef struct am_nfstime3 am_nfstime3; + +struct am_fattr3 { + am_ftype3 type; + am_mode3 mode; + u_int nlink; + am_uid3 uid; + am_gid3 gid; + am_size3 size; + am_size3 used; + am_specdata3 rdev; + uint64 fsid; + am_fileid3 fileid; + am_nfstime3 atime; + am_nfstime3 mtime; + am_nfstime3 ctime; +}; +typedef struct am_fattr3 am_fattr3; + +struct am_post_op_attr { + bool_t attributes_follow; + union { + am_fattr3 attributes; + } am_post_op_attr_u; +}; +typedef struct am_post_op_attr am_post_op_attr; + +enum am_stable_how { + AM_UNSTABLE = 0, + AM_DATA_SYNC = 1, + AM_FILE_SYNC = 2, +}; +typedef enum am_stable_how am_stable_how; + +typedef uint64 am_offset3; + +typedef u_int am_count3; + +struct am_wcc_attr { + am_size3 size; + am_nfstime3 mtime; + am_nfstime3 ctime; +}; +typedef struct am_wcc_attr am_wcc_attr; + +struct am_pre_op_attr { + bool_t attributes_follow; + union { + am_wcc_attr attributes; + } am_pre_op_attr_u; +}; +typedef struct am_pre_op_attr am_pre_op_attr; + +struct am_wcc_data { + am_pre_op_attr before; + am_post_op_attr after; +}; +typedef struct am_wcc_data am_wcc_data; + +struct am_WRITE3args { + am_nfs_fh3 file; + am_offset3 offset; + am_count3 count; + am_stable_how stable; + struct { + u_int data_len; + char *data_val; + } data; +}; +typedef struct am_WRITE3args am_WRITE3args; + +typedef char am_writeverf3[AM_NFS3_WRITEVERFSIZE]; + +struct am_WRITE3resok { + am_wcc_data file_wcc; + am_count3 count; + am_stable_how committed; + am_writeverf3 verf; +}; +typedef struct am_WRITE3resok am_WRITE3resok; + +struct am_WRITE3resfail { + am_wcc_data file_wcc; +}; +typedef struct am_WRITE3resfail am_WRITE3resfail; + +struct am_WRITE3res { + am_nfsstat3 status; + union { + am_WRITE3resok ok; + am_WRITE3resfail fail; + } res_u; +}; +typedef struct am_WRITE3res am_WRITE3res; + struct am_LOOKUP3args { - am_diropargs3 what; + am_diropargs3 what; }; typedef struct am_LOOKUP3args am_LOOKUP3args; struct am_LOOKUP3resok { - am_nfs_fh3 object; -#if 0 - post_op_attr obj_attributes; - post_op_attr dir_attributes; -#endif + am_nfs_fh3 object; + am_post_op_attr obj_attributes; + am_post_op_attr dir_attributes; }; typedef struct am_LOOKUP3resok am_LOOKUP3resok; struct am_LOOKUP3resfail { -#if 0 - post_op_attr dir_attributes; -#else - char dummy; /* cannot have an empty declaration */ -#endif + am_post_op_attr dir_attributes; }; typedef struct am_LOOKUP3resfail am_LOOKUP3resfail; struct am_LOOKUP3res { - am_nfsstat3 status; - union { - am_LOOKUP3resok ok; - am_LOOKUP3resfail fail; - } res_u; + am_nfsstat3 status; + union { + am_LOOKUP3resok ok; + am_LOOKUP3resfail fail; + } res_u; }; typedef struct am_LOOKUP3res am_LOOKUP3res; + +struct am_COMMIT3args { + am_nfs_fh3 file; + am_offset3 offset; + am_count3 count; +}; +typedef struct am_COMMIT3args am_COMMIT3args; + +struct am_COMMIT3resok { + am_wcc_data file_wcc; + am_writeverf3 verf; +}; +typedef struct am_COMMIT3resok am_COMMIT3resok; + +struct am_COMMIT3resfail { + am_wcc_data file_wcc; +}; +typedef struct am_COMMIT3resfail am_COMMIT3resfail; + +struct am_COMMIT3res { + am_nfsstat3 status; + union { + am_COMMIT3resok ok; + am_COMMIT3resfail fail; + } res_u; +}; +typedef struct am_COMMIT3res am_COMMIT3res; + +struct am_ACCESS3args { + am_nfs_fh3 object; + u_int access; +}; +typedef struct am_ACCESS3args am_ACCESS3args; + +struct am_ACCESS3resok { + am_post_op_attr obj_attributes; + u_int access; +}; +typedef struct am_ACCESS3resok am_ACCESS3resok; + +struct am_ACCESS3resfail { + am_post_op_attr obj_attributes; +}; +typedef struct am_ACCESS3resfail am_ACCESS3resfail; + +struct am_ACCESS3res { + am_nfsstat3 status; + union { + am_ACCESS3resok ok; + am_ACCESS3resfail fail; + } res_u; +}; +typedef struct am_ACCESS3res am_ACCESS3res; + +struct am_GETATTR3args { + am_nfs_fh3 object; +}; +typedef struct am_GETATTR3args am_GETATTR3args; + +struct am_GETATTR3resok { + am_fattr3 obj_attributes; +}; +typedef struct am_GETATTR3resok am_GETATTR3resok; + +struct am_GETATTR3res { + am_nfsstat3 status; + union { + am_GETATTR3resok ok; + } res_u; +}; +typedef struct am_GETATTR3res am_GETATTR3res; + +enum am_time_how { + AM_DONT_CHANGE = 0, + AM_SET_TO_SERVER_TIME = 1, + AM_SET_TO_CLIENT_TIME = 2, +}; +typedef enum am_time_how am_time_how; + +struct am_set_mode3 { + bool_t set_it; + union { + am_mode3 mode; + } am_set_mode3_u; +}; +typedef struct am_set_mode3 am_set_mode3; + +struct am_set_uid3 { + bool_t set_it; + union { + am_uid3 uid; + } am_set_uid3_u; +}; +typedef struct am_set_uid3 am_set_uid3; + +struct am_set_gid3 { + bool_t set_it; + union { + am_gid3 gid; + } am_set_gid3_u; +}; +typedef struct am_set_gid3 am_set_gid3; + +struct am_set_size3 { + bool_t set_it; + union { + am_size3 size; + } am_set_size3_u; +}; +typedef struct am_set_size3 am_set_size3; + +struct am_set_atime { + am_time_how set_it; + union { + am_nfstime3 atime; + } am_set_atime_u; +}; +typedef struct am_set_atime am_set_atime; + +struct am_set_mtime { + am_time_how set_it; + union { + am_nfstime3 mtime; + } am_set_mtime_u; +}; +typedef struct am_set_mtime am_set_mtime; + +struct am_sattr3 { + am_set_mode3 mode; + am_set_uid3 uid; + am_set_gid3 gid; + am_set_size3 size; + am_set_atime atime; + am_set_mtime mtime; +}; +typedef struct am_sattr3 am_sattr3; + +enum am_createmode3 { + AM_UNCHECKED = 0, + AM_GUARDED = 1, + AM_EXCLUSIVE = 2, +}; +typedef enum am_createmode3 am_createmode3; + +typedef char am_createverf3[AM_NFS3_CREATEVERFSIZE]; + +struct am_createhow3 { + am_createmode3 mode; + union { + am_sattr3 obj_attributes; + am_sattr3 g_obj_attributes; + am_createverf3 verf; + } am_createhow3_u; +}; +typedef struct am_createhow3 am_createhow3; + +struct am_CREATE3args { + am_diropargs3 where; + am_createhow3 how; +}; +typedef struct am_CREATE3args am_CREATE3args; + +struct am_post_op_fh3 { + bool_t handle_follows; + union { + am_nfs_fh3 handle; + } am_post_op_fh3_u; +}; +typedef struct am_post_op_fh3 am_post_op_fh3; + +struct am_CREATE3resok { + am_post_op_fh3 obj; + am_post_op_attr obj_attributes; + am_wcc_data dir_wcc; +}; +typedef struct am_CREATE3resok am_CREATE3resok; + +struct am_CREATE3resfail { + am_wcc_data dir_wcc; +}; +typedef struct am_CREATE3resfail am_CREATE3resfail; + +struct am_CREATE3res { + am_nfsstat3 status; + union { + am_CREATE3resok ok; + am_CREATE3resfail fail; + } res_u; +}; +typedef struct am_CREATE3res am_CREATE3res; + +struct am_REMOVE3args { + am_diropargs3 object; +}; +typedef struct am_REMOVE3args am_REMOVE3args; + +struct am_REMOVE3resok { + am_wcc_data dir_wcc; +}; +typedef struct am_REMOVE3resok am_REMOVE3resok; + +struct am_REMOVE3resfail { + am_wcc_data dir_wcc; +}; +typedef struct am_REMOVE3resfail am_REMOVE3resfail; + +struct am_REMOVE3res { + am_nfsstat3 status; + union { + am_REMOVE3resok ok; + am_REMOVE3resfail fail; + } res_u; +}; +typedef struct am_REMOVE3res am_REMOVE3res; + +struct am_READ3args { + am_nfs_fh3 file; + am_offset3 offset; + am_count3 count; +}; +typedef struct am_READ3args am_READ3args; + +struct am_READ3resok { + am_post_op_attr file_attributes; + am_count3 count; + bool_t eof; + struct { + u_int data_len; + char *data_val; + } data; +}; +typedef struct am_READ3resok am_READ3resok; + +struct am_READ3resfail { + am_post_op_attr file_attributes; +}; +typedef struct am_READ3resfail am_READ3resfail; + +struct am_READ3res { + am_nfsstat3 status; + union { + am_READ3resok ok; + am_READ3resfail fail; + } res_u; +}; +typedef struct am_READ3res am_READ3res; + +struct am_FSINFO3args { + am_nfs_fh3 fsroot; +}; +typedef struct am_FSINFO3args am_FSINFO3args; + +struct am_FSINFO3resok { + am_post_op_attr obj_attributes; + u_int rtmax; + u_int rtpref; + u_int rtmult; + u_int wtmax; + u_int wtpref; + u_int wtmult; + u_int dtpref; + am_size3 maxfilesize; + am_nfstime3 time_delta; + u_int properties; +}; +typedef struct am_FSINFO3resok am_FSINFO3resok; + +struct am_FSINFO3resfail { + am_post_op_attr obj_attributes; +}; +typedef struct am_FSINFO3resfail am_FSINFO3resfail; + +struct am_FSINFO3res { + am_nfsstat3 status; + union { + am_FSINFO3resok ok; + am_FSINFO3resfail fail; + } res_u; +}; +typedef struct am_FSINFO3res am_FSINFO3res; + +struct am_FSSTAT3args { + am_nfs_fh3 fsroot; +}; +typedef struct am_FSSTAT3args am_FSSTAT3args; + +struct am_FSSTAT3resok { + am_post_op_attr obj_attributes; + am_size3 tbytes; + am_size3 fbytes; + am_size3 abytes; + am_size3 tfiles; + am_size3 ffiles; + am_size3 afiles; + u_int invarsec; +}; +typedef struct am_FSSTAT3resok am_FSSTAT3resok; + +struct am_FSSTAT3resfail { + am_post_op_attr obj_attributes; +}; +typedef struct am_FSSTAT3resfail am_FSSTAT3resfail; + +struct am_FSSTAT3res { + am_nfsstat3 status; + union { + am_FSSTAT3resok ok; + am_FSSTAT3resfail fail; + } res_u; +}; +typedef struct am_FSSTAT3res am_FSSTAT3res; + +struct am_PATHCONF3args { + am_nfs_fh3 object; +}; +typedef struct am_PATHCONF3args am_PATHCONF3args; + +struct am_PATHCONF3resok { + am_post_op_attr obj_attributes; + u_int linkmax; + u_int name_max; + bool_t no_trunc; + bool_t chown_restricted; + bool_t case_insensitive; + bool_t case_preserving; +}; +typedef struct am_PATHCONF3resok am_PATHCONF3resok; + +struct am_PATHCONF3resfail { + am_post_op_attr obj_attributes; +}; +typedef struct am_PATHCONF3resfail am_PATHCONF3resfail; + +struct am_PATHCONF3res { + am_nfsstat3 status; + union { + am_PATHCONF3resok ok; + am_PATHCONF3resfail fail; + } res_u; +}; +typedef struct am_PATHCONF3res am_PATHCONF3res; + +typedef char *am_nfspath3; + +struct am_symlinkdata3 { + am_sattr3 symlink_attributes; + am_nfspath3 symlink_data; +}; +typedef struct am_symlinkdata3 am_symlinkdata3; + +struct am_SYMLINK3args { + am_diropargs3 where; + am_symlinkdata3 symlink; +}; +typedef struct am_SYMLINK3args am_SYMLINK3args; + +struct am_SYMLINK3resok { + am_post_op_fh3 obj; + am_post_op_attr obj_attributes; + am_wcc_data dir_wcc; +}; +typedef struct am_SYMLINK3resok am_SYMLINK3resok; + +struct am_SYMLINK3resfail { + am_wcc_data dir_wcc; +}; +typedef struct am_SYMLINK3resfail am_SYMLINK3resfail; + +struct am_SYMLINK3res { + am_nfsstat3 status; + union { + am_SYMLINK3resok ok; + am_SYMLINK3resfail fail; + } res_u; +}; +typedef struct am_SYMLINK3res am_SYMLINK3res; + +struct am_READLINK3args { + am_nfs_fh3 symlink; +}; +typedef struct am_READLINK3args am_READLINK3args; + +struct am_READLINK3resok { + am_post_op_attr symlink_attributes; + am_nfspath3 data; +}; +typedef struct am_READLINK3resok am_READLINK3resok; + +struct am_READLINK3resfail { + am_post_op_attr symlink_attributes; +}; +typedef struct am_READLINK3resfail am_READLINK3resfail; + +struct am_READLINK3res { + am_nfsstat3 status; + union { + am_READLINK3resok ok; + am_READLINK3resfail fail; + } res_u; +}; +typedef struct am_READLINK3res am_READLINK3res; + +struct am_devicedata3 { + am_sattr3 dev_attributes; + am_specdata3 spec; +}; +typedef struct am_devicedata3 am_devicedata3; + +struct am_mknoddata3 { + am_ftype3 type; + union { + am_devicedata3 chr_device; + am_devicedata3 blk_device; + am_sattr3 sock_attributes; + am_sattr3 pipe_attributes; + } am_mknoddata3_u; +}; +typedef struct am_mknoddata3 am_mknoddata3; + +struct am_MKNOD3args { + am_diropargs3 where; + am_mknoddata3 what; +}; +typedef struct am_MKNOD3args am_MKNOD3args; + +struct am_MKNOD3resok { + am_post_op_fh3 obj; + am_post_op_attr obj_attributes; + am_wcc_data dir_wcc; +}; +typedef struct am_MKNOD3resok am_MKNOD3resok; + +struct am_MKNOD3resfail { + am_wcc_data dir_wcc; +}; +typedef struct am_MKNOD3resfail am_MKNOD3resfail; + +struct am_MKNOD3res { + am_nfsstat3 status; + union { + am_MKNOD3resok ok; + am_MKNOD3resfail fail; + } res_u; +}; +typedef struct am_MKNOD3res am_MKNOD3res; + +struct am_MKDIR3args { + am_diropargs3 where; + am_sattr3 attributes; +}; +typedef struct am_MKDIR3args am_MKDIR3args; + +struct am_MKDIR3resok { + am_post_op_fh3 obj; + am_post_op_attr obj_attributes; + am_wcc_data dir_wcc; +}; +typedef struct am_MKDIR3resok am_MKDIR3resok; + +struct am_MKDIR3resfail { + am_wcc_data dir_wcc; +}; +typedef struct am_MKDIR3resfail am_MKDIR3resfail; + +struct am_MKDIR3res { + am_nfsstat3 status; + union { + am_MKDIR3resok ok; + am_MKDIR3resfail fail; + } res_u; +}; +typedef struct am_MKDIR3res am_MKDIR3res; + +struct am_RMDIR3args { + am_diropargs3 object; +}; +typedef struct am_RMDIR3args am_RMDIR3args; + +struct am_RMDIR3resok { + am_wcc_data dir_wcc; +}; +typedef struct am_RMDIR3resok am_RMDIR3resok; + +struct am_RMDIR3resfail { + am_wcc_data dir_wcc; +}; +typedef struct am_RMDIR3resfail am_RMDIR3resfail; + +struct am_RMDIR3res { + am_nfsstat3 status; + union { + am_RMDIR3resok ok; + am_RMDIR3resfail fail; + } res_u; +}; +typedef struct am_RMDIR3res am_RMDIR3res; + +struct am_RENAME3args { + am_diropargs3 from; + am_diropargs3 to; +}; +typedef struct am_RENAME3args am_RENAME3args; + +struct am_RENAME3resok { + am_wcc_data fromdir_wcc; + am_wcc_data todir_wcc; +}; +typedef struct am_RENAME3resok am_RENAME3resok; + +struct am_RENAME3resfail { + am_wcc_data fromdir_wcc; + am_wcc_data todir_wcc; +}; +typedef struct am_RENAME3resfail am_RENAME3resfail; + +struct am_RENAME3res { + am_nfsstat3 status; + union { + am_RENAME3resok ok; + am_RENAME3resfail fail; + } res_u; +}; +typedef struct am_RENAME3res am_RENAME3res; + +struct am_READDIRPLUS3args { + am_nfs_fh3 dir; + am_cookie3 cookie; + am_cookieverf3 cookieverf; + am_count3 dircount; + am_count3 maxcount; +}; +typedef struct am_READDIRPLUS3args am_READDIRPLUS3args; + +struct am_entryplus3 { + am_fileid3 fileid; + am_filename3 name; + am_cookie3 cookie; + am_post_op_attr name_attributes; + am_post_op_fh3 name_handle; + struct am_entryplus3 *nextentry; +}; +typedef struct am_entryplus3 am_entryplus3; + +struct am_dirlistplus3 { + am_entryplus3 *entries; + bool_t eof; +}; +typedef struct am_dirlistplus3 am_dirlistplus3; + +struct am_READDIRPLUS3resok { + am_post_op_attr dir_attributes; + am_cookieverf3 cookieverf; + am_dirlistplus3 reply; +}; +typedef struct am_READDIRPLUS3resok am_READDIRPLUS3resok; + +struct am_READDIRPLUS3resfail { + am_post_op_attr dir_attributes; +}; +typedef struct am_READDIRPLUS3resfail am_READDIRPLUS3resfail; + +struct am_READDIRPLUS3res { + am_nfsstat3 status; + union { + am_READDIRPLUS3resok ok; + am_READDIRPLUS3resfail fail; + } res_u; +}; +typedef struct am_READDIRPLUS3res am_READDIRPLUS3res; + +struct am_READDIR3args { + am_nfs_fh3 dir; + am_cookie3 cookie; + am_cookieverf3 cookieverf; + am_count3 count; +}; +typedef struct am_READDIR3args am_READDIR3args; + +struct am_entry3 { + am_fileid3 fileid; + am_filename3 name; + am_cookie3 cookie; + struct am_entry3 *nextentry; +}; +typedef struct am_entry3 am_entry3; + +struct am_dirlist3 { + am_entry3 *entries; + bool_t eof; +}; +typedef struct am_dirlist3 am_dirlist3; + +struct am_READDIR3resok { + am_post_op_attr dir_attributes; + am_cookieverf3 cookieverf; + am_dirlist3 reply; +}; +typedef struct am_READDIR3resok am_READDIR3resok; + +struct am_READDIR3resfail { + am_post_op_attr dir_attributes; +}; +typedef struct am_READDIR3resfail am_READDIR3resfail; + +struct am_READDIR3res { + am_nfsstat3 status; + union { + am_READDIR3resok ok; + am_READDIR3resfail fail; + } res_u; +}; +typedef struct am_READDIR3res am_READDIR3res; + +struct am_LINK3args { + am_nfs_fh3 file; + am_diropargs3 link; +}; +typedef struct am_LINK3args am_LINK3args; + +struct am_LINK3resok { + am_post_op_attr file_attributes; + am_wcc_data linkdir_wcc; +}; +typedef struct am_LINK3resok am_LINK3resok; + +struct am_LINK3resfail { + am_post_op_attr file_attributes; + am_wcc_data linkdir_wcc; +}; +typedef struct am_LINK3resfail am_LINK3resfail; + +struct am_LINK3res { + am_nfsstat3 status; + union { + am_LINK3resok ok; + am_LINK3resfail fail; + } res_u; +}; +typedef struct am_LINK3res am_LINK3res; + +struct am_sattrguard3 { + bool_t check; + union { + am_nfstime3 obj_ctime; + } am_sattrguard3_u; +}; +typedef struct am_sattrguard3 am_sattrguard3; + +struct am_SETATTR3args { + am_nfs_fh3 object; + am_sattr3 new_attributes; + am_sattrguard3 guard; +}; +typedef struct am_SETATTR3args am_SETATTR3args; + +struct am_SETATTR3resok { + am_wcc_data obj_wcc; +}; +typedef struct am_SETATTR3resok am_SETATTR3resok; + +struct am_SETATTR3resfail { + am_wcc_data obj_wcc; +}; +typedef struct am_SETATTR3resfail am_SETATTR3resfail; + +struct am_SETATTR3res { + am_nfsstat3 status; + union { + am_SETATTR3resok ok; + am_SETATTR3resfail fail; + } res_u; +}; +typedef struct am_SETATTR3res am_SETATTR3res; #endif /* HAVE_FS_NFS3 */ /* @@ -310,6 +1119,74 @@ bool_t xdr_writeargs(XDR *xdrs, nfswriteargs *objp); * NFS3 XDR FUNCTIONS: */ #ifdef HAVE_FS_NFS3 +#define AM_NFS3_NULL 0 +void * am_nfs3_null_3(void *, CLIENT *); +void * am_nfs3_null_3_svc(void *, struct svc_req *); +#define AM_NFS3_GETATTR 1 +am_GETATTR3res * am_nfs3_getattr_3(am_GETATTR3args *, CLIENT *); +am_GETATTR3res * am_nfs3_getattr_3_svc(am_GETATTR3args *, struct svc_req *); +#define AM_NFS3_SETATTR 2 +am_SETATTR3res * am_nfs3_setattr_3(am_SETATTR3args *, CLIENT *); +am_SETATTR3res * am_nfs3_setattr_3_svc(am_SETATTR3args *, struct svc_req *); +#define AM_NFS3_LOOKUP 3 +am_LOOKUP3res * am_nfs3_lookup_3(am_LOOKUP3args *, CLIENT *); +am_LOOKUP3res * am_nfs3_lookup_3_svc(am_LOOKUP3args *, struct svc_req *); +#define AM_NFS3_ACCESS 4 +am_ACCESS3res * am_nfs3_access_3(am_ACCESS3args *, CLIENT *); +am_ACCESS3res * am_nfs3_access_3_svc(am_ACCESS3args *, struct svc_req *); +#define AM_NFS3_READLINK 5 +am_READLINK3res * am_nfs3_readlink_3(am_READLINK3args *, CLIENT *); +am_READLINK3res * am_nfs3_readlink_3_svc(am_READLINK3args *, struct svc_req *); +#define AM_NFS3_READ 6 +am_READ3res * am_nfs3_read_3(am_READ3args *, CLIENT *); +am_READ3res * am_nfs3_read_3_svc(am_READ3args *, struct svc_req *); +#define AM_NFS3_WRITE 7 +am_WRITE3res * am_nfs3_write_3(am_WRITE3args *, CLIENT *); +am_WRITE3res * am_nfs3_write_3_svc(am_WRITE3args *, struct svc_req *); +#define AM_NFS3_CREATE 8 +am_CREATE3res * am_nfs3_create_3(am_CREATE3args *, CLIENT *); +am_CREATE3res * am_nfs3_create_3_svc(am_CREATE3args *, struct svc_req *); +#define AM_NFS3_MKDIR 9 +am_MKDIR3res * am_nfs3_mkdir_3(am_MKDIR3args *, CLIENT *); +am_MKDIR3res * am_nfs3_mkdir_3_svc(am_MKDIR3args *, struct svc_req *); +#define AM_NFS3_SYMLINK 10 +am_SYMLINK3res * am_nfs3_symlink_3(am_SYMLINK3args *, CLIENT *); +am_SYMLINK3res * am_nfs3_symlink_3_svc(am_SYMLINK3args *, struct svc_req *); +#define AM_NFS3_MKNOD 11 +am_MKNOD3res * am_nfs3_mknod_3(am_MKNOD3args *, CLIENT *); +am_MKNOD3res * am_nfs3_mknod_3_svc(am_MKNOD3args *, struct svc_req *); +#define AM_NFS3_REMOVE 12 +am_REMOVE3res * am_nfs3_remove_3(am_REMOVE3args *, CLIENT *); +am_REMOVE3res * am_nfs3_remove_3_svc(am_REMOVE3args *, struct svc_req *); +#define AM_NFS3_RMDIR 13 +am_RMDIR3res * am_nfs3_rmdir_3(am_RMDIR3args *, CLIENT *); +am_RMDIR3res * am_nfs3_rmdir_3_svc(am_RMDIR3args *, struct svc_req *); +#define AM_NFS3_RENAME 14 +am_RENAME3res * am_nfs3_rename_3(am_RENAME3args *, CLIENT *); +am_RENAME3res * am_nfs3_rename_3_svc(am_RENAME3args *, struct svc_req *); +#define AM_NFS3_LINK 15 +am_LINK3res * am_nfs3_link_3(am_LINK3args *, CLIENT *); +am_LINK3res * am_nfs3_link_3_svc(am_LINK3args *, struct svc_req *); +#define AM_NFS3_READDIR 16 +am_READDIR3res * am_nfs3_readdir_3(am_READDIR3args *, CLIENT *); +am_READDIR3res * am_nfs3_readdir_3_svc(am_READDIR3args *, struct svc_req *); +#define AM_NFS3_READDIRPLUS 17 +am_READDIRPLUS3res * am_nfs3_readdirplus_3(am_READDIRPLUS3args *, CLIENT *); +am_READDIRPLUS3res * am_nfs3_readdirplus_3_svc(am_READDIRPLUS3args *, struct svc_req *); +#define AM_NFS3_FSSTAT 18 +am_FSSTAT3res * am_nfs3_fsstat_3(am_FSSTAT3args *, CLIENT *); +am_FSSTAT3res * am_nfs3_fsstat_3_svc(am_FSSTAT3args *, struct svc_req *); +#define AM_NFS3_FSINFO 19 +am_FSINFO3res * am_nfs3_fsinfo_3(am_FSINFO3args *, CLIENT *); +am_FSINFO3res * am_nfs3_fsinfo_3_svc(am_FSINFO3args *, struct svc_req *); +#define AM_NFS3_PATHCONF 20 +am_PATHCONF3res * am_nfs3_pathconf_3(am_PATHCONF3args *, CLIENT *); +am_PATHCONF3res * am_nfs3_pathconf_3_svc(am_PATHCONF3args *, struct svc_req *); +#define AM_NFS3_COMMIT 21 +am_COMMIT3res * am_nfs3_commit_3(am_COMMIT3args *, CLIENT *); +am_COMMIT3res * am_nfs3_commit_3_svc(am_COMMIT3args *, struct svc_req *); +int nfs_program_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t); + bool_t xdr_am_fhandle3(XDR *xdrs, am_fhandle3 *objp); bool_t xdr_am_mountstat3(XDR *xdrs, am_mountstat3 *objp); bool_t xdr_am_mountres3_ok(XDR *xdrs, am_mountres3_ok *objp); @@ -322,6 +1199,134 @@ bool_t xdr_am_LOOKUP3resfail(XDR *xdrs, am_LOOKUP3resfail *objp); bool_t xdr_am_LOOKUP3resok(XDR *xdrs, am_LOOKUP3resok *objp); bool_t xdr_am_nfsstat3(XDR *xdrs, am_nfsstat3 *objp); bool_t xdr_am_nfs_fh3(XDR *xdrs, am_nfs_fh3 *objp); +bool_t xdr_am_cookieverf3 (XDR *, am_cookieverf3); +bool_t xdr_uint64 (XDR *, uint64*); +bool_t xdr_am_cookie3 (XDR *, am_cookie3*); +bool_t xdr_am_nfs_fh3 (XDR *, am_nfs_fh3*); +bool_t xdr_am_nfsstat3 (XDR *, am_nfsstat3*); +bool_t xdr_am_filename3 (XDR *, am_filename3*); +bool_t xdr_am_diropargs3 (XDR *, am_diropargs3*); +bool_t xdr_am_ftype3 (XDR *, am_ftype3*); +bool_t xdr_am_mode3 (XDR *, am_mode3*); +bool_t xdr_am_uid3 (XDR *, am_uid3*); +bool_t xdr_am_gid3 (XDR *, am_gid3*); +bool_t xdr_am_size3 (XDR *, am_size3*); +bool_t xdr_am_fileid3 (XDR *, am_fileid3*); +bool_t xdr_am_specdata3 (XDR *, am_specdata3*); +bool_t xdr_am_nfstime3 (XDR *, am_nfstime3*); +bool_t xdr_am_fattr3 (XDR *, am_fattr3*); +bool_t xdr_am_post_op_attr (XDR *, am_post_op_attr*); +bool_t xdr_am_stable_how (XDR *, am_stable_how*); +bool_t xdr_am_offset3 (XDR *, am_offset3*); +bool_t xdr_am_count3 (XDR *, am_count3*); +bool_t xdr_am_wcc_attr (XDR *, am_wcc_attr*); +bool_t xdr_am_pre_op_attr (XDR *, am_pre_op_attr*); +bool_t xdr_am_wcc_data (XDR *, am_wcc_data*); +bool_t xdr_am_WRITE3args (XDR *, am_WRITE3args*); +bool_t xdr_am_writeverf3 (XDR *, am_writeverf3); +bool_t xdr_am_WRITE3resok (XDR *, am_WRITE3resok*); +bool_t xdr_am_WRITE3resfail (XDR *, am_WRITE3resfail*); +bool_t xdr_am_WRITE3res (XDR *, am_WRITE3res*); +bool_t xdr_am_LOOKUP3args (XDR *, am_LOOKUP3args*); +bool_t xdr_am_LOOKUP3resok (XDR *, am_LOOKUP3resok*); +bool_t xdr_am_LOOKUP3resfail (XDR *, am_LOOKUP3resfail*); +bool_t xdr_am_LOOKUP3res (XDR *, am_LOOKUP3res*); +bool_t xdr_am_COMMIT3args (XDR *, am_COMMIT3args*); +bool_t xdr_am_COMMIT3resok (XDR *, am_COMMIT3resok*); +bool_t xdr_am_COMMIT3resfail (XDR *, am_COMMIT3resfail*); +bool_t xdr_am_COMMIT3res (XDR *, am_COMMIT3res*); +bool_t xdr_am_ACCESS3args (XDR *, am_ACCESS3args*); +bool_t xdr_am_ACCESS3resok (XDR *, am_ACCESS3resok*); +bool_t xdr_am_ACCESS3resfail (XDR *, am_ACCESS3resfail*); +bool_t xdr_am_ACCESS3res (XDR *, am_ACCESS3res*); +bool_t xdr_am_GETATTR3args (XDR *, am_GETATTR3args*); +bool_t xdr_am_GETATTR3resok (XDR *, am_GETATTR3resok*); +bool_t xdr_am_GETATTR3res (XDR *, am_GETATTR3res*); +bool_t xdr_am_time_how (XDR *, am_time_how*); +bool_t xdr_am_set_mode3 (XDR *, am_set_mode3*); +bool_t xdr_am_set_uid3 (XDR *, am_set_uid3*); +bool_t xdr_am_set_gid3 (XDR *, am_set_gid3*); +bool_t xdr_am_set_size3 (XDR *, am_set_size3*); +bool_t xdr_am_set_atime (XDR *, am_set_atime*); +bool_t xdr_am_set_mtime (XDR *, am_set_mtime*); +bool_t xdr_am_sattr3 (XDR *, am_sattr3*); +bool_t xdr_am_createmode3 (XDR *, am_createmode3*); +bool_t xdr_am_createverf3 (XDR *, am_createverf3); +bool_t xdr_am_createhow3 (XDR *, am_createhow3*); +bool_t xdr_am_CREATE3args (XDR *, am_CREATE3args*); +bool_t xdr_am_post_op_fh3 (XDR *, am_post_op_fh3*); +bool_t xdr_am_CREATE3resok (XDR *, am_CREATE3resok*); +bool_t xdr_am_CREATE3resfail (XDR *, am_CREATE3resfail*); +bool_t xdr_am_CREATE3res (XDR *, am_CREATE3res*); +bool_t xdr_am_REMOVE3args (XDR *, am_REMOVE3args*); +bool_t xdr_am_REMOVE3resok (XDR *, am_REMOVE3resok*); +bool_t xdr_am_REMOVE3resfail (XDR *, am_REMOVE3resfail*); +bool_t xdr_am_REMOVE3res (XDR *, am_REMOVE3res*); +bool_t xdr_am_READ3args (XDR *, am_READ3args*); +bool_t xdr_am_READ3resok (XDR *, am_READ3resok*); +bool_t xdr_am_READ3resfail (XDR *, am_READ3resfail*); +bool_t xdr_am_READ3res (XDR *, am_READ3res*); +bool_t xdr_am_FSINFO3args (XDR *, am_FSINFO3args*); +bool_t xdr_am_FSINFO3resok (XDR *, am_FSINFO3resok*); +bool_t xdr_am_FSINFO3resfail (XDR *, am_FSINFO3resfail*); +bool_t xdr_am_FSINFO3res (XDR *, am_FSINFO3res*); +bool_t xdr_am_FSSTAT3args (XDR *, am_FSSTAT3args*); +bool_t xdr_am_FSSTAT3resok (XDR *, am_FSSTAT3resok*); +bool_t xdr_am_FSSTAT3resfail (XDR *, am_FSSTAT3resfail*); +bool_t xdr_am_FSSTAT3res (XDR *, am_FSSTAT3res*); +bool_t xdr_am_PATHCONF3args (XDR *, am_PATHCONF3args*); +bool_t xdr_am_PATHCONF3resok (XDR *, am_PATHCONF3resok*); +bool_t xdr_am_PATHCONF3resfail (XDR *, am_PATHCONF3resfail*); +bool_t xdr_am_PATHCONF3res (XDR *, am_PATHCONF3res*); +bool_t xdr_am_nfspath3 (XDR *, am_nfspath3*); +bool_t xdr_am_symlinkdata3 (XDR *, am_symlinkdata3*); +bool_t xdr_am_SYMLINK3args (XDR *, am_SYMLINK3args*); +bool_t xdr_am_SYMLINK3resok (XDR *, am_SYMLINK3resok*); +bool_t xdr_am_SYMLINK3resfail (XDR *, am_SYMLINK3resfail*); +bool_t xdr_am_SYMLINK3res (XDR *, am_SYMLINK3res*); +bool_t xdr_am_READLINK3args (XDR *, am_READLINK3args*); +bool_t xdr_am_READLINK3resok (XDR *, am_READLINK3resok*); +bool_t xdr_am_READLINK3resfail (XDR *, am_READLINK3resfail*); +bool_t xdr_am_READLINK3res (XDR *, am_READLINK3res*); +bool_t xdr_am_devicedata3 (XDR *, am_devicedata3*); +bool_t xdr_am_mknoddata3 (XDR *, am_mknoddata3*); +bool_t xdr_am_MKNOD3args (XDR *, am_MKNOD3args*); +bool_t xdr_am_MKNOD3resok (XDR *, am_MKNOD3resok*); +bool_t xdr_am_MKNOD3resfail (XDR *, am_MKNOD3resfail*); +bool_t xdr_am_MKNOD3res (XDR *, am_MKNOD3res*); +bool_t xdr_am_MKDIR3args (XDR *, am_MKDIR3args*); +bool_t xdr_am_MKDIR3resok (XDR *, am_MKDIR3resok*); +bool_t xdr_am_MKDIR3resfail (XDR *, am_MKDIR3resfail*); +bool_t xdr_am_MKDIR3res (XDR *, am_MKDIR3res*); +bool_t xdr_am_RMDIR3args (XDR *, am_RMDIR3args*); +bool_t xdr_am_RMDIR3resok (XDR *, am_RMDIR3resok*); +bool_t xdr_am_RMDIR3resfail (XDR *, am_RMDIR3resfail*); +bool_t xdr_am_RMDIR3res (XDR *, am_RMDIR3res*); +bool_t xdr_am_RENAME3args (XDR *, am_RENAME3args*); +bool_t xdr_am_RENAME3resok (XDR *, am_RENAME3resok*); +bool_t xdr_am_RENAME3resfail (XDR *, am_RENAME3resfail*); +bool_t xdr_am_RENAME3res (XDR *, am_RENAME3res*); +bool_t xdr_am_READDIRPLUS3args (XDR *, am_READDIRPLUS3args*); +bool_t xdr_am_entryplus3 (XDR *, am_entryplus3*); +bool_t xdr_am_dirlistplus3 (XDR *, am_dirlistplus3*); +bool_t xdr_am_READDIRPLUS3resok (XDR *, am_READDIRPLUS3resok*); +bool_t xdr_am_READDIRPLUS3resfail (XDR *, am_READDIRPLUS3resfail*); +bool_t xdr_am_READDIRPLUS3res (XDR *, am_READDIRPLUS3res*); +bool_t xdr_am_READDIR3args (XDR *, am_READDIR3args*); +bool_t xdr_am_entry3 (XDR *, am_entry3*); +bool_t xdr_am_dirlist3 (XDR *, am_dirlist3*); +bool_t xdr_am_READDIR3resok (XDR *, am_READDIR3resok*); +bool_t xdr_am_READDIR3resfail (XDR *, am_READDIR3resfail*); +bool_t xdr_am_READDIR3res (XDR *, am_READDIR3res*); +bool_t xdr_am_LINK3args (XDR *, am_LINK3args*); +bool_t xdr_am_LINK3resok (XDR *, am_LINK3resok*); +bool_t xdr_am_LINK3resfail (XDR *, am_LINK3resfail*); +bool_t xdr_am_LINK3res (XDR *, am_LINK3res*); +bool_t xdr_am_sattrguard3 (XDR *, am_sattrguard3*); +bool_t xdr_am_SETATTR3args (XDR *, am_SETATTR3args*); +bool_t xdr_am_SETATTR3resok (XDR *, am_SETATTR3resok*); +bool_t xdr_am_SETATTR3resfail (XDR *, am_SETATTR3resfail*); +bool_t xdr_am_SETATTR3res (XDR *, am_SETATTR3res*); #endif /* HAVE_FS_NFS3 */ #endif /* not _AM_XDR_FUNC_H */ diff --git a/include/amq_defs.h b/include/amq_defs.h index 75c46517103..89f61805fc6 100644 --- a/include/amq_defs.h +++ b/include/amq_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -55,7 +51,7 @@ #define AMQ_VERSION ((u_long)1) #define AMQPROC_NULL ((u_long)0) #define AMQPROC_MNTTREE ((u_long)1) -#define AMQPROC_UMNT ((u_long)2) +#define AMQPROC_UMNT ((u_long)2) /* asynchronous unmount */ #define AMQPROC_STATS ((u_long)3) #define AMQPROC_EXPORT ((u_long)4) #define AMQPROC_SETOPT ((u_long)5) @@ -64,15 +60,19 @@ #define AMQPROC_GETVERS ((u_long)8) #define AMQPROC_GETPID ((u_long)9) #define AMQPROC_PAWD ((u_long)10) +#define AMQPROC_SYNC_UMNT ((u_long)11) /* synchronous unmount */ +#define AMQPROC_GETMAPINFO ((u_long)12) /* * TYPEDEFS */ typedef long *time_type; typedef struct amq_mount_info amq_mount_info; +typedef struct amq_map_info amq_map_info; typedef struct amq_mount_stats amq_mount_stats; typedef struct amq_mount_tree amq_mount_tree; typedef struct amq_setopt amq_setopt; +typedef struct amq_sync_umnt amq_sync_umnt; typedef amq_mount_tree *amq_mount_tree_p; /* @@ -114,6 +114,22 @@ typedef struct { amq_mount_tree_p *amq_mount_tree_list_val; } amq_mount_tree_list; +struct amq_map_info { + amq_string mi_name; + amq_string mi_wildcard; + time_type mi_modify; + int mi_flags; + int mi_refc; + int mi_up; + int mi_reloads; + int mi_nentries; +}; + +typedef struct { + u_int amq_map_info_list_len; + amq_map_info *amq_map_info_list_val; +} amq_map_info_list; + struct amq_mount_stats { int as_drops; int as_stale; @@ -122,6 +138,21 @@ struct amq_mount_stats { int as_uerr; }; +typedef enum { + AMQ_UMNT_OK = 0, /* must be zero! */ + AMQ_UMNT_FAILED = 1, /* unmount failed */ + AMQ_UMNT_FORK = 2, /* fork failed */ + AMQ_UMNT_READ = 3, /* pipe read failed */ + AMQ_UMNT_SERVER = 4, /* server down */ + AMQ_UMNT_SIGNAL = 5 /* received signal */ +} au_etype; + +struct amq_sync_umnt { + au_etype au_etype; /* error type */ + int au_errno; /* error number */ + int au_signal; /* signal received */ +}; + enum amq_opt { AMOPT_DEBUG = 0, AMOPT_LOGFILE = 1, @@ -145,12 +176,15 @@ struct amq_setopt { */ extern bool_t xdr_amq_mount_info(XDR *xdrs, amq_mount_info *objp); extern bool_t xdr_amq_mount_info_list(XDR *xdrs, amq_mount_info_list *objp); +extern bool_t xdr_amq_map_info(XDR *xdrs, amq_map_info *objp); +extern bool_t xdr_amq_map_info_list(XDR *xdrs, amq_map_info_list *objp); extern bool_t xdr_amq_mount_stats(XDR *xdrs, amq_mount_stats *objp); extern bool_t xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp); extern bool_t xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp); extern bool_t xdr_amq_mount_tree_p(XDR *xdrs, amq_mount_tree_p *objp); extern bool_t xdr_amq_opt(XDR *xdrs, amq_opt *objp); extern bool_t xdr_amq_setopt(XDR *xdrs, amq_setopt *objp); +extern bool_t xdr_amq_sync_umnt(XDR *xdrs, amq_sync_umnt *objp); extern bool_t xdr_pri_free(XDRPROC_T_TYPE xdr_args, caddr_t args_ptr); extern bool_t xdr_time_type(XDR *xdrs, time_type *objp); diff --git a/include/mount_headers1.h b/include/mount_headers1.h index 41f26e59f99..7d518a06aa2 100644 --- a/include/mount_headers1.h +++ b/include/mount_headers1.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -123,50 +119,50 @@ # include #endif /* HAVE_SYS_VMOUNT_H */ -/* - * There is no point in including this on a glibc2 system - * we're only asking for trouble - */ -#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +#if HAVE_LINUX_FS_H +# if !defined(__GLIBC__) || __GLIBC__ < 2 /* * There's a conflict of definitions on redhat alpha linux between * and . * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 * between and (2.1 kernels). */ -# ifdef HAVE_SOCKETBITS_H -# define _LINUX_SOCKET_H -# undef BLKFLSBUF -# undef BLKGETSIZE -# undef BLKRAGET -# undef BLKRASET -# undef BLKROGET -# undef BLKROSET -# undef BLKRRPART -# undef MS_MGC_VAL -# undef MS_RMT_MASK -# endif /* HAVE_SOCKETBITS_H */ -# ifdef HAVE_LINUX_POSIX_TYPES_H -# include -# endif /* HAVE_LINUX_POSIX_TYPES_H */ -# ifndef _LINUX_BYTEORDER_GENERIC_H -# define _LINUX_BYTEORDER_GENERIC_H -# endif /* _LINUX_BYTEORDER_GENERIC_H */ -# ifndef _LINUX_STRING_H_ -# define _LINUX_STRING_H_ -# endif /* not _LINUX_STRING_H_ */ -# ifdef HAVE_LINUX_KDEV_T_H -# define __KERNEL__ -# include -# undef __KERNEL__ -# endif /* HAVE_LINUX_KDEV_T_H */ -# ifdef HAVE_LINUX_LIST_H -# define __KERNEL__ -# include -# undef __KERNEL__ -# endif /* HAVE_LINUX_LIST_H */ -# include -#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +# else +# include +# endif/* (!__GLIBC__ || __GLIBC__ < 2) */ +#endif /* HAVE_LINUX_FS_H */ #ifdef HAVE_SYS_FS_TYPES_H # include @@ -192,6 +188,10 @@ # include #endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ + #ifdef HAVE_SYS_FS_PC_FS_H # include #endif /* HAVE_SYS_FS_PC_FS_H */ @@ -202,6 +202,14 @@ # include #endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ + #ifdef HAVE_RPC_RPC_H # include #endif /* HAVE_RPC_RPC_H */ diff --git a/include/mount_headers2.h b/include/mount_headers2.h index 273e89cae10..87bf18efd8b 100644 --- a/include/mount_headers2.h +++ b/include/mount_headers2.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/include/nfs_common.h b/include/nfs_common.h new file mode 100644 index 00000000000..d89632b5933 --- /dev/null +++ b/include/nfs_common.h @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2011 Christos Zoulas + * 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. + * + * + * File: am-utils/include/nfs_common.c + * + */ +struct nfs_common_args { + u_long flags; + u_long acdirmin; + u_long acdirmax; + u_long acregmin; + u_long acregmax; + u_long timeo; + u_long retrans; + u_long rsize; + u_long wsize; +}; + +#ifdef HAVE_NFS_ARGS_T_ACREGMIN +#define GET_ACREGMIN(nap, a) nap->acregmin = a.acregmin; +#define PUT_ACREGMIN(nap, a) a.acregmin = nap->acregmin; +#else +#define GET_ACREGMIN(nap, a) +#define PUT_ACREGMIN(nap, a) +#endif +#ifdef HAVE_NFS_ARGS_T_ACREGMAX +#define GET_ACREGMAX(nap, a) nap->acregmax = a.acregmax; +#define PUT_ACREGMAX(nap, a) a.acregmax = nap->acregmax; +#else +#define GET_ACREGMAX(nap, a) +#define PUT_ACREGMAX(nap, a) +#endif + +#ifdef HAVE_NFS_ARGS_T_ACDIRMIN +#define GET_ACDIRMIN(nap, a) nap->acdirmin = a.acdirmin; +#define PUT_ACDIRMIN(nap, a) a.acdirmin = nap->acdirmin; +#else +#define GET_ACDIRMIN(nap, a) +#define PUT_ACDIRMIN(nap, a) +#endif +#ifdef HAVE_NFS_ARGS_T_ACDIRMAX +#define GET_ACDIRMAX(nap, a) nap->acdirmax = a.acdirmax; +#define PUT_ACDIRMAX(nap, a) a.acdirmax = nap->acdirmax; +#else +#define GET_ACDIRMAX(nap, a) +#define PUT_ACDIRMAX(nap, a) +#endif + +#define get_nfs_common_args(nap, a) \ + do { \ + nap->flags = a.flags; \ + GET_ACREGMIN(nap, a) \ + GET_ACREGMAX(nap, a) \ + GET_ACDIRMIN(nap, a) \ + GET_ACDIRMAX(nap, a) \ + nap->timeo = a.timeo; \ + nap->retrans = a.retrans; \ + nap->rsize = a.rsize; \ + nap->wsize = a.wsize; \ + } while (/*CONSTCOND*/0) + +#define put_nfs_common_args(nap, a) \ + do { \ + a.flags = nap->flags; \ + PUT_ACREGMIN(nap, a) \ + PUT_ACREGMAX(nap, a) \ + PUT_ACDIRMIN(nap, a) \ + PUT_ACDIRMAX(nap, a) \ + a.timeo = nap->timeo; \ + a.retrans = nap->retrans; \ + a.rsize = nap->rsize; \ + a.wsize = nap->wsize; \ + } while (/*CONSTCOND*/0) diff --git a/install-sh b/install-sh new file mode 100755 index 00000000000..377bb8687ff --- /dev/null +++ b/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-11-20.07; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/ldap-id.ms b/ldap-id.ms index 3c0d3085664..77ff4ba1cb2 100644 --- a/ldap-id.ms +++ b/ldap-id.ms @@ -303,4 +303,4 @@ Stockholm University S-106 91 Stockholm SWEDEN -Email: leifj@matematik.su.se +Email: leifj AT matematik.su.se diff --git a/ldap-id.txt b/ldap-id.txt index 162f6635185..33a9187b768 100644 --- a/ldap-id.txt +++ b/ldap-id.txt @@ -333,7 +333,7 @@ Author's Address S-106 91 Stockholm SWEDEN - Email: leifj@matematik.su.se + Email: leifj AT matematik.su.se diff --git a/libamu/Makefile.am b/libamu/Makefile.am new file mode 100644 index 00000000000..08e58d694c9 --- /dev/null +++ b/libamu/Makefile.am @@ -0,0 +1,88 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Makefile for libamu/ directory +# Author: Erez Zadok + +#noinst_LIBRARIES = libamu.a +lib_LTLIBRARIES = libamu.la + +# headers this depends on, not to be installed +noinst_HEADERS = amu.h + +# these sources must be included: +libamu_la_SOURCES = \ + misc_rpc.c \ + mount_fs.c \ + mtab.c \ + nfs_prot_xdr.c \ + strutil.c \ + wire.c \ + xdr_func.c \ + xutil.c + +## no need to list other optional sources because automake will add them +## automatically. +## XXX: must add the files after memcmp.c until automake 1.4+ is out +EXTRA_DIST = memcmp.c \ + clnt_sperrno.c \ + hasmntopt.c \ + strcasecmp.c \ + strerror.c \ + strlcat.c \ + strlcpy.c \ + strstr.c \ + ualarm.c + +DISTCLEANFILES = mountutil.c mtabutil.c transputil.c umount_fs.c + +# these may be added automatically by automake if needed: +# alloca.c +# clnt_sperrno.c +# hasmntopt.c +# memcmp.c (via AC_FUNC_MEMCMP) +# strcasecmp.c +# strerror.c +# strstr.c +# ualarm.c +# +# files optionally compiled: +# mountutil.c: mount utilities +# umount_fs.c: un-mount utilities +# +# files that are always compiled, but to a different path: +# mtabutil.c: mount table utilities +# transputil.c: transport (Sockets or TLI) utilities +BUILT_SOURCES = \ + mountutil.c \ + umount_fs.c \ + mtabutil.c \ + transputil.c + +## XXX: Use the next line when automake newer than 1.4 +## XXX: Instead of the two lines that follow. +## libamu_la_LIBADD = @LTLIBOBJS@ @LTALLOCA@ +libamu_la_LIBADD = @AMU_LIB_OBJS@ +libamu_la_DEPENDENCIES = @AMU_LIB_OBJS@ + + +# LDFLAGS should include standard ones plus LIBTOOL ones +AM_LDFLAGS = @LDFLAGS@ @LIBTOOL_LDFLAGS@ + +AM_CPPFLAGS = -I$(top_srcdir)/include + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AM_CFLAGS = $(AMU_CFLAGS) + +# dependencies +$(libamu_la_OBJECTS) $(libamu_la_LIBADD): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) diff --git a/libamu/Makefile.in b/libamu/Makefile.in new file mode 100644 index 00000000000..ec213a713a6 --- /dev/null +++ b/libamu/Makefile.in @@ -0,0 +1,732 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Makefile for libamu/ directory +# Author: Erez Zadok + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = libamu +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ + $(noinst_HEADERS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am_libamu_la_OBJECTS = misc_rpc.lo mount_fs.lo mtab.lo nfs_prot_xdr.lo \ + strutil.lo wire.lo xdr_func.lo xutil.lo +libamu_la_OBJECTS = $(am_libamu_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libamu_la_SOURCES) +DIST_SOURCES = $(libamu_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +#noinst_LIBRARIES = libamu.a +lib_LTLIBRARIES = libamu.la + +# headers this depends on, not to be installed +noinst_HEADERS = amu.h + +# these sources must be included: +libamu_la_SOURCES = \ + misc_rpc.c \ + mount_fs.c \ + mtab.c \ + nfs_prot_xdr.c \ + strutil.c \ + wire.c \ + xdr_func.c \ + xutil.c + +EXTRA_DIST = memcmp.c \ + clnt_sperrno.c \ + hasmntopt.c \ + strcasecmp.c \ + strerror.c \ + strlcat.c \ + strlcpy.c \ + strstr.c \ + ualarm.c + +DISTCLEANFILES = mountutil.c mtabutil.c transputil.c umount_fs.c + +# these may be added automatically by automake if needed: +# alloca.c +# clnt_sperrno.c +# hasmntopt.c +# memcmp.c (via AC_FUNC_MEMCMP) +# strcasecmp.c +# strerror.c +# strstr.c +# ualarm.c +# +# files optionally compiled: +# mountutil.c: mount utilities +# umount_fs.c: un-mount utilities +# +# files that are always compiled, but to a different path: +# mtabutil.c: mount table utilities +# transputil.c: transport (Sockets or TLI) utilities +BUILT_SOURCES = \ + mountutil.c \ + umount_fs.c \ + mtabutil.c \ + transputil.c + +libamu_la_LIBADD = @AMU_LIB_OBJS@ +libamu_la_DEPENDENCIES = @AMU_LIB_OBJS@ + +# LDFLAGS should include standard ones plus LIBTOOL ones +AM_LDFLAGS = @LDFLAGS@ @LIBTOOL_LDFLAGS@ +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(AMU_CFLAGS) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libamu/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu libamu/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libamu.la: $(libamu_la_OBJECTS) $(libamu_la_DEPENDENCIES) $(EXTRA_libamu_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libamu_la_OBJECTS) $(libamu_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc_rpc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_fs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtab.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nfs_prot_xdr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wire.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdr_func.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xutil.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES + + +# dependencies +$(libamu_la_OBJECTS) $(libamu_la_LIBADD): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libamu/alloca.c b/libamu/alloca.c deleted file mode 100644 index 31fb4e0d4e0..00000000000 --- a/libamu/alloca.c +++ /dev/null @@ -1,504 +0,0 @@ -/* alloca.c -- allocate automatically reclaimed memory - (Mostly) portable public-domain implementation -- D A Gwyn - - This implementation of the PWB library alloca function, - which is used to allocate space off the run-time stack so - that it is automatically reclaimed upon procedure exit, - was inspired by discussions with J. Q. Johnson of Cornell. - J.Otto Tennant contributed the Cray support. - - There are some preprocessor constants that can - be defined when compiling for your specific system, for - improved efficiency; however, the defaults should be okay. - - The general concept of this implementation is to keep - track of all alloca-allocated blocks, and reclaim any - that are found to be deeper in the stack than the current - invocation. This heuristic does not reclaim storage as - soon as it becomes invalid, but it will do so eventually. - - As a special case, alloca(0) reclaims storage without - allocating any. It is a good idea to use alloca(0) in - your main control loop, etc. to force garbage collection. */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef emacs -#include "blockinput.h" -#endif - -/* If compiling with GCC 2, this file's not needed. */ -#if !defined (__GNUC__) || __GNUC__ < 2 - -/* If someone has defined alloca as a macro, - there must be some other way alloca is supposed to work. */ -#ifndef alloca - -#ifdef emacs -#ifdef static -/* actually, only want this if static is defined as "" - -- this is for usg, in which emacs must undefine static - in order to make unexec workable - */ -#ifndef STACK_DIRECTION -you -lose --- must know STACK_DIRECTION at compile-time -#endif /* STACK_DIRECTION undefined */ -#endif /* static */ -#endif /* emacs */ - -/* If your stack is a linked list of frames, you have to - provide an "address metric" ADDRESS_FUNCTION macro. */ - -#if defined (CRAY) && defined (CRAY_STACKSEG_END) -long i00afunc (); -#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) -#else -#define ADDRESS_FUNCTION(arg) &(arg) -#endif - -#if __STDC__ -typedef void *pointer; -#else -typedef char *pointer; -#endif - -#ifndef NULL -#define NULL 0 -#endif - -/* Different portions of Emacs need to call different versions of - malloc. The Emacs executable needs alloca to call xmalloc, because - ordinary malloc isn't protected from input signals. On the other - hand, the utilities in lib-src need alloca to call malloc; some of - them are very simple, and don't have an xmalloc routine. - - Non-Emacs programs expect this to call use xmalloc. - - Callers below should use malloc. */ - -#ifndef emacs -#define malloc xmalloc -#endif -extern pointer malloc (); - -/* Define STACK_DIRECTION if you know the direction of stack - growth for your system; otherwise it will be automatically - deduced at run-time. - - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ - -#ifndef STACK_DIRECTION -#define STACK_DIRECTION 0 /* Direction unknown. */ -#endif - -#if STACK_DIRECTION != 0 - -#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ - -#else /* STACK_DIRECTION == 0; need run-time code. */ - -static int stack_dir; /* 1 or -1 once known. */ -#define STACK_DIR stack_dir - -static void -find_stack_direction () -{ - static char *addr = NULL; /* Address of first `dummy', once known. */ - auto char dummy; /* To get stack address. */ - - if (addr == NULL) - { /* Initial entry. */ - addr = ADDRESS_FUNCTION (dummy); - - find_stack_direction (); /* Recurse once. */ - } - else - { - /* Second entry. */ - if (ADDRESS_FUNCTION (dummy) > addr) - stack_dir = 1; /* Stack grew upward. */ - else - stack_dir = -1; /* Stack grew downward. */ - } -} - -#endif /* STACK_DIRECTION == 0 */ - -/* An "alloca header" is used to: - (a) chain together all alloca'ed blocks; - (b) keep track of stack depth. - - It is very important that sizeof(header) agree with malloc - alignment chunk size. The following default should work okay. */ - -#ifndef ALIGN_SIZE -#define ALIGN_SIZE sizeof(double) -#endif - -typedef union hdr -{ - char align[ALIGN_SIZE]; /* To force sizeof(header). */ - struct - { - union hdr *next; /* For chaining headers. */ - char *deep; /* For stack depth measure. */ - } h; -} header; - -static header *last_alloca_header = NULL; /* -> last alloca header. */ - -/* Return a pointer to at least SIZE bytes of storage, - which will be automatically reclaimed upon exit from - the procedure that called alloca. Originally, this space - was supposed to be taken from the current stack frame of the - caller, but that method cannot be made to work for some - implementations of C, for example under Gould's UTX/32. */ - -pointer -alloca (size) - unsigned size; -{ - auto char probe; /* Probes stack depth: */ - register char *depth = ADDRESS_FUNCTION (probe); - -#if STACK_DIRECTION == 0 - if (STACK_DIR == 0) /* Unknown growth direction. */ - find_stack_direction (); -#endif - - /* Reclaim garbage, defined as all alloca'd storage that - was allocated from deeper in the stack than currently. */ - - { - register header *hp; /* Traverses linked list. */ - -#ifdef emacs - BLOCK_INPUT; -#endif - - for (hp = last_alloca_header; hp != NULL;) - if ((STACK_DIR > 0 && hp->h.deep > depth) - || (STACK_DIR < 0 && hp->h.deep < depth)) - { - register header *np = hp->h.next; - - free ((pointer) hp); /* Collect garbage. */ - - hp = np; /* -> next header. */ - } - else - break; /* Rest are not deeper. */ - - last_alloca_header = hp; /* -> last valid storage. */ - -#ifdef emacs - UNBLOCK_INPUT; -#endif - } - - if (size == 0) - return NULL; /* No allocation required. */ - - /* Allocate combined header + user data storage. */ - - { - register pointer new = malloc (sizeof (header) + size); - /* Address of header. */ - - if (new == 0) - abort(); - - ((header *) new)->h.next = last_alloca_header; - ((header *) new)->h.deep = depth; - - last_alloca_header = (header *) new; - - /* User storage begins just after header. */ - - return (pointer) ((char *) new + sizeof (header)); - } -} - -#if defined (CRAY) && defined (CRAY_STACKSEG_END) - -#ifdef DEBUG_I00AFUNC -#include -#endif - -#ifndef CRAY_STACK -#define CRAY_STACK -#ifndef CRAY2 -/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ -struct stack_control_header - { - long shgrow:32; /* Number of times stack has grown. */ - long shaseg:32; /* Size of increments to stack. */ - long shhwm:32; /* High water mark of stack. */ - long shsize:32; /* Current size of stack (all segments). */ - }; - -/* The stack segment linkage control information occurs at - the high-address end of a stack segment. (The stack - grows from low addresses to high addresses.) The initial - part of the stack segment linkage control information is - 0200 (octal) words. This provides for register storage - for the routine which overflows the stack. */ - -struct stack_segment_linkage - { - long ss[0200]; /* 0200 overflow words. */ - long sssize:32; /* Number of words in this segment. */ - long ssbase:32; /* Offset to stack base. */ - long:32; - long sspseg:32; /* Offset to linkage control of previous - segment of stack. */ - long:32; - long sstcpt:32; /* Pointer to task common address block. */ - long sscsnm; /* Private control structure number for - microtasking. */ - long ssusr1; /* Reserved for user. */ - long ssusr2; /* Reserved for user. */ - long sstpid; /* Process ID for pid based multi-tasking. */ - long ssgvup; /* Pointer to multitasking thread giveup. */ - long sscray[7]; /* Reserved for Cray Research. */ - long ssa0; - long ssa1; - long ssa2; - long ssa3; - long ssa4; - long ssa5; - long ssa6; - long ssa7; - long sss0; - long sss1; - long sss2; - long sss3; - long sss4; - long sss5; - long sss6; - long sss7; - }; - -#else /* CRAY2 */ -/* The following structure defines the vector of words - returned by the STKSTAT library routine. */ -struct stk_stat - { - long now; /* Current total stack size. */ - long maxc; /* Amount of contiguous space which would - be required to satisfy the maximum - stack demand to date. */ - long high_water; /* Stack high-water mark. */ - long overflows; /* Number of stack overflow ($STKOFEN) calls. */ - long hits; /* Number of internal buffer hits. */ - long extends; /* Number of block extensions. */ - long stko_mallocs; /* Block allocations by $STKOFEN. */ - long underflows; /* Number of stack underflow calls ($STKRETN). */ - long stko_free; /* Number of deallocations by $STKRETN. */ - long stkm_free; /* Number of deallocations by $STKMRET. */ - long segments; /* Current number of stack segments. */ - long maxs; /* Maximum number of stack segments so far. */ - long pad_size; /* Stack pad size. */ - long current_address; /* Current stack segment address. */ - long current_size; /* Current stack segment size. This - number is actually corrupted by STKSTAT to - include the fifteen word trailer area. */ - long initial_address; /* Address of initial segment. */ - long initial_size; /* Size of initial segment. */ - }; - -/* The following structure describes the data structure which trails - any stack segment. I think that the description in 'asdef' is - out of date. I only describe the parts that I am sure about. */ - -struct stk_trailer - { - long this_address; /* Address of this block. */ - long this_size; /* Size of this block (does not include - this trailer). */ - long unknown2; - long unknown3; - long link; /* Address of trailer block of previous - segment. */ - long unknown5; - long unknown6; - long unknown7; - long unknown8; - long unknown9; - long unknown10; - long unknown11; - long unknown12; - long unknown13; - long unknown14; - }; - -#endif /* CRAY2 */ -#endif /* not CRAY_STACK */ - -#ifdef CRAY2 -/* Determine a "stack measure" for an arbitrary ADDRESS. - I doubt that "lint" will like this much. */ - -static long -i00afunc (long *address) -{ - struct stk_stat status; - struct stk_trailer *trailer; - long *block, size; - long result = 0; - - /* We want to iterate through all of the segments. The first - step is to get the stack status structure. We could do this - more quickly and more directly, perhaps, by referencing the - $LM00 common block, but I know that this works. */ - - STKSTAT (&status); - - /* Set up the iteration. */ - - trailer = (struct stk_trailer *) (status.current_address - + status.current_size - - 15); - - /* There must be at least one stack segment. Therefore it is - a fatal error if "trailer" is null. */ - - if (trailer == 0) - abort (); - - /* Discard segments that do not contain our argument address. */ - - while (trailer != 0) - { - block = (long *) trailer->this_address; - size = trailer->this_size; - if (block == 0 || size == 0) - abort (); - trailer = (struct stk_trailer *) trailer->link; - if ((block <= address) && (address < (block + size))) - break; - } - - /* Set the result to the offset in this segment and add the sizes - of all predecessor segments. */ - - result = address - block; - - if (trailer == 0) - { - return result; - } - - do - { - if (trailer->this_size <= 0) - abort (); - result += trailer->this_size; - trailer = (struct stk_trailer *) trailer->link; - } - while (trailer != 0); - - /* We are done. Note that if you present a bogus address (one - not in any segment), you will get a different number back, formed - from subtracting the address of the first block. This is probably - not what you want. */ - - return (result); -} - -#else /* not CRAY2 */ -/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. - Determine the number of the cell within the stack, - given the address of the cell. The purpose of this - routine is to linearize, in some sense, stack addresses - for alloca. */ - -static long -i00afunc (long address) -{ - long stkl = 0; - - long size, pseg, this_segment, stack; - long result = 0; - - struct stack_segment_linkage *ssptr; - - /* Register B67 contains the address of the end of the - current stack segment. If you (as a subprogram) store - your registers on the stack and find that you are past - the contents of B67, you have overflowed the segment. - - B67 also points to the stack segment linkage control - area, which is what we are really interested in. */ - - stkl = CRAY_STACKSEG_END (); - ssptr = (struct stack_segment_linkage *) stkl; - - /* If one subtracts 'size' from the end of the segment, - one has the address of the first word of the segment. - - If this is not the first segment, 'pseg' will be - nonzero. */ - - pseg = ssptr->sspseg; - size = ssptr->sssize; - - this_segment = stkl - size; - - /* It is possible that calling this routine itself caused - a stack overflow. Discard stack segments which do not - contain the target address. */ - - while (!(this_segment <= address && address <= stkl)) - { -#ifdef DEBUG_I00AFUNC - fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); -#endif - if (pseg == 0) - break; - stkl = stkl - pseg; - ssptr = (struct stack_segment_linkage *) stkl; - size = ssptr->sssize; - pseg = ssptr->sspseg; - this_segment = stkl - size; - } - - result = address - this_segment; - - /* If you subtract pseg from the current end of the stack, - you get the address of the previous stack segment's end. - This seems a little convoluted to me, but I'll bet you save - a cycle somewhere. */ - - while (pseg != 0) - { -#ifdef DEBUG_I00AFUNC - fprintf (stderr, "%011o %011o\n", pseg, size); -#endif - stkl = stkl - pseg; - ssptr = (struct stack_segment_linkage *) stkl; - size = ssptr->sssize; - pseg = ssptr->sspseg; - result += size; - } - return (result); -} - -#endif /* not CRAY2 */ -#endif /* CRAY */ - -#endif /* no alloca */ -#endif /* not GCC version 2 */ diff --git a/libamu/amu.h b/libamu/amu.h index 1e7834a1526..9415fc404ea 100644 --- a/libamu/amu.h +++ b/libamu/amu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -47,11 +43,14 @@ /* * Decide what maximum level of NFS server to try and mount with. */ -#ifdef HAVE_FS_NFS3 +#if defined(HAVE_FS_NFS4) +# define NFS_VERS_MAX NFS_VERSION4 +#elif defined(HAVE_FS_NFS3) # define NFS_VERS_MAX NFS_VERSION3 #else /* not HAVE_FS_NFS3 */ # define NFS_VERS_MAX NFS_VERSION #endif /* not HAVE_FS_NFS3 */ +# define NFS_VERS_MIN NFS_VERSION /* some systems like ncr2 do not define this in */ #ifndef MNTPATHLEN diff --git a/libamu/clnt_sperrno.c b/libamu/clnt_sperrno.c index d3b48d1cd40..b19c15199b3 100644 --- a/libamu/clnt_sperrno.c +++ b/libamu/clnt_sperrno.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -36,9 +32,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * %W% (Berkeley) %G% * - * $Id: clnt_sperrno.c,v 5.2.2.1 1992/02/09 15:08:40 jsp beta $ + * File: am-utils/libamu/clnt_sperrno.c * */ @@ -57,7 +52,7 @@ * 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 + * WARRANTIES OF DESIGN, MERCHANTABILITY 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 diff --git a/libamu/hasmntopt.c b/libamu/hasmntopt.c index 14cceb53b5c..e5a6f2e80df 100644 --- a/libamu/hasmntopt.c +++ b/libamu/hasmntopt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,7 @@ n * modification, are permitted provided that the following conditions * 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 acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -67,7 +63,7 @@ nextmntopt(char **p) /* * Skip past white space */ - while (*cp && isspace((int) *cp)) + while (*cp && isspace((unsigned char) *cp)) cp++; /* @@ -106,7 +102,7 @@ amu_hasmntopt(mntent_t *mnt, char *opt) char t[MNTMAXSTR]; char *f; char *o = t; - int l = strlen(opt); + size_t l = strlen(opt); xstrlcpy(t, mnt->mnt_opts, sizeof(t)); diff --git a/libamu/memcmp.c b/libamu/memcmp.c new file mode 100644 index 00000000000..62099183616 --- /dev/null +++ b/libamu/memcmp.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/libamu/memcmp.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +/* + * compare two strings for up to length "len". + * this will normally be included on systems that either have no memcmp() + * and no bcmp(), or on systems that have both but the memcmp() is not 8-bit + * clean (such as SunOS 4.1.3). + * + * SunOS 4.x with gcc requires prototype of (const voidp, const voidp, size_t) + */ +int +am_memcmp(const voidp s1, const voidp s2, size_t len) +{ + unsigned char *ucp1 = (unsigned char *) s1; + unsigned char *ucp2 = (unsigned char *) s2; + int i = len; + + while (i-- > 0) + if (*ucp1++ != *ucp2++) + return (ucp1[-1] >= ucp2[-1] ? 1 : -1); + + return 0; +} diff --git a/libamu/misc_rpc.c b/libamu/misc_rpc.c index de0a92036b7..c6ad4486d7d 100644 --- a/libamu/misc_rpc.c +++ b/libamu/misc_rpc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/libamu/mount_fs.c b/libamu/mount_fs.c index 74f064ede64..b5576bdc6d1 100644 --- a/libamu/mount_fs.c +++ b/libamu/mount_fs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -46,6 +42,7 @@ #endif /* HAVE_CONFIG_H */ #include #include +#include /* ensure that mount table options are delimited by a comma */ @@ -105,6 +102,30 @@ struct opt_tab mnt_flags[] = {MNTTAB_OPT_OVERLAY, MNT2_GEN_OPT_OVERLAY}, #endif /* defined(MNT2_GEN_OPT_OVERLAY) && defined(MNTTAB_OPT_OVERLAY) */ +#if defined(MNT2_GEN_OPT_LOG) && defined(MNTTAB_OPT_LOG) + {MNTTAB_OPT_LOG, MNT2_GEN_OPT_LOG}, +#endif /* defined(MNT2_GEN_OPT_LOG) && defined(MNTTAB_OPT_LOG) */ + +#if defined(MNT2_GEN_OPT_NOATIME) && defined(MNTTAB_OPT_NOATIME) + {MNTTAB_OPT_NOATIME, MNT2_GEN_OPT_NOATIME}, +#endif /* defined(MNT2_GEN_OPT_NOATIME) && defined(MNTTAB_OPT_NOATIME) */ + +#if defined(MNT2_GEN_OPT_NODEVMTIME) && defined(MNTTAB_OPT_NODEVMTIME) + {MNTTAB_OPT_NODEVMTIME, MNT2_GEN_OPT_NODEVMTIME}, +#endif /* defined(MNT2_GEN_OPT_NODEVMTIME) && defined(MNTTAB_OPT_NODEVMTIME) */ + +#if defined(MNT2_GEN_OPT_SOFTDEP) && defined(MNTTAB_OPT_SOFTDEP) + {MNTTAB_OPT_SOFTDEP, MNT2_GEN_OPT_SOFTDEP}, +#endif /* defined(MNT2_GEN_OPT_SOFTDEP) && defined(MNTTAB_OPT_SOFTDEP) */ + +#if defined(MNT2_GEN_OPT_SYMPERM) && defined(MNTTAB_OPT_SYMPERM) + {MNTTAB_OPT_SYMPERM, MNT2_GEN_OPT_SYMPERM}, +#endif /* defined(MNT2_GEN_OPT_SYMPERM) && defined(MNTTAB_OPT_SYMPERM) */ + +#if defined(MNT2_GEN_OPT_UNION) && defined(MNTTAB_OPT_UNION) + {MNTTAB_OPT_UNION, MNT2_GEN_OPT_UNION}, +#endif /* defined(MNT2_GEN_OPT_UNION) && defined(MNTTAB_OPT_UNION) */ + /* * Do not define MNT2_NFS_OPT_* entries here! This is for generic * mount(2) options only, not for NFS mount options. If you need to put @@ -158,6 +179,25 @@ compute_automounter_mount_flags(mntent_t *mntp) } +#if defined(MOUNT_TABLE_ON_FILE) && defined(MNTTAB_OPT_VERS) +/* + * add the extra vers={2,3} field to the mount table, + * unless already specified by user + */ +static void +addvers(char *zopts, size_t l, mntent_t *mnt, u_long have_vers, + u_long want_vers) +{ + if (have_vers == want_vers && + hasmntval(mnt, MNTTAB_OPT_VERS) != want_vers) { + char optsbuf[48]; + xsnprintf(optsbuf, sizeof(optsbuf), + "%s=%d", MNTTAB_OPT_VERS, want_vers); + append_opts(zopts, l, optsbuf); + } +} +#endif /* MOUNT_TABLE_ON_FILE && MNTTAB_OPT_VERS */ + int mount_fs(mntent_t *mnt, int flags, caddr_t mnt_data, int retry, MTYPE_TYPE type, u_long nfs_version, const char *nfs_proto, const char *mnttabname, int on_autofs) { @@ -166,17 +206,17 @@ mount_fs(mntent_t *mnt, int flags, caddr_t mnt_data, int retry, MTYPE_TYPE type, char *zopts = NULL, *xopts = NULL; size_t l; #endif /* MOUNT_TABLE_ON_FILE */ - char *mnt_dir = 0; + char *mnt_dir = NULL; #ifdef NEED_AUTOFS_SPACE_HACK - char *old_mnt_dir = 0; + char *old_mnt_dir = NULL; /* perform space hack */ if (on_autofs) { old_mnt_dir = mnt->mnt_dir; mnt->mnt_dir = mnt_dir = autofs_strdup_space_hack(old_mnt_dir); } else #endif /* NEED_AUTOFS_SPACE_HACK */ - mnt_dir = strdup(mnt->mnt_dir); + mnt_dir = xstrdup(mnt->mnt_dir); dlog("'%s' fstype " MTYPE_PRINTF_TYPE " (%s) flags %#x (%s)", mnt_dir, type, mnt->mnt_type, flags, mnt->mnt_opts); @@ -256,19 +296,15 @@ again: } # endif /* MNTTAB_OPT_DEV */ +# if defined(HAVE_FS_NFS4) && defined(MNTTAB_OPT_VERS) + addvers(zopts, l, mnt, nfs_version, NFS_VERSION4); +# endif /* defined(HAVE_FS_NFS4) && defined(MNTTAB_OPT_VERS) */ # if defined(HAVE_FS_NFS3) && defined(MNTTAB_OPT_VERS) - /* - * add the extra vers={2,3} field to the mount table, - * unless already specified by user - */ - if (nfs_version == NFS_VERSION3 && - hasmntval(mnt, MNTTAB_OPT_VERS) != NFS_VERSION3) { - char optsbuf[48]; - xsnprintf(optsbuf, sizeof(optsbuf), - "%s=%d", MNTTAB_OPT_VERS, NFS_VERSION3); - append_opts(zopts, l, optsbuf); - } + addvers(zopts, l, mnt, nfs_version, NFS_VERSION3); # endif /* defined(HAVE_FS_NFS3) && defined(MNTTAB_OPT_VERS) */ +# ifdef MNTTAB_OPT_VERS + addvers(zopts, l, mnt, nfs_version, NFS_VERSION2); +# endif /* MNTTAB_OPT_VERS */ # ifdef MNTTAB_OPT_PROTO /* @@ -333,7 +369,7 @@ again: * with caution. */ static void -compute_nfs_attrcache_flags(nfs_args_t *nap, mntent_t *mntp) +compute_nfs_attrcache_flags(struct nfs_common_args *nap, mntent_t *mntp) { int acval = 0; int err_acval = 1; /* 1 means we found no 'actimeo' value */ @@ -365,7 +401,9 @@ compute_nfs_attrcache_flags(nfs_args_t *nap, mntent_t *mntp) nap->acregmin = acval; /* min ac timeout for reg files (sec) */ } else { # ifdef MNTTAB_OPT_ACREGMIN - err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACREGMIN, (int *) &nap->acregmin); + int tmp; + err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACREGMIN, &tmp); + nap->acregmin = tmp; # else /* not MNTTAB_OPT_ACREGMIN */ nap->acregmin = 0; # endif /* not MNTTAB_OPT_ACREGMIN */ @@ -384,7 +422,9 @@ compute_nfs_attrcache_flags(nfs_args_t *nap, mntent_t *mntp) nap->acregmax = acval; /* max ac timeout for reg files (sec) */ } else { # ifdef MNTTAB_OPT_ACREGMAX - err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACREGMAX, (int *) &nap->acregmax); + int tmp; + err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACREGMAX, &tmp); + nap->acregmax = tmp; # else /* not MNTTAB_OPT_ACREGMAX */ nap->acregmax = 0; # endif /* not MNTTAB_OPT_ACREGMAX */ @@ -403,7 +443,9 @@ compute_nfs_attrcache_flags(nfs_args_t *nap, mntent_t *mntp) nap->acdirmin = acval; /* min ac timeout for dirs (sec) */ } else { # ifdef MNTTAB_OPT_ACDIRMIN - err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACDIRMIN, (int *) &nap->acdirmin); + int tmp; + err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACDIRMIN, &tmp); + nap->acdirmin = tmp; # else /* not MNTTAB_OPT_ACDIRMIN */ nap->acdirmin = 0; # endif /* not MNTTAB_OPT_ACDIRMIN */ @@ -422,7 +464,9 @@ compute_nfs_attrcache_flags(nfs_args_t *nap, mntent_t *mntp) nap->acdirmax = acval; /* max ac timeout for dirs (sec) */ } else { # ifdef MNTTAB_OPT_ACDIRMAX - err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACDIRMAX, (int *) &nap->acdirmax); + int tmp; + err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACDIRMAX, &tmp); + nap->acdirmax = tmp; # else /* not MNTTAB_OPT_ACDIRMAX */ nap->acdirmax = 0; # endif /* not MNTTAB_OPT_ACDIRMAX */ @@ -443,6 +487,352 @@ compute_nfs_attrcache_flags(nfs_args_t *nap, mntent_t *mntp) } + +static void +compute_nfs_common_args(struct nfs_common_args *nap, mntent_t *mntp, + const char *nfs_proto, u_long nfs_version) +{ +#ifdef MNT2_NFS_OPT_TCP + if (nfs_proto && STREQ(nfs_proto, "tcp")) + nap->flags |= MNT2_NFS_OPT_TCP; +#endif /* MNT2_NFS_OPT_TCP */ + +#ifdef MNT2_NFS_OPT_NOCONN + /* check if user specified to use unconnected or connected sockets */ + if (amu_hasmntopt(mntp, MNTTAB_OPT_NOCONN) != NULL) + nap->flags |= MNT2_NFS_OPT_NOCONN; + else if (amu_hasmntopt(mntp, MNTTAB_OPT_CONN) != NULL) + nap->flags &= ~MNT2_NFS_OPT_NOCONN; + else { + /* + * Some OSs want you to set noconn always. Some want you to always turn + * it off. Others want you to turn it on/off only if NFS V.3 is used. + * And all of that changes from revision to another. This is + * particularly true of OpenBSD, NetBSD, and FreeBSD. So, rather than + * attempt to auto-detect this, I'm forced to "fix" it in the individual + * conf/nfs_prot/nfs_prot_*.h files. + */ +# ifdef USE_UNCONNECTED_NFS_SOCKETS + if (!(nap->flags & MNT2_NFS_OPT_NOCONN)) { + nap->flags |= MNT2_NFS_OPT_NOCONN; + plog(XLOG_WARNING, "noconn option not specified, and was just turned ON (OS override)! (May cause NFS hangs on some systems...)"); + } +# endif /* USE_UNCONNECTED_NFS_SOCKETS */ +# ifdef USE_CONNECTED_NFS_SOCKETS + if (nap->flags & MNT2_NFS_OPT_NOCONN) { + nap->flags &= ~MNT2_NFS_OPT_NOCONN; + plog(XLOG_WARNING, "noconn option specified, and was just turned OFF (OS override)! (May cause NFS hangs on some systems...)"); + } +# endif /* USE_CONNECTED_NFS_SOCKETS */ + } +#endif /* MNT2_NFS_OPT_NOCONN */ + +#ifdef MNT2_NFS_OPT_RESVPORT +# ifdef MNTTAB_OPT_RESVPORT + if (amu_hasmntopt(mntp, MNTTAB_OPT_RESVPORT) != NULL) + nap->flags |= MNT2_NFS_OPT_RESVPORT; +# else /* not MNTTAB_OPT_RESVPORT */ + nap->flags |= MNT2_NFS_OPT_RESVPORT; +# endif /* not MNTTAB_OPT_RESVPORT */ +#endif /* MNT2_NFS_OPT_RESVPORT */ + + nap->rsize = hasmntval(mntp, MNTTAB_OPT_RSIZE); +#ifdef MNT2_NFS_OPT_RSIZE + if (nap->rsize) + nap->flags |= MNT2_NFS_OPT_RSIZE; +#endif /* MNT2_NFS_OPT_RSIZE */ + if (nfs_version == NFS_VERSION && nap->rsize > 8192) + nap->rsize = 8192; + + nap->wsize = hasmntval(mntp, MNTTAB_OPT_WSIZE); +#ifdef MNT2_NFS_OPT_WSIZE + if (nap->wsize) + nap->flags |= MNT2_NFS_OPT_WSIZE; +#endif /* MNT2_NFS_OPT_WSIZE */ + if (nfs_version == NFS_VERSION && nap->wsize > 8192) + nap->wsize = 8192; + + nap->timeo = hasmntval(mntp, MNTTAB_OPT_TIMEO); +#ifdef MNT2_NFS_OPT_TIMEO + if (nap->timeo) + nap->flags |= MNT2_NFS_OPT_TIMEO; +#endif /* MNT2_NFS_OPT_TIMEO */ + + nap->retrans = hasmntval(mntp, MNTTAB_OPT_RETRANS); +#ifdef MNT2_NFS_OPT_RETRANS + if (nap->retrans) + nap->flags |= MNT2_NFS_OPT_RETRANS; +#endif /* MNT2_NFS_OPT_RETRANS */ + +#ifdef MNT2_NFS_OPT_SOFT + if (amu_hasmntopt(mntp, MNTTAB_OPT_SOFT) != NULL) + nap->flags |= MNT2_NFS_OPT_SOFT; +#endif /* MNT2_NFS_OPT_SOFT */ + +#ifdef MNT2_NFS_OPT_SPONGY + if (amu_hasmntopt(mntp, MNTTAB_OPT_SPONGY) != NULL) { + nap->flags |= MNT2_NFS_OPT_SPONGY; + if (*flags & MNT2_NFS_OPT_SOFT) { + plog(XLOG_USER, "Mount opts soft and spongy are incompatible - soft ignored"); + nap->flags &= ~MNT2_NFS_OPT_SOFT; + } + } +#endif /* MNT2_NFS_OPT_SPONGY */ + +#if defined(MNT2_GEN_OPT_RONLY) && defined(MNT2_NFS_OPT_RONLY) + /* Ultrix has separate generic and NFS ro flags */ + if (genflags & MNT2_GEN_OPT_RONLY) + nap->flags |= MNT2_NFS_OPT_RONLY; +#endif /* defined(MNT2_GEN_OPT_RONLY) && defined(MNT2_NFS_OPT_RONLY) */ + +#ifdef MNTTAB_OPT_INTR + if (amu_hasmntopt(mntp, MNTTAB_OPT_INTR) != NULL) + /* + * Either turn on the "allow interrupts" option, or + * turn off the "disallow interrupts" option" + */ +# ifdef MNT2_NFS_OPT_INTR + nap->flags |= MNT2_NFS_OPT_INTR; +# endif /* MNT2_NFS_OPT_INTR */ +# ifdef MNT2_NFS_OPT_NOINTR + nap->flags &= ~MNT2_NFS_OPT_NOINTR; +# endif /* MNT2_NFS_OPT_NOINTR */ +# ifdef MNT2_NFS_OPT_INT + nap->flags |= MNT2_NFS_OPT_INT; +# endif /* MNT2_NFS_OPT_INT */ +# ifdef MNT2_NFS_OPT_NOINT + nap->flags &= ~MNT2_NFS_OPT_NOINT; +# endif /* MNT2_NFS_OPT_NOINT */ +#endif /* MNTTAB_OPT_INTR */ + +#ifdef MNT2_NFS_OPT_NOACL + if (amu_hasmntopt(mntp, MNTTAB_OPT_NOACL) != NULL) + nap->flags |= MNT2_NFS_OPT_NOACL; +#endif /* MNT2_NFS_OPT_NOACL */ + +#ifdef MNTTAB_OPT_NODEVS + if (amu_hasmntopt(mntp, MNTTAB_OPT_NODEVS) != NULL) + nap->flags |= MNT2_NFS_OPT_NODEVS; +#endif /* MNTTAB_OPT_NODEVS */ + +#ifdef MNTTAB_OPT_COMPRESS + if (amu_hasmntopt(mntp, MNTTAB_OPT_COMPRESS) != NULL) + nap->flags |= MNT2_NFS_OPT_COMPRESS; +#endif /* MNTTAB_OPT_COMPRESS */ + +#ifdef MNTTAB_OPT_PRIVATE /* mount private, single-client tree */ + if (amu_hasmntopt(mntp, MNTTAB_OPT_PRIVATE) != NULL) + nap->flags |= MNT2_NFS_OPT_PRIVATE; +#endif /* MNTTAB_OPT_PRIVATE */ + + +#if defined(MNT2_NFS_OPT_NOCTO) && defined(MNTTAB_OPT_NOCTO) + if (amu_hasmntopt(mntp, MNTTAB_OPT_NOCTO) != NULL) + nap->flags |= MNT2_NFS_OPT_NOCTO; +#endif /* defined(MNT2_NFS_OPT_NOCTO) && defined(MNTTAB_OPT_NOCTO) */ + +#if defined(MNT2_NFS_OPT_PROPLIST) && defined(MNTTAB_OPT_PROPLIST) + if (amu_hasmntopt(mntp, MNTTAB_OPT_PROPLIST) != NULL) + nap->flags |= MNT2_NFS_OPT_PROPLIST; +#endif /* defined(MNT2_NFS_OPT_PROPLIST) && defined(MNTTAB_OPT_PROPLIST) */ + +#if defined(MNT2_NFS_OPT_NONLM) && defined(MNTTAB_OPT_NOLOCK) + if (amu_hasmntopt(mntp, MNTTAB_OPT_NOLOCK) != NULL) + nap->flags |= MNT2_NFS_OPT_NONLM; +#endif /* defined(MNT2_NFS_OPT_NONLM) && defined(MNTTAB_OPT_NOLOCK) */ + +#if defined(MNT2_NFS_OPT_XLATECOOKIE) && defined(MNTTAB_OPT_XLATECOOKIE) + if (amu_hasmntopt(mntp, MNTTAB_OPT_XLATECOOKIE) != NULL) + nap->flags |= MNT2_NFS_OPT_XLATECOOKIE; +#endif /* defined(MNT2_NFS_OPT_XLATECOOKIE) && defined(MNTTAB_OPT_XLATECOOKIE) */ +} + +static void +print_nfs_common_args(const struct nfs_common_args *a) +{ + plog(XLOG_DEBUG, "NA->flags = 0x%lx", a->flags); + + plog(XLOG_DEBUG, "NA->rsize = %lu", a->rsize); + plog(XLOG_DEBUG, "NA->wsize = %lu", a->wsize); + plog(XLOG_DEBUG, "NA->timeo = %lu", a->timeo); + plog(XLOG_DEBUG, "NA->retrans = %lu", a->retrans); + +#ifdef HAVE_NFS_ARGS_T_ACREGMIN + plog(XLOG_DEBUG, "NA->acregmin = %lu", a->acregmin); + plog(XLOG_DEBUG, "NA->acregmax = %lu", a->acregmax); + plog(XLOG_DEBUG, "NA->acdirmin = %lu", a->acdirmin); + plog(XLOG_DEBUG, "NA->acdirmax = %lu", a->acdirmax); +#endif /* HAVE_NFS_ARGS_T_ACREGMIN */ +} + +static void +discard_nfs23_args(nfs_args_t *nap) +{ +#ifdef HAVE_TRANSPORT_TYPE_TLI + free_knetconfig(nap->knconf); + if (nap->addr) + XFREE(nap->addr); /* allocated in compute_nfs_args() */ +#endif /* HAVE_TRANSPORT_TYPE_TLI */ +} + +#ifdef DEBUG +/* get string version (in hex) of identifier */ +static char * +get_hex_string(u_int len, const char *fhdata) +{ + u_int i; + static u_int xlen; + static char *buf; + static u_short *arr; + char str[16]; + + if (!fhdata || len == 0 || len > 10240) + return NULL; + i = len * 4 + 1; + if (xlen < i) { + buf = xrealloc(buf, i); + arr = xrealloc(arr, len * sizeof(*arr)); + xlen = i; + } + + buf[0] = '\0'; + memset(arr, 0, len * sizeof(*arr)); + memcpy(arr, fhdata, len); + len /= sizeof(*arr); + for (i = 0; i < len; i++) { + xsnprintf(str, sizeof(str), "%04x", ntohs(arr[i])); + xstrlcat(buf, str, xlen); + } + return buf; +} + +static void +print_nfs_sockaddr_in(const char *tag, const struct sockaddr_in *sap) +{ + char name[64]; + plog(XLOG_DEBUG, "NA->%s.sin_family = %d", tag, sap->sin_family); + plog(XLOG_DEBUG, "NA->%s.sin_port = %d", tag, ntohs(sap->sin_port)); + if (inet_ntop(AF_INET, &sap->sin_addr, name, sizeof(name)) == NULL) + return; + plog(XLOG_DEBUG, "NA->%s.sin_addr = \"%s\"", tag, name); +} + +/* + * print a subset of fields from "struct nfs_args" that are otherwise + * not being provided anywhere else. + */ +static void +print_nfs23_args(const nfs_args_t *nap, u_long nfs_version) +{ + int fhlen = 32; /* default: NFS V.2 file handle length is 32 */ +#ifdef HAVE_TRANSPORT_TYPE_TLI + struct netbuf *nbp; + struct knetconfig *kncp; +#else /* not HAVE_TRANSPORT_TYPE_TLI */ + struct sockaddr_in *sap; +#endif /* not HAVE_TRANSPORT_TYPE_TLI */ + struct nfs_common_args a; + + if (!nap) { + plog(XLOG_DEBUG, "NULL nfs_args!"); + return; + } + + /* override default file handle size */ +#ifdef FHSIZE + fhlen = FHSIZE; +#endif /* FHSIZE */ +#ifdef NFS_FHSIZE + fhlen = NFS_FHSIZE; +#endif /* NFS_FHSIZE */ + +#ifdef HAVE_TRANSPORT_TYPE_TLI + nbp = nap->addr; + plog(XLOG_DEBUG, "NA->addr {netbuf} (maxlen=%d, len=%d) = \"%s\"", + nbp->maxlen, nbp->len, + get_hex_string(nbp->len, nbp->buf)); + nbp = nap->syncaddr; + plog(XLOG_DEBUG, "NA->syncaddr {netbuf} %p", nbp); + kncp = nap->knconf; + plog(XLOG_DEBUG, "NA->knconf->semantics %lu", (u_long) kncp->knc_semantics); + plog(XLOG_DEBUG, "NA->knconf->protofmly \"%s\"", kncp->knc_protofmly); + plog(XLOG_DEBUG, "NA->knconf->proto \"%s\"", kncp->knc_proto); + plog(XLOG_DEBUG, "NA->knconf->rdev %lu", (u_long) kncp->knc_rdev); + /* don't print knconf->unused field */ +#else /* not HAVE_TRANSPORT_TYPE_TLI */ +# ifdef NFS_ARGS_T_ADDR_IS_POINTER + sap = (struct sockaddr_in *) nap->addr; +# else /* not NFS_ARGS_T_ADDR_IS_POINTER */ + sap = (struct sockaddr_in *) &nap->addr; +# endif /* not NFS_ARGS_T_ADDR_IS_POINTER */ +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + /* as per POSIX, sin_len need not be set (used internally by kernel) */ + plog(XLOG_DEBUG, "NA->addr.sin_len = %d", sap->sin_len); +#endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */ + print_nfs_sockaddr_in("addr", sap); +#endif /* not HAVE_TRANSPORT_TYPE_TLI */ +#ifdef HAVE_NFS_ARGS_T_ADDRLEN + plog(XLOG_DEBUG, "NA->addrlen = %d", nap->addrlen); +#endif /* ifdef HAVE_NFS_ARGS_T_ADDRLEN */ + + plog(XLOG_DEBUG, "NA->hostname = \"%s\"", nap->hostname ? nap->hostname : "null"); +#ifdef HAVE_NFS_ARGS_T_NAMLEN + plog(XLOG_DEBUG, "NA->namlen = %d", nap->namlen); +#endif /* HAVE_NFS_ARGS_T_NAMLEN */ + +#ifdef MNT2_NFS_OPT_FSNAME + plog(XLOG_DEBUG, "NA->fsname = \"%s\"", nap->fsname ? nap->fsname : "null"); +#endif /* MNT2_NFS_OPT_FSNAME */ + +#ifdef HAVE_NFS_ARGS_T_FHSIZE + plog(XLOG_DEBUG, "NA->fhsize = %d", nap->fhsize); + fhlen = nap->fhsize; +#endif /* HAVE_NFS_ARGS_T_FHSIZE */ +#ifdef HAVE_NFS_ARGS_T_FH_LEN + plog(XLOG_DEBUG, "NA->fh_len = %d", nap->fh_len); + fhlen = nap->fh_len; +#endif /* HAVE_NFS_ARGS_T_FH_LEN */ + + /* + * XXX: need to figure out how to correctly print file handles, + * since some times they are pointers, and sometimes the real structure + * is stored in nfs_args. Even if it is a pointer, it can be the actual + * char[] array, or a structure containing multiple fields. + */ + plog(XLOG_DEBUG, "NA->filehandle = \"%s\"", + get_hex_string(fhlen, (const char *) &nap->NFS_FH_FIELD)); + +#ifdef HAVE_NFS_ARGS_T_SOTYPE + plog(XLOG_DEBUG, "NA->sotype = %d", nap->sotype); +#endif /* HAVE_NFS_ARGS_T_SOTYPE */ +#ifdef HAVE_NFS_ARGS_T_PROTO + plog(XLOG_DEBUG, "NA->proto = %d", (int) nap->proto); +#endif /* HAVE_NFS_ARGS_T_PROTO */ +#ifdef HAVE_NFS_ARGS_T_VERSION + plog(XLOG_DEBUG, "NA->version = %d", nap->version); +#endif /* HAVE_NFS_ARGS_T_VERSION */ + + put_nfs_common_args(nap, a); + print_nfs_common_args(&a); + +#ifdef HAVE_NFS_ARGS_T_BSIZE + plog(XLOG_DEBUG, "NA->bsize = %d", nap->bsize); +#endif /* HAVE_NFS_ARGS_T_BSIZE */ + +#ifdef MNTTAB_OPT_SYMTTL + plog(XLOG_DEBUG, "NA->symttl = %d", nap->symttl); +#endif /* MNTTAB_OPT_SYMTTL */ +#ifdef MNTTAB_OPT_PG_THRESH + plog(XLOG_DEBUG, "NA->pg_thresh = %d", nap->pg_thresh); +#endif /* MNTTAB_OPT_PG_THRESH */ + +#ifdef MNT2_NFS_OPT_BIODS + plog(XLOG_DEBUG, "NA->biods = %d", nap->biods); +#endif /* MNT2_NFS_OPT_BIODS */ + +} +#endif /* DEBUG */ + /* * Fill in the many possible fields and flags of struct nfs_args. * @@ -451,35 +841,45 @@ compute_nfs_attrcache_flags(nfs_args_t *nap, mntent_t *mntp) * genflags: generic mount flags already determined * nfsncp: (TLI only) netconfig entry for this NFS mount * ip_addr: IP address of file server - * nfs_version: 2, 3, (4 in the future), or 0 if unknown + * nfs_version: 2, 3, or 0 if unknown * nfs_proto: "udp", "tcp", or NULL. * fhp: file handle structure pointer * host_name: name of remote NFS host * fs_name: remote file system name to mount */ -void -compute_nfs_args(nfs_args_t *nap, - mntent_t *mntp, - int genflags, - struct netconfig *nfsncp, - struct sockaddr_in *ip_addr, - u_long nfs_version, - char *nfs_proto, - am_nfs_handle_t *fhp, - char *host_name, - char *fs_name) +static void +compute_nfs23_args(nfs_args_t *nap, + mntent_t *mntp, + int genflags, + struct netconfig *nfsncp, + struct sockaddr_in *ip_addr, + u_long nfs_version, + char *nfs_proto, + am_nfs_handle_t *fhp, + char *host_name, + char *fs_name) { + struct nfs_common_args a; /* initialize just in case */ memset((voidp) nap, 0, sizeof(nfs_args_t)); /* compute all of the NFS attribute-cache flags */ - compute_nfs_attrcache_flags(nap, mntp); + memset(&a, 0, sizeof(a)); + compute_nfs_attrcache_flags(&a, mntp); + compute_nfs_common_args(&a, mntp, nfs_proto, nfs_version); + get_nfs_common_args(nap, a); /************************************************************************/ /*** FILEHANDLE DATA AND LENGTH ***/ /************************************************************************/ #ifdef HAVE_FS_NFS3 if (nfs_version == NFS_VERSION3) { + if (fhp == NULL) { + plog(XLOG_FATAL, "cannot pass NULL fh for NFSv%lu", nfs_version); + going_down(1); + return; + } + # if defined(HAVE_NFS_ARGS_T_FHSIZE) || defined(HAVE_NFS_ARGS_T_FH_LEN) /* * Some systems (Irix/bsdi3) have a separate field in nfs_args for @@ -499,7 +899,14 @@ compute_nfs_args(nfs_args_t *nap, # endif /* MNT2_NFS_OPT_VER3 */ } else #endif /* HAVE_FS_NFS3 */ + { + if (fhp == NULL) { + plog(XLOG_FATAL, "cannot pass NULL fh for NFSv%lu", nfs_version); + going_down(1); + return; + } NFS_FH_DREF(nap->NFS_FH_FIELD, &fhp->v2); + } #ifdef HAVE_NFS_ARGS_T_FHSIZE # ifdef HAVE_FS_NFS3 @@ -546,11 +953,6 @@ compute_nfs_args(nfs_args_t *nap, /************************************************************************/ /*** NFS PROTOCOL (UDP, TCP) AND VERSION ***/ /************************************************************************/ -#ifdef MNT2_NFS_OPT_TCP - if (nfs_proto && STREQ(nfs_proto, "tcp")) - nap->flags |= MNT2_NFS_OPT_TCP; -#endif /* MNT2_NFS_OPT_TCP */ - #ifdef HAVE_NFS_ARGS_T_SOTYPE /* bsdi3 uses this */ if (nfs_proto) { @@ -585,49 +987,35 @@ compute_nfs_args(nfs_args_t *nap, /************************************************************************/ /*** OTHER NFS SOCKET RELATED OPTIONS AND FLAGS ***/ /************************************************************************/ -#ifdef MNT2_NFS_OPT_NOCONN - /* check if user specified to use unconnected or connected sockets */ - if (amu_hasmntopt(mntp, MNTTAB_OPT_NOCONN) != NULL) - nap->flags |= MNT2_NFS_OPT_NOCONN; - else if (amu_hasmntopt(mntp, MNTTAB_OPT_CONN) != NULL) - nap->flags &= ~MNT2_NFS_OPT_NOCONN; - else { - /* - * Some OSs want you to set noconn always. Some want you to always turn - * it off. Others want you to turn it on/off only if NFS V.3 is used. - * And all of that changes from revision to another. This is - * particularly true of OpenBSD, NetBSD, and FreeBSD. So, rather than - * attempt to auto-detect this, I'm forced to "fix" it in the individual - * conf/nfs_prot/nfs_prot_*.h files. - */ -# ifdef USE_UNCONNECTED_NFS_SOCKETS - if (!(nap->flags & MNT2_NFS_OPT_NOCONN)) { - nap->flags |= MNT2_NFS_OPT_NOCONN; - plog(XLOG_WARNING, "noconn option not specified, and was just turned ON (OS override)! (May cause NFS hangs on some systems...)"); - } -# endif /* USE_UNCONNECTED_NFS_SOCKETS */ -# ifdef USE_CONNECTED_NFS_SOCKETS - if (nap->flags & MNT2_NFS_OPT_NOCONN) { - nap->flags &= ~MNT2_NFS_OPT_NOCONN; - plog(XLOG_WARNING, "noconn option specified, and was just turned OFF (OS override)! (May cause NFS hangs on some systems...)"); - } -# endif /* USE_CONNECTED_NFS_SOCKETS */ - } -#endif /* MNT2_NFS_OPT_NOCONN */ - -#ifdef MNT2_NFS_OPT_RESVPORT -# ifdef MNTTAB_OPT_RESVPORT - if (amu_hasmntopt(mntp, MNTTAB_OPT_RESVPORT) != NULL) - nap->flags |= MNT2_NFS_OPT_RESVPORT; -# else /* not MNTTAB_OPT_RESVPORT */ - nap->flags |= MNT2_NFS_OPT_RESVPORT; -# endif /* not MNTTAB_OPT_RESVPORT */ -#endif /* MNT2_NFS_OPT_RESVPORT */ /************************************************************************/ /*** OTHER FLAGS AND OPTIONS ***/ /************************************************************************/ +#ifdef MNT2_NFS_OPT_BIODS + if ((nap->biods = hasmntval(mntp, MNTTAB_OPT_BIODS))) + nap->flags |= MNT2_NFS_OPT_BIODS; +#endif /* MNT2_NFS_OPT_BIODS */ + +#ifdef MNTTAB_OPT_SYMTTL /* symlink cache time-to-live */ + if ((nap->symttl = hasmntval(mntp, MNTTAB_OPT_SYMTTL))) + nap->args.flags |= MNT2_NFS_OPT_SYMTTL; +#endif /* MNTTAB_OPT_SYMTTL */ + +#ifdef MNT2_NFS_OPT_PGTHRESH /* paging threshold */ + if ((nap->pg_thresh = hasmntval(mntp, MNTTAB_OPT_PGTHRESH))) + nap->args.flags |= MNT2_NFS_OPT_PGTHRESH; +#endif /* MNT2_NFS_OPT_PGTHRESH */ + +#if defined(MNT2_NFS_OPT_POSIX) && defined(MNTTAB_OPT_POSIX) + if (amu_hasmntopt(mntp, MNTTAB_OPT_POSIX) != NULL) { + nap->flags |= MNT2_NFS_OPT_POSIX; +# ifdef HAVE_NFS_ARGS_T_PATHCONF + nap->pathconf = NULL; +# endif /* HAVE_NFS_ARGS_T_PATHCONF */ + } +#endif /* MNT2_NFS_OPT_POSIX && MNTTAB_OPT_POSIX */ + #ifdef HAVE_TRANSPORT_TYPE_TLI /* set up syncaddr field */ nap->syncaddr = (struct netbuf *) NULL; @@ -636,131 +1024,21 @@ compute_nfs_args(nfs_args_t *nap, if (get_knetconfig(&nap->knconf, nfsncp, nfs_proto) < 0) { plog(XLOG_FATAL, "cannot fill knetconfig structure for nfs_args"); going_down(1); + return; } /* update the flags field for knconf */ - nap->flags |= MNT2_NFS_OPT_KNCONF; + nap->args.flags |= MNT2_NFS_OPT_KNCONF; #endif /* HAVE_TRANSPORT_TYPE_TLI */ #ifdef MNT2_NFS_OPT_FSNAME nap->fsname = fs_name; - nap->flags |= MNT2_NFS_OPT_FSNAME; + nap->args.flags |= MNT2_NFS_OPT_FSNAME; #endif /* MNT2_NFS_OPT_FSNAME */ - nap->rsize = hasmntval(mntp, MNTTAB_OPT_RSIZE); -#ifdef MNT2_NFS_OPT_RSIZE - if (nap->rsize) - nap->flags |= MNT2_NFS_OPT_RSIZE; -#endif /* MNT2_NFS_OPT_RSIZE */ - if (nfs_version == NFS_VERSION && nap->rsize > 8192) - nap->rsize = 8192; - nap->wsize = hasmntval(mntp, MNTTAB_OPT_WSIZE); -#ifdef MNT2_NFS_OPT_WSIZE - if (nap->wsize) - nap->flags |= MNT2_NFS_OPT_WSIZE; -#endif /* MNT2_NFS_OPT_WSIZE */ - if (nfs_version == NFS_VERSION && nap->wsize > 8192) - nap->wsize = 8192; - - nap->timeo = hasmntval(mntp, MNTTAB_OPT_TIMEO); -#ifdef MNT2_NFS_OPT_TIMEO - if (nap->timeo) - nap->flags |= MNT2_NFS_OPT_TIMEO; -#endif /* MNT2_NFS_OPT_TIMEO */ - - nap->retrans = hasmntval(mntp, MNTTAB_OPT_RETRANS); -#ifdef MNT2_NFS_OPT_RETRANS - if (nap->retrans) - nap->flags |= MNT2_NFS_OPT_RETRANS; -#endif /* MNT2_NFS_OPT_RETRANS */ - -#ifdef MNT2_NFS_OPT_BIODS - if ((nap->biods = hasmntval(mntp, MNTTAB_OPT_BIODS))) - nap->flags |= MNT2_NFS_OPT_BIODS; -#endif /* MNT2_NFS_OPT_BIODS */ - -#ifdef MNT2_NFS_OPT_SOFT - if (amu_hasmntopt(mntp, MNTTAB_OPT_SOFT) != NULL) - nap->flags |= MNT2_NFS_OPT_SOFT; -#endif /* MNT2_NFS_OPT_SOFT */ - -#ifdef MNT2_NFS_OPT_SPONGY - if (amu_hasmntopt(mntp, MNTTAB_OPT_SPONGY) != NULL) { - nap->flags |= MNT2_NFS_OPT_SPONGY; - if (nap->flags & MNT2_NFS_OPT_SOFT) { - plog(XLOG_USER, "Mount opts soft and spongy are incompatible - soft ignored"); - nap->flags &= ~MNT2_NFS_OPT_SOFT; - } - } -#endif /* MNT2_NFS_OPT_SPONGY */ - -#if defined(MNT2_GEN_OPT_RONLY) && defined(MNT2_NFS_OPT_RONLY) - /* Ultrix has separate generic and NFS ro flags */ - if (genflags & MNT2_GEN_OPT_RONLY) - nap->flags |= MNT2_NFS_OPT_RONLY; -#endif /* defined(MNT2_GEN_OPT_RONLY) && defined(MNT2_NFS_OPT_RONLY) */ - -#ifdef MNTTAB_OPT_INTR - if (amu_hasmntopt(mntp, MNTTAB_OPT_INTR) != NULL) - /* - * Either turn on the "allow interrupts" option, or - * turn off the "disallow interrupts" option" - */ -# ifdef MNT2_NFS_OPT_INTR - nap->flags |= MNT2_NFS_OPT_INTR; -# endif /* MNT2_NFS_OPT_INTR */ -# ifdef MNT2_NFS_OPT_NOINTR - nap->flags &= ~MNT2_NFS_OPT_NOINTR; -# endif /* MNT2_NFS_OPT_NOINTR */ -# ifdef MNT2_NFS_OPT_INT - nap->flags |= MNT2_NFS_OPT_INT; -# endif /* MNT2_NFS_OPT_INT */ -# ifdef MNT2_NFS_OPT_NOINT - nap->flags &= ~MNT2_NFS_OPT_NOINT; -# endif /* MNT2_NFS_OPT_NOINT */ -#endif /* MNTTAB_OPT_INTR */ - -#ifdef MNTTAB_OPT_NODEVS - if (amu_hasmntopt(mntp, MNTTAB_OPT_NODEVS) != NULL) - nap->flags |= MNT2_NFS_OPT_NODEVS; -#endif /* MNTTAB_OPT_NODEVS */ - -#ifdef MNTTAB_OPT_COMPRESS - if (amu_hasmntopt(mntp, MNTTAB_OPT_COMPRESS) != NULL) - nap->flags |= MNT2_NFS_OPT_COMPRESS; -#endif /* MNTTAB_OPT_COMPRESS */ - -#ifdef MNTTAB_OPT_PRIVATE /* mount private, single-client tree */ - if (amu_hasmntopt(mntp, MNTTAB_OPT_PRIVATE) != NULL) - nap->flags |= MNT2_NFS_OPT_PRIVATE; -#endif /* MNTTAB_OPT_PRIVATE */ - -#ifdef MNTTAB_OPT_SYMTTL /* symlink cache time-to-live */ - if ((nap->symttl = hasmntval(mntp, MNTTAB_OPT_SYMTTL))) - nap->flags |= MNT2_NFS_OPT_SYMTTL; -#endif /* MNTTAB_OPT_SYMTTL */ - -#ifdef MNT2_NFS_OPT_PGTHRESH /* paging threshold */ - if ((nap->pg_thresh = hasmntval(mntp, MNTTAB_OPT_PGTHRESH))) - nap->flags |= MNT2_NFS_OPT_PGTHRESH; -#endif /* MNT2_NFS_OPT_PGTHRESH */ - -#if defined(MNT2_NFS_OPT_NOCTO) && defined(MNTTAB_OPT_NOCTO) - if (amu_hasmntopt(mntp, MNTTAB_OPT_NOCTO) != NULL) - nap->flags |= MNT2_NFS_OPT_NOCTO; -#endif /* defined(MNT2_NFS_OPT_NOCTO) && defined(MNTTAB_OPT_NOCTO) */ - -#if defined(MNT2_NFS_OPT_POSIX) && defined(MNTTAB_OPT_POSIX) - if (amu_hasmntopt(mntp, MNTTAB_OPT_POSIX) != NULL) { - nap->flags |= MNT2_NFS_OPT_POSIX; - nap->pathconf = NULL; - } -#endif /* MNT2_NFS_OPT_POSIX && MNTTAB_OPT_POSIX */ - -#if defined(MNT2_NFS_OPT_PROPLIST) && defined(MNTTAB_OPT_PROPLIST) - if (amu_hasmntopt(mntp, MNTTAB_OPT_PROPLIST) != NULL) - nap->flags |= MNT2_NFS_OPT_PROPLIST; -#endif /* defined(MNT2_NFS_OPT_PROPLIST) && defined(MNTTAB_OPT_PROPLIST) */ +#ifdef HAVE_NFS_ARGS_T_OPTSTR + nap->optstr = mntp->mnt_opts; +#endif /* HAVE_NFS_ARGS_T_OPTSTR */ #if defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS) nap->maxgrouplist = hasmntval(mntp, MNTTAB_OPT_MAXGROUPS); @@ -768,20 +1046,6 @@ compute_nfs_args(nfs_args_t *nap, nap->flags |= MNT2_NFS_OPT_MAXGRPS; #endif /* defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS) */ -#if defined(MNT2_NFS_OPT_NONLM) && defined(MNTTAB_OPT_NOLOCK) - if (amu_hasmntopt(mntp, MNTTAB_OPT_NOLOCK) != NULL) - nap->flags |= MNT2_NFS_OPT_NONLM; -#endif /* defined(MNT2_NFS_OPT_NONLM) && defined(MNTTAB_OPT_NOLOCK) */ - -#if defined(MNT2_NFS_OPT_XLATECOOKIE) && defined(MNTTAB_OPT_XLATECOOKIE) - if (amu_hasmntopt(mntp, MNTTAB_OPT_XLATECOOKIE) != NULL) - nap->flags |= MNT2_NFS_OPT_XLATECOOKIE; -#endif /* defined(MNT2_NFS_OPT_XLATECOOKIE) && defined(MNTTAB_OPT_XLATECOOKIE) */ - -#ifdef HAVE_NFS_ARGS_T_OPTSTR - nap->optstr = mntp->mnt_opts; -#endif /* HAVE_NFS_ARGS_T_OPTSTR */ - /************************************************************************/ /*** FINAL ACTIONS ***/ /************************************************************************/ @@ -794,6 +1058,378 @@ compute_nfs_args(nfs_args_t *nap, return; /* end of compute_nfs_args() function */ } +#ifdef HAVE_FS_NFS4 + +#define RPC_AUTH_GSS_KRB5 390003 +#define RPC_AUTH_GSS_KRB5I 390004 +#define RPC_AUTH_GSS_KRB5P 390005 +#define RPC_AUTH_GSS_LKEY 390006 +#define RPC_AUTH_GSS_LKEYI 390007 +#define RPC_AUTH_GSS_LKEYP 390008 +#define RPC_AUTH_GSS_SPKM 390009 +#define RPC_AUTH_GSS_SPKMI 390010 +#define RPC_AUTH_GSS_SPKMP 390011 + +struct { + const char *name; + int num; +} flavours[] = { + { "unix", AUTH_UNIX }, + { "krb5", RPC_AUTH_GSS_KRB5 }, + { "krb5i", RPC_AUTH_GSS_KRB5I }, + { "krb5p", RPC_AUTH_GSS_KRB5P }, + { "lkey", RPC_AUTH_GSS_LKEY }, + { "lkeyi", RPC_AUTH_GSS_LKEYI }, + { "lkeyp", RPC_AUTH_GSS_LKEYP }, + { "spkm", RPC_AUTH_GSS_SPKM }, + { "spkmi", RPC_AUTH_GSS_SPKMI }, + { "spkmp", RPC_AUTH_GSS_SPKMP }, +}; + +static char * +set_nfs4_security(nfs4_args_t *nap, mntent_t *mntp) +{ + const char *o = hasmnteq(mntp, MNTTAB_OPT_SEC); + char *q, *s, *ss; + size_t l, i; + + if (o == NULL) + o = "unix"; + + for (l = 1, q = strchr(o, ','); q; q = strchr(q + 1, ',')) + l++; + + nap->auth_flavours = xmalloc(l * sizeof(*nap->auth_flavours)); + + s = ss = xstrdup(o); + for (;;) { + q = strchr(s, ','); + if (q) + *q = '\0'; + + for (l = 0, i = 0; i < sizeof(flavours) / sizeof(flavours[0]); i++) + if (strcmp(flavours[i].name, s) == 0) { + nap->auth_flavours[l++] = flavours[i].num; + break; + } + + if (i == sizeof(flavours) / sizeof(flavours[0])) + plog(XLOG_ERROR, "Unknown NFSv4 security mechanism %s\n", s); + + if (q == NULL) + break; + + *q = ':'; + s = ++q; + } + + nap->auth_flavourlen = l; + return ss; +} + +static int +get_my_ipv4addr(struct nfs_string *ns) +{ + struct hostent *hp; + char myname[MAXHOSTNAMELEN]; + + if (gethostname(myname, sizeof(myname)) == -1) + return -1; + if ((hp = gethostbyname(myname)) == NULL) + return -1; + if (inet_ntop(AF_INET, hp->h_addr, myname, sizeof(myname)) == NULL) + return -1; + ns->len = strlen(myname); + ns->data = xmalloc(ns->len + 1); + memcpy(ns->data, myname, ns->len + 1); + return 0; +} + +static void +add_nfs4_mntopts(const nfs4_args_t *nap, mntent_t *mntp, char *sec) +{ + char *opts = mntp->mnt_opts; + char buf[1024], addr[128]; + size_t len = strlen(mntp->mnt_opts); + + if (inet_ntop(AF_INET, + &((const struct sockaddr_in *)nap->host_addr)->sin_addr, + addr, sizeof(addr)) == NULL) + return; + + xsnprintf(buf, sizeof(buf), ",clientaddr=%s,addr=%s", nap->client_addr.data, + addr); + + len += strlen(buf) + 1; + + if (sec && strcmp(sec, "unix") != 0) { + len += strlen(sec) + strlen(MNTTAB_OPT_SEC) + 2; /* 2 = ",=" */ + } else + sec = NULL; + + opts = xrealloc(mntp->mnt_opts, len); + xstrlcat(opts, buf, len); + + if (sec) { + xstrlcat(opts, ",", len); + xstrlcat(opts, MNTTAB_OPT_SEC, len); + xstrlcat(opts, "=", len); + xstrlcat(opts, sec, len); + } + + mntp->mnt_opts = opts; +} + +static void +print_nfs4_security(const nfs4_args_t *nap) +{ + char buf[1024]; + char num[64]; + size_t i, j; + + buf[0] = '\0'; + + for (i = 0; i < nap->auth_flavourlen; i++) { + + for (j = 0; j < sizeof(flavours) / sizeof(flavours[0]); j++) + if (flavours[j].num == nap->auth_flavours[i]) { + xstrlcpy(num, flavours[j].name, sizeof(num)); + break; + } + + if (j == sizeof(flavours) / sizeof(flavours[0])) { + plog(XLOG_ERROR, "Unknown NFSv4 security mechanism %d\n", + nap->auth_flavours[i]); + xsnprintf(num, sizeof(num), "*%d*", nap->auth_flavours[i]); + } + + if (buf[0]) + xstrlcat(buf, ":", sizeof(buf)); + + xstrlcat(buf, num, sizeof(buf)); + } + + plog(XLOG_DEBUG, "NA->auth_flavours \"%s\"\n", buf); +} + +static void +discard_nfs4_args(nfs4_args_t *nap) +{ + if (nap->client_addr.data) + free(nap->client_addr.data); + if (nap->hostname.data) + free(nap->hostname.data); + if (nap->mnt_path.data) + free(nap->mnt_path.data); + if (nap->host_addr) + free(nap->host_addr); + if (nap->auth_flavours) + free(nap->auth_flavours); +} + +/* + * Fill in the many possible fields and flags of struct nfs4_args. + * + * nap: pre-allocated structure to fill in. + * mntp: mount entry structure (includes options) + * genflags: generic mount flags already determined + * nfsncp: (TLI only) netconfig entry for this NFS mount + * ip_addr: IP address of file server + * nfs_version: 4, or 0 if unknown + * nfs_proto: "udp", "tcp", or NULL. + * fhp: file handle structure pointer + * host_name: name of remote NFS host + * fs_name: remote file system name to mount + */ +static void +compute_nfs4_args(nfs4_args_t *nap, + mntent_t *mntp, + int genflags, + struct netconfig *nfsncp, + struct sockaddr_in *ip_addr, + u_long nfs_version, + char *nfs_proto, + am_nfs_handle_t *fhp, + char *host_name, + char *fs_name) +{ + char *s; + struct nfs_common_args a; + uint16_t nfs_port; + + /* initialize just in case */ + memset((voidp) nap, 0, sizeof(nfs4_args_t)); + + /* compute all of the NFS attribute-cache flags */ + memset(&a, 0, sizeof(a)); + compute_nfs_attrcache_flags(&a, mntp); + compute_nfs_common_args(&a, mntp, nfs_proto, nfs_version); + get_nfs_common_args(nap, a); + + get_my_ipv4addr(&nap->client_addr); + + /************************************************************************/ + /*** HOST NAME ***/ + /************************************************************************/ + nap->hostname.len = strlen(host_name); + nap->hostname.data = xmalloc(nap->hostname.len + 1); + memcpy(nap->hostname.data, host_name, nap->hostname.len + 1); + + if ((s = strchr(fs_name, ':')) != NULL) + s++; + else + s = fs_name; + + nap->mnt_path.len = strlen(s); + nap->mnt_path.data = xmalloc(nap->mnt_path.len + 1); + memcpy(nap->mnt_path.data, s, nap->mnt_path.len + 1); + plog(XLOG_DEBUG, "dir name %s\n", nap->mnt_path.data); + + /************************************************************************/ + /*** IP ADDRESS OF REMOTE HOST ***/ + /************************************************************************/ + nap->host_addrlen = sizeof(*ip_addr); + nap->host_addr = xmalloc(nap->host_addrlen); + memcpy(nap->host_addr, ip_addr, nap->host_addrlen); + + nfs_port = hasmntval(mntp, MNTTAB_OPT_PORT); + if (nfs_port == 0) + nfs_port = htons(NFS_PORT); + else + nfs_port = htons(nfs_port); + + ((struct sockaddr_in *)nap->host_addr)->sin_port = nfs_port; + + nap->proto = 0; /* bsdi3 sets this field to zero */ + if (nfs_proto) { + if (STREQ(nfs_proto, "tcp")) /* AIX 4.2.x needs this */ + nap->proto = IPPROTO_TCP; + else if (STREQ(nfs_proto, "udp")) + nap->proto = IPPROTO_UDP; + } + + nap->version = NFS4_MOUNT_VERSION; /* BSDI 3.0 and OpenBSD 2.2 */ + + /************************************************************************/ + /*** OTHER NFS SOCKET RELATED OPTIONS AND FLAGS ***/ + /************************************************************************/ + + + /************************************************************************/ + /*** OTHER FLAGS AND OPTIONS ***/ + /************************************************************************/ + +#if defined(MNT2_NFS_OPT_POSIX) && defined(MNTTAB_OPT_POSIX) + if (amu_hasmntopt(mntp, MNTTAB_OPT_POSIX) != NULL) { + nap->args.flags |= MNT2_NFS_OPT_POSIX; +# ifdef HAVE_NFS_ARGS_T_PATHCONF + nap->pathconf = NULL; +# endif /* HAVE_NFS_ARGS_T_PATHCONF */ + } +#endif /* MNT2_NFS_OPT_POSIX && MNTTAB_OPT_POSIX */ + +#if defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS) + nap->maxgrouplist = hasmntval(mntp, MNTTAB_OPT_MAXGROUPS); + if (nap->maxgrouplist != 0) + nap->args.flags |= MNT2_NFS_OPT_MAXGRPS; +#endif /* defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS) */ + +#ifdef HAVE_NFS_ARGS_T_OPTSTR + nap->optstr = mntp->mnt_opts; +#endif /* HAVE_NFS_ARGS_T_OPTSTR */ + + /************************************************************************/ + /*** FINAL ACTIONS ***/ + /************************************************************************/ + +#ifdef HAVE_NFS_ARGS_T_GFS_FLAGS + /* Ultrix stores generic flags in nfs_args.gfs_flags. */ + nap->gfs_flags = genflags; +#endif /* HAVE_NFS_ARGS_T_FLAGS */ + + s = set_nfs4_security(nap, mntp); + + /* Add addresses to the mount options */ + add_nfs4_mntopts(nap, mntp, s); + + return; /* end of compute_nfs4_args() function */ +} + +#ifdef DEBUG +static void +print_nfs4_args(const nfs4_args_t *nap, u_long nfs_version) +{ + struct sockaddr_in *sap; + struct nfs_common_args a; + + if (!nap) { + plog(XLOG_DEBUG, "NULL nfs_args!"); + return; + } + + plog(XLOG_DEBUG, "NA->client_addr \"%s\"\n", nap->client_addr.data); + plog(XLOG_DEBUG, "NA->mnt_path = \"%s\"", nap->mnt_path.data); + plog(XLOG_DEBUG, "NA->hostname = \"%s\"", nap->hostname.data); + sap = (struct sockaddr_in *) nap->host_addr; + print_nfs_sockaddr_in("host_addr", sap); + plog(XLOG_DEBUG, "NA->proto = %d", (int) nap->proto); +#ifdef HAVE_NFS_ARGS_T_VERSION + plog(XLOG_DEBUG, "NA->version = %d", nap->version); +#endif /* HAVE_NFS_ARGS_T_VERSION */ + print_nfs4_security(nap); + + put_nfs_common_args(nap, a); + print_nfs_common_args(&a); +} +#endif +#endif /* HAVE_FS_NFS4 */ + +void +compute_nfs_args(void *nap, + mntent_t *mntp, + int genflags, + struct netconfig *nfsncp, + struct sockaddr_in *ip_addr, + u_long nfs_version, + char *nfs_proto, + am_nfs_handle_t *fhp, + char *host_name, + char *fs_name) +{ +#ifdef HAVE_FS_NFS4 + if (nfs_version == NFS_VERSION4) + compute_nfs4_args(nap, mntp, genflags, nfsncp, ip_addr, nfs_version, + nfs_proto, fhp, host_name, fs_name); + else +#endif /* HAVE_FS_NFS4 */ + compute_nfs23_args(nap, mntp, genflags, nfsncp, ip_addr, nfs_version, + nfs_proto, fhp, host_name, fs_name); +} + +void +discard_nfs_args(void *nap, u_long nfs_version) +{ +#ifdef HAVE_FS_NFS4 + if (nfs_version == NFS_VERSION4) + discard_nfs4_args(nap); + else +#endif /* HAVE_FS_NFS4 */ + discard_nfs23_args(nap); +} + +#ifdef DEBUG +void +print_nfs_args(const void *nap, u_long nfs_version) +{ +#ifdef HAVE_FS_NFS4 + if (nfs_version == NFS_VERSION4) + print_nfs4_args(nap, nfs_version); + else +#endif /* HAVE_FS_NFS4 */ + print_nfs23_args(nap, nfs_version); +} +#endif + /* * Fill in special values for flags and fields of nfs_args, for an @@ -802,6 +1438,8 @@ compute_nfs_args(nfs_args_t *nap, void compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp) { + struct nfs_common_args a; + #ifdef MNT2_NFS_OPT_SYMTTL /* * Don't let the kernel cache symbolic links we generate, or else lookups @@ -837,7 +1475,10 @@ compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp) #endif /* MNT2_NFS_OPT_DUMBTIMR */ /* compute all of the NFS attribute-cache flags */ - compute_nfs_attrcache_flags(nap, mntp); + memset(&a, 0, sizeof(a)); + a.flags = nap->flags; + compute_nfs_attrcache_flags(&a, mntp); + get_nfs_common_args(nap, a); /* * Provide a slight bit more security by requiring the kernel to use @@ -848,156 +1489,8 @@ compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp) #endif /* MNT2_NFS_OPT_RESVPORT */ } - -#ifdef DEBUG -/* get string version (in hex) of identifier */ -static char * -get_hex_string(u_int len, const char *fhdata) +int +nfs_valid_version(u_long v) { - u_int i; - static char buf[128]; /* better not go over it! */ - char str[16]; - short int arr[64]; - - if (!fhdata) - return NULL; - buf[0] = '\0'; - memset(&arr[0], 0, (64 * sizeof(short int))); - memcpy(&arr[0], &fhdata[0], len); - for (i=0; i= NFS_VERS_MIN && v <= NFS_VERS_MAX; } - - -/* - * print a subset of fields from "struct nfs_args" that are otherwise - * not being provided anywhere else. - */ -void -print_nfs_args(const nfs_args_t *nap, u_long nfs_version) -{ - int fhlen = 32; /* default: NFS V.2 file handle length is 32 */ -#ifdef HAVE_TRANSPORT_TYPE_TLI - struct netbuf *nbp; - struct knetconfig *kncp; -#else /* not HAVE_TRANSPORT_TYPE_TLI */ - struct sockaddr_in *sap; -#endif /* not HAVE_TRANSPORT_TYPE_TLI */ - - if (!nap) { - plog(XLOG_DEBUG, "NULL nfs_args!"); - return; - } - - /* override default file handle size */ -#ifdef FHSIZE - fhlen = FHSIZE; -#endif /* FHSIZE */ -#ifdef NFS_FHSIZE - fhlen = NFS_FHSIZE; -#endif /* NFS_FHSIZE */ - -#ifdef HAVE_TRANSPORT_TYPE_TLI - nbp = nap->addr; - plog(XLOG_DEBUG, "NA->addr {netbuf} (maxlen=%d, len=%d) = \"%s\"", - nbp->maxlen, nbp->len, - get_hex_string(nbp->len, nbp->buf)); - nbp = nap->syncaddr; - plog(XLOG_DEBUG, "NA->syncaddr {netbuf} %p", nbp); - kncp = nap->knconf; - plog(XLOG_DEBUG, "NA->knconf->semantics %lu", (u_long) kncp->knc_semantics); - plog(XLOG_DEBUG, "NA->knconf->protofmly \"%s\"", kncp->knc_protofmly); - plog(XLOG_DEBUG, "NA->knconf->proto \"%s\"", kncp->knc_proto); - plog(XLOG_DEBUG, "NA->knconf->rdev %lu", (u_long) kncp->knc_rdev); - /* don't print knconf->unused field */ -#else /* not HAVE_TRANSPORT_TYPE_TLI */ -# ifdef NFS_ARGS_T_ADDR_IS_POINTER - sap = (struct sockaddr_in *) nap->addr; -# else /* not NFS_ARGS_T_ADDR_IS_POINTER */ - sap = (struct sockaddr_in *) &nap->addr; -# endif /* not NFS_ARGS_T_ADDR_IS_POINTER */ - plog(XLOG_DEBUG, "NA->addr {sockaddr_in} (len=%d) = \"%s\"", - (int) sizeof(struct sockaddr_in), - get_hex_string(sizeof(struct sockaddr_in), (const char *)sap)); -#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - /* as per POSIX, sin_len need not be set (used internally by kernel) */ - plog(XLOG_DEBUG, "NA->addr.sin_len = %d", sap->sin_len); -#endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */ - plog(XLOG_DEBUG, "NA->addr.sin_family = %d", sap->sin_family); - plog(XLOG_DEBUG, "NA->addr.sin_port = %d", sap->sin_port); - plog(XLOG_DEBUG, "NA->addr.sin_addr = \"%s\"", - get_hex_string(sizeof(struct in_addr), (const char *) &sap->sin_addr)); -#endif /* not HAVE_TRANSPORT_TYPE_TLI */ -#ifdef HAVE_NFS_ARGS_T_ADDRLEN - plog(XLOG_DEBUG, "NA->addrlen = %d", nap->addrlen); -#endif /* ifdef HAVE_NFS_ARGS_T_ADDRLEN */ - - plog(XLOG_DEBUG, "NA->hostname = \"%s\"", nap->hostname ? nap->hostname : "null"); -#ifdef HAVE_NFS_ARGS_T_NAMLEN - plog(XLOG_DEBUG, "NA->namlen = %d", nap->namlen); -#endif /* HAVE_NFS_ARGS_T_NAMLEN */ - -#ifdef MNT2_NFS_OPT_FSNAME - plog(XLOG_DEBUG, "NA->fsname = \"%s\"", nap->fsname ? nap->fsname : "null"); -#endif /* MNT2_NFS_OPT_FSNAME */ - -#ifdef HAVE_NFS_ARGS_T_FHSIZE - plog(XLOG_DEBUG, "NA->fhsize = %d", nap->fhsize); - fhlen = nap->fhsize; -#endif /* HAVE_NFS_ARGS_T_FHSIZE */ -#ifdef HAVE_NFS_ARGS_T_FH_LEN - plog(XLOG_DEBUG, "NA->fh_len = %d", nap->fh_len); - fhlen = nap->fh_len; -#endif /* HAVE_NFS_ARGS_T_FH_LEN */ - - /* - * XXX: need to figure out how to correctly print file handles, - * since some times they are pointers, and sometimes the real structure - * is stored in nfs_args. Even if it is a pointer, it can be the actual - * char[] array, or a structure containing multiple fields. - */ - plog(XLOG_DEBUG, "NA->filehandle = \"%s\"", - get_hex_string(fhlen, (const char *) &nap->NFS_FH_FIELD)); - -#ifdef HAVE_NFS_ARGS_T_SOTYPE - plog(XLOG_DEBUG, "NA->sotype = %d", nap->sotype); -#endif /* HAVE_NFS_ARGS_T_SOTYPE */ -#ifdef HAVE_NFS_ARGS_T_PROTO - plog(XLOG_DEBUG, "NA->proto = %d", (int) nap->proto); -#endif /* HAVE_NFS_ARGS_T_PROTO */ -#ifdef HAVE_NFS_ARGS_T_VERSION - plog(XLOG_DEBUG, "NA->version = %d", nap->version); -#endif /* HAVE_NFS_ARGS_T_VERSION */ - - plog(XLOG_DEBUG, "NA->flags = 0x%x", (int) nap->flags); - - plog(XLOG_DEBUG, "NA->rsize = %d", (int) nap->rsize); - plog(XLOG_DEBUG, "NA->wsize = %d", (int) nap->wsize); -#ifdef HAVE_NFS_ARGS_T_BSIZE - plog(XLOG_DEBUG, "NA->bsize = %d", nap->bsize); -#endif /* HAVE_NFS_ARGS_T_BSIZE */ - plog(XLOG_DEBUG, "NA->timeo = %d", (int) nap->timeo); - plog(XLOG_DEBUG, "NA->retrans = %d", (int) nap->retrans); - -#ifdef HAVE_NFS_ARGS_T_ACREGMIN - plog(XLOG_DEBUG, "NA->acregmin = %d", (int) nap->acregmin); - plog(XLOG_DEBUG, "NA->acregmax = %d", (int) nap->acregmax); - plog(XLOG_DEBUG, "NA->acdirmin = %d", (int) nap->acdirmin); - plog(XLOG_DEBUG, "NA->acdirmax = %d", (int) nap->acdirmax); -#endif /* HAVE_NFS_ARGS_T_ACREGMIN */ -#ifdef MNTTAB_OPT_SYMTTL - plog(XLOG_DEBUG, "NA->symttl = %d", nap->symttl); -#endif /* MNTTAB_OPT_SYMTTL */ -#ifdef MNTTAB_OPT_PG_THRESH - plog(XLOG_DEBUG, "NA->pg_thresh = %d", nap->pg_thresh); -#endif /* MNTTAB_OPT_PG_THRESH */ - -#ifdef MNT2_NFS_OPT_BIODS - plog(XLOG_DEBUG, "NA->biods = %d", nap->biods); -#endif /* MNT2_NFS_OPT_BIODS */ - -} -#endif /* DEBUG */ diff --git a/libamu/mtab.c b/libamu/mtab.c index 50ba994733f..ee603af3435 100644 --- a/libamu/mtab.c +++ b/libamu/mtab.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -233,9 +229,9 @@ hasmntstr(mntent_t *mnt, char *opt) char *endptr = strchr(eq, ','); - /* if saw no comma, return strdup'd string */ + /* if saw no comma, return xstrdup'd string */ if (!endptr) - return strdup(eq); + return xstrdup(eq); else { /* else we need to copy only the chars needed */ int len = endptr - eq; diff --git a/libamu/nfs_prot_xdr.c b/libamu/nfs_prot_xdr.c index df8a0b006b5..bfdc7b2492a 100644 --- a/libamu/nfs_prot_xdr.c +++ b/libamu/nfs_prot_xdr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -56,3 +52,14 @@ xdr_amq_string(XDR *xdrs, amq_string *objp) } return (TRUE); } + + +bool_t +xdr_amq_sync_umnt(XDR *xdrs, amq_sync_umnt *objp) +{ + + if (!xdr_opaque(xdrs, (char *) objp, sizeof(*objp))) { + return (FALSE); + } + return (TRUE); +} diff --git a/libamu/strcasecmp.c b/libamu/strcasecmp.c new file mode 100644 index 00000000000..3947a94851b --- /dev/null +++ b/libamu/strcasecmp.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/libamu/strcasecmp.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* + * Compare two strings case insensitive. + */ +int +strcasecmp(const char *s1, const char *s2) +{ + const unsigned char *cp1 = (const unsigned char *)s1; + const unsigned char *cp2 = (const unsigned char *)s2; + + while (tolower(*cp1) == tolower(*cp2++)) + if (*cp1++ == '\0') + return (0); + return (tolower(*cp1) - tolower(*--cp2)); +} diff --git a/libamu/strerror.c b/libamu/strerror.c index 49dd2fc3ce9..faf2916f31e 100644 --- a/libamu/strerror.c +++ b/libamu/strerror.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 2002-2006 Ion Badulescu - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 2002-2014 Ion Badulescu + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -17,11 +17,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * diff --git a/libamu/strlcat.c b/libamu/strlcat.c new file mode 100644 index 00000000000..154eaa8eae4 --- /dev/null +++ b/libamu/strlcat.c @@ -0,0 +1,83 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/libamu/strlcat.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* + * Implementation of strlcat(3) from OpenBSD/NetBSD. + */ + +/* + * Appends src to string dst of size siz (unlike strncat, siz is the + * full size of dst, not space left). At most siz-1 characters + * will be copied. Always NUL terminates (unless siz <= strlen(dst)). + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. + */ +size_t +strlcat(char *dst, const char *src, size_t siz) +{ + char *d = dst; + const char *s = src; + size_t n = siz; + size_t dlen; + + /* Find the end of dst and adjust bytes left but don't go past end */ + while (n-- != 0 && *d != '\0') + d++; + dlen = d - dst; + n = siz - dlen; + + if (n == 0) + return(dlen + strlen(s)); + while (*s != '\0') { + if (n != 1) { + *d++ = *s; + n--; + } + s++; + } + *d = '\0'; + + return(dlen + (s - src)); /* count does not include NUL */ +} diff --git a/libamu/strlcpy.c b/libamu/strlcpy.c new file mode 100644 index 00000000000..f0c4f6782e6 --- /dev/null +++ b/libamu/strlcpy.c @@ -0,0 +1,80 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/libamu/strlcpy.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +/* + * Implementation of strlcpy(3) from OpenBSD/NetBSD. + */ + +/* + * Copy src to string dst of size siz. At most siz-1 characters + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ +size_t +strlcpy(char *dst, const char *src, size_t siz) +{ + char *d = dst; + const char *s = src; + size_t n = siz; + + + /* Copy as many bytes as will fit */ + if (n != 0 && --n != 0) { + do { + if ((*d++ = *s++) == 0) + break; + } while (--n != 0); + } + + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) { + if (siz != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++) + ; + } + + return(s - src - 1); /* count does not include NUL */ +} diff --git a/libamu/strstr.c b/libamu/strstr.c new file mode 100644 index 00000000000..bd89991dda1 --- /dev/null +++ b/libamu/strstr.c @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from the Free Software Foundation, Inc. GNU utilities. + * + * 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. + * + * + * File: am-utils/libamu/strstr.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +/* strstr.c -- return the offset of one string within another + Copyright (C) 1989, 1990 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* Author: + Mike Rendell Department of Computer Science + michael@garfield.mun.edu Memorial University of Newfoundland + ..!uunet!garfield!michael St. John's, Nfld., Canada + (709) 737-4550 A1C 5S7 +*/ + + +/* + * Return the starting address of string S2 in S1; + * return 0 if it is not found. + */ +char * +strstr(char *s1, char *s2) +{ + int i; + char *p1; + char *p2; + char *s = s1; + + for (p2 = s2, i = 0; *s; p2 = s2, i++, s++) { + for (p1 = s; *p1 && *p2 && *p1 == *p2; p1++, p2++) + ; + if (!*p2) + break; + } + if (!*p2) + return s1 + i; + + return 0; +} diff --git a/libamu/strutil.c b/libamu/strutil.c index 5a1e759bff6..03a8e88f608 100644 --- a/libamu/strutil.c +++ b/libamu/strutil.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -268,3 +264,37 @@ xvsnprintf(char *str, size_t size, const char *format, va_list ap) return ret; } + +static size_t +vstrlen(const char *src, va_list ap) +{ + size_t len = strlen(src); + while ((src = va_arg(ap, const char *)) != NULL) + len += strlen(src); + return len; +} + +static void +vstrcpy(char *dst, const char *src, va_list ap) +{ + strcpy(dst, src); + while ((src = va_arg(ap, const char *)) != NULL) + strcat(dst, src); +} + +char * +strvcat(const char *src, ...) +{ + size_t len; + char *dst; + va_list ap; + + va_start(ap, src); + len = vstrlen(src, ap); + va_end(ap); + dst = xmalloc(len + 1); + va_start(ap, src); + vstrcpy(dst, src, ap); + va_end(ap); + return dst; +} diff --git a/libamu/ualarm.c b/libamu/ualarm.c new file mode 100644 index 00000000000..86280d92b75 --- /dev/null +++ b/libamu/ualarm.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 1997-2014 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * 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. + * + * + * File: am-utils/libamu/ualarm.c + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + +#define USPS 1000000 /* # of microseconds in a second */ + + +/* + * Generate a SIGALRM signal in ``usecs'' microseconds. + * If ``reload'' is non-zero, keep generating SIGALRM + * every ``reload'' microseconds after the first signal. + */ +u_int +ualarm(u_int usecs, u_int interval) +{ + struct itimerval new, old; + + new.it_interval.tv_usec = interval % USPS; + new.it_interval.tv_sec = interval / USPS; + new.it_value.tv_usec = usecs % USPS; + new.it_value.tv_sec = usecs / USPS; + + if (setitimer(ITIMER_REAL, &new, &old) == 0) + return (old.it_value.tv_sec * USPS + old.it_value.tv_usec); + + return -1; +} diff --git a/libamu/wire.c b/libamu/wire.c index c1852cdca7f..c9da0fe276a 100644 --- a/libamu/wire.c +++ b/libamu/wire.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -226,7 +222,7 @@ getwire_lookup(u_long address, u_long netmask, int ishost) } /* fill in network number (string) */ - al->ip_net_num = strdup(netNumberBuf); + al->ip_net_num = xstrdup(netNumberBuf); if (np != NULL) s = np->n_name; @@ -242,7 +238,7 @@ getwire_lookup(u_long address, u_long netmask, int ishost) } /* fill in network name (string) */ - al->ip_net_name = strdup(s); + al->ip_net_name = xstrdup(s); /* Let's be cautious here about buffer overflows -Ion */ if (strlen(s) > MAXHOSTNAMELEN) { al->ip_net_name[MAXHOSTNAMELEN] = '\0'; @@ -318,9 +314,14 @@ is_network_member(const char *net) if (STREQ(net, al->ip_net_name) || STREQ(net, al->ip_net_num)) return TRUE; } else { - char *netstr = strdup(net), *maskstr; + char *netstr = xstrdup(net), *maskstr; u_long netnum, masknum = 0; maskstr = strchr(netstr, '/'); + if (maskstr == NULL) { + plog(XLOG_ERROR, "%s: netstr %s does not have a `/'", __func__, netstr); + XFREE(netstr); + return FALSE; + } maskstr[0] = '\0'; /* null terminate netstr */ maskstr++; if (*maskstr == '\0') /* if empty string, make it NULL */ diff --git a/libamu/xdr_func.c b/libamu/xdr_func.c index 6bd0254318c..7453f701638 100644 --- a/libamu/xdr_func.c +++ b/libamu/xdr_func.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -951,7 +947,6 @@ xdr_am_mountres3_ok(XDR *xdrs, am_mountres3_ok *objp) return (TRUE); } - bool_t xdr_am_mountres3(XDR *xdrs, am_mountres3 *objp) { @@ -968,6 +963,75 @@ xdr_am_mountres3(XDR *xdrs, am_mountres3 *objp) return (TRUE); } +bool_t +xdr_am_cookieverf3(XDR *xdrs, am_cookieverf3 objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_cookieverf3:"); + + if (!xdr_opaque(xdrs, objp, AM_NFS3_COOKIEVERFSIZE)) + return FALSE; + return TRUE; +} + +/* + * Not ideal, xdr_u_int64_t() is not defined in Linux glibc RPC + * but xdr_u_quad_t() is. But in libtirpc xdr_u_quad_t() is not + * defined and xdr_u_int64_t() is. So xdr_u_int64_t() is probably + * an expected standard xdr function so, if it isn't defined use + * an internal xdr_u_int64_t() that uses xdr_u_quad_t(). + */ +#ifndef HAVE_XDR_U_INT64_T +#define xdr_u_int64_t(xdrs, objp) xdr_u_quad_t(xdrs, objp) +#endif /* HAVE_XDR_U_INT64_T */ + +bool_t +xdr_uint64(XDR *xdrs, uint64 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_uint64:"); + + if (!xdr_u_int64_t(xdrs, objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_cookie3(XDR *xdrs, am_cookie3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_cookie3:"); + + if (!xdr_uint64(xdrs, objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_nfs_fh3(XDR *xdrs, am_nfs_fh3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_nfs_fh3:"); + + if (!xdr_u_int(xdrs, &objp->am_fh3_length)) + return (FALSE); + if (objp->am_fh3_length > AM_FHSIZE3) + return (FALSE); + if (!xdr_opaque(xdrs, objp->am_fh3_data, objp->am_fh3_length)) + return (FALSE); + return (TRUE); +} + +bool_t +xdr_am_nfsstat3(XDR *xdrs, am_nfsstat3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_nfsstat3:"); + + if (!xdr_enum(xdrs, (enum_t *)objp)) + return (FALSE); + return (TRUE); +} bool_t xdr_am_diropargs3(XDR *xdrs, am_diropargs3 *objp) @@ -982,7 +1046,6 @@ xdr_am_diropargs3(XDR *xdrs, am_diropargs3 *objp) return (TRUE); } - bool_t xdr_am_filename3(XDR *xdrs, am_filename3 *objp) { @@ -994,6 +1057,315 @@ xdr_am_filename3(XDR *xdrs, am_filename3 *objp) return (TRUE); } +bool_t +xdr_am_ftype3(XDR *xdrs, am_ftype3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_ftype3:"); + + if (!xdr_enum(xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_mode3(XDR *xdrs, am_mode3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_mode3:"); + + if (!xdr_u_int(xdrs, objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_uid3(XDR *xdrs, am_uid3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_uid3:"); + + if (!xdr_u_int(xdrs, objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_gid3(XDR *xdrs, am_gid3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_gid3:"); + + if (!xdr_u_int(xdrs, objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_size3(XDR *xdrs, am_size3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_size3:"); + + if (!xdr_uint64(xdrs, objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_fileid3(XDR *xdrs, am_fileid3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_fileid3:"); + + if (!xdr_uint64(xdrs, objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_specdata3(XDR *xdrs, am_specdata3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_specdata3:"); + + if (!xdr_u_int(xdrs, &objp->specdata1)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->specdata2)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_nfstime3(XDR *xdrs, am_nfstime3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_nfstime3:"); + + if (!xdr_u_int(xdrs, &objp->seconds)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->nseconds)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_fattr3(XDR *xdrs, am_fattr3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_fattr3:"); + + if (!xdr_am_ftype3(xdrs, &objp->type)) + return FALSE; + if (!xdr_am_mode3(xdrs, &objp->mode)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->nlink)) + return FALSE; + if (!xdr_am_uid3(xdrs, &objp->uid)) + return FALSE; + if (!xdr_am_gid3(xdrs, &objp->gid)) + return FALSE; + if (!xdr_am_size3(xdrs, &objp->size)) + return FALSE; + if (!xdr_am_size3(xdrs, &objp->used)) + return FALSE; + if (!xdr_am_specdata3(xdrs, &objp->rdev)) + return FALSE; + if (!xdr_uint64(xdrs, &objp->fsid)) + return FALSE; + if (!xdr_am_fileid3(xdrs, &objp->fileid)) + return FALSE; + if (!xdr_am_nfstime3(xdrs, &objp->atime)) + return FALSE; + if (!xdr_am_nfstime3(xdrs, &objp->mtime)) + return FALSE; + if (!xdr_am_nfstime3(xdrs, &objp->ctime)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_post_op_attr(XDR *xdrs, am_post_op_attr *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_post_op_attr:"); + + if (!xdr_bool(xdrs, &objp->attributes_follow)) + return FALSE; + switch (objp->attributes_follow) { + case TRUE: + if (!xdr_am_fattr3(xdrs, &objp->am_post_op_attr_u.attributes)) + return FALSE; + break; + case FALSE: + break; + default: + return FALSE; + } + return TRUE; +} + +bool_t +xdr_am_stable_how(XDR *xdrs, am_stable_how *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_stable_how:"); + + if (!xdr_enum(xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_offset3(XDR *xdrs, am_offset3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_offset3:"); + + if (!xdr_uint64(xdrs, objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_count3(XDR *xdrs, am_count3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_count3:"); + + if (!xdr_u_int(xdrs, objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_wcc_attr(XDR *xdrs, am_wcc_attr *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_wcc_attr:"); + + if (!xdr_am_size3(xdrs, &objp->size)) + return FALSE; + if (!xdr_am_nfstime3(xdrs, &objp->mtime)) + return FALSE; + if (!xdr_am_nfstime3(xdrs, &objp->ctime)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_pre_op_attr(XDR *xdrs, am_pre_op_attr *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, ":xdr_am_pre_op_attr"); + + if (!xdr_bool(xdrs, &objp->attributes_follow)) + return FALSE; + switch (objp->attributes_follow) { + case TRUE: + if (!xdr_am_wcc_attr(xdrs, &objp->am_pre_op_attr_u.attributes)) + return FALSE; + break; + case FALSE: + break; + default: + return FALSE; + } + return TRUE; +} + +bool_t +xdr_am_wcc_data(XDR *xdrs, am_wcc_data *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_wcc_data:"); + + if (!xdr_am_pre_op_attr(xdrs, &objp->before)) + return FALSE; + if (!xdr_am_post_op_attr(xdrs, &objp->after)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_WRITE3args(XDR *xdrs, am_WRITE3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_WRITE3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->file)) + return FALSE; + if (!xdr_am_offset3(xdrs, &objp->offset)) + return FALSE; + if (!xdr_am_count3(xdrs, &objp->count)) + return FALSE; + if (!xdr_am_stable_how(xdrs, &objp->stable)) + return FALSE; + if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, + (u_int *) &objp->data.data_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_writeverf3(XDR *xdrs, am_writeverf3 objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_writeverf3:"); + + if (!xdr_opaque(xdrs, objp, AM_NFS3_WRITEVERFSIZE)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_WRITE3resok(XDR *xdrs, am_WRITE3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_WRITE3resok:"); + + if (!xdr_am_wcc_data(xdrs, &objp->file_wcc)) + return FALSE; + if (!xdr_am_count3(xdrs, &objp->count)) + return FALSE; + if (!xdr_am_stable_how(xdrs, &objp->committed)) + return FALSE; + if (!xdr_am_writeverf3(xdrs, objp->verf)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_WRITE3resfail(XDR *xdrs, am_WRITE3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_WRITE3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->file_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_WRITE3res(XDR *xdrs, am_WRITE3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_WRITE3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_WRITE3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_WRITE3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} bool_t xdr_am_LOOKUP3args(XDR *xdrs, am_LOOKUP3args *objp) @@ -1006,7 +1378,6 @@ xdr_am_LOOKUP3args(XDR *xdrs, am_LOOKUP3args *objp) return (TRUE); } - bool_t xdr_am_LOOKUP3res(XDR *xdrs, am_LOOKUP3res *objp) { @@ -1028,25 +1399,17 @@ xdr_am_LOOKUP3res(XDR *xdrs, am_LOOKUP3res *objp) return (TRUE); } - bool_t xdr_am_LOOKUP3resfail(XDR *xdrs, am_LOOKUP3resfail *objp) { if (amuDebug(D_XDRTRACE)) plog(XLOG_DEBUG, "xdr_am_LOOKUP3resfail:"); - /* - * Don't xdr post_op_attr: amd doesn't need them, but they require many - * additional xdr functions. - */ -#if 0 - if (!xdr_post_op_attr(xdrs, &objp->dir_attributes)) + if (!xdr_am_post_op_attr(xdrs, &objp->dir_attributes)) return (FALSE); -#endif return (TRUE); } - bool_t xdr_am_LOOKUP3resok(XDR *xdrs, am_LOOKUP3resok *objp) { @@ -1055,44 +1418,1656 @@ xdr_am_LOOKUP3resok(XDR *xdrs, am_LOOKUP3resok *objp) if (!xdr_am_nfs_fh3(xdrs, &objp->object)) return (FALSE); - /* - * Don't xdr post_op_attr: amd doesn't need them, but they require many - * additional xdr functions. - */ -#if 0 - if (!xdr_post_op_attr(xdrs, &objp->obj_attributes)) + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) return (FALSE); - if (!xdr_post_op_attr(xdrs, &objp->dir_attributes)) + if (!xdr_am_post_op_attr(xdrs, &objp->dir_attributes)) return (FALSE); -#endif return (TRUE); } - bool_t -xdr_am_nfs_fh3(XDR *xdrs, am_nfs_fh3 *objp) +xdr_am_COMMIT3args(XDR *xdrs, am_COMMIT3args *objp) { if (amuDebug(D_XDRTRACE)) - plog(XLOG_DEBUG, "xdr_am_nfs_fh3:"); + plog(XLOG_DEBUG, "xdr_am_COMMIT3args:"); - if (!xdr_u_int(xdrs, &objp->am_fh3_length)) - return (FALSE); - if (objp->am_fh3_length > AM_FHSIZE3) - return (FALSE); - if (!xdr_opaque(xdrs, objp->am_fh3_data, objp->am_fh3_length)) - return (FALSE); - return (TRUE); + if (!xdr_am_nfs_fh3(xdrs, &objp->file)) + return FALSE; + if (!xdr_am_offset3(xdrs, &objp->offset)) + return FALSE; + if (!xdr_am_count3(xdrs, &objp->count)) + return FALSE; + return TRUE; } - bool_t -xdr_am_nfsstat3(XDR *xdrs, am_nfsstat3 *objp) +xdr_am_COMMIT3resok(XDR *xdrs, am_COMMIT3resok *objp) { if (amuDebug(D_XDRTRACE)) - plog(XLOG_DEBUG, "xdr_am_nfsstat3:"); + plog(XLOG_DEBUG, "xdr_am_COMMIT3resok:"); - if (!xdr_enum(xdrs, (enum_t *)objp)) - return (FALSE); - return (TRUE); + if (!xdr_am_wcc_data(xdrs, &objp->file_wcc)) + return FALSE; + if (!xdr_am_writeverf3(xdrs, objp->verf)) + return FALSE; + return TRUE; } -#endif /* not HAVE_FS_NFS3 */ + +bool_t +xdr_am_COMMIT3resfail(XDR *xdrs, am_COMMIT3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_COMMIT3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->file_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_COMMIT3res(XDR *xdrs, am_COMMIT3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_COMMIT3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_COMMIT3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_COMMIT3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_ACCESS3args(XDR *xdrs, am_ACCESS3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_ACCESS3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->object)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->access)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_ACCESS3resok(XDR *xdrs, am_ACCESS3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_ACCESS3resok:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->access)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_ACCESS3resfail(XDR *xdrs, am_ACCESS3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_ACCESS3resfail:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_ACCESS3res(XDR *xdrs, am_ACCESS3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_ACCESS3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_ACCESS3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_ACCESS3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_GETATTR3args(XDR *xdrs, am_GETATTR3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_GETATTR3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->object)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_GETATTR3resok(XDR *xdrs, am_GETATTR3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_GETATTR3resok:"); + + if (!xdr_am_fattr3(xdrs, &objp->obj_attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_GETATTR3res(XDR *xdrs, am_GETATTR3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_GETATTR3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_GETATTR3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + break; + } + return TRUE; +} + +bool_t +xdr_am_time_how(XDR *xdrs, am_time_how *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_time_how:"); + + if (!xdr_enum(xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_set_mode3(XDR *xdrs, am_set_mode3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_set_mode3:"); + + if (!xdr_bool(xdrs, &objp->set_it)) + return FALSE; + switch (objp->set_it) { + case TRUE: + if (!xdr_am_mode3(xdrs, &objp->am_set_mode3_u.mode)) + return FALSE; + break; + default: + break; + } + return TRUE; +} + +bool_t +xdr_am_set_uid3(XDR *xdrs, am_set_uid3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_set_uid3:"); + + if (!xdr_bool(xdrs, &objp->set_it)) + return FALSE; + switch (objp->set_it) { + case TRUE: + if (!xdr_am_uid3(xdrs, &objp->am_set_uid3_u.uid)) + return FALSE; + break; + default: + break; + } + return TRUE; +} + +bool_t +xdr_am_set_gid3(XDR *xdrs, am_set_gid3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_set_gid3:"); + + if (!xdr_bool(xdrs, &objp->set_it)) + return FALSE; + switch (objp->set_it) { + case TRUE: + if (!xdr_am_gid3(xdrs, &objp->am_set_gid3_u.gid)) + return FALSE; + break; + default: + break; + } + return TRUE; +} + +bool_t +xdr_am_set_size3(XDR *xdrs, am_set_size3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_set_size3:"); + + if (!xdr_bool(xdrs, &objp->set_it)) + return FALSE; + switch (objp->set_it) { + case TRUE: + if (!xdr_am_size3(xdrs, &objp->am_set_size3_u.size)) + return FALSE; + break; + default: + break; + } + return TRUE; +} + +bool_t +xdr_am_set_atime(XDR *xdrs, am_set_atime *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_set_atime:"); + + if (!xdr_am_time_how(xdrs, &objp->set_it)) + return FALSE; + switch (objp->set_it) { + case AM_SET_TO_CLIENT_TIME: + if (!xdr_am_nfstime3(xdrs, &objp->am_set_atime_u.atime)) + return FALSE; + break; + default: + break; + } + return TRUE; +} + +bool_t +xdr_am_set_mtime(XDR *xdrs, am_set_mtime *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_set_mtime:"); + + if (!xdr_am_time_how(xdrs, &objp->set_it)) + return FALSE; + switch (objp->set_it) { + case AM_SET_TO_CLIENT_TIME: + if (!xdr_am_nfstime3(xdrs, &objp->am_set_mtime_u.mtime)) + return FALSE; + break; + default: + break; + } + return TRUE; +} + +bool_t +xdr_am_sattr3(XDR *xdrs, am_sattr3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_sattr3:"); + + if (!xdr_am_set_mode3(xdrs, &objp->mode)) + return FALSE; + if (!xdr_am_set_uid3(xdrs, &objp->uid)) + return FALSE; + if (!xdr_am_set_gid3(xdrs, &objp->gid)) + return FALSE; + if (!xdr_am_set_size3(xdrs, &objp->size)) + return FALSE; + if (!xdr_am_set_atime(xdrs, &objp->atime)) + return FALSE; + if (!xdr_am_set_mtime(xdrs, &objp->mtime)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_createmode3(XDR *xdrs, am_createmode3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_createmode3:"); + + if (!xdr_enum(xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_createverf3(XDR *xdrs, am_createverf3 objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_createverf3:"); + + if (!xdr_opaque(xdrs, objp, AM_NFS3_CREATEVERFSIZE)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_createhow3(XDR *xdrs, am_createhow3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_createhow3:"); + + if (!xdr_am_createmode3(xdrs, &objp->mode)) + return FALSE; + switch (objp->mode) { + case AM_UNCHECKED: + if (!xdr_am_sattr3(xdrs, &objp->am_createhow3_u.obj_attributes)) + return FALSE; + break; + case AM_GUARDED: + if (!xdr_am_sattr3(xdrs, &objp->am_createhow3_u.g_obj_attributes)) + return FALSE; + break; + case AM_EXCLUSIVE: + if (!xdr_am_createverf3(xdrs, objp->am_createhow3_u.verf)) + return FALSE; + break; + default: + return FALSE; + } + return TRUE; +} + +bool_t +xdr_am_CREATE3args(XDR *xdrs, am_CREATE3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_CREATE3args:"); + + if (!xdr_am_diropargs3(xdrs, &objp->where)) + return FALSE; + if (!xdr_am_createhow3(xdrs, &objp->how)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_post_op_fh3(XDR *xdrs, am_post_op_fh3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_post_op_fh3:"); + + if (!xdr_bool(xdrs, &objp->handle_follows)) + return FALSE; + switch (objp->handle_follows) { + case TRUE: + if (!xdr_am_nfs_fh3(xdrs, &objp->am_post_op_fh3_u.handle)) + return FALSE; + break; + case FALSE: + break; + default: + return FALSE; + } + return TRUE; +} + +bool_t +xdr_am_CREATE3resok(XDR *xdrs, am_CREATE3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_CREATE3resok:"); + + if (!xdr_am_post_op_fh3(xdrs, &objp->obj)) + return FALSE; + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_CREATE3resfail(XDR *xdrs, am_CREATE3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_CREATE3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_CREATE3res(XDR *xdrs, am_CREATE3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_CREATE3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_CREATE3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_CREATE3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_REMOVE3args(XDR *xdrs, am_REMOVE3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_REMOVE3args:"); + + if (!xdr_am_diropargs3(xdrs, &objp->object)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_REMOVE3resok(XDR *xdrs, am_REMOVE3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_REMOVE3resok:"); + + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_REMOVE3resfail(XDR *xdrs, am_REMOVE3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_REMOVE3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_REMOVE3res(XDR *xdrs, am_REMOVE3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_REMOVE3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_REMOVE3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_REMOVE3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_READ3args(XDR *xdrs, am_READ3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READ3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->file)) + return FALSE; + if (!xdr_am_offset3(xdrs, &objp->offset)) + return FALSE; + if (!xdr_am_count3(xdrs, &objp->count)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READ3resok(XDR *xdrs, am_READ3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READ3resok:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->file_attributes)) + return FALSE; + if (!xdr_am_count3(xdrs, &objp->count)) + return FALSE; + if (!xdr_bool(xdrs, &objp->eof)) + return FALSE; + if (!xdr_bytes(xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READ3resfail(XDR *xdrs, am_READ3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READ3resfail:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->file_attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READ3res(XDR *xdrs, am_READ3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READ3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_READ3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_READ3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_FSINFO3args(XDR *xdrs, am_FSINFO3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_FSINFO3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->fsroot)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_FSINFO3resok(XDR *xdrs, am_FSINFO3resok *objp) +{ + register int32_t *buf; + + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_FSINFO3resok:"); + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + buf = XDR_INLINE(xdrs, 7 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int(xdrs, &objp->rtmax)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->rtpref)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->rtmult)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->wtmax)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->wtpref)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->wtmult)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->dtpref)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->rtmax); + IXDR_PUT_U_LONG(buf, objp->rtpref); + IXDR_PUT_U_LONG(buf, objp->rtmult); + IXDR_PUT_U_LONG(buf, objp->wtmax); + IXDR_PUT_U_LONG(buf, objp->wtpref); + IXDR_PUT_U_LONG(buf, objp->wtmult); + IXDR_PUT_U_LONG(buf, objp->dtpref); + } + if (!xdr_am_size3(xdrs, &objp->maxfilesize)) + return FALSE; + if (!xdr_am_nfstime3(xdrs, &objp->time_delta)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->properties)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + buf = XDR_INLINE(xdrs, 7 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->rtmax)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->rtpref)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->rtmult)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->wtmax)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->wtpref)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->wtmult)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->dtpref)) + return FALSE; + } else { + objp->rtmax = IXDR_GET_U_LONG(buf); + objp->rtpref = IXDR_GET_U_LONG(buf); + objp->rtmult = IXDR_GET_U_LONG(buf); + objp->wtmax = IXDR_GET_U_LONG(buf); + objp->wtpref = IXDR_GET_U_LONG(buf); + objp->wtmult = IXDR_GET_U_LONG(buf); + objp->dtpref = IXDR_GET_U_LONG(buf); + } + if (!xdr_am_size3(xdrs, &objp->maxfilesize)) + return FALSE; + if (!xdr_am_nfstime3(xdrs, &objp->time_delta)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->properties)) + return FALSE; + return TRUE; + } + + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->rtmax)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->rtpref)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->rtmult)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->wtmax)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->wtpref)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->wtmult)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->dtpref)) + return FALSE; + if (!xdr_am_size3(xdrs, &objp->maxfilesize)) + return FALSE; + if (!xdr_am_nfstime3(xdrs, &objp->time_delta)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->properties)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_FSINFO3resfail(XDR *xdrs, am_FSINFO3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_FSINFO3resfail:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_FSINFO3res(XDR *xdrs, am_FSINFO3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_FSINFO3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_FSINFO3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_FSINFO3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_FSSTAT3args(XDR *xdrs, am_FSSTAT3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_FSSTAT3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->fsroot)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_FSSTAT3resok(XDR *xdrs, am_FSSTAT3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_FSSTAT3resok:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + if (!xdr_am_size3(xdrs, &objp->tbytes)) + return FALSE; + if (!xdr_am_size3(xdrs, &objp->fbytes)) + return FALSE; + if (!xdr_am_size3(xdrs, &objp->abytes)) + return FALSE; + if (!xdr_am_size3(xdrs, &objp->tfiles)) + return FALSE; + if (!xdr_am_size3(xdrs, &objp->ffiles)) + return FALSE; + if (!xdr_am_size3(xdrs, &objp->afiles)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->invarsec)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_FSSTAT3resfail(XDR *xdrs, am_FSSTAT3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_FSSTAT3resfail:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_FSSTAT3res(XDR *xdrs, am_FSSTAT3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_FSSTAT3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_FSSTAT3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_FSSTAT3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_PATHCONF3args(XDR *xdrs, am_PATHCONF3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_PATHCONF3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->object)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_PATHCONF3resok(XDR *xdrs, am_PATHCONF3resok *objp) +{ + register int32_t *buf; + + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_PATHCONF3resok:"); + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int(xdrs, &objp->linkmax)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->name_max)) + return FALSE; + if (!xdr_bool(xdrs, &objp->no_trunc)) + return FALSE; + if (!xdr_bool(xdrs, &objp->chown_restricted)) + return FALSE; + if (!xdr_bool(xdrs, &objp->case_insensitive)) + return FALSE; + if (!xdr_bool(xdrs, &objp->case_preserving)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->linkmax); + IXDR_PUT_U_LONG(buf, objp->name_max); + IXDR_PUT_BOOL(buf, objp->no_trunc); + IXDR_PUT_BOOL(buf, objp->chown_restricted); + IXDR_PUT_BOOL(buf, objp->case_insensitive); + IXDR_PUT_BOOL(buf, objp->case_preserving); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int(xdrs, &objp->linkmax)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->name_max)) + return FALSE; + if (!xdr_bool(xdrs, &objp->no_trunc)) + return FALSE; + if (!xdr_bool(xdrs, &objp->chown_restricted)) + return FALSE; + if (!xdr_bool(xdrs, &objp->case_insensitive)) + return FALSE; + if (!xdr_bool(xdrs, &objp->case_preserving)) + return FALSE; + } else { + objp->linkmax = IXDR_GET_U_LONG(buf); + objp->name_max = IXDR_GET_U_LONG(buf); + objp->no_trunc = IXDR_GET_BOOL(buf); + objp->chown_restricted = IXDR_GET_BOOL(buf); + objp->case_insensitive = IXDR_GET_BOOL(buf); + objp->case_preserving = IXDR_GET_BOOL(buf); + } + return TRUE; + } + + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->linkmax)) + return FALSE; + if (!xdr_u_int(xdrs, &objp->name_max)) + return FALSE; + if (!xdr_bool(xdrs, &objp->no_trunc)) + return FALSE; + if (!xdr_bool(xdrs, &objp->chown_restricted)) + return FALSE; + if (!xdr_bool(xdrs, &objp->case_insensitive)) + return FALSE; + if (!xdr_bool(xdrs, &objp->case_preserving)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_PATHCONF3resfail(XDR *xdrs, am_PATHCONF3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_PATHCONF3resfail:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_PATHCONF3res(XDR *xdrs, am_PATHCONF3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_PATHCONF3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_PATHCONF3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_PATHCONF3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_nfspath3(XDR *xdrs, am_nfspath3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_nfspath3:"); + + if (!xdr_string(xdrs, objp, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_symlinkdata3(XDR *xdrs, am_symlinkdata3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_symlinkdata3:"); + + if (!xdr_am_sattr3(xdrs, &objp->symlink_attributes)) + return FALSE; + if (!xdr_am_nfspath3(xdrs, &objp->symlink_data)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_SYMLINK3args(XDR *xdrs, am_SYMLINK3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_SYMLINK3args:"); + + if (!xdr_am_diropargs3(xdrs, &objp->where)) + return FALSE; + if (!xdr_am_symlinkdata3(xdrs, &objp->symlink)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_SYMLINK3resok(XDR *xdrs, am_SYMLINK3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_SYMLINK3resok:"); + + if (!xdr_am_post_op_fh3(xdrs, &objp->obj)) + return FALSE; + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_SYMLINK3resfail(XDR *xdrs, am_SYMLINK3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_SYMLINK3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_SYMLINK3res(XDR *xdrs, am_SYMLINK3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_SYMLINK3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_SYMLINK3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_SYMLINK3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_READLINK3args(XDR *xdrs, am_READLINK3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READLINK3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->symlink)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READLINK3resok(XDR *xdrs, am_READLINK3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READLINK3resok:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->symlink_attributes)) + return FALSE; + if (!xdr_am_nfspath3(xdrs, &objp->data)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READLINK3resfail(XDR *xdrs, am_READLINK3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READLINK3resfail:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->symlink_attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READLINK3res(XDR *xdrs, am_READLINK3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READLINK3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_READLINK3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_READLINK3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_devicedata3(XDR *xdrs, am_devicedata3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_devicedata3:"); + + if (!xdr_am_sattr3(xdrs, &objp->dev_attributes)) + return FALSE; + if (!xdr_am_specdata3(xdrs, &objp->spec)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_mknoddata3(XDR *xdrs, am_mknoddata3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_mknoddata3:"); + + if (!xdr_am_ftype3(xdrs, &objp->type)) + return FALSE; + switch (objp->type) { + case AM_NF3CHR: + if (!xdr_am_devicedata3(xdrs, &objp->am_mknoddata3_u.chr_device)) + return FALSE; + break; + case AM_NF3BLK: + if (!xdr_am_devicedata3(xdrs, &objp->am_mknoddata3_u.blk_device)) + return FALSE; + break; + case AM_NF3SOCK: + if (!xdr_am_sattr3(xdrs, &objp->am_mknoddata3_u.sock_attributes)) + return FALSE; + break; + case AM_NF3FIFO: + if (!xdr_am_sattr3(xdrs, &objp->am_mknoddata3_u.pipe_attributes)) + return FALSE; + break; + default: + break; + } + return TRUE; +} + +bool_t +xdr_am_MKNOD3args(XDR *xdrs, am_MKNOD3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_MKNOD3args:"); + + if (!xdr_am_diropargs3(xdrs, &objp->where)) + return FALSE; + if (!xdr_am_mknoddata3(xdrs, &objp->what)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_MKNOD3resok(XDR *xdrs, am_MKNOD3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_MKNOD3resok:"); + + if (!xdr_am_post_op_fh3(xdrs, &objp->obj)) + return FALSE; + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_MKNOD3resfail(XDR *xdrs, am_MKNOD3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_MKNOD3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_MKNOD3res(XDR *xdrs, am_MKNOD3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, ":"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_MKNOD3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_MKNOD3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_MKDIR3args(XDR *xdrs, am_MKDIR3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, ":"); + + if (!xdr_am_diropargs3(xdrs, &objp->where)) + return FALSE; + if (!xdr_am_sattr3(xdrs, &objp->attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_MKDIR3resok(XDR *xdrs, am_MKDIR3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_MKDIR3resok:"); + + if (!xdr_am_post_op_fh3(xdrs, &objp->obj)) + return FALSE; + if (!xdr_am_post_op_attr(xdrs, &objp->obj_attributes)) + return FALSE; + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_MKDIR3resfail(XDR *xdrs, am_MKDIR3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_MKDIR3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_MKDIR3res(XDR *xdrs, am_MKDIR3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_MKDIR3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_MKDIR3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_MKDIR3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_RMDIR3args(XDR *xdrs, am_RMDIR3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_RMDIR3args:"); + + if (!xdr_am_diropargs3(xdrs, &objp->object)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_RMDIR3resok(XDR *xdrs, am_RMDIR3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_RMDIR3resok:"); + + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_RMDIR3resfail(XDR *xdrs, am_RMDIR3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_RMDIR3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->dir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_RMDIR3res(XDR *xdrs, am_RMDIR3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_RMDIR3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_RMDIR3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_RMDIR3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_RENAME3args(XDR *xdrs, am_RENAME3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_RENAME3args:"); + + if (!xdr_am_diropargs3(xdrs, &objp->from)) + return FALSE; + if (!xdr_am_diropargs3(xdrs, &objp->to)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_RENAME3resok(XDR *xdrs, am_RENAME3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_RENAME3resok:"); + + if (!xdr_am_wcc_data(xdrs, &objp->fromdir_wcc)) + return FALSE; + if (!xdr_am_wcc_data(xdrs, &objp->todir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_RENAME3resfail(XDR *xdrs, am_RENAME3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_RENAME3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->fromdir_wcc)) + return FALSE; + if (!xdr_am_wcc_data(xdrs, &objp->todir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_RENAME3res(XDR *xdrs, am_RENAME3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_RENAME3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_RENAME3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_RENAME3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_READDIRPLUS3args(XDR *xdrs, am_READDIRPLUS3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READDIRPLUS3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->dir)) + return FALSE; + if (!xdr_am_cookie3(xdrs, &objp->cookie)) + return FALSE; + if (!xdr_am_cookieverf3(xdrs, objp->cookieverf)) + return FALSE; + if (!xdr_am_count3(xdrs, &objp->dircount)) + return FALSE; + if (!xdr_am_count3(xdrs, &objp->maxcount)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_entryplus3(XDR *xdrs, am_entryplus3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_entryplus3:"); + + if (!xdr_am_fileid3(xdrs, &objp->fileid)) + return FALSE; + if (!xdr_am_filename3(xdrs, &objp->name)) + return FALSE; + if (!xdr_am_cookie3(xdrs, &objp->cookie)) + return FALSE; + if (!xdr_am_post_op_attr(xdrs, &objp->name_attributes)) + return FALSE; + if (!xdr_am_post_op_fh3(xdrs, &objp->name_handle)) + return FALSE; + if (!xdr_pointer(xdrs, (char **)&objp->nextentry, + sizeof(am_entryplus3), (xdrproc_t) xdr_am_entryplus3)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_dirlistplus3(XDR *xdrs, am_dirlistplus3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_dirlistplus3:"); + + if (!xdr_pointer(xdrs, (char **)&objp->entries, + sizeof(am_entryplus3), (xdrproc_t) xdr_am_entryplus3)) + return FALSE; + if (!xdr_bool(xdrs, &objp->eof)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READDIRPLUS3resok(XDR *xdrs, am_READDIRPLUS3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READDIRPLUS3resok:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->dir_attributes)) + return FALSE; + if (!xdr_am_cookieverf3(xdrs, objp->cookieverf)) + return FALSE; + if (!xdr_am_dirlistplus3(xdrs, &objp->reply)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READDIRPLUS3resfail(XDR *xdrs, am_READDIRPLUS3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READDIRPLUS3resfail:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->dir_attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READDIRPLUS3res(XDR *xdrs, am_READDIRPLUS3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READDIRPLUS3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_READDIRPLUS3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_READDIRPLUS3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_READDIR3args(XDR *xdrs, am_READDIR3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READDIR3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->dir)) + return FALSE; + if (!xdr_am_cookie3(xdrs, &objp->cookie)) + return FALSE; + if (!xdr_am_cookieverf3(xdrs, objp->cookieverf)) + return FALSE; + if (!xdr_am_count3(xdrs, &objp->count)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_entry3(XDR *xdrs, am_entry3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_entry3:"); + + if (!xdr_am_fileid3(xdrs, &objp->fileid)) + return FALSE; + if (!xdr_am_filename3(xdrs, &objp->name)) + return FALSE; + if (!xdr_am_cookie3(xdrs, &objp->cookie)) + return FALSE; + if (!xdr_pointer(xdrs, (char **)&objp->nextentry, + sizeof(am_entry3), (xdrproc_t) xdr_am_entry3)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_dirlist3(XDR *xdrs, am_dirlist3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_dirlist3:"); + + if (!xdr_pointer(xdrs, (char **)&objp->entries, + sizeof(am_entry3), (xdrproc_t) xdr_am_entry3)) + return FALSE; + if (!xdr_bool (xdrs, &objp->eof)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READDIR3resok(XDR *xdrs, am_READDIR3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READDIR3resok:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->dir_attributes)) + return FALSE; + if (!xdr_am_cookieverf3(xdrs, objp->cookieverf)) + return FALSE; + if (!xdr_am_dirlist3(xdrs, &objp->reply)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READDIR3resfail(XDR *xdrs, am_READDIR3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READDIR3resfail:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->dir_attributes)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_READDIR3res(XDR *xdrs, am_READDIR3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_READDIR3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_READDIR3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_READDIR3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_LINK3args(XDR *xdrs, am_LINK3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_LINK3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->file)) + return FALSE; + if (!xdr_am_diropargs3(xdrs, &objp->link)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_LINK3resok(XDR *xdrs, am_LINK3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_LINK3resok:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->file_attributes)) + return FALSE; + if (!xdr_am_wcc_data(xdrs, &objp->linkdir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_LINK3resfail(XDR *xdrs, am_LINK3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_LINK3resfail:"); + + if (!xdr_am_post_op_attr(xdrs, &objp->file_attributes)) + return FALSE; + if (!xdr_am_wcc_data(xdrs, &objp->linkdir_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_LINK3res(XDR *xdrs, am_LINK3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_LINK3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_LINK3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_LINK3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} + +bool_t +xdr_am_sattrguard3(XDR *xdrs, am_sattrguard3 *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_sattrguard3:"); + + if (!xdr_bool(xdrs, &objp->check)) + return FALSE; + switch (objp->check) { + case TRUE: + if (!xdr_am_nfstime3(xdrs, &objp->am_sattrguard3_u.obj_ctime)) + return FALSE; + break; + case FALSE: + break; + default: + return FALSE; + } + return TRUE; +} + +bool_t +xdr_am_SETATTR3args(XDR *xdrs, am_SETATTR3args *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_SETATTR3args:"); + + if (!xdr_am_nfs_fh3(xdrs, &objp->object)) + return FALSE; + if (!xdr_am_sattr3(xdrs, &objp->new_attributes)) + return FALSE; + if (!xdr_am_sattrguard3(xdrs, &objp->guard)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_SETATTR3resok(XDR *xdrs, am_SETATTR3resok *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_SETATTR3resok:"); + + if (!xdr_am_wcc_data(xdrs, &objp->obj_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_SETATTR3resfail(XDR *xdrs, am_SETATTR3resfail *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_SETATTR3resfail:"); + + if (!xdr_am_wcc_data(xdrs, &objp->obj_wcc)) + return FALSE; + return TRUE; +} + +bool_t +xdr_am_SETATTR3res(XDR *xdrs, am_SETATTR3res *objp) +{ + if (amuDebug(D_XDRTRACE)) + plog(XLOG_DEBUG, "xdr_am_SETATTR3res:"); + + if (!xdr_am_nfsstat3(xdrs, &objp->status)) + return FALSE; + switch (objp->status) { + case AM_NFS3_OK: + if (!xdr_am_SETATTR3resok(xdrs, &objp->res_u.ok)) + return FALSE; + break; + default: + if (!xdr_am_SETATTR3resfail(xdrs, &objp->res_u.fail)) + return FALSE; + break; + } + return TRUE; +} +#endif /* HAVE_FS_NFS3 */ diff --git a/libamu/xutil.c b/libamu/xutil.c index 3a33b9c0b14..1159fe5ec83 100644 --- a/libamu/xutil.c +++ b/libamu/xutil.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -63,14 +59,13 @@ static char am_hostname[MAXHOSTNAMELEN] = "unknown"; /* Hostname */ pid_t am_mypid = -1; /* process ID */ serv_state amd_state; /* amd's state */ int foreground = 1; /* 1 == this is the top-level server */ -int debug_flags = 0; +u_int debug_flags = D_CONTROL; /* set regardless if compiled with debugging */ #ifdef HAVE_SYSLOG int syslogging; #endif /* HAVE_SYSLOG */ -int xlog_level = XLOG_ALL & ~XLOG_MAP & ~XLOG_STATS; -int xlog_level_init = ~0; -static int amd_program_number = AMQ_PROGRAM; +static u_int xlog_level = XLOG_DEFAULT; +static u_long amd_program_number = AMQ_PROGRAM; #ifdef DEBUG_MEM # if defined(HAVE_MALLINFO) && defined(HAVE_MALLOC_VERIFY) @@ -92,23 +87,23 @@ static void real_plog(int lvl, const char *fmt, va_list vargs) struct opt_tab dbg_opt[] = { {"all", D_ALL}, /* All non-disruptive options */ - {"amq", D_AMQ}, /* Don't register for AMQ program */ - {"daemon", D_DAEMON}, /* Don't enter daemon mode */ - {"fork", D_FORK}, /* Don't fork server */ + {"defaults", D_DEFAULT}, /* Default options */ + {"test", D_TEST}, /* Full debug - no daemon, no fork, no amq, local mtab */ + {"amq", D_AMQ}, /* Register for AMQ program */ + {"daemon", D_DAEMON}, /* Enter daemon mode */ + {"fork", D_FORK}, /* Fork server (hlfsd only) */ {"full", D_FULL}, /* Program trace */ #ifdef HAVE_CLOCK_GETTIME {"hrtime", D_HRTIME}, /* Print high resolution time stamps */ #endif /* HAVE_CLOCK_GETTIME */ - /* info service specific debugging (hesiod, nis, etc) */ - {"info", D_INFO}, + {"info", D_INFO}, /* info service specific debugging (hesiod, nis, etc) */ {"mem", D_MEM}, /* Trace memory allocations */ {"mtab", D_MTAB}, /* Use local mtab file */ {"readdir", D_READDIR}, /* Check on browsable_dirs progress */ {"str", D_STR}, /* Debug string munging */ - {"test", D_TEST}, /* Full debug - no daemon, no amq, local mtab */ {"trace", D_TRACE}, /* Protocol trace */ {"xdrtrace", D_XDRTRACE}, /* Trace xdr routines */ - {0, 0} + {NULL, 0} }; #endif /* DEBUG */ @@ -118,6 +113,7 @@ struct opt_tab dbg_opt[] = struct opt_tab xlog_opt[] = { {"all", XLOG_ALL}, /* All messages */ + {"defaults", XLOG_DEFAULT}, /* Default messages */ #ifdef DEBUG {"debug", XLOG_DEBUG}, /* Debug messages */ #endif /* DEBUG */ /* DEBUG */ @@ -129,7 +125,7 @@ struct opt_tab xlog_opt[] = {"user", XLOG_USER}, /* Non-fatal user errors */ {"warn", XLOG_WARNING}, /* Warnings */ {"warning", XLOG_WARNING}, /* Warnings */ - {0, 0} + {NULL, 0} }; @@ -150,7 +146,7 @@ am_get_progname(void) void am_set_hostname(char *hn) { - xstrlcpy(am_hostname, hn, MAXHOSTNAMELEN); + xstrlcpy(am_hostname, hn, sizeof(am_hostname)); } @@ -295,17 +291,23 @@ expand_error(const char *f, char *e, size_t maxlen) const char *p; char *q; int error = errno; - int len = 0; + size_t len = 0, l; - for (p = f, q = e; (*q = *p) && (size_t) len < maxlen; len++, q++, p++) { + *e = '\0'; + for (p = f, q = e; len < maxlen && (*q = *p); len++, q++, p++) { if (p[0] == '%' && p[1] == 'm') { - xstrlcpy(q, strerror(error), maxlen); - len += strlen(q) - 1; - q += strlen(q) - 1; + if (len >= maxlen) + break; + xstrlcpy(q, strerror(error), maxlen - len); + l = strlen(q); + if (l != 0) + l--; + len += l; + q += l; p++; } } - e[maxlen-1] = '\0'; /* null terminate, to be sure */ + e[maxlen - 1] = '\0'; /* null terminate, to be sure */ return e; } @@ -317,7 +319,7 @@ static void show_time_host_and_name(int lvl) { static time_t last_t = 0; - static char *last_ctime = 0; + static char *last_ctime = NULL; time_t t; #if defined(HAVE_CLOCK_GETTIME) && defined(DEBUG) struct timespec ts; @@ -390,21 +392,63 @@ show_time_host_and_name(int lvl) int debug_option(char *opt) { - return cmdoption(opt, dbg_opt, &debug_flags); + u_int dl = debug_flags; + static int initialized_debug_flags = 0; + int rc = cmdoption(opt, dbg_opt, &dl); + + if (rc) /* if got any error, don't update debug flags */ + return EINVAL; + + /* + * If we already initialized the debugging flags once (via amd.conf), then + * don't allow "immutable" flags to be changed again (via amq -D), because + * they could mess Amd's state and only make sense to be set once when Amd + * starts. + */ + if (initialized_debug_flags && + debug_flags != 0 && + (dl & D_IMMUTABLE) != (debug_flags & D_IMMUTABLE)) { + plog(XLOG_ERROR, "cannot change immutable debug flags"); + /* undo any attempted change to an immutable flag */ + dl = (dl & ~D_IMMUTABLE) | (debug_flags & D_IMMUTABLE); + } + initialized_debug_flags = 1; + debug_flags = dl; + + return rc; } void dplog(const char *fmt, ...) { +#ifdef HAVE_SIGACTION + sigset_t old, chld; +#else /* not HAVE_SIGACTION */ + int mask; +#endif /* not HAVE_SIGACTION */ va_list ap; +#ifdef HAVE_SIGACTION + sigemptyset(&chld); + sigaddset(&chld, SIGCHLD); +#else /* not HAVE_SIGACTION */ + mask = sigblock(sigmask(SIGCHLD)); +#endif /* not HAVE_SIGACTION */ + + sigprocmask(SIG_BLOCK, &chld, &old); if (!logfp) logfp = stderr; /* initialize before possible first use */ va_start(ap, fmt); real_plog(XLOG_DEBUG, fmt, ap); va_end(ap); + +#ifdef HAVE_SIGACTION + sigprocmask(SIG_SETMASK, &old, NULL); +#else /* not HAVE_SIGACTION */ + mask = sigblock(sigmask(SIGCHLD)); +#endif /* not HAVE_SIGACTION */ } #endif /* DEBUG */ @@ -412,14 +456,33 @@ dplog(const char *fmt, ...) void plog(int lvl, const char *fmt, ...) { +#ifdef HAVE_SIGACTION + sigset_t old, chld; +#else /* not HAVE_SIGACTION */ + int mask; +#endif /* not HAVE_SIGACTION */ va_list ap; +#ifdef HAVE_SIGACTION + sigemptyset(&chld); + sigaddset(&chld, SIGCHLD); + sigprocmask(SIG_BLOCK, &chld, &old); +#else /* not HAVE_SIGACTION */ + mask = sigblock(sigmask(SIGCHLD)); +#endif /* not HAVE_SIGACTION */ + if (!logfp) logfp = stderr; /* initialize before possible first use */ va_start(ap, fmt); real_plog(lvl, fmt, ap); va_end(ap); + +#ifdef HAVE_SIGACTION + sigprocmask(SIG_SETMASK, &old, NULL); +#else /* not HAVE_SIGACTION */ + sigsetmask(mask); +#endif /* not HAVE_SIGACTION */ } @@ -497,11 +560,11 @@ real_plog(int lvl, const char *fmt, va_list vargs) switch (last_count) { case 0: /* never printed at all */ last_count = 1; - if (strlcpy(last_msg, msg, 1024) >= 1024) /* don't use xstrlcpy here (recursive!) */ + if (strlcpy(last_msg, msg, sizeof(last_msg)) >= sizeof(last_msg)) /* don't use xstrlcpy here (recursive!) */ fprintf(stderr, "real_plog: string \"%s\" truncated to \"%s\"\n", last_msg, msg); last_lvl = lvl; show_time_host_and_name(lvl); /* mimic syslog header */ - fwrite(msg, ptr - msg, 1, logfp); + __IGNORE(fwrite(msg, ptr - msg, 1, logfp)); fflush(logfp); break; @@ -510,11 +573,11 @@ real_plog(int lvl, const char *fmt, va_list vargs) last_count++; } else { /* last msg printed once, new one differs */ /* last_count remains at 1 */ - if (strlcpy(last_msg, msg, 1024) >= 1024) /* don't use xstrlcpy here (recursive!) */ + if (strlcpy(last_msg, msg, sizeof(last_msg)) >= sizeof(last_msg)) /* don't use xstrlcpy here (recursive!) */ fprintf(stderr, "real_plog: string \"%s\" truncated to \"%s\"\n", last_msg, msg); last_lvl = lvl; show_time_host_and_name(lvl); /* mimic syslog header */ - fwrite(msg, ptr - msg, 1, logfp); + __IGNORE(fwrite(msg, ptr - msg, 1, logfp)); fflush(logfp); } break; @@ -527,7 +590,7 @@ real_plog(int lvl, const char *fmt, va_list vargs) show_time_host_and_name(last_lvl); xsnprintf(last_msg, sizeof(last_msg), "last message repeated %d times\n", last_count); - fwrite(last_msg, strlen(last_msg), 1, logfp); + __IGNORE(fwrite(last_msg, strlen(last_msg), 1, logfp)); fflush(logfp); last_count = 0; /* start from scratch */ break; @@ -539,13 +602,13 @@ real_plog(int lvl, const char *fmt, va_list vargs) show_time_host_and_name(last_lvl); xsnprintf(last_msg, sizeof(last_msg), "last message repeated %d times\n", last_count); - fwrite(last_msg, strlen(last_msg), 1, logfp); + __IGNORE(fwrite(last_msg, strlen(last_msg), 1, logfp)); if (strlcpy(last_msg, msg, 1024) >= 1024) /* don't use xstrlcpy here (recursive!) */ fprintf(stderr, "real_plog: string \"%s\" truncated to \"%s\"\n", last_msg, msg); last_count = 1; last_lvl = lvl; show_time_host_and_name(lvl); /* mimic syslog header */ - fwrite(msg, ptr - msg, 1, logfp); + __IGNORE(fwrite(msg, ptr - msg, 1, logfp)); fflush(logfp); } break; @@ -573,7 +636,7 @@ show_opts(int ch, struct opt_tab *opts) int -cmdoption(char *s, struct opt_tab *optb, int *flags) +cmdoption(char *s, struct opt_tab *optb, u_int *flags) { char *p = s; int errs = 0; @@ -581,7 +644,7 @@ cmdoption(char *s, struct opt_tab *optb, int *flags) while (p && *p) { int neg; char *opt; - struct opt_tab *dp, *dpn = 0; + struct opt_tab *dp, *dpn = NULL; s = p; p = strchr(p, ','); @@ -624,7 +687,7 @@ cmdoption(char *s, struct opt_tab *optb, int *flags) * This will log to stderr when parsing the command line * since any -l option will not yet have taken effect. */ - plog(XLOG_USER, "option \"%s\" not recognized", s); + plog(XLOG_ERROR, "option \"%s\" not recognized", s); errs++; } @@ -645,22 +708,22 @@ cmdoption(char *s, struct opt_tab *optb, int *flags) int switch_option(char *opt) { - int xl = xlog_level; + u_int xl = xlog_level; int rc = cmdoption(opt, xlog_opt, &xl); - if (rc) { - rc = EINVAL; - } else { - /* - * Keep track of initial log level, and - * don't allow options to be turned off. - */ - if (xlog_level_init == ~0) - xlog_level_init = xl; - else - xl |= xlog_level_init; - xlog_level = xl; + if (rc) /* if got any error, don't update flags */ + return EINVAL; + + /* + * Don't allow "mandatory" flags to be turned off, because + * we must always be able to report on flag re/setting errors. + */ + if ((xl & XLOG_MANDATORY) != XLOG_MANDATORY) { + plog(XLOG_ERROR, "cannot turn off mandatory logging options"); + xl |= XLOG_MANDATORY; } + if (xlog_level != xl) + xlog_level = xl; /* set new flags */ return rc; } @@ -801,7 +864,7 @@ switch_to_logfile(char *logfile, int old_umask, int truncate_log) } else { /* regular log file */ (void) umask(old_umask); if (truncate_log) - truncate(logfile, 0); + __IGNORE(truncate(logfile, 0)); new_logfp = fopen(logfile, "a"); umask(0); } @@ -834,7 +897,8 @@ switch_to_logfile(char *logfile, int old_umask, int truncate_log) void unregister_amq(void) { - if (!amuDebug(D_AMQ)) { + + if (amuDebug(D_AMQ)) { /* find which instance of amd to unregister */ u_long amd_prognum = get_amd_program_number(); @@ -875,7 +939,7 @@ going_down(int rc) /* return the rpc program number under which amd was used */ -int +u_long get_amd_program_number(void) { return amd_program_number; @@ -884,7 +948,7 @@ get_amd_program_number(void) /* set the rpc program number used for amd */ void -set_amd_program_number(int program) +set_amd_program_number(u_long program) { amd_program_number = program; } @@ -955,9 +1019,9 @@ amu_release_controlling_tty(void) close(fd); } return; -#endif /* not TIOCNOTTY */ - +#else plog(XLOG_ERROR, "unable to release controlling tty"); +#endif /* not TIOCNOTTY */ } @@ -1012,7 +1076,7 @@ mkdirs(char *path, int mode) /* * take a copy in case path is in readonly store */ - char *p2 = strdup(path); + char *p2 = xstrdup(path); char *sp = p2; struct stat stb; int error_so_far = 0; @@ -1056,7 +1120,7 @@ mkdirs(char *path, int mode) void rmdirs(char *dir) { - char *xdp = strdup(dir); + char *xdp = xstrdup(dir); char *dp; do { @@ -1089,3 +1153,15 @@ rmdirs(char *dir) XFREE(xdp); } + +/* + * Dup a string + */ +char * +xstrdup(const char *s) +{ + size_t len = strlen(s); + char *sp = xmalloc(len + 1); + memcpy(sp, s, len + 1); + return sp; +} diff --git a/ltmain.sh b/ltmain.sh new file mode 100755 index 00000000000..a356acafa45 --- /dev/null +++ b/ltmain.sh @@ -0,0 +1,9661 @@ + +# libtool (GNU libtool) 2.4.2 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . + +PROGRAM=libtool +PACKAGE=libtool +VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1" +TIMESTAMP="" +package_revision=1.3337 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL + +$lt_unset CDPATH + + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} + +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + done + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "$my_tmpdir" +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + echo + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. +func_help () +{ + $opt_debug + + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $opt_debug + + func_error "missing argument for $1." + exit_cmd=exit +} + + +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + +exit_cmd=: + + + + + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do + opt="$1" + shift + case $opt in + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) + opt_silent=false +func_append preserve_args " $opt" + ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" + shift + ;; + + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + + # Separate optargs to long options: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} + + + + +## ----------- ## +## Main. ## +## ----------- ## + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + + echo + $ECHO "Try \`$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps ; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + else + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + echo + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$absdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system can not link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + func_append verstring ":${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd1 in $cmds; do + IFS="$save_ifs" + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" + else + odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" + + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case "$opt_mode" in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + func_append rmfiles " $odir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/m4/GNUmakefile b/m4/GNUmakefile new file mode 100644 index 00000000000..de2457ae373 --- /dev/null +++ b/m4/GNUmakefile @@ -0,0 +1,155 @@ +# +# THIS MAKEFILE IS FOR am-utils maintainers only! +# +# GNUmakefile for remaking configuration files. +# +# Erez Zadok +# + +AUTOCONF=autoconf --localdir=./m4 ./m4/configure.in +AUTOHEADER=autoheader --localdir=./m4 ./m4/configure.in +#AUTOMAKE=./m4/automake --include-deps --amdir=./m4/amdir +#AUTOMAKE=automake --include-deps --no-intermediates --localdir=./m4 +#AUTOMAKE=automake --include-deps --localdir=./m4 +AUTOMAKE=automake --include-deps --altdir=./m4 +ACLOCAL=aclocal --altdir=./m4 +MK_ACLOCAL=./mk-aclocal + +CUTWARNMSG="warning: AC_TRY_RUN called without default to allow cross compilin" +CUTWARNMSG2="AC_OUTPUT_COMMANDS|autoupdate" +AMFILES=../Makefile.am $(wildcard ../*/Makefile.am) +INAMFILES=$(AMFILES:.am=.in) +ACFILES=$(wildcard macros/*.m4 macros/HEADER macros/TRAILER m4/aclocal.m4) + +LOG=/tmp/amu-${USER}.log + +TOPDIR=.. +VPATH= + +all: testdir ${TOPDIR}/configure config.h.in ${TOPDIR}/Makefile.in \ + GNUmakefile stamp-h.in + +config: all $(TOPDIR)/buildall aux_conf.h.in + (cd ${TOPDIR} && ./buildall -c) + +dconfig: all $(TOPDIR)/buildall aux_conf.h.in + (cd ${TOPDIR} && ./buildall -C) + +qconfig: all $(TOPDIR)/buildall aux_conf.h.in + (cd ${TOPDIR} && ./buildall -q) + +build: all $(TOPDIR)/buildall aux_conf.h.in + (cd ${TOPDIR} && ./buildall -b) + +world: all $(TOPDIR)/buildall aux_conf.h.in + (cd ${TOPDIR} && ./buildall) + +testdir: ${TOPDIR}/amd/amd.c + +${TOPDIR}/configure: configure.in aclocal.m4 + -(cd ${TOPDIR} && ${AUTOCONF} > configure.new 2> ${LOG}) + -@egrep -v ${CUTWARNMSG} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG} + @echo '############################################################' + @echo 'Checking for "AC_OUTPUT_COMMANDS" warnings:' + @echo ' (If you see any output, fix this when autoconf/automake are' + @echo ' back in sync in their CVS trees. -ezk, 2/10/00)' + -@egrep ${CUTWARNMSG2} ${LOG} + -@egrep -v ${CUTWARNMSG2} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG} + @echo '############################################################' + @if test -s ${LOG}; then cat ${LOG}; exit 2; fi + -mv ../configure ../configure.old + mv ../configure.new ../configure + rm -f ../configure.old + chmod a+rx $@ + +config.h.in: configure.in acconfig.h + -(cd ${TOPDIR} && ${AUTOHEADER} > ./m4/config.h.in 2> ${LOG}) + -@egrep -v ${CUTWARNMSG} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG} + @echo '############################################################' + @echo 'Checking for "AC_OUTPUT_COMMANDS" warnings:' + @echo ' (If you see any output, fix this when autoconf/automake are' + @echo ' back in sync in their CVS trees. -ezk, 2/10/00)' + -@egrep ${CUTWARNMSG2} ${LOG} + -@egrep -v ${CUTWARNMSG2} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG} + @echo '############################################################' + @if test -s ${LOG}; then cat ${LOG}; exit 2; fi + +${TOPDIR}/Makefile.in: ${AMFILES} configure.in aclocal.m4 + (cd ${TOPDIR} && ${AUTOMAKE}) + @rm -f ${LOG} + +aclocal.m4: ${ACFILES} configure.in + rm -f $@ + ${MK_ACLOCAL} > acinclude.m4 + (cd ${TOPDIR} && ${ACLOCAL}) + +stamp-h.in: ${AMFILES} config.h.in aclocal.m4 aux_conf.h.in + echo timestamp > $@ + +clean: + rm -f ${TOPDIR}/configure config.h.in $(INAMFILES) aclocal.m4 stamp.h.in + +############################################################################## +# maintainer rules to update autoconf/automake/libtool files distributed with +# am-utils. -Erez. + +P1s=/usr/share/automake +P2s=/usr/share/libtool +P1=/usr/local/gnu/lib/automake +P2=/usr/local/gnu/lib/libtool +P3=/misc/mirror/gnu/prep/config +P4=/misc/mirror/gnu/prep/GNUinfo +ICMD=./m4/copy-if-newbig +CPCMD=cp -p + +update: \ + config.guess \ + config.sub \ + doc/texinfo.tex +# depcomp \ +# install-sh \ +# ltconfig \ +# ltmain.sh \ +# mdate-sh \ +# missing \ +# mkinstalldirs \ + +config.guess:: $(P1s)*/config.guess + $(ICMD) $? $@ +config.guess:: $(P2s)/config.guess + $(ICMD) $? $@ +config.guess:: $(P3)/config.guess + $(ICMD) $? $@ + +config.sub:: $(P1s)*/config.sub + $(ICMD) $? $@ +config.sub:: $(P2s)/config.sub + $(ICMD) $? $@ +config.sub:: $(P3)/config.sub + $(ICMD) $? $@ + +depcomp:: $(P1)/depcomp + $(CPCMD) $? $@ + +install-sh: $(P1)/install-sh + $(CPCMD) $? $@ + +ltconfig: $(P2)/ltconfig + $(CPCMD) $? $@ + +ltmain.sh: $(P2)/ltmain.sh + $(CPCMD) $? $@ + +mdate-sh: $(P1)/mdate-sh + $(CPCMD) $? $@ + +missing: $(P1)/missing + $(CPCMD) $? $@ + +mkinstalldirs: $(P1)/mkinstalldirs + $(CPCMD) $? $@ + +doc/texinfo.tex: $(P4)/texinfo.tex + $(CPCMD) $? $@ + +############################################################################## diff --git a/m4/amdgrep b/m4/amdgrep new file mode 100755 index 00000000000..86dffbf791c --- /dev/null +++ b/m4/amdgrep @@ -0,0 +1,7 @@ +#!/bin/sh +exec egrep -n "$*" \ + [a-z]*/*.[hcyl] \ + conf/*/*.[hc] \ + Makefile.am \ + [a-z]*/Makefile.am \ + m4/macros/*.m4 diff --git a/m4/amindent b/m4/amindent new file mode 100755 index 00000000000..8c4f7fcdf02 --- /dev/null +++ b/m4/amindent @@ -0,0 +1,328 @@ +#!/bin/sh +# indent all am-utils files +if [ ! -f amd/amd.c ]; then + # maybe we are in a subdir + echo cd .. + cd .. +fi +if [ ! -f amd/amd.c ]; then + echo "please run $0 from the top level of the am-utils source tree" + exit 2 +fi + +# files=" +# */*.[hc] +# */*.h.in +# conf/*/*.[hc] +# OLD/*/*.[hc] +# " +#files="conf/*/*.[hc]" +files="specify_the_file.c" + +sunopts=" +-npro +-nbad +-bap +-bbb +-nbc +-br +-ncdb +-d0 +-di0 +-nei +-eei +-nfc1 +-i2 +-lp +-nsc +-TIntFuncPtr +-Tadd_fn +-Taddrlist +-Tam_node +-Tam_ops +-Tam_opts +-Tam_stats +-Tamq_mount_info +-Tamq_mount_info_list +-Tamq_mount_stats +-Tamq_mount_tree +-Tamq_mount_tree_list +-Tamq_mount_tree_p +-Tamq_opt +-Tamq_setopt +-Tamq_string +-Tattrstat +-Tauto_tree +-Tautomount +-Tcallout +-Tcreateargs +-Tdict +-Tdict_data +-Tdict_ent +-Tdirlist +-Tdiropargs +-Tdiropokres +-Tdiropres +-Tdirpath +-Tdisk_fs +-Tentry +-Tether_if +-Texportnode +-Texports +-Tfattr +-Tfh_cache +-Tfhandle +-Tfhandle_t +-Tfhstatus +-Tfilename +-Tfserver +-Tfsmount +-Tftype +-Tfwd_fun +-Tgid_t +-Tgroupnode +-Tgroups +-Thost +-Tioloc +-Tkv +-Tlinkargs +-Tmap_type +-Tmnt_map +-Tmntfs +-Tmntlist +-Tmount +-Tmountbody +-Tmountlist +-Tname +-Tnfs_fh +-Tnfs_private +-Tnfscookie +-Tnfspath +-Tnfsstat +-Tnfstime +-Tnfsx_mnt +-Tnsw_lookup +-Tnsw_switchconfig +-Topt_apply +-Tpid_t +-Tpjob +-Tqelem +-Treadargs +-Treaddirargs +-Treaddirres +-Treadlinkres +-Treadokres +-Treadres +-Trenameargs +-Trpc_forward +-Tsattr +-Tsattrargs +-Tserv_state +-Tstatfsokres +-Tstatfsres +-Tsymlinkargs +-Ttask_fun +-Ttime_t +-Ttime_type +-Tuid2home_t +-Tuid_t +-Tusername2uid_t +-Tvffserver +-Tvfmount_fs +-Tvfs_init +-Tvfs_match +-Tvfumount_fs +-Tvmount_fs +-Tvmounted +-Tvoidp +-Tvumount_fs +-Tvumounted +-Twriteargs +" + +gnuopts=" +-npro +-nbad +-bap +-sob +-fca +-nfc1 +-ncdb +-br +-ce +-ss +-npcs +-cs +-nbc +-psl +-lp +-sc +-T IntFuncPtr +-T add_fn +-T addrlist +-T am_node +-T am_ops +-T am_opts +-T am_stats +-T amq_mount_info +-T amq_mount_info_list +-T amq_mount_stats +-T amq_mount_tree +-T amq_mount_tree_list +-T amq_mount_tree_p +-T amq_opt +-T amq_setopt +-T amq_string +-T attrstat +-T auto_tree +-T automount +-T callout +-T createargs +-T dict +-T dict_data +-T dict_ent +-T dirlist +-T diropargs +-T diropokres +-T diropres +-T dirpath +-T disk_fs +-T entry +-T ether_if +-T exportnode +-T exports +-T fattr +-T fh_cache +-T fhandle +-T fhandle_t +-T fhstatus +-T filename +-T fserver +-T fsmount +-T ftype +-T fwd_fun +-T gid_t +-T groupnode +-T groups +-T host +-T ioloc +-T kv +-T linkargs +-T map_type +-T mnt_map +-T mntfs +-T mntlist +-T mount +-T mountbody +-T mountlist +-T name +-T nfs_fh +-T nfs_private +-T nfscookie +-T nfspath +-T nfsstat +-T nfstime +-T nfsx_mnt +-T nsw_lookup +-T nsw_switchconfig +-T opt_apply +-T pid_t +-T pjob +-T qelem +-T readargs +-T readdirargs +-T readdirres +-T readlinkres +-T readokres +-T readres +-T renameargs +-T rpc_forward +-T sattr +-T sattrargs +-T serv_state +-T statfsokres +-T statfsres +-T symlinkargs +-T task_fun +-T time_t +-T time_type +-T uid2home_t +-T uid_t +-T username2uid_t +-T vffserver +-T vfmount_fs +-T vfs_init +-T vfs_match +-T vfumount_fs +-T vmount_fs +-T vmounted +-T voidp +-T vumount_fs +-T vumounted +-T writeargs +" + + +#prefix=".C" + +# check args +if [ $# -lt 1 ]; then + echo "Usage: $0 <-g|-s> [files...]" + exit 1 +fi +if [ $1 = "-g" -o "$1" = "-s" ]; then + OPT=$1 + shift +else + echo "Usage: $0 <-g|-s> [files...]" + exit 1 +fi +# check if specified files to process +if [ $# -gt 0 ]; then + files="$*" +fi + +for i in ${files}; do + if [ ! -f $i ]; then + echo "No such file: $i" + continue + fi + + case $OPT in + + -g ) + icmd="/usr/local/gnu/bin/indent" + cmd="${icmd} $i -o $i$prefix $gnuopts" + showcmd="${icmd} $i -o $i$prefix" + + ;; + + -s ) + icmd="/opt/SUNWspro/bin/indent" + cmd="${icmd} $i $i$prefix $sunopts" + showcmd="${icmd} $i $i$prefix" + ;; + + * ) + echo "Usage: $0 <-g|-s>" + exit 1 + ;; + esac + + echo ${showcmd} + ${cmd} + if [ $? != 0 ]; then + echo Failed! + exit $? + fi + + # remove trailing spaces + cmd="./m4/rmtspc $i" + echo ${cmd} + ${cmd} + if [ $? != 0 ]; then + echo Failed! + exit $? + fi + +done diff --git a/m4/autopat b/m4/autopat new file mode 100755 index 00000000000..e0c3d36546e --- /dev/null +++ b/m4/autopat @@ -0,0 +1,36 @@ +#!/bin/bash -norc +# find patterns of cache entries to automatically remove from config.cache +# Used by am-utils developers. +# Erez Zadok +#set -x + +macdir="../m4/macros" + +# find the right directory +if [ ! -d $macdir ]; then + echo "Could not find $macdir directory." + exit 2 +fi + +# skip if no config.cache file +if [ ! -f config.cache ]; then + echo "Not in the A.cpu-company-system." + exit 2 +fi + +# look for files that changed vs. config.cache +pat="" +for i in ${macdir}/*.m4; do + if test $i -nt config.cache; then + n=`egrep '^ac_cv_' $i |sed 's/[^a-zA-Z0-9_].*//g'|sort|uniq` + if test -z "$n"; then + continue; + fi + if test -z "$pat"; then + pat="$n" + else + pat="$pat|$n" + fi + fi +done +echo "$pat" diff --git a/m4/chop-aclocal.pl b/m4/chop-aclocal.pl new file mode 100755 index 00000000000..2bf6b75f4c1 --- /dev/null +++ b/m4/chop-aclocal.pl @@ -0,0 +1,19 @@ +#!/bin/perl -w + +$seq = 1; +$file = ""; +$file = sprintf("tmp/%02d.m4", $seq); +open(FILE, ">$file") || die "cannot open \"$file\": $!"; +printf(STDOUT "FILE: $file\n"); +while (<>) { + if (/^$/) { + close(FILE); + $seq++; + $file = sprintf("tmp/%02d.m4", $seq); + open(FILE, ">$file") || die "cannot open \"$file\": $!"; + printf(STDOUT "FILE: $file\n"); + next; + } + printf FILE; +} +close(FILE); diff --git a/m4/copy-if-newbig b/m4/copy-if-newbig new file mode 100755 index 00000000000..3438c526356 --- /dev/null +++ b/m4/copy-if-newbig @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w +# copy a file if it is both newer and bigger in size +# if copying, first rename older file to .orig + +$src = $ARGV[0]; +$dst = $ARGV[1]; +# dev,ino,mode,nlink,uid,gid,rdev,size,atime,mtime,ctime,blksize,blocks +@srcstat = stat($src); +@dststat = stat($dst); + +$srcsize = $srcstat[7]; +$srcmtime = $srcstat[9]; +$dstsize = $dststat[7]; +$dstmtime = $dststat[9]; + +# copy if src file is bigger and newer +if ($srcsize > $dstsize && $srcmtime > $dstmtime) { + print "mv -f $dst $dst.orig\n"; + system("mv -f $dst $dst.orig"); + print "cp -p $src $dst\n"; + system("cp -p $src $dst"); + die "cp command failed" if ($? != 0); +} +# make sure dst file has newer timestamp +if ($srcmtime > $dstmtime) { + print "touch $dst\n"; + system("touch $dst"); +} +exit(0); diff --git a/m4/macros/HEADER b/m4/macros/HEADER new file mode 100644 index 00000000000..43e835e5988 --- /dev/null +++ b/m4/macros/HEADER @@ -0,0 +1,13 @@ +dnl aclocal.m4 file for am-utils-6.x +dnl Contains definitions for specialized GNU-autoconf macros. +dnl Author: Erez Zadok +dnl +dnl DO NOT EDIT DIRECTLY! Generated automatically by maintainers from +dnl m4/GNUmakefile! +dnl +dnl ###################################################################### +dnl UNCOMMENT THE NEXT FEW LINES FOR DEBUGGING CONFIGURE +dnl define([AC_CACHE_LOAD], )dnl +dnl define([AC_CACHE_SAVE], )dnl +dnl ====================================================================== + diff --git a/m4/macros/TRAILER b/m4/macros/TRAILER new file mode 100644 index 00000000000..0e77c3541b7 --- /dev/null +++ b/m4/macros/TRAILER @@ -0,0 +1,2 @@ +dnl ###################################################################### +dnl end of aclocal.m4 for am-utils-6.x diff --git a/m4/macros/c_void_p.m4 b/m4/macros/c_void_p.m4 new file mode 100644 index 00000000000..3977c9be86c --- /dev/null +++ b/m4/macros/c_void_p.m4 @@ -0,0 +1,22 @@ +dnl ###################################################################### +dnl check if compiler can handle "void *" +AC_DEFUN([AMU_C_VOID_P], +[ +AC_CACHE_CHECK(if compiler can handle void *, +ac_cv_c_void_p, +[ +# try to compile a program which uses void * +AC_TRY_COMPILE( +[ ], +[ +void *vp; +], ac_cv_c_void_p=yes, ac_cv_c_void_p=no) +]) +if test "$ac_cv_c_void_p" = yes +then + AC_DEFINE(voidp, void *) +else + AC_DEFINE(voidp, char *) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/cache_check_dynamic.m4 b/m4/macros/cache_check_dynamic.m4 new file mode 100644 index 00000000000..b8eb5989c65 --- /dev/null +++ b/m4/macros/cache_check_dynamic.m4 @@ -0,0 +1,26 @@ +dnl ###################################################################### +dnl New versions of the cache functions which also dynamically evaluate the +dnl cache-id field, so that it may contain shell variables to expand +dnl dynamically for the creation of $ac_cv_* variables on the fly. +dnl In addition, this function allows you to call COMMANDS which generate +dnl output on the command line, because it prints its own AC_MSG_CHECKING +dnl after COMMANDS are run. +dnl +dnl ====================================================================== +dnl AMU_CACHE_CHECK_DYNAMIC(MESSAGE, CACHE-ID, COMMANDS) +define(AMU_CACHE_CHECK_DYNAMIC, +[ +ac_tmp=`echo $2` +if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then + AC_MSG_CHECKING([$1]) + echo $ECHO_N "(cached) $ECHO_C" 1>&AS_MESSAGE_FD([]) +dnl XXX: for older autoconf versions +dnl echo $ac_n "(cached) $ac_c" 1>&AS_MESSAGE_FD([]) +else + $3 + AC_MSG_CHECKING([$1]) +fi +ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"` +AC_MSG_RESULT($ac_tmp_val) +]) +dnl ====================================================================== diff --git a/m4/macros/check_amu_fs.m4 b/m4/macros/check_amu_fs.m4 new file mode 100644 index 00000000000..fc31f9e2963 --- /dev/null +++ b/m4/macros/check_amu_fs.m4 @@ -0,0 +1,40 @@ +dnl ###################################################################### +dnl check if an automounter filesystem exists (it almost always does). +dnl Usage: AC_CHECK_AMU_FS(, , []) +dnl Print the message in , and declare HAVE_AMU_FS_ true. +dnl If is defined, then define this filesystem as tru only of the +dnl filesystem for is true. +AC_DEFUN([AMU_CHECK_AMU_FS], +[ +# store variable name of fs +ac_upcase_am_fs_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for $2 filesystem ($1), +ac_cv_am_fs_$1, +[ +# true by default +eval "ac_cv_am_fs_$1=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "$3" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_$1=no" + if test "`eval echo '$''{ac_cv_fs_'$3'}'`" = yes + then + eval "ac_cv_am_fs_$1=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_'$3'}'`" = yes + then + eval "ac_cv_am_fs_$1=yes" + fi +fi +]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'$1'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_autofs_style.m4 b/m4/macros/check_autofs_style.m4 new file mode 100644 index 00000000000..d94fd568542 --- /dev/null +++ b/m4/macros/check_autofs_style.m4 @@ -0,0 +1,35 @@ +dnl ###################################################################### +dnl check the autofs flavor +AC_DEFUN([AMU_CHECK_AUTOFS_STYLE], +[ +AC_CACHE_CHECK(autofs style, +ac_cv_autofs_style, +[ +# select the correct style to mount(2) a filesystem +case "${host_os}" in + solaris1* | solaris2.[[0-4]] ) + ac_cv_autofs_style=default ;; + solaris2.5* ) + ac_cv_autofs_style=solaris_v1 ;; + # Solaris 8+ uses the AutoFS V3/V4 protocols, but they are very similar + # to V2, so use one style for all. + solaris* ) + ac_cv_autofs_style=solaris_v2_v3 ;; + irix6* ) + ac_cv_autofs_style=solaris_v1 ;; + linux* ) + ac_cv_autofs_style=linux ;; + * ) + ac_cv_autofs_style=default ;; +esac +]) +# always make a link and include the file name, otherwise on systems where +# autofs support has not been ported yet check_fs_{headers, mntent}.m4 add +# ops_autofs.o to AMD_FS_OBJS, but there's no way to build it. +am_utils_link_files=${am_utils_link_files}amd/ops_autofs.c:conf/autofs/autofs_${ac_cv_autofs_style}.c" "amu_autofs_prot.h:conf/autofs/autofs_${ac_cv_autofs_style}.h" " + +# set headers in a macro for Makefile.am files to use (for dependencies) +AMU_AUTOFS_PROT_HEADER='${top_builddir}/'amu_autofs_prot.h +AC_SUBST(AMU_AUTOFS_PROT_HEADER) +]) +dnl ====================================================================== diff --git a/m4/macros/check_checkmount_style.m4 b/m4/macros/check_checkmount_style.m4 new file mode 100644 index 00000000000..404a3ecc800 --- /dev/null +++ b/m4/macros/check_checkmount_style.m4 @@ -0,0 +1,28 @@ +dnl ###################################################################### +dnl check style of fixmount check_mount() function +AC_DEFUN([AMU_CHECK_CHECKMOUNT_STYLE], +[ +AC_CACHE_CHECK(style of fixmount check_mount(), +ac_cv_style_checkmount, +[ +# select the correct style for unmounting filesystems +case "${host_os_name}" in + svr4* | sysv4* | solaris2* | sunos5* ) + ac_cv_style_checkmount=svr4 ;; + bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_style_checkmount=bsd44 ;; + aix* ) + ac_cv_style_checkmount=aix ;; + osf* ) + ac_cv_style_checkmount=osf ;; + ultrix* ) + ac_cv_style_checkmount=ultrix ;; + * ) + ac_cv_style_checkmount=default ;; +esac +]) +am_utils_checkmount_style_file="check_mount.c" +am_utils_link_files=${am_utils_link_files}fixmount/${am_utils_checkmount_style_file}:conf/checkmount/checkmount_${ac_cv_style_checkmount}.c" " + +]) +dnl ====================================================================== diff --git a/m4/macros/check_extern.m4 b/m4/macros/check_extern.m4 new file mode 100644 index 00000000000..b28dc9e903c --- /dev/null +++ b/m4/macros/check_extern.m4 @@ -0,0 +1,106 @@ +dnl ###################################################################### +dnl check for external definition for a function (not external variables) +dnl Usage AMU_CHECK_EXTERN(extern) +dnl Checks for external definition for "extern" that is delimited on the +dnl left and the right by a character that is not a valid symbol character. +dnl +dnl Note that $pattern below is very carefully crafted to match any system +dnl external definition, with __P posix prototypes, with or without an extern +dnl word, etc. Think twice before changing this. +AC_DEFUN([AMU_CHECK_EXTERN], +[ +# store variable name for external definition +ac_upcase_extern_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_EXTERN_$ac_upcase_extern_name +# check for cached value and set it if needed +AMU_CACHE_CHECK_DYNAMIC(external function definition for $1, +ac_cv_extern_$1, +[ +# the old pattern assumed that the complete external definition is on one +# line but on some systems it is split over several lines, so only match +# beginning of the extern definition including the opening parenthesis. +#pattern="(extern)?.*[^a-zA-Z0-9_]$1[^a-zA-Z0-9_]?.*\(.*\).*;" +pattern="(extern)?.*[[^a-zA-Z0-9_]]$1[[^a-zA-Z0-9_]]?.*\(" +AC_EGREP_CPP(${pattern}, +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_WAIT_H +# include +#endif /* HAVE_SYS_WAIT_H */ +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#if defined(_AIX) && defined(HAVE_SYS_VMOUNT_H) +# include +#endif /* defined(_AIX) && defined(HAVE_SYS_VMOUNT_H) */ + +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_STDLIB_H +# include +#endif /* HAVE_STDLIB_H */ +#if HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if HAVE_STRING_H +# include +#endif /* HAVE_STRING_H */ +#ifdef HAVE_STRINGS_H +# include +#endif /* HAVE_STRINGS_H */ +#ifdef HAVE_NETDB_H +# include +#endif /* HAVE_NETDB_H */ +#ifdef HAVE_CLUSTER_H +# include +#endif /* HAVE_CLUSTER_H */ +#ifdef HAVE_RPC_RPC_H +/* + * Turn on PORTMAP, so that additional header files would get included + * and the important definition for UDPMSGSIZE is included too. + */ +# ifndef PORTMAP +# define PORTMAP +# endif /* not PORTMAP */ +# include +# ifndef XDRPROC_T_TYPE +typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...)); +# endif /* not XDRPROC_T_TYPE */ +#endif /* HAVE_RPC_RPC_H */ + +#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) +# include +#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */ + +], eval "ac_cv_extern_$1=yes", eval "ac_cv_extern_$1=no") +]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_extern_'$1'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_EXTERN on each argument given +dnl Usage: AMU_CHECK_EXTERNS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_EXTERNS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_EXTERN($ac_tmp_arg) +done +]) +dnl ====================================================================== diff --git a/m4/macros/check_extern_ldap.m4 b/m4/macros/check_extern_ldap.m4 new file mode 100644 index 00000000000..ba4b2d7bc71 --- /dev/null +++ b/m4/macros/check_extern_ldap.m4 @@ -0,0 +1,99 @@ +dnl ###################################################################### +dnl check for external definition for an LDAP function (not external variables) +dnl Usage AMU_CHECK_EXTERN_LDAP(extern) +dnl Checks for external definition for "extern" that is delimited on the +dnl left and the right by a character that is not a valid symbol character. +dnl +dnl Note that $pattern below is very carefully crafted to match any system +dnl external definition, with __P posix prototypes, with or without an extern +dnl word, etc. Think twice before changing this. +AC_DEFUN([AMU_CHECK_EXTERN_LDAP], +[ +# store variable name for external definition +ac_upcase_extern_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_EXTERN_$ac_upcase_extern_name +# check for cached value and set it if needed +AMU_CACHE_CHECK_DYNAMIC(external function definition for $1, +ac_cv_extern_$1, +[ +# the old pattern assumed that the complete external definition is on one +# line but on some systems it is split over several lines, so only match +# beginning of the extern definition including the opening parenthesis. +#pattern="(extern)?.*[^a-zA-Z0-9_]$1[^a-zA-Z0-9_]?.*\(.*\).*;" +dnl This expression is a bit different than check_extern.m4 because of the +dnl way that openldap wrote their externs in . +pattern="(extern)?.*([[^a-zA-Z0-9_]])?$1[[^a-zA-Z0-9_]]?.*\(" +AC_EGREP_CPP(${pattern}, +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_WAIT_H +# include +#endif /* HAVE_SYS_WAIT_H */ +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_STDLIB_H +# include +#endif /* HAVE_STDLIB_H */ +#if HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#if HAVE_STRING_H +# include +#endif /* HAVE_STRING_H */ +#ifdef HAVE_STRINGS_H +# include +#endif /* HAVE_STRINGS_H */ +#ifdef HAVE_NETDB_H +# include +#endif /* HAVE_NETDB_H */ +#ifdef HAVE_CLUSTER_H +# include +#endif /* HAVE_CLUSTER_H */ +#ifdef HAVE_RPC_RPC_H +/* + * Turn on PORTMAP, so that additional header files would get included + * and the important definition for UDPMSGSIZE is included too. + */ +# ifndef PORTMAP +# define PORTMAP +# endif /* not PORTMAP */ +# include +# ifndef XDRPROC_T_TYPE +typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...)); +# endif /* not XDRPROC_T_TYPE */ +#endif /* HAVE_RPC_RPC_H */ + +#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) +# include +#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */ + +#ifdef HAVE_LDAP_H +# include +#endif /* HAVE_LDAP_H */ +#ifdef HAVE_LBER_H +# include +#endif /* HAVE_LBER_H */ + +], eval "ac_cv_extern_$1=yes", eval "ac_cv_extern_$1=no") +]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_extern_'$1'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_fhandle.m4 b/m4/macros/check_fhandle.m4 new file mode 100644 index 00000000000..f2a9c09e609 --- /dev/null +++ b/m4/macros/check_fhandle.m4 @@ -0,0 +1,25 @@ +dnl ###################################################################### +dnl Find if type 'fhandle' exists +AC_DEFUN([AMU_CHECK_FHANDLE], +[ +AC_CACHE_CHECK(if plain fhandle type exists, +ac_cv_have_fhandle, +[ +# try to compile a program which may have a definition for the type +# set to a default value +ac_cv_have_fhandle=no +# look for "struct nfs_fh" +if test "$ac_cv_have_fhandle" = no +then +AC_TRY_COMPILE_NFS( +[ fhandle a; +], ac_cv_have_fhandle=yes, ac_cv_have_fhandle=no) +fi + +]) +if test "$ac_cv_have_fhandle" != no +then + AC_DEFINE(HAVE_FHANDLE) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_field.m4 b/m4/macros/check_field.m4 new file mode 100644 index 00000000000..20010323ea4 --- /dev/null +++ b/m4/macros/check_field.m4 @@ -0,0 +1,113 @@ +dnl ###################################################################### +dnl FIXED VERSION OF AUTOCONF 2.59 AC_CHECK_MEMBER. g/cc will fail to check +dnl a member if the .member is itself a data structure, because you cannot +dnl compare, in C, a data structure against NULL; you can compare a native +dnl data type (int, char) or a pointer. Solution: do what I did in my +dnl original member checking macro: try to take the address of the member. +dnl You can always take the address of anything. +dnl -Erez Zadok, Feb 19, 2005. +dnl + +# AC_CHECK_MEMBER2(AGGREGATE.MEMBER, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], +# [INCLUDES]) +# --------------------------------------------------------- +# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell +# variables are not a valid argument. +AC_DEFUN([AC_CHECK_MEMBER2], +[AS_LITERAL_IF([$1], [], + [AC_FATAL([$0: requires literal arguments])])dnl +m4_bmatch([$1], [\.], , + [m4_fatal([$0: Did not see any dot in `$1'])])dnl +AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl +dnl Extract the aggregate name, and the member name +AC_CACHE_CHECK([for $1], ac_Member, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], +[dnl AGGREGATE ac_aggr; +static m4_bpatsubst([$1], [\..*]) ac_aggr; +dnl ac_aggr.MEMBER; +if (&(ac_aggr.m4_bpatsubst([$1], [^[^.]*\.]))) +return 0;])], + [AS_VAR_SET(ac_Member, yes)], +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], +[dnl AGGREGATE ac_aggr; +static m4_bpatsubst([$1], [\..*]) ac_aggr; +dnl sizeof ac_aggr.MEMBER; +if (sizeof ac_aggr.m4_bpatsubst([$1], [^[^.]*\.])) +return 0;])], + [AS_VAR_SET(ac_Member, yes)], + [AS_VAR_SET(ac_Member, no)])])]) +AS_IF([test AS_VAR_GET(ac_Member) = yes], [$2], [$3])dnl +AS_VAR_POPDEF([ac_Member])dnl +])# AC_CHECK_MEMBER + + +# AC_CHECK_MEMBERS2([AGGREGATE.MEMBER, ...], +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND] +# [INCLUDES]) +# --------------------------------------------------------- +# The first argument is an m4 list. +AC_DEFUN([AC_CHECK_MEMBERS2], +[m4_foreach([AC_Member], [$1], + [AC_CHECK_MEMBER2(AC_Member, + [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_Member), 1, + [Define to 1 if `]m4_bpatsubst(AC_Member, + [^[^.]*\.])[' is + member of `]m4_bpatsubst(AC_Member, [\..*])['.]) +$2], + [$3], + [$4])])]) + + + +dnl ###################################################################### +dnl find if structure $1 has field field $2 +AC_DEFUN([AMU_CHECK_FIELD], +[ +AC_CHECK_MEMBERS2($1, , ,[ +AMU_MOUNT_HEADERS( +[ +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# endif /* HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +/* + * for various filesystem specific mount arguments + */ + +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ + +#ifdef HAVE_IFADDRS_H +# include +#endif /* HAVE_IFADDRS_H */ + +]) +]) +]) +dnl ====================================================================== diff --git a/m4/macros/check_fs_headers.m4 b/m4/macros/check_fs_headers.m4 new file mode 100644 index 00000000000..9aa1a5ed536 --- /dev/null +++ b/m4/macros/check_fs_headers.m4 @@ -0,0 +1,53 @@ +dnl ###################################################################### +dnl check if a filesystem exists (if any of its header files exist). +dnl Usage: AC_CHECK_FS_HEADERS(..., , []) +dnl Check if any of the headers exist. If any exist, then +dnl define HAVE_FS_. If exits, then define +dnl HAVE_FS_ instead... +AC_DEFUN([AMU_CHECK_FS_HEADERS], +[ +# find what name to give to the fs +if test -n "$3" +then + ac_fs_name=$3 +else + ac_fs_name=$2 +fi +# store variable name of fs +ac_upcase_fs_name=`echo $2 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for $ac_fs_name filesystem in <$1>, +ac_cv_fs_header_$ac_fs_name, +[ +# define to "no" by default +eval "ac_cv_fs_header_$ac_fs_name=no" +# and look to see if it was found +AC_CHECK_HEADERS($1, +[ eval "ac_cv_fs_header_$ac_fs_name=yes" + break +])]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_fs_headers_safe) +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + AC_SUBST(AMD_FS_OBJS) + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4 new file mode 100644 index 00000000000..6146c7eee35 --- /dev/null +++ b/m4/macros/check_fs_mntent.m4 @@ -0,0 +1,191 @@ +dnl ###################################################################### +dnl check if a filesystem type exists (if its header files exist) +dnl Usage: AC_CHECK_FS_MNTENT(, []) +dnl +dnl Check in some headers for MNTTYPE_ macro. If that exist, +dnl then define HAVE_FS_. If exits, then define +dnl HAVE_FS_ instead... +AC_DEFUN([AMU_CHECK_FS_MNTENT], +[ +# find what name to give to the fs +if test -n "$2" +then + ac_fs_name=$2 + ac_fs_as_name=" (from: $1)" +else + ac_fs_name=$1 + ac_fs_as_name="" +fi +# store variable name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_FS_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for $ac_fs_name$ac_fs_as_name mntent definition, +ac_cv_fs_$ac_fs_name, +[ +# assume not found +eval "ac_cv_fs_$ac_fs_name=no" +for ac_fs_tmp in $1 +do + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + + # first look for MNTTYPE_* + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MOUNT_ macro + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for MNT_ macro + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # now try to look for GT_ macro (ultrix) + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[[^a-zA-Z0-9_]]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes" + then + # hack hack hack + # in 6.1, which has fallback to v2/udp, we might want + # to always use version 4. + # in 6.0 we do not have much choice + # + let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`" + if test $nfs_mount_version -ge 4 + then + eval "ac_cv_fs_$ac_fs_name=yes" + break + fi + fi + + # run a test program for bsdi3 + AC_TRY_RUN( + [ +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + ], [eval "ac_cv_fs_$ac_fs_name=yes" + break + ] + ) + +done +]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +# append ops_.o object to AMD_FS_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_FS_OBJS" + then + AMD_FS_OBJS="ops_${ac_fs_name}.o" + AC_SUBST(AMD_FS_OBJS) + else + # since this object file could have already been added before + # we need to ensure we do not add it twice. + case "${AMD_FS_OBJS}" in + *ops_${ac_fs_name}.o* ) ;; + * ) + AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o" + ;; + esac + fi +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_gnu_getopt.m4 b/m4/macros/check_gnu_getopt.m4 new file mode 100644 index 00000000000..7631532141f --- /dev/null +++ b/m4/macros/check_gnu_getopt.m4 @@ -0,0 +1,42 @@ +dnl ###################################################################### +dnl Do we have a GNUish getopt +AC_DEFUN([AMU_CHECK_GNU_GETOPT], +[ +AC_CACHE_CHECK([for GNU getopt], ac_cv_sys_gnu_getopt, [ +AC_TRY_RUN([ +#include +#include +int main() +{ + int argc = 3; + char *argv[] = { "actest", "arg", "-x", NULL }; + int c; + FILE* rf; + int isGNU = 0; + + rf = fopen("conftestresult", "w"); + if (rf == NULL) exit(1); + + while ( (c = getopt(argc, argv, "x")) != -1 ) { + switch ( c ) { + case 'x': + isGNU=1; + break; + default: + exit(1); + } + } + fprintf(rf, isGNU ? "yes" : "no"); + exit(0); +} +],[ +ac_cv_sys_gnu_getopt="`cat conftestresult`" +],[ +ac_cv_sys_gnu_getopt="fail" +]) +]) +if test "$ac_cv_sys_gnu_getopt" = "yes" +then + AC_DEFINE(HAVE_GNU_GETOPT) +fi +]) diff --git a/m4/macros/check_hide_mount_type.m4 b/m4/macros/check_hide_mount_type.m4 new file mode 100644 index 00000000000..89c6c4da438 --- /dev/null +++ b/m4/macros/check_hide_mount_type.m4 @@ -0,0 +1,31 @@ +dnl ###################################################################### +dnl Define mount type to hide amd mounts from df(1) +dnl +dnl This has to be determined individually per OS. Depending on whatever +dnl mount options are defined in the system header files such as +dnl MNTTYPE_IGNORE or MNTTYPE_AUTO, or others does not work: some OSs define +dnl some of these then use other stuff; some do not define them at all in +dnl the headers, but still use it; and more. After a long attempt to get +dnl this automatically configured, I came to the conclusion that the semi- +dnl automatic per-host-os determination here is the best. +dnl +AC_DEFUN([AMU_CHECK_HIDE_MOUNT_TYPE], +[ +AC_CACHE_CHECK(for mount type to hide from df, +ac_cv_hide_mount_type, +[ +case "${host_os}" in + irix* | hpux* ) + ac_cv_hide_mount_type="ignore" + ;; + sunos4* ) + ac_cv_hide_mount_type="auto" + ;; + * ) + ac_cv_hide_mount_type="nfs" + ;; +esac +]) +AC_DEFINE_UNQUOTED(HIDE_MOUNT_TYPE, "$ac_cv_hide_mount_type") +]) +dnl ====================================================================== diff --git a/m4/macros/check_lib2.m4 b/m4/macros/check_lib2.m4 new file mode 100644 index 00000000000..64e6bb5b710 --- /dev/null +++ b/m4/macros/check_lib2.m4 @@ -0,0 +1,66 @@ +dnl a bug-fixed version of autoconf 2.12. +dnl first try to link library without $5, and only of that failed, +dnl try with $5 if specified. +dnl it adds $5 to $LIBS if it was needed -Erez. +dnl AC_CHECK_LIB2(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, OTHER-LIBRARIES]]]) +AC_DEFUN([AMU_CHECK_LIB2], +[AC_MSG_CHECKING([for $2 in -l$1]) +dnl Use a cache variable name containing both the library and function name, +dnl because the test really is for library $1 defining function $2, not +dnl just for library $1. Separate tests with the same $1 and different $2s +dnl may have different results. +ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, +[ac_save_LIBS="$LIBS" + +# first try with base library, without auxiliary library +LIBS="-l$1 $LIBS" +AC_TRY_LINK(dnl +ifelse([$2], [main], , dnl Avoid conflicting decl of main. +[/* Override any gcc2 internal prototype to avoid an error. */ +] +[/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $2(); +]), + [$2()], + eval "ac_cv_lib_$ac_lib_var=\"$1\"", + eval "ac_cv_lib_$ac_lib_var=no") + +# if OK, set to no auxiliary library, else try auxiliary library +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = no"; then + LIBS="-l$1 $5 $LIBS" + AC_TRY_LINK(dnl + ifelse([$2], [main], , dnl Avoid conflicting decl of main. + [/* Override any gcc2 internal prototype to avoid an error. */ + ] + [/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $2(); + ]), + [$2()], + eval "ac_cv_lib_$ac_lib_var=\"$1 $5\"", + eval "ac_cv_lib_$ac_lib_var=no") +fi + +LIBS="$ac_save_LIBS" +])dnl +ac_tmp="`eval echo '$''{ac_cv_lib_'$ac_lib_var'}'`" +if test "${ac_tmp}" != no; then + AC_MSG_RESULT(-l$ac_tmp) + ifelse([$3], , +[ + ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[[^a-zA-Z0-9_]]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + + AC_DEFINE_UNQUOTED($ac_tr_lib) + LIBS="-l$ac_tmp $LIBS" +], [$3]) +else + AC_MSG_RESULT(no) +ifelse([$4], , , [$4 +])dnl +fi + +]) diff --git a/m4/macros/check_libwrap_severity.m4 b/m4/macros/check_libwrap_severity.m4 new file mode 100644 index 00000000000..955ba55ab9d --- /dev/null +++ b/m4/macros/check_libwrap_severity.m4 @@ -0,0 +1,41 @@ +dnl ###################################################################### +dnl check if libwrap (if exists), requires the caller to define the variables +dnl deny_severity and allow_severity. +AC_DEFUN([AMU_CHECK_LIBWRAP_SEVERITY], +[ +AC_CACHE_CHECK([if libwrap wants caller to define allow_severity and deny_severity], ac_cv_need_libwrap_severity_vars, [ +# save, then reset $LIBS back to original value +SAVEDLIBS="$LIBS" +LIBS="$LIBS -lwrap" +# run program one without defining our own severity variables +AC_TRY_RUN( +[ +int main() +{ + exit(0); +} +],[ac_tmp_val1="yes"],[ac_tmp_val1="no"]) +# run program two with defining our own severity variables +AC_TRY_RUN( +[ +int deny_severity, allow_severity, rfc931_timeout; +int main() +{ + exit(0); +} +],[ac_tmp_val2="yes"],[ac_tmp_val2="no"]) +# restore original value of $LIBS +LIBS="$SAVEDLIBS" +# now decide what to do +if test "$ac_tmp_val1" = "no" && test "$ac_tmp_val2" = "yes" +then + ac_cv_need_libwrap_severity_vars="yes" +else + ac_cv_need_libwrap_severity_vars="no" +fi +]) +if test "$ac_cv_need_libwrap_severity_vars" = "yes" +then + AC_DEFINE(NEED_LIBWRAP_SEVERITY_VARIABLES) +fi +]) diff --git a/m4/macros/check_map_funcs.m4 b/m4/macros/check_map_funcs.m4 new file mode 100644 index 00000000000..4e0dc879e5e --- /dev/null +++ b/m4/macros/check_map_funcs.m4 @@ -0,0 +1,47 @@ +dnl ###################################################################### +dnl check if a map exists (if some library function exists). +dnl Usage: AC_CHECK_MAP_FUNCS(..., , []) +dnl Check if any of the functions exist. If any exist, then +dnl define HAVE_MAP_. If exits, then defined +dnl HAVE_MAP_ instead... +AC_DEFUN([AMU_CHECK_MAP_FUNCS], +[ +# find what name to give to the map +if test -n "$3" +then + ac_map_name=$3 +else + ac_map_name=$2 +fi +# store variable name of map +ac_upcase_map_name=`echo $ac_map_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_MAP_$ac_upcase_map_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for $ac_map_name maps, +ac_cv_map_$ac_map_name, +[ +# define to "no" by default +eval "ac_cv_map_$ac_map_name=no" +# and look to see if it was found +AC_CHECK_FUNCS($1, +[ + eval "ac_cv_map_$ac_map_name=yes" + break +])]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +# append info_.o object to AMD_INFO_OBJS for automatic compilation +# if first time we add something to this list, then also tell autoconf +# to replace instances of it in Makefiles. + if test -z "$AMD_INFO_OBJS" + then + AMD_INFO_OBJS="info_${ac_map_name}.o" + AC_SUBST(AMD_INFO_OBJS) + else + AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o" + fi +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnt2_cdfs_opt.m4 b/m4/macros/check_mnt2_cdfs_opt.m4 new file mode 100644 index 00000000000..db90e467358 --- /dev/null +++ b/m4/macros/check_mnt2_cdfs_opt.m4 @@ -0,0 +1,92 @@ +dnl ###################################################################### +dnl Find CDFS-specific mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_CDFS_OPT() +dnl Check if there is an entry for MS_ or M_ in sys/mntent.h or +dnl mntent.h, then define MNT2_CDFS_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_CDFS_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_CDFS_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for CDFS-specific mount(2) option $ac_fs_name, +ac_cv_mnt2_cdfs_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=notfound" +value=notfound + +# first, try MS_* (most systems). Must be the first test! +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# if failed, try MNT_* (bsd44 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MNT_$ac_upcase_fs_name) +fi + +# if failed, try MS_* as an integer (linux systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_INT( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# If failed try M_* (must be last test since svr4 systems define M_DATA etc. +# in +# This test was off for now, because of the conflicts with other systems. +# but I turned it back on by faking the inclusion of already. +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ +AMU_MOUNT_HEADERS +, M_$ac_upcase_fs_name) +fi + +# if failed, try ISOFSMNT_* as a hex (bsdi4 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, ISOFSMNT_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_cdfs_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_CDFS_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_CDFS_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_CDFS_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_CDFS_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnt2_gen_opt.m4 b/m4/macros/check_mnt2_gen_opt.m4 new file mode 100644 index 00000000000..b9cc0d746bc --- /dev/null +++ b/m4/macros/check_mnt2_gen_opt.m4 @@ -0,0 +1,85 @@ +dnl ###################################################################### +dnl Find generic mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_GEN_OPT() +dnl Check if there is an entry for MS_, MNT_, or M_ +dnl (in that order) in mntent.h, sys/mntent.h, or mount.h... +dnl then define MNT2_GEN_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_GEN_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_GEN_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for generic mount(2) option $ac_fs_name, +ac_cv_mnt2_gen_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_gen_opt_$ac_fs_name=notfound" +value=notfound + +# first, try MS_* (most systems). Must be the first test! +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# if failed, try MNT_* (bsd44 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MNT_$ac_upcase_fs_name) +fi + +# if failed, try MS_* as an integer (linux systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_INT( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# If failed try M_* (must be last test since svr4 systems define M_DATA etc. +# in +# This test was off for now, because of the conflicts with other systems. +# but I turned it back on by faking the inclusion of already. +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ +AMU_MOUNT_HEADERS +, M_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_gen_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_gen_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_GEN_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_GEN_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_GEN_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_GEN_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnt2_nfs_opt.m4 b/m4/macros/check_mnt2_nfs_opt.m4 new file mode 100644 index 00000000000..23d8b974fa7 --- /dev/null +++ b/m4/macros/check_mnt2_nfs_opt.m4 @@ -0,0 +1,59 @@ +dnl ###################################################################### +dnl Find NFS-specific mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_NFS_OPT() +dnl Check if there is an entry for NFSMNT_ in sys/mntent.h or +dnl mntent.h, then define MNT2_NFS_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_NFS_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_NFS_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for NFS-specific mount(2) option $ac_fs_name, +ac_cv_mnt2_nfs_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=notfound" +value=notfound + +# first try NFSMNT_* (most systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, NFSMNT_$ac_upcase_fs_name) +fi + +# next try NFS_MOUNT_* (linux) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, NFS_MOUNT_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_nfs_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_NFS_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_NFS_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_NFS_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_NFS_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnt2_pcfs_opt.m4 b/m4/macros/check_mnt2_pcfs_opt.m4 new file mode 100644 index 00000000000..d1c3043a943 --- /dev/null +++ b/m4/macros/check_mnt2_pcfs_opt.m4 @@ -0,0 +1,92 @@ +dnl ###################################################################### +dnl Find PCFS-specific mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_PCFS_OPT() +dnl Check if there is an entry for MS_ or M_ in sys/mntent.h or +dnl mntent.h, then define MNT2_PCFS_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_PCFS_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_PCFS_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for PCFS-specific mount(2) option $ac_fs_name, +ac_cv_mnt2_pcfs_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_pcfs_opt_$ac_fs_name=notfound" +value=notfound + +# first, try MS_* (most systems). Must be the first test! +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# if failed, try MNT_* (bsd44 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MNT_$ac_upcase_fs_name) +fi + +# if failed, try MS_* as an integer (linux systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_INT( +AMU_MOUNT_HEADERS +, MS_$ac_upcase_fs_name) +fi + +# If failed try M_* (must be last test since svr4 systems define M_DATA etc. +# in +# This test was off for now, because of the conflicts with other systems. +# but I turned it back on by faking the inclusion of already. +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +#ifndef _sys_stream_h +# define _sys_stream_h +#endif /* not _sys_stream_h */ +#ifndef _SYS_STREAM_H +# define _SYS_STREAM_H +#endif /* not _SYS_STREAM_H */ +AMU_MOUNT_HEADERS +, M_$ac_upcase_fs_name) +fi + +# if failed, try MSDOSFSMNT_* as a hex (bsd44 systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, MSDOSFSMNT_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_pcfs_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_pcfs_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_PCFS_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_PCFS_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_PCFS_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_PCFS_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnt2_udf_opt.m4 b/m4/macros/check_mnt2_udf_opt.m4 new file mode 100644 index 00000000000..80e38113639 --- /dev/null +++ b/m4/macros/check_mnt2_udf_opt.m4 @@ -0,0 +1,53 @@ +dnl ###################################################################### +dnl Find UDF-specific mount(2) options (hex numbers) +dnl Usage: AMU_CHECK_MNT2_UDF_OPT() +dnl Check if there is an entry for MS_ or M_ in sys/mntent.h or +dnl mntent.h, then define MNT2_UDF_OPT_ to the hex number. +AC_DEFUN([AMU_CHECK_MNT2_UDF_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNT2_UDF_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for UDF-specific mount(2) option $ac_fs_name, +ac_cv_mnt2_udf_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnt2_udf_opt_$ac_fs_name=notfound" +value=notfound + +# XXX - tests for other systems need to be added here! + +# if failed, try UDFMNT_* as a hex (netbsd systems) +if test "$value" = notfound +then +AMU_EXPAND_CPP_HEX( +AMU_MOUNT_HEADERS +, UDFMNT_$ac_upcase_fs_name) +fi + +# set cache variable to value +eval "ac_cv_mnt2_udf_opt_$ac_fs_name=$value" +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnt2_udf_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNT2_UDF_OPT on each argument given +dnl Usage: AMU_CHECK_MNT2_UDF_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNT2_UDF_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNT2_UDF_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnttab_file_name.m4 b/m4/macros/check_mnttab_file_name.m4 new file mode 100644 index 00000000000..0d81e7f55d4 --- /dev/null +++ b/m4/macros/check_mnttab_file_name.m4 @@ -0,0 +1,57 @@ +dnl ###################################################################### +dnl Find name of mount table file, and define it as MNTTAB_FILE_NAME +dnl +dnl Solaris defines MNTTAB as /etc/mnttab, the file where /sbin/mount +dnl stores its cache of mounted filesystems. But under SunOS, the same +dnl macro MNTTAB, is defined as the _source_ of filesystems to mount, and +dnl is set to /etc/fstab. That is why I have to first check out +dnl if MOUNTED exists, and if not, check for the MNTTAB macro. +dnl +AC_DEFUN([AMU_CHECK_MNTTAB_FILE_NAME], +[ +AC_CACHE_CHECK(for name of mount table file name, +ac_cv_mnttab_file_name, +[ +# expand cpp value for MNTTAB +AMU_EXPAND_CPP_STRING( +AMU_MOUNT_HEADERS( +[ +/* see M4 comment at the top of the definition of this macro */ +#ifdef MOUNTED +# define _MNTTAB_FILE_NAME MOUNTED +# else /* not MOUNTED */ +# ifdef MNTTAB +# define _MNTTAB_FILE_NAME MNTTAB +# endif /* MNTTAB */ +#endif /* not MOUNTED */ +]), +_MNTTAB_FILE_NAME, +[ ac_cv_mnttab_file_name=$value +], +[ +ac_cv_mnttab_file_name=notfound +# check explicitly for /etc/mnttab +if test "$ac_cv_mnttab_file_name" = notfound +then + if test -f /etc/mnttab + then + ac_cv_mnttab_file_name="/etc/mnttab" + fi +fi +# check explicitly for /etc/mtab +if test "$ac_cv_mnttab_file_name" = notfound +then + if test -f /etc/mtab + then + ac_cv_mnttab_file_name="/etc/mtab" + fi +fi +]) +]) +# test value and create macro as needed +if test "$ac_cv_mnttab_file_name" != notfound +then + AC_DEFINE_UNQUOTED(MNTTAB_FILE_NAME, "$ac_cv_mnttab_file_name") +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnttab_location.m4 b/m4/macros/check_mnttab_location.m4 new file mode 100644 index 00000000000..616cf2753f3 --- /dev/null +++ b/m4/macros/check_mnttab_location.m4 @@ -0,0 +1,26 @@ +dnl ###################################################################### +dnl check if the mount table is kept in a file or in the kernel. +AC_DEFUN([AMU_CHECK_MNTTAB_LOCATION], +[ +AMU_CACHE_CHECK_DYNAMIC(where mount table is kept, +ac_cv_mnttab_location, +[ +# assume location is on file +ac_cv_mnttab_location=file +AC_CHECK_FUNCS(mntctl getmntinfo getmountent, +ac_cv_mnttab_location=kernel) +# Solaris 8 Beta Refresh and up use the mntfs pseudo filesystem to store the +# mount table in kernel (cf. mnttab(4): the MS_NOMNTTAB option in +# inhibits that a mount shows up there and thus can be used to +# check for the in-kernel mount table +if test "$ac_cv_mnt2_gen_opt_nomnttab" != notfound +then + ac_cv_mnttab_location=kernel +fi +]) +if test "$ac_cv_mnttab_location" = file +then + AC_DEFINE(MOUNT_TABLE_ON_FILE) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnttab_opt.m4 b/m4/macros/check_mnttab_opt.m4 new file mode 100644 index 00000000000..97bdd7c85f8 --- /dev/null +++ b/m4/macros/check_mnttab_opt.m4 @@ -0,0 +1,52 @@ +dnl ###################################################################### +dnl check the string type of the name of a filesystem mount table entry +dnl option. +dnl Usage: AMU_CHECK_MNTTAB_OPT() +dnl Check if there is an entry for MNTOPT_ in sys/mntent.h or mntent.h +dnl define MNTTAB_OPT_ to the string name (e.g., "ro"). +AC_DEFUN([AMU_CHECK_MNTTAB_OPT], +[ +# what name to give to the fs +ac_fs_name=$1 +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_OPT_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for mount table option $ac_fs_name, +ac_cv_mnttab_opt_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnttab_opt_$ac_fs_name=notfound" +# and look to see if it was found +AMU_EXPAND_CPP_STRING( +AMU_MOUNT_HEADERS +, MNTOPT_$ac_upcase_fs_name) +# set cache variable to value +if test "${value}" != notfound +then + eval "ac_cv_mnttab_opt_$ac_fs_name=\\\"$value\\\"" +else + eval "ac_cv_mnttab_opt_$ac_fs_name=$value" +fi +dnl DO NOT CHECK FOR MNT_* b/c bsd44 systems don't use /etc/mnttab, +]) +# outside cache check, if ok, define macro +ac_tmp=`eval echo '$''{ac_cv_mnttab_opt_'$ac_fs_name'}'` +if test "${ac_tmp}" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== + +dnl ###################################################################### +dnl run AMU_CHECK_MNTTAB_OPT on each argument given +dnl Usage: AMU_CHECK_MNTTAB_OPTS(arg arg arg ...) +AC_DEFUN([AMU_CHECK_MNTTAB_OPTS], +[ +for ac_tmp_arg in $1 +do +AMU_CHECK_MNTTAB_OPT($ac_tmp_arg) +done +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnttab_style.m4 b/m4/macros/check_mnttab_style.m4 new file mode 100644 index 00000000000..12e4602a983 --- /dev/null +++ b/m4/macros/check_mnttab_style.m4 @@ -0,0 +1,35 @@ +dnl ###################################################################### +dnl check style of accessing the mount table file +AC_DEFUN([AMU_CHECK_MNTTAB_STYLE], +[ +AC_CACHE_CHECK(mount table style, +ac_cv_style_mnttab, +[ +# select the correct style for mount table manipulation functions +case "${host_os_name}" in + aix* ) + ac_cv_style_mnttab=aix ;; + bsd* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_style_mnttab=bsd ;; + isc3* ) + ac_cv_style_mnttab=isc3 ;; + mach3* ) + ac_cv_style_mnttab=mach3 ;; + osf* ) + ac_cv_style_mnttab=osf ;; + svr4* | sysv4* | solaris2* | sunos5* | aoi* ) + ac_cv_style_mnttab=svr4 ;; + ultrix* ) + ac_cv_style_mnttab=ultrix ;; + linux*) + ac_cv_style_mnttab=linux ;; + * ) + ac_cv_style_mnttab=file ;; +esac +]) +am_utils_link_files=${am_utils_link_files}libamu/mtabutil.c:conf/mtab/mtab_${ac_cv_style_mnttab}.c" " + +# append mtab utilities object to LIBOBJS for automatic compilation +AC_LIBOBJ(mtabutil) +]) +dnl ====================================================================== diff --git a/m4/macros/check_mnttab_type.m4 b/m4/macros/check_mnttab_type.m4 new file mode 100644 index 00000000000..61e1c01b99a --- /dev/null +++ b/m4/macros/check_mnttab_type.m4 @@ -0,0 +1,179 @@ +dnl ###################################################################### +dnl check the string type of the name of a filesystem mount table entry. +dnl Usage: AC_CHECK_MNTTAB_TYPE(, [fssymbol]) +dnl Check if there is an entry for MNTTYPE_ in sys/mntent.h and mntent.h +dnl define MNTTAB_TYPE_ to the string name (e.g., "nfs"). If +dnl exist, then define MNTTAB_TYPE_ instead. If is +dnl defined, then can be a list of fs strings to look for. +dnl If no symbols have been defined, but the filesystem has been found +dnl earlier, then set the mount-table type to "" anyway... +AC_DEFUN([AMU_CHECK_MNTTAB_TYPE], +[ +# find what name to give to the fs +if test -n "$2" +then + ac_fs_name=$2 +else + ac_fs_name=$1 +fi +# store variable name of fs +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for mnttab name for $ac_fs_name filesystem, +ac_cv_mnttab_type_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mnttab_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in $1 +do + if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\"" + break + fi + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_* + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + ]), + [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + ]) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # next look for statically compiled filesystem (linux) + if egrep "[[^a-zA-Z0-9_]]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # then try to run a program that derefences a static array (bsd44) + AMU_EXPAND_RUN_STRING( + AMU_MOUNT_HEADERS( + [ +#ifndef INITMOUNTNAMES +# error INITMOUNTNAMES not defined +#endif /* not INITMOUNTNAMES */ + ]), + [ + char const *namelist[] = INITMOUNTNAMES; + if (argc > 1) + printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]); + ], [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + ]) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # then run a test program for bsdi3, tru64, and others + AC_TRY_RUN( + [ +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + ], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + ] + ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + AMU_EXPAND_RUN_STRING( + AMU_MOUNT_HEADERS( + [ + ]), + [ + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + ], [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + ]) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + +done + +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\"" + fi +fi +]) +# check if need to define variable +ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'` +if test "$ac_tmp" != notfound +then + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_mount_style.m4 b/m4/macros/check_mount_style.m4 new file mode 100644 index 00000000000..e34f943494d --- /dev/null +++ b/m4/macros/check_mount_style.m4 @@ -0,0 +1,44 @@ +dnl ###################################################################### +dnl check style of mounting filesystems +AC_DEFUN([AMU_CHECK_MOUNT_STYLE], +[ +AC_CACHE_CHECK(style of mounting filesystems, +ac_cv_style_mount, +[ +# select the correct style for mounting filesystems +case "${host_os_name}" in + solaris1* | sunos[[34]]* | bsdi[[12]]* ) + ac_cv_style_mount=default ;; + hpux[[6-9]]* | hpux10* ) + ac_cv_style_mount=hpux ;; + svr4* | sysv4* | solaris* | sunos* | aoi* | hpux* ) + ac_cv_style_mount=svr4 ;; + bsdi* ) + ac_cv_style_mount=bsdi3 ;; + aix3* | aix4* ) + ac_cv_style_mount=aix3 ;; + aix* ) + ac_cv_style_mount=aix ;; + irix5* ) + ac_cv_style_mount=irix5 ;; + irix* ) + ac_cv_style_mount=irix6 ;; + isc3* ) + ac_cv_style_mount=isc3 ;; + linux* ) + ac_cv_style_mount=linux ;; + mach3* ) + ac_cv_style_mount=mach3 ;; + stellix* ) + ac_cv_style_mount=stellix ;; + * ) # no style needed. Use default filesystem calls ala BSD + ac_cv_style_mount=default ;; +esac +]) +am_utils_mount_style_file="mountutil.c" +am_utils_link_files=${am_utils_link_files}libamu/${am_utils_mount_style_file}:conf/mount/mount_${ac_cv_style_mount}.c" " + +# append mount utilities object to LIBOBJS for automatic compilation +AC_LIBOBJ(mountutil) +]) +dnl ====================================================================== diff --git a/m4/macros/check_mount_trap.m4 b/m4/macros/check_mount_trap.m4 new file mode 100644 index 00000000000..7c90c5b1336 --- /dev/null +++ b/m4/macros/check_mount_trap.m4 @@ -0,0 +1,49 @@ +dnl ###################################################################### +dnl check the mount system call trap needed to mount(2) a filesystem +AC_DEFUN([AMU_CHECK_MOUNT_TRAP], +[ +AC_CACHE_CHECK(mount trap system-call style, +ac_cv_mount_trap, +[ +# select the correct style to mount(2) a filesystem +case "${host_os_name}" in + solaris1* | sunos[[34]]* ) + ac_cv_mount_trap=default ;; + hpux[[6-9]]* | hpux10* ) + ac_cv_mount_trap=hpux ;; + svr4* | sysv4* | solaris* | sunos* | aoi* | hpux* ) + ac_cv_mount_trap=svr4 ;; + news4* | riscix* ) + ac_cv_mount_trap=news4 ;; + linux* ) + ac_cv_mount_trap=linux ;; + irix* ) + ac_cv_mount_trap=irix ;; + aux* ) + ac_cv_mount_trap=aux ;; + hcx* ) + ac_cv_mount_trap=hcx ;; + rtu6* ) + ac_cv_mount_trap=rtu6 ;; + dgux* ) + ac_cv_mount_trap=dgux ;; + aix* ) + ac_cv_mount_trap=aix3 ;; + mach2* | mach3* ) + ac_cv_mount_trap=mach3 ;; + ultrix* ) + ac_cv_mount_trap=ultrix ;; + isc3* ) + ac_cv_mount_trap=isc3 ;; + stellix* ) + ac_cv_mount_trap=stellix ;; + netbsd* ) + ac_cv_mount_trap=netbsd ;; + * ) + ac_cv_mount_trap=default ;; +esac +]) +am_utils_mount_trap=$srcdir"/conf/trap/trap_"$ac_cv_mount_trap".h" +AC_SUBST_FILE(am_utils_mount_trap) +]) +dnl ====================================================================== diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4 new file mode 100644 index 00000000000..9b08def707b --- /dev/null +++ b/m4/macros/check_mount_type.m4 @@ -0,0 +1,179 @@ +dnl ###################################################################### +dnl check the string type of the name of a filesystem mount table entry. +dnl Usage: AC_CHECK_MOUNT_TYPE(, [fssymbol]) +dnl Check if there is an entry for MNTTYPE_ in sys/mntent.h and mntent.h +dnl define MOUNT_TYPE_ to the string name (e.g., "nfs"). If +dnl exist, then define MOUNT_TYPE_ instead. If is +dnl defined, then can be a list of fs strings to look for. +dnl If no symbols have been defined, but the filesystem has been found +dnl earlier, then set the mount-table type to "" anyway... +AC_DEFUN([AMU_CHECK_MOUNT_TYPE], +[ +# find what name to give to the fs +if test -n "$2" +then + ac_fs_name=$2 +else + ac_fs_name=$1 +fi +# prepare upper-case name of filesystem +ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +############################################################################## +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for mount(2) type/name for $ac_fs_name filesystem, +ac_cv_mount_type_$ac_fs_name, +[ +# undefine by default +eval "ac_cv_mount_type_$ac_fs_name=notfound" +# and look to see if it was found +for ac_fs_tmp in $1 +do + + ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` + + # first look for MNTTYPE_ + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNTTYPE_$ac_upcase_fs_symbol + yes +#endif /* MNTTYPE_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol"], + [eval "ac_cv_mount_type_$ac_fs_name=notfound"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MOUNT_ + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MOUNT_$ac_upcase_fs_symbol + yes +#endif /* MOUNT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol"], + [eval "ac_cv_mount_type_$ac_fs_name=notfound"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for MNT_ + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef MNT_$ac_upcase_fs_symbol + yes +#endif /* MNT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol"], + [eval "ac_cv_mount_type_$ac_fs_name=notfound"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # next look for GT_ (ultrix) + AC_EGREP_CPP(yes, + AMU_MOUNT_HEADERS( + [ +#ifdef GT_$ac_upcase_fs_symbol + yes +#endif /* GT_$ac_upcase_fs_symbol */ + ]), [eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol"], + [eval "ac_cv_mount_type_$ac_fs_name=notfound"] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # look for a loadable filesystem module (linux) + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux 2.4+) + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # look for a loadable filesystem module (linux redhat-5.1) + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.ko + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # in addition look for statically compiled filesystem (linux) + if egrep "[[^a-zA-Z0-9_]]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1 + then + eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + fi + + # run a test program for bsdi3 + AC_TRY_RUN( + [ +#include +#include +main() +{ + int i; + struct vfsconf vf; + i = getvfsbyname("$ac_fs_tmp", &vf); + if (i < 0) + exit(1); + else + exit(0); +} + ], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + break + ] + ) + +done +# check if not defined, yet the filesystem is defined +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound +then +# this should test if $ac_cv_fs_ is "yes" + if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes || + test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes + then + eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name" + fi +fi +]) +# end of cache check for ac_cv_mount_type_$ac_fs_name +############################################################################## +# check if need to define variable +if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound +then + ac_safe=MOUNT_TYPE_$ac_upcase_fs_name + ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'` + AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_mtype_printf_type.m4 b/m4/macros/check_mtype_printf_type.m4 new file mode 100644 index 00000000000..3cd5d717820 --- /dev/null +++ b/m4/macros/check_mtype_printf_type.m4 @@ -0,0 +1,22 @@ +dnl ###################################################################### +dnl check the correct printf-style type for the mount type in the mount() +dnl system call. +dnl If you change this one, you must also fix the check_mtype_type.m4. +AC_DEFUN([AMU_CHECK_MTYPE_PRINTF_TYPE], +[ +AC_CACHE_CHECK(printf string to print type field of mount() call, +ac_cv_mtype_printf_type, +[ +# select the correct printf type +case "${host_os_name}" in + osf* | freebsd2* | bsdi2* | aix* | ultrix* ) + ac_cv_mtype_printf_type="%d" ;; + irix3 | isc3 ) + ac_cv_mtype_printf_type="0x%x" ;; + * ) + ac_cv_mtype_printf_type="%s" ;; +esac +]) +AC_DEFINE_UNQUOTED(MTYPE_PRINTF_TYPE, "$ac_cv_mtype_printf_type") +]) +dnl ====================================================================== diff --git a/m4/macros/check_mtype_type.m4 b/m4/macros/check_mtype_type.m4 new file mode 100644 index 00000000000..8ef2f50ef0a --- /dev/null +++ b/m4/macros/check_mtype_type.m4 @@ -0,0 +1,19 @@ +dnl ###################################################################### +dnl check the correct type for the mount type in the mount() system call +dnl If you change this one, you must also fix the check_mtype_printf_type.m4. +AC_DEFUN([AMU_CHECK_MTYPE_TYPE], +[ +AC_CACHE_CHECK(type of mount type field in mount() call, +ac_cv_mtype_type, +[ +# select the correct type +case "${host_os_name}" in + osf* | freebsd2* | bsdi2* | aix* | ultrix* ) + ac_cv_mtype_type=int ;; + * ) + ac_cv_mtype_type="char *" ;; +esac +]) +AC_DEFINE_UNQUOTED(MTYPE_TYPE, $ac_cv_mtype_type) +]) +dnl ====================================================================== diff --git a/m4/macros/check_network_transport_type.m4 b/m4/macros/check_network_transport_type.m4 new file mode 100644 index 00000000000..9f9de5776df --- /dev/null +++ b/m4/macros/check_network_transport_type.m4 @@ -0,0 +1,27 @@ +dnl ###################################################################### +dnl check the correct network transport type to use +AC_DEFUN([AMU_CHECK_NETWORK_TRANSPORT_TYPE], +[ +AC_CACHE_CHECK(network transport type, +ac_cv_transport_type, +[ +# select the correct type +case "${host_os_name}" in + solaris1* | sunos[[34]]* | hpux[[6-9]]* | hpux10* ) + ac_cv_transport_type=sockets ;; + solaris* | sunos* | hpux* ) + ac_cv_transport_type=tli ;; + * ) + ac_cv_transport_type=sockets ;; +esac +]) +am_utils_link_files=${am_utils_link_files}libamu/transputil.c:conf/transp/transp_${ac_cv_transport_type}.c" " + +# append transport utilities object to LIBOBJS for automatic compilation +AC_LIBOBJ(transputil) +if test $ac_cv_transport_type = tli +then + AC_DEFINE(HAVE_TRANSPORT_TYPE_TLI) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_nfs_fh_dref.m4 b/m4/macros/check_nfs_fh_dref.m4 new file mode 100644 index 00000000000..6ef0ab4fbb6 --- /dev/null +++ b/m4/macros/check_nfs_fh_dref.m4 @@ -0,0 +1,47 @@ +dnl ###################################################################### +dnl check the correct way to dereference the address part of the nfs fhandle +AC_DEFUN([AMU_CHECK_NFS_FH_DREF], +[ +AC_CACHE_CHECK(nfs file-handle address dereferencing style, +ac_cv_nfs_fh_dref_style, +[ +# select the correct nfs address dereferencing style +case "${host_os}" in + hpux[[6-9]]* | hpux10* ) + ac_cv_nfs_fh_dref_style=hpux ;; + sunos3* ) + ac_cv_nfs_fh_dref_style=sunos3 ;; + sunos4* | solaris1* ) + ac_cv_nfs_fh_dref_style=sunos4 ;; + svr4* | sysv4* | solaris* | sunos* | hpux* ) + ac_cv_nfs_fh_dref_style=svr4 ;; + bsd44* | bsdi2* | freebsd2.[[01]]* ) + ac_cv_nfs_fh_dref_style=bsd44 ;; + # all new BSDs changed the type of the + # filehandle in nfs_args from nfsv2fh_t to u_char. + freebsd* | freebsdelf* | bsdi* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_nfs_fh_dref_style=freebsd22 ;; + aix[[1-3]]* | aix4.[[01]]* ) + ac_cv_nfs_fh_dref_style=aix3 ;; + aix* ) + ac_cv_nfs_fh_dref_style=aix42 ;; + irix* ) + ac_cv_nfs_fh_dref_style=irix ;; + linux* ) + ac_cv_nfs_fh_dref_style=linux ;; + isc3 ) + ac_cv_nfs_fh_dref_style=isc3 ;; + osf[[1-3]]* ) + ac_cv_nfs_fh_dref_style=osf2 ;; + osf* ) + ac_cv_nfs_fh_dref_style=osf4 ;; + nextstep* ) + ac_cv_nfs_fh_dref_style=nextstep ;; + * ) + ac_cv_nfs_fh_dref_style=default ;; +esac +]) +am_utils_nfs_fh_dref=$srcdir"/conf/fh_dref/fh_dref_"$ac_cv_nfs_fh_dref_style".h" +AC_SUBST_FILE(am_utils_nfs_fh_dref) +]) +dnl ====================================================================== diff --git a/m4/macros/check_nfs_hn_dref.m4 b/m4/macros/check_nfs_hn_dref.m4 new file mode 100644 index 00000000000..9ed2695d264 --- /dev/null +++ b/m4/macros/check_nfs_hn_dref.m4 @@ -0,0 +1,21 @@ +dnl ###################################################################### +dnl check the correct way to dereference the hostname part of the nfs fhandle +AC_DEFUN([AMU_CHECK_NFS_HN_DREF], +[ +AC_CACHE_CHECK(nfs hostname dereferencing style, +ac_cv_nfs_hn_dref_style, +[ +# select the correct nfs address dereferencing style +case "${host_os_name}" in + linux* ) + ac_cv_nfs_hn_dref_style=linux ;; + isc3 ) + ac_cv_nfs_hn_dref_style=isc3 ;; + * ) + ac_cv_nfs_hn_dref_style=default ;; +esac +]) +am_utils_nfs_hn_dref=$srcdir"/conf/hn_dref/hn_dref_"$ac_cv_nfs_hn_dref_style".h" +AC_SUBST_FILE(am_utils_nfs_hn_dref) +]) +dnl ====================================================================== diff --git a/m4/macros/check_nfs_prot_headers.m4 b/m4/macros/check_nfs_prot_headers.m4 new file mode 100644 index 00000000000..36b2c394729 --- /dev/null +++ b/m4/macros/check_nfs_prot_headers.m4 @@ -0,0 +1,96 @@ +dnl ###################################################################### +dnl check if system has NFS protocol headers +AC_DEFUN([AMU_CHECK_NFS_PROT_HEADERS], +[ +AC_CACHE_CHECK(location of NFS protocol header files, +ac_cv_nfs_prot_headers, +[ +# select the correct style for mounting filesystems +case "${host_os}" in + irix5* ) + ac_cv_nfs_prot_headers=irix5 ;; + irix* ) + ac_cv_nfs_prot_headers=irix6 ;; + sunos3* ) + ac_cv_nfs_prot_headers=sunos3 ;; + sunos4* | solaris1* ) + ac_cv_nfs_prot_headers=sunos4 ;; + sunos5.[[0-3]] | solaris2.[[0-3]] ) + ac_cv_nfs_prot_headers=sunos5_3 ;; + sunos5.4* | solaris2.4* ) + ac_cv_nfs_prot_headers=sunos5_4 ;; + sunos5.5* | solaris2.5* ) + ac_cv_nfs_prot_headers=sunos5_5 ;; + sunos5.6* | solaris2.6* ) + ac_cv_nfs_prot_headers=sunos5_6 ;; + sunos5.7* | solaris2.7* ) + ac_cv_nfs_prot_headers=sunos5_7 ;; + sunos5* | solaris2* ) + ac_cv_nfs_prot_headers=sunos5_8 ;; + bsdi2*) + ac_cv_nfs_prot_headers=bsdi2 ;; + bsdi* ) + ac_cv_nfs_prot_headers=bsdi3 ;; + freebsd2* ) + ac_cv_nfs_prot_headers=freebsd2 ;; + freebsd* | freebsdelf* ) + ac_cv_nfs_prot_headers=freebsd3 ;; + netbsd1.[[0-2]]* ) + ac_cv_nfs_prot_headers=netbsd ;; + netbsd1.3* ) + ac_cv_nfs_prot_headers=netbsd1_3 ;; + netbsd* | netbsdelf* ) + ac_cv_nfs_prot_headers=netbsd1_4 ;; + openbsd* ) + ac_cv_nfs_prot_headers=openbsd ;; + hpux[[6-9]]* | hpux10* ) + ac_cv_nfs_prot_headers=hpux ;; + hpux* ) + ac_cv_nfs_prot_headers=hpux11 ;; + aix[[1-3]]* ) + ac_cv_nfs_prot_headers=aix3 ;; + aix4.[[01]]* ) + ac_cv_nfs_prot_headers=aix4 ;; + aix4.2* ) + ac_cv_nfs_prot_headers=aix4_2 ;; + aix4.3* ) + ac_cv_nfs_prot_headers=aix4_3 ;; + aix5.1* ) + ac_cv_nfs_prot_headers=aix5_1 ;; + aix* ) + ac_cv_nfs_prot_headers=aix5_2 ;; + osf[[1-3]]* ) + ac_cv_nfs_prot_headers=osf2 ;; + osf4* ) + ac_cv_nfs_prot_headers=osf4 ;; + osf* ) + ac_cv_nfs_prot_headers=osf5 ;; + svr4* ) + ac_cv_nfs_prot_headers=svr4 ;; + sysv4* ) # this is for NCR2 machines + ac_cv_nfs_prot_headers=ncr2 ;; + linux* ) + ac_cv_nfs_prot_headers=linux ;; + nextstep* ) + ac_cv_nfs_prot_headers=nextstep ;; + ultrix* ) + ac_cv_nfs_prot_headers=ultrix ;; + darwin* | macosx* | rhapsody* ) + ac_cv_nfs_prot_headers=darwin ;; + * ) + ac_cv_nfs_prot_headers=default ;; +esac +]) + +# make sure correct header is linked in top build directory +am_utils_nfs_prot_file="amu_nfs_prot.h" +am_utils_link_files=${am_utils_link_files}${am_utils_nfs_prot_file}:conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h" " + +# define the name of the header to be included for other M4 macros +AC_DEFINE_UNQUOTED(AMU_NFS_PROTOCOL_HEADER, "${srcdir}/conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h") + +# set headers in a macro for Makefile.am files to use (for dependencies) +AMU_NFS_PROT_HEADER='${top_builddir}/'$am_utils_nfs_prot_file +AC_SUBST(AMU_NFS_PROT_HEADER) +]) +dnl ====================================================================== diff --git a/m4/macros/check_nfs_sa_dref.m4 b/m4/macros/check_nfs_sa_dref.m4 new file mode 100644 index 00000000000..5fa1bea6d9b --- /dev/null +++ b/m4/macros/check_nfs_sa_dref.m4 @@ -0,0 +1,33 @@ +dnl ###################################################################### +dnl check the correct way to dereference the address part of the nfs fhandle +AC_DEFUN([AMU_CHECK_NFS_SA_DREF], +[ +AC_CACHE_CHECK(nfs address dereferencing style, +ac_cv_nfs_sa_dref_style, +[ +# select the correct nfs address dereferencing style +case "${host_os}" in + hpux[[6-9]]* | hpux10* | sunos[[34]]* | solaris1* ) + ac_cv_nfs_sa_dref_style=default ;; + svr4* | sysv4* | solaris* | sunos* | hpux* ) + ac_cv_nfs_sa_dref_style=svr4 ;; + 386bsd* | bsdi1* ) + ac_cv_nfs_sa_dref_style=386bsd ;; + bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_nfs_sa_dref_style=bsd44 ;; + linux* ) + ac_cv_nfs_sa_dref_style=linux ;; + aix* ) + ac_cv_nfs_sa_dref_style=aix3 ;; + aoi* ) + ac_cv_nfs_sa_dref_style=aoi ;; + isc3 ) + ac_cv_nfs_sa_dref_style=isc3 ;; + * ) + ac_cv_nfs_sa_dref_style=default ;; +esac +]) +am_utils_nfs_sa_dref=$srcdir"/conf/sa_dref/sa_dref_"$ac_cv_nfs_sa_dref_style".h" +AC_SUBST_FILE(am_utils_nfs_sa_dref) +]) +dnl ====================================================================== diff --git a/m4/macros/check_nfs_socket_connection.m4 b/m4/macros/check_nfs_socket_connection.m4 new file mode 100644 index 00000000000..3e3a8074127 --- /dev/null +++ b/m4/macros/check_nfs_socket_connection.m4 @@ -0,0 +1,28 @@ +dnl ###################################################################### +dnl check if need to turn on, off, or leave alone the NFS "noconn" option +AC_DEFUN([AMU_CHECK_NFS_SOCKET_CONNECTION], +[ +AC_CACHE_CHECK(if to turn on/off noconn option, +ac_cv_nfs_socket_connection, +[ +# set default to no-change +ac_cv_nfs_socket_connection=none +# select the correct style +case "${host_os}" in + openbsd2.[[01]]* ) + ac_cv_nfs_socket_connection=noconn ;; + openbsd* | freebsd* | freebsdelf* ) + ac_cv_nfs_socket_connection=conn ;; +esac +]) +# set correct value +case "$ac_cv_nfs_socket_connection" in + noconn ) + AC_DEFINE(USE_UNCONNECTED_NFS_SOCKETS) + ;; + conn ) + AC_DEFINE(USE_CONNECTED_NFS_SOCKETS) + ;; +esac +]) +dnl ====================================================================== diff --git a/m4/macros/check_os_libs.m4 b/m4/macros/check_os_libs.m4 new file mode 100644 index 00000000000..d732a748899 --- /dev/null +++ b/m4/macros/check_os_libs.m4 @@ -0,0 +1,28 @@ +dnl ###################################################################### +dnl set OS libraries specific to an OS: +dnl libnsl/libsocket are needed only on solaris and some svr4 systems. +dnl Using a typical macro has proven unsuccesful, because on some other +dnl systems such as irix, including libnsl and or libsocket actually breaks +dnl lots of code. So I am forced to use a special purpose macro that sets +dnl the libraries based on the OS. Sigh. -Erez. +AC_DEFUN([AMU_CHECK_OS_LIBS], +[ +AC_CACHE_CHECK(for additional OS libraries, +ac_cv_os_libs, +[ +# select the correct set of libraries to link with +case "${host_os_name}" in + svr4* | sysv4* | solaris2* | sunos5* | aoi* ) + ac_cv_os_libs="-lsocket -lnsl" ;; + * ) + ac_cv_os_libs=none ;; +esac +]) +# set list of libraries to link with +if test "$ac_cv_os_libs" != none +then + LIBS="$ac_cv_os_libs $LIBS" +fi + +]) +dnl ====================================================================== diff --git a/m4/macros/check_restartable_signal_handler.m4 b/m4/macros/check_restartable_signal_handler.m4 new file mode 100644 index 00000000000..224274f8d46 --- /dev/null +++ b/m4/macros/check_restartable_signal_handler.m4 @@ -0,0 +1,22 @@ +dnl ###################################################################### +dnl check if a system needs to restart its signal handlers +AC_DEFUN([AMU_CHECK_RESTARTABLE_SIGNAL_HANDLER], +[ +AC_CACHE_CHECK(if system needs to restart signal handlers, +ac_cv_restartable_signal_handler, +[ +# select the correct systems to restart signal handlers +case "${host_os_name}" in + svr3* | svr4* | sysv4* | solaris2* | sunos5* | aoi* | irix* ) + ac_cv_restartable_signal_handler=yes ;; + * ) + ac_cv_restartable_signal_handler=no ;; +esac +]) +# define REINSTALL_SIGNAL_HANDLER if need to +if test "$ac_cv_restartable_signal_handler" = yes +then + AC_DEFINE(REINSTALL_SIGNAL_HANDLER) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_umount_style.m4 b/m4/macros/check_umount_style.m4 new file mode 100644 index 00000000000..c5abcf12ea7 --- /dev/null +++ b/m4/macros/check_umount_style.m4 @@ -0,0 +1,28 @@ +dnl ###################################################################### +dnl check style of unmounting filesystems +AC_DEFUN([AMU_CHECK_UMOUNT_STYLE], +[ +AC_CACHE_CHECK(style of unmounting filesystems, +ac_cv_style_umount, +[ +# select the correct style for unmounting filesystems +case "${host_os_name}" in + linux* ) + ac_cv_style_umount=linux ;; + bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | macosx* | rhapsody* ) + ac_cv_style_umount=bsd44 ;; + osf* ) + ac_cv_style_umount=osf ;; + aix* ) + ac_cv_style_umount=aix ;; + * ) + ac_cv_style_umount=default ;; +esac +]) +am_utils_umount_style_file="umount_fs.c" +am_utils_link_files=${am_utils_link_files}libamu/${am_utils_umount_style_file}:conf/umount/umount_${ac_cv_style_umount}.c" " + +# append un-mount utilities object to LIBOBJS for automatic compilation +AC_LIBOBJ(umount_fs) +]) +dnl ====================================================================== diff --git a/m4/macros/check_unmount_args.m4 b/m4/macros/check_unmount_args.m4 new file mode 100644 index 00000000000..678f5ba9c99 --- /dev/null +++ b/m4/macros/check_unmount_args.m4 @@ -0,0 +1,21 @@ +dnl ###################################################################### +dnl check the unmount system call arguments needed for +AC_DEFUN([AMU_CHECK_UNMOUNT_ARGS], +[ +AC_CACHE_CHECK(unmount system-call arguments, +ac_cv_unmount_args, +[ +# select the correct style to mount(2) a filesystem +case "${host_os_name}" in + aix* ) + ac_cv_unmount_args="mnt->mnt_passno, 0" ;; + ultrix* ) + ac_cv_unmount_args="mnt->mnt_passno" ;; + * ) + ac_cv_unmount_args="mnt->mnt_dir" ;; +esac +]) +am_utils_unmount_args=$ac_cv_unmount_args +AC_SUBST(am_utils_unmount_args) +]) +dnl ====================================================================== diff --git a/m4/macros/check_unmount_call.m4 b/m4/macros/check_unmount_call.m4 new file mode 100644 index 00000000000..34a922ae2f3 --- /dev/null +++ b/m4/macros/check_unmount_call.m4 @@ -0,0 +1,27 @@ +dnl ###################################################################### +dnl check for the correct system call to unmount a filesystem. +AC_DEFUN([AMU_CHECK_UNMOUNT_CALL], +[ +dnl make sure this one is called before [AC_CHECK_UNMOUNT_ARGS] +AC_BEFORE([$0], [AC_CHECK_UNMOUNT_ARGS]) +AC_CACHE_CHECK(the system call to unmount a filesystem, +ac_cv_unmount_call, +[ +# check for various unmount a filesystem calls +if test "$ac_cv_func_uvmount" = yes ; then + ac_cv_unmount_call=uvmount +elif test "$ac_cv_func_unmount" = yes ; then + ac_cv_unmount_call=unmount +elif test "$ac_cv_func_umount" = yes ; then + ac_cv_unmount_call=umount +else + ac_cv_unmount_call=no +fi +]) +if test "$ac_cv_unmount_call" != no +then + am_utils_unmount_call=$ac_cv_unmount_call + AC_SUBST(am_utils_unmount_call) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/check_varargs_macros.m4 b/m4/macros/check_varargs_macros.m4 new file mode 100644 index 00000000000..44bd3edf198 --- /dev/null +++ b/m4/macros/check_varargs_macros.m4 @@ -0,0 +1,39 @@ +dnl ###################################################################### +dnl check if compiler can handle variable-length argument macros +AC_DEFUN([AMU_VARARGS_MACROS], +[ +AC_CACHE_CHECK(if compiler can handle variable-length macros, +ac_cv_varargs_macros, +[ +# try C99 style +AC_TRY_COMPILE( +[ +#define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__) +], +[ +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); +], ac_cv_varargs_macros=c99, +# else try gcc style +AC_TRY_COMPILE( +[ +#define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args) +], +[ +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); +], ac_cv_varargs_macros=gcc, ac_cv_varargs_macros=none)) +]) +if test "$ac_cv_varargs_macros" = c99 +then + AC_DEFINE(HAVE_C99_VARARGS_MACROS, 1, + [System supports C99-style variable-length argument macros]) +else + if test "$ac_cv_varargs_macros" = gcc + then + AC_DEFINE(HAVE_GCC_VARARGS_MACROS, 1, + [System supports GCC-style variable-length argument macros]) + fi +fi +]) +dnl ====================================================================== diff --git a/m4/macros/expand_cpp_hex.m4 b/m4/macros/expand_cpp_hex.m4 new file mode 100644 index 00000000000..0c7a9e421ab --- /dev/null +++ b/m4/macros/expand_cpp_hex.m4 @@ -0,0 +1,40 @@ +dnl ###################################################################### +dnl Expand the value of a CPP macro into a printable hex number. +dnl Takes: header, macro, [action-if-found, [action-if-not-found]] +dnl It runs the header through CPP looking for a match between the macro +dnl and a string pattern, and if sucessful, it prints the string value out. +AC_DEFUN([AMU_EXPAND_CPP_HEX], +[ +# we are looking for a regexp of a string +AC_EGREP_CPP(0x, +[$1] +$2, +value="notfound" +AC_TRY_RUN( +[ +[$1] +main(argc) +int argc; +{ +#ifdef $2 +if (argc > 1) + printf("0x%x", $2); +exit(0); +#else +# error no such option $2 +#endif +exit(1); +}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +, +value="notfound" +) +if test "$value" = notfound +then + : + $4 +else + : + $3 +fi +]) +dnl ====================================================================== diff --git a/m4/macros/expand_cpp_int.m4 b/m4/macros/expand_cpp_int.m4 new file mode 100644 index 00000000000..37253769cfd --- /dev/null +++ b/m4/macros/expand_cpp_int.m4 @@ -0,0 +1,42 @@ +dnl ###################################################################### +dnl Expand the value of a CPP macro into a printable integer number. +dnl Takes: header, macro, [action-if-found, [action-if-not-found]] +dnl It runs the header through CPP looking for a match between the macro +dnl and a string pattern, and if sucessful, it prints the string value out. +AC_DEFUN([AMU_EXPAND_CPP_INT], +[ +# we are looking for a regexp of an integer (must not start with 0 --- those +# are octals). +AC_EGREP_CPP( +[[1-9]][[0-9]]*, +[$1] +$2, +value="notfound" +AC_TRY_RUN( +[ +[$1] +main(argc) +int argc; +{ +#ifdef $2 +if (argc > 1) + printf("%d", $2); +exit(0); +#else +# error no such option $2 +#endif +exit(1); +}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +, +value="notfound" +) +if test "$value" = notfound +then + : + $4 +else + : + $3 +fi +]) +dnl ====================================================================== diff --git a/m4/macros/expand_cpp_string.m4 b/m4/macros/expand_cpp_string.m4 new file mode 100644 index 00000000000..51293c4f7a1 --- /dev/null +++ b/m4/macros/expand_cpp_string.m4 @@ -0,0 +1,40 @@ +dnl ###################################################################### +dnl Expand the value of a CPP macro into a printable string. +dnl Takes: header, macro, [action-if-found, [action-if-not-found]] +dnl It runs the header through CPP looking for a match between the macro +dnl and a string pattern, and if sucessful, it prints the string value out. +AC_DEFUN([AMU_EXPAND_CPP_STRING], +[ +# we are looking for a regexp of a string +AC_EGREP_CPP(\".*\", +[$1] +$2, +value="notfound" +AC_TRY_RUN( +[ +[$1] +main(argc) +int argc; +{ +#ifdef $2 +if (argc > 1) + printf("%s", $2); +exit(0); +#else +# error no such option $2 +#endif +exit(1); +}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +, +value="notfound" +) +if test "$value" = notfound +then + : + $4 +else + : + $3 +fi +]) +dnl ====================================================================== diff --git a/m4/macros/expand_run_string.m4 b/m4/macros/expand_run_string.m4 new file mode 100644 index 00000000000..2cb964e11f9 --- /dev/null +++ b/m4/macros/expand_run_string.m4 @@ -0,0 +1,29 @@ +dnl ###################################################################### +dnl Run a program and print its output as a string +dnl Takes: (header, code-to-run, [action-if-found, [action-if-not-found]]) +AC_DEFUN([AMU_EXPAND_RUN_STRING], +[ +value="notfound" +AC_TRY_RUN( +[ +$1 +main(argc) +int argc; +{ +$2 +exit(0); +}], +[ +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" +], value="notfound", value="notfound") +if test "$value" = notfound +then + : + $4 +else + : + $3 +fi +]) +dnl ====================================================================== diff --git a/m4/macros/extern_optarg.m4 b/m4/macros/extern_optarg.m4 new file mode 100644 index 00000000000..70cb50ae690 --- /dev/null +++ b/m4/macros/extern_optarg.m4 @@ -0,0 +1,36 @@ +dnl ###################################################################### +dnl find if "extern char *optarg" exists in headers +AC_DEFUN([AMU_EXTERN_OPTARG], +[ +AC_CACHE_CHECK(if external definition for optarg[] exists, +ac_cv_extern_optarg, +[ +# try to compile program that uses the variable +AC_TRY_COMPILE( +[ +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_UNISTD_H +# include +#endif /* HAVE_UNISTD_H */ +#ifdef HAVE_STDLIB_H +# include +#endif /* HAVE_STDLIB_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_ERRNO_H +# include +#endif /* HAVE_ERRNO_H */ +], +[ +char *cp = optarg; +], ac_cv_extern_optarg=yes, ac_cv_extern_optarg=no) +]) +if test "$ac_cv_extern_optarg" = yes +then + AC_DEFINE(HAVE_EXTERN_OPTARG) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/extern_sys_errlist.m4 b/m4/macros/extern_sys_errlist.m4 new file mode 100644 index 00000000000..7d95752341f --- /dev/null +++ b/m4/macros/extern_sys_errlist.m4 @@ -0,0 +1,30 @@ +dnl ###################################################################### +dnl find if "extern char *sys_errlist[]" exist in headers +AC_DEFUN([AMU_EXTERN_SYS_ERRLIST], +[ +AC_CACHE_CHECK(if external definition for sys_errlist[] exists, +ac_cv_extern_sys_errlist, +[ +# try to locate pattern in header files +#pattern="(extern)?.*char.*sys_errlist.*\[\]" +pattern="(extern)?.*char.*sys_errlist.*" +AC_EGREP_CPP(${pattern}, +[ +#ifdef HAVE_STDIO_H +# include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_ERRNO_H +# include +#endif /* HAVE_ERRNO_H */ +], ac_cv_extern_sys_errlist=yes, ac_cv_extern_sys_errlist=no) +]) +# check if need to define variable +if test "$ac_cv_extern_sys_errlist" = yes +then + AC_DEFINE(HAVE_EXTERN_SYS_ERRLIST) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/field_mntent_t_mnt_time_string.m4 b/m4/macros/field_mntent_t_mnt_time_string.m4 new file mode 100644 index 00000000000..42ad647b438 --- /dev/null +++ b/m4/macros/field_mntent_t_mnt_time_string.m4 @@ -0,0 +1,36 @@ +fdnl ###################################################################### +dnl find if mntent_t field mnt_time exists and is of type "char *" +AC_DEFUN([AMU_FIELD_MNTENT_T_MNT_TIME_STRING], +[ +AC_CACHE_CHECK(if mntent_t field mnt_time exist as type string, +ac_cv_field_mntent_t_mnt_time_string, +[ +# try to compile a program +AC_TRY_COMPILE( +AMU_MOUNT_HEADERS( +[ +/* now set the typedef */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +# else /* not HAVE_STRUCT_MNTTAB */ +# error XXX: could not find definition for struct mntent or struct mnttab! +# endif /* not HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ +]), +[ +mntent_t mtt; +char *cp = "test"; +int i; +mtt.mnt_time = cp; +i = mtt.mnt_time[0]; +], ac_cv_field_mntent_t_mnt_time_string=yes, ac_cv_field_mntent_t_mnt_time_string=no) +]) +if test "$ac_cv_field_mntent_t_mnt_time_string" = yes +then + AC_DEFINE(HAVE_MNTENT_T_MNT_TIME_STRING) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/func_bad_hasmntopt.m4 b/m4/macros/func_bad_hasmntopt.m4 new file mode 100644 index 00000000000..d458bd30c4c --- /dev/null +++ b/m4/macros/func_bad_hasmntopt.m4 @@ -0,0 +1,59 @@ +dnl ###################################################################### +dnl Check if we have as buggy hasmntopt() libc function +AC_DEFUN([AMU_FUNC_BAD_HASMNTOPT], +[ +AC_CACHE_CHECK([for working hasmntopt], ac_cv_func_hasmntopt_working, +[AC_TRY_RUN( +AMU_MOUNT_HEADERS( +[[ +#ifdef HAVE_MNTENT_H +/* some systems need before is included */ +# ifdef HAVE_STDIO_H +# include +# endif /* HAVE_STDIO_H */ +# include +#endif /* HAVE_MNTENT_H */ +#ifdef HAVE_SYS_MNTENT_H +# include +#endif /* HAVE_SYS_MNTENT_H */ +#ifdef HAVE_SYS_MNTTAB_H +# include +#endif /* HAVE_SYS_MNTTAB_H */ +#if defined(HAVE_MNTTAB_H) && !defined(MNTTAB) +# include +#endif /* defined(HAVE_MNTTAB_H) && !defined(MNTTAB) */ +#ifdef HAVE_STRUCT_MNTENT +typedef struct mntent mntent_t; +#else /* not HAVE_STRUCT_MNTENT */ +# ifdef HAVE_STRUCT_MNTTAB +typedef struct mnttab mntent_t; +/* map struct mnttab field names to struct mntent field names */ +# define mnt_opts mnt_mntopts +# endif /* not HAVE_STRUCT_MNTTAB */ +#endif /* not HAVE_STRUCT_MNTENT */ + +int main() +{ + mntent_t mnt; + char *tmp = NULL; + + /* + * Test if hasmntopt will incorrectly find the string "soft", which + * is part of the large "softlookup" function. + */ + mnt.mnt_opts = "hard,softlookup,ro"; + + if ((tmp = hasmntopt(&mnt, "soft"))) + exit(1); + exit(0); +} +]]), + [ac_cv_func_hasmntopt_working=yes], + [ac_cv_func_hasmntopt_working=no] +)]) +if test $ac_cv_func_hasmntopt_working = no +then + AC_LIBOBJ([hasmntopt]) + AC_DEFINE(HAVE_BAD_HASMNTOPT) +fi +]) diff --git a/m4/macros/func_bad_memcmp.m4 b/m4/macros/func_bad_memcmp.m4 new file mode 100644 index 00000000000..1713ff9cf1c --- /dev/null +++ b/m4/macros/func_bad_memcmp.m4 @@ -0,0 +1,11 @@ +dnl My version is similar to the one from Autoconf 2.52, but I also +dnl define HAVE_BAD_MEMCMP so that I can do smarter things to avoid +dnl linkage conflicts with bad memcmp versions that are in libc. +AC_DEFUN([AMU_FUNC_BAD_MEMCMP], +[ +AC_FUNC_MEMCMP +if test "$ac_cv_func_memcmp_working" = no +then +AC_DEFINE(HAVE_BAD_MEMCMP) +fi +]) diff --git a/m4/macros/func_bad_yp_all.m4 b/m4/macros/func_bad_yp_all.m4 new file mode 100644 index 00000000000..2f548fe64fd --- /dev/null +++ b/m4/macros/func_bad_yp_all.m4 @@ -0,0 +1,27 @@ +dnl Check for a yp_all() function that does not leak a file descriptor +dnl to the ypserv process. +AC_DEFUN([AMU_FUNC_BAD_YP_ALL], +[ +AC_CACHE_CHECK(for a file-descriptor leakage clean yp_all, +ac_cv_func_yp_all_clean, +[ +# clean by default +ac_cv_func_yp_all_clean=yes +# select the correct type +case "${host_os_name}" in + irix* ) + ac_cv_func_yp_all_clean=no ;; + linux* ) + # RedHat 5.1 systems with glibc glibc-2.0.7-19 or below + # leak a UDP socket from yp_all() + case "`cat /etc/redhat-release /dev/null 2>/dev/null`" in + *5.1* ) + ac_cv_func_yp_all_clean=no ;; + esac +esac +]) +if test $ac_cv_func_yp_all_clean = no +then + AC_DEFINE(HAVE_BAD_YP_ALL) +fi +]) diff --git a/m4/macros/header_templates.m4 b/m4/macros/header_templates.m4 new file mode 100644 index 00000000000..71cca120904 --- /dev/null +++ b/m4/macros/header_templates.m4 @@ -0,0 +1,1103 @@ +dnl FILE: m4/macros/header_templates.m4 +dnl defines descriptions for various am-utils specific macros + +AH_TEMPLATE([HAVE_AMU_FS_AUTO], +[Define if have automount filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_DIRECT], +[Define if have direct automount filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_TOPLVL], +[Define if have "top-level" filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_ERROR], +[Define if have error filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_PROGRAM], +[Define if have program filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_LINK], +[Define if have symbolic-link filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_LINKX], +[Define if have symlink with existence check filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_HOST], +[Define if have NFS host-tree filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_NFSL], +[Define if have nfsl (NFS with local link check) filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_NFSX], +[Define if have multi-NFS filesystem]) + +AH_TEMPLATE([HAVE_AMU_FS_UNION], +[Define if have union filesystem]) + +AH_TEMPLATE([HAVE_MAP_FILE], +[Define if have file maps (everyone should have it!)]) + +AH_TEMPLATE([HAVE_MAP_NIS], +[Define if have NIS maps]) + +AH_TEMPLATE([HAVE_MAP_NISPLUS], +[Define if have NIS+ maps]) + +AH_TEMPLATE([HAVE_MAP_DBM], +[Define if have DBM maps]) + +AH_TEMPLATE([HAVE_MAP_NDBM], +[Define if have NDBM maps]) + +AH_TEMPLATE([HAVE_MAP_HESIOD], +[Define if have HESIOD maps]) + +AH_TEMPLATE([HAVE_MAP_LDAP], +[Define if have LDAP maps]) + +AH_TEMPLATE([HAVE_MAP_PASSWD], +[Define if have PASSWD maps]) + +AH_TEMPLATE([HAVE_MAP_SUN], +[Define if have Sun-syntax maps]) + +AH_TEMPLATE([HAVE_MAP_UNION], +[Define if have UNION maps]) + +AH_TEMPLATE([HAVE_MAP_EXEC], +[Define if have executable maps]) + +AH_TEMPLATE([HAVE_FS_UFS], +[Define if have UFS filesystem]) + +AH_TEMPLATE([HAVE_FS_FFS], +[Define if have FFS filesystem]) + +AH_TEMPLATE([HAVE_FS_XFS], +[Define if have XFS filesystem (irix)]) + +AH_TEMPLATE([HAVE_FS_EFS], +[Define if have EFS filesystem (irix)]) + +AH_TEMPLATE([HAVE_FS_EXT], +[Define if have EXT{2,3,4} filesystem (linux)]) + +AH_TEMPLATE([HAVE_FS_NFS], +[Define if have NFS filesystem]) + +AH_TEMPLATE([HAVE_FS_NFS3], +[Define if have NFS3 filesystem]) + +AH_TEMPLATE([HAVE_FS_NFS4], +[Define if have NFS4 filesystem]) + +AH_TEMPLATE([HAVE_FS_PCFS], +[Define if have PCFS filesystem]) + +AH_TEMPLATE([HAVE_FS_LOFS], +[Define if have LOFS filesystem]) + +AH_TEMPLATE([HAVE_FS_HSFS], +[Define if have HSFS filesystem]) + +AH_TEMPLATE([HAVE_FS_CDFS], +[Define if have CDFS filesystem]) + +AH_TEMPLATE([HAVE_FS_UDF], +[Define if have UDF filesystem]) + +AH_TEMPLATE([HAVE_FS_LUSTRE], +[Define if have LUSTRE filesystem]) + +AH_TEMPLATE([HAVE_FS_TFS], +[Define if have TFS filesystem]) + +AH_TEMPLATE([HAVE_FS_TMPFS], +[Define if have TMPFS filesystem]) + +AH_TEMPLATE([HAVE_FS_MFS], +[Define if have MFS filesystem]) + +AH_TEMPLATE([HAVE_FS_CFS], +[Define if have CFS (crypto) filesystem]) + +AH_TEMPLATE([HAVE_FS_AUTOFS], +[Define if have AUTOFS filesystem]) + +AH_TEMPLATE([HAVE_FS_CACHEFS], +[Define if have CACHEFS filesystem]) + +AH_TEMPLATE([HAVE_FS_NULLFS], +[Define if have NULLFS (loopback on bsd44) filesystem]) + +AH_TEMPLATE([HAVE_FS_UNIONFS], +[Define if have UNIONFS filesystem]) + +AH_TEMPLATE([HAVE_FS_UMAPFS], +[Define if have UMAPFS (uid/gid mapping) filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_UFS], +[Mount(2) type/name for UFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_FFS], +[Mount(2) type/name for FFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_XFS], +[Mount(2) type/name for XFS filesystem (irix)]) + +AH_TEMPLATE([MOUNT_TYPE_EFS], +[Mount(2) type/name for EFS filesystem (irix)]) + +AH_TEMPLATE([MOUNT_TYPE_EXT2], +[Mount(2) type/name for EXT2 filesystem (linux)]) + +AH_TEMPLATE([MOUNT_TYPE_EXT3], +[Mount(2) type/name for EXT3 filesystem (linux)]) + +AH_TEMPLATE([MOUNT_TYPE_EXT4], +[Mount(2) type/name for EXT4 filesystem (linux)]) + +AH_TEMPLATE([MOUNT_TYPE_NFS], +[Mount(2) type/name for NFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_NFS3], +[Mount(2) type/name for NFS3 filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_NFS4], +[Mount(2) type/name for NFS4 filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_PCFS], +[Mount(2) type/name for PCFS filesystem. XXX: conf/trap/trap_hpux.h may override this definition for HPUX 9.0]) + +AH_TEMPLATE([MOUNT_TYPE_LOFS], +[Mount(2) type/name for LOFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_CDFS], +[Mount(2) type/name for CDFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_UDF], +[Mount(2) type/name for UDF filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_LUSTRE], +[Mount(2) type/name for LUSTRE filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_LUSTRE], +[Mount(2) type/name for LUSTRE filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_TFS], +[Mount(2) type/name for TFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_TMPFS], +[Mount(2) type/name for TMPFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_MFS], +[Mount(2) type/name for MFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_CFS], +[Mount(2) type/name for CFS (crypto) filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_AUTOFS], +[Mount(2) type/name for AUTOFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_CACHEFS], +[Mount(2) type/name for CACHEFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_IGNORE], +[Mount(2) type/name for IGNORE filesystem (not real just ignore for df)]) + +AH_TEMPLATE([MOUNT_TYPE_NULLFS], +[Mount(2) type/name for NULLFS (loopback on bsd44) filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_UNIONFS], +[Mount(2) type/name for UNIONFS filesystem]) + +AH_TEMPLATE([MOUNT_TYPE_UMAPFS], +[Mount(2) type/name for UMAPFS (uid/gid mapping) filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_UFS], +[Mount-table entry name for UFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_FFS], +[Mount-table entry name for FFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_XFS], +[Mount-table entry name for XFS filesystem (irix)]) + +AH_TEMPLATE([MNTTAB_TYPE_EFS], +[Mount-table entry name for EFS filesystem (irix)]) + +AH_TEMPLATE([MNTTAB_TYPE_EXT2], +[Mount-table entry name for EXT2 filesystem (linux)]) + +AH_TEMPLATE([MNTTAB_TYPE_EXT3], +[Mount-table entry name for EXT3 filesystem (linux)]) + +AH_TEMPLATE([MNTTAB_TYPE_EXT4], +[Mount-table entry name for EXT4 filesystem (linux)]) + +AH_TEMPLATE([MNTTAB_TYPE_NFS], +[Mount-table entry name for NFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_NFS3], +[Mount-table entry name for NFS3 filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_NFS4], +[Mount-table entry name for NFS4 filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_PCFS], +[Mount-table entry name for PCFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_LOFS], +[Mount-table entry name for LOFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_CDFS], +[Mount-table entry name for CDFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_UDF], +[Mount-table entry name for UDF filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_LUSTRE], +[Mount-table entry name for LUSTRE filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_TFS], +[Mount-table entry name for TFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_TMPFS], +[Mount-table entry name for TMPFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_MFS], +[Mount-table entry name for MFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_CFS], +[Mount-table entry name for CFS (crypto) filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_AUTOFS], +[Mount-table entry name for AUTOFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_CACHEFS], +[Mount-table entry name for CACHEFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_NULLFS], +[Mount-table entry name for NULLFS (loopback on bsd44) filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_UNIONFS], +[Mount-table entry name for UNIONFS filesystem]) + +AH_TEMPLATE([MNTTAB_TYPE_UMAPFS], +[Mount-table entry name for UMAPFS (uid/gid mapping) filesystem]) + +AH_TEMPLATE([MNTTAB_FILE_NAME], +[Name of mount table file name]) + +AH_TEMPLATE([HIDE_MOUNT_TYPE], +[Name of mount type to hide amd mount from df(1)]) + +AH_TEMPLATE([MNTTAB_OPT_RO], +[Mount Table option string: Read only]) + +AH_TEMPLATE([MNTTAB_OPT_RW], +[Mount Table option string: Read/write]) + +AH_TEMPLATE([MNTTAB_OPT_RQ], +[Mount Table option string: Read/write with quotas]) + +AH_TEMPLATE([MNTTAB_OPT_QUOTA], +[Mount Table option string: Check quotas]) + +AH_TEMPLATE([MNTTAB_OPT_NOQUOTA], +[Mount Table option string: Don't check quotas]) + +AH_TEMPLATE([MNTTAB_OPT_ONERROR], +[Mount Table option string: action to taken on error]) + +AH_TEMPLATE([MNTTAB_OPT_TOOSOON], +[Mount Table option string: min. time between inconsistencies]) + +AH_TEMPLATE([MNTTAB_OPT_SOFT], +[Mount Table option string: Soft mount]) + +AH_TEMPLATE([MNTTAB_OPT_SPONGY], +[Mount Table option string: spongy mount]) + +AH_TEMPLATE([MNTTAB_OPT_HARD], +[Mount Table option string: Hard mount]) + +AH_TEMPLATE([MNTTAB_OPT_SUID], +[Mount Table option string: Set uid allowed]) + +AH_TEMPLATE([MNTTAB_OPT_NOSUID], +[Mount Table option string: Set uid not allowed]) + +AH_TEMPLATE([MNTTAB_OPT_GRPID], +[Mount Table option string: SysV-compatible gid on create]) + +AH_TEMPLATE([MNTTAB_OPT_REMOUNT], +[Mount Table option string: Change mount options]) + +AH_TEMPLATE([MNTTAB_OPT_NOSUB], +[Mount Table option string: Disallow mounts on subdirs]) + +AH_TEMPLATE([MNTTAB_OPT_MULTI], +[Mount Table option string: Do multi-component lookup]) + +AH_TEMPLATE([MNTTAB_OPT_INTR], +[Mount Table option string: Allow NFS ops to be interrupted]) + +AH_TEMPLATE([MNTTAB_OPT_NOINTR], +[Mount Table option string: Don't allow interrupted ops]) + +AH_TEMPLATE([MNTTAB_OPT_PORT], +[Mount Table option string: NFS server IP port number]) + +AH_TEMPLATE([MNTTAB_OPT_SECURE], +[Mount Table option string: Secure (AUTH_DES) mounting]) + +AH_TEMPLATE([MNTTAB_OPT_KERB], +[Mount Table option string: Secure (AUTH_Kerb) mounting]) + +AH_TEMPLATE([MNTTAB_OPT_RSIZE], +[Mount Table option string: Max NFS read size (bytes)]) + +AH_TEMPLATE([MNTTAB_OPT_WSIZE], +[Mount Table option string: Max NFS write size (bytes)]) + +AH_TEMPLATE([MNTTAB_OPT_TIMEO], +[Mount Table option string: NFS timeout (1/10 sec)]) + +AH_TEMPLATE([MNTTAB_OPT_RETRANS], +[Mount Table option string: Max retransmissions (soft mnts)]) + +AH_TEMPLATE([MNTTAB_OPT_ACTIMEO], +[Mount Table option string: Attr cache timeout (sec)]) + +AH_TEMPLATE([MNTTAB_OPT_ACREGMIN], +[Mount Table option string: Min attr cache timeout (files)]) + +AH_TEMPLATE([MNTTAB_OPT_ACREGMAX], +[Mount Table option string: Max attr cache timeout (files)]) + +AH_TEMPLATE([MNTTAB_OPT_ACDIRMIN], +[Mount Table option string: Min attr cache timeout (dirs)]) + +AH_TEMPLATE([MNTTAB_OPT_ACDIRMAX], +[Mount Table option string: Max attr cache timeout (dirs)]) + +AH_TEMPLATE([MNTTAB_OPT_NOAC], +[Mount Table option string: Don't cache attributes at all]) + +AH_TEMPLATE([MNTTAB_OPT_NOCTO], +[Mount Table option string: No close-to-open consistency]) + +AH_TEMPLATE([MNTTAB_OPT_BG], +[Mount Table option string: Do mount retries in background]) + +AH_TEMPLATE([MNTTAB_OPT_FG], +[Mount Table option string: Do mount retries in foreground]) + +AH_TEMPLATE([MNTTAB_OPT_RETRY], +[Mount Table option string: Number of mount retries]) + +AH_TEMPLATE([MNTTAB_OPT_DEV], +[Mount Table option string: Device id of mounted fs]) + +AH_TEMPLATE([MNTTAB_OPT_FSID], +[Mount Table option string: Filesystem id of mounted fs]) + +AH_TEMPLATE([MNTTAB_OPT_POSIX], +[Mount Table option string: Get static pathconf for mount]) + +AH_TEMPLATE([MNTTAB_OPT_PRIVATE], +[Mount Table option string: Use local locking]) + +AH_TEMPLATE([MNTTAB_OPT_MAP], +[Mount Table option string: Automount map]) + +AH_TEMPLATE([MNTTAB_OPT_DIRECT], +[Mount Table option string: Automount direct map mount]) + +AH_TEMPLATE([MNTTAB_OPT_INDIRECT], +[Mount Table option string: Automount indirect map mount]) + +AH_TEMPLATE([MNTTAB_OPT_LLOCK], +[Mount Table option string: Local locking (no lock manager)]) + +AH_TEMPLATE([MNTTAB_OPT_IGNORE], +[Mount Table option string: Ignore this entry]) + +AH_TEMPLATE([MNTTAB_OPT_NOAUTO], +[Mount Table option string: No auto (what?)]) + +AH_TEMPLATE([MNTTAB_OPT_NOCONN], +[Mount Table option string: No connection]) + +AH_TEMPLATE([MNTTAB_OPT_VERS], +[Mount Table option string: protocol version number indicator]) + +AH_TEMPLATE([MNTTAB_OPT_PROTO], +[Mount Table option string: protocol network_id indicator]) + +AH_TEMPLATE([MNTTAB_OPT_SYNCDIR], +[Mount Table option string: Synchronous local directory ops]) + +AH_TEMPLATE([MNTTAB_OPT_NOSETSEC], +[Mount Table option string: Do no allow setting sec attrs]) + +AH_TEMPLATE([MNTTAB_OPT_SYMTTL], +[Mount Table option string: set symlink cache time-to-live]) + +AH_TEMPLATE([MNTTAB_OPT_COMPRESS], +[Mount Table option string: compress]) + +AH_TEMPLATE([MNTTAB_OPT_PGTHRESH], +[Mount Table option string: paging threshold]) + +AH_TEMPLATE([MNTTAB_OPT_MAXGROUPS], +[Mount Table option string: max groups]) + +AH_TEMPLATE([MNTTAB_OPT_PROPLIST], +[Mount Table option string: support property lists (ACLs)]) + +AH_TEMPLATE([MNTTAB_OPT_LONGNAME], +[Force Win95 long names]) + +AH_TEMPLATE([MNTTAB_OPT_NOWIN95], +[Completely ignore Win95 entries]) + +AH_TEMPLATE([MNTTAB_OPT_SHORTNAME], +[Force old DOS short names only]) + +AH_TEMPLATE([MNTTAB_OPT_NOACL], +[Access Control Lists are not supported]) + + +AH_TEMPLATE([MNT2_GEN_OPT_ASYNC], +[asynchronous filesystem access]) + +AH_TEMPLATE([MNT2_GEN_OPT_AUTOMNTFS], +[automounter filesystem (ignore) flag, used in bsdi-4.1]) + +AH_TEMPLATE([MNT2_GEN_OPT_AUTOMOUNTED], +[automounter filesystem flag, used in Mac OS X / Darwin]) + +AH_TEMPLATE([MNT2_GEN_OPT_BIND], +[directory hardlink]) + +AH_TEMPLATE([MNT2_GEN_OPT_CACHE], +[cache (what?)]) + +AH_TEMPLATE([MNT2_GEN_OPT_DATA], +[6-argument mount]) + +AH_TEMPLATE([MNT2_GEN_OPT_DETACH], +[Use a lazy unmount (detach)]) + +AH_TEMPLATE([MNT2_GEN_OPT_FORCE], +[Use a forced unmount]) + +AH_TEMPLATE([MNT2_GEN_OPT_FSS], +[old (4-argument) mount (compatibility)]) + +AH_TEMPLATE([MNT2_GEN_OPT_IGNORE], +[ignore mount entry in df output]) + +AH_TEMPLATE([MNT2_GEN_OPT_JFS], +[journaling filesystem (AIX's UFS/FFS)]) + +AH_TEMPLATE([MNT2_GEN_OPT_GRPID], +[old BSD group-id on create]) + +AH_TEMPLATE([MNT2_GEN_OPT_MULTI], +[do multi-component lookup on files]) + +AH_TEMPLATE([MNT2_GEN_OPT_NEWTYPE], +[use type string instead of int]) + +AH_TEMPLATE([MNT2_GEN_OPT_NFS], +[NFS mount]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOCACHE], +[nocache (what?)]) + +AH_TEMPLATE([MNT2_GEN_OPT_NODEV], +[do not interpret special device files]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOEXEC], +[no exec calls allowed]) + +AH_TEMPLATE([MNT2_GEN_OPT_NONDEV], +[do not interpret special device files]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOSUB], +[Disallow mounts beneath this mount]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOSUID], +[Setuid programs disallowed]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOTRUNC], +[Return ENAMETOOLONG for long filenames]) + +AH_TEMPLATE([MNT2_GEN_OPT_OPTIONSTR], +[Pass mount option string to kernel]) + +AH_TEMPLATE([MNT2_GEN_OPT_OVERLAY], +[allow overlay mounts]) + +AH_TEMPLATE([MNT2_GEN_OPT_QUOTA], +[check quotas]) + +AH_TEMPLATE([MNT2_GEN_OPT_RDONLY], +[Read-only]) + +AH_TEMPLATE([MNT2_GEN_OPT_REMOUNT], +[change options on an existing mount]) + +AH_TEMPLATE([MNT2_GEN_OPT_RONLY], +[read only]) + +AH_TEMPLATE([MNT2_GEN_OPT_SYNC], +[synchronize data immediately to filesystem]) + +AH_TEMPLATE([MNT2_GEN_OPT_SYNCHRONOUS], +[synchronous filesystem access (same as SYNC)]) + +AH_TEMPLATE([MNT2_GEN_OPT_NOATIME], +[don't update access times]) + +AH_TEMPLATE([MNT2_GEN_OPT_NODIRATIME], +[don't update directory access times]) + +AH_TEMPLATE([MNT2_GEN_OPT_MANDLOCK], +[honor mandatory locking requests]) + +AH_TEMPLATE([MNT2_GEN_OPT_SYS5], +[Mount with Sys 5-specific semantics]) + +AH_TEMPLATE([MNT2_GEN_OPT_UNION], +[Union mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_AUTO], +[hide mount type from df(1)]) + +AH_TEMPLATE([MNT2_NFS_OPT_ACDIRMAX], +[set max secs for dir attr cache]) + +AH_TEMPLATE([MNT2_NFS_OPT_ACDIRMIN], +[set min secs for dir attr cache]) + +AH_TEMPLATE([MNT2_NFS_OPT_ACREGMAX], +[set max secs for file attr cache]) + +AH_TEMPLATE([MNT2_NFS_OPT_ACREGMIN], +[set min secs for file attr cache]) + +AH_TEMPLATE([MNT2_NFS_OPT_AUTHERR], +[Authentication error]) + +AH_TEMPLATE([MNT2_NFS_OPT_BROKEN_SUID], +[Linux broken setuid]) + +AH_TEMPLATE([MNT2_NFS_OPT_DEADTHRESH], +[set dead server retry thresh]) + +AH_TEMPLATE([MNT2_NFS_OPT_DISMINPROG], +[Dismount in progress]) + +AH_TEMPLATE([MNT2_NFS_OPT_DISMNT], +[Dismounted]) + +AH_TEMPLATE([MNT2_NFS_OPT_DUMBTIMR], +[Don't estimate rtt dynamically]) + +AH_TEMPLATE([MNT2_NFS_OPT_GRPID], +[System V-style gid inheritance]) + +AH_TEMPLATE([MNT2_NFS_OPT_HASAUTH], +[Has authenticator]) + +AH_TEMPLATE([MNT2_NFS_OPT_FSNAME], +[provide name of server's fs to system]) + +AH_TEMPLATE([MNT2_NFS_OPT_HOSTNAME], +[set hostname for error printf]) + +AH_TEMPLATE([MNT2_NFS_OPT_IGNORE], +[ignore mount point]) + +AH_TEMPLATE([MNT2_NFS_OPT_INT], +[allow interrupts on hard mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_INTR], +[allow interrupts on hard mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_INTERNAL], +[Bits set internally]) + +AH_TEMPLATE([MNT2_NFS_OPT_KERB], +[Use Kerberos authentication]) + +AH_TEMPLATE([MNT2_NFS_OPT_KERBEROS], +[use kerberos credentials]) + +AH_TEMPLATE([MNT2_NFS_OPT_KNCONF], +[transport's knetconfig structure]) + +AH_TEMPLATE([MNT2_NFS_OPT_LEASETERM], +[set lease term (nqnfs)]) + +AH_TEMPLATE([MNT2_NFS_OPT_LLOCK], +[Local locking (no lock manager)]) + +AH_TEMPLATE([MNT2_NFS_OPT_MAXGRPS], +[set maximum grouplist size]) + +AH_TEMPLATE([MNT2_NFS_OPT_MNTD], +[Mnt server for mnt point]) + +AH_TEMPLATE([MNT2_NFS_OPT_MYWRITE], +[Assume writes were mine]) + +AH_TEMPLATE([MNT2_NFS_OPT_NFSV3], +[mount NFS Version 3]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOAC], +[don't cache attributes]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOACL], +[does not support Access Control Lists]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOCONN], +[Don't Connect the socket]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOCTO], +[no close-to-open consistency]) + +AH_TEMPLATE([MNT2_NFS_OPT_NOINT], +[disallow interrupts on hard mounts]) + +AH_TEMPLATE([MNT2_NFS_OPT_NONLM], +[does not support locking]) + +AH_TEMPLATE([MNT2_NFS_OPT_NORDIRPLUS], +[does not support readdir+]) + +AH_TEMPLATE([MNT2_NFS_OPT_NQLOOKLEASE], +[Get lease for lookup]) + +AH_TEMPLATE([MNT2_NFS_OPT_NONLM], +[Don't use locking]) + +AH_TEMPLATE([MNT2_NFS_OPT_NQNFS], +[Use Nqnfs protocol]) + +AH_TEMPLATE([MNT2_NFS_OPT_POSIX], +[static pathconf kludge info]) + +AH_TEMPLATE([MNT2_NFS_OPT_PRIVATE], +[Use local locking]) + +AH_TEMPLATE([MNT2_NFS_OPT_RCVLOCK], +[Rcv socket lock]) + +AH_TEMPLATE([MNT2_NFS_OPT_RDIRALOOK], +[Do lookup with readdir (nqnfs)]) + +AH_TEMPLATE([MNT2_NFS_OPT_PROPLIST], +[allow property list operations (ACLs over NFS)]) + +AH_TEMPLATE([MNT2_NFS_OPT_RDIRPLUS], +[Use Readdirplus for NFSv3]) + +AH_TEMPLATE([MNT2_NFS_OPT_READAHEAD], +[set read ahead]) + +AH_TEMPLATE([MNT2_NFS_OPT_READDIRSIZE], +[Set readdir size]) + +AH_TEMPLATE([MNT2_NFS_OPT_RESVPORT], +[Allocate a reserved port]) + +AH_TEMPLATE([MNT2_NFS_OPT_RETRANS], +[set number of request retries]) + +AH_TEMPLATE([MNT2_NFS_OPT_RONLY], +[read only]) + +AH_TEMPLATE([MNT2_NFS_OPT_RPCTIMESYNC], +[use RPC to do secure NFS time sync]) + +AH_TEMPLATE([MNT2_NFS_OPT_RSIZE], +[set read size]) + +AH_TEMPLATE([MNT2_NFS_OPT_SECURE], +[secure mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_SNDLOCK], +[Send socket lock]) + +AH_TEMPLATE([MNT2_NFS_OPT_SOFT], +[soft mount (hard is default)]) + +AH_TEMPLATE([MNT2_NFS_OPT_SPONGY], +[spongy mount]) + +AH_TEMPLATE([MNT2_NFS_OPT_STRICTLOCK], +[Reserved for nfsv4]) +AH_TEMPLATE([MNT2_NFS_OPT_TIMEO], +[set initial timeout]) + +AH_TEMPLATE([MNT2_NFS_OPT_TCP], +[use TCP for mounts]) + +AH_TEMPLATE([MNT2_NFS_OPT_UNSHARED], +[do not use shared cache for all mountpoints]) + +AH_TEMPLATE([MNT2_NFS_OPT_VER3], +[linux NFSv3]) + +AH_TEMPLATE([MNT2_NFS_OPT_WAITAUTH], +[Wait for authentication]) + +AH_TEMPLATE([MNT2_NFS_OPT_WANTAUTH], +[Wants an authenticator]) + +AH_TEMPLATE([MNT2_NFS_OPT_WANTRCV], +[Want receive socket lock]) + +AH_TEMPLATE([MNT2_NFS_OPT_WANTSND], +[Want send socket lock]) + +AH_TEMPLATE([MNT2_NFS_OPT_WSIZE], +[set write size]) + +AH_TEMPLATE([MNT2_NFS_OPT_SYMTTL], +[set symlink cache time-to-live]) + +AH_TEMPLATE([MNT2_NFS_OPT_PGTHRESH], +[paging threshold]) + +AH_TEMPLATE([MNT2_NFS_OPT_XLATECOOKIE], +[32<->64 dir cookie translation]) + +AH_TEMPLATE([MNT2_CDFS_OPT_DEFPERM], +[Ignore permission bits]) + +AH_TEMPLATE([MNT2_CDFS_OPT_EXTATT], +[Enable external attributes]) + +AH_TEMPLATE([MNT2_CDFS_OPT_GENS], +[Show file generations]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NOCASETRANS], +[Disable filename case translation]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NODEFPERM], +[Use on-disk permission bits]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NOJOLIET], +[Disable Joliet extensions]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NORRIP], +[Disable Rock Ridge Interchange Protocol (RRIP) extensions]) + +AH_TEMPLATE([MNT2_CDFS_OPT_NOVERSION], +[Strip off extension from version string]) + +AH_TEMPLATE([MNT2_CDFS_OPT_RRCASEINS], +[Enable Rock Ridge Interchange Protocol (RRIP) case insensitive filename extensions]) + +AH_TEMPLATE([MNT2_CDFS_OPT_RRIP], +[Use Rock Ridge Interchange Protocol (RRIP) extensions]) + +AH_TEMPLATE([MNT2_UDF_OPT_CLOSESESSION], +[Close session when unmounting]) + +AH_TEMPLATE([MNT2_PCFS_OPT_LONGNAME], +[Force Win95 long names]) + +AH_TEMPLATE([MNT2_PCFS_OPT_NOWIN95], +[Completely ignore Win95 entries]) + +AH_TEMPLATE([MNT2_PCFS_OPT_SHORTNAME], +[Force old DOS short names only]) + +AH_TEMPLATE([HAVE_MNTENT_T_MNT_TIME_STRING], +[does mntent_t have mnt_time field and is of type "char *" ?]) + +AH_TEMPLATE([REINSTALL_SIGNAL_HANDLER], +[should signal handlers be reinstalled?]) + +AH_TEMPLATE([DEBUG], +[Turn off general debugging by default]) + +AH_TEMPLATE([DEBUG_MEM], +[Turn off memory debugging by default]) + +AH_TEMPLATE([PACKAGE_NAME], +[Define package name (must be defined by configure.in)]) + +AH_TEMPLATE([PACKAGE_VERSION], +[Define version of package (must be defined by configure.in)]) + +AH_TEMPLATE([PACKAGE_BUGREPORT], +[Define bug-reporting address (must be defined by configure.in)]) + +AH_TEMPLATE([HOST_CPU], +[Define name of host machine's cpu (eg. sparc)]) + +AH_TEMPLATE([HOST_ARCH], +[Define name of host machine's architecture (eg. sun4)]) + +AH_TEMPLATE([DISTRO_NAME], +[Define name of host OS's distribution name (eg. debian, redhat, suse, etc.)]) + +AH_TEMPLATE([HOST_VENDOR], +[Define name of host machine's vendor (eg. sun)]) + +AH_TEMPLATE([HOST_OS], +[Define name and version of host machine (eg. solaris2.5.1)]) + +AH_TEMPLATE([HOST_OS_NAME], +[Define only name of host machine OS (eg. solaris2)]) + +AH_TEMPLATE([HOST_OS_VERSION], +[Define only version of host machine (eg. 2.5.1)]) + +AH_TEMPLATE([HOST_HEADER_VERSION], +[Define the header version of (linux) hosts (eg. 2.2.10)]) + +AH_TEMPLATE([HOST_NAME], +[Define name of host]) + +AH_TEMPLATE([USER_NAME], +[Define user name]) + +AH_TEMPLATE([CONFIG_DATE], +[Define configuration date]) + +AH_TEMPLATE([HAVE_TRANSPORT_TYPE_TLI], +[what type of network transport type is in use? TLI or sockets?]) + +AH_TEMPLATE([time_t], +[Define to `long' if doesn't define time_t]) + +AH_TEMPLATE([voidp], +[Define to "void *" if compiler can handle, otherwise "char *"]) + +AH_TEMPLATE([am_nfs_fh], +[Define a type/structure for an NFS V2 filehandle]) + +AH_TEMPLATE([am_nfs_fh3], +[Define a type/structure for an NFS V3 filehandle]) + +AH_TEMPLATE([HAVE_NFS_PROT_HEADERS], +[define if the host has NFS protocol headers in system headers]) + +AH_TEMPLATE([AMU_NFS_PROTOCOL_HEADER], +[define name of am-utils' NFS protocol header]) + +AH_TEMPLATE([nfs_args_t], +[Define a type for the nfs_args structure]) + +AH_TEMPLATE([NFS_FH_FIELD], +[Define the field name for the filehandle within nfs_args_t]) + +AH_TEMPLATE([HAVE_FHANDLE], +[Define if plain fhandle type exists]) + +AH_TEMPLATE([SVC_IN_ARG_TYPE], +[Define the type of the 3rd argument ('in') to svc_getargs()]) + +AH_TEMPLATE([XDRPROC_T_TYPE], +[Define to the type of xdr procedure type]) + +AH_TEMPLATE([MOUNT_TABLE_ON_FILE], +[Define if mount table is on file, undefine if in kernel]) + +AH_TEMPLATE([HAVE_STRUCT_MNTENT], +[Define if have struct mntent in one of the standard headers]) + +AH_TEMPLATE([HAVE_STRUCT_MNTTAB], +[Define if have struct mnttab in one of the standard headers]) + +AH_TEMPLATE([HAVE_STRUCT_NFS_ARGS], +[Define if have struct nfs_args in one of the standard nfs headers]) + +AH_TEMPLATE([HAVE_STRUCT_NFS_GFS_MOUNT], +[Define if have struct nfs_gfs_mount in one of the standard nfs headers]) + +AH_TEMPLATE([YP_ORDER_OUTORDER_TYPE], +[Type of the 3rd argument to yp_order()]) + +AH_TEMPLATE([RECVFROM_FROMLEN_TYPE], +[Type of the 6th argument to recvfrom()]) + +AH_TEMPLATE([AUTH_CREATE_GIDLIST_TYPE], +[Type of the 5rd argument to authunix_create()]) + +AH_TEMPLATE([MTYPE_PRINTF_TYPE], +[The string used in printf to print the mount-type field of mount(2)]) + +AH_TEMPLATE([MTYPE_TYPE], +[Type of the mount-type field in the mount() system call]) + +AH_TEMPLATE([pcfs_args_t], +[Define a type for the pcfs_args structure]) + +AH_TEMPLATE([autofs_args_t], +[Define a type for the autofs_args structure]) + +AH_TEMPLATE([cachefs_args_t], +[Define a type for the cachefs_args structure]) + +AH_TEMPLATE([tmpfs_args_t], +[Define a type for the tmpfs_args structure]) + +AH_TEMPLATE([ufs_args_t], +[Define a type for the ufs_args structure]) + +AH_TEMPLATE([efs_args_t], +[Define a type for the efs_args structure]) + +AH_TEMPLATE([xfs_args_t], +[Define a type for the xfs_args structure]) + +AH_TEMPLATE([lofs_args_t], +[Define a type for the lofs_args structure]) + +AH_TEMPLATE([cdfs_args_t], +[Define a type for the cdfs_args structure]) + +AH_TEMPLATE([udf_args_t], +[Define a type for the udf_args structure]) + +AH_TEMPLATE([mfs_args_t], +[Define a type for the mfs_args structure]) + +AH_TEMPLATE([rfs_args_t], +[Define a type for the rfs_args structure]) + +AH_TEMPLATE([HAVE_BAD_HASMNTOPT], +[define if have a bad version of hasmntopt()]) + +AH_TEMPLATE([HAVE_BAD_MEMCMP], +[define if have a bad version of memcmp()]) + +AH_TEMPLATE([HAVE_BAD_YP_ALL], +[define if have a bad version of yp_all()]) + +AH_TEMPLATE([USE_UNCONNECTED_NFS_SOCKETS], +[define if must use NFS "noconn" option]) + +AH_TEMPLATE([USE_CONNECTED_NFS_SOCKETS], +[define if must NOT use NFS "noconn" option]) + +AH_TEMPLATE([HAVE_GNU_GETOPT], +[define if your system's getopt() is GNU getopt() (are you using glibc)]) + +AH_TEMPLATE([HAVE_EXTERN_SYS_ERRLIST], +[does extern definition for sys_errlist[] exist?]) + +AH_TEMPLATE([HAVE_EXTERN_OPTARG], +[does extern definition for optarg exist?]) + +AH_TEMPLATE([HAVE_EXTERN_CLNT_SPCREATEERROR], +[does extern definition for clnt_spcreateerror() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_CLNT_SPERRNO], +[does extern definition for clnt_sperrno() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_FREE], +[does extern definition for free() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GET_MYADDRESS], +[does extern definition for get_myaddress() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETCCENT], +[does extern definition for getccent() (hpux) exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETDOMAINNAME], +[does extern definition for getdomainname() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETDTABLESIZE], +[does extern definition for getdtablesize() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETHOSTNAME], +[does extern definition for gethostname() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETLOGIN], +[does extern definition for getlogin() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETTABLESIZE], +[does extern definition for gettablesize() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETPAGESIZE], +[does extern definition for getpagesize() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_GETWD], +[does extern definition for getwd() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_HOSTS_CTL], +[does extern definition for hosts_ctl() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_INNETGR], +[does extern definition for innetgr() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_MKSTEMP], +[does extern definition for mkstemp() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_MNTCTL], +[does extern definition for mntctl() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_SBRK], +[does extern definition for sbrk() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_SETEUID], +[does extern definition for seteuid() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_SETITIMER], +[does extern definition for setitimer() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_SLEEP], +[does extern definition for sleep() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_STRCASECMP], +[does extern definition for strcasecmp() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_STRLCAT], +[does extern definition for strlcat() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_STRLCPY], +[does extern definition for strlcpy() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_STRSTR], +[does extern definition for strstr() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_UALARM], +[does extern definition for ualarm() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_USLEEP], +[does extern definition for usleep() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_WAIT3], +[does extern definition for wait3() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_VSNPRINTF], +[does extern definition for vsnprintf() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_XDR_CALLMSG], +[does extern definition for xdr_callmsg() exist?]) + +AH_TEMPLATE([HAVE_EXTERN_XDR_OPAQUE_AUTH], +[does extern definition for xdr_opaque_auth() exist?]) + +AH_TEMPLATE([NEW_DBM_H], +[Defined to the header file containing ndbm-compatible definitions]) + +AH_TEMPLATE([HAVE_LIBWRAP], +[does libwrap exist?]) + +AH_TEMPLATE([NEED_LIBWRAP_SEVERITY_VARIABLES], +[does libwrap expect caller to define the variables allow_severity and deny_severity]) + +AH_TEMPLATE([HAVE_EXTERN_LDAP_ENABLE_CACHE], +[does extern definition for ldap_enable_cache() exist?]) diff --git a/m4/macros/host_macros.m4 b/m4/macros/host_macros.m4 new file mode 100644 index 00000000000..faa7434c7a9 --- /dev/null +++ b/m4/macros/host_macros.m4 @@ -0,0 +1,119 @@ +dnl ###################################################################### +dnl AC_HOST_MACROS: define HOST_CPU, HOST_VENDOR, and HOST_OS +AC_DEFUN([AMU_HOST_MACROS], +[ +# these are defined already by the macro 'CANONICAL_HOST' + AC_MSG_CHECKING([host cpu]) + AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu") + AC_MSG_RESULT($host_cpu) + + AC_MSG_CHECKING([vendor]) + AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor") + AC_MSG_RESULT($host_vendor) + +# if vendor is apple, then check values in /usr/bin/sw_vers + if test "${host_vendor}" = "apple" + then + pn=`sw_vers -productName 2>/dev/null` + pv=`sw_vers -productVersion 2>/dev/null` + if test -n "${pn}" && test -n "${pv}" + then + host_os_name=`echo ${pn} | tr -d ' ' | tr '[A-Z]' '[a-z]'` + host_os_version="${pv}" + host_os="${host_os_name}-${host_os_version}" + fi + fi + + AC_MSG_CHECKING([host full OS name and version]) + # normalize some host OS names + case ${host_os} in + # linux is linux is linux, regardless of RMS. + linux-gnu* | lignux* ) host_os=linux ;; + # NetBSD systems today are elf, so no need to distinguish + netbsdelf* ) host_os=`echo ${host_os} | sed 's/^netbsdelf/netbsd/'`;; + esac + AC_DEFINE_UNQUOTED(HOST_OS, "$host_os") + AC_MSG_RESULT($host_os) + +# break host_os into host_os_name and host_os_version + AC_MSG_CHECKING([host OS name]) + host_os_name=`echo $host_os | sed 's/\..*//g'` + # normalize some OS names + case ${host_os_name} in + # linux is linux is linux, regardless of RMS. + linux-gnu* | lignux* ) host_os_name=linux ;; + # all NetBSD systems today should just show up as "netbsd" + netbsd* ) host_os_name=netbsd;; + esac + AC_DEFINE_UNQUOTED(HOST_OS_NAME, "$host_os_name") + AC_MSG_RESULT($host_os_name) + +# parse out the OS version of the host + AC_MSG_CHECKING([host OS version]) + host_os_version=`echo $host_os | sed 's/^[[^0-9]]*//g'` + if test -z "$host_os_version" + then + host_os_version=`(uname -r) 2>/dev/null` || host_os_version=unknown + fi + case ${host_os_version} in + # fixes for some OS versions (solaris used to be here) + * ) # do nothing for now + ;; + esac + AC_DEFINE_UNQUOTED(HOST_OS_VERSION, "$host_os_version") + AC_MSG_RESULT($host_os_version) + +# figure out host architecture (different than CPU) + AC_MSG_CHECKING([host OS architecture]) + host_arch=`(uname -m) 2>/dev/null` || host_arch=unknown + # normalize some names + case ${host_arch} in + sun4* ) host_arch=sun4 ;; + sun3x ) host_arch=sun3 ;; + sun ) host_arch=`(arch) 2>/dev/null` || host_arch=unknown ;; + i?86 ) host_arch=i386 ;; # all x86 should show up as i386 + Power*Macintosh ) host_arch=powerpc ;; + esac + AC_DEFINE_UNQUOTED(HOST_ARCH, "$host_arch") + AC_MSG_RESULT($host_arch) + +# figure out (linux) distribution, if any + AC_MSG_CHECKING([OS system distribution]) + ac_config_distro=`$SHELL $ac_aux_dir/config.guess.long | cut -d'-' -f4-` + if test -z "$ac_config_distro" + then + ac_config_distro="none" + fi + AC_DEFINE_UNQUOTED(DISTRO_NAME, "$ac_config_distro") + AC_MSG_RESULT($ac_config_distro) + +# figure out host name + AC_MSG_CHECKING([host name]) + host_name=`(hostname || uname -n) 2>/dev/null` || host_name=unknown + AC_DEFINE_UNQUOTED(HOST_NAME, "$host_name") + AC_MSG_RESULT($host_name) + +# figure out user name + AC_MSG_CHECKING([user name]) + if test -n "$USER" + then + user_name="$USER" + else + if test -n "$LOGNAME" + then + user_name="$LOGNAME" + else + user_name=`(whoami) 2>/dev/null` || user_name=unknown + fi + fi + AC_DEFINE_UNQUOTED(USER_NAME, "$user_name") + AC_MSG_RESULT($user_name) + +# figure out configuration date + AC_MSG_CHECKING([configuration date]) + config_date=`(date) 2>/dev/null` || config_date=unknown_date + AC_DEFINE_UNQUOTED(CONFIG_DATE, "$config_date") + AC_MSG_RESULT($config_date) + +]) +dnl ====================================================================== diff --git a/m4/macros/libtool.m4 b/m4/macros/libtool.m4 new file mode 100644 index 00000000000..d7c043f4f99 --- /dev/null +++ b/m4/macros/libtool.m4 @@ -0,0 +1,7997 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 57 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/m4/macros/linux_headers.m4 b/m4/macros/linux_headers.m4 new file mode 100644 index 00000000000..63c5d6a05ac --- /dev/null +++ b/m4/macros/linux_headers.m4 @@ -0,0 +1,49 @@ +dnl ###################################################################### +dnl ensure that linux kernel headers match running kernel +AC_DEFUN([AMU_LINUX_HEADERS], +[ +# test sanity of running kernel vs. kernel headers + AC_MSG_CHECKING("host headers version") + case ${host_os} in + linux ) + host_header_version="bad" + AMU_EXPAND_RUN_STRING( +[ +#include +#include +], +[ +if (argc > 1) +#ifdef UTS_RELEASE + printf("%s", UTS_RELEASE); +#else +# define AMU_MA(a) ((a) >> 16) +# define AMU_MI(a) (((a) & 0xffff) >> 8) +# define AMU_PL(a) ((a) & 0xff) + printf("%d.%d.%d", AMU_MA(LINUX_VERSION_CODE), AMU_MI(LINUX_VERSION_CODE), AMU_PL(LINUX_VERSION_CODE)); +#endif +], +[ host_header_version=$value ], +[ echo + AC_MSG_ERROR([cannot find UTS_RELEASE in . + This Linux system may be misconfigured or unconfigured!]) +]) + ;; + * ) host_header_version=$host_os_version ;; + esac + AC_DEFINE_UNQUOTED(HOST_HEADER_VERSION, "$host_header_version") + AC_MSG_RESULT($host_header_version) + + case ${host_os} in + linux ) + if test "$host_os_version" != $host_header_version + then + AC_MSG_WARN([Linux kernel $host_os_version mismatch with $host_header_version headers!]) + fi + ;; +esac +dnl cache these two for debugging purposes +ac_cv_os_version=$host_os_version +ac_cv_header_version=$host_header_version +]) +dnl ====================================================================== diff --git a/m4/macros/localconfig.m4 b/m4/macros/localconfig.m4 new file mode 100644 index 00000000000..8efc6c1ec54 --- /dev/null +++ b/m4/macros/localconfig.m4 @@ -0,0 +1,13 @@ +dnl ###################################################################### +dnl check if a local configuration file exists +AC_DEFUN([AMU_LOCALCONFIG], +[AC_MSG_CHECKING(a local configuration file) +if test -f localconfig.h +then + AC_DEFINE(HAVE_LOCALCONFIG_H) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/mount_headers.m4 b/m4/macros/mount_headers.m4 new file mode 100644 index 00000000000..cf7b9103907 --- /dev/null +++ b/m4/macros/mount_headers.m4 @@ -0,0 +1,12 @@ +dnl ###################################################################### +dnl an M4 macro to include a list of common headers being used everywhere +define(AMU_MOUNT_HEADERS, +[ +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + +$1 +] +) +dnl ====================================================================== diff --git a/m4/macros/opt_amu_cflags.m4 b/m4/macros/opt_amu_cflags.m4 new file mode 100644 index 00000000000..1194786b915 --- /dev/null +++ b/m4/macros/opt_amu_cflags.m4 @@ -0,0 +1,24 @@ +dnl ###################################################################### +dnl Which options to add to CFLAGS for compilation? +dnl NOTE: this is only for final compiltions, not for configure tests) +AC_DEFUN([AMU_OPT_AMU_CFLAGS], +[AC_MSG_CHECKING(for additional C option compilation flags) +AC_ARG_ENABLE(am-cflags, +AC_HELP_STRING([--enable-am-cflags=ARG], + [compile package with ARG additional C flags]), +[ +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + AC_MSG_ERROR(am-cflags must be supplied if option is used) +fi +# user supplied a cflags option to configure +AMU_CFLAGS="$enableval" +AC_SUBST(AMU_CFLAGS) +AC_MSG_RESULT($enableval) +], [ + # default is to have no additional C flags + AMU_CFLAGS="" + AC_SUBST(AMU_CFLAGS) + AC_MSG_RESULT(none) +]) +]) +dnl ====================================================================== diff --git a/m4/macros/opt_cppflags.m4 b/m4/macros/opt_cppflags.m4 new file mode 100644 index 00000000000..9cb72362573 --- /dev/null +++ b/m4/macros/opt_cppflags.m4 @@ -0,0 +1,22 @@ +dnl ###################################################################### +dnl Initial settings for CPPFLAGS (-I options) +dnl NOTE: this is for configuration as well as compilations! +AC_DEFUN([AMU_OPT_CPPFLAGS], +[AC_MSG_CHECKING(for configuration/compilation (-I) preprocessor flags) +AC_ARG_ENABLE(cppflags, +AC_HELP_STRING([--enable-cppflags=ARG], + [configure/compile with ARG (-I) preprocessor flags]), +[ +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + AC_MSG_ERROR(cppflags must be supplied if option is used) +fi +# use supplied options +CPPFLAGS="$CPPFLAGS $enableval" +export CPPFLAGS +AC_MSG_RESULT($enableval) +], [ + # default is to have no additional flags + AC_MSG_RESULT(none) +]) +]) +dnl ====================================================================== diff --git a/m4/macros/opt_debug.m4 b/m4/macros/opt_debug.m4 new file mode 100644 index 00000000000..b6f044e906b --- /dev/null +++ b/m4/macros/opt_debug.m4 @@ -0,0 +1,30 @@ +dnl ###################################################################### +dnl Debugging: "yes" means general, "mem" means general and memory debugging, +dnl and "no" means none. +AC_DEFUN([AMU_OPT_DEBUG], +[AC_MSG_CHECKING(for debugging options) +AC_ARG_ENABLE(debug, +AC_HELP_STRING([--enable-debug=ARG],[enable debugging (yes/mem/no)]), +[ +if test "$enableval" = yes; then + AC_MSG_RESULT(yes) + AC_DEFINE(DEBUG) + ac_cv_opt_debug=yes +elif test "$enableval" = mem; then + AC_MSG_RESULT(mem) + AC_DEFINE(DEBUG) + AC_DEFINE(DEBUG_MEM) + AC_CHECK_FUNC(malloc_verify,,AC_CHECK_LIB(mapmalloc, malloc_verify)) + AC_CHECK_FUNC(mallinfo,,AC_CHECK_LIB(malloc, mallinfo)) + ac_cv_opt_debug=mem +else + AC_MSG_RESULT(no) + ac_cv_opt_debug=no +fi +], +[ + # default is no debugging + AC_MSG_RESULT(no) +]) +]) +dnl ====================================================================== diff --git a/m4/macros/opt_ldflags.m4 b/m4/macros/opt_ldflags.m4 new file mode 100644 index 00000000000..cf3ee432072 --- /dev/null +++ b/m4/macros/opt_ldflags.m4 @@ -0,0 +1,22 @@ +dnl ###################################################################### +dnl Initial settings for LDFLAGS (-L options) +dnl NOTE: this is for configuration as well as compilations! +AC_DEFUN([AMU_OPT_LDFLAGS], +[AC_MSG_CHECKING(for configuration/compilation (-L) library flags) +AC_ARG_ENABLE(ldflags, +AC_HELP_STRING([--enable-ldflags=ARG], + [configure/compile with ARG (-L) library flags]), +[ +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + AC_MSG_ERROR(ldflags must be supplied if option is used) +fi +# use supplied options +LDFLAGS="$LDFLAGS $enableval" +export LDFLAGS +AC_MSG_RESULT($enableval) +], [ + # default is to have no additional flags + AC_MSG_RESULT(none) +]) +]) +dnl ====================================================================== diff --git a/m4/macros/opt_libs.m4 b/m4/macros/opt_libs.m4 new file mode 100644 index 00000000000..e7414860720 --- /dev/null +++ b/m4/macros/opt_libs.m4 @@ -0,0 +1,22 @@ +dnl ###################################################################### +dnl Initial settings for LIBS (-l options) +dnl NOTE: this is for configuration as well as compilations! +AC_DEFUN([AMU_OPT_LIBS], +[AC_MSG_CHECKING(for configuration/compilation (-l) library flags) +AC_ARG_ENABLE(libs, +AC_HELP_STRING([--enable-libs=ARG], + [configure/compile with ARG (-l) library flags]), +[ +if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then + AC_MSG_ERROR(libs must be supplied if option is used) +fi +# use supplied options +LIBS="$LIBS $enableval" +export LIBS +AC_MSG_RESULT($enableval) +], [ + # default is to have no additional flags + AC_MSG_RESULT(none) +]) +]) +dnl ====================================================================== diff --git a/m4/macros/os_cflags.m4 b/m4/macros/os_cflags.m4 new file mode 100644 index 00000000000..c57dec70db2 --- /dev/null +++ b/m4/macros/os_cflags.m4 @@ -0,0 +1,92 @@ +dnl ###################################################################### +dnl Specify additional compile options based on the OS and the compiler +AC_DEFUN([AMU_OS_CFLAGS], +[ +AC_CACHE_CHECK(additional compiler flags, +ac_cv_os_cflags, +[ +case "${host_os}" in + irix6* ) + case "${CC}" in + cc ) + # do not use 64-bit compiler + ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84" + ;; + esac + ;; + osf[[1-3]]* ) + # get the right version of struct sockaddr + case "${CC}" in + cc ) + ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO" + ;; + * ) + ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO" + ;; + esac + ;; + osf* ) + # get the right version of struct sockaddr + case "${CC}" in + cc ) + ac_cv_os_cflags="-std -D_SOCKADDR_LEN" + ;; + * ) + ac_cv_os_cflags="-D_SOCKADDR_LEN" + ;; + esac + ;; + aix[[1-3]]* ) + ac_cv_os_cflags="" ;; + aix4.[[0-2]]* ) + # turn on additional headers + ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE" + ;; + aix5.3* ) + # avoid circular dependencies in yp headers, and more + ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS -D_MSGQSUPPORT" + ;; + aix* ) + # avoid circular dependencies in yp headers + ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE -D_USE_IRS" + ;; + OFF-sunos4* ) + # make sure passing whole structures is handled in gcc + case "${CC}" in + gcc ) + ac_cv_os_cflags="-fpcc-struct-return" + ;; + esac + ;; + sunos[[34]]* | solaris1* | solaris2.[[0-5]] | sunos5.[[0-5]] | solaris2.5.* | sunos5.5.* ) + ac_cv_os_cflags="" ;; + solaris2* | sunos5* ) + # turn on 64-bit file offset interface + case "${CC}" in + * ) + ac_cv_os_cflags="-D_LARGEFILE64_SOURCE" + ;; + esac + ;; + hpux* ) + # use Ansi compiler on HPUX + case "${CC}" in + cc ) + ac_cv_os_cflags="-Ae" + ;; + esac + ;; + darwin* | macosx* | rhapsody* ) + ac_cv_os_cflags="-D_P1003_1B_VISIBLE" + ;; + * ) + ac_cv_os_cflags="" + ;; +esac +]) +AMU_CFLAGS="$AMU_CFLAGS $ac_cv_os_cflags" +# use same flags for configuring, so it matches what we do at compile time +CFLAGS="$CFLAGS $ac_cv_os_cflags" +export CFLAGS +]) +dnl ====================================================================== diff --git a/m4/macros/os_cppflags.m4 b/m4/macros/os_cppflags.m4 new file mode 100644 index 00000000000..cd8ae8ba165 --- /dev/null +++ b/m4/macros/os_cppflags.m4 @@ -0,0 +1,18 @@ +dnl ###################################################################### +dnl Specify additional cpp options based on the OS and the compiler +AC_DEFUN([AMU_OS_CPPFLAGS], +[ +AC_CACHE_CHECK(additional preprocessor flags, +ac_cv_os_cppflags, +[ +case "${host_os}" in +# off for now, posix may be a broken thing for nextstep3... +# nextstep* ) +# ac_cv_os_cppflags="-D_POSIX_SOURCE" +# ;; + * ) ac_cv_os_cppflags="" ;; +esac +]) +CPPFLAGS="$CPPFLAGS $ac_cv_os_cppflags" +]) +dnl ====================================================================== diff --git a/m4/macros/os_ldflags.m4 b/m4/macros/os_ldflags.m4 new file mode 100644 index 00000000000..a81972f3d26 --- /dev/null +++ b/m4/macros/os_ldflags.m4 @@ -0,0 +1,22 @@ +dnl ###################################################################### +dnl Specify additional linker options based on the OS and the compiler +AC_DEFUN([AMU_OS_LDFLAGS], +[ +AC_CACHE_CHECK(additional linker flags, +ac_cv_os_ldflags, +[ +case "${host_os}" in + solaris2.7* | sunos5.7* ) + # find LDAP: off until Sun includes ldap headers. + case "${CC}" in + * ) + #ac_cv_os_ldflags="-L/usr/lib/fn" + ;; + esac + ;; + * ) ac_cv_os_ldflags="" ;; +esac +]) +LDFLAGS="$LDFLAGS $ac_cv_os_ldflags" +]) +dnl ====================================================================== diff --git a/m4/macros/package_bugreport.m4 b/m4/macros/package_bugreport.m4 new file mode 100644 index 00000000000..8e1688d9f4a --- /dev/null +++ b/m4/macros/package_bugreport.m4 @@ -0,0 +1,8 @@ +dnl ###################################################################### +dnl Bugreport name +AC_DEFUN([AMU_PACKAGE_BUGREPORT], +[AC_MSG_CHECKING(bug-reporting address) +AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$1") +AC_MSG_RESULT(\"$1\") +]) +dnl ====================================================================== diff --git a/m4/macros/package_name.m4 b/m4/macros/package_name.m4 new file mode 100644 index 00000000000..27f5711bf3e --- /dev/null +++ b/m4/macros/package_name.m4 @@ -0,0 +1,8 @@ +dnl ###################################################################### +dnl Package name +AC_DEFUN([AMU_PACKAGE_NAME], +[AC_MSG_CHECKING(package name) +AC_DEFINE_UNQUOTED(PACKAGE_NAME, "$1") +AC_MSG_RESULT(\"$1\") +]) +dnl ====================================================================== diff --git a/m4/macros/package_version.m4 b/m4/macros/package_version.m4 new file mode 100644 index 00000000000..0d6c6ef25f7 --- /dev/null +++ b/m4/macros/package_version.m4 @@ -0,0 +1,8 @@ +dnl ###################################################################### +dnl Version of package +AC_DEFUN([AMU_PACKAGE_VERSION], +[AC_MSG_CHECKING(version of package) +AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$1") +AC_MSG_RESULT(\"$1\") +]) +dnl ====================================================================== diff --git a/m4/macros/prog_lex.m4 b/m4/macros/prog_lex.m4 new file mode 100644 index 00000000000..43da78a86cd --- /dev/null +++ b/m4/macros/prog_lex.m4 @@ -0,0 +1,14 @@ +dnl find f/lex, but error if none found +AC_DEFUN_ONCE([AMU_PROG_LEX], +[AC_CHECK_PROGS(LEX, flex lex, :) +if test -z "$LEXLIB" +then + AC_CHECK_LIB(fl, yywrap, LEXLIB="-lfl", + [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")]) +fi +AC_SUBST(LEXLIB) +if test "x$LEX" != "x:"; then + _AC_PROG_LEX_YYTEXT_DECL +else + AC_MSG_ERROR([cannot find flex/lex -- needed for am-utils]) +fi]) diff --git a/m4/macros/prog_yacc.m4 b/m4/macros/prog_yacc.m4 new file mode 100644 index 00000000000..666cdef3f96 --- /dev/null +++ b/m4/macros/prog_yacc.m4 @@ -0,0 +1,6 @@ +dnl find bison/yacc, but error if none found +AC_DEFUN([AMU_PROG_YACC], +[AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :) +if test "x$YACC" = "x:"; then + AC_MSG_ERROR([cannot find bison/yacc/byacc -- needed for am-utils]) +fi]) diff --git a/m4/macros/save_state.m4 b/m4/macros/save_state.m4 new file mode 100644 index 00000000000..abc7b55fb00 --- /dev/null +++ b/m4/macros/save_state.m4 @@ -0,0 +1,13 @@ +dnl ###################################################################### +dnl AC_SAVE_STATE: save confdefs.h onto dbgcf.h and write $ac_cv_* cache +dnl variables that are known so far. +define(AMU_SAVE_STATE, +dnl AC_MSG_NOTICE(*** SAVING CONFIGURE STATE ***) +if test -f confdefs.h +then + cp confdefs.h dbgcf.h +fi +[AC_CACHE_SAVE +AC_MSG_NOTICE([*** SAVING CONFIGURE STATE ***])] +) +dnl ====================================================================== diff --git a/m4/macros/struct_field_nfs_fh.m4 b/m4/macros/struct_field_nfs_fh.m4 new file mode 100644 index 00000000000..5bada3081e3 --- /dev/null +++ b/m4/macros/struct_field_nfs_fh.m4 @@ -0,0 +1,35 @@ +dnl ###################################################################### +dnl Find the name of the nfs filehandle field in nfs_args_t. +AC_DEFUN([AMU_STRUCT_FIELD_NFS_FH], +[ +dnl make sure this is called before macros which depend on it +AC_BEFORE([$0], [AC_TYPE_NFS_FH]) +AC_CACHE_CHECK(for the name of the nfs filehandle field in nfs_args_t, +ac_cv_struct_field_nfs_fh, +[ +# set to a default value +ac_cv_struct_field_nfs_fh=notfound +# look for name "fh" (most systems) +if test "$ac_cv_struct_field_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfs_args_t nat; + char *cp = (char *) &(nat.fh); +], ac_cv_struct_field_nfs_fh=fh, ac_cv_struct_field_nfs_fh=notfound) +fi + +# look for name "root" (for example Linux) +if test "$ac_cv_struct_field_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfs_args_t nat; + char *cp = (char *) &(nat.root); +], ac_cv_struct_field_nfs_fh=root, ac_cv_struct_field_nfs_fh=notfound) +fi +]) +if test "$ac_cv_struct_field_nfs_fh" != notfound +then + AC_DEFINE_UNQUOTED(NFS_FH_FIELD, $ac_cv_struct_field_nfs_fh) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/struct_mntent.m4 b/m4/macros/struct_mntent.m4 new file mode 100644 index 00000000000..d9f481194dd --- /dev/null +++ b/m4/macros/struct_mntent.m4 @@ -0,0 +1,21 @@ +dnl ###################################################################### +dnl Find if struct mntent exists anywhere in mount.h or mntent.h headers +AC_DEFUN([AMU_STRUCT_MNTENT], +[ +AC_CACHE_CHECK(for struct mntent, +ac_cv_have_struct_mntent, +[ +# try to compile a program which may have a definition for the structure +AC_TRY_COMPILE( +AMU_MOUNT_HEADERS +, +[ +struct mntent mt; +], ac_cv_have_struct_mntent=yes, ac_cv_have_struct_mntent=no) +]) +if test "$ac_cv_have_struct_mntent" = yes +then + AC_DEFINE(HAVE_STRUCT_MNTENT) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/struct_mnttab.m4 b/m4/macros/struct_mnttab.m4 new file mode 100644 index 00000000000..ed1cb5635ae --- /dev/null +++ b/m4/macros/struct_mnttab.m4 @@ -0,0 +1,21 @@ +dnl ###################################################################### +dnl Find if struct mnttab exists anywhere in mount.h or mnttab.h headers +AC_DEFUN([AMU_STRUCT_MNTTAB], +[ +AC_CACHE_CHECK(for struct mnttab, +ac_cv_have_struct_mnttab, +[ +# try to compile a program which may have a definition for the structure +AC_TRY_COMPILE( +AMU_MOUNT_HEADERS +, +[ +struct mnttab mt; +], ac_cv_have_struct_mnttab=yes, ac_cv_have_struct_mnttab=no) +]) +if test "$ac_cv_have_struct_mnttab" = yes +then + AC_DEFINE(HAVE_STRUCT_MNTTAB) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/struct_nfs_args.m4 b/m4/macros/struct_nfs_args.m4 new file mode 100644 index 00000000000..4e6600ff79e --- /dev/null +++ b/m4/macros/struct_nfs_args.m4 @@ -0,0 +1,55 @@ +dnl ###################################################################### +dnl Find if struct nfs_args exists anywhere in typical headers +AC_DEFUN([AMU_STRUCT_NFS_ARGS], +[ +dnl make sure this is called before [AC_TYPE_NFS_FH] +AC_BEFORE([$0], [AC_TYPE_NFS_FH]) +AC_BEFORE([$0], [AC_STRUCT_FIELD_NFS_FH]) +AC_CACHE_CHECK(for struct nfs_args, +ac_cv_have_struct_nfs_args, +[ +# try to compile a program which may have a definition for the structure +# assume not found +ac_cv_have_struct_nfs_args=notfound + +# look for "struct irix5_nfs_args" (specially set in conf/nfs_prot/) +if test "$ac_cv_have_struct_nfs_args" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct irix5_nfs_args na; +], ac_cv_have_struct_nfs_args="struct irix5_nfs_args", ac_cv_have_struct_nfs_args=notfound) +fi + +# look for "struct aix5_nfs_args" (specially set in conf/nfs_prot/) +if test "$ac_cv_have_struct_nfs_args" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct aix5_nfs_args na; +], ac_cv_have_struct_nfs_args="struct aix5_nfs_args", ac_cv_have_struct_nfs_args=notfound) +fi + +# look for "struct aix4_nfs_args" (specially set in conf/nfs_prot/) +if test "$ac_cv_have_struct_nfs_args" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct aix4_nfs_args na; +], ac_cv_have_struct_nfs_args="struct aix4_nfs_args", ac_cv_have_struct_nfs_args=notfound) +fi + +# look for "struct nfs_args" +if test "$ac_cv_have_struct_nfs_args" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct nfs_args na; +], ac_cv_have_struct_nfs_args="struct nfs_args", ac_cv_have_struct_nfs_args=notfound) +fi + +]) + +if test "$ac_cv_have_struct_nfs_args" != notfound +then + AC_DEFINE(HAVE_STRUCT_NFS_ARGS) + AC_DEFINE_UNQUOTED(nfs_args_t, $ac_cv_have_struct_nfs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/struct_nfs_fh.m4 b/m4/macros/struct_nfs_fh.m4 new file mode 100644 index 00000000000..8a60675db3e --- /dev/null +++ b/m4/macros/struct_nfs_fh.m4 @@ -0,0 +1,63 @@ +dnl ###################################################################### +dnl Find the structure of an nfs filehandle. +dnl if found, defined am_nfs_fh to it, else leave it undefined. +dnl THE ORDER OF LOOKUPS IN THIS FILE IS VERY IMPORTANT!!! +AC_DEFUN([AMU_STRUCT_NFS_FH], +[ +AC_CACHE_CHECK(for type/structure of NFS V2 filehandle, +ac_cv_struct_nfs_fh, +[ +# try to compile a program which may have a definition for the type +dnl need a series of compilations, which will test out every possible type +dnl such as struct nfs_fh, fhandle_t, nfsv2fh_t, etc. +# set to a default value +ac_cv_struct_nfs_fh=notfound + +# look for "nfs_fh" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfs_fh nh; +], ac_cv_struct_nfs_fh="nfs_fh", ac_cv_struct_nfs_fh=notfound) +fi + +# look for "struct nfs_fh" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct nfs_fh nh; +], ac_cv_struct_nfs_fh="struct nfs_fh", ac_cv_struct_nfs_fh=notfound) +fi + +# look for "struct nfssvcfh" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct nfssvcfh nh; +], ac_cv_struct_nfs_fh="struct nfssvcfh", ac_cv_struct_nfs_fh=notfound) +fi + +# look for "nfsv2fh_t" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfsv2fh_t nh; +], ac_cv_struct_nfs_fh="nfsv2fh_t", ac_cv_struct_nfs_fh=notfound) +fi + +# look for "fhandle_t" +if test "$ac_cv_struct_nfs_fh" = notfound +then +AC_TRY_COMPILE_NFS( +[ fhandle_t nh; +], ac_cv_struct_nfs_fh="fhandle_t", ac_cv_struct_nfs_fh=notfound) +fi + +]) + +if test "$ac_cv_struct_nfs_fh" != notfound +then + AC_DEFINE_UNQUOTED(am_nfs_fh, $ac_cv_struct_nfs_fh) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/struct_nfs_fh3.m4 b/m4/macros/struct_nfs_fh3.m4 new file mode 100644 index 00000000000..7d5cac0bb44 --- /dev/null +++ b/m4/macros/struct_nfs_fh3.m4 @@ -0,0 +1,39 @@ +dnl ###################################################################### +dnl Find the structure of an nfs filehandle. +dnl if found, defined am_nfs_fh3 to it, else leave it undefined. +dnl THE ORDER OF LOOKUPS IN THIS FILE IS VERY IMPORTANT!!! +AC_DEFUN([AMU_STRUCT_NFS_FH3], +[ +AC_CACHE_CHECK(for type/structure of NFS V3 filehandle, +ac_cv_struct_nfs_fh3, +[ +# try to compile a program which may have a definition for the type +dnl need a series of compilations, which will test out every possible type +dnl such as struct nfs_fh3, XXX - what else?, etc. +# set to a default value +ac_cv_struct_nfs_fh3=notfound + +# look for "nfs_fh3" +if test "$ac_cv_struct_nfs_fh3" = notfound +then +AC_TRY_COMPILE_NFS( +[ nfs_fh3 nh; +], ac_cv_struct_nfs_fh3="nfs_fh3_netbsd20", ac_cv_struct_nfs_fh3=notfound) +fi + +# look for "struct nfs_fh3" +if test "$ac_cv_struct_nfs_fh3" = notfound +then +AC_TRY_COMPILE_NFS( +[ struct nfs_fh3 nh; +], ac_cv_struct_nfs_fh3="struct nfs_fh3", ac_cv_struct_nfs_fh3=notfound) +fi + +]) + +if test "$ac_cv_struct_nfs_fh3" != notfound +then + AC_DEFINE_UNQUOTED(am_nfs_fh3, $ac_cv_struct_nfs_fh3) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/struct_nfs_gfs_mount.m4 b/m4/macros/struct_nfs_gfs_mount.m4 new file mode 100644 index 00000000000..026d37935d4 --- /dev/null +++ b/m4/macros/struct_nfs_gfs_mount.m4 @@ -0,0 +1,22 @@ +dnl ###################################################################### +dnl Find if struct nfs_gfs_mount exists anywhere in typical headers +AC_DEFUN([AMU_STRUCT_NFS_GFS_MOUNT], +[ +dnl make sure this is called before [AC_TYPE_NFS_FH] +AC_BEFORE([$0], [AC_TYPE_NFS_FH]) +AC_BEFORE([$0], [AC_STRUCT_FIELD_NFS_FH]) +AC_CACHE_CHECK(for struct nfs_gfs_mount, +ac_cv_have_struct_nfs_gfs_mount, +[ +# try to compile a program which may have a definition for the structure +AC_TRY_COMPILE_NFS( +[ struct nfs_gfs_mount ngm; +], ac_cv_have_struct_nfs_gfs_mount=yes, ac_cv_have_struct_nfs_gfs_mount=no) +]) +if test "$ac_cv_have_struct_nfs_gfs_mount" = yes +then + AC_DEFINE(HAVE_STRUCT_NFS_GFS_MOUNT) + AC_DEFINE(nfs_args_t, struct nfs_gfs_mount) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/try_compile_anyfs.m4 b/m4/macros/try_compile_anyfs.m4 new file mode 100644 index 00000000000..22a57198237 --- /dev/null +++ b/m4/macros/try_compile_anyfs.m4 @@ -0,0 +1,185 @@ +dnl ###################################################################### +dnl Compile a program with FS headers to try and find a feature. +dnl The headers part are fixed. Only three arguments are allowed: +dnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE) +dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) +dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) +AC_DEFUN([AC_TRY_COMPILE_ANYFS], +[# try to compile a program which may have a definition for a structure +AC_TRY_COMPILE( +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_SYS_ERRNO_H +# include +#endif /* HAVE_SYS_ERRNO_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + +#if TIME_WITH_SYS_TIME +# include +# include +#else /* not TIME_WITH_SYS_TIME */ +# if HAVE_SYS_TIME_H +# include +# else /* not HAVE_SYS_TIME_H */ +# include +# endif /* not HAVE_SYS_TIME_H */ +#endif /* not TIME_WITH_SYS_TIME */ + +#ifdef HAVE_NETINET_IN_H +# include +#endif /* HAVE_NETINET_IN_H */ +#ifdef HAVE_SYS_TIUSER_H +# include +#endif /* HAVE_SYS_TIUSER_H */ + +#ifdef HAVE_SYS_MOUNT_H +# ifndef NFSCLIENT +# define NFSCLIENT +# endif /* not NFSCLIENT */ +# ifndef PCFS +# define PCFS +# endif /* not PCFS */ +# ifndef LOFS +# define LOFS +# endif /* not LOFS */ +# ifndef RFS +# define RFS +# endif /* not RFS */ +# ifndef MSDOSFS +# define MSDOSFS +# endif /* not MSDOSFS */ +# ifndef MFS +# define MFS 1 +# endif /* not MFS */ +# ifndef CD9660 +# define CD9660 +# endif /* not CD9660 */ +# ifndef NFS +# define NFS +# endif /* not NFS */ +# include +#endif /* HAVE_SYS_MOUNT_H */ + +#ifdef HAVE_SYS_VMOUNT_H +# include +#endif /* HAVE_SYS_VMOUNT_H */ + +/* + * There is no point in including this on a glibc2 system + * we're only asking for trouble + */ +#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) +/* + * There's a conflict of definitions on redhat alpha linux between + * and . + * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 + * between and (2.1 kernels). + */ +# ifdef HAVE_SOCKETBITS_H +# define _LINUX_SOCKET_H +# undef BLKFLSBUF +# undef BLKGETSIZE +# undef BLKRAGET +# undef BLKRASET +# undef BLKROGET +# undef BLKROSET +# undef BLKRRPART +# undef MS_MGC_VAL +# undef MS_RMT_MASK +# endif /* HAVE_SOCKETBITS_H */ +# ifdef HAVE_LINUX_POSIX_TYPES_H +# include +# endif /* HAVE_LINUX_POSIX_TYPES_H */ +# ifndef _LINUX_BYTEORDER_GENERIC_H +# define _LINUX_BYTEORDER_GENERIC_H +# endif /* _LINUX_BYTEORDER_GENERIC_H */ +# ifndef _LINUX_STRING_H_ +# define _LINUX_STRING_H_ +# endif /* not _LINUX_STRING_H_ */ +# ifdef HAVE_LINUX_KDEV_T_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_KDEV_T_H */ +# ifdef HAVE_LINUX_LIST_H +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif /* HAVE_LINUX_LIST_H */ +# include +#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ + +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_SYS_FS_CACHEFS_FS_H +# include +#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ + +#ifdef HAVE_SYS_FS_PC_FS_H +# include +#endif /* HAVE_SYS_FS_PC_FS_H */ +#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ +#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H +# include +#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ + +#ifdef HAVE_SYS_FS_TMP_H +# include +#endif /* HAVE_SYS_FS_TMP_H */ +#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H +# include +#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ + +#ifdef HAVE_UFS_UFS_MOUNT_H +# include +#endif /* HAVE_UFS_UFS_MOUNT_H */ +#ifdef HAVE_UFS_UFS_UFSMOUNT_H +# ifndef MAXQUOTAS +# define MAXQUOTAS 2 +# endif /* not MAXQUOTAS */ +struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ +/* netbsd-1.4 does't protect */ +# ifndef _UFS_UFS_UFSMOUNT_H +# include +# define _UFS_UFS_UFSMOUNT_H +# endif /* not _UFS_UFS_UFSMOUNT_H */ +#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ +#ifdef HAVE_SYS_FS_UFS_MOUNT_H +# include +#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_EFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_EFS_CLNT_H */ +#ifdef HAVE_FS_EFS_EFS_MOUNT_H +# include +#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_XFS_CLNT_H +# include +#endif /* HAVE_SYS_FS_XFS_CLNT_H */ + +#ifdef HAVE_CDFS_CDFS_MOUNT_H +# include +#endif /* HAVE_CDFS_CDFS_MOUNT_H */ +#ifdef HAVE_HSFS_HSFS_H +# include +#endif /* HAVE_HSFS_HSFS_H */ +#ifdef HAVE_CDFS_CDFSMOUNT_H +# include +#endif /* HAVE_CDFS_CDFSMOUNT_H */ +#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H +# include +#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ + +#ifdef HAVE_FS_UDF_UDF_MOUNT_H +# include +#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ +], [$1], [$2], [$3]) +]) +dnl ====================================================================== diff --git a/m4/macros/try_compile_nfs.m4 b/m4/macros/try_compile_nfs.m4 new file mode 100644 index 00000000000..d04e19619fa --- /dev/null +++ b/m4/macros/try_compile_nfs.m4 @@ -0,0 +1,13 @@ +dnl ###################################################################### +dnl Compile a program with NFS headers to try and find a feature. +dnl The headers part are fixed. Only three arguments are allowed: +dnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE) +dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) +dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) +AC_DEFUN([AC_TRY_COMPILE_NFS], +[# try to compile a program which may have a definition for a structure +AC_TRY_COMPILE( +AMU_MOUNT_HEADERS +, [$1], [$2], [$3]) +]) +dnl ====================================================================== diff --git a/m4/macros/try_compile_rpc.m4 b/m4/macros/try_compile_rpc.m4 new file mode 100644 index 00000000000..5c95348ca0b --- /dev/null +++ b/m4/macros/try_compile_rpc.m4 @@ -0,0 +1,23 @@ +dnl ###################################################################### +dnl Compile a program with RPC headers to try and find a feature. +dnl The headers part are fixed. Only three arguments are allowed: +dnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE) +dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) +dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) +AC_DEFUN([AC_TRY_COMPILE_RPC], +[# try to compile a program which may have a definition for a structure +AC_TRY_COMPILE( +[ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ +#ifdef HAVE_RPC_RPC_H +# include +#endif /* HAVE_RPC_RPC_H */ +/* Prevent multiple inclusion on Ultrix 4 */ +#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) +# include +#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */ +], [$1], [$2], [$3]) +]) +dnl ====================================================================== diff --git a/m4/macros/type_auth_create_gidlist.m4 b/m4/macros/type_auth_create_gidlist.m4 new file mode 100644 index 00000000000..b56d4f65731 --- /dev/null +++ b/m4/macros/type_auth_create_gidlist.m4 @@ -0,0 +1,25 @@ +dnl ###################################################################### +dnl check the correct type for the 5th argument to authunix_create() +AC_DEFUN([AMU_TYPE_AUTH_CREATE_GIDLIST], +[ +AC_CACHE_CHECK(argument type of 5rd argument to authunix_create(), +ac_cv_auth_create_gidlist, +[ +# select the correct type +case "${host_os_name}" in + sunos[[34]]* | bsdi2* | sysv4* | hpux10.10 | ultrix* | aix4* ) + ac_cv_auth_create_gidlist="int" ;; + # old macosx used "gid_t" but all newer ones use int + macosx-10.[[0-3]]* ) + ac_cv_auth_create_gidlist="gid_t" ;; + macosx* ) + ac_cv_auth_create_gidlist="int" ;; + *bsd* ) + ac_cv_auth_create_gidlist="int" ;; + * ) + ac_cv_auth_create_gidlist="gid_t" ;; +esac +]) +AC_DEFINE_UNQUOTED(AUTH_CREATE_GIDLIST_TYPE, $ac_cv_auth_create_gidlist) +]) +dnl ====================================================================== diff --git a/m4/macros/type_autofs_args.m4 b/m4/macros/type_autofs_args.m4 new file mode 100644 index 00000000000..ca91bf8be09 --- /dev/null +++ b/m4/macros/type_autofs_args.m4 @@ -0,0 +1,33 @@ +dnl ###################################################################### +dnl Find the correct type for AUTOFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_AUTOFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of autofs mount(2) arguments, +ac_cv_type_autofs_args, +[ +# set to a default value +ac_cv_type_autofs_args=notfound + +# look for "struct auto_args" +if test "$ac_cv_type_autofs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct auto_args a; +], ac_cv_type_autofs_args="struct auto_args", ac_cv_type_autofs_args=notfound) +fi + +# look for "struct autofs_args" +if test "$ac_cv_type_autofs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct autofs_args a; +], ac_cv_type_autofs_args="struct autofs_args", ac_cv_type_autofs_args=notfound) +fi + +]) +if test "$ac_cv_type_autofs_args" != notfound +then + AC_DEFINE_UNQUOTED(autofs_args_t, $ac_cv_type_autofs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_cachefs_args.m4 b/m4/macros/type_cachefs_args.m4 new file mode 100644 index 00000000000..556c3888839 --- /dev/null +++ b/m4/macros/type_cachefs_args.m4 @@ -0,0 +1,23 @@ +dnl ###################################################################### +dnl Find the correct type for CACHEFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_CACHEFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of cachefs mount(2) arguments, +ac_cv_type_cachefs_args, +[ +# set to a default value +ac_cv_type_cachefs_args=notfound +# look for "struct cachefs_mountargs" +if test "$ac_cv_type_cachefs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct cachefs_mountargs a; +], ac_cv_type_cachefs_args="struct cachefs_mountargs", ac_cv_type_cachefs_args=notfound) +fi +]) +if test "$ac_cv_type_cachefs_args" != notfound +then + AC_DEFINE_UNQUOTED(cachefs_args_t, $ac_cv_type_cachefs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_cdfs_args.m4 b/m4/macros/type_cdfs_args.m4 new file mode 100644 index 00000000000..def76949c90 --- /dev/null +++ b/m4/macros/type_cdfs_args.m4 @@ -0,0 +1,57 @@ +dnl ###################################################################### +dnl Find the correct type for CDFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_CDFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of cdfs mount(2) arguments, +ac_cv_type_cdfs_args, +[ +# set to a default value +ac_cv_type_cdfs_args=notfound + +# look for "struct iso_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct iso_args a; +], ac_cv_type_cdfs_args="struct iso_args", ac_cv_type_cdfs_args=notfound) +fi + +# look for "struct iso9660_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct iso9660_args a; +], ac_cv_type_cdfs_args="struct iso9660_args", ac_cv_type_cdfs_args=notfound) +fi + +# look for "struct cdfs_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct cdfs_args a; +], ac_cv_type_cdfs_args="struct cdfs_args", ac_cv_type_cdfs_args=notfound) +fi + +# look for "struct hsfs_args" +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct hsfs_args a; +], ac_cv_type_cdfs_args="struct hsfs_args", ac_cv_type_cdfs_args=notfound) +fi + +# look for "struct iso_specific" (ultrix) +if test "$ac_cv_type_cdfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct iso_specific a; +], ac_cv_type_cdfs_args="struct iso_specific", ac_cv_type_cdfs_args=notfound) +fi + +]) +if test "$ac_cv_type_cdfs_args" != notfound +then + AC_DEFINE_UNQUOTED(cdfs_args_t, $ac_cv_type_cdfs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_efs_args.m4 b/m4/macros/type_efs_args.m4 new file mode 100644 index 00000000000..b4e56644c84 --- /dev/null +++ b/m4/macros/type_efs_args.m4 @@ -0,0 +1,25 @@ +dnl ###################################################################### +dnl Find the correct type for EFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_EFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of efs mount(2) arguments, +ac_cv_type_efs_args, +[ +# set to a default value +ac_cv_type_efs_args=notfound + +# look for "struct efs_args" +if test "$ac_cv_type_efs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct efs_args a; +], ac_cv_type_efs_args="struct efs_args", ac_cv_type_efs_args=notfound) +fi + +]) +if test "$ac_cv_type_efs_args" != notfound +then + AC_DEFINE_UNQUOTED(efs_args_t, $ac_cv_type_efs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_lofs_args.m4 b/m4/macros/type_lofs_args.m4 new file mode 100644 index 00000000000..266d38f8cd0 --- /dev/null +++ b/m4/macros/type_lofs_args.m4 @@ -0,0 +1,30 @@ +dnl ###################################################################### +dnl Find the correct type for LOFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_LOFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of lofs mount(2) arguments, +ac_cv_type_lofs_args, +[ +# set to a default value +ac_cv_type_lofs_args=notfound +# look for "struct lofs_args" +if test "$ac_cv_type_lofs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct lofs_args a; +], ac_cv_type_lofs_args="struct lofs_args", ac_cv_type_lofs_args=notfound) +fi +# look for "struct lo_args" +if test "$ac_cv_type_lofs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct lo_args a; +], ac_cv_type_lofs_args="struct lo_args", ac_cv_type_lofs_args=notfound) +fi +]) +if test "$ac_cv_type_lofs_args" != notfound +then + AC_DEFINE_UNQUOTED(lofs_args_t, $ac_cv_type_lofs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_mfs_args.m4 b/m4/macros/type_mfs_args.m4 new file mode 100644 index 00000000000..79bd4571343 --- /dev/null +++ b/m4/macros/type_mfs_args.m4 @@ -0,0 +1,23 @@ +dnl ###################################################################### +dnl Find the correct type for MFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_MFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of mfs mount(2) arguments, +ac_cv_type_mfs_args, +[ +# set to a default value +ac_cv_type_mfs_args=notfound +# look for "struct mfs_args" +if test "$ac_cv_type_mfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct mfs_args a; +], ac_cv_type_mfs_args="struct mfs_args", ac_cv_type_mfs_args=notfound) +fi +]) +if test "$ac_cv_type_mfs_args" != notfound +then + AC_DEFINE_UNQUOTED(mfs_args_t, $ac_cv_type_mfs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_pcfs_args.m4 b/m4/macros/type_pcfs_args.m4 new file mode 100644 index 00000000000..2d54f541366 --- /dev/null +++ b/m4/macros/type_pcfs_args.m4 @@ -0,0 +1,50 @@ +dnl ###################################################################### +dnl Find the correct type for PC/FS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_PCFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of pcfs mount(2) arguments, +ac_cv_type_pcfs_args, +[ +# set to a default value +ac_cv_type_pcfs_args=notfound + +# look for "struct msdos_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct msdos_args a; +], ac_cv_type_pcfs_args="struct msdos_args", ac_cv_type_pcfs_args=notfound) +fi + +# look for "struct pc_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct pc_args a; +], ac_cv_type_pcfs_args="struct pc_args", ac_cv_type_pcfs_args=notfound) +fi + +# look for "struct pcfs_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct pcfs_args a; +], ac_cv_type_pcfs_args="struct pcfs_args", ac_cv_type_pcfs_args=notfound) +fi + +# look for "struct msdosfs_args" +if test "$ac_cv_type_pcfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct msdosfs_args a; +], ac_cv_type_pcfs_args="struct msdosfs_args", ac_cv_type_pcfs_args=notfound) +fi + +]) + +if test "$ac_cv_type_pcfs_args" != notfound +then + AC_DEFINE_UNQUOTED(pcfs_args_t, $ac_cv_type_pcfs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_pte_t.m4 b/m4/macros/type_pte_t.m4 new file mode 100644 index 00000000000..162b7b9c608 --- /dev/null +++ b/m4/macros/type_pte_t.m4 @@ -0,0 +1,15 @@ +dnl ###################################################################### +dnl check for type of pte_t (for Irix, usually in ) +dnl Note: some gcc's on Irix 6.5 are broken and don't recognize pte_t, +dnl so I'm defining it here to unsigned int, which is not necessarily correct, +dnl but at least it gets am-utils to compile. +AC_DEFUN([AMU_TYPE_PTE_T], +[AC_CHECK_TYPE(pte_t, , +[AC_DEFINE_UNQUOTED(pte_t, unsigned int, + [Check if pte_t is defined in ])], +[ +#ifdef HAVE_SYS_IMMU_H +# include +#endif /* HAVE_SYS_IMMU_H */ +])]) +dnl ====================================================================== diff --git a/m4/macros/type_recvfrom_fromlen.m4 b/m4/macros/type_recvfrom_fromlen.m4 new file mode 100644 index 00000000000..71812bd2978 --- /dev/null +++ b/m4/macros/type_recvfrom_fromlen.m4 @@ -0,0 +1,29 @@ +dnl ###################################################################### +dnl check the correct type for the 6th argument to recvfrom() +AC_DEFUN([AMU_TYPE_RECVFROM_FROMLEN], +[ +AC_CACHE_CHECK(non-pointer type of 6th (fromlen) argument to recvfrom(), +ac_cv_recvfrom_fromlen, +[ +# select the correct type +case "${host_os}" in + linux* ) + ac_cv_recvfrom_fromlen="unsigned int" ;; + aix[[1-3]]* ) + ac_cv_recvfrom_fromlen="int" ;; + aix* ) + ac_cv_recvfrom_fromlen="size_t" ;; + # old macosx used "int" but all newer ones use socklen_t + macosx-10.[[0-3]]* ) + ac_cv_recvfrom_fromlen="int" ;; + macosx* ) + ac_cv_recvfrom_fromlen="socklen_t" ;; + *bsd* ) + ac_cv_recvfrom_fromlen="socklen_t" ;; + * ) + ac_cv_recvfrom_fromlen="int" ;; +esac +]) +AC_DEFINE_UNQUOTED(RECVFROM_FROMLEN_TYPE, $ac_cv_recvfrom_fromlen) +]) +dnl ====================================================================== diff --git a/m4/macros/type_rfs_args.m4 b/m4/macros/type_rfs_args.m4 new file mode 100644 index 00000000000..eeec8f64170 --- /dev/null +++ b/m4/macros/type_rfs_args.m4 @@ -0,0 +1,23 @@ +dnl ###################################################################### +dnl Find the correct type for RFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_RFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of rfs mount(2) arguments, +ac_cv_type_rfs_args, +[ +# set to a default value +ac_cv_type_rfs_args=notfound +# look for "struct rfs_args" +if test "$ac_cv_type_rfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct rfs_args a; +], ac_cv_type_rfs_args="struct rfs_args", ac_cv_type_rfs_args=notfound) +fi +]) +if test "$ac_cv_type_rfs_args" != notfound +then + AC_DEFINE_UNQUOTED(rfs_args_t, $ac_cv_type_rfs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_rpcvers_t.m4 b/m4/macros/type_rpcvers_t.m4 new file mode 100644 index 00000000000..d0fa8c14088 --- /dev/null +++ b/m4/macros/type_rpcvers_t.m4 @@ -0,0 +1,11 @@ +dnl ###################################################################### +dnl check for type of rpcvers_t (usually in ) +AC_DEFUN([AMU_TYPE_RPCVERS_T], +[AC_CHECK_TYPE(rpcvers_t, , +[AC_DEFINE_UNQUOTED(rpcvers_t, unsigned long, [Check if rpcvers_t is defined in ])], +[ +#ifdef HAVE_RPC_TYPES_H +# include +#endif /* HAVE_RPC_TYPES_H */ +])]) +dnl ====================================================================== diff --git a/m4/macros/type_svc_in_arg.m4 b/m4/macros/type_svc_in_arg.m4 new file mode 100644 index 00000000000..4fa486d1a24 --- /dev/null +++ b/m4/macros/type_svc_in_arg.m4 @@ -0,0 +1,39 @@ +dnl ###################################################################### +dnl Find the type of the 3rd argument (in) to svc_sendreply() call +AC_DEFUN([AMU_TYPE_SVC_IN_ARG], +[ +AC_CACHE_CHECK(for type of 3rd arg ('in') arg to svc_sendreply(), +ac_cv_type_svc_in_arg, +[ +# try to compile a program which may have a definition for the type +dnl need a series of compilations, which will test out every possible type +dnl such as caddr_t, char *, etc. +# set to a default value +ac_cv_type_svc_in_arg=notfound +# look for "caddr_t" +if test "$ac_cv_type_svc_in_arg" = notfound +then +AC_TRY_COMPILE_RPC( +[ SVCXPRT *SX; + xdrproc_t xp; + caddr_t p; + svc_sendreply(SX, xp, p); +], ac_cv_type_svc_in_arg="caddr_t", ac_cv_type_svc_in_arg=notfound) +fi +# look for "char *" +if test "$ac_cv_type_svc_in_arg" = notfound +then +AC_TRY_COMPILE_RPC( +[ SVCXPRT *SX; + xdrproc_t xp; + char *p; + svc_sendreply(SX, xp, p); +], ac_cv_type_svc_in_arg="char *", ac_cv_type_svc_in_arg=notfound) +fi +]) +if test "$ac_cv_type_svc_in_arg" != notfound +then + AC_DEFINE_UNQUOTED(SVC_IN_ARG_TYPE, $ac_cv_type_svc_in_arg) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_time_t.m4 b/m4/macros/type_time_t.m4 new file mode 100644 index 00000000000..7e6d2b2e74f --- /dev/null +++ b/m4/macros/type_time_t.m4 @@ -0,0 +1,5 @@ +dnl ###################################################################### +dnl check for type of time_t (usually in ) +AC_DEFUN([AMU_TYPE_TIME_T], +[AC_CHECK_TYPE(time_t, long)]) +dnl ====================================================================== diff --git a/m4/macros/type_tmpfs_args.m4 b/m4/macros/type_tmpfs_args.m4 new file mode 100644 index 00000000000..7475f4a3e45 --- /dev/null +++ b/m4/macros/type_tmpfs_args.m4 @@ -0,0 +1,23 @@ +dnl ###################################################################### +dnl Find the correct type for TMPFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_TMPFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of tmpfs mount(2) arguments, +ac_cv_type_tmpfs_args, +[ +# set to a default value +ac_cv_type_tmpfs_args=notfound +# look for "struct tmpfs_args" +if test "$ac_cv_type_tmpfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct tmpfs_args a; +], ac_cv_type_tmpfs_args="struct tmpfs_args", ac_cv_type_tmpfs_args=notfound) +fi +]) +if test "$ac_cv_type_tmpfs_args" != notfound +then + AC_DEFINE_UNQUOTED(tmpfs_args_t, $ac_cv_type_tmpfs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_udf_args.m4 b/m4/macros/type_udf_args.m4 new file mode 100644 index 00000000000..9c9886718e2 --- /dev/null +++ b/m4/macros/type_udf_args.m4 @@ -0,0 +1,25 @@ +dnl ###################################################################### +dnl Find the correct type for UDF mount(2) arguments structure +AC_DEFUN([AMU_TYPE_UDF_ARGS], +[ +AC_CACHE_CHECK(for structure type of udf mount(2) arguments, +ac_cv_type_udf_args, +[ +# set to a default value +ac_cv_type_udf_args=notfound + +# look for "struct udf_args" +if test "$ac_cv_type_udf_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct udf_args a; +], ac_cv_type_udf_args="struct udf_args", ac_cv_type_udf_args=notfound) +fi + +]) +if test "$ac_cv_type_udf_args" != notfound +then + AC_DEFINE_UNQUOTED(udf_args_t, $ac_cv_type_udf_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_ufs_args.m4 b/m4/macros/type_ufs_args.m4 new file mode 100644 index 00000000000..4c844080738 --- /dev/null +++ b/m4/macros/type_ufs_args.m4 @@ -0,0 +1,41 @@ +dnl ###################################################################### +dnl Find the correct type for UFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_UFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of ufs mount(2) arguments, +ac_cv_type_ufs_args, +[ +# set to a default value +ac_cv_type_ufs_args=notfound + +# look for "struct ufs_args" +if test "$ac_cv_type_ufs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct ufs_args a; +], ac_cv_type_ufs_args="struct ufs_args", ac_cv_type_ufs_args=notfound) +fi + +# look for "struct efs_args" (irix) +if test "$ac_cv_type_ufs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct efs_args a; +], ac_cv_type_ufs_args="struct efs_args", ac_cv_type_ufs_args=notfound) +fi + +# look for "struct ufs_specific" (ultrix) +if test "$ac_cv_type_ufs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct ufs_specific a; +], ac_cv_type_ufs_args="struct ufs_specific", ac_cv_type_ufs_args=notfound) +fi + +]) +if test "$ac_cv_type_ufs_args" != notfound +then + AC_DEFINE_UNQUOTED(ufs_args_t, $ac_cv_type_ufs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_xdrproc_t.m4 b/m4/macros/type_xdrproc_t.m4 new file mode 100644 index 00000000000..a06fad7d3b0 --- /dev/null +++ b/m4/macros/type_xdrproc_t.m4 @@ -0,0 +1,20 @@ +dnl ###################################################################### +dnl check for type of xdrproc_t (usually in ) +AC_DEFUN([AMU_TYPE_XDRPROC_T], +[ +AC_CACHE_CHECK(for xdrproc_t, +ac_cv_type_xdrproc_t, +[ +# try to compile a program which may have a definition for the type +dnl need a series of compilations, which will test out every possible type +# look for "xdrproc_t" +AC_TRY_COMPILE_RPC( +[ xdrproc_t xdr_int; +], ac_cv_type_xdrproc_t=yes, ac_cv_type_xdrproc_t=no) +]) +if test "$ac_cv_type_xdrproc_t" = yes +then + AC_DEFINE_UNQUOTED(XDRPROC_T_TYPE, xdrproc_t) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_xfs_args.m4 b/m4/macros/type_xfs_args.m4 new file mode 100644 index 00000000000..084c236aded --- /dev/null +++ b/m4/macros/type_xfs_args.m4 @@ -0,0 +1,25 @@ +dnl ###################################################################### +dnl Find the correct type for XFS mount(2) arguments structure +AC_DEFUN([AMU_TYPE_XFS_ARGS], +[ +AC_CACHE_CHECK(for structure type of xfs mount(2) arguments, +ac_cv_type_xfs_args, +[ +# set to a default value +ac_cv_type_xfs_args=notfound + +# look for "struct xfs_args" +if test "$ac_cv_type_xfs_args" = notfound +then +AC_TRY_COMPILE_ANYFS( +[ struct xfs_args a; +], ac_cv_type_xfs_args="struct xfs_args", ac_cv_type_xfs_args=notfound) +fi + +]) +if test "$ac_cv_type_xfs_args" != notfound +then + AC_DEFINE_UNQUOTED(xfs_args_t, $ac_cv_type_xfs_args) +fi +]) +dnl ====================================================================== diff --git a/m4/macros/type_yp_order_outorder.m4 b/m4/macros/type_yp_order_outorder.m4 new file mode 100644 index 00000000000..fefeced8a54 --- /dev/null +++ b/m4/macros/type_yp_order_outorder.m4 @@ -0,0 +1,23 @@ +dnl ###################################################################### +dnl check the correct type for the 3rd argument to yp_order() +AC_DEFUN([AMU_TYPE_YP_ORDER_OUTORDER], +[ +AC_CACHE_CHECK(pointer type of 3rd argument to yp_order(), +ac_cv_yp_order_outorder, +[ +# select the correct type +case "${host_os}" in + aix[[1-3]]* | aix4.[[0-2]]* | sunos[[34]]* | solaris1* ) + ac_cv_yp_order_outorder=int ;; + solaris* | svr4* | sysv4* | sunos* | hpux* | aix* ) + ac_cv_yp_order_outorder="unsigned long" ;; + linux* | osf* ) + # DU4 man page is wrong, headers are right + ac_cv_yp_order_outorder="unsigned int" ;; + * ) + ac_cv_yp_order_outorder=int ;; +esac +]) +AC_DEFINE_UNQUOTED(YP_ORDER_OUTORDER_TYPE, $ac_cv_yp_order_outorder) +]) +dnl ====================================================================== diff --git a/m4/macros/with_addon.m4 b/m4/macros/with_addon.m4 new file mode 100644 index 00000000000..b061621cf17 --- /dev/null +++ b/m4/macros/with_addon.m4 @@ -0,0 +1,26 @@ +dnl ###################################################################### +dnl Do we want to compile with "ADDON" support? (hesiod, ldap, etc.) +AC_DEFUN([AMU_WITH_ADDON], +[AC_MSG_CHECKING([if $1 is wanted]) +ac_upcase=`echo $1|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +AC_ARG_WITH($1, + AC_HELP_STRING([--with-$1], + [enable $2 support (default=yes if found)] +),[ +if test "$withval" = "yes"; then + with_$1=yes +elif test "$withval" = "no"; then + with_$1=no +else + AC_MSG_ERROR(please use \"yes\" or \"no\" with --with-$1) +fi +],[ +with_$1=yes +]) +if test "$with_$1" = "yes" +then + AC_MSG_RESULT([yes, will enable if all libraries are found]) +else + AC_MSG_RESULT([no]) +fi +]) diff --git a/m4/mk-aclocal b/m4/mk-aclocal new file mode 100755 index 00000000000..62250e353d7 --- /dev/null +++ b/m4/mk-aclocal @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Make am-utils' aclocal.m4 file (concatendated from others). +# For maintainers only. +# Erez Zadok + +if [ ! -d macros ]; then + echo no macros directory found! + exit 2 +fi +cd macros +for i in HEADER *.m4; do + cat $i + echo + echo +done +cat TRAILER +exit 0 diff --git a/m4/mkconf b/m4/mkconf new file mode 100755 index 00000000000..04ce7974243 --- /dev/null +++ b/m4/mkconf @@ -0,0 +1,20 @@ +#!/bin/bash -norc +# (re)make the autoconf configuration files. +# Used by am-utils maintainers only! +# +# Erez Zadok +# +#set -x + +if [ ! -f amd/amd.c ]; then + cd .. +fi +if [ ! -f amd/amd.c ]; then + cd .. +fi +if [ ! -f amd/amd.c ]; then + echo "wrong directory!" + exit 1 +fi + +cd m4 && make $* diff --git a/m4/rmtspc b/m4/rmtspc new file mode 100755 index 00000000000..431691d9e4b --- /dev/null +++ b/m4/rmtspc @@ -0,0 +1,6 @@ +#!/bin/sh +# remove trailing spaces from C code +#set -x +for i in $*; do + sed 's/[ ]*$//g' < $i > $i.tmp_$$ && mv $i.tmp_$$ $i +done diff --git a/m4/update_build_version b/m4/update_build_version new file mode 100755 index 00000000000..35d4e1c9dfc --- /dev/null +++ b/m4/update_build_version @@ -0,0 +1,41 @@ +#!/bin/sh +# Update the build version file for am-utils +# Erez Zadok +#set -x + +file="build_version.h" +vers=1 + +if test -f $file +then + egrep AMU_BUILD_VERSION $file | while read a b vers + do + vers=`expr $vers + 1` + echo '/* do not edit this file by hand */' > $file + echo '/* auto-generated by update_build_version script */' >> $file + echo '#define AMU_BUILD_VERSION '$vers >> $file + done +else + echo '/* do not edit this file by hand */' > $file + echo '/* auto-generated by update_build_version script */' >> $file + echo '#define AMU_BUILD_VERSION '$vers >> $file +fi + +if test -n "$USER" +then + build_user="$USER" +else + if test -n "$LOGNAME" + then + build_user="$LOGNAME" + else + build_user=`(whoami) 2>/dev/null` || build_user=unknown + fi +fi +echo '#define BUILD_USER "'$build_user'"' >> $file + +build_host=`(hostname || uname -n) 2>/dev/null` || build_host=unknown +echo '#define BUILD_HOST "'$build_host'"' >> $file + +build_date=`(date) 2>/dev/null` || build_date=unknown_date +echo '#define BUILD_DATE "'$build_date'"' >> $file diff --git a/missing b/missing new file mode 100755 index 00000000000..db98974ff5d --- /dev/null +++ b/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/mk-amd-map/Makefile.am b/mk-amd-map/Makefile.am new file mode 100644 index 00000000000..b987629ebdc --- /dev/null +++ b/mk-amd-map/Makefile.am @@ -0,0 +1,39 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Makefile for mk-amd-map/ directory +# Author: Erez Zadok + +sbin_PROGRAMS = mk-amd-map + +# man pages +man_MANS = mk-amd-map.8 + +# headers this depends on, not to be installed +#noinst_HEADERS = + +mk_amd_map_SOURCES = mk-amd-map.c + +LDADD = ../libamu/libamu.la + +AM_CPPFLAGS = -I$(top_srcdir)/include + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) + +# dependencies +$(PROGRAMS): $(LDADD) +$(mk_amd_map_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) diff --git a/mk-amd-map/Makefile.in b/mk-amd-map/Makefile.in new file mode 100644 index 00000000000..220c93b11d4 --- /dev/null +++ b/mk-amd-map/Makefile.in @@ -0,0 +1,737 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Makefile for mk-amd-map/ directory +# Author: Erez Zadok + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +sbin_PROGRAMS = mk-amd-map$(EXEEXT) +subdir = mk-amd-map +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" +PROGRAMS = $(sbin_PROGRAMS) +am_mk_amd_map_OBJECTS = mk-amd-map.$(OBJEXT) +mk_amd_map_OBJECTS = $(am_mk_amd_map_OBJECTS) +mk_amd_map_LDADD = $(LDADD) +mk_amd_map_DEPENDENCIES = ../libamu/libamu.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(mk_amd_map_SOURCES) +DIST_SOURCES = $(mk_amd_map_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# man pages +man_MANS = mk-amd-map.8 + +# headers this depends on, not to be installed +#noinst_HEADERS = +mk_amd_map_SOURCES = mk-amd-map.c +LDADD = ../libamu/libamu.la +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mk-amd-map/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu mk-amd-map/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +mk-amd-map$(EXEEXT): $(mk_amd_map_OBJECTS) $(mk_amd_map_DEPENDENCIES) $(EXTRA_mk_amd_map_DEPENDENCIES) + @rm -f mk-amd-map$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mk_amd_map_OBJECTS) $(mk_amd_map_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mk-amd-map.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man8: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-sbinPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man uninstall-sbinPROGRAMS + +uninstall-man: uninstall-man8 + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man8 install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-man uninstall-man8 uninstall-sbinPROGRAMS + + +# dependencies +$(PROGRAMS): $(LDADD) +$(mk_amd_map_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/mk-amd-map/mk-amd-map.8 b/mk-amd-map/mk-amd-map.8 index f5cef608ea1..f468f7acc68 100644 --- a/mk-amd-map/mk-amd-map.8 +++ b/mk-amd-map/mk-amd-map.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1993 Jan-Simon Pendry .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -12,11 +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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -32,8 +28,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)mk-amd-map.8 8.1 (Berkeley) 6/28/93 -.\" $Id: mk-amd-map.8,v 1.9.2.1 2006/01/02 18:48:26 ezk Exp $ +.\" +.\" File: am-utils/mk-amd-map/mk-amd-map.8 .\" .TH MK-AMD-MAP 8 "June 28, 1993" .SH NAME diff --git a/mk-amd-map/mk-amd-map.c b/mk-amd-map/mk-amd-map.c index 48d82b0bd0d..e6ca9d93983 100644 --- a/mk-amd-map/mk-amd-map.c +++ b/mk-amd-map/mk-amd-map.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -93,7 +89,7 @@ read_line(char *buf, int size, FILE *fp) /* * Skip leading white space on next line */ - while ((ch = getc(fp)) != EOF && isascii(ch) && isspace(ch)) ; + while ((ch = getc(fp)) != EOF && isascii((unsigned char)ch) && isspace((unsigned char)ch)) ; (void) ungetc(ch, fp); } else { return done; @@ -144,7 +140,7 @@ read_file(FILE *fp, char *map, voidp db) /* * Find start of key */ - for (kp = key_val; *kp && isascii(*kp) && isspace((int)*kp); kp++) ; + for (kp = key_val; *kp && isascii((unsigned char)*kp) && isspace((unsigned char)*kp); kp++) ; /* * Ignore blank lines @@ -155,7 +151,7 @@ read_file(FILE *fp, char *map, voidp db) /* * Find end of key */ - for (cp = kp; *cp && (!isascii(*cp) || !isspace((int)*cp)); cp++) ; + for (cp = kp; *cp && (!isascii((unsigned char)*cp) || !isspace((unsigned char)*cp)); cp++) ; /* * Check whether key matches, or whether @@ -163,7 +159,7 @@ read_file(FILE *fp, char *map, voidp db) */ if (*cp) *cp++ = '\0'; - while (*cp && isascii(*cp) && isspace((int)*cp)) + while (*cp && isascii((unsigned char)*cp) && isspace((unsigned char)*cp)) cp++; if (*kp == '+') { fprintf(stderr, "Can't interpolate %s\n", kp); diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 00000000000..55d537f872c --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,162 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2009-04-28.21; # UTC + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' +IFS=" "" $nl" +errstatus=0 +dirmode= + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit $? + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the 'mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because '.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file + shift + IFS=$oIFS + + for d + do + test "x$d" = x && continue + + pathcomp=$pathcomp$d + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp=$pathcomp/ + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/scripts/Makefile.am b/scripts/Makefile.am index c4380584ec0..9432643f0e7 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -8,6 +8,7 @@ sbin_SCRIPTS = \ am-eject \ amd2ldif \ amd2sun \ + automount2amd \ ctl-amd \ ctl-hlfsd \ fixrmtab \ @@ -16,34 +17,31 @@ sbin_SCRIPTS = \ wait4amd \ wait4amd2die -bin_SCRIPTS = \ - expn +noinst_SCRIPTS = \ + redhat-ctl-amd \ + test-attrcache -sysconf_DATA = \ - amd.conf-sample \ - lostaltmail.conf-sample +sysconf_DATA = amd.conf-sample lostaltmail.conf-sample # man pages -man_MANS = \ - amd.conf.5 \ - expn.1 +man_MANS = amd.conf.5 automount2amd.8 -EXTRA_DIST = \ - am-eject.in \ - amd2ldif.in \ - amd2sun.in \ - ctl-amd.in \ - ctl-hlfsd.in \ - fixrmtab.in \ - fix-amd-map.in \ - lostaltmail.in \ - wait4amd.in \ - wait4amd2die.in \ - \ - expn.in \ +EXTRA_DIST = \ + am-eject.in \ + amd2ldif.in \ + amd2sun.in \ + automount2amd.in \ + ctl-amd.in \ + ctl-hlfsd.in \ + fixrmtab.in \ + fix-amd-map.in \ + lostaltmail.in \ + redhat-ctl-amd.in \ + wait4amd.in \ + wait4amd2die.in \ \ amd.conf-sample \ lostaltmail.conf-sample \ $(man_MANS) -CLEANFILES = $(sbin_SCRIPTS) $(bin_SCRIPTS) +CLEANFILES = $(sbin_SCRIPTS) $(bin_SCRIPTS) $(noinst_SCRIPTS) diff --git a/scripts/Makefile.in b/scripts/Makefile.in index a20d8462713..b57b0ff4365 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -1,6 +1,8 @@ -# Makefile.in generated automatically by automake 1.3.2 from Makefile.am +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -10,76 +12,290 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +@SET_MAKE@ + # Package: am-utils # Level: Makefile for scripts/ directory # Author: Erez Zadok -SHELL = /bin/sh - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DISTDIR = - +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = .. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -host_alias = @host_alias@ +build_triplet = @build@ host_triplet = @host@ +subdir = scripts +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(srcdir)/am-eject.in \ + $(srcdir)/amd2ldif.in $(srcdir)/amd2sun.in \ + $(srcdir)/automount2amd.in $(srcdir)/ctl-amd.in \ + $(srcdir)/ctl-hlfsd.in $(srcdir)/fix-amd-map.in \ + $(srcdir)/fixrmtab.in $(srcdir)/lostaltmail.in \ + $(srcdir)/redhat-ctl-amd.in $(srcdir)/test-attrcache.in \ + $(srcdir)/wait4amd.in $(srcdir)/wait4amd2die.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = am-eject amd2ldif amd2sun automount2amd ctl-amd \ + ctl-hlfsd fix-amd-map fixrmtab lostaltmail redhat-ctl-amd \ + test-attrcache wait4amd wait4amd2die +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" \ + "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(sysconfdir)" +SCRIPTS = $(noinst_SCRIPTS) $(sbin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +man5dir = $(mandir)/man5 +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +DATA = $(sysconf_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ -LTALLOCA = @LTALLOCA@ +LIPO = @LIPO@ +LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ VERSION = @VERSION@ - -sbin_SCRIPTS = \ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +sbin_SCRIPTS = \ am-eject \ amd2ldif \ amd2sun \ + automount2amd \ ctl-amd \ ctl-hlfsd \ fixrmtab \ @@ -88,292 +304,399 @@ sbin_SCRIPTS = \ wait4amd \ wait4amd2die -bin_SCRIPTS = \ - expn +noinst_SCRIPTS = \ + redhat-ctl-amd \ + test-attrcache -sysconf_DATA = \ - amd.conf-sample \ - lostaltmail.conf-sample +sysconf_DATA = amd.conf-sample lostaltmail.conf-sample # man pages -man_MANS = \ - amd.conf.5 \ - expn.1 - -EXTRA_DIST = \ - am-eject.in \ - amd2ldif.in \ - amd2sun.in \ - ctl-amd.in \ - ctl-hlfsd.in \ - fixrmtab.in \ - fix-amd-map.in \ - lostaltmail.in \ - wait4amd.in \ - wait4amd2die.in \ - \ - expn.in \ +man_MANS = amd.conf.5 automount2amd.8 +EXTRA_DIST = \ + am-eject.in \ + amd2ldif.in \ + amd2sun.in \ + automount2amd.in \ + ctl-amd.in \ + ctl-hlfsd.in \ + fixrmtab.in \ + fix-amd-map.in \ + lostaltmail.in \ + redhat-ctl-amd.in \ + wait4amd.in \ + wait4amd2die.in \ \ amd.conf-sample \ lostaltmail.conf-sample \ $(man_MANS) -CLEANFILES = $(sbin_SCRIPTS) $(bin_SCRIPTS) -mkinstalldirs = $(SHELL) $(top_srcdir)/aux/mkinstalldirs -CONFIG_HEADER = ../config.h -CONFIG_CLEAN_FILES = am-eject amd2ldif amd2sun ctl-amd ctl-hlfsd expn \ -fixrmtab fix-amd-map lostaltmail wait4amd wait4amd2die -SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) - -man1dir = $(mandir)/man1 -man5dir = $(mandir)/man5 -MANS = $(man_MANS) - -NROFF = nroff -DATA = $(sysconf_DATA) - -DIST_COMMON = Makefile.am Makefile.in am-eject.in amd2ldif.in \ -amd2sun.in ctl-amd.in ctl-hlfsd.in expn.in fix-amd-map.in fixrmtab.in \ -lostaltmail.in wait4amd.in wait4amd2die.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP = --best -all: Makefile $(SCRIPTS) $(MANS) $(DATA) +CLEANFILES = $(sbin_SCRIPTS) $(bin_SCRIPTS) $(noinst_SCRIPTS) +all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/./aux/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --localdir=./aux --gnu --include-deps scripts/Makefile +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu scripts/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -am-eject: $(top_builddir)/config.status am-eject.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -amd2ldif: $(top_builddir)/config.status amd2ldif.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -amd2sun: $(top_builddir)/config.status amd2sun.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -ctl-amd: $(top_builddir)/config.status ctl-amd.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -ctl-hlfsd: $(top_builddir)/config.status ctl-hlfsd.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -expn: $(top_builddir)/config.status expn.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -fixrmtab: $(top_builddir)/config.status fixrmtab.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -fix-amd-map: $(top_builddir)/config.status fix-amd-map.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -lostaltmail: $(top_builddir)/config.status lostaltmail.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -wait4amd: $(top_builddir)/config.status wait4amd.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status -wait4amd2die: $(top_builddir)/config.status wait4amd2die.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status - -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(bindir) - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ - else if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ - else :; fi; fi; \ - done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - list='$(bin_SCRIPTS)'; for p in $$list; do \ - rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ - done +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +am-eject: $(top_builddir)/config.status $(srcdir)/am-eject.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +amd2ldif: $(top_builddir)/config.status $(srcdir)/amd2ldif.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +amd2sun: $(top_builddir)/config.status $(srcdir)/amd2sun.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +automount2amd: $(top_builddir)/config.status $(srcdir)/automount2amd.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +ctl-amd: $(top_builddir)/config.status $(srcdir)/ctl-amd.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +ctl-hlfsd: $(top_builddir)/config.status $(srcdir)/ctl-hlfsd.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +fix-amd-map: $(top_builddir)/config.status $(srcdir)/fix-amd-map.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +fixrmtab: $(top_builddir)/config.status $(srcdir)/fixrmtab.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +lostaltmail: $(top_builddir)/config.status $(srcdir)/lostaltmail.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +redhat-ctl-amd: $(top_builddir)/config.status $(srcdir)/redhat-ctl-amd.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +test-attrcache: $(top_builddir)/config.status $(srcdir)/test-attrcache.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +wait4amd: $(top_builddir)/config.status $(srcdir)/wait4amd.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +wait4amd2die: $(top_builddir)/config.status $(srcdir)/wait4amd2die.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(sbindir) - @list='$(sbin_SCRIPTS)'; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \ - else if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \ - else :; fi; fi; \ - done + @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-sbinSCRIPTS: @$(NORMAL_UNINSTALL) - list='$(sbin_SCRIPTS)'; for p in $$list; do \ - rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \ - done + @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) -install-man1: - $(mkinstalldirs) $(DESTDIR)$(man1dir) - @list='$(man1_MANS)'; \ - l2='$(man_MANS)'; for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ - done +mostlyclean-libtool: + -rm -f *.lo -uninstall-man1: - @list='$(man1_MANS)'; \ - l2='$(man_MANS)'; for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ +clean-libtool: + -rm -rf .libs _libs +install-man5: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man5dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.5[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ - rm -f $(DESTDIR)$(man1dir)/$$inst; \ - done - -install-man5: - $(mkinstalldirs) $(DESTDIR)$(man5dir) - @list='$(man5_MANS)'; \ - l2='$(man_MANS)'; for i in $$l2; do \ - case "$$i" in \ - *.5*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst"; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ + done; } uninstall-man5: - @list='$(man5_MANS)'; \ - l2='$(man_MANS)'; for i in $$l2; do \ - case "$$i" in \ - *.5*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f $(DESTDIR)$(man5dir)/$$inst"; \ - rm -f $(DESTDIR)$(man5dir)/$$inst; \ - done -install-man: $(MANS) - @$(NORMAL_INSTALL) - $(MAKE) install-man1 install-man5 -uninstall-man: @$(NORMAL_UNINSTALL) - $(MAKE) uninstall-man1 uninstall-man5 + @list=''; test -n "$(man5dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.5[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) +install-man8: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) install-sysconfDATA: $(sysconf_DATA) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(sysconfdir) - @list='$(sysconf_DATA)'; for p in $$list; do \ - if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p; \ - else if test -f $$p; then \ - echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$p; \ - fi; fi; \ + @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ done uninstall-sysconfDATA: @$(NORMAL_UNINSTALL) - list='$(sysconf_DATA)'; for p in $$list; do \ - rm -f $(DESTDIR)$(sysconfdir)/$$p; \ - done -tags: TAGS -TAGS: + @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) +tags TAGS: +ctags CTAGS: -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +cscope cscopelist: -subdir = scripts distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ done -info: -dvi: -check: all - $(MAKE) -installcheck: -install-exec: install-binSCRIPTS install-sbinSCRIPTS install-sysconfDATA - @$(NORMAL_INSTALL) - -install-data: install-man - @$(NORMAL_INSTALL) - -install: install-exec install-data all - @: - -uninstall: uninstall-binSCRIPTS uninstall-sbinSCRIPTS uninstall-man uninstall-sysconfDATA - -install-strip: - $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) $(MANS) $(DATA) installdirs: - $(mkinstalldirs) $(DATADIR)$(bindir) $(DATADIR)$(sbindir) \ - $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 \ - $(DATADIR)$(sysconfdir) + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(sysconfdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f Makefile $(DISTCLEANFILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean: mostlyclean-generic - -clean: clean-generic mostlyclean - -distclean: distclean-generic clean - -rm -f config.status - -rm -f libtool - -maintainer-clean: maintainer-clean-generic distclean - @echo "This command is intended for maintainers to use;" + @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +clean: clean-am -.PHONY: uninstall-binSCRIPTS install-binSCRIPTS uninstall-sbinSCRIPTS \ -install-sbinSCRIPTS install-man1 uninstall-man1 install-man5 \ -uninstall-man5 install-man uninstall-man uninstall-sysconfDATA \ -install-sysconfDATA tags distdir info dvi installcheck install-exec \ -install-data install uninstall all installdirs mostlyclean-generic \ -distclean-generic clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-sbinSCRIPTS install-sysconfDATA + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man5 install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man uninstall-sbinSCRIPTS \ + uninstall-sysconfDATA + +uninstall-man: uninstall-man5 uninstall-man8 + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man5 install-man8 install-pdf install-pdf-am \ + install-ps install-ps-am install-sbinSCRIPTS install-strip \ + install-sysconfDATA installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am uninstall-man uninstall-man5 \ + uninstall-man8 uninstall-sbinSCRIPTS uninstall-sysconfDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/scripts/amd.conf-sample b/scripts/amd.conf-sample index 880a74ba755..4d965787099 100644 --- a/scripts/amd.conf-sample +++ b/scripts/amd.conf-sample @@ -64,8 +64,8 @@ nis_domain = nisDom-CS.columbia.edu # (amd -x) log_options = fatal,error,user,warn,info,map,stats,all # (amd -D) -debug_options = all,amq,daemon,fork,full,hrtime,info,mem,mtab,\ - str,readdir,test,trace,xdrtrace +debug_options = all,defaults,test,amq,daemon,fork,\ + full,hrtime,info,mem,mtab,str,readdir,trace,xdrtrace # path for mtab file during mtab debug mode debug_mtab_file = /tmp/mnttab # (amd -S) @@ -108,7 +108,7 @@ exec_map_timeout = 10 normalize_slashes = yes | no ############################################################################## -# these 8 global options can be overridden by each map individually +# these 9 global options can be overridden by each map individually browsable_dirs = no | yes | full map_options = cache:=all map_type = file|hesiod|ndbm|nis|nisplus|passwd|union|ldap @@ -119,6 +119,8 @@ autofs_use_lofs = yes | no search_path = /etc/local:/etc/amdmaps:/misc/yp # selectors are not recognized by default in the /defaults entry selectors_in_defaults = no | yes +# does this map use Sun Automounter map syntax? +sun_map_syntax = no | yes ############################################################################## ############################################################################## diff --git a/scripts/amd.conf.5 b/scripts/amd.conf.5 index 36e08cd9a41..2fa4334b314 100644 --- a/scripts/amd.conf.5 +++ b/scripts/amd.conf.5 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1990 Jan-Simon Pendry .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -36,9 +32,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %W% (Berkeley) %G% .\" -.\" $Id: amd.conf.5,v 1.39.2.5 2006/04/21 01:12:04 ezk Exp $ +.\" File: am-utils/scripts/amd.conf.5 .\" .TH AMD.CONF 5 "7 August 1997" .SH NAME @@ -192,6 +187,10 @@ slow slip-based networks as follows: Deprecated form: selectors_on_default +.TP +.BR sun_map_syntax " (boolean, default=no)" +If "yes," then Amd will parse the map according to the Sun Automount syntax. + .\" ************************************************************************** .SS Parameters applicable to the global section only @@ -254,7 +253,9 @@ meaning. You can get the list of supported debugging options by running Amd \-H. Possible values are: .nf -\fBall\fR all options +\fBall\fR all options (excludes hrtime and mtab) +\fBdefaults\fR "sensible" default options (all--excluding hrtime, mtab, and xdrtrace) +\fBtest\fR full debug options plus mtab,nodaemon,nofork,noamq \fBamq\fR register for amq \fBdaemon\fR enter daemon mode \fBfork\fR fork server @@ -262,10 +263,9 @@ meaning. You can get the list of supported debugging options by running Amd \fBhrtime\fR print high resolution time stamps (only if syslog(3) is not used) \fBinfo\fR info service specific debugging (hesiod, nis, etc.) \fBmem\fR trace memory allocations -\fBmtab\fR use local "./mtab" file +\fBmtab\fR use local "/tmp/mtab" file \fBreaddir\fR show browsable_dirs progress \fBstr\fR debug string munging -\fBtest\fR full debug but no daemon \fBtrace\fR trace protocol and NFS mount arguments \fBxdrtrace\fR trace XDR routines .fi @@ -407,7 +407,7 @@ then Amd will log messages via using the LOG_LOCAL7 facility (if it exists on the system). .TP -.BR log_options " (string, default no logging options)" +.BR log_options " (string, default=defaults)" Same as the .B \-x option to Amd. Specify any logging options for Amd. Options are comma @@ -421,9 +421,10 @@ Possible values are: .nf \fBall\fR all messages +\fBdefaults\fR default messages (fatal,error,user,warning,info) \fBdebug\fR debug messages -\fBerror\fR non-fatal system errors -\fBfatal\fR fatal errors +\fBerror\fR non-fatal system errors (cannot be turned off) +\fBfatal\fR fatal errors (cannot be turned off) \fBinfo\fR information \fBmap\fR map errors \fBstats\fR additional statistical information @@ -763,6 +764,7 @@ map_name = amd.tftpboot .BR amd (8), .BR amq (8), .BR ctl-amd (8), +.BR automount (8), .BR hosts_access (5). .LP ``am-utils'' diff --git a/scripts/automount2amd.8 b/scripts/automount2amd.8 index bd3b61230ab..f9a04d928cd 100644 --- a/scripts/automount2amd.8 +++ b/scripts/automount2amd.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1990 Jan-Simon Pendry .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -36,9 +32,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %W% (Berkeley) %G% .\" -.\" $Id: automount2amd.8,v 1.8.2.1 2006/01/02 18:48:26 ezk Exp $ +.\" File: am-utils/scripts/automount2amd.8 .\" .TH AUTOMOUNT2AMD 8L "24 May 1993" .SH NAME diff --git a/scripts/expn.1 b/scripts/expn.1 deleted file mode 100644 index f316247b4a9..00000000000 --- a/scripts/expn.1 +++ /dev/null @@ -1,1369 +0,0 @@ -#!@PERL@ -'di '; -'ds 00 \\"'; -'ig 00 '; -# -# THIS PROGRAM IS ITS OWN MANUAL PAGE. INSTALL IN man & bin. -# - -# hardcoded constants, should work fine for BSD-based systems -#require 'sys/socket.ph'; # perl 4 -use Socket; # perl 5 -$AF_INET = &AF_INET; -$SOCK_STREAM = &SOCK_STREAM; -$sockaddr = 'S n a4 x8'; - -# system requirements: -# must have 'nslookup' and 'hostname' programs. - -# $Header: /home/cvsroot/am-utils/scripts/expn.1,v 1.4 2003/07/18 15:17:37 ezk Exp $ - -# TODO: -# less magic should apply to command-line addresses -# less magic should apply to local addresses -# add magic to deal with cross-domain cnames - -# Checklist: (hard addresses) -# 250 Kimmo Suominen <"|/usr/local/mh/lib/slocal -user kim"@grendel.tac.nyc.ny.us> -# harry@hofmann.cs.Berkeley.EDU -> harry@tenet (.berkeley.edu) [dead] -# bks@cs.berkeley.edu -> shiva.CS (.berkeley.edu) [dead] -# dan@tc.cornell.edu -> brown@tiberius (.tc.cornell.edu) - -############################################################################# -# -# Copyright (c) 1993 David Muir Sharnoff -# 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 acknowledgment: -# This product includes software developed by the David Muir Sharnoff. -# 4. The name of David Sharnoff may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE DAVID MUIR SHARNOFF ``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 DAVID MUIR SHARNOFF 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. -# -# This copyright notice derived from material copyrighted by the Regents -# of the University of California. -# -# Contributions accepted. -# -############################################################################# - -# overall structure: -# in an effort to not trace each address individually, but rather -# ask each server in turn a whole bunch of questions, addresses to -# be expanded are queued up. -# -# This means that all accounting w.r.t. an address must be stored in -# various arrays. Generally these arrays are indexed by the -# string "$addr *** $server" where $addr is the address to be -# expanded "foo" or maybe "foo@bar" and $server is the hostname -# of the SMTP server to contact. -# - -# important global variables: -# -# @hosts : list of servers still to be contacted -# $server : name of the current we are currently looking at -# @users = $users{@hosts[0]} : addresses to expand at this server -# $u = $users[0] : the current address being expanded -# $names{"$users[0] *** $server"} : the 'name' associated with the address -# $mxbacktrace{"$users[0] *** $server"} : record of mx expansion -# $mx_secondary{$server} : other mx relays at the same priority -# $domainify_fallback{"$users[0] *** $server"} : alternative names to try -# instead of $server if $server doesn't work -# $temporary_redirect{"$users[0] *** $server"} : when trying alternates, -# temporarily channel all tries along current path -# $giveup{$server} : do not bother expanding addresses at $server -# $verbose : -v -# $watch : -w -# $vw : -v or -w -# $debug : -d -# $valid : -a -# $levels : -1 -# S : the socket connection to $server - -$have_nslookup = 1; # we have the nslookup program -$port = 'smtp'; -$av0 = $0; -$ENV{'PATH'} .= ":/usr/etc" unless $ENV{'PATH'} =~ m,/usr/etc,; -$ENV{'PATH'} .= ":/usr/ucb" unless $ENV{'PATH'} =~ m,/usr/ucb,; -select(STDERR); - -$0 = "$av0 - running hostname"; -chop($name = `hostname || uname -n`); - -$0 = "$av0 - lookup host FQDN and IP addr"; -($hostname,$aliases,$type,$len,$thisaddr) = gethostbyname($name); - -$0 = "$av0 - parsing args"; -$usage = "Usage: $av0 [-1avwd] user[\@host] [user2[host2] ...]"; -for $a (@ARGV) { - die $usage if $a eq "-"; - while ($a =~ s/^(-.*)([1avwd])/$1/) { - eval '$'."flag_$2 += 1"; - } - next if $a eq "-"; - die $usage if $a =~ /^-/; - &expn(&parse($a,$hostname,undef,1)); -} -$verbose = $flag_v; -$watch = $flag_w; -$vw = $flag_v + $flag_w; -$debug = $flag_d; -$valid = $flag_a; -$levels = $flag_1; - -die $usage unless @hosts; -if ($valid) { - if ($valid == 1) { - $validRequirement = 0.8; - } elsif ($valid == 2) { - $validRequirement = 1.0; - } elsif ($valid == 3) { - $validRequirement = 0.9; - } else { - $validRequirement = (1 - (1/($valid-3))); - print "validRequirement = $validRequirement\n" if $debug; - } -} - -$0 = "$av0 - building local socket"; -($name,$aliases,$proto) = getprotobyname('tcp'); -($name,$aliases,$port) = getservbyname($port,'tcp') - unless $port =~ /^\d+/; -$this = pack($sockaddr, &AF_INET, 0, $thisaddr); - -HOST: -while (@hosts) { - $server = shift(@hosts); - @users = split(' ',$users{$server}); - delete $users{$server}; - - # is this server already known to be bad? - $0 = "$av0 - looking up $server"; - if ($giveup{$server}) { - &giveup('mx domainify',$giveup{$server}); - next; - } - - # do we already have an mx record for this host? - next HOST if &mxredirect($server,*users); - - # look it up, or try for an mx. - $0 = "$av0 - gethostbyname($server)"; - - ($name,$aliases,$type,$len,$thataddr) = gethostbyname($server); - # if we can't get an A record, try for an MX record. - unless($thataddr) { - &mxlookup(1,$server,"$server: could not resolve name",*users); - next HOST; - } - - # get a connection, or look for an mx - $0 = "$av0 - socket to $server"; - $that = pack($sockaddr, &AF_INET, $port, $thataddr); - socket(S, &AF_INET, &SOCK_STREAM, $proto) - || die "socket: $!"; - $0 = "$av0 - bind to $server"; - bind(S, $this) - || die "bind $hostname,0: $!"; - $0 = "$av0 - connect to $server"; - print "debug = $debug server = $server\n" if $debug > 8; - if (! connect(S, $that) || ($debug == 10 && $server =~ /relay\d.UU.NET$/i)) { - $0 = "$av0 - $server: could not connect: $!\n"; - $emsg = $!; - unless (&mxlookup(0,$server,"$server: could not connect: $!",*users)) { - &giveup('mx',"$server: Could not connect: $emsg"); - } - next HOST; - } - select((select(S),$| = 1)[0]); # don't buffer output to S - - # read the greeting - $0 = "$av0 - talking to $server"; - &alarm("greeting with $server",''); - while() { - alarm(0); - print if $watch; - if (/^(\d+)([- ])/) { - if ($1 != 220) { - $0 = "$av0 - bad numeric response from $server"; - &alarm("giving up after bad response from $server",''); - &read_response($2,$watch); - alarm(0); - print STDERR "$server: NOT 220 greeting: $_" - if ($debug || $vw); - if (&mxlookup(0,$server,"$server: did not respond with a 220 greeting",*users)) { - close(S); - next HOST; - } - } - last if ($2 eq " "); - } else { - $0 = "$av0 - bad response from $server"; - print STDERR "$server: NOT 220 greeting: $_" - if ($debug || $vw); - unless (&mxlookup(0,$server,"$server: did not respond with SMTP codes",*users)) { - &giveup('',"$server: did not talk SMTP"); - } - close(S); - next HOST; - } - &alarm("greeting with $server",''); - } - alarm(0); - - # if this causes problems, remove it - $0 = "$av0 - sending helo to $server"; - &alarm("sending helo to $server",""); - &ps("helo $hostname"); - while() { - print if $watch; - last if /^\d+ /; - } - alarm(0); - - # try the users, one by one - USER: - while(@users) { - $u = shift(@users); - $0 = "$av0 - expanding $u [\@$server]"; - - # do we already have a name for this user? - $oldname = $names{"$u *** $server"}; - - print &compact($u,$server)." ->\n" if ($verbose && ! $valid); - if ($valid) { - # - # when running with -a, we delay taking any action - # on the results of our query until we have looked - # at the complete output. @toFinal stores expansions - # that will be final if we take them. @toExpn stores - # expansions that are not final. @isValid keeps - # track of our ability to send mail to each of the - # expansions. - # - @isValid = (); - @toFinal = (); - @toExpn = (); - } - -# ($ecode,@expansion) = &expn_vrfy($u,$server); - (@foo) = &expn_vrfy($u,$server); - ($ecode,@expansion) = @foo; - if ($ecode) { - &giveup('',$ecode,$u); - last USER; - } - - for $s (@expansion) { - $s =~ s/[\n\r]//g; - $0 = "$av0 - parsing $server: $s"; - - $skipwatch = $watch; - - if ($s =~ /^[25]51([- ]).*<(.+)>/) { - print "$s" if $watch; - print "(pretending 250$1<$2>)" if ($debug && $watch); - print "\n" if $watch; - $s = "250$1<$2>"; - $skipwatch = 0; - } - - if ($s =~ /^250([- ])(.+)/) { - print "$s\n" if $skipwatch; - ($done,$addr) = ($1,$2); - ($newhost, $newaddr, $newname) = &parse($addr,$server,$oldname, $#expansion == 0); - print "($newhost, $newaddr, $newname) = &parse($addr, $server, $oldname)\n" if $debug; - if (! $newhost) { - # no expansion is possible w/o a new server to call - if ($valid) { - push(@isValid, &validAddr($newaddr)); - push(@toFinal,$newaddr,$server,$newname); - } else { - &verbose(&final($newaddr,$server,$newname)); - } - } else { - $newmxhost = &mx($newhost,$newaddr); - print "$newmxhost = &mx($newhost)\n" - if ($debug && $newhost ne $newmxhost); - $0 = "$av0 - parsing $newaddr [@$newmxhost]"; - print "levels = $levels, level{$u *** $server} = ".$level{"$u *** $server"}."\n" if ($debug > 1); - # If the new server is the current one, - # it would have expanded things for us - # if it could have. Mx records must be - # followed to compare server names. - # We are also done if the recursion - # count has been exceeded. - if (&trhost($newmxhost) eq &trhost($server) || ($levels && $level{"$u *** $server"} >= $levels)) { - if ($valid) { - push(@isValid, &validAddr($newaddr)); - push(@toFinal,$newaddr,$newmxhost,$newname); - } else { - &verbose(&final($newaddr,$newmxhost,$newname)); - } - } else { - # more work to do... - if ($valid) { - push(@isValid, &validAddr($newaddr)); - push(@toExpn,$newmxhost,$newaddr,$newname,$level{"$u *** $server"}); - } else { - &verbose(&expn($newmxhost,$newaddr,$newname,$level{"$u *** $server"})); - } - } - } - last if ($done eq " "); - next; - } - # 550 is a known code... Should the be - # included in -a output? Might be a bug - # here. Does it matter? Can assume that - # there won't be UNKNOWN USER responses - # mixed with valid users? - if ($s =~ /^(550)([- ])/) { - if ($valid) { - print STDERR "\@$server:$u ($oldname) USER UNKNOWN\n"; - } else { - &verbose(&final($u,$server,$oldname,"USER UNKNOWN")); - } - last if ($2 eq " "); - next; - } - # 553 is a known code... - if ($s =~ /^(553)([- ])/) { - if ($valid) { - print STDERR "\@$server:$u ($oldname) USER AMBIGUOUS\n"; - } else { - &verbose(&final($u,$server,$oldname,"USER AMBIGUOUS")); - } - last if ($2 eq " "); - next; - } - # 252 is a known code... - if ($s =~ /^(252)([- ])/) { - if ($valid) { - print STDERR "\@$server:$u ($oldname) REFUSED TO VRFY\n"; - } else { - &verbose(&final($u,$server,$oldname,"REFUSED TO VRFY")); - } - last if ($2 eq " "); - next; - } - &giveup('',"$server: did not grok '$s'",$u); - last USER; - } - - if ($valid) { - # - # now we decide if we are going to take these - # expansions or roll them back. - # - $avgValid = &average(@isValid); - print "avgValid = $avgValid\n" if $debug; - if ($avgValid >= $validRequirement) { - print &compact($u,$server)." ->\n" if $verbose; - while (@toExpn) { - &verbose(&expn(splice(@toExpn,0,4))); - } - while (@toFinal) { - &verbose(&final(splice(@toFinal,0,3))); - } - } else { - print "Tossing some valid to avoid invalid ".&compact($u,$server)."\n" if ($avgValid > 0.0 && ($vw || $debug)); - print &compact($u,$server)." ->\n" if $verbose; - &verbose(&final($u,$server,$newname)); - } - } - } - - &alarm("sending 'quit' to $server",''); - $0 = "$av0 - sending 'quit' to $server"; - &ps("quit"); - while() { - print if $watch; - last if /^\d+ /; - } - close(S); - alarm(0); -} - -$0 = "$av0 - printing final results"; -print "----------\n" if $vw; -select(STDOUT); -for $f (sort @final) { - print "$f\n"; -} -unlink("/tmp/expn$$"); -exit(0); - - -# abandon all attempts deliver to $server -# register the current addresses as the final ones -sub giveup -{ - local($redirect_okay,$reason,$user) = @_; - local($us,@so,$nh,@remaining_users); - local($pk,$file,$line); - ($pk, $file, $line) = caller; - - $0 = "$av0 - giving up on $server: $reason"; - # - # add back a user if we gave up in the middle - # - push(@users,$user) if $user; - # - # don't bother with this system anymore - # - unless ($giveup{$server}) { - $giveup{$server} = $reason; - print STDERR "$reason\n"; - } - print "Giveup at $file:$line!!! redirect okay = $redirect_okay; $reason\n" if $debug; - # - # Wait! - # Before giving up, see if there is a chance that - # there is another host to redirect to! - # (Kids, don't do this at home! Hacking is a dangerous - # crime and you could end up behind bars.) - # - for $u (@users) { - if ($redirect_okay =~ /\bmx\b/) { - next if &try_fallback('mx',$u,*server, - *mx_secondary, - *already_mx_fellback); - } - if ($redirect_okay =~ /\bdomainify\b/) { - next if &try_fallback('domainify',$u,*server, - *domainify_fallback, - *already_domainify_fellback); - } - push(@remaining_users,$u); - } - @users = @remaining_users; - for $u (@users) { - print &compact($u,$server)." ->\n" if ($verbose && $valid && $u); - &verbose(&final($u,$server,$names{"$u *** $server"},$reason)); - } -} -# -# This routine is used only within &giveup. It checks to -# see if we really have to giveup or if there is a second -# chance because we did something before that can be -# backtracked. -# -# %fallback{"$user *** $host"} tracks what is able to fallback -# %fellback{"$user *** $host"} tracks what has fallen back -# -# If there is a valid backtrack, then queue up the new possibility -# -sub try_fallback -{ - local($method,$user,*host,*fall_table,*fellback) = @_; - local($us,$fallhost,$oldhost,$ft,$i); - - if ($debug > 8) { - print "Fallback table $method:\n"; - for $i (sort keys %fall_table) { - print "\t'$i'\t\t'$fall_table{$i}'\n"; - } - print "Fellback table $method:\n"; - for $i (sort keys %fellback) { - print "\t'$i'\t\t'$fellback{$i}'\n"; - } - print "U: $user H: $host\n"; - } - - $us = "$user *** $host"; - if (defined $fellback{$us}) { - # - # Undo a previous fallback so that we can try again - # Nested fallbacks are avoided because they could - # lead to infinite loops - # - $fallhost = $fellback{$us}; - print "Already $method fell back from $us -> \n" if $debug; - $us = "$user *** $fallhost"; - $oldhost = $fallhost; - } elsif (($method eq 'mx') && (defined $mxbacktrace{$us}) && (defined $mx_secondary{$mxbacktrace{$us}})) { - print "Fallback an MX expansion $us -> \n" if $debug; - $oldhost = $mxbacktrace{$us}; - } else { - print "Oldhost($host, $us) = " if $debug; - $oldhost = $host; - } - print "$oldhost\n" if $debug; - if (((defined $fall_table{$us}) && ($ft = $us)) || ((defined $fall_table{$oldhost}) && ($ft = $oldhost))) { - print "$method Fallback = ".$fall_table{$ft}."\n" if $debug; - local(@so,$newhost); - @so = split(' ',$fall_table{$ft}); - $newhost = shift(@so); - print "Falling back ($method) $us -> $newhost (from $oldhost)\n" if $debug; - if ($method eq 'mx') { - if (! defined ($mxbacktrace{"$user *** $newhost"})) { - if (defined $mxbacktrace{"$user *** $oldhost"}) { - print "resetting oldhost $oldhost to the original: " if $debug; - $oldhost = $mxbacktrace{"$user *** $oldhost"}; - print "$oldhost\n" if $debug; - } - $mxbacktrace{"$user *** $newhost"} = $oldhost; - print "mxbacktrace $user *** $newhost -> $oldhost\n" if $debug; - } - $mx{&trhost($oldhost)} = $newhost; - } else { - $temporary_redirect{$us} = $newhost; - } - if (@so) { - print "Can still $method $us: @so\n" if $debug; - $fall_table{$ft} = join(' ',@so); - } else { - print "No more fallbacks for $us\n" if $debug; - delete $fall_table{$ft}; - } - if (defined $create_host_backtrack{$us}) { - $create_host_backtrack{"$user *** $newhost"} - = $create_host_backtrack{$us}; - } - $fellback{"$user *** $newhost"} = $oldhost; - &expn($newhost,$user,$names{$us},$level{$us}); - return 1; - } - delete $temporary_redirect{$us}; - $host = $oldhost; - return 0; -} -# return 1 if you could send mail to the address as is. -sub validAddr -{ - local($addr) = @_; - $res = &do_validAddr($addr); - print "validAddr($addr) = $res\n" if $debug; - $res; -} -sub do_validAddr -{ - local($addr) = @_; - local($urx) = "[-A-Za-z_.0-9+]+"; - - # \u - return 0 if ($addr =~ /^\\/); - # ?@h - return 1 if ($addr =~ /.\@$urx$/); - # @h:? - return 1 if ($addr =~ /^\@$urx\:./); - # h!u - return 1 if ($addr =~ /^$urx!./); - # u - return 1 if ($addr =~ /^$urx$/); - # ? - print "validAddr($addr) = ???\n" if $debug; - return 0; -} -# Some systems use expn and vrfy interchangeably. Some only -# implement one or the other. Some check expn against mailing -# lists and vrfy against users. It doesn't appear to be -# consistent. -# -# So, what do we do? We try everything! -# -# -# Ranking of result codes: good: 250, 251/551, 252, 550, anything else -# -# Ranking of inputs: best: user@host.domain, okay: user -# -# Return value: $error_string, @responses_from_server -sub expn_vrfy -{ - local($u,$server) = @_; - local(@c) = ('expn', 'vrfy'); - local(@try_u) = $u; - local(@ret,$code); - - if (($u =~ /(.+)@(.+)/) && (&trhost($2) eq &trhost($server))) { - push(@try_u,$1); - } - - TRY: - for $c (@c) { - for $try_u (@try_u) { - &alarm("${c}'ing $try_u on $server",'',$u); - &ps("$c $try_u"); - alarm(0); - $s = ; - if ($s eq '') { - return "$server: lost connection"; - } - if ($s !~ /^(\d+)([- ])/) { - return "$server: garbled reply to '$c $try_u'"; - } - if ($1 == 250) { - $code = 250; - @ret = ("",$s); - push(@ret,&read_response($2,$debug)); - return (@ret); - } - if ($1 == 551 || $1 == 251) { - $code = $1; - @ret = ("",$s); - push(@ret,&read_response($2,$debug)); - next; - } - if ($1 == 252 && ($code == 0 || $code == 550)) { - $code = 252; - @ret = ("",$s); - push(@ret,&read_response($2,$watch)); - next; - } - if ($1 == 550 && $code == 0) { - $code = 550; - @ret = ("",$s); - push(@ret,&read_response($2,$watch)); - next; - } - &read_response($2,$watch); - } - } - return "$server: expn/vrfy not implemented" unless @ret; - return @ret; -} -# sometimes the old parse routine (now parse2) didn't -# reject funky addresses. -sub parse -{ - local($oldaddr,$server,$oldname,$one_to_one) = @_; - local($newhost, $newaddr, $newname, $um) = &parse2($oldaddr,$server,$oldname,$one_to_one); - if ($newaddr =~ m,^["/],) { - return (undef, $oldaddr, $newname) if $valid; - return (undef, $um, $newname); - } - return ($newhost, $newaddr, $newname); -} - -# returns ($new_smtp_server,$new_address,$new_name) -# given a response from a SMTP server ($newaddr), the -# current host ($server), the old "name" and a flag that -# indicates if it is being called during the initial -# command line parsing ($parsing_args) -sub parse2 -{ - local($newaddr,$context_host,$old_name,$parsing_args) = @_; - local(@names) = $old_name; - local($urx) = "[-A-Za-z_.0-9+]+"; - local($unmangle); - - # - # first, separate out the address part. - # - - # - # [NAME] - # [NAME] <[(NAME)] ADDR - # ADDR [(NAME)] - # (NAME) ADDR - # [(NAME)] - # - if ($newaddr =~ /^\<(.*)\>$/) { - print "\n" if $debug; - ($newaddr) = &trim($1); - print "na = $newaddr\n" if $debug; - } - if ($newaddr =~ /^([^\<\>]*)\<([^\<\>]*)\>([^\<\>]*)$/) { - # address has a < > pair in it. - print "N:$1 N:$3\n" if $debug; - ($newaddr) = &trim($2); - unshift(@names, &trim($3,$1)); - print "na = $newaddr\n" if $debug; - } - if ($newaddr =~ /^([^\(\)]*)\(([^\(\)]*)\)([^\(\)]*)$/) { - # address has a ( ) pair in it. - print "A:$1 (N:$2) A:$3\n" if $debug; - unshift(@names,&trim($2)); - local($f,$l) = (&trim($1),&trim($3)); - if (($f && $l) || !($f || $l)) { - # address looks like: - # foo (bar) baz or (bar) - # not allowed! - print STDERR "Could not parse $newaddr\n" if $vw; - return(undef,$newaddr,&firstname(@names)); - } - $newaddr = $f if $f; - $newaddr = $l if $l; - print "newaddr now = $newaddr\n" if $debug; - } - # - # @foo:bar - # j%k@l - # a@b - # b!a - # a - # - $unmangle = $newaddr; - if ($newaddr =~ /^\@($urx)\:(.+)$/) { - print "(\@:)" if $debug; - # this is a bit of a cheat, but it seems necessary - return (&domainify($1,$context_host,$2),$2,&firstname(@names),$unmangle); - } - if ($newaddr =~ /^(.+)\@($urx)$/) { - print "(\@)" if $debug; - return (&domainify($2,$context_host,$newaddr),$newaddr,&firstname(@names),$unmangle); - } - if ($parsing_args) { - if ($newaddr =~ /^($urx)\!(.+)$/) { - return (&domainify($1,$context_host,$newaddr),$newaddr,&firstname(@names),$unmangle); - } - if ($newaddr =~ /^($urx)$/) { - return ($context_host,$newaddr,&firstname(@names),$unmangle); - } - print STDERR "Could not parse $newaddr\n"; - } - print "(?)" if $debug; - return(undef,$newaddr,&firstname(@names),$unmangle); -} -# return $u (@$server) unless $u includes reference to $server -sub compact -{ - local($u, $server) = @_; - local($se) = $server; - local($sp); - $se =~ s/(\W)/\\$1/g; - $sp = " (\@$server)"; - if ($u !~ /$se/i) { - return "$u$sp"; - } - return $u; -} -# remove empty (spaces don't count) members from an array -sub trim -{ - local(@v) = @_; - local($v,@r); - for $v (@v) { - $v =~ s/^\s+//; - $v =~ s/\s+$//; - push(@r,$v) if ($v =~ /\S/); - } - return(@r); -} -# using the host part of an address, and the server name, add the -# servers' domain to the address if it doesn't already have a -# domain. Since this sometimes fails, save a back reference so -# it can be unrolled. -sub domainify -{ - local($host,$domain_host,$u) = @_; - local($domain,$newhost); - - # cut of trailing dots - $host =~ s/\.$//; - $domain_host =~ s/\.$//; - - if ($domain_host !~ /\./) { - # - # domain host isn't, keep $host whatever it is - # - print "domainify($host,$domain_host) = $host\n" if $debug; - return $host; - } - - # - # There are several weird situations that need to be - # accounted for. They have to do with domain relay hosts. - # - # Examples: - # host server "right answer" - # - # shiva.cs cs.berkeley.edu shiva.cs.berkeley.edu - # shiva cs.berkeley.edu shiva.cs.berekley.edu - # cumulus reed.edu @reed.edu:cumulus.uucp - # tiberius tc.cornell.edu tiberius.tc.cornell.edu - # - # The first try must always be to cut the domain part out of - # the server and tack it onto the host. - # - # A reasonable second try is to tack the whole server part onto - # the host and for each possible repeated element, eliminate - # just that part. - # - # These extra "guesses" get put into the %domainify_fallback - # array. They will be used to give addresses a second chance - # in the &giveup routine - # - - local(%fallback); - - local($long); - $long = "$host $domain_host"; - $long =~ tr/A-Z/a-z/; - print "long = $long\n" if $debug; - if ($long =~ s/^([^ ]+\.)([^ ]+) \2(\.[^ ]+\.[^ ]+)/$1$2$3/) { - # matches shiva.cs cs.berkeley.edu and returns shiva.cs.berkeley.edu - print "condensed fallback $host $domain_host -> $long\n" if $debug; - $fallback{$long} = 9; - } - - local($fh); - $fh = $domain_host; - while ($fh =~ /\./) { - print "FALLBACK $host.$fh = 1\n" if $debug > 7; - $fallback{"$host.$fh"} = 1; - $fh =~ s/^[^\.]+\.//; - } - - $fallback{"$host.$domain_host"} = 2; - - ($domain = $domain_host) =~ s/^[^\.]+//; - $fallback{"$host$domain"} = 6 - if ($domain =~ /\./); - - if ($host =~ /\./) { - # - # Host is already okay, but let's look for multiple - # interpretations - # - print "domainify($host,$domain_host) = $host\n" if $debug; - delete $fallback{$host}; - $domainify_fallback{"$u *** $host"} = join(' ',sort {$fallback{$b} <=> $fallback{$a};} keys %fallback) if %fallback; - return $host; - } - - $domain = ".$domain_host" - if ($domain !~ /\..*\./); - $newhost = "$host$domain"; - - $create_host_backtrack{"$u *** $newhost"} = $domain_host; - print "domainify($host,$domain_host) = $newhost\n" if $debug; - delete $fallback{$newhost}; - $domainify_fallback{"$u *** $newhost"} = join(' ',sort {$fallback{$b} <=> $fallback{$a};} keys %fallback) if %fallback; - if ($debug) { - print "fallback = "; - print $domainify_fallback{"$u *** $newhost"} - if defined($domainify_fallback{"$u *** $newhost"}); - print "\n"; - } - return $newhost; -} -# return the first non-empty element of an array -sub firstname -{ - local(@names) = @_; - local($n); - while(@names) { - $n = shift(@names); - return $n if $n =~ /\S/; - } - return undef; -} -# queue up more addresses to expand -sub expn -{ - local($host,$addr,$name,$level) = @_; - if ($host) { - $host = &trhost($host); - - if (($debug > 3) || (defined $giveup{$host})) { - unshift(@hosts,$host) unless $users{$host}; - } else { - push(@hosts,$host) unless $users{$host}; - } - $users{$host} .= " $addr"; - $names{"$addr *** $host"} = $name; - $level{"$addr *** $host"} = $level + 1; - print "expn($host,$addr,$name)\n" if $debug; - return "\t$addr\n"; - } else { - return &final($addr,'NONE',$name); - } -} -# compute the numerical average value of an array -sub average -{ - local(@e) = @_; - return 0 unless @e; - local($e,$sum); - for $e (@e) { - $sum += $e; - } - $sum / @e; -} -# print to the server (also to stdout, if -w) -sub ps -{ - local($p) = @_; - print ">>> $p\n" if $watch; - print S "$p\n"; -} -# return case-adjusted name for a host (for comparison purposes) -sub trhost -{ - # treat foo.bar as an alias for Foo.BAR - local($host) = @_; - local($trhost) = $host; - $trhost =~ tr/A-Z/a-z/; - if ($trhost{$trhost}) { - $host = $trhost{$trhost}; - } else { - $trhost{$trhost} = $host; - } - $trhost{$trhost}; -} -# re-queue users if an mx record dictates a redirect -# don't allow a user to be redirected more than once -sub mxredirect -{ - local($server,*users) = @_; - local($u,$nserver,@still_there); - - $nserver = &mx($server); - - if (&trhost($nserver) ne &trhost($server)) { - $0 = "$av0 - mx redirect $server -> $nserver\n"; - for $u (@users) { - if (defined $mxbacktrace{"$u *** $nserver"}) { - push(@still_there,$u); - } else { - $mxbacktrace{"$u *** $nserver"} = $server; - print "mxbacktrace{$u *** $nserver} = $server\n" - if ($debug > 1); - &expn($nserver,$u,$names{"$u *** $server"}); - } - } - @users = @still_there; - if (! @users) { - return $nserver; - } else { - return undef; - } - } - return undef; -} -# follow mx records, return a hostname -# also follow temporary redirections coming from &domainify and -# &mxlookup -sub mx -{ - local($h,$u) = @_; - - for (;;) { - if (defined $mx{&trhost($h)} && $h ne $mx{&trhost($h)}) { - $0 = "$av0 - mx expand $h"; - $h = $mx{&trhost($h)}; - return $h; - } - if ($u) { - if (defined $temporary_redirect{"$u *** $h"}) { - $0 = "$av0 - internal redirect $h"; - print "Temporary redirect taken $u *** $h -> " if $debug; - $h = $temporary_redirect{"$u *** $h"}; - print "$h\n" if $debug; - next; - } - $htr = &trhost($h); - if (defined $temporary_redirect{"$u *** $htr"}) { - $0 = "$av0 - internal redirect $h"; - print "temporary redirect taken $u *** $h -> " if $debug; - $h = $temporary_redirect{"$u *** $htr"}; - print "$h\n" if $debug; - next; - } - } - return $h; - } -} -# look up mx records with the name server. -# re-queue expansion requests if possible -# optionally give up on this host. -sub mxlookup -{ - local($lastchance,$server,$giveup,*users) = @_; - local(*T); - local(*NSLOOKUP); - local($nh, $pref,$cpref); - local($o0) = $0; - local($nserver); - local($name,$aliases,$type,$len,$thataddr); - local(%fallback); - - return 1 if &mxredirect($server,*users); - - if ((defined $mx{$server}) || (! $have_nslookup)) { - return 0 unless $lastchance; - &giveup('mx domainify',$giveup); - return 0; - } - - $0 = "$av0 - nslookup of $server"; - open(T,">/tmp/expn$$") || die "open > /tmp/expn$$: $!\n"; - print T "set querytype=MX\n"; - print T "$server\n"; - close(T); - $cpref = 1.0E12; - undef $nserver; - open(NSLOOKUP,"nslookup < /tmp/expn$$ 2>&1 |") || die "open nslookup: $!"; - while() { - print if ($debug > 2); - if (/mail exchanger = ([-A-Za-z_.0-9+]+)/) { - $nh = $1; - if (/preference = (\d+)/) { - $pref = $1; - if ($pref < $cpref) { - $nserver = $nh; - $cpref = $pref; - } elsif ($pref) { - $fallback{$pref} .= " $nh"; - } - } - } - if (/Non-existent domain/) { - # - # These addresses are hosed. Kaput! Dead! - # However, if we created the address in the - # first place then there is a chance of - # salvation. - # - 1 while(); - close(NSLOOKUP); - return 0 unless $lastchance; - &giveup('domainify',"$server: Non-existent domain",undef,1); - return 0; - } - - } - close(NSLOOKUP); - unlink("/tmp/expn$$"); - unless ($nserver) { - $0 = "$o0 - finished mxlookup"; - return 0 unless $lastchance; - &giveup('mx domainify',"$server: Could not resolve address"); - return 0; - } - - # provide fallbacks in case $nserver doesn't work out - if (defined $fallback{$cpref}) { - $mx_secondary{$server} = $fallback{$cpref}; - } - - $0 = "$av0 - gethostbyname($nserver)"; - ($name,$aliases,$type,$len,$thataddr) = gethostbyname($nserver); - - unless ($thataddr) { - $0 = $o0; - return 0 unless $lastchance; - &giveup('mx domainify',"$nserver: could not resolve address"); - return 0; - } - print "MX($server) = $nserver\n" if $debug; - print "$server -> $nserver\n" if $vw && !$debug; - $mx{&trhost($server)} = $nserver; - # redeploy the users - unless (&mxredirect($server,*users)) { - return 0 unless $lastchance; - &giveup('mx domainify',"$nserver: only one level of mx redirect allowed"); - return 0; - } - $0 = "$o0 - finished mxlookup"; - return 1; -} -# if mx expansion did not help to resolve an address -# (ie: foo@bar became @baz:foo@bar, then undo the -# expansion). -# this is only used by &final -sub mxunroll -{ - local(*host,*addr) = @_; - local($r) = 0; - print "looking for mxbacktrace{$addr *** $host}\n" - if ($debug > 1); - while (defined $mxbacktrace{"$addr *** $host"}) { - print "Unrolling MX expansion: \@$host:$addr -> " - if ($debug || $verbose); - $host = $mxbacktrace{"$addr *** $host"}; - print "\@$host:$addr\n" - if ($debug || $verbose); - $r = 1; - } - return 1 if $r; - $addr = "\@$host:$addr" - if ($host =~ /\./); - return 0; -} -# register a completed expansion. Make the final address as -# simple as possible. -sub final -{ - local($addr,$host,$name,$error) = @_; - local($he); - local($hb,$hr); - local($au,$ah); - - if ($error =~ /Non-existent domain/) { - # - # If we created the domain, then let's undo the - # damage... - # - if (defined $create_host_backtrack{"$addr *** $host"}) { - while (defined $create_host_backtrack{"$addr *** $host"}) { - print "Un&domainifying($host) = " if $debug; - $host = $create_host_backtrack{"$addr *** $host"}; - print "$host\n" if $debug; - } - $error = "$host: could not locate"; - } else { - # - # If we only want valid addresses, toss out - # bad host names. - # - if ($valid) { - print STDERR "\@$host:$addr ($name) Non-existent domain\n"; - return ""; - } - } - } - - MXUNWIND: { - $0 = "$av0 - final parsing of \@$host:$addr"; - ($he = $host) =~ s/(\W)/\\$1/g; - if ($addr !~ /@/) { - # addr does not contain any host - $addr = "$addr@$host"; - } elsif ($addr !~ /$he/i) { - # if host part really something else, use the something - # else. - if ($addr =~ m/(.*)\@([^\@]+)$/) { - ($au,$ah) = ($1,$2); - print "au = $au ah = $ah\n" if $debug; - if (defined $temporary_redirect{"$addr *** $ah"}) { - $addr = "$au\@".$temporary_redirect{"$addr *** $ah"}; - print "Rewrite! to $addr\n" if $debug; - next MXUNWIND; - } - } - # addr does not contain full host - if ($valid) { - if ($host =~ /^([^\.]+)(\..+)$/) { - # host part has a . in it - foo.bar - ($hb, $hr) = ($1, $2); - if ($addr =~ /\@([^\.\@]+)$/ && ($1 eq $hb)) { - # addr part has not . - # and matches beginning of - # host part -- tack on a - # domain name. - $addr .= $hr; - } else { - &mxunroll(*host,*addr) - && redo MXUNWIND; - } - } else { - &mxunroll(*host,*addr) - && redo MXUNWIND; - } - } else { - $addr = "${addr}[\@$host]" - if ($host =~ /\./); - } - } - } - $name = "$name " if $name; - $error = " $error" if $error; - if ($valid) { - push(@final,"$name<$addr>"); - } else { - push(@final,"$name<$addr>$error"); - } - "\t$name<$addr>$error\n"; -} - -sub alarm -{ - local($alarm_action,$alarm_redirect,$alarm_user) = @_; - alarm(3600); - $SIG{ALRM} = 'handle_alarm'; -} -# this involves one great big ugly hack. -# the "next HOST" unwinds the stack! -sub handle_alarm -{ - &giveup($alarm_redirect,"Timed out during $alarm_action",$alarm_user); - next HOST; -} - -# read the rest of the current smtp daemon's response (and toss it away) -sub read_response -{ - local($done,$watch) = @_; - local(@resp); - print $s if $watch; - while(($done eq "-") && ($s = ) && ($s =~ /^\d+([- ])/)) { - print $s if $watch; - $done = $1; - push(@resp,$s); - } - return @resp; -} -# print args if verbose. Return them in any case -sub verbose -{ - local(@tp) = @_; - print "@tp" if $verbose; -} -# to pass perl -w: -@tp; -$flag_a; -$flag_d; -$flag_1; -%already_domainify_fellback; -%already_mx_fellback; -&handle_alarm; -################### BEGIN PERL/TROFF TRANSITION -.00 ; - -'di -.nr nl 0-1 -.nr % 0 -.\\"'; __END__ -.\" ############## END PERL/TROFF TRANSITION -.TH EXPN 1 "March 11, 1993" -.AT 3 -.SH NAME -expn \- recursively expand mail aliases -.SH SYNOPSIS -.B expn -.RI [ -a ] -.RI [ -v ] -.RI [ -w ] -.RI [ -d ] -.RI [ -1 ] -.IR user [@ hostname ] -.RI [ user [@ hostname ]]... -.SH DESCRIPTION -.B expn -will use the SMTP -.B expn -and -.B vrfy -commands to expand mail aliases. -It will first look up the addresses you provide on the command line. -If those expand into addresses on other systems, it will -connect to the other systems and expand again. It will keep -doing this until no further expansion is possible. -.SH OPTIONS -The default output of -.B expn -can contain many lines which are not valid -email addresses. With the -.I -aa -flag, only expansions that result in legal addresses -are used. Since many mailing lists have an illegal -address or two, the single -.IR -a , -address, flag specifies that a few illegal addresses can -be mixed into the results. More -.I -a -flags vary the ratio. Read the source to track down -the formula. With the -.I -a -option, you should be able to construct a new mailing -list out of an existing one. -.LP -If you wish to limit the number of levels deep that -.B expn -will recurse as it traces addresses, use the -.I -1 -option. For each -.I -1 -another level will be traversed. So, -.I -111 -will traverse no more than three levels deep. -.LP -The normal mode of operation for -.B expn -is to do all of its work silently. -The following options make it more verbose. -It is not necessary to make it verbose to see what it is -doing because as it works, it changes its -.BR argv [0] -variable to reflect its current activity. -To see how it is expanding things, the -.IR -v , -verbose, flag will cause -.B expn -to show each address before -and after translation as it works. -The -.IR -w , -watch, flag will cause -.B expn -to show you its conversations with the mail daemons. -Finally, the -.IR -d , -debug, flag will expose many of the inner workings so that -it is possible to eliminate bugs. -.SH ENVIRONMENT -No environment variables are used. -.SH FILES -.B /tmp/expn$$ -.B temporary file used as input to -.BR nslookup . -.SH SEE ALSO -.BR aliases (5), -.BR sendmail (8), -.BR nslookup (8), -RFC 823, and RFC 1123. -.SH BUGS -Not all mail daemons will implement -.B expn -or -.BR vrfy . -It is not possible to verify addresses that are served -by such daemons. -.LP -When attempting to connect to a system to verify an address, -.B expn -only tries one IP address. Most mail daemons -will try harder. -.LP -It is assumed that you are running domain names and that -the -.BR nslookup (8) -program is available. If not, -.B expn -will not be able to verify many addresses. It will also pause -for a long time unless you change the code where it says -.I $have_nslookup = 1 -to read -.I $have_nslookup = -.IR 0 . -.LP -Lastly, -.B expn -does not handle every valid address. If you have an example, -please submit a bug report. -.SH CREDITS -In 1986 or so, Jon Broome wrote a program of the same name -that did about the same thing. It has since suffered bit rot -and Jon Broome has dropped off the face of the earth! -(Jon, if you are out there, drop me a line) -.SH AVAILABILITY -The latest version of -.B expn -is available through anonymous ftp at -.IR ftp://ftp.idiom.com/pub/muir-programs/expn . -.SH AUTHOR -.I David Muir Sharnoff\ \ \ \ diff --git a/scripts/expn.in b/scripts/expn.in deleted file mode 100755 index 9ae57572936..00000000000 --- a/scripts/expn.in +++ /dev/null @@ -1,1369 +0,0 @@ -#!@PERL@ -'di '; -'ds 00 \\"'; -'ig 00 '; -# -# THIS PROGRAM IS ITS OWN MANUAL PAGE. INSTALL IN man & bin. -# - -# hardcoded constants, should work fine for BSD-based systems -#require 'sys/socket.ph'; # perl 4 -use Socket; # perl 5 -$AF_INET = &AF_INET; -$SOCK_STREAM = &SOCK_STREAM; - -# system requirements: -# must have 'nslookup' and 'hostname' programs. - -# $Header: /home/cvsroot/am-utils/scripts/expn.in,v 1.5 2002/07/11 14:28:20 ezk Exp $ - -# TODO: -# less magic should apply to command-line addresses -# less magic should apply to local addresses -# add magic to deal with cross-domain cnames - -# Checklist: (hard addresses) -# 250 Kimmo Suominen <"|/usr/local/mh/lib/slocal -user kim"@grendel.tac.nyc.ny.us> -# harry@hofmann.cs.Berkeley.EDU -> harry@tenet (.berkeley.edu) [dead] -# bks@cs.berkeley.edu -> shiva.CS (.berkeley.edu) [dead] -# dan@tc.cornell.edu -> brown@tiberius (.tc.cornell.edu) - -############################################################################# -# -# Copyright (c) 1993 David Muir Sharnoff -# 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 the David Muir Sharnoff. -# 4. The name of David Sharnoff may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE DAVID MUIR SHARNOFF ``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 DAVID MUIR SHARNOFF 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. -# -# This copyright notice derived from material copyrighted by the Regents -# of the University of California. -# -# Contributions accepted. -# -############################################################################# - -# overall structure: -# in an effort to not trace each address individually, but rather -# ask each server in turn a whole bunch of questions, addresses to -# be expanded are queued up. -# -# This means that all accounting w.r.t. an address must be stored in -# various arrays. Generally these arrays are indexed by the -# string "$addr *** $server" where $addr is the address to be -# expanded "foo" or maybe "foo@bar" and $server is the hostname -# of the SMTP server to contact. -# - -# important global variables: -# -# @hosts : list of servers still to be contacted -# $server : name of the current we are currently looking at -# @users = $users{@hosts[0]} : addresses to expand at this server -# $u = $users[0] : the current address being expanded -# $names{"$users[0] *** $server"} : the 'name' associated with the address -# $mxbacktrace{"$users[0] *** $server"} : record of mx expansion -# $mx_secondary{$server} : other mx relays at the same priority -# $domainify_fallback{"$users[0] *** $server"} : alternative names to try -# instead of $server if $server doesn't work -# $temporary_redirect{"$users[0] *** $server"} : when trying alternates, -# temporarily channel all tries along current path -# $giveup{$server} : do not bother expanding addresses at $server -# $verbose : -v -# $watch : -w -# $vw : -v or -w -# $debug : -d -# $valid : -a -# $levels : -1 -# S : the socket connection to $server - -$have_nslookup = 1; # we have the nslookup program -$port = 'smtp'; -$av0 = $0; -$ENV{'PATH'} .= ":/usr/etc" unless $ENV{'PATH'} =~ m,/usr/etc,; -$ENV{'PATH'} .= ":/usr/ucb" unless $ENV{'PATH'} =~ m,/usr/ucb,; -select(STDERR); - -$0 = "$av0 - running hostname"; -chop($name = `hostname || uname -n`); - -$0 = "$av0 - lookup host FQDN and IP addr"; -($hostname,$aliases,$type,$len,$thisaddr) = gethostbyname($name); - -$0 = "$av0 - parsing args"; -$usage = "Usage: $av0 [-1avwd] user[\@host] [user2[\@host2] ...]"; -for $a (@ARGV) { - die $usage if $a eq "-"; - while ($a =~ s/^(-.*)([1avwd])/$1/) { - eval '$'."flag_$2 += 1"; - } - next if $a eq "-"; - die $usage if $a =~ /^-/; - &expn(&parse($a,$hostname,undef,1)); -} -$verbose = $flag_v; -$watch = $flag_w; -$vw = $flag_v + $flag_w; -$debug = $flag_d; -$valid = $flag_a; -$levels = $flag_1; - -die $usage unless @hosts; -if ($valid) { - if ($valid == 1) { - $validRequirement = 0.8; - } elsif ($valid == 2) { - $validRequirement = 1.0; - } elsif ($valid == 3) { - $validRequirement = 0.9; - } else { - $validRequirement = (1 - (1/($valid-3))); - print "validRequirement = $validRequirement\n" if $debug; - } -} - -$0 = "$av0 - building local socket"; -($name,$aliases,$proto) = getprotobyname('tcp'); -($name,$aliases,$port) = getservbyname($port,'tcp') - unless $port =~ /^\d+/; -$this = sockaddr_in(0, $thisaddr); - -HOST: -while (@hosts) { - $server = shift(@hosts); - @users = split(' ',$users{$server}); - delete $users{$server}; - - # is this server already known to be bad? - $0 = "$av0 - looking up $server"; - if ($giveup{$server}) { - &giveup('mx domainify',$giveup{$server}); - next; - } - - # do we already have an mx record for this host? - next HOST if &mxredirect($server,*users); - - # look it up, or try for an mx. - $0 = "$av0 - gethostbyname($server)"; - - ($name,$aliases,$type,$len,$thataddr) = gethostbyname($server); - # if we can't get an A record, try for an MX record. - unless($thataddr) { - &mxlookup(1,$server,"$server: could not resolve name",*users); - next HOST; - } - - # get a connection, or look for an mx - $0 = "$av0 - socket to $server"; - $that = sockaddr_in($port, $thataddr); - socket(S, &AF_INET, &SOCK_STREAM, $proto) - || die "socket: $!"; - $0 = "$av0 - bind to $server"; - bind(S, $this) - || die "bind $hostname,0: $!"; - $0 = "$av0 - connect to $server"; - print "debug = $debug server = $server\n" if $debug > 8; - if (! connect(S, $that) || ($debug == 10 && $server =~ /relay\d.UU.NET$/i)) { - $0 = "$av0 - $server: could not connect: $!\n"; - $emsg = $!; - unless (&mxlookup(0,$server,"$server: could not connect: $!",*users)) { - &giveup('mx',"$server: Could not connect: $emsg"); - } - next HOST; - } - select((select(S),$| = 1)[0]); # don't buffer output to S - - # read the greeting - $0 = "$av0 - talking to $server"; - &alarm("greeting with $server",''); - while() { - alarm(0); - print if $watch; - if (/^(\d+)([- ])/) { - if ($1 != 220) { - $0 = "$av0 - bad numeric response from $server"; - &alarm("giving up after bad response from $server",''); - &read_response($2,$watch); - alarm(0); - print STDERR "$server: NOT 220 greeting: $_" - if ($debug || $vw); - if (&mxlookup(0,$server,"$server: did not respond with a 220 greeting",*users)) { - close(S); - next HOST; - } - } - last if ($2 eq " "); - } else { - $0 = "$av0 - bad response from $server"; - print STDERR "$server: NOT 220 greeting: $_" - if ($debug || $vw); - unless (&mxlookup(0,$server,"$server: did not respond with SMTP codes",*users)) { - &giveup('',"$server: did not talk SMTP"); - } - close(S); - next HOST; - } - &alarm("greeting with $server",''); - } - alarm(0); - - # if this causes problems, remove it - $0 = "$av0 - sending helo to $server"; - &alarm("sending helo to $server",""); - &ps("helo $hostname"); - while() { - print if $watch; - last if /^\d+ /; - } - alarm(0); - - # try the users, one by one - USER: - while(@users) { - $u = shift(@users); - $0 = "$av0 - expanding $u [\@$server]"; - - # do we already have a name for this user? - $oldname = $names{"$u *** $server"}; - - print &compact($u,$server)." ->\n" if ($verbose && ! $valid); - if ($valid) { - # - # when running with -a, we delay taking any action - # on the results of our query until we have looked - # at the complete output. @toFinal stores expansions - # that will be final if we take them. @toExpn stores - # expansions that are not final. @isValid keeps - # track of our ability to send mail to each of the - # expansions. - # - @isValid = (); - @toFinal = (); - @toExpn = (); - } - -# ($ecode,@expansion) = &expn_vrfy($u,$server); - (@foo) = &expn_vrfy($u,$server); - ($ecode,@expansion) = @foo; - if ($ecode) { - &giveup('',$ecode,$u); - last USER; - } - - for $s (@expansion) { - $s =~ s/[\n\r]//g; - $0 = "$av0 - parsing $server: $s"; - - $skipwatch = $watch; - - if ($s =~ /^[25]51([- ]).*<(.+)>/) { - print "$s" if $watch; - print "(pretending 250$1<$2>)" if ($debug && $watch); - print "\n" if $watch; - $s = "250$1<$2>"; - $skipwatch = 0; - } - - if ($s =~ /^250([- ])(.+)/) { - print "$s\n" if $skipwatch; - ($done,$addr) = ($1,$2); - ($newhost, $newaddr, $newname) = &parse($addr,$server,$oldname, $#expansion == 0); - print "($newhost, $newaddr, $newname) = &parse($addr, $server, $oldname)\n" if $debug; - if (! $newhost) { - # no expansion is possible w/o a new server to call - if ($valid) { - push(@isValid, &validAddr($newaddr)); - push(@toFinal,$newaddr,$server,$newname); - } else { - &verbose(&final($newaddr,$server,$newname)); - } - } else { - $newmxhost = &mx($newhost,$newaddr); - print "$newmxhost = &mx($newhost)\n" - if ($debug && $newhost ne $newmxhost); - $0 = "$av0 - parsing $newaddr [@$newmxhost]"; - print "levels = $levels, level{$u *** $server} = ".$level{"$u *** $server"}."\n" if ($debug > 1); - # If the new server is the current one, - # it would have expanded things for us - # if it could have. Mx records must be - # followed to compare server names. - # We are also done if the recursion - # count has been exceeded. - if (&trhost($newmxhost) eq &trhost($server) || ($levels && $level{"$u *** $server"} >= $levels)) { - if ($valid) { - push(@isValid, &validAddr($newaddr)); - push(@toFinal,$newaddr,$newmxhost,$newname); - } else { - &verbose(&final($newaddr,$newmxhost,$newname)); - } - } else { - # more work to do... - if ($valid) { - push(@isValid, &validAddr($newaddr)); - push(@toExpn,$newmxhost,$newaddr,$newname,$level{"$u *** $server"}); - } else { - &verbose(&expn($newmxhost,$newaddr,$newname,$level{"$u *** $server"})); - } - } - } - last if ($done eq " "); - next; - } - # 550 is a known code... Should the be - # included in -a output? Might be a bug - # here. Does it matter? Can assume that - # there won't be UNKNOWN USER responses - # mixed with valid users? - if ($s =~ /^(550)([- ])/) { - if ($valid) { - print STDERR "\@$server:$u ($oldname) USER UNKNOWN\n"; - } else { - &verbose(&final($u,$server,$oldname,"USER UNKNOWN")); - } - last if ($2 eq " "); - next; - } - # 553 is a known code... - if ($s =~ /^(553)([- ])/) { - if ($valid) { - print STDERR "\@$server:$u ($oldname) USER AMBIGUOUS\n"; - } else { - &verbose(&final($u,$server,$oldname,"USER AMBIGUOUS")); - } - last if ($2 eq " "); - next; - } - # 252 is a known code... - if ($s =~ /^(252)([- ])/) { - if ($valid) { - print STDERR "\@$server:$u ($oldname) REFUSED TO VRFY\n"; - } else { - &verbose(&final($u,$server,$oldname,"REFUSED TO VRFY")); - } - last if ($2 eq " "); - next; - } - &giveup('',"$server: did not grok '$s'",$u); - last USER; - } - - if ($valid) { - # - # now we decide if we are going to take these - # expansions or roll them back. - # - $avgValid = &average(@isValid); - print "avgValid = $avgValid\n" if $debug; - if ($avgValid >= $validRequirement) { - print &compact($u,$server)." ->\n" if $verbose; - while (@toExpn) { - &verbose(&expn(splice(@toExpn,0,4))); - } - while (@toFinal) { - &verbose(&final(splice(@toFinal,0,3))); - } - } else { - print "Tossing some valid to avoid invalid ".&compact($u,$server)."\n" if ($avgValid > 0.0 && ($vw || $debug)); - print &compact($u,$server)." ->\n" if $verbose; - &verbose(&final($u,$server,$newname)); - } - } - } - - &alarm("sending 'quit' to $server",''); - $0 = "$av0 - sending 'quit' to $server"; - &ps("quit"); - while() { - print if $watch; - last if /^\d+ /; - } - close(S); - alarm(0); -} - -$0 = "$av0 - printing final results"; -print "----------\n" if $vw; -select(STDOUT); -for $f (sort @final) { - print "$f\n"; -} -unlink("/tmp/expn$$"); -exit(0); - - -# abandon all attempts deliver to $server -# register the current addresses as the final ones -sub giveup -{ - local($redirect_okay,$reason,$user) = @_; - local($us,@so,$nh,@remaining_users); - local($pk,$file,$line); - ($pk, $file, $line) = caller; - - $0 = "$av0 - giving up on $server: $reason"; - # - # add back a user if we gave up in the middle - # - push(@users,$user) if $user; - # - # don't bother with this system anymore - # - unless ($giveup{$server}) { - $giveup{$server} = $reason; - print STDERR "$reason\n"; - } - print "Giveup at $file:$line!!! redirect okay = $redirect_okay; $reason\n" if $debug; - # - # Wait! - # Before giving up, see if there is a chance that - # there is another host to redirect to! - # (Kids, don't do this at home! Hacking is a dangerous - # crime and you could end up behind bars.) - # - for $u (@users) { - if ($redirect_okay =~ /\bmx\b/) { - next if &try_fallback('mx',$u,*server, - *mx_secondary, - *already_mx_fellback); - } - if ($redirect_okay =~ /\bdomainify\b/) { - next if &try_fallback('domainify',$u,*server, - *domainify_fallback, - *already_domainify_fellback); - } - push(@remaining_users,$u); - } - @users = @remaining_users; - for $u (@users) { - print &compact($u,$server)." ->\n" if ($verbose && $valid && $u); - &verbose(&final($u,$server,$names{"$u *** $server"},$reason)); - } -} -# -# This routine is used only within &giveup. It checks to -# see if we really have to giveup or if there is a second -# chance because we did something before that can be -# backtracked. -# -# %fallback{"$user *** $host"} tracks what is able to fallback -# %fellback{"$user *** $host"} tracks what has fallen back -# -# If there is a valid backtrack, then queue up the new possibility -# -sub try_fallback -{ - local($method,$user,*host,*fall_table,*fellback) = @_; - local($us,$fallhost,$oldhost,$ft,$i); - - if ($debug > 8) { - print "Fallback table $method:\n"; - for $i (sort keys %fall_table) { - print "\t'$i'\t\t'$fall_table{$i}'\n"; - } - print "Fellback table $method:\n"; - for $i (sort keys %fellback) { - print "\t'$i'\t\t'$fellback{$i}'\n"; - } - print "U: $user H: $host\n"; - } - - $us = "$user *** $host"; - if (defined $fellback{$us}) { - # - # Undo a previous fallback so that we can try again - # Nested fallbacks are avoided because they could - # lead to infinite loops - # - $fallhost = $fellback{$us}; - print "Already $method fell back from $us -> \n" if $debug; - $us = "$user *** $fallhost"; - $oldhost = $fallhost; - } elsif (($method eq 'mx') && (defined $mxbacktrace{$us}) && (defined $mx_secondary{$mxbacktrace{$us}})) { - print "Fallback an MX expansion $us -> \n" if $debug; - $oldhost = $mxbacktrace{$us}; - } else { - print "Oldhost($host, $us) = " if $debug; - $oldhost = $host; - } - print "$oldhost\n" if $debug; - if (((defined $fall_table{$us}) && ($ft = $us)) || ((defined $fall_table{$oldhost}) && ($ft = $oldhost))) { - print "$method Fallback = ".$fall_table{$ft}."\n" if $debug; - local(@so,$newhost); - @so = split(' ',$fall_table{$ft}); - $newhost = shift(@so); - print "Falling back ($method) $us -> $newhost (from $oldhost)\n" if $debug; - if ($method eq 'mx') { - if (! defined ($mxbacktrace{"$user *** $newhost"})) { - if (defined $mxbacktrace{"$user *** $oldhost"}) { - print "resetting oldhost $oldhost to the original: " if $debug; - $oldhost = $mxbacktrace{"$user *** $oldhost"}; - print "$oldhost\n" if $debug; - } - $mxbacktrace{"$user *** $newhost"} = $oldhost; - print "mxbacktrace $user *** $newhost -> $oldhost\n" if $debug; - } - $mx{&trhost($oldhost)} = $newhost; - } else { - $temporary_redirect{$us} = $newhost; - } - if (@so) { - print "Can still $method $us: @so\n" if $debug; - $fall_table{$ft} = join(' ',@so); - } else { - print "No more fallbacks for $us\n" if $debug; - delete $fall_table{$ft}; - } - if (defined $create_host_backtrack{$us}) { - $create_host_backtrack{"$user *** $newhost"} - = $create_host_backtrack{$us}; - } - $fellback{"$user *** $newhost"} = $oldhost; - &expn($newhost,$user,$names{$us},$level{$us}); - return 1; - } - delete $temporary_redirect{$us}; - $host = $oldhost; - return 0; -} -# return 1 if you could send mail to the address as is. -sub validAddr -{ - local($addr) = @_; - $res = &do_validAddr($addr); - print "validAddr($addr) = $res\n" if $debug; - $res; -} -sub do_validAddr -{ - local($addr) = @_; - local($urx) = "[-A-Za-z_.0-9+]+"; - - # \u - return 0 if ($addr =~ /^\\/); - # ?@h - return 1 if ($addr =~ /.\@$urx$/); - # @h:? - return 1 if ($addr =~ /^\@$urx\:./); - # h!u - return 1 if ($addr =~ /^$urx!./); - # u - return 1 if ($addr =~ /^$urx$/); - # ? - print "validAddr($addr) = ???\n" if $debug; - return 0; -} -# Some systems use expn and vrfy interchangeably. Some only -# implement one or the other. Some check expn against mailing -# lists and vrfy against users. It doesn't appear to be -# consistent. -# -# So, what do we do? We try everything! -# -# -# Ranking of result codes: good: 250, 251/551, 252, 550, anything else -# -# Ranking of inputs: best: user@host.domain, okay: user -# -# Return value: $error_string, @responses_from_server -sub expn_vrfy -{ - local($u,$server) = @_; - local(@c) = ('expn', 'vrfy'); - local(@try_u) = $u; - local(@ret,$code); - - if (($u =~ /(.+)@(.+)/) && (&trhost($2) eq &trhost($server))) { - push(@try_u,$1); - } - - TRY: - for $c (@c) { - for $try_u (@try_u) { - &alarm("${c}'ing $try_u on $server",'',$u); - &ps("$c $try_u"); - alarm(0); - $s = ; - if ($s eq '') { - return "$server: lost connection"; - } - if ($s !~ /^(\d+)([- ])/) { - return "$server: garbled reply to '$c $try_u'"; - } - if ($1 == 250) { - $code = 250; - @ret = ("",$s); - push(@ret,&read_response($2,$debug)); - return (@ret); - } - if ($1 == 551 || $1 == 251) { - $code = $1; - @ret = ("",$s); - push(@ret,&read_response($2,$debug)); - next; - } - if ($1 == 252 && ($code == 0 || $code == 550)) { - $code = 252; - @ret = ("",$s); - push(@ret,&read_response($2,$watch)); - next; - } - if ($1 == 550 && $code == 0) { - $code = 550; - @ret = ("",$s); - push(@ret,&read_response($2,$watch)); - next; - } - &read_response($2,$watch); - } - } - return "$server: expn/vrfy not implemented" unless @ret; - return @ret; -} -# sometimes the old parse routine (now parse2) didn't -# reject funky addresses. -sub parse -{ - local($oldaddr,$server,$oldname,$one_to_one) = @_; - local($newhost, $newaddr, $newname, $um) = &parse2($oldaddr,$server,$oldname,$one_to_one); - if ($newaddr =~ m,^["/],) { - return (undef, $oldaddr, $newname) if $valid; - return (undef, $um, $newname); - } - return ($newhost, $newaddr, $newname); -} - -# returns ($new_smtp_server,$new_address,$new_name) -# given a response from a SMTP server ($newaddr), the -# current host ($server), the old "name" and a flag that -# indicates if it is being called during the initial -# command line parsing ($parsing_args) -sub parse2 -{ - local($newaddr,$context_host,$old_name,$parsing_args) = @_; - local(@names) = $old_name; - local($urx) = "[-A-Za-z_.0-9+]+"; - local($unmangle); - - # - # first, separate out the address part. - # - - # - # [NAME] - # [NAME] <[(NAME)] ADDR - # ADDR [(NAME)] - # (NAME) ADDR - # [(NAME)] - # - if ($newaddr =~ /^\<(.*)\>$/) { - print "\n" if $debug; - ($newaddr) = &trim($1); - print "na = $newaddr\n" if $debug; - } - if ($newaddr =~ /^([^\<\>]*)\<([^\<\>]*)\>([^\<\>]*)$/) { - # address has a < > pair in it. - print "N:$1 N:$3\n" if $debug; - ($newaddr) = &trim($2); - unshift(@names, &trim($3,$1)); - print "na = $newaddr\n" if $debug; - } - if ($newaddr =~ /^([^\(\)]*)\(([^\(\)]*)\)([^\(\)]*)$/) { - # address has a ( ) pair in it. - print "A:$1 (N:$2) A:$3\n" if $debug; - unshift(@names,&trim($2)); - local($f,$l) = (&trim($1),&trim($3)); - if (($f && $l) || !($f || $l)) { - # address looks like: - # foo (bar) baz or (bar) - # not allowed! - print STDERR "Could not parse $newaddr\n" if $vw; - return(undef,$newaddr,&firstname(@names)); - } - $newaddr = $f if $f; - $newaddr = $l if $l; - print "newaddr now = $newaddr\n" if $debug; - } - # - # @foo:bar - # j%k@l - # a@b - # b!a - # a - # - $unmangle = $newaddr; - if ($newaddr =~ /^\@($urx)\:(.+)$/) { - print "(\@:)" if $debug; - # this is a bit of a cheat, but it seems necessary - return (&domainify($1,$context_host,$2),$2,&firstname(@names),$unmangle); - } - if ($newaddr =~ /^(.+)\@($urx)$/) { - print "(\@)" if $debug; - return (&domainify($2,$context_host,$newaddr),$newaddr,&firstname(@names),$unmangle); - } - if ($parsing_args) { - if ($newaddr =~ /^($urx)\!(.+)$/) { - return (&domainify($1,$context_host,$newaddr),$newaddr,&firstname(@names),$unmangle); - } - if ($newaddr =~ /^($urx)$/) { - return ($context_host,$newaddr,&firstname(@names),$unmangle); - } - print STDERR "Could not parse $newaddr\n"; - } - print "(?)" if $debug; - return(undef,$newaddr,&firstname(@names),$unmangle); -} -# return $u (@$server) unless $u includes reference to $server -sub compact -{ - local($u, $server) = @_; - local($se) = $server; - local($sp); - $se =~ s/(\W)/\\$1/g; - $sp = " (\@$server)"; - if ($u !~ /$se/i) { - return "$u$sp"; - } - return $u; -} -# remove empty (spaces don't count) members from an array -sub trim -{ - local(@v) = @_; - local($v,@r); - for $v (@v) { - $v =~ s/^\s+//; - $v =~ s/\s+$//; - push(@r,$v) if ($v =~ /\S/); - } - return(@r); -} -# using the host part of an address, and the server name, add the -# servers' domain to the address if it doesn't already have a -# domain. Since this sometimes fails, save a back reference so -# it can be unrolled. -sub domainify -{ - local($host,$domain_host,$u) = @_; - local($domain,$newhost); - - # cut of trailing dots - $host =~ s/\.$//; - $domain_host =~ s/\.$//; - - if ($domain_host !~ /\./) { - # - # domain host isn't, keep $host whatever it is - # - print "domainify($host,$domain_host) = $host\n" if $debug; - return $host; - } - - # - # There are several weird situations that need to be - # accounted for. They have to do with domain relay hosts. - # - # Examples: - # host server "right answer" - # - # shiva.cs cs.berkeley.edu shiva.cs.berkeley.edu - # shiva cs.berkeley.edu shiva.cs.berekley.edu - # cumulus reed.edu @reed.edu:cumulus.uucp - # tiberius tc.cornell.edu tiberius.tc.cornell.edu - # - # The first try must always be to cut the domain part out of - # the server and tack it onto the host. - # - # A reasonable second try is to tack the whole server part onto - # the host and for each possible repeated element, eliminate - # just that part. - # - # These extra "guesses" get put into the %domainify_fallback - # array. They will be used to give addresses a second chance - # in the &giveup routine - # - - local(%fallback); - - local($long); - $long = "$host $domain_host"; - $long =~ tr/A-Z/a-z/; - print "long = $long\n" if $debug; - if ($long =~ s/^([^ ]+\.)([^ ]+) \2(\.[^ ]+\.[^ ]+)/$1$2$3/) { - # matches shiva.cs cs.berkeley.edu and returns shiva.cs.berkeley.edu - print "condensed fallback $host $domain_host -> $long\n" if $debug; - $fallback{$long} = 9; - } - - local($fh); - $fh = $domain_host; - while ($fh =~ /\./) { - print "FALLBACK $host.$fh = 1\n" if $debug > 7; - $fallback{"$host.$fh"} = 1; - $fh =~ s/^[^\.]+\.//; - } - - $fallback{"$host.$domain_host"} = 2; - - ($domain = $domain_host) =~ s/^[^\.]+//; - $fallback{"$host$domain"} = 6 - if ($domain =~ /\./); - - if ($host =~ /\./) { - # - # Host is already okay, but let's look for multiple - # interpretations - # - print "domainify($host,$domain_host) = $host\n" if $debug; - delete $fallback{$host}; - $domainify_fallback{"$u *** $host"} = join(' ',sort {$fallback{$b} <=> $fallback{$a};} keys %fallback) if %fallback; - return $host; - } - - $domain = ".$domain_host" - if ($domain !~ /\..*\./); - $newhost = "$host$domain"; - - $create_host_backtrack{"$u *** $newhost"} = $domain_host; - print "domainify($host,$domain_host) = $newhost\n" if $debug; - delete $fallback{$newhost}; - $domainify_fallback{"$u *** $newhost"} = join(' ',sort {$fallback{$b} <=> $fallback{$a};} keys %fallback) if %fallback; - if ($debug) { - print "fallback = "; - print $domainify_fallback{"$u *** $newhost"} - if defined($domainify_fallback{"$u *** $newhost"}); - print "\n"; - } - return $newhost; -} -# return the first non-empty element of an array -sub firstname -{ - local(@names) = @_; - local($n); - while(@names) { - $n = shift(@names); - return $n if $n =~ /\S/; - } - return undef; -} -# queue up more addresses to expand -sub expn -{ - local($host,$addr,$name,$level) = @_; - if ($host) { - $host = &trhost($host); - - if (($debug > 3) || (defined $giveup{$host})) { - unshift(@hosts,$host) unless $users{$host}; - } else { - push(@hosts,$host) unless $users{$host}; - } - $users{$host} .= " $addr"; - $names{"$addr *** $host"} = $name; - $level{"$addr *** $host"} = $level + 1; - print "expn($host,$addr,$name)\n" if $debug; - return "\t$addr\n"; - } else { - return &final($addr,'NONE',$name); - } -} -# compute the numerical average value of an array -sub average -{ - local(@e) = @_; - return 0 unless @e; - local($e,$sum); - for $e (@e) { - $sum += $e; - } - $sum / @e; -} -# print to the server (also to stdout, if -w) -sub ps -{ - local($p) = @_; - print ">>> $p\n" if $watch; - print S "$p\n"; -} -# return case-adjusted name for a host (for comparison purposes) -sub trhost -{ - # treat foo.bar as an alias for Foo.BAR - local($host) = @_; - local($trhost) = $host; - $trhost =~ tr/A-Z/a-z/; - if ($trhost{$trhost}) { - $host = $trhost{$trhost}; - } else { - $trhost{$trhost} = $host; - } - $trhost{$trhost}; -} -# re-queue users if an mx record dictates a redirect -# don't allow a user to be redirected more than once -sub mxredirect -{ - local($server,*users) = @_; - local($u,$nserver,@still_there); - - $nserver = &mx($server); - - if (&trhost($nserver) ne &trhost($server)) { - $0 = "$av0 - mx redirect $server -> $nserver\n"; - for $u (@users) { - if (defined $mxbacktrace{"$u *** $nserver"}) { - push(@still_there,$u); - } else { - $mxbacktrace{"$u *** $nserver"} = $server; - print "mxbacktrace{$u *** $nserver} = $server\n" - if ($debug > 1); - &expn($nserver,$u,$names{"$u *** $server"}); - } - } - @users = @still_there; - if (! @users) { - return $nserver; - } else { - return undef; - } - } - return undef; -} -# follow mx records, return a hostname -# also follow temporary redirections coming from &domainify and -# &mxlookup -sub mx -{ - local($h,$u) = @_; - - for (;;) { - if (defined $mx{&trhost($h)} && $h ne $mx{&trhost($h)}) { - $0 = "$av0 - mx expand $h"; - $h = $mx{&trhost($h)}; - return $h; - } - if ($u) { - if (defined $temporary_redirect{"$u *** $h"}) { - $0 = "$av0 - internal redirect $h"; - print "Temporary redirect taken $u *** $h -> " if $debug; - $h = $temporary_redirect{"$u *** $h"}; - print "$h\n" if $debug; - next; - } - $htr = &trhost($h); - if (defined $temporary_redirect{"$u *** $htr"}) { - $0 = "$av0 - internal redirect $h"; - print "temporary redirect taken $u *** $h -> " if $debug; - $h = $temporary_redirect{"$u *** $htr"}; - print "$h\n" if $debug; - next; - } - } - return $h; - } -} -# look up mx records with the name server. -# re-queue expansion requests if possible -# optionally give up on this host. -sub mxlookup -{ - local($lastchance,$server,$giveup,*users) = @_; - local(*T); - local(*NSLOOKUP); - local($nh, $pref,$cpref); - local($o0) = $0; - local($nserver); - local($name,$aliases,$type,$len,$thataddr); - local(%fallback); - - return 1 if &mxredirect($server,*users); - - if ((defined $mx{$server}) || (! $have_nslookup)) { - return 0 unless $lastchance; - &giveup('mx domainify',$giveup); - return 0; - } - - $0 = "$av0 - nslookup of $server"; - open(T,">/tmp/expn$$") || die "open > /tmp/expn$$: $!\n"; - print T "set querytype=MX\n"; - print T "$server\n"; - close(T); - $cpref = 1.0E12; - undef $nserver; - open(NSLOOKUP,"nslookup < /tmp/expn$$ 2>&1 |") || die "open nslookup: $!"; - while() { - print if ($debug > 2); - if (/mail exchanger = ([-A-Za-z_.0-9+]+)/) { - $nh = $1; - if (/preference = (\d+)/) { - $pref = $1; - if ($pref < $cpref) { - $nserver = $nh; - $cpref = $pref; - } elsif ($pref) { - $fallback{$pref} .= " $nh"; - } - } - } - if (/Non-existent domain/) { - # - # These addresses are hosed. Kaput! Dead! - # However, if we created the address in the - # first place then there is a chance of - # salvation. - # - 1 while(); - close(NSLOOKUP); - return 0 unless $lastchance; - &giveup('domainify',"$server: Non-existent domain",undef,1); - return 0; - } - - } - close(NSLOOKUP); - unlink("/tmp/expn$$"); - unless ($nserver) { - $0 = "$o0 - finished mxlookup"; - return 0 unless $lastchance; - &giveup('mx domainify',"$server: Could not resolve address"); - return 0; - } - - # provide fallbacks in case $nserver doesn't work out - if (defined $fallback{$cpref}) { - $mx_secondary{$server} = $fallback{$cpref}; - } - - $0 = "$av0 - gethostbyname($nserver)"; - ($name,$aliases,$type,$len,$thataddr) = gethostbyname($nserver); - - unless ($thataddr) { - $0 = $o0; - return 0 unless $lastchance; - &giveup('mx domainify',"$nserver: could not resolve address"); - return 0; - } - print "MX($server) = $nserver\n" if $debug; - print "$server -> $nserver\n" if $vw && !$debug; - $mx{&trhost($server)} = $nserver; - # redeploy the users - unless (&mxredirect($server,*users)) { - return 0 unless $lastchance; - &giveup('mx domainify',"$nserver: only one level of mx redirect allowed"); - return 0; - } - $0 = "$o0 - finished mxlookup"; - return 1; -} -# if mx expansion did not help to resolve an address -# (ie: foo@bar became @baz:foo@bar, then undo the -# expansion). -# this is only used by &final -sub mxunroll -{ - local(*host,*addr) = @_; - local($r) = 0; - print "looking for mxbacktrace{$addr *** $host}\n" - if ($debug > 1); - while (defined $mxbacktrace{"$addr *** $host"}) { - print "Unrolling MX expansion: \@$host:$addr -> " - if ($debug || $verbose); - $host = $mxbacktrace{"$addr *** $host"}; - print "\@$host:$addr\n" - if ($debug || $verbose); - $r = 1; - } - return 1 if $r; - $addr = "\@$host:$addr" - if ($host =~ /\./); - return 0; -} -# register a completed expansion. Make the final address as -# simple as possible. -sub final -{ - local($addr,$host,$name,$error) = @_; - local($he); - local($hb,$hr); - local($au,$ah); - - if ($error =~ /Non-existent domain/) { - # - # If we created the domain, then let's undo the - # damage... - # - if (defined $create_host_backtrack{"$addr *** $host"}) { - while (defined $create_host_backtrack{"$addr *** $host"}) { - print "Un&domainifying($host) = " if $debug; - $host = $create_host_backtrack{"$addr *** $host"}; - print "$host\n" if $debug; - } - $error = "$host: could not locate"; - } else { - # - # If we only want valid addresses, toss out - # bad host names. - # - if ($valid) { - print STDERR "\@$host:$addr ($name) Non-existent domain\n"; - return ""; - } - } - } - - MXUNWIND: { - $0 = "$av0 - final parsing of \@$host:$addr"; - ($he = $host) =~ s/(\W)/\\$1/g; - if ($addr !~ /@/) { - # addr does not contain any host - $addr = "$addr@$host"; - } elsif ($addr !~ /$he/i) { - # if host part really something else, use the something - # else. - if ($addr =~ m/(.*)\@([^\@]+)$/) { - ($au,$ah) = ($1,$2); - print "au = $au ah = $ah\n" if $debug; - if (defined $temporary_redirect{"$addr *** $ah"}) { - $addr = "$au\@".$temporary_redirect{"$addr *** $ah"}; - print "Rewrite! to $addr\n" if $debug; - next MXUNWIND; - } - } - # addr does not contain full host - if ($valid) { - if ($host =~ /^([^\.]+)(\..+)$/) { - # host part has a . in it - foo.bar - ($hb, $hr) = ($1, $2); - if ($addr =~ /\@([^\.\@]+)$/ && ($1 eq $hb)) { - # addr part has not . - # and matches beginning of - # host part -- tack on a - # domain name. - $addr .= $hr; - } else { - &mxunroll(*host,*addr) - && redo MXUNWIND; - } - } else { - &mxunroll(*host,*addr) - && redo MXUNWIND; - } - } else { - $addr = "${addr}[\@$host]" - if ($host =~ /\./); - } - } - } - $name = "$name " if $name; - $error = " $error" if $error; - if ($valid) { - push(@final,"$name<$addr>"); - } else { - push(@final,"$name<$addr>$error"); - } - "\t$name<$addr>$error\n"; -} - -sub alarm -{ - local($alarm_action,$alarm_redirect,$alarm_user) = @_; - alarm(3600); - $SIG{ALRM} = 'handle_alarm'; -} -# this involves one great big ugly hack. -# the "next HOST" unwinds the stack! -sub handle_alarm -{ - &giveup($alarm_redirect,"Timed out during $alarm_action",$alarm_user); - next HOST; -} - -# read the rest of the current smtp daemon's response (and toss it away) -sub read_response -{ - local($done,$watch) = @_; - local(@resp); - print $s if $watch; - while(($done eq "-") && ($s = ) && ($s =~ /^\d+([- ])/)) { - print $s if $watch; - $done = $1; - push(@resp,$s); - } - return @resp; -} -# print args if verbose. Return them in any case -sub verbose -{ - local(@tp) = @_; - print "@tp" if $verbose; -} -# to pass perl -w: -@tp; -$flag_a; -$flag_d; -$flag_1; -%already_domainify_fellback; -%already_mx_fellback; -&handle_alarm; -################### BEGIN PERL/TROFF TRANSITION -.00 ; - -'di -.nr nl 0-1 -.nr % 0 -.\\"'; __END__ -.\" ############## END PERL/TROFF TRANSITION -.TH EXPN 1 "March 11, 1993" -.AT 3 -.SH NAME -expn \- recursively expand mail aliases -.SH SYNOPSIS -.B expn -.RI [ -a ] -.RI [ -v ] -.RI [ -w ] -.RI [ -d ] -.RI [ -1 ] -.IR user [@ hostname ] -.RI [ user [@ hostname ]]... -.SH DESCRIPTION -.B expn -will use the SMTP -.B expn -and -.B vrfy -commands to expand mail aliases. -It will first look up the addresses you provide on the command line. -If those expand into addresses on other systems, it will -connect to the other systems and expand again. It will keep -doing this until no further expansion is possible. -.SH OPTIONS -The default output of -.B expn -can contain many lines which are not valid -email addresses. With the -.I -aa -flag, only expansions that result in legal addresses -are used. Since many mailing lists have an illegal -address or two, the single -.IR -a , -address, flag specifies that a few illegal addresses can -be mixed into the results. More -.I -a -flags vary the ratio. Read the source to track down -the formula. With the -.I -a -option, you should be able to construct a new mailing -list out of an existing one. -.LP -If you wish to limit the number of levels deep that -.B expn -will recurse as it traces addresses, use the -.I -1 -option. For each -.I -1 -another level will be traversed. So, -.I -111 -will traverse no more than three levels deep. -.LP -The normal mode of operation for -.B expn -is to do all of its work silently. -The following options make it more verbose. -It is not necessary to make it verbose to see what it is -doing because as it works, it changes its -.BR argv [0] -variable to reflect its current activity. -To see how it is expanding things, the -.IR -v , -verbose, flag will cause -.B expn -to show each address before -and after translation as it works. -The -.IR -w , -watch, flag will cause -.B expn -to show you its conversations with the mail daemons. -Finally, the -.IR -d , -debug, flag will expose many of the inner workings so that -it is possible to eliminate bugs. -.SH ENVIRONMENT -No environment variables are used. -.SH FILES -.PD 0 -.B /tmp/expn$$ -.B temporary file used as input to -.BR nslookup . -.SH SEE ALSO -.BR aliases (5), -.BR sendmail (8), -.BR nslookup (8), -RFC 823, and RFC 1123. -.SH BUGS -Not all mail daemons will implement -.B expn -or -.BR vrfy . -It is not possible to verify addresses that are served -by such daemons. -.LP -When attempting to connect to a system to verify an address, -.B expn -only tries one IP address. Most mail daemons -will try harder. -.LP -It is assumed that you are running domain names and that -the -.BR nslookup (8) -program is available. If not, -.B expn -will not be able to verify many addresses. It will also pause -for a long time unless you change the code where it says -.I $have_nslookup = 1 -to read -.I $have_nslookup = -.IR 0 . -.LP -Lastly, -.B expn -does not handle every valid address. If you have an example, -please submit a bug report. -.SH CREDITS -In 1986 or so, Jon Broome wrote a program of the same name -that did about the same thing. It has since suffered bit rot -and Jon Broome has dropped off the face of the earth! -(Jon, if you are out there, drop me a line) -.SH AVAILABILITY -The latest version of -.B expn -is available through anonymous ftp at -.IR ftp://ftp.idiom.com/pub/muir-programs/expn . -.SH AUTHOR -.I David Muir Sharnoff\ \ \ \ diff --git a/scripts/fixrmtab b/scripts/fixrmtab deleted file mode 100755 index 33b7bcfdb6c..00000000000 --- a/scripts/fixrmtab +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# Invalidate /etc/rmtab entries for hosts named. -# Restart mountd for changes to take effect. -# -# usage: fixrmtab host1 host2 ... -# -# Package: am-utils-6.0 -# Author: Andreas Stolcke - -#set -x - -RMTAB=/etc/rmtab -TMP=/tmp/rmtab.$$ - -if [ ! -f /etc/rmtab ]; then - exit 0 -fi - -for host in $* -do - sed -e '/^'$host':/s/^./#/' $RMTAB > $TMP && cp $TMP $RMTAB -done -rm -f $TMP diff --git a/scripts/fixrmtab.in b/scripts/fixrmtab.in index 23003806e4c..a1fbebf6150 100755 --- a/scripts/fixrmtab.in +++ b/scripts/fixrmtab.in @@ -10,15 +10,23 @@ #set -x -RMTAB=/etc/rmtab -TMP=/tmp/rmtab.$$ +# allow user to pass RMTAB file name from environment +if test -z "${RMTAB}" ; then + RMTAB=/etc/rmtab +fi -if [ ! -f /etc/rmtab ]; then +if [ ! -f "$RMTAB" ]; then exit 0 fi -for host in $* +TMP="$(mktemp ${RMTAB}.XXXXXX)" +if [ -z "$TMP" ]; then + exit 1 +fi + +trap "rm -f $TMP" 0 1 2 3 15 + +for host do - sed -e '/^'$host':/s/^./#/' $RMTAB > $TMP && cp $TMP $RMTAB + sed -e "/^$host:/s/^./#/" "$RMTAB" > "$TMP" && cp "$TMP" "$RMTAB" done -rm -f $TMP diff --git a/scripts/lostaltmail.in b/scripts/lostaltmail.in index 467dedd24e5..328decffd71 100755 --- a/scripts/lostaltmail.in +++ b/scripts/lostaltmail.in @@ -1,6 +1,6 @@ #!@PERL@ -sw # -# Package: am-utils-6.0 +# Package: am-utils-6.x # Author: James Tanis # diff --git a/stamp-h.in b/stamp-h.in new file mode 100644 index 00000000000..9788f70238c --- /dev/null +++ b/stamp-h.in @@ -0,0 +1 @@ +timestamp diff --git a/test-driver b/test-driver new file mode 100755 index 00000000000..d30605660a0 --- /dev/null +++ b/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/vers.m4 b/vers.m4 index 7343910d5f2..99d4f06750c 100644 --- a/vers.m4 +++ b/vers.m4 @@ -1 +1 @@ -[6.1.5]dnl +[6.2]dnl diff --git a/wire-test/Makefile.am b/wire-test/Makefile.am new file mode 100644 index 00000000000..ceccd1c436c --- /dev/null +++ b/wire-test/Makefile.am @@ -0,0 +1,39 @@ +## Process this file with automake to produce Makefile.in + +# Package: am-utils +# Level: Makefile for wire-test/ directory +# Author: Erez Zadok + +sbin_PROGRAMS = wire-test + +# man pages +man_MANS = wire-test.8 + +# headers this depends on, not to be installed +#noinst_HEADERS = + +wire_test_SOURCES = wire-test.c + +LDADD = ../libamu/libamu.la + +AM_CPPFLAGS = -I$(top_srcdir)/include + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) + +# dependencies +$(PROGRAMS): $(LDADD) +$(wire_test_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) diff --git a/wire-test/Makefile.in b/wire-test/Makefile.in new file mode 100644 index 00000000000..929c7e38f61 --- /dev/null +++ b/wire-test/Makefile.in @@ -0,0 +1,737 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Package: am-utils +# Level: Makefile for wire-test/ directory +# Author: Erez Zadok + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +sbin_PROGRAMS = wire-test$(EXEEXT) +subdir = wire-test +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 $(top_srcdir)/vers.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" +PROGRAMS = $(sbin_PROGRAMS) +am_wire_test_OBJECTS = wire-test.$(OBJEXT) +wire_test_OBJECTS = $(am_wire_test_OBJECTS) +wire_test_LDADD = $(LDADD) +wire_test_DEPENDENCIES = ../libamu/libamu.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(wire_test_SOURCES) +DIST_SOURCES = $(wire_test_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMD_FS_OBJS = @AMD_FS_OBJS@ +AMD_INFO_OBJS = @AMD_INFO_OBJS@ +AMTAR = @AMTAR@ +AMU_AUTOFS_PROT_HEADER = @AMU_AUTOFS_PROT_HEADER@ + +# allow users to add their own flags via "configure --enable-am-flags=ARG" +AMU_CFLAGS = @AMU_CFLAGS@ +AMU_LIB_OBJS = @AMU_LIB_OBJS@ +AMU_NFS_PROT_HEADER = @AMU_NFS_PROT_HEADER@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_LDFLAGS = @LIBTOOL_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +UNMOUNT_PROGRAM = @UNMOUNT_PROGRAM@ +VERSION = @VERSION@ +WRAPLIB = @WRAPLIB@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am_utils_unmount_args = @am_utils_unmount_args@ +am_utils_unmount_call = @am_utils_unmount_call@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# man pages +man_MANS = wire-test.8 + +# headers this depends on, not to be installed +#noinst_HEADERS = +wire_test_SOURCES = wire-test.c +LDADD = ../libamu/libamu.la +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(AMU_CFLAGS) + +# additional files to distribute and clean +EXTRA_DIST = $(man_MANS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu wire-test/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu wire-test/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +wire-test$(EXEEXT): $(wire_test_OBJECTS) $(wire_test_DEPENDENCIES) $(EXTRA_wire_test_DEPENDENCIES) + @rm -f wire-test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wire_test_OBJECTS) $(wire_test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wire-test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man8: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-sbinPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man uninstall-sbinPROGRAMS + +uninstall-man: uninstall-man8 + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man8 install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-man uninstall-man8 uninstall-sbinPROGRAMS + + +# dependencies +$(PROGRAMS): $(LDADD) +$(wire_test_OBJECTS): \ + ../config.h \ + ../aux_conf.h \ + $(top_srcdir)/include/am_compat.h \ + $(top_srcdir)/include/am_defs.h \ + $(top_srcdir)/include/am_utils.h \ + $(top_srcdir)/include/am_xdr_func.h \ + $(top_srcdir)/include/amq_defs.h \ + @AMU_NFS_PROT_HEADER@ \ + $(noinst_HEADERS) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/wire-test/wire-test.8 b/wire-test/wire-test.8 index 539a849ae45..be08e9685d7 100644 --- a/wire-test/wire-test.8 +++ b/wire-test/wire-test.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-2006 Erez Zadok +.\" Copyright (c) 1997-2014 Erez Zadok .\" Copyright (c) 1990 Jan-Simon Pendry .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgment: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 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. .\" @@ -36,9 +32,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %W% (Berkeley) %G% .\" -.\" $Id: wire-test.8,v 1.10.2.1 2006/01/02 18:48:26 ezk Exp $ +.\" File: am-utils/wire-test/wire-test.8 .\" .TH WIRE-TEST 8 "26 Feb 1993" .SH NAME diff --git a/wire-test/wire-test.c b/wire-test/wire-test.c index bcaaf5a3151..0adcf5d6666 100644 --- a/wire-test/wire-test.c +++ b/wire-test/wire-test.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 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. * @@ -59,7 +55,7 @@ main(int argc, char **argv) char *testhost, *proto, *tmp_buf; int nv, ret; struct sockaddr_in *ip; - struct hostent *hp = 0; + struct hostent *hp = NULL; am_set_progname(argv[0]); @@ -102,12 +98,11 @@ main(int argc, char **argv) memmove((voidp) &ip->sin_addr, (voidp) hp->h_addr, sizeof(ip->sin_addr)); ip->sin_port = htons(NFS_PORT); - xlog_level = 0; /* turn off debugging */ fprintf(stderr, "NFS Version and protocol tests to host \"%s\"...\n", testhost); proto = "udp"; for (nv=2; nv<=3; ++nv) { fprintf(stderr, "\ttesting vers=%d, proto=\"%s\" -> ", nv, proto); - ret = get_nfs_version(testhost, ip, nv, proto); + ret = get_nfs_version(testhost, ip, nv, proto, 0); if (ret == 0) fprintf(stderr, "failed!\n"); else @@ -117,7 +112,7 @@ main(int argc, char **argv) proto = "tcp"; for (nv=2; nv<=3; ++nv) { fprintf(stderr, "\ttesting vers=%d, proto=\"%s\" -> ", nv, proto); - ret = get_nfs_version(testhost, ip, nv, proto); + ret = get_nfs_version(testhost, ip, nv, proto, 0); if (ret == 0) fprintf(stderr, "failed!\n"); else diff --git a/ylwrap b/ylwrap new file mode 100755 index 00000000000..30a063dcc2c --- /dev/null +++ b/ylwrap @@ -0,0 +1,266 @@ +#! /bin/sh +# ylwrap - wrapper for lex/yacc invocations. + +scriptversion=2013-01-12.17; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +get_dirname () +{ + case $1 in + */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; + # Otherwise, we want the empty string (not "."). + esac +} + +# guard FILE +# ---------- +# The CPP macro used to guard inclusion of FILE. +guard () +{ + printf '%s\n' "$1" \ + | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ + -e 's/__*/_/g' +} + +# quote_for_sed [STRING] +# ---------------------- +# Return STRING (or stdin) quoted to be used as a sed pattern. +quote_for_sed () +{ + case $# in + 0) cat;; + 1) printf '%s\n' "$1";; + esac \ + | sed -e 's|[][\\.*]|\\&|g' +} + +case "$1" in + '') + echo "$0: No files given. Try '$0 --help' for more information." 1>&2 + exit 1 + ;; + --basedir) + basedir=$2 + shift 2 + ;; + -h|--h*) + cat <<\EOF +Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... + +Wrapper for lex/yacc invocations, renaming files as desired. + + INPUT is the input file + OUTPUT is one file PROG generates + DESIRED is the file we actually want instead of OUTPUT + PROGRAM is program to run + ARGS are passed to PROG + +Any number of OUTPUT,DESIRED pairs may be used. + +Report bugs to . +EOF + exit $? + ;; + -v|--v*) + echo "ylwrap $scriptversion" + exit $? + ;; +esac + + +# The input. +input=$1 +shift +# We'll later need for a correct munging of "#line" directives. +input_sub_rx=`get_dirname "$input" | quote_for_sed` +case $input in + [\\/]* | ?:[\\/]*) + # Absolute path; do nothing. + ;; + *) + # Relative path. Make it absolute. + input=`pwd`/$input + ;; +esac +input_rx=`get_dirname "$input" | quote_for_sed` + +# Since DOS filename conventions don't allow two dots, +# the DOS version of Bison writes out y_tab.c instead of y.tab.c +# and y_tab.h instead of y.tab.h. Test to see if this is the case. +y_tab_nodot=false +if test -f y_tab.c || test -f y_tab.h; then + y_tab_nodot=true +fi + +# The parser itself, the first file, is the destination of the .y.c +# rule in the Makefile. +parser=$1 + +# A sed program to s/FROM/TO/g for all the FROM/TO so that, for +# instance, we rename #include "y.tab.h" into #include "parse.h" +# during the conversion from y.tab.c to parse.c. +sed_fix_filenames= + +# Also rename header guards, as Bison 2.7 for instance uses its header +# guard in its implementation file. +sed_fix_header_guards= + +while test $# -ne 0; do + if test x"$1" = x"--"; then + shift + break + fi + from=$1 + # Handle y_tab.c and y_tab.h output by DOS + if $y_tab_nodot; then + case $from in + "y.tab.c") from=y_tab.c;; + "y.tab.h") from=y_tab.h;; + esac + fi + shift + to=$1 + shift + sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" + sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" +done + +# The program to run. +prog=$1 +shift +# Make any relative path in $prog absolute. +case $prog in + [\\/]* | ?:[\\/]*) ;; + *[\\/]*) prog=`pwd`/$prog ;; +esac + +prefix=`echo $input | sed \ + -e 's,^.*/,,g' \ + -e 's/_gram.[yl]$/_/g' \ + -e 's/_lex.[yl]$/_/g' \ + -e 's/_parse.[yl]$/_/g' \ + -e 's/_tok.[yl]$/_/g'` + +case "$prog" in +*lex) + flags="-P${prefix}" + out="mv lex.$prefix.c lex.yy.c" + ;; +yacc|bison) + flags="-p $prefix";; +esac + +dirname=ylwrap$$ +do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' +trap "ret=129; $do_exit" 1 +trap "ret=130; $do_exit" 2 +trap "ret=141; $do_exit" 13 +trap "ret=143; $do_exit" 15 +mkdir $dirname || exit 1 + +cd $dirname + +case $# in + 0) "$prog" $flags "$input" ;; + *) "$prog" $flags "$@" "$input" ;; +esac +ret=$? +if [ -n "$out" ]; then + eval $out +fi + +if test $ret -eq 0; then + for from in * + do + to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` + if test -f "$from"; then + # If $2 is an absolute path name, then just use that, + # otherwise prepend '../'. + case $to in + [\\/]* | ?:[\\/]*) target=$to;; + *) target=../$to;; + esac + + # Do not overwrite unchanged header files to avoid useless + # recompilations. Always update the parser itself: it is the + # destination of the .y.c rule in the Makefile. Divert the + # output of all other files to a temporary file so we can + # compare them to existing versions. + if test $from != $parser; then + realtarget=$target + target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` + fi + + # Munge "#line" or "#" directives. Don't let the resulting + # debug information point at an absolute srcdir. Use the real + # output file name, not yy.lex.c for instance. Adjust the + # include guards too. + sed -e "/^#/!b" \ + -e "s|$input_rx|$input_sub_rx|" \ + -e "$sed_fix_filenames" \ + -e "$sed_fix_header_guards" \ + "$from" >"$target" || ret=$? + + # Check whether files must be updated. + if test "$from" != "$parser"; then + if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then + echo "$to is unchanged" + rm -f "$target" + else + echo "updating $to" + mv -f "$target" "$realtarget" + fi + fi + else + # A missing file is only an error for the parser. This is a + # blatant hack to let us support using "yacc -d". If -d is not + # specified, don't fail when the header file is "missing". + if test "$from" = "$parser"; then + ret=1 + fi + fi + done +fi + +# Remove the directory. +cd .. +rm -rf $dirname + +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/ylwrap.amd b/ylwrap.amd new file mode 100755 index 00000000000..30a063dcc2c --- /dev/null +++ b/ylwrap.amd @@ -0,0 +1,266 @@ +#! /bin/sh +# ylwrap - wrapper for lex/yacc invocations. + +scriptversion=2013-01-12.17; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +get_dirname () +{ + case $1 in + */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; + # Otherwise, we want the empty string (not "."). + esac +} + +# guard FILE +# ---------- +# The CPP macro used to guard inclusion of FILE. +guard () +{ + printf '%s\n' "$1" \ + | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ + -e 's/__*/_/g' +} + +# quote_for_sed [STRING] +# ---------------------- +# Return STRING (or stdin) quoted to be used as a sed pattern. +quote_for_sed () +{ + case $# in + 0) cat;; + 1) printf '%s\n' "$1";; + esac \ + | sed -e 's|[][\\.*]|\\&|g' +} + +case "$1" in + '') + echo "$0: No files given. Try '$0 --help' for more information." 1>&2 + exit 1 + ;; + --basedir) + basedir=$2 + shift 2 + ;; + -h|--h*) + cat <<\EOF +Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... + +Wrapper for lex/yacc invocations, renaming files as desired. + + INPUT is the input file + OUTPUT is one file PROG generates + DESIRED is the file we actually want instead of OUTPUT + PROGRAM is program to run + ARGS are passed to PROG + +Any number of OUTPUT,DESIRED pairs may be used. + +Report bugs to . +EOF + exit $? + ;; + -v|--v*) + echo "ylwrap $scriptversion" + exit $? + ;; +esac + + +# The input. +input=$1 +shift +# We'll later need for a correct munging of "#line" directives. +input_sub_rx=`get_dirname "$input" | quote_for_sed` +case $input in + [\\/]* | ?:[\\/]*) + # Absolute path; do nothing. + ;; + *) + # Relative path. Make it absolute. + input=`pwd`/$input + ;; +esac +input_rx=`get_dirname "$input" | quote_for_sed` + +# Since DOS filename conventions don't allow two dots, +# the DOS version of Bison writes out y_tab.c instead of y.tab.c +# and y_tab.h instead of y.tab.h. Test to see if this is the case. +y_tab_nodot=false +if test -f y_tab.c || test -f y_tab.h; then + y_tab_nodot=true +fi + +# The parser itself, the first file, is the destination of the .y.c +# rule in the Makefile. +parser=$1 + +# A sed program to s/FROM/TO/g for all the FROM/TO so that, for +# instance, we rename #include "y.tab.h" into #include "parse.h" +# during the conversion from y.tab.c to parse.c. +sed_fix_filenames= + +# Also rename header guards, as Bison 2.7 for instance uses its header +# guard in its implementation file. +sed_fix_header_guards= + +while test $# -ne 0; do + if test x"$1" = x"--"; then + shift + break + fi + from=$1 + # Handle y_tab.c and y_tab.h output by DOS + if $y_tab_nodot; then + case $from in + "y.tab.c") from=y_tab.c;; + "y.tab.h") from=y_tab.h;; + esac + fi + shift + to=$1 + shift + sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" + sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" +done + +# The program to run. +prog=$1 +shift +# Make any relative path in $prog absolute. +case $prog in + [\\/]* | ?:[\\/]*) ;; + *[\\/]*) prog=`pwd`/$prog ;; +esac + +prefix=`echo $input | sed \ + -e 's,^.*/,,g' \ + -e 's/_gram.[yl]$/_/g' \ + -e 's/_lex.[yl]$/_/g' \ + -e 's/_parse.[yl]$/_/g' \ + -e 's/_tok.[yl]$/_/g'` + +case "$prog" in +*lex) + flags="-P${prefix}" + out="mv lex.$prefix.c lex.yy.c" + ;; +yacc|bison) + flags="-p $prefix";; +esac + +dirname=ylwrap$$ +do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' +trap "ret=129; $do_exit" 1 +trap "ret=130; $do_exit" 2 +trap "ret=141; $do_exit" 13 +trap "ret=143; $do_exit" 15 +mkdir $dirname || exit 1 + +cd $dirname + +case $# in + 0) "$prog" $flags "$input" ;; + *) "$prog" $flags "$@" "$input" ;; +esac +ret=$? +if [ -n "$out" ]; then + eval $out +fi + +if test $ret -eq 0; then + for from in * + do + to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` + if test -f "$from"; then + # If $2 is an absolute path name, then just use that, + # otherwise prepend '../'. + case $to in + [\\/]* | ?:[\\/]*) target=$to;; + *) target=../$to;; + esac + + # Do not overwrite unchanged header files to avoid useless + # recompilations. Always update the parser itself: it is the + # destination of the .y.c rule in the Makefile. Divert the + # output of all other files to a temporary file so we can + # compare them to existing versions. + if test $from != $parser; then + realtarget=$target + target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` + fi + + # Munge "#line" or "#" directives. Don't let the resulting + # debug information point at an absolute srcdir. Use the real + # output file name, not yy.lex.c for instance. Adjust the + # include guards too. + sed -e "/^#/!b" \ + -e "s|$input_rx|$input_sub_rx|" \ + -e "$sed_fix_filenames" \ + -e "$sed_fix_header_guards" \ + "$from" >"$target" || ret=$? + + # Check whether files must be updated. + if test "$from" != "$parser"; then + if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then + echo "$to is unchanged" + rm -f "$target" + else + echo "updating $to" + mv -f "$target" "$realtarget" + fi + fi + else + # A missing file is only an error for the parser. This is a + # blatant hack to let us support using "yacc -d". If -d is not + # specified, don't fail when the header file is "missing". + if test "$from" = "$parser"; then + ret=1 + fi + fi + done +fi + +# Remove the directory. +cd .. +rm -rf $dirname + +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: From c6c4276bb7b63c5ddfbec4106e23b81a6bb5a235 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Fri, 11 Nov 2016 14:19:12 +0000 Subject: [PATCH 003/204] Replace OF_getprop ... fdt32_to_cpu with OF_getencprop. The latter correctly adjusts for the endian. MFC after: 1 week Sponsored by: ABT Systems Ltd --- sys/dev/fdt/fdt_common.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c index 2f4555f81a4..783647b04d3 100644 --- a/sys/dev/fdt/fdt_common.c +++ b/sys/dev/fdt/fdt_common.c @@ -419,13 +419,13 @@ fdt_addrsize_cells(phandle_t node, int *addr_cells, int *size_cells) * Retrieve #{address,size}-cells. */ cell_size = sizeof(cell); - if (OF_getprop(node, "#address-cells", &cell, cell_size) < cell_size) - cell = 2; - *addr_cells = fdt32_to_cpu((int)cell); + if (OF_getencprop(node, "#address-cells", &cell, cell_size) < cell_size) + *addr_cells = 2; + *addr_cells = (int)cell; - if (OF_getprop(node, "#size-cells", &cell, cell_size) < cell_size) + if (OF_getencprop(node, "#size-cells", &cell, cell_size) < cell_size) cell = 1; - *size_cells = fdt32_to_cpu((int)cell); + *size_cells = (int)cell; if (*addr_cells > 3 || *size_cells > 2) return (ERANGE); @@ -540,11 +540,11 @@ fdt_get_phyaddr(phandle_t node, device_t dev, int *phy_addr, void **phy_sc) phy_node = OF_node_from_xref(phy_handle); - if (OF_getprop(phy_node, "reg", (void *)&phy_reg, + if (OF_getencprop(phy_node, "reg", (void *)&phy_reg, sizeof(phy_reg)) <= 0) return (ENXIO); - *phy_addr = fdt32_to_cpu(phy_reg); + *phy_addr = phy_reg; /* * Search for softc used to communicate with phy. From 639e990770702aa86b7e505c79819bd1c04ac55e Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Fri, 11 Nov 2016 14:22:35 +0000 Subject: [PATCH 004/204] Remove more unneeded users of the fdt_pic_decode_t table. Sponsored by: ABT Systems Ltd --- sys/arm/altera/socfpga/socfpga_common.c | 21 --------- sys/arm/freescale/vybrid/vf_common.c | 21 --------- sys/arm/rockchip/files.rk30xx | 1 - sys/arm/rockchip/rk30xx_common.c | 61 ------------------------- sys/arm/samsung/exynos/exynos5_common.c | 21 --------- sys/arm/xilinx/zy7_machdep.c | 23 ---------- 6 files changed, 148 deletions(-) delete mode 100644 sys/arm/rockchip/rk30xx_common.c diff --git a/sys/arm/altera/socfpga/socfpga_common.c b/sys/arm/altera/socfpga/socfpga_common.c index 9944b90e8b5..c36517f2ee2 100644 --- a/sys/arm/altera/socfpga/socfpga_common.c +++ b/sys/arm/altera/socfpga/socfpga_common.c @@ -69,24 +69,3 @@ cpu_reset(void) end: while (1); } - -#ifndef INTRNG -static int -fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, - int *pol) -{ - - if (!fdt_is_compatible(node, "arm,gic")) - 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_pic_decode_ic, - NULL -}; -#endif diff --git a/sys/arm/freescale/vybrid/vf_common.c b/sys/arm/freescale/vybrid/vf_common.c index d5774817282..13408caaaa7 100644 --- a/sys/arm/freescale/vybrid/vf_common.c +++ b/sys/arm/freescale/vybrid/vf_common.c @@ -61,24 +61,3 @@ cpu_reset(void) end: while (1); } - -#ifndef INTRNG -static int -fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, - int *pol) -{ - - if (!fdt_is_compatible(node, "arm,gic")) - 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_pic_decode_ic, - NULL -}; -#endif diff --git a/sys/arm/rockchip/files.rk30xx b/sys/arm/rockchip/files.rk30xx index 274748a0e18..b058ed91c57 100644 --- a/sys/arm/rockchip/files.rk30xx +++ b/sys/arm/rockchip/files.rk30xx @@ -1,7 +1,6 @@ # $FreeBSD$ kern/kern_clocksource.c standard -arm/rockchip/rk30xx_common.c standard arm/rockchip/rk30xx_machdep.c standard arm/rockchip/rk30xx_pmu.c standard arm/rockchip/rk30xx_grf.c standard diff --git a/sys/arm/rockchip/rk30xx_common.c b/sys/arm/rockchip/rk30xx_common.c deleted file mode 100644 index 826ebda7981..00000000000 --- a/sys/arm/rockchip/rk30xx_common.c +++ /dev/null @@ -1,61 +0,0 @@ -/*- - * Copyright (c) 2013 Ganbold Tsagaankhuu - * 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 -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include - -#include -#include - -#include -#include - -#ifndef INTRNG -static int -fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, - int *pol) -{ - - if (!fdt_is_compatible(node, "arm,gic")) - 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_aintc_decode_ic, - NULL -}; -#endif diff --git a/sys/arm/samsung/exynos/exynos5_common.c b/sys/arm/samsung/exynos/exynos5_common.c index 04021c1cb91..8d011142ee0 100644 --- a/sys/arm/samsung/exynos/exynos5_common.c +++ b/sys/arm/samsung/exynos/exynos5_common.c @@ -48,24 +48,3 @@ cpu_reset(void) while (1); } - -#ifndef INTRNG -static int -fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, - int *pol) -{ - - if (!fdt_is_compatible(node, "arm,gic")) - 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_pic_decode_ic, - NULL -}; -#endif diff --git a/sys/arm/xilinx/zy7_machdep.c b/sys/arm/xilinx/zy7_machdep.c index 771503d7dd3..2efe694a243 100644 --- a/sys/arm/xilinx/zy7_machdep.c +++ b/sys/arm/xilinx/zy7_machdep.c @@ -92,29 +92,6 @@ platform_devmap_init(void) return (0); } - -#ifndef INTRNG -static int -fdt_gic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, - int *pol) -{ - - if (!fdt_is_compatible(node, "arm,gic")) - 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_gic_decode_ic, - NULL -}; -#endif - void cpu_reset() { From 30add35afa5f7d097a1e016f50f51c72dfbf0298 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Fri, 11 Nov 2016 14:30:09 +0000 Subject: [PATCH 005/204] Fix ata_at91_alloc_resource to use rman_res_t. Sponsored by: ABT Systems Ltd --- sys/arm/at91/at91_cfata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/at91/at91_cfata.c b/sys/arm/at91/at91_cfata.c index 890029c13e3..8c6049d5b01 100644 --- a/sys/arm/at91/at91_cfata.c +++ b/sys/arm/at91/at91_cfata.c @@ -114,7 +114,7 @@ at91_cfata_detach(device_t dev) static struct resource * ata_at91_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct at91_cfata_softc *sc = device_get_softc(dev); From f43618f59f9a94cdc04bf4557ac8e7feea238eab Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Fri, 11 Nov 2016 14:41:02 +0000 Subject: [PATCH 006/204] smb: fix SMB_READB, SMB_READW, SMB_PCALL to work as documented Previously, those ioctls were defined as 'in' only, so rdata.byte and rdata.word were never updated in the userland. The read data went only to rbuf if it was provided. Thus, consumers were forced to always use it. Now the ioctls are marked as in-out. Compatibility handlers are provided for old ioctls. PR: 213481 Reported by: Lewis Donzis MFC after: 2 weeks Relnotes: maybe Differential Revision: https://reviews.freebsd.org/D8430 --- sys/dev/smbus/smb.c | 10 +++++++++- sys/dev/smbus/smb.h | 7 +++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c index 21d1e2f7c3d..5f6eff03962 100644 --- a/sys/dev/smbus/smb.c +++ b/sys/dev/smbus/smb.c @@ -41,7 +41,9 @@ #include "smbus_if.h" -#define BUFSIZE 1024 +#define SMB_OLD_READB _IOW('i', 7, struct smbcmd) +#define SMB_OLD_READW _IOW('i', 8, struct smbcmd) +#define SMB_OLD_PCALL _IOW('i', 9, struct smbcmd) struct smb_softc { device_t sc_dev; @@ -224,7 +226,9 @@ smbioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *t s->cmd, s->wdata.word)); break; + case SMB_OLD_READB: case SMB_READB: + /* NB: for SMB_OLD_READB the read data goes to rbuf only. */ error = smbus_error(smbus_readb(parent, s->slave, s->cmd, &s->rdata.byte)); if (error) @@ -235,7 +239,9 @@ smbioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *t } break; + case SMB_OLD_READW: case SMB_READW: + /* NB: for SMB_OLD_READW the read data goes to rbuf only. */ error = smbus_error(smbus_readw(parent, s->slave, s->cmd, &s->rdata.word)); if (error) @@ -248,7 +254,9 @@ smbioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *t } break; + case SMB_OLD_PCALL: case SMB_PCALL: + /* NB: for SMB_OLD_PCALL the read data goes to rbuf only. */ error = smbus_error(smbus_pcall(parent, s->slave, s->cmd, s->wdata.word, &s->rdata.word)); if (error) diff --git a/sys/dev/smbus/smb.h b/sys/dev/smbus/smb.h index 44b71e8a40e..b766a656d27 100644 --- a/sys/dev/smbus/smb.h +++ b/sys/dev/smbus/smb.h @@ -63,11 +63,10 @@ struct smbcmd { #define SMB_RECVB _IOWR('i', 4, struct smbcmd) #define SMB_WRITEB _IOW('i', 5, struct smbcmd) #define SMB_WRITEW _IOW('i', 6, struct smbcmd) -#define SMB_READB _IOW('i', 7, struct smbcmd) -#define SMB_READW _IOW('i', 8, struct smbcmd) -#define SMB_PCALL _IOW('i', 9, struct smbcmd) +#define SMB_READB _IOWR('i', 7, struct smbcmd) +#define SMB_READW _IOWR('i', 8, struct smbcmd) +#define SMB_PCALL _IOWR('i', 9, struct smbcmd) #define SMB_BWRITE _IOW('i', 10, struct smbcmd) -#define SMB_OLD_BREAD _IOW('i', 11, struct smbcmd) #define SMB_BREAD _IOWR('i', 11, struct smbcmd) #define SMB_OLD_TRANS _IOWR('i', 12, struct smbcmd) From cf3a35a7556b57fcd6d11a999011b0b1736f9a8d Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Fri, 11 Nov 2016 15:00:13 +0000 Subject: [PATCH 007/204] smbmsg: use a more convenient way of accessing data read from a slave Developers writing code for accessing /dev/smb may use this base utility as an example. Now that SMB_READB, SMB_READW, SMB_PCALL behave as documented, wwe can use them in a more convenient way than before. MFC after: 4 weeks X-MFC after: r308527 --- usr.sbin/smbmsg/smbmsg.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/usr.sbin/smbmsg/smbmsg.c b/usr.sbin/smbmsg/smbmsg.c index 4e7e609a7b0..1472651b813 100644 --- a/usr.sbin/smbmsg/smbmsg.c +++ b/usr.sbin/smbmsg/smbmsg.c @@ -61,7 +61,7 @@ static int wflag; /* word IO */ static unsigned char ibuf[SMB_MAXBLOCKSIZE]; static unsigned char obuf[SMB_MAXBLOCKSIZE]; -static unsigned short oword, iword; +static unsigned short oword; /* * The I2C specs say that all addresses below 16 and above or equal @@ -135,6 +135,8 @@ do_io(void) c.slave = slave; c.cmd = cflag; + c.rcount = 0; + c.wcount = 0; if (fmt == NULL && iflag > 0) fmt = wflag? wordfmt: bytefmt; @@ -163,11 +165,9 @@ do_io(void) } if (iflag == 1 && oflag == -1) { /* command + 1 byte input: read byte op. */ - c.rbuf = ibuf; - c.rcount = iflag; if (ioctl(fd, SMB_READB, &c) == -1) return (-1); - printf(fmt, (int)(unsigned char)ibuf[0]); + printf(fmt, (unsigned char)c.rdata.byte); putchar('\n'); return (0); } else if (iflag == -1 && oflag == 1) { @@ -176,11 +176,9 @@ do_io(void) return (ioctl(fd, SMB_WRITEB, &c)); } else if (wflag && iflag == 2 && oflag == -1) { /* command + 2 bytes input: read word op. */ - c.rbuf = (char*) &iword; - c.rcount = iflag; if (ioctl(fd, SMB_READW, &c) == -1) return (-1); - printf(fmt, (int)(unsigned short)iword); + printf(fmt, (unsigned short)c.rdata.word); putchar('\n'); return (0); } else if (wflag && iflag == -1 && oflag == 2) { @@ -193,11 +191,9 @@ do_io(void) * "process call" op. */ c.wdata.word = oword; - c.rbuf = (char*) &iword; - c.rcount = iflag; if (ioctl(fd, SMB_PCALL, &c) == -1) return (-1); - printf(fmt, (int)(unsigned short)iword); + printf(fmt, (unsigned short)c.rdata.word); putchar('\n'); return (0); } else if (iflag > 1 && oflag == -1) { @@ -206,7 +202,7 @@ do_io(void) c.rcount = iflag; if (ioctl(fd, SMB_BREAD, &c) == -1) return (-1); - for (i = 0; i < iflag; i++) { + for (i = 0; i < c.rcount; i++) { if (i != 0) putchar(' '); printf(fmt, ibuf[i]); From 678d569fc24a0608cef27e9e60da092399fc8273 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Fri, 11 Nov 2016 15:08:12 +0000 Subject: [PATCH 008/204] intpm: clean up intsmb_bread and intsmb_pcall The hardware does not implement SMBus Process Call command, so remove ifdef-ed out code from intsmb_pcall. The code used exactly the same start sequence as for Write Word command. intsmb_bread code used to access an in value of the count parameter, but that parameter is supposed to be an out only parameter. For example, smb(4) does not initialize it before calling smbus_bread. MFC after: 3 weeks --- sys/dev/intpm/intpm.c | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/sys/dev/intpm/intpm.c b/sys/dev/intpm/intpm.c index bab2a7b73cf..bcb3d6dd1bc 100644 --- a/sys/dev/intpm/intpm.c +++ b/sys/dev/intpm/intpm.c @@ -785,39 +785,11 @@ intsmb_readw(device_t dev, u_char slave, char cmd, short *word) return (error); } -/* - * Data sheet claims that it implements all function, but also claims - * that it implements 7 function and not mention PCALL. So I don't know - * whether it will work. - */ static int intsmb_pcall(device_t dev, u_char slave, char cmd, short sdata, short *rdata) { -#ifdef PROCCALL_TEST - struct intsmb_softc *sc = device_get_softc(dev); - int error; - INTSMB_LOCK(sc); - error = intsmb_free(sc); - if (error) { - INTSMB_UNLOCK(sc); - return (error); - } - bus_write_1(sc->io_res, PIIX4_SMBHSTADD, slave & ~LSB); - bus_write_1(sc->io_res, PIIX4_SMBHSTCMD, cmd); - bus_write_1(sc->io_res, PIIX4_SMBHSTDAT0, sdata & 0xff); - bus_write_1(sc->io_res, PIIX4_SMBHSTDAT1, (sdata & 0xff) >> 8); - intsmb_start(sc, PIIX4_SMBHSTCNT_PROT_WDATA, 0); - error = intsmb_stop(sc); - if (error == 0) { - *rdata = bus_read_1(sc->io_res, PIIX4_SMBHSTDAT0); - *rdata |= bus_read_1(sc->io_res, PIIX4_SMBHSTDAT1) << 8; - } - INTSMB_UNLOCK(sc); - return (error); -#else return (SMB_ENOTSUPP); -#endif } static int @@ -857,9 +829,6 @@ intsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf) int error, i; u_char data, nread; - if (*count > SMBBLOCKTRANS_MAX || *count == 0) - return (SMB_EINVAL); - INTSMB_LOCK(sc); error = intsmb_free(sc); if (error) { @@ -872,18 +841,14 @@ intsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf) bus_write_1(sc->io_res, PIIX4_SMBHSTADD, slave | LSB); bus_write_1(sc->io_res, PIIX4_SMBHSTCMD, cmd); - bus_write_1(sc->io_res, PIIX4_SMBHSTDAT0, *count); intsmb_start(sc, PIIX4_SMBHSTCNT_PROT_BLOCK, 0); error = intsmb_stop(sc); if (error == 0) { nread = bus_read_1(sc->io_res, PIIX4_SMBHSTDAT0); if (nread != 0 && nread <= SMBBLOCKTRANS_MAX) { - for (i = 0; i < nread; i++) { - data = bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); - if (i < *count) - buf[i] = data; - } *count = nread; + for (i = 0; i < nread; i++) + data = bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); } else error = SMB_EBUSERR; } From 88cc0bb94008114a3d7be01344437fb9b9dfb611 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Fri, 11 Nov 2016 15:11:54 +0000 Subject: [PATCH 009/204] iicsmb: SMB_MAXBLOCKSIZE can be used again The constant was set to the correct value in r308242. While there, fix iicsmb_bread() to not use a value of an out parameter 'count'. MFC after: 3 weeks X-MFC after: r308242 --- sys/dev/iicbus/iicsmb.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/sys/dev/iicbus/iicsmb.c b/sys/dev/iicbus/iicsmb.c index b49d93d56ef..88af163d2fe 100644 --- a/sys/dev/iicbus/iicsmb.c +++ b/sys/dev/iicbus/iicsmb.c @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "iicbus_if.h" @@ -432,7 +433,7 @@ iicsmb_bwrite(device_t dev, u_char slave, char cmd, u_char count, char *buf) }; int error; - if (count > 32 || count == 0) + if (count > SMB_MAXBLOCKSIZE || count == 0) return (SMB_EINVAL); error = TRANSFER_MSGS(dev, msgs); return (iic2smb_error(error)); @@ -450,12 +451,6 @@ iicsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf) }; device_t parent = device_get_parent(dev); int error; - u_char bufsz; - - /* Stash output buffer size before overwriting it. */ - bufsz = *count; - if (bufsz == 0) - return (SMB_EINVAL); /* Have to do this because the command is split in two transfers. */ error = iicbus_request_bus(parent, dev, IIC_WAIT); @@ -465,18 +460,13 @@ iicsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf) /* * If the slave offers an empty or a too long reply, * read one byte to generate the stop or abort. - * XXX 32 is hardcoded until SMB_MAXBLOCKSIZE is restored - * to sanity. */ - if (*count > 32 || *count == 0) + if (*count > SMB_MAXBLOCKSIZE || *count == 0) block_msg[0].len = 1; - /* If longer than the buffer, then clamp at the buffer size. */ - if (*count > bufsz) - block_msg[0].len = bufsz; else block_msg[0].len = *count; error = TRANSFER_MSGS(dev, block_msg); - if (*count > 32 || *count == 0) + if (*count > SMB_MAXBLOCKSIZE || *count == 0) error = SMB_EINVAL; } (void)iicbus_release_bus(parent, dev); From 87acb7f815cfffe0878bf3ab92e1ae7073e43696 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Fri, 11 Nov 2016 15:13:30 +0000 Subject: [PATCH 010/204] Use the modern spelling of ofw_bus_node_is_compatible in sys/arm. Sponsored by: ABT Systems Ltd --- sys/arm/allwinner/aw_ccu.c | 2 +- sys/arm/annapurna/alpine/alpine_machdep_mp.c | 2 +- sys/arm/arm/gic.c | 2 +- sys/arm/at91/at91_common.c | 3 ++- sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c | 2 +- sys/arm/lpc/lpc_intc.c | 2 +- sys/arm/mv/gpio.c | 2 +- sys/arm/mv/mv_common.c | 14 ++++++++------ sys/arm/mv/mv_machdep.c | 9 +++++---- sys/arm/mv/mv_pci.c | 4 ++-- sys/arm/rockchip/rk30xx_gpio.c | 2 +- sys/arm/ti/am335x/am335x_lcd_syscons.c | 2 +- sys/arm/versatile/versatile_common.c | 3 ++- 13 files changed, 27 insertions(+), 22 deletions(-) diff --git a/sys/arm/allwinner/aw_ccu.c b/sys/arm/allwinner/aw_ccu.c index 52d9cdacbfe..306d33a298b 100644 --- a/sys/arm/allwinner/aw_ccu.c +++ b/sys/arm/allwinner/aw_ccu.c @@ -195,7 +195,7 @@ aw_ccu_search_compatible(void) root = OF_finddevice("/"); for (compat = compat_data; compat->ocd_str != NULL; compat++) - if (fdt_is_compatible(root, compat->ocd_str)) + if (ofw_bus_node_is_compatible(root, compat->ocd_str)) break; return (compat); diff --git a/sys/arm/annapurna/alpine/alpine_machdep_mp.c b/sys/arm/annapurna/alpine/alpine_machdep_mp.c index e48a1a3c577..122391a2419 100644 --- a/sys/arm/annapurna/alpine/alpine_machdep_mp.c +++ b/sys/arm/annapurna/alpine/alpine_machdep_mp.c @@ -81,7 +81,7 @@ static boolean_t alpine_validate_cpu(u_int, phandle_t, u_int, pcell_t *); static boolean_t alpine_validate_cpu(u_int id, phandle_t child, u_int addr_cell, pcell_t *reg) { - return fdt_is_compatible(child, "arm,cortex-a15"); + return ofw_bus_node_is_compatible(child, "arm,cortex-a15"); } static int diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c index 91ccf31635f..1efa9853e53 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -312,7 +312,7 @@ gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt, if (self == 0) { for (ocd = compat_data; ocd->ocd_str != NULL; ocd++) { - if (fdt_is_compatible(iparent, ocd->ocd_str)) { + if (ofw_bus_node_is_compatible(iparent, ocd->ocd_str)) { self = iparent; break; } diff --git a/sys/arm/at91/at91_common.c b/sys/arm/at91/at91_common.c index 696161f3400..8ef16fe7bc9 100644 --- a/sys/arm/at91/at91_common.c +++ b/sys/arm/at91/at91_common.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include @@ -56,7 +57,7 @@ fdt_aic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, { int offset; - if (fdt_is_compatible(node, "atmel,at91rm9200-aic")) + if (ofw_bus_node_is_compatible(node, "atmel,at91rm9200-aic")) offset = 0; else return (ENXIO); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c b/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c index ea4b6f604ee..49217799d16 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c @@ -1261,7 +1261,7 @@ bcm2835_cpufreq_identify(driver_t *driver, device_t parent) root = OF_finddevice("/"); for (compat = compat_data; compat->ocd_str != NULL; compat++) - if (fdt_is_compatible(root, compat->ocd_str)) + if (ofw_bus_node_is_compatible(root, compat->ocd_str)) break; if (compat->ocd_data == 0) diff --git a/sys/arm/lpc/lpc_intc.c b/sys/arm/lpc/lpc_intc.c index d26ef9099c7..a5ee160b9f1 100644 --- a/sys/arm/lpc/lpc_intc.c +++ b/sys/arm/lpc/lpc_intc.c @@ -232,7 +232,7 @@ static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, int *pol) { - if (!fdt_is_compatible(node, "lpc,pic")) + if (!ofw_bus_node_is_compatible(node, "lpc,pic")) return (ENXIO); *interrupt = fdt32_to_cpu(intr[0]); diff --git a/sys/arm/mv/gpio.c b/sys/arm/mv/gpio.c index 79b7cc622a1..f6f116c66b7 100644 --- a/sys/arm/mv/gpio.c +++ b/sys/arm/mv/gpio.c @@ -643,7 +643,7 @@ mv_gpio_init(void) */ ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0])); - if (fdt_is_compatible(ctrl, e->compat)) + if (ofw_bus_node_is_compatible(ctrl, e->compat)) /* Call a handler. */ if ((rv = e->handler(ctrl, (pcell_t *)&gpios, len))) diff --git a/sys/arm/mv/mv_common.c b/sys/arm/mv/mv_common.c index 497860f6d1e..4f7f07c027b 100644 --- a/sys/arm/mv/mv_common.c +++ b/sys/arm/mv/mv_common.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -230,7 +231,8 @@ fdt_pm(phandle_t node) if (dev_mask & (1 << i)) continue; - compat = fdt_is_compatible(node, fdt_pm_mask_table[i].compat); + compat = ofw_bus_node_is_compatible(node, + fdt_pm_mask_table[i].compat); #if defined(SOC_MV_KIRKWOOD) if (compat && (cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) { dev_mask |= (1 << i); @@ -2092,7 +2094,7 @@ win_cpu_from_dt(void) * Retrieve CESA SRAM data. */ if ((node = OF_finddevice("sram")) != -1) - if (fdt_is_compatible(node, "mrvl,cesa-sram")) + if (ofw_bus_node_is_compatible(node, "mrvl,cesa-sram")) goto moveon; if ((node = OF_finddevice("/")) == 0) @@ -2120,7 +2122,7 @@ moveon: /* Check if there is a second CESA node */ while ((node = OF_peer(node)) != 0) { - if (fdt_is_compatible(node, "mrvl,cesa-sram")) { + if (ofw_bus_node_is_compatible(node, "mrvl,cesa-sram")) { if (fdt_regsize(node, &sram_base, &sram_size) != 0) return (EINVAL); break; @@ -2170,7 +2172,7 @@ fdt_win_setup(void) soc_node = &soc_nodes[i]; - if (!fdt_is_compatible(child, soc_node->compat)) + if (!ofw_bus_node_is_compatible(child,soc_node->compat)) continue; err = fdt_regsize(child, &base, &size); @@ -2319,8 +2321,8 @@ fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, int *pol) { - if (!fdt_is_compatible(node, "mrvl,pic") && - !fdt_is_compatible(node, "mrvl,mpic")) + if (!ofw_bus_node_is_compatible(node, "mrvl,pic") && + !ofw_bus_node_is_compatible(node, "mrvl,mpic")) return (ENXIO); *interrupt = fdt32_to_cpu(intr[0]); diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c index ce9766370dd..f88294b9dd0 100644 --- a/sys/arm/mv/mv_machdep.c +++ b/sys/arm/mv/mv_machdep.c @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include static int platform_mpp_init(void); #if defined(SOC_MV_ARMADAXP) @@ -103,7 +104,7 @@ platform_mpp_init(void) * Try to access the MPP node directly i.e. through /aliases/mpp. */ if ((node = OF_finddevice("mpp")) != -1) - if (fdt_is_compatible(node, "mrvl,mpp")) + if (ofw_bus_node_is_compatible(node, "mrvl,mpp")) goto moveon; /* * Find the node the long way. @@ -290,8 +291,8 @@ platform_sram_devmap(struct devmap_entry *map) * SRAM range. */ if ((child = OF_finddevice("/sram")) != 0) - if (fdt_is_compatible(child, "mrvl,cesa-sram") || - fdt_is_compatible(child, "mrvl,scratchpad")) + if (ofw_bus_node_is_compatible(child, "mrvl,cesa-sram") || + ofw_bus_node_is_compatible(child, "mrvl,scratchpad")) goto moveon; if ((root = OF_finddevice("/")) == 0) @@ -406,7 +407,7 @@ platform_devmap_init(void) i += 2; } - if (fdt_is_compatible(child, "mrvl,lbc")) { + if (ofw_bus_node_is_compatible(child, "mrvl,lbc")) { /* Check available space */ if (OF_getprop(child, "bank-count", (void *)&bank_count, sizeof(bank_count)) <= 0) diff --git a/sys/arm/mv/mv_pci.c b/sys/arm/mv/mv_pci.c index 55d3f15bb89..7f6b1f7da20 100644 --- a/sys/arm/mv/mv_pci.c +++ b/sys/arm/mv/mv_pci.c @@ -429,12 +429,12 @@ mv_pcib_attach(device_t self) node = ofw_bus_get_node(self); parnode = OF_parent(node); - if (fdt_is_compatible(node, "mrvl,pcie")) { + if (ofw_bus_node_is_compatible(node, "mrvl,pcie")) { sc->sc_type = MV_TYPE_PCIE; sc->sc_win_target = MV_WIN_PCIE_TARGET(unit); sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(unit); sc->sc_io_win_attr = MV_WIN_PCIE_IO_ATTR(unit); - } else if (fdt_is_compatible(node, "mrvl,pci")) { + } else if (ofw_bus_node_is_compatible(node, "mrvl,pci")) { sc->sc_type = MV_TYPE_PCI; sc->sc_win_target = MV_WIN_PCI_TARGET; sc->sc_mem_win_attr = MV_WIN_PCI_MEM_ATTR; diff --git a/sys/arm/rockchip/rk30xx_gpio.c b/sys/arm/rockchip/rk30xx_gpio.c index 609eb6af6c9..668b0e699c5 100644 --- a/sys/arm/rockchip/rk30xx_gpio.c +++ b/sys/arm/rockchip/rk30xx_gpio.c @@ -614,7 +614,7 @@ rk30_gpio_init(void) */ ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0])); - if (fdt_is_compatible(ctrl, e->compat)) + if (ofw_bus_node_is_compatible(ctrl, e->compat)) /* Call a handler. */ if ((rv = e->handler(ctrl, (pcell_t *)&gpios, len))) diff --git a/sys/arm/ti/am335x/am335x_lcd_syscons.c b/sys/arm/ti/am335x/am335x_lcd_syscons.c index 2cbf2fcadad..cf2c8394f6e 100644 --- a/sys/arm/ti/am335x/am335x_lcd_syscons.c +++ b/sys/arm/ti/am335x/am335x_lcd_syscons.c @@ -351,7 +351,7 @@ am335x_syscons_find_panel_node(phandle_t start) phandle_t result; for (child = OF_child(start); child != 0; child = OF_peer(child)) { - if (fdt_is_compatible(child, "ti,am335x-lcd")) + if (ofw_bus_node_is_compatible(child, "ti,am335x-lcd")) return (child); if ((result = am335x_syscons_find_panel_node(child))) return (result); diff --git a/sys/arm/versatile/versatile_common.c b/sys/arm/versatile/versatile_common.c index 983b3ce018b..54d6192eb08 100644 --- a/sys/arm/versatile/versatile_common.c +++ b/sys/arm/versatile/versatile_common.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -52,7 +53,7 @@ fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, int *pol) { - if (!fdt_is_compatible(node, "arm,versatile-vic")) + if (!ofw_bus_node_is_compatible(node, "arm,versatile-vic")) return (ENXIO); *interrupt = fdt32_to_cpu(intr[0]); From f1cd40a19d866e7d29227ad92ff47776bcf509b6 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Fri, 11 Nov 2016 15:16:37 +0000 Subject: [PATCH 011/204] update SMB_BWRITE documentation, clarify SMB_BREAD After removal of SMB_TRANS some information in the description of SMB_BWRITE has become stale. E.g., the maximum block size has been restored to 32. Also, the descriptions of SMB_BREAD and SMB_BWRITE had some incorrect information on the SMBus protocol details. MFC after: 1 week X-MFC with: r308242 Differential Revision: https://reviews.freebsd.org/D8431 --- share/man/man4/smb.4 | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4 index 82202a48051..53e809da306 100644 --- a/share/man/man4/smb.4 +++ b/share/man/man4/smb.4 @@ -141,26 +141,25 @@ in .Em BlockWrite first sends the byte from .Fa cmd -to the device, followed by +to the device, then the byte from +.Fa wcount +followed by .Fa wcount bytes of data that are taken from the buffer pointed to by .Fa wbuf . The SMBus specification mandates that no more than 32 bytes of -data can be transferred in a single block read or write command, -but since -.Xr smbus 4 -is also used to access I2C devices, the limit has been increased -to 1024. +data can be transferred in a single block read or write command. This value can be read from the constant .Dv SMB_MAXBLOCKSIZE . .It Dv SMB_BREAD Ta .Em BlockRead first sends the byte from .Fa cmd -to the device, then reads -.Fa rcount -bytes of data that from the device. -This data is returned in the buffer pointed to by +to the device, then reads a count of data bytes that the device +is going to provide and then reads that many bytes. +The count is returned in +.Fa rcount. +The data is returned in the buffer pointed to by .Fa rbuf . .El .Pp From a2696bf3c03d34fe898f0b28fa88e62e18673270 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Fri, 11 Nov 2016 15:42:12 +0000 Subject: [PATCH 012/204] Use ofw_bus_node_is_compatible in more drivers used on arm. Sponsored by: ABT Systems Ltd --- sys/dev/fdt/fdt_arm_platform.c | 3 ++- sys/dev/uart/uart_bus_fdt.c | 2 +- sys/dev/usb/net/if_smsc.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/fdt/fdt_arm_platform.c b/sys/dev/fdt/fdt_arm_platform.c index 22e935b146f..fe1f4046168 100644 --- a/sys/dev/fdt/fdt_arm_platform.c +++ b/sys/dev/fdt/fdt_arm_platform.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "platform_if.h" @@ -58,7 +59,7 @@ fdt_platform_probe(platform_t plat) /* Is the device is compatible? */ root = OF_finddevice("/"); compat = FDT_PLATFORM(plat)->fdt_compatible; - if (fdt_is_compatible(root, compat) != 0) + if (ofw_bus_node_is_compatible(root, compat) != 0) return 0; /* Not compatible, return an error */ diff --git a/sys/dev/uart/uart_bus_fdt.c b/sys/dev/uart/uart_bus_fdt.c index adcf5d2bfa0..8ad3714e2f6 100644 --- a/sys/dev/uart/uart_bus_fdt.c +++ b/sys/dev/uart/uart_bus_fdt.c @@ -123,7 +123,7 @@ uart_fdt_find_compatible(phandle_t node, const struct ofw_compat_data *cd) const struct ofw_compat_data *ocd; for (ocd = cd; ocd->ocd_str != NULL; ocd++) { - if (fdt_is_compatible(node, ocd->ocd_str)) + if (ofw_bus_node_is_compatible(node, ocd->ocd_str)) return (ocd); } return (NULL); diff --git a/sys/dev/usb/net/if_smsc.c b/sys/dev/usb/net/if_smsc.c index 915dd838b38..2162224b330 100644 --- a/sys/dev/usb/net/if_smsc.c +++ b/sys/dev/usb/net/if_smsc.c @@ -1566,8 +1566,8 @@ smsc_fdt_find_eth_node(phandle_t start) /* Traverse through entire tree to find usb ethernet nodes. */ for (node = OF_child(start); node != 0; node = OF_peer(node)) { - if (fdt_is_compatible(node, "net,ethernet") && - fdt_is_compatible(node, "usb,device")) + if (ofw_bus_node_is_compatible(node, "net,ethernet") && + ofw_bus_node_is_compatible(node, "usb,device")) return (node); child = smsc_fdt_find_eth_node(node); if (child != -1) From e72f9ec49fa94c170c9d3799a9168151647e7ccd Mon Sep 17 00:00:00 2001 From: "Stephen J. Kiernan" Date: Fri, 11 Nov 2016 16:59:26 +0000 Subject: [PATCH 013/204] The file_loadraw function grew an argument, update install function accordingly. Reviewed by: imp Approved by: sjg (mentor) MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D8494 --- sys/boot/common/install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/boot/common/install.c b/sys/boot/common/install.c index 36e7c6484dc..e40c228a5ea 100644 --- a/sys/boot/common/install.c +++ b/sys/boot/common/install.c @@ -286,7 +286,7 @@ install(char *pkgname) } s = (inst_rootfs == NULL) ? "/install.iso" : inst_rootfs; - if (file_loadraw(s, "mfs_root") == NULL) { + if (file_loadraw(s, "mfs_root", 1) == NULL) { error = errno; command_errmsg = "cannot load root file system"; goto fail; From 4f8155ddbcf85ffe3fa6b8a571f6b51c35e1837a Mon Sep 17 00:00:00 2001 From: "Stephen J. Kiernan" Date: Fri, 11 Nov 2016 17:41:17 +0000 Subject: [PATCH 014/204] Add support for LOADER_RC setting in the pkgfs manifest (defaults to /loader.rc) to specify a Forth file to read from the pkgfs tarball and process by Ficl. This allows for the tarball to do runtime things like load a platform-specific FDT blob, among other things. Reviewed by: imp Approved by: sjg (mentor) MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D8494 --- sys/boot/common/install.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sys/boot/common/install.c b/sys/boot/common/install.c index e40c228a5ea..8c19066894a 100644 --- a/sys/boot/common/install.c +++ b/sys/boot/common/install.c @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" -extern struct in_addr rootip; extern struct in_addr servip; extern int pkgfs_init(const char *, struct fs_ops *); @@ -50,6 +49,7 @@ COMMAND_SET(install, "install", "install software package", command_install); static char *inst_kernel; static char **inst_modules; static char *inst_rootfs; +static char *inst_loader_rc; static int setpath(char **what, char *val) @@ -146,6 +146,8 @@ read_metatags(int fd) error = setmultipath(&inst_modules, val); else if (strcmp(tag, "ROOTFS") == 0) error = setpath(&inst_rootfs, val); + else if (strcmp(tag, "LOADER_RC") == 0) + error = setpath(&inst_loader_rc, val); tag = p; } @@ -173,6 +175,10 @@ cleanup(void) free(inst_rootfs); inst_rootfs = NULL; } + if (inst_loader_rc != NULL) { + free(inst_loader_rc); + inst_loader_rc = NULL; + } pkgfs_cleanup(); } @@ -275,6 +281,16 @@ install(char *pkgname) goto fail; } + /* If there is a loader.rc in the package, execute it */ + s = (inst_loader_rc == NULL) ? "/loader.rc" : inst_loader_rc; + fd = open(s, O_RDONLY); + if (fd != -1) { + close(fd); + error = include(s); + if (error == CMD_ERROR) + goto fail; + } + i = 0; while (inst_modules != NULL && inst_modules[i] != NULL) { error = mod_loadkld(inst_modules[i], 0, NULL); From 472df8b8bd100f91fe7bcc4ed802fcab2b613ba4 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Fri, 11 Nov 2016 18:10:13 +0000 Subject: [PATCH 015/204] Use ofw_bus_node_is_compatible() instead of fdt_is_compatible() No need to have two functions that do the same thing, let's let fdt_* go away, and use ofw_bus_* equivalents instead. Requested by: andrew --- sys/dev/dpaa/bman_fdt.c | 4 +--- sys/dev/dpaa/if_dtsec_fdt.c | 11 ++++++----- sys/dev/dpaa/qman_fdt.c | 4 +--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/sys/dev/dpaa/bman_fdt.c b/sys/dev/dpaa/bman_fdt.c index c7950270e34..992b4eaa57b 100644 --- a/sys/dev/dpaa/bman_fdt.c +++ b/sys/dev/dpaa/bman_fdt.c @@ -36,8 +36,6 @@ __FBSDID("$FreeBSD$"); #include -#include - #include #include #include @@ -154,7 +152,7 @@ bman_portals_fdt_attach(device_t dev) /* Find portals tied to CPUs */ for (child = OF_child(node); child != 0; child = OF_peer(child)) { - if (!fdt_is_compatible(child, "fsl,bman-portal")) { + if (!ofw_bus_node_is_compatible(child, "fsl,bman-portal")) { continue; } /* Checkout related cpu */ diff --git a/sys/dev/dpaa/if_dtsec_fdt.c b/sys/dev/dpaa/if_dtsec_fdt.c index 49666f155a1..c9f98efa09f 100644 --- a/sys/dev/dpaa/if_dtsec_fdt.c +++ b/sys/dev/dpaa/if_dtsec_fdt.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -156,9 +155,9 @@ dtsec_fdt_attach(device_t dev) } /* Get link speed */ - if (fdt_is_compatible(enet_node, "fsl,fman-1g-mac") != 0) + if (ofw_bus_node_is_compatible(enet_node, "fsl,fman-1g-mac") != 0) sc->sc_eth_dev_type = ETH_DTSEC; - else if (fdt_is_compatible(enet_node, "fsl,fman-10g-mac") != 0) + else if (ofw_bus_node_is_compatible(enet_node, "fsl,fman-10g-mac") != 0) sc->sc_eth_dev_type = ETH_10GSEC; else return(ENXIO); @@ -211,10 +210,12 @@ dtsec_fdt_attach(device_t dev) fman_rxtx_node[0] = OF_instance_to_package(fman_rxtx_node[0]); fman_rxtx_node[1] = OF_instance_to_package(fman_rxtx_node[1]); - if (fdt_is_compatible(fman_rxtx_node[0], "fsl,fman-port-1g-rx") == 0) + if (ofw_bus_node_is_compatible(fman_rxtx_node[0], + "fsl,fman-port-1g-rx") == 0) return (ENXIO); - if (fdt_is_compatible(fman_rxtx_node[1], "fsl,fman-port-1g-tx") == 0) + if (ofw_bus_node_is_compatible(fman_rxtx_node[1], + "fsl,fman-port-1g-tx") == 0) return (ENXIO); /* Get RX port HW id */ diff --git a/sys/dev/dpaa/qman_fdt.c b/sys/dev/dpaa/qman_fdt.c index 69f128cf649..4c23c5fc4bd 100644 --- a/sys/dev/dpaa/qman_fdt.c +++ b/sys/dev/dpaa/qman_fdt.c @@ -36,8 +36,6 @@ __FBSDID("$FreeBSD$"); #include -#include - #include #include #include @@ -154,7 +152,7 @@ qman_portals_fdt_attach(device_t dev) /* Find portals tied to CPUs */ for (child = OF_child(node); child != 0; child = OF_peer(child)) { - if (!fdt_is_compatible(child, "fsl,qman-portal")) { + if (!ofw_bus_node_is_compatible(child, "fsl,qman-portal")) { continue; } /* Checkout related cpu */ From 0eaded92d00a671eeab2f9310f166e5749a65d26 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Fri, 11 Nov 2016 18:47:53 +0000 Subject: [PATCH 016/204] Spell 'PACKAGE' correctly. Submitted by: Kyle Evans, emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation --- lib/libgcc_s/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile index 6c57741e4d0..a38b43cfed6 100644 --- a/lib/libgcc_s/Makefile +++ b/lib/libgcc_s/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -PKG= clibs +PACKAGE= clibs SHLIB_NAME= libgcc_s.so.1 SHLIBDIR?= /lib From 836055542fc22074cd39aad923dd14d8dd45c329 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Fri, 11 Nov 2016 18:57:41 +0000 Subject: [PATCH 017/204] Increase the max allowed size of the microcode update blob for x86. Newer CPUs (SkyLakes) have updates of 100K size, which is bigger than current limit 32K. Increase it to 4M but leave the check around to prevent kernel memory allocator abuse. Some time ago, the memory for update was allocated by contigmalloc(9), and it was reasonable to be conservative as much as possible. Since all uses of contigmalloc(9) appear to be either misunderstanding or too cautious, and were removed, provide more slack than strictly neccessary. Submitted by: Oliver Pinter MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8486 --- sys/dev/cpuctl/cpuctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cpuctl/cpuctl.c b/sys/dev/cpuctl/cpuctl.c index d801f17cd05..e0c0bf75d4e 100644 --- a/sys/dev/cpuctl/cpuctl.c +++ b/sys/dev/cpuctl/cpuctl.c @@ -63,7 +63,7 @@ static d_ioctl_t cpuctl_ioctl; # define DPRINTF(...) #endif -#define UCODE_SIZE_MAX (32 * 1024) +#define UCODE_SIZE_MAX (4 * 1024 * 1024) static int cpuctl_do_msr(int cpu, cpuctl_msr_args_t *data, u_long cmd, struct thread *td); From 3a37091931a023b099094eb17fa3e25ffc20eb9c Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Fri, 11 Nov 2016 20:09:54 +0000 Subject: [PATCH 018/204] ioat(4): Fix race between process_events and reset_hw In the case where a hardware error is detected during ioat_process_events, hardware may advance (by one descriptor, probably) and a subsequent ioat_process_events may race the intended ioat_reset_hw followup. In that case, the second process_events would observe a completion update that does not match the software "last_seen" status, and attempt to successfully complete already-failed descriptors. Guard against this race with the resetting_cleanup flag. Reviewed by: bdrewery, markj Sponsored by: Dell EMC Isilon --- sys/dev/ioat/ioat.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/ioat/ioat.c b/sys/dev/ioat/ioat.c index a434b422534..b7a2b44327d 100644 --- a/sys/dev/ioat/ioat.c +++ b/sys/dev/ioat/ioat.c @@ -765,6 +765,15 @@ out: mtx_lock(&ioat->submit_lock); mtx_lock(&ioat->cleanup_lock); ioat->quiescing = TRUE; + /* + * This is safe to do here because we have both locks and the submit + * queue is quiesced. We know that we will drain all outstanding + * events, so ioat_reset_hw can't deadlock. It is necessary to + * protect other ioat_process_event threads from racing ioat_reset_hw, + * reading an indeterminate hw state, and attempting to continue + * issuing completions. + */ + ioat->resetting_cleanup = TRUE; chanerr = ioat_read_4(ioat, IOAT_CHANERR_OFFSET); if (1 <= g_ioat_debug_level) From a0329fb4d29bc4141874473c164816265f685656 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Fri, 11 Nov 2016 20:44:33 +0000 Subject: [PATCH 019/204] queue.3: Document existing QMD_* macros Feedback from: bapt, bdrewery, emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D3983 --- sys/sys/queue.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 7bb604f3de2..cff8fabd7f6 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -472,6 +472,12 @@ struct { \ */ #if (defined(_KERNEL) && defined(INVARIANTS)) +/* + * QMD_LIST_CHECK_HEAD(LIST_HEAD *head, LIST_ENTRY NAME) + * + * If the list is non-empty, validates that the first element of the list + * points back at 'head.' + */ #define QMD_LIST_CHECK_HEAD(head, field) do { \ if (LIST_FIRST((head)) != NULL && \ LIST_FIRST((head))->field.le_prev != \ @@ -479,6 +485,12 @@ struct { \ panic("Bad list head %p first->prev != head", (head)); \ } while (0) +/* + * QMD_LIST_CHECK_NEXT(TYPE *elm, LIST_ENTRY NAME) + * + * If an element follows 'elm' in the list, validates that the next element + * points back at 'elm.' + */ #define QMD_LIST_CHECK_NEXT(elm, field) do { \ if (LIST_NEXT((elm), field) != NULL && \ LIST_NEXT((elm), field)->field.le_prev != \ @@ -486,6 +498,11 @@ struct { \ panic("Bad link elm %p next->prev != elm", (elm)); \ } while (0) +/* + * QMD_LIST_CHECK_PREV(TYPE *elm, LIST_ENTRY NAME) + * + * Validates that the previous element (or head of the list) points to 'elm.' + */ #define QMD_LIST_CHECK_PREV(elm, field) do { \ if (*(elm)->field.le_prev != (elm)) \ panic("Bad link elm %p prev->next != elm", (elm)); \ @@ -634,6 +651,12 @@ struct { \ * Tail queue functions. */ #if (defined(_KERNEL) && defined(INVARIANTS)) +/* + * QMD_TAILQ_CHECK_HEAD(TAILQ_HEAD *head, TAILQ_ENTRY NAME) + * + * If the tailq is non-empty, validates that the first element of the tailq + * points back at 'head.' + */ #define QMD_TAILQ_CHECK_HEAD(head, field) do { \ if (!TAILQ_EMPTY(head) && \ TAILQ_FIRST((head))->field.tqe_prev != \ @@ -641,11 +664,22 @@ struct { \ panic("Bad tailq head %p first->prev != head", (head)); \ } while (0) +/* + * QMD_TAILQ_CHECK_TAIL(TAILQ_HEAD *head, TAILQ_ENTRY NAME) + * + * Validates that the tail of the tailq is a pointer to pointer to NULL. + */ #define QMD_TAILQ_CHECK_TAIL(head, field) do { \ if (*(head)->tqh_last != NULL) \ panic("Bad tailq NEXT(%p->tqh_last) != NULL", (head)); \ } while (0) +/* + * QMD_TAILQ_CHECK_NEXT(TYPE *elm, TAILQ_ENTRY NAME) + * + * If an element follows 'elm' in the tailq, validates that the next element + * points back at 'elm.' + */ #define QMD_TAILQ_CHECK_NEXT(elm, field) do { \ if (TAILQ_NEXT((elm), field) != NULL && \ TAILQ_NEXT((elm), field)->field.tqe_prev != \ @@ -653,6 +687,11 @@ struct { \ panic("Bad link elm %p next->prev != elm", (elm)); \ } while (0) +/* + * QMD_TAILQ_CHECK_PREV(TYPE *elm, TAILQ_ENTRY NAME) + * + * Validates that the previous element (or head of the tailq) points to 'elm.' + */ #define QMD_TAILQ_CHECK_PREV(elm, field) do { \ if (*(elm)->field.tqe_prev != (elm)) \ panic("Bad link elm %p prev->next != elm", (elm)); \ From 3cc771c38b7e03980eed45842d86f096686ac590 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 11 Nov 2016 21:01:45 +0000 Subject: [PATCH 020/204] Pull in r263169 from upstream llvm trunk (by Tim Northover): AArch64: only try to use scaled fcvt ops on legal vector types. Before we ended up calling getSimpleVectorType on a <3 x float>, which asserted. This fixes an assertion when building the print/ghostscript9-agpl-base port for AArch64. PR: 213865 MFC after: 3 days --- contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index 29fbed1b588..e67a233bbd6 100644 --- a/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -7581,7 +7581,8 @@ static SDValue performFpToIntCombine(SDNode *N, SelectionDAG &DAG, return SDValue(); SDValue Op = N->getOperand(0); - if (!Op.getValueType().isVector() || Op.getOpcode() != ISD::FMUL) + if (!Op.getValueType().isVector() || !Op.getValueType().isSimple() || + Op.getOpcode() != ISD::FMUL) return SDValue(); SDValue ConstVec = Op->getOperand(1); From 5bb79eade4d38c6f48f2ed093af60c42b694bbc0 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Fri, 11 Nov 2016 21:29:48 +0000 Subject: [PATCH 021/204] Replace another fdt_is_compatible() call. --- sys/dev/fdt/fdt_powerpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/fdt/fdt_powerpc.c b/sys/dev/fdt/fdt_powerpc.c index 80cfa4b3a93..3c3dccef0f3 100644 --- a/sys/dev/fdt/fdt_powerpc.c +++ b/sys/dev/fdt/fdt_powerpc.c @@ -112,7 +112,7 @@ fdt_fixup_fman(phandle_t root) * That frequency is equal to /soc node bus-frequency. */ for (node = OF_child(node); node != 0; node = OF_peer(node)) { - if (fdt_is_compatible(node, "fsl,fman") == 0) + if (ofw_bus_node_is_compatible(node, "fsl,fman") == 0) continue; if (OF_setprop(node, "clock-frequency", (void *)&freq, From 4a6db06feee22b390f4326b9992dd1c795524ec4 Mon Sep 17 00:00:00 2001 From: Gavin Atkinson Date: Fri, 11 Nov 2016 21:53:38 +0000 Subject: [PATCH 022/204] Correct spelling in syslog: getttimeofday -> gettimeofday --- usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c index e5f5c504d9c..1fcd18d7eba 100644 --- a/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c +++ b/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c @@ -356,7 +356,7 @@ bridge_get_time_since_tc(struct bridge_if *bif, uint32_t *ticks) if (gettimeofday(&ct, NULL) < 0) { syslog(LOG_ERR, "bridge get time since last TC:" - "getttimeofday failed: %s", strerror(errno)); + "gettimeofday failed: %s", strerror(errno)); return (-1); } From f5dce90558d4591cafe126744f56cb1e35c682ed Mon Sep 17 00:00:00 2001 From: Ryan Stone Date: Fri, 11 Nov 2016 23:07:31 +0000 Subject: [PATCH 023/204] Fix git tools when run against a worktree In a git worktree, the gitdir is in an entirely different location. In arcgit, use git rev-parse --git-dir to get the correct path to it always. When running git from outside of the work tree, as in importgit, the path provided by git rev-parse --git-dir can be either a relative or absolute path depending on the work tree. Rather than trying to deal with that, just use git -C. Differential Revision: https://reviews.freebsd.org/D8501 Reviewed by: markj --- tools/tools/git/arcgit | 2 +- tools/tools/git/importgit | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tools/tools/git/arcgit b/tools/tools/git/arcgit index 4b98042edd4..60d9abe5859 100755 --- a/tools/tools/git/arcgit +++ b/tools/tools/git/arcgit @@ -69,7 +69,7 @@ create_review() git checkout $commit > /dev/null || error "Could not checkout $commit" - arc_dir="$(git rev-parse --show-toplevel)/.git/arc" + arc_dir="$(git rev-parse --git-dir)/arc" arc_msg="$arc_dir/create-message" mkdir -p $arc_dir git show -s --format='%B' HEAD > $arc_msg diff --git a/tools/tools/git/importgit b/tools/tools/git/importgit index 786930bc524..5149f2d9e15 100755 --- a/tools/tools/git/importgit +++ b/tools/tools/git/importgit @@ -50,7 +50,7 @@ error() exit 1 } -unset git range commit dry_run +unset git_repo range commit dry_run while getopts ":c:g:nr:" o do @@ -95,18 +95,18 @@ then error -u "-g argument is mandatory" fi -git="$git_repo/.git" - -if [ ! -d "$git" ] -then - error "$git_repo does not seem to be a git repo" -fi - if ! type git > /dev/null 2> /dev/null then error "Install devel/git first" fi +GIT="git -C $git_repo" + +if ! $GIT rev-parse --git-dir 2> /dev/null > /dev/null +then + error "$git_repo does not seem to be a git repo" +fi + if ! type svn > /dev/null 2> /dev/null then error "Install devel/subversion first" @@ -122,21 +122,21 @@ then error "Could not communicate with svn server. Is your ssh key loaded?" fi -git --git-dir=$git log --format=%H $range | tail -r | while read -r commit +$GIT log --format=%H $range | tail -r | while read -r commit do - echo "Applying `git --git-dir=$git show -s --oneline $commit`" + echo "Applying `$GIT show -s --oneline $commit`" - if [ -n "$(git --git-dir=$git show --diff-filter=CDRTUXB $commit)" ] + if [ -n "$($GIT show --diff-filter=CDRTUXB $commit)" ] then error "Commit performed unsupported change (e.g. delete/rename)" fi - if [ "$(git --git-dir=$git show -s --format=%P $commit | wc -w)" -ne 1 ] + if [ "$($GIT show -s --format=%P $commit | wc -w)" -ne 1 ] then error "Cannot import merge commits" fi - git --git-dir=$git diff --diff-filter=A --name-only \ + $GIT diff --diff-filter=A --name-only \ ${commit}~..$commit | while read -r newfile do if [ -f "$newfile" ] @@ -158,10 +158,10 @@ do continue fi - git --git-dir=$git show $commit | patch -p 1 -s || \ + $GIT show $commit | patch -p 1 -s || \ error "Failed to apply patch" - git --git-dir=$git diff --diff-filter=A --name-only \ + $GIT diff --diff-filter=A --name-only \ ${commit}~..$commit | while read -r newfile do svn add --parents --depth=infinity $newfile || \ @@ -176,7 +176,7 @@ do exit $ret fi - git --git-dir=$git show -s --format='%B' $commit | svn commit -F - || \ + $GIT show -s --format='%B' $commit | svn commit -F - || \ error "Failed to commit" done From 2ed1e385b00d98c25c11d6aa8183a20e44128e3d Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 11 Nov 2016 23:28:07 +0000 Subject: [PATCH 024/204] libcc_{s,eh}: build without SSP As in the gnu/lib/libgcc Makefile: libgcc is linked in last and thus cannot depend on ssp symbols coming from earlier libraries. Disable stack protection for this library. Reviewed by: dim Sponsored by: The FreeBSD Foundation --- lib/libgcc_eh/Makefile | 1 + lib/libgcc_s/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/libgcc_eh/Makefile b/lib/libgcc_eh/Makefile index 04f99d9e85c..9909e73c937 100644 --- a/lib/libgcc_eh/Makefile +++ b/lib/libgcc_eh/Makefile @@ -5,6 +5,7 @@ PACKAGE= clibs LIB= gcc_eh NO_PIC= +MK_SSP= no WARNS?= 2 .include "Makefile.inc" diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile index a38b43cfed6..e4887a631de 100644 --- a/lib/libgcc_s/Makefile +++ b/lib/libgcc_s/Makefile @@ -4,6 +4,7 @@ PACKAGE= clibs SHLIB_NAME= libgcc_s.so.1 SHLIBDIR?= /lib +MK_SSP= no WARNS?= 2 LDFLAGS+= -nodefaultlibs From a6b91f0f4577a267241f6c33756b3c5ca4ad0550 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sat, 12 Nov 2016 00:14:13 +0000 Subject: [PATCH 025/204] Don't place threads on the run queue after waking up other CPUs. The other CPU might resume and see a still-empty runq and go back to sleep before sched_add() adds the thread to the runq. This results in a lost wakeup and a potential hang if the system is otherwise completely idle. The race originated due to a micro-optimization (my fault) in 4BSD in that it avoided putting a thread on the run queue if the scheduler was going to preempt to the new thread. To avoid complexity while fixing this race, just drop this optimization. 4BSD now always sets the "owepreempt" flag when a preemption is warranted and defers the actual preemption to the thread_unlock of the caller the same as ULE. MFC after: 2 weeks Sponsored by: Netflix --- sys/kern/sched_4bsd.c | 62 +++++++++---------------------------------- 1 file changed, 13 insertions(+), 49 deletions(-) diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 82dc6e9ecdb..689cb95ce5c 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -308,9 +308,8 @@ maybe_resched(struct thread *td) /* * This function is called when a thread is about to be put on run queue * because it has been made runnable or its priority has been adjusted. It - * determines if the new thread should be immediately preempted to. If so, - * it switches to it and eventually returns true. If not, it returns false - * so that the caller may place the thread on an appropriate run queue. + * determines if the new thread should preempt the current thread. If so, + * it sets td_owepreempt to request a preemption. */ int maybe_preempt(struct thread *td) @@ -356,29 +355,8 @@ maybe_preempt(struct thread *td) return (0); #endif - if (ctd->td_critnest > 1) { - CTR1(KTR_PROC, "maybe_preempt: in critical section %d", - ctd->td_critnest); - ctd->td_owepreempt = 1; - return (0); - } - /* - * Thread is runnable but not yet put on system run queue. - */ - MPASS(ctd->td_lock == td->td_lock); - MPASS(TD_ON_RUNQ(td)); - TD_SET_RUNNING(td); - CTR3(KTR_PROC, "preempting to thread %p (pid %d, %s)\n", td, - td->td_proc->p_pid, td->td_name); - mi_switch(SW_INVOL | SW_PREEMPT | SWT_PREEMPT, td); - /* - * td's lock pointer may have changed. We have to return with it - * locked. - */ - spinlock_enter(); - thread_unlock(ctd); - thread_lock(td); - spinlock_exit(); + CTR0(KTR_PROC, "maybe_preempt: scheduling preemption"); + ctd->td_owepreempt = 1; return (1); #else return (0); @@ -1332,6 +1310,12 @@ sched_add(struct thread *td, int flags) ts->ts_runq = &runq; } + if ((td->td_flags & TDF_NOLOAD) == 0) + sched_load_add(); + runq_add(ts->ts_runq, td, flags); + if (cpu != NOCPU) + runq_length[cpu]++; + cpuid = PCPU_GET(cpuid); if (single_cpu && cpu != cpuid) { kick_other_cpu(td->td_priority, cpu); @@ -1348,18 +1332,10 @@ sched_add(struct thread *td, int flags) } if (!forwarded) { - if ((flags & SRQ_YIELDING) == 0 && maybe_preempt(td)) - return; - else + if (!maybe_preempt(td)) maybe_resched(td); } } - - if ((td->td_flags & TDF_NOLOAD) == 0) - sched_load_add(); - runq_add(ts->ts_runq, td, flags); - if (cpu != NOCPU) - runq_length[cpu]++; } #else /* SMP */ { @@ -1393,23 +1369,11 @@ sched_add(struct thread *td, int flags) CTR2(KTR_RUNQ, "sched_add: adding td_sched:%p (td:%p) to runq", ts, td); ts->ts_runq = &runq; - /* - * If we are yielding (on the way out anyhow) or the thread - * being saved is US, then don't try be smart about preemption - * or kicking off another CPU as it won't help and may hinder. - * In the YIEDLING case, we are about to run whoever is being - * put in the queue anyhow, and in the OURSELF case, we are - * putting ourself on the run queue which also only happens - * when we are about to yield. - */ - if ((flags & SRQ_YIELDING) == 0) { - if (maybe_preempt(td)) - return; - } if ((td->td_flags & TDF_NOLOAD) == 0) sched_load_add(); runq_add(ts->ts_runq, td, flags); - maybe_resched(td); + if (!maybe_preempt(td)) + maybe_resched(td); } #endif /* SMP */ From 892f0ab0ab9ff6d9088523248a6c851c2606cc06 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sat, 12 Nov 2016 00:23:09 +0000 Subject: [PATCH 026/204] Allow scheduling during early boot. - Send IPI wakeups once SMP is started even if cold is true. - Permit preemptions when cold is true. These changes are needed for EARLY_AP_STARTUP. MFC after: 2 weeks Sponsored by: Netflix --- sys/kern/sched_4bsd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 689cb95ce5c..f97da171468 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -326,7 +326,6 @@ maybe_preempt(struct thread *td) * - The current thread has a higher (numerically lower) or * equivalent priority. Note that this prevents curthread from * trying to preempt to itself. - * - It is too early in the boot for context switches (cold is set). * - The current thread has an inhibitor set or is in the process of * exiting. In this case, the current thread is about to switch * out anyways, so there's no point in preempting. If we did, @@ -347,7 +346,7 @@ maybe_preempt(struct thread *td) ("maybe_preempt: trying to run inhibited thread")); pri = td->td_priority; cpri = ctd->td_priority; - if (panicstr != NULL || pri >= cpri || cold /* || dumping */ || + if (panicstr != NULL || pri >= cpri /* || dumping */ || TD_IS_INHIBITED(ctd)) return (0); #ifndef FULL_PREEMPTION @@ -1105,7 +1104,7 @@ forward_wakeup(int cpunum) if ((!forward_wakeup_enabled) || (forward_wakeup_use_mask == 0 && forward_wakeup_use_loop == 0)) return (0); - if (!smp_started || cold || panicstr) + if (!smp_started || panicstr) return (0); forward_wakeups_requested++; From f7b1d7f419066531171443ed3f6d8dcdf893e5fb Mon Sep 17 00:00:00 2001 From: Jakub Wojciech Klama Date: Sat, 12 Nov 2016 01:41:43 +0000 Subject: [PATCH 027/204] Reserve space for control message payload (currently a port name). Approved by: trasz (mentor) Sponsored by: iXsystems, Inc. --- sys/dev/virtio/console/virtio_console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/virtio/console/virtio_console.c b/sys/dev/virtio/console/virtio_console.c index bfef07f1d94..4c673c8d129 100644 --- a/sys/dev/virtio/console/virtio_console.c +++ b/sys/dev/virtio/console/virtio_console.c @@ -600,7 +600,7 @@ vtcon_ctrl_event_enqueue(struct vtcon_softc *sc, sglist_init(&sg, 2, segs); error = sglist_append(&sg, control, - sizeof(struct virtio_console_control)); + sizeof(struct virtio_console_control) + VTCON_BULK_BUFSZ); KASSERT(error == 0, ("%s: error %d adding control to sglist", __func__, error)); @@ -633,7 +633,8 @@ vtcon_ctrl_event_requeue(struct vtcon_softc *sc, { int error; - bzero(control, sizeof(struct virtio_console_control)); + bzero(control, sizeof(struct virtio_console_control) + + VTCON_BULK_BUFSZ); error = vtcon_ctrl_event_enqueue(sc, control); KASSERT(error == 0, From 959d78b29afba3844a2d8e98c221dafe27729fe2 Mon Sep 17 00:00:00 2001 From: Kurt Lidl Date: Sat, 12 Nov 2016 03:07:41 +0000 Subject: [PATCH 028/204] Fix build when WITHOUT_BLACKLIST=yes is specified PR: 214409 Submitted by: matthew Reported by: matteo MFC after: 3 days Sponsored by: The FreeBSD Foundation --- libexec/ftpd/ftpd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 95682d5ceb5..5756c28b81a 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -93,10 +93,7 @@ __FBSDID("$FreeBSD$"); #include #endif -#ifdef USE_BLACKLIST #include "blacklist_client.h" -#endif - #include "pathnames.h" #include "extern.h" From 1f842820e18b247a4c86e17f9434e7f4f44941e8 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sat, 12 Nov 2016 05:09:39 +0000 Subject: [PATCH 029/204] Set of improvements to acpi_hp(4) driver. - Attach only to WMI devices that provide supported GUIDs. HP Spectre x360 has two WMI devices, only one of which provides the GUIDs. - Pass proper device to ACPI_WMI_REMOVE_EVENT_HANDLER() on detach. - Improve error WMI handling separating status and data paths. This allows to hide sysctls not supported by specific hardware/BIOS. - Improve CMI block parser to make it work on HP Spectre x360 laptop. - In verbose mode log all unknown events to help futher improvements. --- sys/dev/acpi_support/acpi_hp.c | 351 ++++++++++++++++++++------------- 1 file changed, 215 insertions(+), 136 deletions(-) diff --git a/sys/dev/acpi_support/acpi_hp.c b/sys/dev/acpi_support/acpi_hp.c index ec858965943..e9de245e264 100644 --- a/sys/dev/acpi_support/acpi_hp.c +++ b/sys/dev/acpi_support/acpi_hp.c @@ -66,11 +66,17 @@ ACPI_MODULE_NAME("HP") #define ACPI_HP_WMI_BIOS_GUID "5FB7F034-2C63-45E9-BE91-3D44E2C707E4" #define ACPI_HP_WMI_CMI_GUID "2D114B49-2DFB-4130-B8FE-4A3C09E75133" -#define ACPI_HP_WMI_DISPLAY_COMMAND 0x1 -#define ACPI_HP_WMI_HDDTEMP_COMMAND 0x2 -#define ACPI_HP_WMI_ALS_COMMAND 0x3 -#define ACPI_HP_WMI_DOCK_COMMAND 0x4 -#define ACPI_HP_WMI_WIRELESS_COMMAND 0x5 +#define ACPI_HP_WMI_DISPLAY_COMMAND 0x1 +#define ACPI_HP_WMI_HDDTEMP_COMMAND 0x2 +#define ACPI_HP_WMI_ALS_COMMAND 0x3 +#define ACPI_HP_WMI_DOCK_COMMAND 0x4 +#define ACPI_HP_WMI_WIRELESS_COMMAND 0x5 +#define ACPI_HP_WMI_BIOS_COMMAND 0x9 +#define ACPI_HP_WMI_FEATURE_COMMAND 0xb +#define ACPI_HP_WMI_HOTKEY_COMMAND 0xc +#define ACPI_HP_WMI_FEATURE2_COMMAND 0xd +#define ACPI_HP_WMI_WIRELESS2_COMMAND 0x1b +#define ACPI_HP_WMI_POSTCODEERROR_COMMAND 0x2a #define ACPI_HP_METHOD_WLAN_ENABLED 1 #define ACPI_HP_METHOD_WLAN_RADIO 2 @@ -104,11 +110,32 @@ ACPI_MODULE_NAME("HP") #define HP_MASK_BLUETOOTH_ENABLED 0x20000 #define HP_MASK_WLAN_ENABLED 0x200 +#define ACPI_HP_EVENT_DOCK 0x01 +#define ACPI_HP_EVENT_PARK_HDD 0x02 +#define ACPI_HP_EVENT_SMART_ADAPTER 0x03 +#define ACPI_HP_EVENT_BEZEL_BUTTON 0x04 +#define ACPI_HP_EVENT_WIRELESS 0x05 +#define ACPI_HP_EVENT_CPU_BATTERY_THROTTLE 0x06 +#define ACPI_HP_EVENT_LOCK_SWITCH 0x07 +#define ACPI_HP_EVENT_LID_SWITCH 0x08 +#define ACPI_HP_EVENT_SCREEN_ROTATION 0x09 +#define ACPI_HP_EVENT_COOLSENSE_SYSTEM_MOBILE 0x0A +#define ACPI_HP_EVENT_COOLSENSE_SYSTEM_HOT 0x0B +#define ACPI_HP_EVENT_PROXIMITY_SENSOR 0x0C +#define ACPI_HP_EVENT_BACKLIT_KB_BRIGHTNESS 0x0D +#define ACPI_HP_EVENT_PEAKSHIFT_PERIOD 0x0F +#define ACPI_HP_EVENT_BATTERY_CHARGE_PERIOD 0x10 + #define ACPI_HP_CMI_DETAIL_PATHS 0x01 #define ACPI_HP_CMI_DETAIL_ENUMS 0x02 #define ACPI_HP_CMI_DETAIL_FLAGS 0x04 #define ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE 0x08 +#define ACPI_HP_WMI_RET_WRONG_SIGNATURE 0x02 +#define ACPI_HP_WMI_RET_UNKNOWN_COMMAND 0x03 +#define ACPI_HP_WMI_RET_UNKNOWN_CMDTYPE 0x04 +#define ACPI_HP_WMI_RET_INVALID_PARAMETERS 0x05 + struct acpi_hp_inst_seq_pair { UINT32 sequence; /* sequence number as suggested by cmi bios */ UINT8 instance; /* object instance on guid */ @@ -119,6 +146,7 @@ struct acpi_hp_softc { device_t wmi_dev; int has_notify; /* notification GUID found */ int has_cmi; /* CMI GUID found */ + int has_wireless; /* Wireless command found */ int cmi_detail; /* CMI detail level (set by sysctl) */ int verbose; /* add debug output */ @@ -287,7 +315,7 @@ static int acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg); static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method); static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, - int is_write, int val); + int is_write, int val, int *retval); static void acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context); static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, char* outbuf, size_t outsize, @@ -332,13 +360,18 @@ MODULE_DEPEND(acpi_hp, acpi, 1, 1, 1); static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc *sc) { + int res; int wireless; int new_wlan_status; int new_bluetooth_status; int new_wwan_status; - wireless = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + res = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &wireless); + if (res != 0) { + device_printf(sc->wmi_dev, "Wireless command error %x\n", res); + return; + } new_wlan_status = -1; new_bluetooth_status = -1; new_wwan_status = -1; @@ -348,41 +381,41 @@ acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc *sc) if (sc->wlan_disable_if_radio_off && !(wireless & HP_MASK_WLAN_RADIO) && (wireless & HP_MASK_WLAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x100); + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x100, NULL); new_wlan_status = 0; } else if (sc->wlan_enable_if_radio_on && (wireless & HP_MASK_WLAN_RADIO) && !(wireless & HP_MASK_WLAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x101); + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x101, NULL); new_wlan_status = 1; } if (sc->bluetooth_disable_if_radio_off && !(wireless & HP_MASK_BLUETOOTH_RADIO) && (wireless & HP_MASK_BLUETOOTH_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x200); + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x200, NULL); new_bluetooth_status = 0; } else if (sc->bluetooth_enable_if_radio_on && (wireless & HP_MASK_BLUETOOTH_RADIO) && !(wireless & HP_MASK_BLUETOOTH_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x202); + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x202, NULL); new_bluetooth_status = 1; } if (sc->wwan_disable_if_radio_off && !(wireless & HP_MASK_WWAN_RADIO) && (wireless & HP_MASK_WWAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x400); + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x400, NULL); new_wwan_status = 0; } else if (sc->wwan_enable_if_radio_on && (wireless & HP_MASK_WWAN_RADIO) && !(wireless & HP_MASK_WWAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x404); + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x404, NULL); new_wwan_status = 1; } @@ -441,6 +474,11 @@ acpi_hp_identify(driver_t *driver, device_t parent) if (device_find_child(parent, "acpi_hp", -1) != NULL) return; + /* Check BIOS GUID to see whether system is compatible. */ + if (!ACPI_WMI_PROVIDES_GUID_STRING(parent, + ACPI_HP_WMI_BIOS_GUID)) + return; + if (BUS_ADD_CHILD(parent, 0, "acpi_hp", -1) == NULL) device_printf(parent, "add acpi_hp child failed\n"); } @@ -476,7 +514,7 @@ acpi_hp_attach(device_t dev) sc->was_wwan_on_air = 0; sc->cmi_detail = 0; sc->cmi_order_size = -1; - sc->verbose = 0; + sc->verbose = bootverbose; memset(sc->cmi_order, 0, sizeof(sc->cmi_order)); sc->wmi_dev = device_get_parent(dev); @@ -513,13 +551,17 @@ acpi_hp_attach(device_t dev) sc->hpcmi_bufptr = -1; } + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, NULL) == 0) + sc->has_wireless = 1; + ACPI_SERIAL_BEGIN(hp); sc->sysctl_ctx = device_get_sysctl_ctx(dev); sc->sysctl_tree = device_get_sysctl_tree(dev); for (int i = 0; acpi_hp_sysctls[i].name != NULL; ++i) { arg = 0; - if ((!sc->has_notify && + if (((!sc->has_notify || !sc->has_wireless) && (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == @@ -577,8 +619,10 @@ acpi_hp_detach(device_t dev) if (sc->has_cmi && sc->hpcmi_open_pid != 0) return (EBUSY); - if (sc->has_notify) - ACPI_WMI_REMOVE_EVENT_HANDLER(dev, ACPI_HP_WMI_EVENT_GUID); + if (sc->has_notify) { + ACPI_WMI_REMOVE_EVENT_HANDLER(sc->wmi_dev, + ACPI_HP_WMI_EVENT_GUID); + } if (sc->has_cmi) { if (sc->hpcmi_bufptr != -1) { @@ -630,18 +674,21 @@ acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) switch (method) { case ACPI_HP_METHOD_WLAN_ENABLED: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &val)) + return (-EINVAL); val = ((val & HP_MASK_WLAN_ENABLED) != 0); break; case ACPI_HP_METHOD_WLAN_RADIO: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &val)) + return (-EINVAL); val = ((val & HP_MASK_WLAN_RADIO) != 0); break; case ACPI_HP_METHOD_WLAN_ON_AIR: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &val)) + return (-EINVAL); val = ((val & HP_MASK_WLAN_ON_AIR) != 0); break; case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: @@ -651,18 +698,21 @@ acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) val = sc->wlan_disable_if_radio_off; break; case ACPI_HP_METHOD_BLUETOOTH_ENABLED: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &val)) + return (-EINVAL); val = ((val & HP_MASK_BLUETOOTH_ENABLED) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_RADIO: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &val)) + return (-EINVAL); val = ((val & HP_MASK_BLUETOOTH_RADIO) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_ON_AIR: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &val)) + return (-EINVAL); val = ((val & HP_MASK_BLUETOOTH_ON_AIR) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: @@ -672,18 +722,21 @@ acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) val = sc->bluetooth_disable_if_radio_off; break; case ACPI_HP_METHOD_WWAN_ENABLED: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &val)) + return (-EINVAL); val = ((val & HP_MASK_WWAN_ENABLED) != 0); break; case ACPI_HP_METHOD_WWAN_RADIO: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &val)) + return (-EINVAL); val = ((val & HP_MASK_WWAN_RADIO) != 0); break; case ACPI_HP_METHOD_WWAN_ON_AIR: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0, &val)) + return (-EINVAL); val = ((val & HP_MASK_WWAN_ON_AIR) != 0); break; case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: @@ -693,20 +746,24 @@ acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) val = sc->wwan_disable_if_radio_off; break; case ACPI_HP_METHOD_ALS: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_ALS_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_ALS_COMMAND, 0, 0, &val)) + return (-EINVAL); break; case ACPI_HP_METHOD_DISPLAY: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_DISPLAY_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_DISPLAY_COMMAND, 0, 0, &val)) + return (-EINVAL); break; case ACPI_HP_METHOD_HDDTEMP: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_HDDTEMP_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_HDDTEMP_COMMAND, 0, 0, &val)) + return (-EINVAL); break; case ACPI_HP_METHOD_DOCK: - val = acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_DOCK_COMMAND, 0, 0); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_DOCK_COMMAND, 0, 0, &val)) + return (-EINVAL); break; case ACPI_HP_METHOD_CMI_DETAIL: val = sc->cmi_detail; @@ -732,9 +789,11 @@ acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg) if (arg != oldarg) { switch (method) { case ACPI_HP_METHOD_WLAN_ENABLED: - return (acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 1, - arg?0x101:0x100)); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, + arg?0x101:0x100, NULL)) + return (-EINVAL); + break; case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: sc->wlan_enable_if_radio_on = arg; acpi_hp_evaluate_auto_on_off(sc); @@ -744,9 +803,11 @@ acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg) acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_BLUETOOTH_ENABLED: - return (acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 1, - arg?0x202:0x200)); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, + arg?0x202:0x200, NULL)) + return (-EINVAL); + break; case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: sc->bluetooth_enable_if_radio_on = arg; acpi_hp_evaluate_auto_on_off(sc); @@ -756,9 +817,11 @@ acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg) acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WWAN_ENABLED: - return (acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_WIRELESS_COMMAND, 1, - arg?0x404:0x400)); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, + arg?0x404:0x400, NULL)) + return (-EINVAL); + break; case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: sc->wwan_enable_if_radio_on = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); @@ -768,9 +831,10 @@ acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg) acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_ALS: - return (acpi_hp_exec_wmi_command(sc->wmi_dev, - ACPI_HP_WMI_ALS_COMMAND, 1, - arg?1:0)); + if (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_ALS_COMMAND, 1, arg?1:0, NULL)) + return (-EINVAL); + break; case ACPI_HP_METHOD_CMI_DETAIL: sc->cmi_detail = arg; if ((arg & ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE) != @@ -806,26 +870,32 @@ acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context) ACPI_WMI_GET_EVENT_DATA(sc->wmi_dev, notify, &response); obj = (ACPI_OBJECT*) response.Pointer; if (obj && obj->Type == ACPI_TYPE_BUFFER && obj->Buffer.Length == 8) { - if (*((UINT8 *) obj->Buffer.Pointer) == 0x5) { + switch (*((UINT8 *) obj->Buffer.Pointer)) { + case ACPI_HP_EVENT_WIRELESS: acpi_hp_evaluate_auto_on_off(sc); + break; + default: + if (sc->verbose) { + device_printf(sc->dev, "Event %02x\n", + *((UINT8 *) obj->Buffer.Pointer)); + } + break; } } acpi_hp_free_buffer(&response); } static int -acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val) +acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, + int val, int *retval) { - UINT32 params[5] = { 0x55434553, - is_write?2:1, - command, - is_write?4:0, - val}; + UINT32 params[4+32] = { 0x55434553, is_write ? 2 : 1, + command, 4, val}; UINT32* result; ACPI_OBJECT *obj; ACPI_BUFFER in = { sizeof(params), ¶ms }; ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; - int retval; + int res; if (ACPI_FAILURE(ACPI_WMI_EVALUATE_CALL(wmi_dev, ACPI_HP_WMI_BIOS_GUID, 0, 0x3, &in, &out))) { @@ -838,13 +908,12 @@ acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val) return (-EINVAL); } result = (UINT32*) obj->Buffer.Pointer; - retval = result[2]; - if (result[1] > 0) { - retval = result[1]; - } + res = result[1]; + if (res == 0 && retval != NULL) + *retval = result[2]; acpi_hp_free_buffer(&out); - return (retval); + return (res); } static __inline char* @@ -909,81 +978,91 @@ acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, return (-EINVAL); } - if (obj->Package.Count >= 8 && - obj->Package.Elements[7].Type == ACPI_TYPE_INTEGER) { - valuebase = 8 + obj->Package.Elements[7].Integer.Value; + /* Check if first 6 bytes matches our expectations. */ + if (obj->Package.Count < 8 || + obj->Package.Elements[0].Type != ACPI_TYPE_STRING || + obj->Package.Elements[1].Type != ACPI_TYPE_STRING || + obj->Package.Elements[2].Type != ACPI_TYPE_STRING || + obj->Package.Elements[3].Type != ACPI_TYPE_INTEGER || + obj->Package.Elements[4].Type != ACPI_TYPE_INTEGER || + obj->Package.Elements[5].Type != ACPI_TYPE_INTEGER || + obj->Package.Elements[6].Type != ACPI_TYPE_INTEGER || + obj->Package.Elements[7].Type != ACPI_TYPE_INTEGER) { + acpi_hp_free_buffer(&out); + return (-EINVAL); } - /* check if this matches our expectations based on limited knowledge */ - if (valuebase > 7 && obj->Package.Count > valuebase + 1 && - obj->Package.Elements[0].Type == ACPI_TYPE_STRING && - obj->Package.Elements[1].Type == ACPI_TYPE_STRING && - obj->Package.Elements[2].Type == ACPI_TYPE_STRING && - obj->Package.Elements[3].Type == ACPI_TYPE_INTEGER && - obj->Package.Elements[4].Type == ACPI_TYPE_INTEGER && - obj->Package.Elements[5].Type == ACPI_TYPE_INTEGER && - obj->Package.Elements[6].Type == ACPI_TYPE_INTEGER && - obj->Package.Elements[valuebase].Type == ACPI_TYPE_STRING && - obj->Package.Elements[valuebase+1].Type == ACPI_TYPE_INTEGER && - obj->Package.Count > valuebase + - obj->Package.Elements[valuebase+1].Integer.Value - ) { - enumbase = valuebase + 1; - if (detail & ACPI_HP_CMI_DETAIL_PATHS) { - strlcat(outbuf, acpi_hp_get_string_from_object( - &obj->Package.Elements[2], string_buffer, size), - outsize); - outlen += 48; - while (strlen(outbuf) < outlen) - strlcat(outbuf, " ", outsize); - } + /* Skip prerequisites and optionally array. */ + valuebase = 8 + obj->Package.Elements[7].Integer.Value; + if (obj->Package.Count <= valuebase) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + if (obj->Package.Elements[valuebase].Type == ACPI_TYPE_INTEGER) + valuebase += 1 + obj->Package.Elements[valuebase].Integer.Value; + + /* Check if we have value and enum. */ + if (obj->Package.Count <= valuebase + 1 || + obj->Package.Elements[valuebase].Type != ACPI_TYPE_STRING || + obj->Package.Elements[valuebase+1].Type != ACPI_TYPE_INTEGER) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + enumbase = valuebase + 1; + if (obj->Package.Count <= valuebase + + obj->Package.Elements[enumbase].Integer.Value) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + + if (detail & ACPI_HP_CMI_DETAIL_PATHS) { strlcat(outbuf, acpi_hp_get_string_from_object( - &obj->Package.Elements[0], string_buffer, size), - outsize); - outlen += 43; + &obj->Package.Elements[2], string_buffer, size), outsize); + outlen += 48; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); - strlcat(outbuf, acpi_hp_get_string_from_object( - &obj->Package.Elements[valuebase], string_buffer, - size), - outsize); - outlen += 21; - while (strlen(outbuf) < outlen) - strlcat(outbuf, " ", outsize); - for (i = 0; i < strlen(outbuf); ++i) - if (outbuf[i] == '\\') - outbuf[i] = '/'; - if (detail & ACPI_HP_CMI_DETAIL_ENUMS) { - for (i = enumbase + 1; i < enumbase + 1 + - obj->Package.Elements[enumbase].Integer.Value; - ++i) { - acpi_hp_get_string_from_object( - &obj->Package.Elements[i], string_buffer, - size); - if (strlen(string_buffer) > 1 || - (strlen(string_buffer) == 1 && - string_buffer[0] != ' ')) { - if (has_enums) - strlcat(outbuf, "/", outsize); - else - strlcat(outbuf, " (", outsize); - strlcat(outbuf, string_buffer, outsize); - has_enums = 1; - } + } + strlcat(outbuf, acpi_hp_get_string_from_object( + &obj->Package.Elements[0], string_buffer, size), outsize); + outlen += 43; + while (strlen(outbuf) < outlen) + strlcat(outbuf, " ", outsize); + strlcat(outbuf, acpi_hp_get_string_from_object( + &obj->Package.Elements[valuebase], string_buffer, size), outsize); + outlen += 21; + while (strlen(outbuf) < outlen) + strlcat(outbuf, " ", outsize); + for (i = 0; i < strlen(outbuf); ++i) + if (outbuf[i] == '\\') + outbuf[i] = '/'; + if (detail & ACPI_HP_CMI_DETAIL_ENUMS) { + for (i = enumbase + 1; i < enumbase + 1 + + obj->Package.Elements[enumbase].Integer.Value; ++i) { + acpi_hp_get_string_from_object( + &obj->Package.Elements[i], string_buffer, size); + if (strlen(string_buffer) > 1 || + (strlen(string_buffer) == 1 && + string_buffer[0] != ' ')) { + if (has_enums) + strlcat(outbuf, "/", outsize); + else + strlcat(outbuf, " (", outsize); + strlcat(outbuf, string_buffer, outsize); + has_enums = 1; } } - if (has_enums) - strlcat(outbuf, ")", outsize); - if (detail & ACPI_HP_CMI_DETAIL_FLAGS) { - strlcat(outbuf, obj->Package.Elements[3].Integer.Value? - " [ReadOnly]":"", outsize); - strlcat(outbuf, obj->Package.Elements[4].Integer.Value? - "":" [NOUI]", outsize); - strlcat(outbuf, obj->Package.Elements[5].Integer.Value? - " [RPP]":"", outsize); - } - *sequence = (UINT32) obj->Package.Elements[6].Integer.Value; } + if (has_enums) + strlcat(outbuf, ")", outsize); + if (detail & ACPI_HP_CMI_DETAIL_FLAGS) { + strlcat(outbuf, obj->Package.Elements[3].Integer.Value ? + " [ReadOnly]" : "", outsize); + strlcat(outbuf, obj->Package.Elements[4].Integer.Value ? + "" : " [NOUI]", outsize); + strlcat(outbuf, obj->Package.Elements[5].Integer.Value ? + " [RPP]" : "", outsize); + } + *sequence = (UINT32) obj->Package.Elements[6].Integer.Value; acpi_hp_free_buffer(&out); return (0); From b75f7c6cfb716b28a93f249bb4997792652c3185 Mon Sep 17 00:00:00 2001 From: Svatopluk Kraus Date: Sat, 12 Nov 2016 17:03:21 +0000 Subject: [PATCH 030/204] Always call PHYS_TO_VM_PAGE() in is_managed(). Fast road for addresses under first_page cannot be taken as this variable is connected only to vm_page_array segment. There could be more segments in system like the ones for various fictitious page ranges. These can be situated under vm_page_array segment and so, they could be skipped before this fix. However, as far as I know, there is no report associated with it. While here, the return type of this function is changed from boolean_t to bool type. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8502 --- sys/arm/arm/pmap-v6.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 5ac2fa8fd41..04ce72ab28e 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -2739,21 +2739,15 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, /* * Is given page managed? */ -static __inline boolean_t +static __inline bool is_managed(vm_paddr_t pa) { - vm_offset_t pgnum; vm_page_t m; - pgnum = atop(pa); - if (pgnum >= first_page) { - m = PHYS_TO_VM_PAGE(pa); - if (m == NULL) - return (FALSE); - if ((m->oflags & VPO_UNMANAGED) == 0) - return (TRUE); - } - return (FALSE); + m = PHYS_TO_VM_PAGE(pa); + if (m == NULL) + return (false); + return ((m->oflags & VPO_UNMANAGED) == 0); } static __inline boolean_t From 06a9e29e755e017248494deae372ce3ffb9ee0b9 Mon Sep 17 00:00:00 2001 From: Svatopluk Kraus Date: Sat, 12 Nov 2016 17:24:41 +0000 Subject: [PATCH 031/204] The return type of is_managed() was changed from boolean_t to bool type in r308569. Now, propagate this change further for consistency sake. MFC after: 2 weeks --- sys/arm/arm/pmap-v6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 04ce72ab28e..805a09d5f13 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -2750,14 +2750,14 @@ is_managed(vm_paddr_t pa) return ((m->oflags & VPO_UNMANAGED) == 0); } -static __inline boolean_t +static __inline bool pte1_is_managed(pt1_entry_t pte1) { return (is_managed(pte1_pa(pte1))); } -static __inline boolean_t +static __inline bool pte2_is_managed(pt2_entry_t pte2) { @@ -6097,7 +6097,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *locked_pa) pt1_entry_t *pte1p, pte1; pt2_entry_t *pte2p, pte2; vm_paddr_t pa; - boolean_t managed; + bool managed; int val; PMAP_LOCK(pmap); @@ -6124,7 +6124,7 @@ retry: if (pte2 & PTE2_A) val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER; } else { - managed = FALSE; + managed = false; val = 0; } if ((val & (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER)) != From a14f9888d9c83fcd70df6dfd41ce41e4f5b2e7d8 Mon Sep 17 00:00:00 2001 From: Andriy Voskoboinyk Date: Sat, 12 Nov 2016 17:58:37 +0000 Subject: [PATCH 032/204] rtwn: enable 11n support for RTL8188CE. - Increase Rx buffer size from MCLBYTES to MJUMPAGESIZE. - Provide an additional defragmentation routine for frames larger than MCLBYTES; that is required by A-MSDU / Atheros Fast-Frames support to work with current Tx path implementation. Enabled features list for RTL8188CE: - Atheros Fast-Frames; - A-MPDU (Tx / Rx); - A-MSDU (Tx / Rx; 4k only); - Short Guard Interval. Tested with: - RTL8188CE (STA+AP) + RTL8821AU (STA). - RTL8188CE (STA) + RTL8188CUS (AP). Relnotes: yes --- share/man/man4/rtwn_pci.4 | 5 +-- sys/dev/rtwn/if_rtwn_tx.h | 2 + sys/dev/rtwn/pci/rtwn_pci_attach.c | 19 +++++---- sys/dev/rtwn/pci/rtwn_pci_rx.c | 52 +++++++++++++++++++----- sys/dev/rtwn/pci/rtwn_pci_tx.c | 33 ++++++++++++++- sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c | 14 +++---- sys/dev/rtwn/usb/rtwn_usb_rx.c | 3 +- 7 files changed, 94 insertions(+), 34 deletions(-) diff --git a/share/man/man4/rtwn_pci.4 b/share/man/man4/rtwn_pci.4 index 71fa1669233..f86a6968939 100644 --- a/share/man/man4/rtwn_pci.4 +++ b/share/man/man4/rtwn_pci.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd October 17, 2016 +.Dd November 12, 2016 .Dt RTWN_PCI 4 .Os .Sh NAME @@ -58,6 +58,3 @@ It operates in the 2GHz spectrum only. .Xr rtwnfw 4 , .Xr rtwn_usb 4 , .Xr pci 4 -.Sh CAVEATS -Most 802.11 capabilities were turned off; some more testing -is required to re-enable them. diff --git a/sys/dev/rtwn/if_rtwn_tx.h b/sys/dev/rtwn/if_rtwn_tx.h index d38a8550f2c..e02fb56499d 100644 --- a/sys/dev/rtwn/if_rtwn_tx.h +++ b/sys/dev/rtwn/if_rtwn_tx.h @@ -20,7 +20,9 @@ #define IF_RTWN_TX_H void rtwn_drain_mbufq(struct rtwn_softc *); +#ifdef IEEE80211_SUPPORT_SUPERG void rtwn_ff_flush_all(struct rtwn_softc *, union sec_param *); +#endif int rtwn_transmit(struct ieee80211com *, struct mbuf *); void rtwn_start(struct rtwn_softc *); int rtwn_raw_xmit(struct ieee80211_node *, struct mbuf *, diff --git a/sys/dev/rtwn/pci/rtwn_pci_attach.c b/sys/dev/rtwn/pci/rtwn_pci_attach.c index 00dcacc50f5..e021c401ad3 100644 --- a/sys/dev/rtwn/pci/rtwn_pci_attach.c +++ b/sys/dev/rtwn/pci/rtwn_pci_attach.c @@ -149,8 +149,8 @@ rtwn_pci_alloc_rx_list(struct rtwn_softc *sc) /* Create RX buffer DMA tag. */ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, - 1, MCLBYTES, 0, NULL, NULL, &rx_ring->data_dmat); + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + MJUMPAGESIZE, 1, MJUMPAGESIZE, 0, NULL, NULL, &rx_ring->data_dmat); if (error != 0) { device_printf(sc->sc_dev, "could not create rx buf DMA tag\n"); goto fail; @@ -166,7 +166,8 @@ rtwn_pci_alloc_rx_list(struct rtwn_softc *sc) goto fail; } - rx_data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + rx_data->m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, + MJUMPAGESIZE); if (rx_data->m == NULL) { device_printf(sc->sc_dev, "could not allocate rx mbuf\n"); @@ -175,8 +176,8 @@ rtwn_pci_alloc_rx_list(struct rtwn_softc *sc) } error = bus_dmamap_load(rx_ring->data_dmat, rx_data->map, - mtod(rx_data->m, void *), MCLBYTES, rtwn_pci_dma_map_addr, - &rx_data->paddr, BUS_DMA_NOWAIT); + mtod(rx_data->m, void *), MJUMPAGESIZE, + rtwn_pci_dma_map_addr, &rx_data->paddr, BUS_DMA_NOWAIT); if (error != 0) { device_printf(sc->sc_dev, "could not load rx buf DMA map"); @@ -184,7 +185,7 @@ rtwn_pci_alloc_rx_list(struct rtwn_softc *sc) } rtwn_pci_setup_rx_desc(pc, &rx_ring->desc[i], rx_data->paddr, - MCLBYTES, i); + MJUMPAGESIZE, i); } rx_ring->cur = 0; @@ -206,7 +207,7 @@ rtwn_pci_reset_rx_list(struct rtwn_softc *sc) for (i = 0; i < RTWN_PCI_RX_LIST_COUNT; i++) { rx_data = &rx_ring->rx_data[i]; rtwn_pci_setup_rx_desc(pc, &rx_ring->desc[i], - rx_data->paddr, MCLBYTES, i); + rx_data->paddr, MJUMPAGESIZE, i); } rx_ring->cur = 0; } @@ -287,8 +288,8 @@ rtwn_pci_alloc_tx_list(struct rtwn_softc *sc, int qid) BUS_DMASYNC_PREWRITE); error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, - BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, - 1, MCLBYTES, 0, NULL, NULL, &tx_ring->data_dmat); + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + MJUMPAGESIZE, 1, MJUMPAGESIZE, 0, NULL, NULL, &tx_ring->data_dmat); if (error != 0) { device_printf(sc->sc_dev, "could not create tx buf DMA tag\n"); goto fail; diff --git a/sys/dev/rtwn/pci/rtwn_pci_rx.c b/sys/dev/rtwn/pci/rtwn_pci_rx.c index df375a19760..00f7409efeb 100644 --- a/sys/dev/rtwn/pci/rtwn_pci_rx.c +++ b/sys/dev/rtwn/pci/rtwn_pci_rx.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -120,7 +121,7 @@ rtwn_pci_rx_frame(struct rtwn_softc *sc, struct r92ce_rx_stat *rx_desc, pktlen = MS(rxdw0, R92C_RXDW0_PKTLEN); if (__predict_false(pktlen < sizeof(struct ieee80211_frame_ack) || - pktlen > MCLBYTES)) { + pktlen > MJUMPAGESIZE)) { RTWN_DPRINTF(sc, RTWN_DEBUG_RECV, "%s: frame is too short/long: %d\n", __func__, pktlen); goto fail; @@ -129,7 +130,7 @@ rtwn_pci_rx_frame(struct rtwn_softc *sc, struct r92ce_rx_stat *rx_desc, infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8; shift = MS(rxdw0, R92C_RXDW0_SHIFT); - m1 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + m1 = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (__predict_false(m1 == NULL)) { device_printf(sc->sc_dev, "%s: could not allocate RX mbuf\n", __func__); @@ -139,20 +140,20 @@ rtwn_pci_rx_frame(struct rtwn_softc *sc, struct r92ce_rx_stat *rx_desc, bus_dmamap_unload(ring->data_dmat, rx_data->map); error = bus_dmamap_load(ring->data_dmat, rx_data->map, mtod(m1, void *), - MCLBYTES, rtwn_pci_dma_map_addr, &rx_data->paddr, 0); + MJUMPAGESIZE, rtwn_pci_dma_map_addr, &rx_data->paddr, 0); if (error != 0) { m_freem(m1); error = bus_dmamap_load(ring->data_dmat, rx_data->map, - mtod(rx_data->m, void *), MCLBYTES, rtwn_pci_dma_map_addr, - &rx_data->paddr, BUS_DMA_NOWAIT); + mtod(rx_data->m, void *), MJUMPAGESIZE, + rtwn_pci_dma_map_addr, &rx_data->paddr, BUS_DMA_NOWAIT); if (error != 0) panic("%s: could not load old RX mbuf", device_get_name(sc->sc_dev)); /* Physical address may have changed. */ - rtwn_pci_setup_rx_desc(pc, rx_desc, rx_data->paddr, MCLBYTES, - desc_idx); + rtwn_pci_setup_rx_desc(pc, rx_desc, rx_data->paddr, + MJUMPAGESIZE, desc_idx); goto fail; } @@ -169,7 +170,7 @@ rtwn_pci_rx_frame(struct rtwn_softc *sc, struct r92ce_rx_stat *rx_desc, __func__, pktlen, infosz, shift, rssi); /* Update RX descriptor. */ - rtwn_pci_setup_rx_desc(pc, rx_desc, rx_data->paddr, MCLBYTES, + rtwn_pci_setup_rx_desc(pc, rx_desc, rx_data->paddr, MJUMPAGESIZE, desc_idx); /* Send the frame to the 802.11 layer. */ @@ -222,6 +223,8 @@ rtwn_pci_tx_done(struct rtwn_softc *sc, int qid) data->ni = NULL; ring->queued--; + KASSERT(ring->queued >= 0, + ("ring->queued (qid %d) underflow!\n", qid)); } else m_freem(data->m); @@ -235,9 +238,27 @@ rtwn_pci_tx_done(struct rtwn_softc *sc, int qid) #endif } - if (ring->queued < (RTWN_PCI_TX_LIST_COUNT - 1)) + if ((sc->qfullmsk & (1 << qid)) != 0 && + ring->queued < (RTWN_PCI_TX_LIST_COUNT - 1)) { sc->qfullmsk &= ~(1 << qid); - rtwn_start(sc); + rtwn_start(sc); + } + +#ifdef IEEE80211_SUPPORT_SUPERG + /* + * If the TX active queue drops below a certain + * threshold, ensure we age fast-frames out so they're + * transmitted. + */ + if (sc->sc_ratectl != RTWN_RATECTL_NET80211 && ring->queued <= 1) { + /* + * XXX TODO: just make this a callout timer schedule + * so we can flush the FF staging queue if we're + * approaching idle. + */ + rtwn_cmd_sleepable(sc, NULL, 0, rtwn_ff_flush_all); + } +#endif } static void @@ -261,6 +282,17 @@ rtwn_pci_rx_done(struct rtwn_softc *sc) ring->cur = (ring->cur + 1) % RTWN_PCI_RX_LIST_COUNT; } + + /* Finished receive; age anything left on the FF queue by a little bump */ + /* + * XXX TODO: just make this a callout timer schedule so we can + * flush the FF staging queue if we're approaching idle. + */ +#ifdef IEEE80211_SUPPORT_SUPERG + if (!(sc->sc_flags & RTWN_FW_LOADED) || + sc->sc_ratectl != RTWN_RATECTL_NET80211) + rtwn_cmd_sleepable(sc, NULL, 0, rtwn_ff_flush_all); +#endif } void diff --git a/sys/dev/rtwn/pci/rtwn_pci_tx.c b/sys/dev/rtwn/pci/rtwn_pci_tx.c index d3e18083fdd..b450e4ee9f6 100644 --- a/sys/dev/rtwn/pci/rtwn_pci_tx.c +++ b/sys/dev/rtwn/pci/rtwn_pci_tx.c @@ -58,6 +58,37 @@ __FBSDID("$FreeBSD$"); #include +static struct mbuf * +rtwn_mbuf_defrag(struct mbuf *m0, int how) +{ + struct mbuf *m = NULL; + + KASSERT(m0->m_flags & M_PKTHDR, + ("M_PKTHDR flag is absent (m %p)!", m0)); + + /* NB: we need _exactly_ one mbuf (no less, no more). */ + if (m0->m_pkthdr.len > MJUMPAGESIZE) { + /* XXX MJUM9BYTES? */ + return (NULL); + } else if (m0->m_pkthdr.len > MCLBYTES) { + m = m_getjcl(how, MT_DATA, M_PKTHDR, MJUMPAGESIZE); + if (m == NULL) + return (NULL); + + if (m_dup_pkthdr(m, m0, how) == 0) { + m_freem(m); + return (NULL); + } + + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m->m_len = m->m_pkthdr.len; + m_freem(m0); + + return (m); + } else + return (m_defrag(m0, how)); +} + static int rtwn_pci_tx_start_frame(struct rtwn_softc *sc, struct ieee80211_node *ni, struct mbuf *m, uint8_t *tx_desc, uint8_t type) @@ -114,7 +145,7 @@ rtwn_pci_tx_start_frame(struct rtwn_softc *sc, struct ieee80211_node *ni, if (error != 0) { struct mbuf *mnew; - mnew = m_defrag(m, M_NOWAIT); + mnew = rtwn_mbuf_defrag(m, M_NOWAIT); if (mnew == NULL) { device_printf(sc->sc_dev, "can't defragment mbuf\n"); return (ENOBUFS); diff --git a/sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c b/sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c index 65e98a0399c..f38782fced6 100644 --- a/sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c +++ b/sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c @@ -138,15 +138,11 @@ r92ce_adj_devcaps(struct rtwn_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; - /* XXX TODO: test everything that removed here before enabling. */ - /* XX do NOT enable PMGT until RSVD_PAGE command will not be fixed. */ - ic->ic_caps &= ~( - IEEE80211_C_PMGT /* check null frame / device usability */ - | IEEE80211_C_SWAMSDUTX - | IEEE80211_C_FF - ); - - ic->ic_htcaps = 0; + /* + * XXX do NOT enable PMGT until RSVD_PAGE command + * will not be tested / fixed + HRPWM register must be set too. + */ + ic->ic_caps &= ~IEEE80211_C_PMGT; } void diff --git a/sys/dev/rtwn/usb/rtwn_usb_rx.c b/sys/dev/rtwn/usb/rtwn_usb_rx.c index 8c6aa168679..f15d6c66252 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_rx.c +++ b/sys/dev/rtwn/usb/rtwn_usb_rx.c @@ -326,7 +326,8 @@ finish: * flush the FF staging queue if we're approaching idle. */ #ifdef IEEE80211_SUPPORT_SUPERG - if (!(sc->sc_flags & RTWN_FW_LOADED)) + if (!(sc->sc_flags & RTWN_FW_LOADED) || + sc->sc_ratectl != RTWN_RATECTL_NET80211) rtwn_cmd_sleepable(sc, NULL, 0, rtwn_ff_flush_all); #endif From 7232d69b0b5f1b49ed21ea51db037c007544d089 Mon Sep 17 00:00:00 2001 From: Konrad Witaszczyk Date: Sat, 12 Nov 2016 18:04:03 +0000 Subject: [PATCH 033/204] Add myself (def) as a src committer and pjd as my mentor. Approved by: pjd (mentor) --- share/misc/committers-src.dot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index bab00b0a485..78958bd3c61 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -143,6 +143,7 @@ csjp [label="Christian S.J. Peron\ncsjp@FreeBSD.org\n2004/05/04"] das [label="David Schultz\ndas@FreeBSD.org\n2003/02/21"] davide [label="Davide Italiano\ndavide@FreeBSD.org\n2012/01/27"] dchagin [label="Dmitry Chagin\ndchagin@FreeBSD.org\n2009/02/28"] +def [label="Konrad Witaszczyk\ndef@FreeBSD.org\n2016/11/02"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2004/09/14"] des [label="Dag-Erling Smorgrav\ndes@FreeBSD.org\n1998/04/03"] dfr [label="Doug Rabson\ndfr@FreeBSD.org\n????/??/??"] @@ -683,6 +684,7 @@ philip -> kp phk -> jkoshy phk -> mux +pjd -> def pjd -> kib pjd -> lulf pjd -> oshogbo From bfcd23a946eaa2ff5d38c94650051f4ef87764cd Mon Sep 17 00:00:00 2001 From: Gavin Atkinson Date: Sat, 12 Nov 2016 18:33:56 +0000 Subject: [PATCH 034/204] iwm: If firmware load fails during init via iwm_preinit() we bail out before calling ieee80211_ifattach() so the taskqueue hasn't been initialized. Don't try to drain it, we'll panic. Looks like this issue was introduced in r303326. Reviewed by: avos, sbruno, adrian Differential Revision: https://reviews.freebsd.org/D8499 --- sys/dev/iwm/if_iwm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index 854c9e5a697..12b38d0f7b5 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -6192,7 +6192,8 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211) device_t dev = sc->sc_dev; int i; - ieee80211_draintask(&sc->sc_ic, &sc->sc_es_task); + if (do_net80211) + ieee80211_draintask(&sc->sc_ic, &sc->sc_es_task); callout_drain(&sc->sc_led_blink_to); callout_drain(&sc->sc_watchdog_to); From 80f0a89c6230bf0845df5a957956d37cb6d52e24 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sat, 12 Nov 2016 18:57:38 +0000 Subject: [PATCH 035/204] Do not report error on close even if we have no paths left. MFC after: 2 weeks --- sys/geom/multipath/g_multipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c index 6644532d02e..b461747bf35 100644 --- a/sys/geom/multipath/g_multipath.c +++ b/sys/geom/multipath/g_multipath.c @@ -470,7 +470,7 @@ g_multipath_access(struct g_provider *pp, int dr, int dw, int de) gp = pp->geom; /* Error used if we have no valid consumers. */ - error = ENXIO; + error = (dr > 0 || dw > 0 || de > 0) ? ENXIO : 0; LIST_FOREACH(cp, &gp->consumer, consumer) { if (cp->index & MP_WITHER) From ab607f28e369ffc0eaba5a47dd812c0b77be6c85 Mon Sep 17 00:00:00 2001 From: Ryan Stone Date: Sat, 12 Nov 2016 19:03:23 +0000 Subject: [PATCH 036/204] Don't read if_counters with if_addr_lock held Calling into an ifnet implementation with the if_addr_lock already held can cause a LOR and potentially a deadlock, as ifnet implementations typically can take the if_addr_lock after their own locks during configuration. Refactor a sysctl handler that was violating this to read if_counter data in a temporary buffer before the if_addr_lock is taken, and then copying the data in its final location later, when the if_addr_lock is held. PR: 194109 Reported by: Jean-Sebastien Pedron MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8498 Reviewed by: sbruno --- sys/net/rtsock.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 91158b0fccc..ca89002d306 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1566,8 +1566,8 @@ sysctl_dumpentry(struct radix_node *rn, void *vw) } static int -sysctl_iflist_ifml(struct ifnet *ifp, struct rt_addrinfo *info, - struct walkarg *w, int len) +sysctl_iflist_ifml(struct ifnet *ifp, const struct if_data *src_ifd, + struct rt_addrinfo *info, struct walkarg *w, int len) { struct if_msghdrl *ifm; struct if_data *ifd; @@ -1598,14 +1598,14 @@ sysctl_iflist_ifml(struct ifnet *ifp, struct rt_addrinfo *info, ifd = &ifm->ifm_data; } - if_data_copy(ifp, ifd); + memcpy(ifd, src_ifd, sizeof(*ifd)); return (SYSCTL_OUT(w->w_req, (caddr_t)ifm, len)); } static int -sysctl_iflist_ifm(struct ifnet *ifp, struct rt_addrinfo *info, - struct walkarg *w, int len) +sysctl_iflist_ifm(struct ifnet *ifp, const struct if_data *src_ifd, + struct rt_addrinfo *info, struct walkarg *w, int len) { struct if_msghdr *ifm; struct if_data *ifd; @@ -1630,7 +1630,7 @@ sysctl_iflist_ifm(struct ifnet *ifp, struct rt_addrinfo *info, ifd = &ifm->ifm_data; } - if_data_copy(ifp, ifd); + memcpy(ifd, src_ifd, sizeof(*ifd)); return (SYSCTL_OUT(w->w_req, (caddr_t)ifm, len)); } @@ -1705,15 +1705,18 @@ sysctl_iflist(int af, struct walkarg *w) { struct ifnet *ifp; struct ifaddr *ifa; + struct if_data ifd; struct rt_addrinfo info; int len, error = 0; struct sockaddr_storage ss; bzero((caddr_t)&info, sizeof(info)); + bzero(&ifd, sizeof(ifd)); IFNET_RLOCK_NOSLEEP(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (w->w_arg && w->w_arg != ifp->if_index) continue; + if_data_copy(ifp, &ifd); IF_ADDR_RLOCK(ifp); ifa = ifp->if_addr; info.rti_info[RTAX_IFP] = ifa->ifa_addr; @@ -1723,9 +1726,11 @@ sysctl_iflist(int af, struct walkarg *w) info.rti_info[RTAX_IFP] = NULL; if (w->w_req && w->w_tmem) { if (w->w_op == NET_RT_IFLISTL) - error = sysctl_iflist_ifml(ifp, &info, w, len); + error = sysctl_iflist_ifml(ifp, &ifd, &info, w, + len); else - error = sysctl_iflist_ifm(ifp, &info, w, len); + error = sysctl_iflist_ifm(ifp, &ifd, &info, w, + len); if (error) goto done; } From f699532fb5b2c7b2445404b62f87bcd436195e5a Mon Sep 17 00:00:00 2001 From: Oleksandr Tymoshenko Date: Sat, 12 Nov 2016 19:05:41 +0000 Subject: [PATCH 037/204] [rpi_ft5406] Add missing dependency on mbox_if.h Submitted by: hselasky MFC after: ASAP --- sys/modules/rpi_ft5406/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/rpi_ft5406/Makefile b/sys/modules/rpi_ft5406/Makefile index 2360ceda44a..3a1bbf5762a 100644 --- a/sys/modules/rpi_ft5406/Makefile +++ b/sys/modules/rpi_ft5406/Makefile @@ -5,6 +5,6 @@ KMOD= rpi_ft5406 SRCS= bcm2835_ft5406.c -SRCS+= bus_if.h device_if.h ofw_bus_if.h +SRCS+= bus_if.h device_if.h mbox_if.h ofw_bus_if.h .include From 375c8b20dc197f3055792d1e5a685788c21e2f60 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sat, 12 Nov 2016 19:26:12 +0000 Subject: [PATCH 038/204] Remove the DTrace printt and typeref actions. These are FreeBSD-specific and were added in r178576 to provide the ability to pretty-print instances of compound types. However, the print action has long since been augmented to provide this functionality with a simpler interface. Discussed with: gnn Differential Revision: https://reviews.freebsd.org/D8478 --- .../opensolaris/lib/libdtrace/common/dt_cc.c | 43 --- .../opensolaris/lib/libdtrace/common/dt_cg.c | 45 --- .../lib/libdtrace/common/dt_consume.c | 324 +----------------- .../lib/libdtrace/common/dt_errtags.h | 2 - .../lib/libdtrace/common/dt_impl.h | 1 - .../lib/libdtrace/common/dt_open.c | 4 - .../opensolaris/uts/common/dtrace/dtrace.c | 90 +---- .../opensolaris/uts/common/sys/dtrace.h | 3 +- 8 files changed, 16 insertions(+), 496 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c index ef10e0bc7e9..1216a389e23 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c @@ -1057,46 +1057,6 @@ dt_action_printm(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) ap->dtad_difo->dtdo_rtype.dtdt_size = size->dn_value + sizeof(uintptr_t); } -static void -dt_action_printt(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) -{ - dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp); - - dt_node_t *size = dnp->dn_args; - dt_node_t *addr = dnp->dn_args->dn_list; - - char n[DT_TYPE_NAMELEN]; - - if (dt_node_is_posconst(size) == 0) { - dnerror(size, D_PRINTT_SIZE, "printt( ) argument #1 must " - "be a non-zero positive integral constant expression\n"); - } - - if (addr == NULL || addr->dn_kind != DT_NODE_FUNC || - addr->dn_ident != dt_idhash_lookup(dtp->dt_globals, "typeref")) { - dnerror(addr, D_PRINTT_ADDR, - "printt( ) argument #2 is incompatible with " - "prototype:\n\tprototype: typeref()\n" - "\t argument: %s\n", - dt_node_type_name(addr, n, sizeof (n))); - } - - dt_cg(yypcb, addr); - ap->dtad_difo = dt_as(yypcb); - ap->dtad_kind = DTRACEACT_PRINTT; - - ap->dtad_difo->dtdo_rtype.dtdt_flags |= DIF_TF_BYREF; - - /* - * Allow additional buffer space for the data size, type size, - * type string length and a stab in the dark (32 bytes) for the - * type string. The type string is part of the typeref() that - * this action references. - */ - ap->dtad_difo->dtdo_rtype.dtdt_size = size->dn_value + 3 * sizeof(uintptr_t) + 32; - -} - static void dt_action_commit(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) { @@ -1169,9 +1129,6 @@ dt_compile_fun(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) case DT_ACT_PRINTM: dt_action_printm(dtp, dnp->dn_expr, sdp); break; - case DT_ACT_PRINTT: - dt_action_printt(dtp, dnp->dn_expr, sdp); - break; case DT_ACT_RAISE: dt_action_raise(dtp, dnp->dn_expr, sdp); break; diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c index e748ff2b3ad..e4580a8ab34 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c @@ -1353,40 +1353,6 @@ dt_cg_inline(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp) } } -static void -dt_cg_func_typeref(dtrace_hdl_t *dtp, dt_node_t *dnp) -{ - dtrace_typeinfo_t dtt; - dt_node_t *addr = dnp->dn_args; - dt_node_t *nelm = addr->dn_list; - dt_node_t *strp = nelm->dn_list; - dt_node_t *typs = strp->dn_list; - char buf[DT_TYPE_NAMELEN]; - char *p; - - ctf_type_name(addr->dn_ctfp, addr->dn_type, buf, sizeof (buf)); - - /* - * XXX Hack alert! XXX - * The prototype has two dummy args that we munge to represent - * the type string and the type size. - * - * Yes, I hear your grumble, but it works for now. We'll come - * up with a more elegant implementation later. :-) - */ - free(strp->dn_string); - - if ((p = strchr(buf, '*')) != NULL) - *p = '\0'; - - strp->dn_string = strdup(buf); - - if (dtrace_lookup_by_type(dtp, DTRACE_OBJ_EVERY, buf, &dtt) < 0) - return; - - typs->dn_value = ctf_type_size(dtt.dtt_ctfp, dtt.dtt_type); -} - typedef struct dt_xlmemb { dt_ident_t *dtxl_idp; /* translated ident */ dt_irlist_t *dtxl_dlp; /* instruction list */ @@ -2002,8 +1968,6 @@ dt_cg_node(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp) switch (dnp->dn_kind) { case DT_NODE_FUNC: { - dtrace_hdl_t *dtp = yypcb->pcb_hdl; - if ((idp = dnp->dn_ident)->di_kind != DT_IDENT_FUNC) { dnerror(dnp, D_CG_EXPR, "%s %s( ) may not be " "called from a D expression (D program " @@ -2011,15 +1975,6 @@ dt_cg_node(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp) dt_idkind_name(idp->di_kind), idp->di_name); } - switch (idp->di_id) { - case DIF_SUBR_TYPEREF: - dt_cg_func_typeref(dtp, dnp); - break; - - default: - break; - } - dt_cg_arglist(dnp->dn_ident, dnp->dn_args, dlp, drp); dnp->dn_reg = dt_regset_alloc(drp); diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c index 04c022b7ad0..de574a33026 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c @@ -1537,314 +1537,6 @@ dt_print_umod(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr) return (err); } -int -dt_print_memory(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr) -{ - int quiet = (dtp->dt_options[DTRACEOPT_QUIET] != DTRACEOPT_UNSET); - size_t nbytes = *((uintptr_t *) addr); - - return (dt_print_bytes(dtp, fp, addr + sizeof(uintptr_t), - nbytes, 50, quiet, 1)); -} - -typedef struct dt_type_cbdata { - dtrace_hdl_t *dtp; - dtrace_typeinfo_t dtt; - caddr_t addr; - caddr_t addrend; - const char *name; - int f_type; - int indent; - int type_width; - int name_width; - FILE *fp; -} dt_type_cbdata_t; - -static int dt_print_type_data(dt_type_cbdata_t *, ctf_id_t); - -static int -dt_print_type_member(const char *name, ctf_id_t type, ulong_t off, void *arg) -{ - dt_type_cbdata_t cbdata; - dt_type_cbdata_t *cbdatap = arg; - ssize_t ssz; - - if ((ssz = ctf_type_size(cbdatap->dtt.dtt_ctfp, type)) <= 0) - return (0); - - off /= 8; - - cbdata = *cbdatap; - cbdata.name = name; - cbdata.addr += off; - cbdata.addrend = cbdata.addr + ssz; - - return (dt_print_type_data(&cbdata, type)); -} - -static int -dt_print_type_width(const char *name, ctf_id_t type, ulong_t off, void *arg) -{ - char buf[DT_TYPE_NAMELEN]; - char *p; - dt_type_cbdata_t *cbdatap = arg; - size_t sz = strlen(name); - - ctf_type_name(cbdatap->dtt.dtt_ctfp, type, buf, sizeof (buf)); - - if ((p = strchr(buf, '[')) != NULL) - p[-1] = '\0'; - else - p = ""; - - sz += strlen(p); - - if (sz > cbdatap->name_width) - cbdatap->name_width = sz; - - sz = strlen(buf); - - if (sz > cbdatap->type_width) - cbdatap->type_width = sz; - - return (0); -} - -static int -dt_print_type_data(dt_type_cbdata_t *cbdatap, ctf_id_t type) -{ - caddr_t addr = cbdatap->addr; - caddr_t addrend = cbdatap->addrend; - char buf[DT_TYPE_NAMELEN]; - char *p; - int cnt = 0; - uint_t kind = ctf_type_kind(cbdatap->dtt.dtt_ctfp, type); - ssize_t ssz = ctf_type_size(cbdatap->dtt.dtt_ctfp, type); - - ctf_type_name(cbdatap->dtt.dtt_ctfp, type, buf, sizeof (buf)); - - if ((p = strchr(buf, '[')) != NULL) - p[-1] = '\0'; - else - p = ""; - - if (cbdatap->f_type) { - int type_width = roundup(cbdatap->type_width + 1, 4); - int name_width = roundup(cbdatap->name_width + 1, 4); - - name_width -= strlen(cbdatap->name); - - dt_printf(cbdatap->dtp, cbdatap->fp, "%*s%-*s%s%-*s = ",cbdatap->indent * 4,"",type_width,buf,cbdatap->name,name_width,p); - } - - while (addr < addrend) { - dt_type_cbdata_t cbdata; - ctf_arinfo_t arinfo; - ctf_encoding_t cte; - uintptr_t *up; - void *vp = addr; - cbdata = *cbdatap; - cbdata.name = ""; - cbdata.addr = addr; - cbdata.addrend = addr + ssz; - cbdata.f_type = 0; - cbdata.indent++; - cbdata.type_width = 0; - cbdata.name_width = 0; - - if (cnt > 0) - dt_printf(cbdatap->dtp, cbdatap->fp, "%*s", cbdatap->indent * 4,""); - - switch (kind) { - case CTF_K_INTEGER: - if (ctf_type_encoding(cbdatap->dtt.dtt_ctfp, type, &cte) != 0) - return (-1); - if ((cte.cte_format & CTF_INT_SIGNED) != 0) - switch (cte.cte_bits) { - case 8: - if (isprint(*((char *) vp))) - dt_printf(cbdatap->dtp, cbdatap->fp, "'%c', ", *((char *) vp)); - dt_printf(cbdatap->dtp, cbdatap->fp, "%d (0x%x);\n", *((char *) vp), *((char *) vp)); - break; - case 16: - dt_printf(cbdatap->dtp, cbdatap->fp, "%hd (0x%hx);\n", *((short *) vp), *((u_short *) vp)); - break; - case 32: - dt_printf(cbdatap->dtp, cbdatap->fp, "%d (0x%x);\n", *((int *) vp), *((u_int *) vp)); - break; - case 64: - dt_printf(cbdatap->dtp, cbdatap->fp, "%jd (0x%jx);\n", *((long long *) vp), *((unsigned long long *) vp)); - break; - default: - dt_printf(cbdatap->dtp, cbdatap->fp, "CTF_K_INTEGER: format %x offset %u bits %u\n",cte.cte_format,cte.cte_offset,cte.cte_bits); - break; - } - else - switch (cte.cte_bits) { - case 8: - dt_printf(cbdatap->dtp, cbdatap->fp, "%u (0x%x);\n", *((uint8_t *) vp) & 0xff, *((uint8_t *) vp) & 0xff); - break; - case 16: - dt_printf(cbdatap->dtp, cbdatap->fp, "%hu (0x%hx);\n", *((u_short *) vp), *((u_short *) vp)); - break; - case 32: - dt_printf(cbdatap->dtp, cbdatap->fp, "%u (0x%x);\n", *((u_int *) vp), *((u_int *) vp)); - break; - case 64: - dt_printf(cbdatap->dtp, cbdatap->fp, "%ju (0x%jx);\n", *((unsigned long long *) vp), *((unsigned long long *) vp)); - break; - default: - dt_printf(cbdatap->dtp, cbdatap->fp, "CTF_K_INTEGER: format %x offset %u bits %u\n",cte.cte_format,cte.cte_offset,cte.cte_bits); - break; - } - break; - case CTF_K_FLOAT: - dt_printf(cbdatap->dtp, cbdatap->fp, "CTF_K_FLOAT: format %x offset %u bits %u\n",cte.cte_format,cte.cte_offset,cte.cte_bits); - break; - case CTF_K_POINTER: - dt_printf(cbdatap->dtp, cbdatap->fp, "%p;\n", *((void **) addr)); - break; - case CTF_K_ARRAY: - if (ctf_array_info(cbdatap->dtt.dtt_ctfp, type, &arinfo) != 0) - return (-1); - dt_printf(cbdatap->dtp, cbdatap->fp, "{\n%*s",cbdata.indent * 4,""); - dt_print_type_data(&cbdata, arinfo.ctr_contents); - dt_printf(cbdatap->dtp, cbdatap->fp, "%*s};\n",cbdatap->indent * 4,""); - break; - case CTF_K_FUNCTION: - dt_printf(cbdatap->dtp, cbdatap->fp, "CTF_K_FUNCTION:\n"); - break; - case CTF_K_STRUCT: - cbdata.f_type = 1; - if (ctf_member_iter(cbdatap->dtt.dtt_ctfp, type, - dt_print_type_width, &cbdata) != 0) - return (-1); - dt_printf(cbdatap->dtp, cbdatap->fp, "{\n"); - if (ctf_member_iter(cbdatap->dtt.dtt_ctfp, type, - dt_print_type_member, &cbdata) != 0) - return (-1); - dt_printf(cbdatap->dtp, cbdatap->fp, "%*s};\n",cbdatap->indent * 4,""); - break; - case CTF_K_UNION: - cbdata.f_type = 1; - if (ctf_member_iter(cbdatap->dtt.dtt_ctfp, type, - dt_print_type_width, &cbdata) != 0) - return (-1); - dt_printf(cbdatap->dtp, cbdatap->fp, "{\n"); - if (ctf_member_iter(cbdatap->dtt.dtt_ctfp, type, - dt_print_type_member, &cbdata) != 0) - return (-1); - dt_printf(cbdatap->dtp, cbdatap->fp, "%*s};\n",cbdatap->indent * 4,""); - break; - case CTF_K_ENUM: - dt_printf(cbdatap->dtp, cbdatap->fp, "%s;\n", ctf_enum_name(cbdatap->dtt.dtt_ctfp, type, *((int *) vp))); - break; - case CTF_K_TYPEDEF: - dt_print_type_data(&cbdata, ctf_type_reference(cbdatap->dtt.dtt_ctfp,type)); - break; - case CTF_K_VOLATILE: - if (cbdatap->f_type) - dt_printf(cbdatap->dtp, cbdatap->fp, "volatile "); - dt_print_type_data(&cbdata, ctf_type_reference(cbdatap->dtt.dtt_ctfp,type)); - break; - case CTF_K_CONST: - if (cbdatap->f_type) - dt_printf(cbdatap->dtp, cbdatap->fp, "const "); - dt_print_type_data(&cbdata, ctf_type_reference(cbdatap->dtt.dtt_ctfp,type)); - break; - case CTF_K_RESTRICT: - if (cbdatap->f_type) - dt_printf(cbdatap->dtp, cbdatap->fp, "restrict "); - dt_print_type_data(&cbdata, ctf_type_reference(cbdatap->dtt.dtt_ctfp,type)); - break; - default: - break; - } - - addr += ssz; - cnt++; - } - - return (0); -} - -static int -dt_print_type(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr) -{ - caddr_t addrend; - char *p; - dtrace_typeinfo_t dtt; - dt_type_cbdata_t cbdata; - int num = 0; - int quiet = (dtp->dt_options[DTRACEOPT_QUIET] != DTRACEOPT_UNSET); - ssize_t ssz; - - if (!quiet) - dt_printf(dtp, fp, "\n"); - - /* Get the total number of bytes of data buffered. */ - size_t nbytes = *((uintptr_t *) addr); - addr += sizeof(uintptr_t); - - /* - * Get the size of the type so that we can check that it matches - * the CTF data we look up and so that we can figure out how many - * type elements are buffered. - */ - size_t typs = *((uintptr_t *) addr); - addr += sizeof(uintptr_t); - - /* - * Point to the type string in the buffer. Get it's string - * length and round it up to become the offset to the start - * of the buffered type data which we would like to be aligned - * for easy access. - */ - char *strp = (char *) addr; - int offset = roundup(strlen(strp) + 1, sizeof(uintptr_t)); - - /* - * The type string might have a format such as 'int [20]'. - * Check if there is an array dimension present. - */ - if ((p = strchr(strp, '[')) != NULL) { - /* Strip off the array dimension. */ - *p++ = '\0'; - - for (; *p != '\0' && *p != ']'; p++) - num = num * 10 + *p - '0'; - } else - /* No array dimension, so default. */ - num = 1; - - /* Lookup the CTF type from the type string. */ - if (dtrace_lookup_by_type(dtp, DTRACE_OBJ_EVERY, strp, &dtt) < 0) - return (-1); - - /* Offset the buffer address to the start of the data... */ - addr += offset; - - ssz = ctf_type_size(dtt.dtt_ctfp, dtt.dtt_type); - - if (typs != ssz) { - printf("Expected type size from buffer (%lu) to match type size looked up now (%ld)\n", (u_long) typs, (long) ssz); - return (-1); - } - - cbdata.dtp = dtp; - cbdata.dtt = dtt; - cbdata.name = ""; - cbdata.addr = addr; - cbdata.addrend = addr + nbytes; - cbdata.indent = 1; - cbdata.f_type = 1; - cbdata.type_width = 0; - cbdata.name_width = 0; - cbdata.fp = fp; - - return (dt_print_type_data(&cbdata, dtt.dtt_type)); -} - static int dt_print_sym(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr) { @@ -1904,6 +1596,16 @@ dt_print_mod(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr) return (0); } +static int +dt_print_memory(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr) +{ + int quiet = (dtp->dt_options[DTRACEOPT_QUIET] != DTRACEOPT_UNSET); + size_t nbytes = *((uintptr_t *) addr); + + return (dt_print_bytes(dtp, fp, addr + sizeof(uintptr_t), + nbytes, 50, quiet, 1)); +} + typedef struct dt_normal { dtrace_aggvarid_t dtnd_id; uint64_t dtnd_normal; @@ -2644,12 +2346,6 @@ dt_consume_cpu(dtrace_hdl_t *dtp, FILE *fp, int cpu, goto nextrec; } - if (act == DTRACEACT_PRINTT) { - if (dt_print_type(dtp, fp, addr) < 0) - return (-1); - goto nextrec; - } - if (DTRACEACT_ISPRINTFLIKE(act)) { void *fmtdata; int (*func)(dtrace_hdl_t *, FILE *, void *, diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h index 6bc392ff65f..d95de2dfa99 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h @@ -265,8 +265,6 @@ typedef enum { D_NOREG, /* no available internal registers */ D_PRINTM_ADDR, /* printm() memref bad type */ D_PRINTM_SIZE, /* printm() size bad type */ - D_PRINTT_ADDR, /* printt() typeref bad type */ - D_PRINTT_SIZE /* printt() size bad type */ } dt_errtag_t; extern const char *dt_errtag(dt_errtag_t); diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h index e71e9d71aef..f2c60a2b07d 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h @@ -488,7 +488,6 @@ struct dtrace_hdl { #define DT_ACT_SETOPT DT_ACT(28) /* setopt() action */ #define DT_ACT_PRINT DT_ACT(29) /* print() action */ #define DT_ACT_PRINTM DT_ACT(30) /* printm() action */ -#define DT_ACT_PRINTT DT_ACT(31) /* printt() action */ /* * Sentinel to tell freopen() to restore the saved stdout. This must not diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c index a56b98681d3..77d8386bc80 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c @@ -392,8 +392,6 @@ static const dt_ident_t _dtrace_globals[] = { &dt_idops_func, "void(@, ...)" }, { "printm", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTM, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(size_t, uintptr_t *)" }, -{ "printt", DT_IDENT_ACTFUNC, 0, DT_ACT_PRINTT, DT_ATTR_STABCMN, DT_VERS_1_0, - &dt_idops_func, "void(size_t, uintptr_t *)" }, { "probefunc", DT_IDENT_SCALAR, 0, DIF_VAR_PROBEFUNC, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" }, { "probemod", DT_IDENT_SCALAR, 0, DIF_VAR_PROBEMOD, @@ -505,8 +503,6 @@ static const dt_ident_t _dtrace_globals[] = { &dt_idops_func, "void(@, size_t, ...)" }, { "trunc", DT_IDENT_ACTFUNC, 0, DT_ACT_TRUNC, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(...)" }, -{ "typeref", DT_IDENT_FUNC, 0, DIF_SUBR_TYPEREF, DT_ATTR_STABCMN, DT_VERS_1_1, - &dt_idops_func, "uintptr_t *(void *, size_t, string, size_t)" }, { "uaddr", DT_IDENT_ACTFUNC, 0, DT_ACT_UADDR, DT_ATTR_STABCMN, DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" }, { "ucaller", DT_IDENT_SCALAR, 0, DIF_VAR_UCALLER, DT_ATTR_STABCMN, diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index 8ef31211fe1..27d62d1f013 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -6042,22 +6042,6 @@ inetout: regs[rd] = (uintptr_t)end + 1; break; } #endif - - case DIF_SUBR_TYPEREF: { - uintptr_t size = 4 * sizeof(uintptr_t); - uintptr_t *typeref = (uintptr_t *) P2ROUNDUP(mstate->dtms_scratch_ptr, sizeof(uintptr_t)); - size_t scratch_size = ((uintptr_t) typeref - mstate->dtms_scratch_ptr) + size; - - /* address, num_elements, type_str, type_len */ - typeref[0] = tupregs[0].dttk_value; - typeref[1] = tupregs[1].dttk_value; - typeref[2] = tupregs[2].dttk_value; - typeref[3] = tupregs[3].dttk_value; - - regs[rd] = (uintptr_t) typeref; - mstate->dtms_scratch_ptr += scratch_size; - break; - } } } @@ -7707,66 +7691,6 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, break; } - case DTRACEACT_PRINTT: { - /* The DIF returns a 'typeref'. */ - uintptr_t *typeref = (uintptr_t *)(uintptr_t) val; - char c = '\0' + 1; - size_t s; - - /* - * Get the type string length and round it - * up so that the data that follows is - * aligned for easy access. - */ - size_t typs = strlen((char *) typeref[2]) + 1; - typs = roundup(typs, sizeof(uintptr_t)); - - /* - *Get the size from the typeref using the - * number of elements and the type size. - */ - size = typeref[1] * typeref[3]; - - /* - * Check if the size exceeds the allocated - * buffer size. - */ - if (size + typs + 2 * sizeof(uintptr_t) > dp->dtdo_rtype.dtdt_size) { - /* Flag a drop! */ - *flags |= CPU_DTRACE_DROP; - - } - - /* Store the size in the buffer first. */ - DTRACE_STORE(uintptr_t, tomax, - valoffs, size); - valoffs += sizeof(uintptr_t); - - /* Store the type size in the buffer. */ - DTRACE_STORE(uintptr_t, tomax, - valoffs, typeref[3]); - valoffs += sizeof(uintptr_t); - - val = typeref[2]; - - for (s = 0; s < typs; s++) { - if (c != '\0') - c = dtrace_load8(val++); - - DTRACE_STORE(uint8_t, tomax, - valoffs++, c); - } - - /* - * Reset to the memory address rather than - * the typeref array, then let the BYREF - * code below do the work to store the - * memory data in the buffer. - */ - val = typeref[0]; - break; - } - case DTRACEACT_CHILL: if (dtrace_priv_kernel_destructive(state)) dtrace_action_chill(&mstate, val); @@ -10342,12 +10266,12 @@ dtrace_difo_validate_helper(dtrace_difo_t *dp) subr == DIF_SUBR_NTOHS || subr == DIF_SUBR_NTOHL || subr == DIF_SUBR_NTOHLL || - subr == DIF_SUBR_MEMREF || -#ifndef illumos - subr == DIF_SUBR_MEMSTR || -#endif - subr == DIF_SUBR_TYPEREF) + subr == DIF_SUBR_MEMREF) break; +#ifdef __FreeBSD__ + if (subr == DIF_SUBR_MEMSTR) + break; +#endif err += efunc(pc, "invalid subr %u\n", subr); break; @@ -11647,10 +11571,6 @@ dtrace_ecb_action_add(dtrace_ecb_t *ecb, dtrace_actdesc_t *desc) size = dp->dtdo_rtype.dtdt_size; break; - case DTRACEACT_PRINTT: - size = dp->dtdo_rtype.dtdt_size; - break; - case DTRACEACT_COMMIT: { dtrace_action_t *act = ecb->dte_action; diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index 92d35690ad7..f489bb0629d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -308,7 +308,7 @@ typedef enum dtrace_probespec { #define DIF_SUBR_TOUPPER 44 #define DIF_SUBR_TOLOWER 45 #define DIF_SUBR_MEMREF 46 -#define DIF_SUBR_TYPEREF 47 +#define DIF_SUBR_UNUSED 47 #define DIF_SUBR_SX_SHARED_HELD 48 #define DIF_SUBR_SX_EXCLUSIVE_HELD 49 #define DIF_SUBR_SX_ISEXCLUSIVE 50 @@ -429,7 +429,6 @@ typedef struct dtrace_difv { #define DTRACEACT_TRACEMEM 6 /* tracemem() action */ #define DTRACEACT_TRACEMEM_DYNSIZE 7 /* dynamic tracemem() size */ #define DTRACEACT_PRINTM 8 /* printm() action (BSD) */ -#define DTRACEACT_PRINTT 9 /* printt() action (BSD) */ #define DTRACEACT_PROC 0x0100 #define DTRACEACT_USTACK (DTRACEACT_PROC + 1) From fbc19213d5385bb9833b5c2685d88600a6291a02 Mon Sep 17 00:00:00 2001 From: Benedict Reuschling Date: Sat, 12 Nov 2016 19:45:55 +0000 Subject: [PATCH 039/204] Fix a broken link to the USB audio class specs. PR: 214240 Submitted by: Tobias Kortkamp t@tobik.me MFC after: 5 days --- share/man/man4/snd_uaudio.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/snd_uaudio.4 b/share/man/man4/snd_uaudio.4 index 5166f08f6d3..17780692a66 100644 --- a/share/man/man4/snd_uaudio.4 +++ b/share/man/man4/snd_uaudio.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 19, 2015 +.Dd November 12, 2016 .Dt SND_UAUDIO 4 .Os .Sh NAME @@ -73,7 +73,7 @@ for more information. .Xr usb 4 .Rs .%T "USB Audio Class Specifications" -.%U http://www.usb.org/developers/devclass_docs/ +.%U http://www.usb.org/developers/docs/devclass_docs/ .Re .Sh HISTORY The From 3e7ddf02dc6f279532bd49619804851fd648d091 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Sat, 12 Nov 2016 20:45:03 +0000 Subject: [PATCH 040/204] Make dpaa work with only slightly modified Linux device trees. Linux has a slightly different device tree definition for DPAA than originally done in the FreeBSD driver. This changes the driver to be mostly compatible with the Linux device tree definitions. Currently the differences are: bman-portals: compatible = "fsl,bman-portals" (Linux is "simple-bus") qman-portals: compatible = "fsl,qman-portals" (Linux is "simple-bus") fman: compatible = "fsl,fman" (Linux is "simple-bus") The Linux device tree doesn't specify anything for rgmii in the mdio. This change still requires the device tree to specify the phy-handle, and doesn't yet support tbi. --- sys/boot/fdt/dts/powerpc/p2041rdb.dts | 41 ------ sys/boot/fdt/dts/powerpc/p2041si.dtsi | 48 +++---- sys/boot/fdt/dts/powerpc/p3041ds.dts | 41 ------ sys/boot/fdt/dts/powerpc/p3041si.dtsi | 54 ++++---- sys/boot/fdt/dts/powerpc/p5020ds.dts | 41 ------ sys/boot/fdt/dts/powerpc/p5020si.dtsi | 48 +++---- sys/dev/dpaa/bman_fdt.c | 34 ++++- sys/dev/dpaa/dpaa.c | 184 -------------------------- sys/dev/dpaa/fman.c | 30 ++++- sys/dev/dpaa/fman.h | 3 + sys/dev/dpaa/if_dtsec.c | 2 - sys/dev/dpaa/if_dtsec_fdt.c | 42 +++--- sys/dev/dpaa/if_dtsec_rm.c | 1 + sys/dev/dpaa/qman_fdt.c | 79 ++++++++--- sys/powerpc/conf/dpaa/files.dpaa | 2 - 15 files changed, 215 insertions(+), 435 deletions(-) delete mode 100644 sys/dev/dpaa/dpaa.c diff --git a/sys/boot/fdt/dts/powerpc/p2041rdb.dts b/sys/boot/fdt/dts/powerpc/p2041rdb.dts index aa5af072e76..3ce2e60096c 100644 --- a/sys/boot/fdt/dts/powerpc/p2041rdb.dts +++ b/sys/boot/fdt/dts/powerpc/p2041rdb.dts @@ -442,47 +442,6 @@ }; }; - fsl,dpaa { - compatible = "fsl,p2041-dpaa", "fsl,dpaa"; - - ethernet@0 { - compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet0>; - status = "okay"; - }; - ethernet@1 { - compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet1>; - status = "okay"; - }; - ethernet@2 { - compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet2>; - status = "okay"; - }; - ethernet@3 { - compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet3>; - status = "okay"; - }; - ethernet@4 { - compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet4>; - status = "okay"; - }; - ethernet@5 { - compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet5>; - status = "okay"; - }; - }; - chosen { stdin = "serial0"; stdout = "serial0"; diff --git a/sys/boot/fdt/dts/powerpc/p2041si.dtsi b/sys/boot/fdt/dts/powerpc/p2041si.dtsi index 9db01fa62ca..41eb1dd7452 100644 --- a/sys/boot/fdt/dts/powerpc/p2041si.dtsi +++ b/sys/boot/fdt/dts/powerpc/p2041si.dtsi @@ -208,7 +208,7 @@ bman-portals@ff4000000 { #address-cells = <0x1>; #size-cells = <0x1>; - compatible = "bman-portals"; + compatible = "fsl,bman-portals"; ranges = <0x0 0xf 0xfde00000 0x200000>; bman-portal@0 { cell-index = <0x0>; @@ -281,7 +281,7 @@ qman-portals@ff4200000 { #address-cells = <0x1>; #size-cells = <0x1>; - compatible = "qman-portals"; + compatible = "fsl,qman-portals"; ranges = <0x0 0xf 0xfdc00000 0x200000>; qportal0: qman-portal@0 { cell-index = <0x0>; @@ -913,8 +913,8 @@ pme: pme@316000 { compatible = "fsl,pme"; reg = <0x316000 0x10000>; - /* fsl,pme-pdsr = <0x0 0x23000000 0x0 0x01000000>; */ - /* fsl,pme-sre = <0x0 0x24000000 0x0 0x00a00000>; */ + /* "fsl,pme-pdsr = <0x0 0x23000000 0x0 0x01000000>; */ + /* "fsl,pme-sre = <0x0 0x24000000 0x0 0x00a00000>; */ interrupts = <16 2 1 5>; }; @@ -923,16 +923,16 @@ reg = <0x318000 0x1000>; interrupts = <16 2 1 3>; /* Commented out, use default allocation */ - /* fsl,qman-fqd = <0x0 0x20000000 0x0 0x01000000>; */ - /* fsl,qman-pfdr = <0x0 0x21000000 0x0 0x01000000>; */ + /* "fsl,qman-fqd = <0x0 0x20000000 0x0 0x01000000>; */ + /* "fsl,qman-pfdr = <0x0 0x21000000 0x0 0x01000000>; */ }; bman: bman@31a000 { compatible = "fsl,p2041-bman", "fsl,bman"; reg = <0x31a000 0x1000>; interrupts = <16 2 1 2>; - /* Same as fsl,qman-*, use default allocation */ - /* fsl,bman-fbpr = <0x0 0x22000000 0x0 0x01000000>; */ + /* Same as "fsl,qman-*, use default allocation */ + /* "fsl,bman-fbpr = <0x0 0x22000000 0x0 0x01000000>; */ }; fman0: fman@400000 { @@ -983,27 +983,27 @@ fman0_rx0: port@88000 { cell-index = <0>; - compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x88000 0x1000>; }; fman0_rx1: port@89000 { cell-index = <1>; - compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x89000 0x1000>; }; fman0_rx2: port@8a000 { cell-index = <2>; - compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x8a000 0x1000>; }; fman0_rx3: port@8b000 { cell-index = <3>; - compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x8b000 0x1000>; }; fman0_rx4: port@8c000 { cell-index = <4>; - compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p2041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x8c000 0x1000>; }; fman0_rx5: port@90000 { @@ -1020,31 +1020,31 @@ }; fman0_tx0: port@a8000 { cell-index = <0>; - compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xa8000 0x1000>; fsl,qman-channel-id = <0x41>; }; fman0_tx1: port@a9000 { cell-index = <1>; - compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xa9000 0x1000>; fsl,qman-channel-id = <0x42>; }; fman0_tx2: port@aa000 { cell-index = <2>; - compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xaa000 0x1000>; fsl,qman-channel-id = <0x43>; }; fman0_tx3: port@ab000 { cell-index = <3>; - compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xab000 0x1000>; fsl,qman-channel-id = <0x44>; }; fman0_tx4: port@ac000 { cell-index = <4>; - compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p2041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xac000 0x1000>; fsl,qman-channel-id = <0x45>; }; @@ -1093,7 +1093,7 @@ enet0: ethernet@e0000 { cell-index = <0>; - compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe0000 0x1000>; fsl,port-handles = <&fman0_rx0 &fman0_tx0>; }; @@ -1108,7 +1108,7 @@ enet1: ethernet@e2000 { cell-index = <1>; - compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe2000 0x1000>; fsl,port-handles = <&fman0_rx1 &fman0_tx1>; }; @@ -1123,7 +1123,7 @@ enet2: ethernet@e4000 { cell-index = <2>; - compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe4000 0x1000>; fsl,port-handles = <&fman0_rx2 &fman0_tx2>; }; @@ -1138,7 +1138,7 @@ enet3: ethernet@e6000 { cell-index = <3>; - compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe6000 0x1000>; fsl,port-handles = <&fman0_rx3 &fman0_tx3>; }; @@ -1153,7 +1153,7 @@ enet4: ethernet@e8000 { cell-index = <4>; - compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p2041-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe8000 0x1000>; fsl,port-handles = <&fman0_rx4 &fman0_tx4>; }; @@ -1168,7 +1168,7 @@ enet5: ethernet@f0000 { cell-index = <0>; - compatible = "fsl,p2041-fman-10g-mac", "fsl,fman-10g-mac"; + compatible = "fsl,p2041-fman-10g-mac", "fsl,fman-10g-mac", "fsl,fman-xgec"; reg = <0xf0000 0x1000>; fsl,port-handles = <&fman0_rx5 &fman0_tx5>; }; diff --git a/sys/boot/fdt/dts/powerpc/p3041ds.dts b/sys/boot/fdt/dts/powerpc/p3041ds.dts index 70787e43276..bcc9ff3112b 100644 --- a/sys/boot/fdt/dts/powerpc/p3041ds.dts +++ b/sys/boot/fdt/dts/powerpc/p3041ds.dts @@ -539,47 +539,6 @@ }; }; - fsl,dpaa { - compatible = "fsl,p3041-dpaa", "fsl,dpaa"; - - ethernet@0 { - compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet0>; - status="okay"; - }; - ethernet@1 { - compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet1>; - status = "disabled"; - }; - ethernet@2 { - compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet2>; - status = "disabled"; - }; - ethernet@3 { - compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet3>; - status = "disabled"; - }; - ethernet@4 { - compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet4>; - status = "okay"; - }; - ethernet@5 { - compatible = "fsl,p3041-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet5>; - status = "disabled"; - }; - }; - chosen { stdin = "serial0"; stdout = "serial0"; diff --git a/sys/boot/fdt/dts/powerpc/p3041si.dtsi b/sys/boot/fdt/dts/powerpc/p3041si.dtsi index 3335e48d470..368cd6272bf 100644 --- a/sys/boot/fdt/dts/powerpc/p3041si.dtsi +++ b/sys/boot/fdt/dts/powerpc/p3041si.dtsi @@ -209,7 +209,7 @@ bman-portals@ff4000000 { #address-cells = <0x1>; #size-cells = <0x1>; - compatible = "bman-portals"; + compatible = "fsl,bman-portals"; ranges = <0x0 0xf 0xfde00000 0x200000>; bman-portal@0 { cell-index = <0x0>; @@ -282,7 +282,7 @@ qman-portals@ff4200000 { #address-cells = <0x1>; #size-cells = <0x1>; - compatible = "qman-portals"; + compatible = "fsl,qman-portals"; ranges = <0x0 0xf 0xfdc00000 0x200000>; qportal0: qman-portal@0 { cell-index = <0x0>; @@ -915,8 +915,8 @@ pme: pme@316000 { compatible = "fsl,pme"; reg = <0x316000 0x10000>; - /* fsl,pme-pdsr = <0x0 0x23000000 0x0 0x01000000>; */ - /* fsl,pme-sre = <0x0 0x24000000 0x0 0x00a00000>; */ + /* "fsl,pme-pdsr = <0x0 0x23000000 0x0 0x01000000>; */ + /* "fsl,pme-sre = <0x0 0x24000000 0x0 0x00a00000>; */ interrupts = <16 2 1 5>; }; @@ -925,16 +925,16 @@ reg = <0x318000 0x1000>; interrupts = <16 2 1 3>; /* Commented out, use default allocation */ - /* fsl,qman-fqd = <0x0 0x20000000 0x0 0x01000000>; */ - /* fsl,qman-pfdr = <0x0 0x21000000 0x0 0x01000000>; */ + /* "fsl,qman-fqd = <0x0 0x20000000 0x0 0x01000000>; */ + /* "fsl,qman-pfdr = <0x0 0x21000000 0x0 0x01000000>; */ }; bman: bman@31a000 { compatible = "fsl,p3041-bman", "fsl,bman"; reg = <0x31a000 0x1000>; interrupts = <16 2 1 2>; - /* Same as fsl,qman-*, use default allocation */ - /* fsl,bman-fbpr = <0x0 0x22000000 0x0 0x01000000>; */ + /* Same as "fsl,qman-*, use default allocation */ + /* "fsl,bman-fbpr = <0x0 0x22000000 0x0 0x01000000>; */ }; fman0: fman@400000 { @@ -985,27 +985,27 @@ fman0_rx0: port@88000 { cell-index = <0>; - compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x88000 0x1000>; }; fman0_rx1: port@89000 { cell-index = <1>; - compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x89000 0x1000>; }; fman0_rx2: port@8a000 { cell-index = <2>; - compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x8a000 0x1000>; }; fman0_rx3: port@8b000 { cell-index = <3>; - compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x8b000 0x1000>; }; fman0_rx4: port@8c000 { cell-index = <4>; - compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p3041-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x8c000 0x1000>; }; fman0_rx5: port@90000 { @@ -1022,31 +1022,31 @@ }; fman0_tx0: port@a8000 { cell-index = <0>; - compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xa8000 0x1000>; fsl,qman-channel-id = <0x41>; }; fman0_tx1: port@a9000 { cell-index = <1>; - compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xa9000 0x1000>; fsl,qman-channel-id = <0x42>; }; fman0_tx2: port@aa000 { cell-index = <2>; - compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xaa000 0x1000>; fsl,qman-channel-id = <0x43>; }; fman0_tx3: port@ab000 { cell-index = <3>; - compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xab000 0x1000>; fsl,qman-channel-id = <0x44>; }; fman0_tx4: port@ac000 { cell-index = <4>; - compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p3041-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xac000 0x1000>; fsl,qman-channel-id = <0x45>; }; @@ -1095,7 +1095,8 @@ enet0: ethernet@e0000 { cell-index = <0>; - compatible = "fsl,p3041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p3041-fman-1g-mac", + "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe0000 0x1000>; fsl,port-handles = <&fman0_rx0 &fman0_tx0>; ptimer-handle = <&ptp_timer0>; @@ -1111,7 +1112,8 @@ enet1: ethernet@e2000 { cell-index = <1>; - compatible = "fsl,p3041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p3041-fman-1g-mac", + "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe2000 0x1000>; fsl,port-handles = <&fman0_rx1 &fman0_tx1>; ptimer-handle = <&ptp_timer0>; @@ -1127,7 +1129,8 @@ enet2: ethernet@e4000 { cell-index = <2>; - compatible = "fsl,p3041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p3041-fman-1g-mac", + "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe4000 0x1000>; fsl,port-handles = <&fman0_rx2 &fman0_tx2>; ptimer-handle = <&ptp_timer0>; @@ -1143,7 +1146,8 @@ enet3: ethernet@e6000 { cell-index = <3>; - compatible = "fsl,p3041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p3041-fman-1g-mac", + "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe6000 0x1000>; fsl,port-handles = <&fman0_rx3 &fman0_tx3>; }; @@ -1158,7 +1162,8 @@ enet4: ethernet@e8000 { cell-index = <4>; - compatible = "fsl,p3041-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p3041-fman-1g-mac", + "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe8000 0x1000>; fsl,port-handles = <&fman0_rx4 &fman0_tx4>; ptimer-handle = <&ptp_timer0>; @@ -1174,7 +1179,8 @@ enet5: ethernet@f0000 { cell-index = <0>; - compatible = "fsl,p3041-fman-10g-mac", "fsl,fman-10g-mac"; + compatible = "fsl,p3041-fman-10g-mac", + "fsl,fman-10g-mac", "fsl,fman-xgec"; reg = <0xf0000 0x1000>; fsl,port-handles = <&fman0_rx5 &fman0_tx5>; }; diff --git a/sys/boot/fdt/dts/powerpc/p5020ds.dts b/sys/boot/fdt/dts/powerpc/p5020ds.dts index cb070457924..3e0d92fbd83 100644 --- a/sys/boot/fdt/dts/powerpc/p5020ds.dts +++ b/sys/boot/fdt/dts/powerpc/p5020ds.dts @@ -535,47 +535,6 @@ }; }; - fsl,dpaa { - compatible = "fsl,p5020-dpaa", "fsl,dpaa"; - - ethernet@0 { - compatible = "fsl,p5020-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet0>; - status = "okay"; - }; - ethernet@1 { - compatible = "fsl,p5020-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet1>; - status = "disabled"; - }; - ethernet@2 { - compatible = "fsl,p5020-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet2>; - status = "disabled"; - }; - ethernet@3 { - compatible = "fsl,p5020-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet3>; - status = "disabled"; - }; - ethernet@4 { - compatible = "fsl,p5020-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet4>; - status = "okay"; - }; - ethernet@5 { - compatible = "fsl,p5020-dpa-ethernet", "fsl,dpa-ethernet"; - fsl,qman-channel = <&qpool1>; - fsl,fman-mac = <&enet5>; - status = "disabled"; - }; - }; - chosen { stdin = "serial0"; stdout = "serial0"; diff --git a/sys/boot/fdt/dts/powerpc/p5020si.dtsi b/sys/boot/fdt/dts/powerpc/p5020si.dtsi index 27699cbc7e0..afed942a2b9 100644 --- a/sys/boot/fdt/dts/powerpc/p5020si.dtsi +++ b/sys/boot/fdt/dts/powerpc/p5020si.dtsi @@ -194,7 +194,7 @@ bman-portals@ff4000000 { #address-cells = <0x1>; #size-cells = <0x1>; - compatible = "bman-portals"; + compatible = "fsl,bman-portals"; ranges = <0x0 0xf 0xfde00000 0x200000>; bman-portal@0 { cell-index = <0x0>; @@ -267,7 +267,7 @@ qman-portals@ff4200000 { #address-cells = <0x1>; #size-cells = <0x1>; - compatible = "qman-portals"; + compatible = "fsl,qman-portals"; ranges = <0x0 0xf 0xfdc00000 0x200000>; qportal0: qman-portal@0 { cell-index = <0x0>; @@ -960,8 +960,8 @@ pme: pme@316000 { compatible = "fsl,pme"; reg = <0x316000 0x10000>; - /* fsl,pme-pdsr = <0x0 0x23000000 0x0 0x01000000>; */ - /* fsl,pme-sre = <0x0 0x24000000 0x0 0x00a00000>; */ + /* "fsl,pme-pdsr = <0x0 0x23000000 0x0 0x01000000>; */ + /* "fsl,pme-sre = <0x0 0x24000000 0x0 0x00a00000>; */ interrupts = <16 2 1 5>; }; @@ -970,16 +970,16 @@ reg = <0x318000 0x1000>; interrupts = <16 2 1 3>; /* Commented out, use default allocation */ - /* fsl,qman-fqd = <0x0 0x20000000 0x0 0x01000000>; */ - /* fsl,qman-pfdr = <0x0 0x21000000 0x0 0x01000000>; */ + /* "fsl,qman-fqd = <0x0 0x20000000 0x0 0x01000000>; */ + /* "fsl,qman-pfdr = <0x0 0x21000000 0x0 0x01000000>; */ }; bman: bman@31a000 { compatible = "fsl,p5020-bman", "fsl,bman"; reg = <0x31a000 0x1000>; interrupts = <16 2 1 2>; - /* Same as fsl,qman-*, use default allocation */ - /* fsl,bman-fbpr = <0x0 0x22000000 0x0 0x01000000>; */ + /* Same as "fsl,qman-*, use default allocation */ + /* "fsl,bman-fbpr = <0x0 0x22000000 0x0 0x01000000>; */ }; fman0: fman@400000 { @@ -1030,27 +1030,27 @@ fman0_rx0: port@88000 { cell-index = <0>; - compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x88000 0x1000>; }; fman0_rx1: port@89000 { cell-index = <1>; - compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x89000 0x1000>; }; fman0_rx2: port@8a000 { cell-index = <2>; - compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x8a000 0x1000>; }; fman0_rx3: port@8b000 { cell-index = <3>; - compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x8b000 0x1000>; }; fman0_rx4: port@8c000 { cell-index = <4>; - compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx"; + compatible = "fsl,p5020-fman-port-1g-rx", "fsl,fman-port-1g-rx", "fsl,fman-v2-port-rx"; reg = <0x8c000 0x1000>; }; fman0_rx5: port@90000 { @@ -1067,31 +1067,31 @@ }; fman0_tx0: port@a8000 { cell-index = <0>; - compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xa8000 0x1000>; fsl,qman-channel-id = <0x41>; }; fman0_tx1: port@a9000 { cell-index = <1>; - compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xa9000 0x1000>; fsl,qman-channel-id = <0x42>; }; fman0_tx2: port@aa000 { cell-index = <2>; - compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xaa000 0x1000>; fsl,qman-channel-id = <0x43>; }; fman0_tx3: port@ab000 { cell-index = <3>; - compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xab000 0x1000>; fsl,qman-channel-id = <0x44>; }; fman0_tx4: port@ac000 { cell-index = <4>; - compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx"; + compatible = "fsl,p5020-fman-port-1g-tx", "fsl,fman-port-1g-tx", "fsl,fman-v2-port-tx"; reg = <0xac000 0x1000>; fsl,qman-channel-id = <0x45>; }; @@ -1140,7 +1140,7 @@ enet0: ethernet@e0000 { cell-index = <0>; - compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe0000 0x1000>; fsl,port-handles = <&fman0_rx0 &fman0_tx0>; ptimer-handle = <&ptp_timer0>; @@ -1156,7 +1156,7 @@ enet1: ethernet@e2000 { cell-index = <1>; - compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe2000 0x1000>; fsl,port-handles = <&fman0_rx1 &fman0_tx1>; ptimer-handle = <&ptp_timer0>; @@ -1172,7 +1172,7 @@ enet2: ethernet@e4000 { cell-index = <2>; - compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe4000 0x1000>; fsl,port-handles = <&fman0_rx2 &fman0_tx2>; ptimer-handle = <&ptp_timer0>; @@ -1188,7 +1188,7 @@ enet3: ethernet@e6000 { cell-index = <3>; - compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe6000 0x1000>; fsl,port-handles = <&fman0_rx3 &fman0_tx3>; ptimer-handle = <&ptp_timer0>; @@ -1204,7 +1204,7 @@ enet4: ethernet@e8000 { cell-index = <4>; - compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac"; + compatible = "fsl,p5020-fman-1g-mac", "fsl,fman-1g-mac", "fsl,fman-dtsec"; reg = <0xe8000 0x1000>; fsl,port-handles = <&fman0_rx4 &fman0_tx4>; ptimer-handle = <&ptp_timer0>; @@ -1220,7 +1220,7 @@ enet5: ethernet@f0000 { cell-index = <0>; - compatible = "fsl,p5020-fman-10g-mac", "fsl,fman-10g-mac"; + compatible = "fsl,p5020-fman-10g-mac", "fsl,fman-10g-mac", "fsl,fman-xgec"; reg = <0xf0000 0x1000>; fsl,port-handles = <&fman0_rx5 &fman0_tx5>; }; diff --git a/sys/dev/dpaa/bman_fdt.c b/sys/dev/dpaa/bman_fdt.c index 992b4eaa57b..454af67ae6b 100644 --- a/sys/dev/dpaa/bman_fdt.c +++ b/sys/dev/dpaa/bman_fdt.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -105,7 +106,8 @@ static driver_t bm_portals_driver = { }; static devclass_t bm_portals_devclass; -DRIVER_MODULE(bman_portals, ofwbus, bm_portals_driver, bm_portals_devclass, 0, 0); +EARLY_DRIVER_MODULE(bman_portals, ofwbus, bm_portals_driver, + bm_portals_devclass, 0, 0, BUS_PASS_BUS); static void get_addr_props(phandle_t node, uint32_t *addrp, uint32_t *sizep) @@ -121,7 +123,7 @@ static int bman_portals_fdt_probe(device_t dev) { - if (!ofw_bus_is_compatible(dev, "bman-portals")) + if (!ofw_bus_is_compatible(dev, "fsl,bman-portals")) return (ENXIO); device_set_desc(dev, BMAN_PORT_DEVSTR); @@ -129,6 +131,25 @@ bman_portals_fdt_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +static phandle_t +bman_portal_find_cpu(int cpu) +{ + phandle_t node; + pcell_t reg; + + node = OF_finddevice("/cpus"); + if (node == -1) + return (node); + + for (node = OF_child(node); node != 0; node = OF_peer(node)) { + if (OF_getprop(node, "reg", ®, sizeof(reg)) <= 0) + continue; + if (reg == cpu) + return (node); + } + return (-1); +} + static int bman_portals_fdt_attach(device_t dev) { @@ -152,13 +173,17 @@ bman_portals_fdt_attach(device_t dev) /* Find portals tied to CPUs */ for (child = OF_child(node); child != 0; child = OF_peer(child)) { + if (cpus >= mp_ncpus) + break; if (!ofw_bus_node_is_compatible(child, "fsl,bman-portal")) { continue; } /* Checkout related cpu */ if (OF_getprop(child, "cpu-handle", (void *)&cpu, sizeof(cpu)) <= 0) { - continue; + cpu = bman_portal_find_cpu(cpus); + if (cpu <= 0) + continue; } /* Acquire cpu number */ cpu_node = OF_instance_to_package(cpu); @@ -169,9 +194,6 @@ bman_portals_fdt_attach(device_t dev) cpus++; - if (cpus > MAXCPU) - break; - if (ofw_bus_gen_setup_devinfo(&ofw_di, child) != 0) { device_printf(dev, "could not set up devinfo\n"); continue; diff --git a/sys/dev/dpaa/dpaa.c b/sys/dev/dpaa/dpaa.c deleted file mode 100644 index 95c04b4d596..00000000000 --- a/sys/dev/dpaa/dpaa.c +++ /dev/null @@ -1,184 +0,0 @@ -/*- - * Copyright (c) 2012 Semihalf. - * 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 -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "opt_platform.h" - -static MALLOC_DEFINE(M_DPAA, "dpaa", "dpaa devices information"); - -static int dpaa_probe(device_t dev); -static int dpaa_attach(device_t dev); - -static const struct ofw_bus_devinfo *dpaa_get_devinfo(device_t bus, - device_t child); - -struct dpaa_softc { - -}; - -struct dpaa_devinfo { - struct ofw_bus_devinfo di_ofw; -}; - -static device_method_t dpaa_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, dpaa_probe), - DEVMETHOD(device_attach, dpaa_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), - - /* OFW bus interface */ - DEVMETHOD(ofw_bus_get_devinfo, dpaa_get_devinfo), - DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), - DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), - DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), - DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), - DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), - - {0, 0} -}; - -static driver_t dpaa_driver = { - "dpaa", - dpaa_methods, - sizeof(struct dpaa_softc), -}; - -static devclass_t dpaa_devclass; -DRIVER_MODULE_ORDERED(dpaa, ofwbus, dpaa_driver, dpaa_devclass, 0, 0, - SI_ORDER_ANY); - -static int -dpaa_probe(device_t dev) -{ - - if (!ofw_bus_is_compatible(dev, "fsl,dpaa")) - return (ENXIO); - - device_set_desc(dev, "Freescale Data Path Acceleration Architecture"); - - return (BUS_PROBE_DEFAULT); -} - -static int -dpaa_attach(device_t dev) -{ - device_t dev_child; - phandle_t dt_node, dt_child, enet_node; - struct dpaa_devinfo *di; - pcell_t cell_index; - - cell_index = 0; - /* - * Walk dpaa and add direct subordinates as our children. - */ - dt_node = ofw_bus_get_node(dev); - dt_child = OF_child(dt_node); - - for (; dt_child != 0; dt_child = OF_peer(dt_child)) { - - /* Check and process 'status' property. */ - if (!(fdt_is_enabled(dt_child))) - continue; - - di = (struct dpaa_devinfo *)malloc(sizeof(*di), M_DPAA, - M_WAITOK | M_ZERO); - - if (ofw_bus_gen_setup_devinfo(&di->di_ofw, dt_child) != 0) { - free(di, M_DPAA); - device_printf(dev, "could not set up devinfo\n"); - continue; - } - - /* - * dTSEC number from SoC is equal to number get from - * dts file. - */ - if (OF_getprop(dt_child, "fsl,fman-mac", - (void *)&enet_node, sizeof(enet_node)) == -1) { - device_printf(dev, "Could not get fsl,fman-mac " - "from dts\n"); - continue; - } - - if ((enet_node = OF_instance_to_package(enet_node)) == -1) { - device_printf(dev, "Could not get enet node\n"); - continue; - } - - if (OF_getprop(enet_node, "cell-index", - (void *)&cell_index, sizeof(cell_index)) == -1) { - device_printf(dev, "Could not get cell-index from enet " - "node\n"); - continue; - } - - /* Add newbus device for this FDT node */ - dev_child = device_add_child(dev, "dtsec", (int)cell_index); - if (dev_child == NULL) { - device_printf(dev, "could not add child: %s\n", - di->di_ofw.obd_name); - ofw_bus_gen_destroy_devinfo(&di->di_ofw); - free(di, M_DPAA); - continue; - } - -#ifdef DEBUG - device_printf(dev, "added child: %s\n\n", di->di_ofw.obd_name); -#endif - - device_set_ivars(dev_child, di); - } - - return (bus_generic_attach(dev)); -} - -static const struct ofw_bus_devinfo * -dpaa_get_devinfo(device_t bus, device_t child) -{ - struct dpaa_devinfo *di; - - di = device_get_ivars(child); - return (&di->di_ofw); -} diff --git a/sys/dev/dpaa/fman.c b/sys/dev/dpaa/fman.c index ee1f0cd8bf2..fca65f33429 100644 --- a/sys/dev/dpaa/fman.c +++ b/sys/dev/dpaa/fman.c @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -50,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include "fman.h" +static MALLOC_DEFINE(M_FMAN, "fman", "fman devices information"); + /** * @group FMan private defines. * @{ @@ -259,6 +260,8 @@ fman_attach(device_t dev) { struct fman_softc *sc; struct fman_config cfg; + pcell_t qchan_range[2]; + phandle_t node; sc = device_get_softc(dev); sc->sc_base.dev = dev; @@ -272,6 +275,14 @@ fman_attach(device_t dev) XX_TrackInit(); + node = ofw_bus_get_node(dev); + if (OF_getencprop(node, "fsl,qman-channel-range", qchan_range, + sizeof(qchan_range)) <= 0) { + device_printf(dev, "Missing QMan channel range property!\n"); + return (ENXIO); + } + sc->qman_chan_base = qchan_range[0]; + sc->qman_chan_count = qchan_range[1]; sc->mem_rid = 0; sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, RF_ACTIVE | RF_SHAREABLE); @@ -379,4 +390,21 @@ fman_shutdown(device_t dev) return (0); } +int +fman_qman_channel_id(device_t dev, int port) +{ + struct fman_softc *sc; + int qman_port_id[] = {0x31, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, + 0x2f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}; + int i; + + sc = device_get_softc(dev); + for (i = 0; i < sc->qman_chan_count; i++) { + if (qman_port_id[i] == port) + return (sc->qman_chan_base + i); + } + + return (0); +} + /** @} */ diff --git a/sys/dev/dpaa/fman.h b/sys/dev/dpaa/fman.h index 52bc61762c2..96cdd86b036 100644 --- a/sys/dev/dpaa/fman.h +++ b/sys/dev/dpaa/fman.h @@ -42,6 +42,8 @@ struct fman_softc { int mem_rid; int irq_rid; int err_irq_rid; + int qman_chan_base; + int qman_chan_count; t_Handle fm_handle; t_Handle muram_handle; @@ -59,6 +61,7 @@ int fman_resume(device_t dev); int fman_shutdown(device_t dev); int fman_read_ivar(device_t dev, device_t child, int index, uintptr_t *result); +int fman_qman_channel_id(device_t, int); /** @} */ uint32_t fman_get_clock(struct fman_softc *sc); diff --git a/sys/dev/dpaa/if_dtsec.c b/sys/dev/dpaa/if_dtsec.c index d5f771251e3..e29d89adb62 100644 --- a/sys/dev/dpaa/if_dtsec.c +++ b/sys/dev/dpaa/if_dtsec.c @@ -49,8 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include #include diff --git a/sys/dev/dpaa/if_dtsec_fdt.c b/sys/dev/dpaa/if_dtsec_fdt.c index c9f98efa09f..b653fbd5f0c 100644 --- a/sys/dev/dpaa/if_dtsec_fdt.c +++ b/sys/dev/dpaa/if_dtsec_fdt.c @@ -87,7 +87,7 @@ static driver_t dtsec_driver = { }; static devclass_t dtsec_devclass; -DRIVER_MODULE(dtsec, dpaa, dtsec_driver, dtsec_devclass, 0, 0); +DRIVER_MODULE(dtsec, fman, dtsec_driver, dtsec_devclass, 0, 0); DRIVER_MODULE(miibus, dtsec, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(dtsec, ether, 1, 1, 1); MODULE_DEPEND(dtsec, miibus, 1, 1, 1); @@ -96,7 +96,8 @@ static int dtsec_fdt_probe(device_t dev) { - if (!ofw_bus_is_compatible(dev, "fsl,dpa-ethernet")) + if (!ofw_bus_is_compatible(dev, "fsl,fman-dtsec") && + !ofw_bus_is_compatible(dev, "fsl,fman-xgec")) return (ENXIO); device_set_desc(dev, "Freescale Data Path Triple Speed Ethernet " @@ -119,9 +120,7 @@ find_mdio(phandle_t phy_node, device_t mac, device_t *mdio_dev) if (phy_node <= 0) return (ENOENT); - if (fman_get_dev(&bus) < 0) - return (ENOENT); - + bus = device_get_parent(mac); *mdio_dev = ofw_bus_find_child_device_by_phandle(bus, phy_node); return (0); @@ -131,21 +130,13 @@ static int dtsec_fdt_attach(device_t dev) { struct dtsec_softc *sc; - phandle_t node, enet_node, phy_node; + phandle_t enet_node, phy_node; phandle_t fman_rxtx_node[2]; char phy_type[6]; + pcell_t fman_tx_cell; sc = device_get_softc(dev); - node = ofw_bus_get_node(dev); - - if (OF_getprop(node, "fsl,fman-mac", (void *)&enet_node, - sizeof(enet_node)) == -1) { - device_printf(dev, "Could not load fsl,fman-mac property " - "from DTS\n"); - return (ENXIO); - } - - enet_node = OF_instance_to_package(enet_node); + enet_node = ofw_bus_get_node(dev); if (OF_getprop(enet_node, "local-mac-address", (void *)sc->sc_mac_addr, 6) == -1) { @@ -155,9 +146,9 @@ dtsec_fdt_attach(device_t dev) } /* Get link speed */ - if (ofw_bus_node_is_compatible(enet_node, "fsl,fman-1g-mac") != 0) + if (ofw_bus_is_compatible(dev, "fsl,fman-dtsec") != 0) sc->sc_eth_dev_type = ETH_DTSEC; - else if (ofw_bus_node_is_compatible(enet_node, "fsl,fman-10g-mac") != 0) + else if (ofw_bus_is_compatible(dev, "fsl,fman-xgec") != 0) sc->sc_eth_dev_type = ETH_10GSEC; else return(ENXIO); @@ -197,7 +188,7 @@ dtsec_fdt_attach(device_t dev) return (ENXIO); /* Get RX/TX port handles */ - if (OF_getprop(enet_node, "fsl,port-handles", (void *)fman_rxtx_node, + if (OF_getprop(enet_node, "fsl,fman-ports", (void *)fman_rxtx_node, sizeof(fman_rxtx_node)) <= 0) return (ENXIO); @@ -211,11 +202,11 @@ dtsec_fdt_attach(device_t dev) fman_rxtx_node[1] = OF_instance_to_package(fman_rxtx_node[1]); if (ofw_bus_node_is_compatible(fman_rxtx_node[0], - "fsl,fman-port-1g-rx") == 0) + "fsl,fman-v2-port-rx") == 0) return (ENXIO); if (ofw_bus_node_is_compatible(fman_rxtx_node[1], - "fsl,fman-port-1g-tx") == 0) + "fsl,fman-v2-port-tx") == 0) return (ENXIO); /* Get RX port HW id */ @@ -228,11 +219,12 @@ dtsec_fdt_attach(device_t dev) sizeof(sc->sc_port_tx_hw_id)) <= 0) return (ENXIO); - /* Get QMan channel */ - if (OF_getprop(fman_rxtx_node[1], "fsl,qman-channel-id", - (void *)&sc->sc_port_tx_qman_chan, - sizeof(sc->sc_port_tx_qman_chan)) <= 0) + if (OF_getprop(fman_rxtx_node[1], "cell-index", &fman_tx_cell, + sizeof(fman_tx_cell)) <= 0) return (ENXIO); + /* Get QMan channel */ + sc->sc_port_tx_qman_chan = fman_qman_channel_id(device_get_parent(dev), + fman_tx_cell); return (dtsec_attach(dev)); } diff --git a/sys/dev/dpaa/if_dtsec_rm.c b/sys/dev/dpaa/if_dtsec_rm.c index 06e9f0165ed..50ef2be1ac6 100644 --- a/sys/dev/dpaa/if_dtsec_rm.c +++ b/sys/dev/dpaa/if_dtsec_rm.c @@ -323,6 +323,7 @@ dtsec_rm_pool_rx_init(struct dtsec_softc *sc) DTSEC_RM_POOL_RX_HIGH_MARK, 0, 0, dtsec_rm_pool_rx_depleted, sc, NULL, NULL); if (sc->sc_rx_pool == NULL) { + device_printf(sc->sc_dev, "NULL rx pool somehow\n"); dtsec_rm_pool_rx_free(sc); return (EIO); } diff --git a/sys/dev/dpaa/qman_fdt.c b/sys/dev/dpaa/qman_fdt.c index 4c23c5fc4bd..e37196d54aa 100644 --- a/sys/dev/dpaa/qman_fdt.c +++ b/sys/dev/dpaa/qman_fdt.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -105,7 +106,8 @@ static driver_t qm_portals_driver = { }; static devclass_t qm_portals_devclass; -DRIVER_MODULE(qman_portals, ofwbus, qm_portals_driver, qm_portals_devclass, 0, 0); +EARLY_DRIVER_MODULE(qman_portals, ofwbus, qm_portals_driver, + qm_portals_devclass, 0, 0, BUS_PASS_BUS); static void get_addr_props(phandle_t node, uint32_t *addrp, uint32_t *sizep) @@ -121,7 +123,7 @@ static int qman_portals_fdt_probe(device_t dev) { - if (!ofw_bus_is_compatible(dev, "qman-portals")) + if (!ofw_bus_is_compatible(dev, "fsl,qman-portals")) return (ENXIO); device_set_desc(dev, BMAN_PORT_DEVSTR); @@ -129,36 +131,87 @@ qman_portals_fdt_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +static phandle_t +qman_portal_find_cpu(int cpu) +{ + phandle_t node; + pcell_t reg; + + node = OF_finddevice("/cpus"); + if (node == -1) + return (-1); + + for (node = OF_child(node); node != 0; node = OF_peer(node)) { + if (OF_getprop(node, "reg", ®, sizeof(reg)) <= 0) + continue; + if (reg == cpu) + return (node); + } + return (-1); +} + static int qman_portals_fdt_attach(device_t dev) { struct dpaa_portals_softc *sc; - struct resource_list_entry *rle; phandle_t node, child, cpu_node; - vm_paddr_t portal_pa; + vm_paddr_t portal_pa, portal_par_pa; vm_size_t portal_size; - uint32_t addr, size; + uint32_t addr, paddr, size; ihandle_t cpu; int cpu_num, cpus, intr_rid; struct dpaa_portals_devinfo di; struct ofw_bus_devinfo ofw_di = {}; + cell_t *range; + int nrange; + int i; cpus = 0; sc = device_get_softc(dev); sc->sc_dev = dev; node = ofw_bus_get_node(dev); + + /* Get this node's range */ + get_addr_props(ofw_bus_get_node(device_get_parent(dev)), &paddr, &size); get_addr_props(node, &addr, &size); + nrange = OF_getencprop_alloc(node, "ranges", + sizeof(*range), (void **)&range); + if (nrange < addr + paddr + size) + return (ENXIO); + portal_pa = portal_par_pa = 0; + portal_size = 0; + for (i = 0; i < addr; i++) { + portal_pa <<= 32; + portal_pa |= range[i]; + } + for (; i < paddr + addr; i++) { + portal_par_pa <<= 32; + portal_par_pa |= range[i]; + } + portal_pa += portal_par_pa; + for (; i < size + paddr + addr; i++) { + portal_size = (uintmax_t)portal_size << 32; + portal_size |= range[i]; + } + OF_prop_free(range); + sc->sc_dp_size = portal_size; + sc->sc_dp_pa = portal_pa; + /* Find portals tied to CPUs */ for (child = OF_child(node); child != 0; child = OF_peer(child)) { + if (cpus >= mp_ncpus) + break; if (!ofw_bus_node_is_compatible(child, "fsl,qman-portal")) { continue; } /* Checkout related cpu */ if (OF_getprop(child, "cpu-handle", (void *)&cpu, sizeof(cpu)) <= 0) { - continue; + cpu = qman_portal_find_cpu(cpus); + if (cpu <= 0) + continue; } /* Acquire cpu number */ cpu_node = OF_instance_to_package(cpu); @@ -169,9 +222,6 @@ qman_portals_fdt_attach(device_t dev) cpus++; - if (cpus > MAXCPU) - break; - if (ofw_bus_gen_setup_devinfo(&ofw_di, child) != 0) { device_printf(dev, "could not set up devinfo\n"); continue; @@ -192,17 +242,6 @@ qman_portals_fdt_attach(device_t dev) continue; } di.di_intr_rid = intr_rid; - - ofw_reg_to_paddr(child, 0, &portal_pa, &portal_size, NULL); - rle = resource_list_find(&di.di_res, SYS_RES_MEMORY, 0); - - if (sc->sc_dp_pa == 0) - sc->sc_dp_pa = portal_pa - rle->start; - - portal_size = rle->end + 1; - rle = resource_list_find(&di.di_res, SYS_RES_MEMORY, 1); - portal_size = ulmax(rle->end + 1, portal_size); - sc->sc_dp_size = ulmax(sc->sc_dp_size, portal_size); if (dpaa_portal_alloc_res(dev, &di, cpu_num)) goto err; diff --git a/sys/powerpc/conf/dpaa/files.dpaa b/sys/powerpc/conf/dpaa/files.dpaa index 18c44f9df91..b4a6c1aa29b 100644 --- a/sys/powerpc/conf/dpaa/files.dpaa +++ b/sys/powerpc/conf/dpaa/files.dpaa @@ -69,8 +69,6 @@ contrib/ncsw/user/env/core.c optional dpaa \ no-depend compile-with "${DPAA_COMPILE_CMD}" # FreeBSD Wrappers -dev/dpaa/dpaa.c optional dpaa fdt \ - no-depend compile-with "${DPAA_COMPILE_CMD}" dev/dpaa/portals_common.c optional dpaa \ no-depend compile-with "${DPAA_COMPILE_CMD}" dev/dpaa/bman_portals.c optional dpaa fdt \ From 1deef6e403716abe330fd4d0ba46a707d37a2ac5 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:10:56 +0000 Subject: [PATCH 041/204] Always set CLEANFILES, even if not building. This will ensure that 'make clean' does the right thing. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- share/mk/bsd.lib.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 1fab97cf9e8..67a5630996b 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -304,7 +304,6 @@ all: .else .if defined(_LIBS) && !empty(_LIBS) all: ${_LIBS} -CLEANFILES+= ${_LIBS} .endif .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) @@ -312,6 +311,8 @@ all: all-man .endif .endif +CLEANFILES+= ${_LIBS} + _EXTRADEPEND: .if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME) .if defined(DPADD) && !empty(DPADD) From f4fbac193108ea063ad3cbf2c39de5845208901d Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:10:59 +0000 Subject: [PATCH 042/204] DIRDEPS_BUILD: Don't hook 'beforebuild' into 'all' in MAKELEVEL 0. This was a mistake in r295641, but is effectively prevented from being a problem due to r296699 preventing 'make all' from being usable at MAKELEVEL 0 for DIRDEPS_BUILD. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- share/mk/bsd.init.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.init.mk b/share/mk/bsd.init.mk index b7a45d9ac43..35cd3b1a90d 100644 --- a/share/mk/bsd.init.mk +++ b/share/mk/bsd.init.mk @@ -15,10 +15,6 @@ ____: .endif .include .MAIN: all -beforebuild: .PHONY .NOTMAIN -.if !defined(_SKIP_BUILD) -all: beforebuild .WAIT -.endif .if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) # this tells lib.mk and prog.mk to not actually build anything @@ -28,6 +24,11 @@ _SKIP_BUILD = not building at level 0 .warning ${_SKIP_BUILD} .endif +beforebuild: .PHONY .NOTMAIN +.if !defined(_SKIP_BUILD) +all: beforebuild .WAIT +.endif + .if ${MK_META_MODE} == "yes" .if !exists(/dev/filemon) && \ ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON) && \ From d7173250be0de51823a6d67876e18001bd133d58 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:11:02 +0000 Subject: [PATCH 043/204] Consolidate the "don't build" optimizations into _SKIP_BUILD. _SKIP_BUILD will be set when nothing is expected to be built. This can be used to optimize some tree-walks and operations which don't need to load dependency files or generate dependencies via beforebuild-style hacks. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- share/mk/bsd.dep.mk | 6 ++---- share/mk/bsd.init.mk | 24 ++++++++++++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index c5d242f166e..9d975dac617 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -77,12 +77,10 @@ _meta_filemon= 1 .endif # Skip reading .depend when not needed to speed up tree-walks and simple -# lookups. For install, only do this if no other targets are specified. +# lookups. See _SKIP_BUILD logic in bsd.init.mk for more details. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. -.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ - ${.TARGETS:M*install*} == ${.TARGETS} || \ - make(analyze) || defined(_meta_filemon) || make(print-dir) +.if defined(_SKIP_BUILD) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) .MAKE.DEPENDFILE= /dev/null diff --git a/share/mk/bsd.init.mk b/share/mk/bsd.init.mk index 35cd3b1a90d..5e8951a6e60 100644 --- a/share/mk/bsd.init.mk +++ b/share/mk/bsd.init.mk @@ -16,11 +16,27 @@ ____: .include .MAIN: all -.if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) -# this tells lib.mk and prog.mk to not actually build anything -_SKIP_BUILD = not building at level 0 +# Some targets need to know when something may build. This is used to +# optimize targets that are only needed when building something, such as +# (not) reading in depend files. For DIRDEPS_BUILD, it will only calculate +# the dependency graph at .MAKE.LEVEL==0, so nothing should be built there. +# Skip "build" logic if: +# - DIRDEPS_BUILD at MAKELEVEL 0 +# - make -V is used without an override +# - make install is used without other targets. This is to avoid breaking +# things like 'make all install' or 'make foo install'. +# - non-build targets are called +.if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \ + ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) +_SKIP_BUILD= not building at level 0 +.elseif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ + ${.TARGETS:M*install*} == ${.TARGETS} || \ + make(clean*) || make(obj) || make(analyze) || make(print-dir) || \ + make(destroy*) +# Skip building, but don't show a warning. +_SKIP_BUILD= .endif -.if ${.MAKE.LEVEL} > 0 && !empty(_SKIP_BUILD) +.if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL} > 0 && !empty(_SKIP_BUILD) .warning ${_SKIP_BUILD} .endif From 34d39d2c4ed74b068a52d049f851dcace4925ceb Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:11:05 +0000 Subject: [PATCH 044/204] DIRDEPS_BUILD: Consolidate some logic for skipping of reading Makefile.depend. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- share/mk/bsd.dep.mk | 5 +++-- share/mk/bsd.subdir.mk | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index 9d975dac617..acc66991619 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -82,7 +82,8 @@ _meta_filemon= 1 # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. .if defined(_SKIP_BUILD) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 -.if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) +.if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) || \ + make(obj) || make(clean*) || make(destroy*) .MAKE.DEPENDFILE= /dev/null .endif .endif @@ -196,7 +197,7 @@ CFLAGS+= ${DEPEND_CFLAGS} .endif # !defined(_meta_filemon) .endif # defined(SRCS) -.if ${MK_DIRDEPS_BUILD} == "yes" && !make(analyze) && !make(print-dir) +.if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.DEPENDFILE} != "/dev/null" # Prevent meta.autodep.mk from tracking "local dependencies". .depend: .include diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 9d1fed72073..e5c73ac8355 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -70,7 +70,10 @@ print-dir: .PHONY .endif .if !defined(NEED_SUBDIR) -.if ${.MAKE.LEVEL} == 0 && ${MK_DIRDEPS_BUILD} == "yes" && !empty(SUBDIR) && !(make(clean*) || make(destroy*)) +# .MAKE.DEPENDFILE==/dev/null is set by bsd.dep.mk to avoid reading +# Makefile.depend +.if ${.MAKE.LEVEL} == 0 && ${MK_DIRDEPS_BUILD} == "yes" && !empty(SUBDIR) && \ + ${.MAKE.DEPENDFILE} != "/dev/null" .include # ignore this _SUBDIR: From df5b485a4ff9be0632168dfecbd6f747be77083e Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:11:09 +0000 Subject: [PATCH 045/204] Fix 'rebuild during install' error to only trigger on 'make install'. This allows 'make foo install' or 'make all install'. It is a similar fix as r304697 did for reading dependency files. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- share/mk/bsd.sys.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index e94977c43cf..7a4ed45a8a6 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -209,7 +209,7 @@ CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}} .if defined(SRCTOP) # Prevent rebuilding during install to support read-only objdirs. -.if !make(all) && make(install) && empty(.MAKE.MODE:Mmeta) +.if ${.TARGETS:M*install*} == ${.TARGETS} && empty(.MAKE.MODE:Mmeta) CFLAGS+= ERROR-tried-to-rebuild-during-make-install .endif .endif From 5e1eb60d943d42d38113a8c3f2df04899d488948 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:11:12 +0000 Subject: [PATCH 046/204] Generate and use a proper .depend file for tables.h. Reported by: jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- lib/libsysdecode/Makefile | 3 ++- lib/libsysdecode/mktables | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile index 5e0590e912f..692bfbf6f08 100644 --- a/lib/libsysdecode/Makefile +++ b/lib/libsysdecode/Makefile @@ -110,8 +110,9 @@ CFLAGS.gcc.ioctl.c+= -Wno-unused CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} +DEPENDOBJS+= tables.h tables.h: mktables - sh ${.CURDIR}/mktables ${DESTDIR}${INCLUDEDIR} > ${.TARGET} + sh ${.CURDIR}/mktables ${DESTDIR}${INCLUDEDIR} ${.TARGET} ioctl.c: mkioctls env MACHINE=${MACHINE} CPP="${CPP}" \ diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index 0cc2ff3dc77..e51ffe36602 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -37,11 +37,16 @@ LC_ALL=C; export LC_ALL if [ -z "$1" ] then - echo "usage: sh $0 include-dir" + echo "usage: sh $0 include-dir [output-file]" exit 1 fi include_dir=$1 +if [ -n "$2" ]; then + output_file="$2" + exec > "$output_file" +fi +all_headers= # # Generate a table C #definitions. The including file can define the # TABLE_NAME(n), TABLE_ENTRY(x), and TABLE_END macros to define what @@ -60,6 +65,7 @@ gen_table() else filter="egrep -v" fi + all_headers="${all_headers:+${all_headers} }${file}" cat <<_EOF_ TABLE_START(${name}) _EOF_ @@ -142,3 +148,12 @@ gen_table "sigcode" "SI_[A-Z]+[[:space:]]+0(x[0-9abcdef]+)?" "sys/ gen_table "umtxcvwaitflags" "CVWAIT_[A-Z_]+[[:space:]]+0x[0-9]+" "sys/umtx.h" gen_table "umtxrwlockflags" "URWLOCK_PREFER_READER[[:space:]]+0x[0-9]+" "sys/umtx.h" gen_table "caprights" "CAP_[A-Z_]+[[:space:]]+CAPRIGHT\([0-9],[[:space:]]+0x[0-9]{16}ULL\)" "sys/capsicum.h" + +# Generate a .depend file for our output file +if [ -n "$output_file" ]; then + echo "$output_file: \\" > ".depend.$output_file" + echo "$all_headers" | tr ' ' '\n' | sort -u | + sed -e "s,^, $include_dir/," -e 's,$, \\,' >> \ + ".depend.$output_file" + echo >> ".depend.$output_file" +fi From 7c6d0bb1a04aa66006b38ea158a92d0543b57896 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:11:15 +0000 Subject: [PATCH 047/204] Move libsysdecode-specific hack out of buildworld. This should fix the lib32 build since it was not removing the generated ioctl.c. This file is generated by a find(1) call, so cannot use normal dependency tracking methods. Reported by: jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- Makefile.inc1 | 3 --- lib/libsysdecode/Makefile | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 5db4acbeaa3..d78cfd26a16 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -676,9 +676,6 @@ _worldtmp: .PHONY .endif .else rm -rf ${WORLDTMP}/legacy/usr/include -# XXX - These can depend on any header file. - rm -f ${OBJTREE}${.CURDIR}/lib/libsysdecode/ioctl.c - rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c .endif .for _dir in \ lib lib/casper usr legacy/bin legacy/usr diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile index 692bfbf6f08..b84ef4e615b 100644 --- a/lib/libsysdecode/Makefile +++ b/lib/libsysdecode/Makefile @@ -114,7 +114,12 @@ DEPENDOBJS+= tables.h tables.h: mktables sh ${.CURDIR}/mktables ${DESTDIR}${INCLUDEDIR} ${.TARGET} -ioctl.c: mkioctls +# mkioctls runs find(1) for headers so needs to rebuild every time. This used +# to be a hack only done in buildworld. +.if !defined(_SKIP_BUILD) +ioctl.c: .PHONY +.endif +ioctl.c: mkioctls .META env MACHINE=${MACHINE} CPP="${CPP}" \ /bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET} From 4ede042b3968b0396fe887e4f03dcd15aa48be93 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:11:19 +0000 Subject: [PATCH 048/204] Remove lingering ELFCOPY_AS_OBJCOPY missed in r306649. Sponsored by: Dell EMC Isilon --- targets/pseudo/userland/gnu/Makefile.depend | 4 ---- 1 file changed, 4 deletions(-) diff --git a/targets/pseudo/userland/gnu/Makefile.depend b/targets/pseudo/userland/gnu/Makefile.depend index 5c6581b8f2d..cb9bda628cf 100644 --- a/targets/pseudo/userland/gnu/Makefile.depend +++ b/targets/pseudo/userland/gnu/Makefile.depend @@ -111,10 +111,6 @@ DIRDEPS = \ gnu/usr.bin/texinfo/makeinfo \ gnu/usr.bin/texinfo/texindex \ -.if ${MK_ELFCOPY_AS_OBJCOPY} == "no" -DIRDEPS+= gnu/usr.bin/binutils/objcopy -.endif - .if ${MK_GPL_DTC} != "no" DIRDEPS+= gnu/usr.bin/dtc .endif From d329c46cfacb473993e131c28a4e8e4886e726a8 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:11:23 +0000 Subject: [PATCH 049/204] DIRDEPS_BUILD: Connect new dependencies. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- lib/libcapsicum/Makefile.depend | 11 +++++++ lib/libefivar/Makefile.depend | 18 +++++++++++ sbin/zfsbootcfg/Makefile.depend | 32 ++++++++++++++++++++ targets/pseudo/userland/misc/Makefile.depend | 9 ++++++ usr.sbin/efivar/Makefile.depend | 19 ++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 lib/libcapsicum/Makefile.depend create mode 100644 lib/libefivar/Makefile.depend create mode 100644 sbin/zfsbootcfg/Makefile.depend create mode 100644 usr.sbin/efivar/Makefile.depend diff --git a/lib/libcapsicum/Makefile.depend b/lib/libcapsicum/Makefile.depend new file mode 100644 index 00000000000..f80275d86ab --- /dev/null +++ b/lib/libcapsicum/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/lib/libefivar/Makefile.depend b/lib/libefivar/Makefile.depend new file mode 100644 index 00000000000..3646e2e2b1a --- /dev/null +++ b/lib/libefivar/Makefile.depend @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/sbin/zfsbootcfg/Makefile.depend b/sbin/zfsbootcfg/Makefile.depend new file mode 100644 index 00000000000..b1a2eff6cb4 --- /dev/null +++ b/sbin/zfsbootcfg/Makefile.depend @@ -0,0 +1,32 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + cddl/lib/libavl \ + cddl/lib/libnvpair \ + cddl/lib/libumem \ + cddl/lib/libuutil \ + cddl/lib/libzfs \ + cddl/lib/libzfs_core \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libexpat \ + lib/libgeom \ + lib/libmd \ + lib/libsbuf \ + lib/libthr \ + lib/libutil \ + lib/libz \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/targets/pseudo/userland/misc/Makefile.depend b/targets/pseudo/userland/misc/Makefile.depend index a4091cc1d76..fc2a9ca01be 100644 --- a/targets/pseudo/userland/misc/Makefile.depend +++ b/targets/pseudo/userland/misc/Makefile.depend @@ -58,6 +58,9 @@ DIRDEPS.x86sys+= \ sys/boot/i386/zfsboot \ sys/boot/i386/zfsloader \ +DIRDEPS+= \ + sbin/zfsbootcfg \ + .endif DIRDEPS.amd64= \ @@ -75,6 +78,12 @@ DIRDEPS.amd64+= \ .endif +.if ${MK_EFI} != "no" +DIRDEPS+= \ + usr.sbin/efivar \ + +.endif + DIRDEPS.arm= ${_sys_boot_fdt} ${_sys_boot_efi} DIRDEPS.arm64= ${_sys_boot_fdt} ${_sys_boot_efi} DIRDEPS.i386= ${DIRDEPS.x86sys} ${_sys_boot_efi} diff --git a/usr.sbin/efivar/Makefile.depend b/usr.sbin/efivar/Makefile.depend new file mode 100644 index 00000000000..8af72d7991a --- /dev/null +++ b/usr.sbin/efivar/Makefile.depend @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libefivar \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From 490a8aa9a1d9db0dd5c64452808991576f2cdee3 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 13 Nov 2016 00:11:30 +0000 Subject: [PATCH 050/204] DIRDEPS_BUILD: Update dependencies. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- bin/echo/Makefile.depend | 1 + bin/sleep/Makefile.depend | 1 + rescue/rescue/Makefile.depend | 1 + sbin/md5/Makefile.depend | 1 + usr.bin/basename/Makefile.depend | 1 + usr.bin/cmp/Makefile.depend | 1 + usr.bin/col/Makefile.depend | 1 + usr.bin/dc/Makefile.depend | 1 + usr.bin/dirname/Makefile.depend | 2 ++ usr.bin/elfdump/Makefile.depend | 1 + usr.bin/fold/Makefile.depend | 1 + usr.bin/getopt/Makefile.depend | 2 ++ usr.bin/jot/Makefile.depend | 1 + usr.bin/kdump/Makefile.depend | 1 + usr.bin/locate/bigram/Makefile.depend | 2 ++ usr.bin/logname/Makefile.depend | 2 ++ usr.bin/printenv/Makefile.depend | 1 + usr.bin/tee/Makefile.depend | 1 + usr.bin/tr/Makefile.depend | 1 + usr.bin/write/Makefile.depend | 1 + usr.bin/yes/Makefile.depend | 2 ++ usr.sbin/daemon/Makefile.depend | 1 + 22 files changed, 27 insertions(+) diff --git a/bin/echo/Makefile.depend b/bin/echo/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/bin/echo/Makefile.depend +++ b/bin/echo/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/bin/sleep/Makefile.depend b/bin/sleep/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/bin/sleep/Makefile.depend +++ b/bin/sleep/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/rescue/rescue/Makefile.depend b/rescue/rescue/Makefile.depend index 38219b53ac8..5debdae2f66 100644 --- a/rescue/rescue/Makefile.depend +++ b/rescue/rescue/Makefile.depend @@ -24,6 +24,7 @@ DIRDEPS = \ lib/libbz2 \ lib/libc \ lib/libcam \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/libcrypt \ lib/libdevstat \ diff --git a/sbin/md5/Makefile.depend b/sbin/md5/Makefile.depend index 064e492dd3e..8aac374844e 100644 --- a/sbin/md5/Makefile.depend +++ b/sbin/md5/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/libmd \ diff --git a/usr.bin/basename/Makefile.depend b/usr.bin/basename/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/basename/Makefile.depend +++ b/usr.bin/basename/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/cmp/Makefile.depend b/usr.bin/cmp/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/cmp/Makefile.depend +++ b/usr.bin/cmp/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/col/Makefile.depend b/usr.bin/col/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/col/Makefile.depend +++ b/usr.bin/col/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/dc/Makefile.depend b/usr.bin/dc/Makefile.depend index 9d5105e918d..7e1b62db9b9 100644 --- a/usr.bin/dc/Makefile.depend +++ b/usr.bin/dc/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ secure/lib/libcrypto \ secure/lib/libssl \ diff --git a/usr.bin/dirname/Makefile.depend b/usr.bin/dirname/Makefile.depend index 9cb890b5836..4def626103c 100644 --- a/usr.bin/dirname/Makefile.depend +++ b/usr.bin/dirname/Makefile.depend @@ -5,8 +5,10 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ include \ + include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/elfdump/Makefile.depend b/usr.bin/elfdump/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/elfdump/Makefile.depend +++ b/usr.bin/elfdump/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/fold/Makefile.depend b/usr.bin/fold/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/fold/Makefile.depend +++ b/usr.bin/fold/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/getopt/Makefile.depend b/usr.bin/getopt/Makefile.depend index 9cb890b5836..4def626103c 100644 --- a/usr.bin/getopt/Makefile.depend +++ b/usr.bin/getopt/Makefile.depend @@ -5,8 +5,10 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ include \ + include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/jot/Makefile.depend b/usr.bin/jot/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/jot/Makefile.depend +++ b/usr.bin/jot/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/kdump/Makefile.depend b/usr.bin/kdump/Makefile.depend index 71c82136392..59ec51a9b1d 100644 --- a/usr.bin/kdump/Makefile.depend +++ b/usr.bin/kdump/Makefile.depend @@ -9,6 +9,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcasper/libcasper \ lib/libcasper/services/cap_grp \ lib/libcasper/services/cap_pwd \ diff --git a/usr.bin/locate/bigram/Makefile.depend b/usr.bin/locate/bigram/Makefile.depend index 9cb890b5836..4def626103c 100644 --- a/usr.bin/locate/bigram/Makefile.depend +++ b/usr.bin/locate/bigram/Makefile.depend @@ -5,8 +5,10 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ include \ + include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/logname/Makefile.depend b/usr.bin/logname/Makefile.depend index 9cb890b5836..4def626103c 100644 --- a/usr.bin/logname/Makefile.depend +++ b/usr.bin/logname/Makefile.depend @@ -5,8 +5,10 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ include \ + include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/printenv/Makefile.depend b/usr.bin/printenv/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/printenv/Makefile.depend +++ b/usr.bin/printenv/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/tee/Makefile.depend b/usr.bin/tee/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/tee/Makefile.depend +++ b/usr.bin/tee/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/tr/Makefile.depend b/usr.bin/tr/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/tr/Makefile.depend +++ b/usr.bin/tr/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/write/Makefile.depend b/usr.bin/write/Makefile.depend index 3646e2e2b1a..4def626103c 100644 --- a/usr.bin/write/Makefile.depend +++ b/usr.bin/write/Makefile.depend @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.bin/yes/Makefile.depend b/usr.bin/yes/Makefile.depend index 9cb890b5836..4def626103c 100644 --- a/usr.bin/yes/Makefile.depend +++ b/usr.bin/yes/Makefile.depend @@ -5,8 +5,10 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ include \ + include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ diff --git a/usr.sbin/daemon/Makefile.depend b/usr.sbin/daemon/Makefile.depend index 0f77a15a871..58f9a3347b0 100644 --- a/usr.sbin/daemon/Makefile.depend +++ b/usr.sbin/daemon/Makefile.depend @@ -5,6 +5,7 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ include \ + include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ From 6487a709f3b4e7edecf15d3c7057ad4c0311be82 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Sun, 13 Nov 2016 00:46:11 +0000 Subject: [PATCH 051/204] Add two new ddb commands: show device/show all devices Shows several useful pieces of information from the device including the softc and ivars pointers. --- sys/kern/subr_bus.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index d80c3d91075..91dc30b9109 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include "opt_bus.h" +#include "opt_ddb.h" #include #include @@ -65,6 +66,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + SYSCTL_NODE(_hw, OID_AUTO, bus, CTLFLAG_RW, NULL, NULL); SYSCTL_ROOT_NODE(OID_AUTO, dev, CTLFLAG_RW, NULL, NULL); @@ -143,6 +146,9 @@ static MALLOC_DEFINE(M_BUS_SC, "bus-sc", "Bus data structures, softc"); static void devctl2_init(void); +#define DRIVERNAME(d) ((d)? d->name : "no driver") +#define DEVCLANAME(d) ((d)? d->name : "no devclass") + #ifdef BUS_DEBUG static int bus_debug = 1; @@ -151,8 +157,6 @@ SYSCTL_INT(_debug, OID_AUTO, bus_debug, CTLFLAG_RWTUN, &bus_debug, 0, #define PDEBUG(a) if (bus_debug) {printf("%s:%d: ", __func__, __LINE__), printf a; printf("\n");} #define DEVICENAME(d) ((d)? device_get_name(d): "no device") -#define DRIVERNAME(d) ((d)? d->name : "no driver") -#define DEVCLANAME(d) ((d)? d->name : "no devclass") /** * Produce the indenting, indent*2 spaces plus a '.' ahead of that to @@ -176,8 +180,6 @@ void print_devclass_list(void); /* Make the compiler ignore the function calls */ #define PDEBUG(a) /* nop */ #define DEVICENAME(d) /* nop */ -#define DRIVERNAME(d) /* nop */ -#define DEVCLANAME(d) /* nop */ #define print_device_short(d,i) /* nop */ #define print_device(d,i) /* nop */ @@ -5586,3 +5588,32 @@ devctl2_init(void) make_dev_credf(MAKEDEV_ETERNAL, &devctl2_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0600, "devctl2"); } + +#ifdef DDB +DB_SHOW_COMMAND(device, db_show_device) +{ + device_t dev; + + if (!have_addr) + return; + + dev = (device_t)addr; + + db_printf("name: %s\n", device_get_nameunit(dev)); + db_printf(" driver: %s\n", DRIVERNAME(dev->driver)); + db_printf(" class: %s\n", DEVCLANAME(dev->devclass)); + db_printf(" addr: %p\n", dev); + db_printf(" parent: %p\n", dev->parent); + db_printf(" softc: %p\n", dev->softc); + db_printf(" ivars: %p\n", dev->ivars); +} + +DB_SHOW_ALL_COMMAND(devices, db_show_all_devices) +{ + device_t dev; + + TAILQ_FOREACH(dev, &bus_data_devices, devlink) { + db_show_device((db_expr_t)dev, true, count, modif); + } +} +#endif From dc399583ba097adddf382af55eaa6060cc55727e Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sun, 13 Nov 2016 03:56:26 +0000 Subject: [PATCH 052/204] Use providergone method to cover race between destroy and g_access(). Reviewed by: markj MFC after: 2 weeks Sponsored by: iXsystems, Inc. --- sys/geom/mirror/g_mirror.c | 66 ++++++++++++++++++++++---------------- sys/geom/mirror/g_mirror.h | 1 + 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index 52c007efd1d..e1daae1ddaf 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -79,12 +79,12 @@ SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, sync_requests, CTLFLAG_RDTUN, static eventhandler_tag g_mirror_post_sync = NULL; static int g_mirror_shutdown = 0; -static int g_mirror_destroy_geom(struct gctl_req *req, struct g_class *mp, - struct g_geom *gp); +static g_ctl_destroy_geom_t g_mirror_destroy_geom; static g_taste_t g_mirror_taste; +static g_init_t g_mirror_init; +static g_fini_t g_mirror_fini; +static g_provgone_t g_mirror_providergone; static g_resize_t g_mirror_resize; -static void g_mirror_init(struct g_class *mp); -static void g_mirror_fini(struct g_class *mp); struct g_class g_mirror_class = { .name = G_MIRROR_CLASS_NAME, @@ -94,6 +94,7 @@ struct g_class g_mirror_class = { .destroy_geom = g_mirror_destroy_geom, .init = g_mirror_init, .fini = g_mirror_fini, + .providergone = g_mirror_providergone, .resize = g_mirror_resize }; @@ -507,6 +508,26 @@ g_mirror_destroy_disk(struct g_mirror_disk *disk) } } +static void +g_mirror_free_device(struct g_mirror_softc *sc) +{ + + mtx_destroy(&sc->sc_queue_mtx); + mtx_destroy(&sc->sc_events_mtx); + mtx_destroy(&sc->sc_done_mtx); + sx_destroy(&sc->sc_lock); + free(sc, M_MIRROR); +} + +static void +g_mirror_providergone(struct g_provider *pp) +{ + struct g_mirror_softc *sc = pp->private; + + if ((--sc->sc_refcnt) == 0) + g_mirror_free_device(sc); +} + static void g_mirror_destroy_device(struct g_mirror_softc *sc) { @@ -549,12 +570,10 @@ g_mirror_destroy_device(struct g_mirror_softc *sc) g_wither_geom(sc->sc_sync.ds_geom, ENXIO); G_MIRROR_DEBUG(0, "Device %s destroyed.", gp->name); g_wither_geom(gp, ENXIO); - g_topology_unlock(); - mtx_destroy(&sc->sc_queue_mtx); - mtx_destroy(&sc->sc_events_mtx); - mtx_destroy(&sc->sc_done_mtx); sx_xunlock(&sc->sc_lock); - sx_destroy(&sc->sc_lock); + if ((--sc->sc_refcnt) == 0) + g_mirror_free_device(sc); + g_topology_unlock(); } static void @@ -868,7 +887,7 @@ g_mirror_flush_done(struct bio *bp) struct bio *pbp; pbp = bp->bio_parent; - sc = pbp->bio_to->geom->softc; + sc = pbp->bio_to->private; mtx_lock(&sc->sc_done_mtx); if (pbp->bio_error == 0) pbp->bio_error = bp->bio_error; @@ -905,7 +924,7 @@ g_mirror_regular_request(struct bio *bp) g_topology_assert_not(); pbp = bp->bio_parent; - sc = pbp->bio_to->geom->softc; + sc = pbp->bio_to->private; bp->bio_from->index--; if (bp->bio_cmd == BIO_WRITE) sc->sc_writes--; @@ -1036,7 +1055,7 @@ g_mirror_candelete(struct bio *bp) struct g_mirror_disk *disk; int *val; - sc = bp->bio_to->geom->softc; + sc = bp->bio_to->private; LIST_FOREACH(disk, &sc->sc_disks, d_next) { if (disk->d_flags & G_MIRROR_DISK_FLAG_CANDELETE) break; @@ -1061,7 +1080,7 @@ g_mirror_kernel_dump(struct bio *bp) * we will not be able to read the dump after the reboot if it will be * connected and synchronized later. Can we do something better? */ - sc = bp->bio_to->geom->softc; + sc = bp->bio_to->private; disk = LIST_FIRST(&sc->sc_disks); gkd = (struct g_kerneldump *)bp->bio_data; @@ -1121,7 +1140,7 @@ g_mirror_start(struct bio *bp) { struct g_mirror_softc *sc; - sc = bp->bio_to->geom->softc; + sc = bp->bio_to->private; /* * If sc == NULL or there are no valid disks, provider's error * should be set and g_mirror_start() should not be called at all. @@ -1637,7 +1656,7 @@ g_mirror_register_request(struct bio *bp) { struct g_mirror_softc *sc; - sc = bp->bio_to->geom->softc; + sc = bp->bio_to->private; switch (bp->bio_cmd) { case BIO_READ: switch (sc->sc_balance) { @@ -1804,7 +1823,6 @@ g_mirror_try_destroy(struct g_mirror_softc *sc) } else { g_topology_unlock(); g_mirror_destroy_device(sc); - free(sc, M_MIRROR); } return (1); } @@ -2117,6 +2135,8 @@ g_mirror_launch_provider(struct g_mirror_softc *sc) } } } + pp->private = sc; + sc->sc_refcnt++; sc->sc_provider = pp; g_error_provider(pp, 0); g_topology_unlock(); @@ -2898,9 +2918,7 @@ g_mirror_access(struct g_provider *pp, int acr, int acw, int ace) G_MIRROR_DEBUG(2, "Access request for %s: r%dw%de%d.", pp->name, acr, acw, ace); - sc = pp->geom->softc; - if (sc == NULL && acr <= 0 && acw <= 0 && ace <= 0) - return (0); + sc = pp->private; KASSERT(sc != NULL, ("NULL softc (provider=%s).", pp->name)); g_topology_unlock(); @@ -2959,6 +2977,7 @@ g_mirror_create(struct g_class *mp, const struct g_mirror_metadata *md) sc->sc_idle = 1; sc->sc_last_write = time_uptime; sc->sc_writes = 0; + sc->sc_refcnt = 1; sx_init(&sc->sc_lock, "gmirror:lock"); bioq_init(&sc->sc_queue); mtx_init(&sc->sc_queue_mtx, "gmirror:queue", NULL, MTX_DEF); @@ -2989,12 +3008,8 @@ g_mirror_create(struct g_class *mp, const struct g_mirror_metadata *md) G_MIRROR_DEBUG(1, "Cannot create kernel thread for %s.", sc->sc_name); g_destroy_geom(sc->sc_sync.ds_geom); - mtx_destroy(&sc->sc_done_mtx); - mtx_destroy(&sc->sc_events_mtx); - mtx_destroy(&sc->sc_queue_mtx); - sx_destroy(&sc->sc_lock); g_destroy_geom(sc->sc_geom); - free(sc, M_MIRROR); + g_mirror_free_device(sc); return (NULL); } @@ -3017,8 +3032,6 @@ g_mirror_destroy(struct g_mirror_softc *sc, int how) struct g_mirror_disk *disk; g_topology_assert_not(); - if (sc == NULL) - return (ENXIO); sx_assert(&sc->sc_lock, SX_XLOCKED); if (sc->sc_provider_open != 0 || SCHEDULER_STOPPED()) { @@ -3068,7 +3081,6 @@ g_mirror_destroy(struct g_mirror_softc *sc, int how) G_MIRROR_DEBUG(4, "%s: Woken up %p.", __func__, &sc->sc_worker); sx_xlock(&sc->sc_lock); g_mirror_destroy_device(sc); - free(sc, M_MIRROR); return (0); } diff --git a/sys/geom/mirror/g_mirror.h b/sys/geom/mirror/g_mirror.h index e730e42e876..ed499a55c8f 100644 --- a/sys/geom/mirror/g_mirror.h +++ b/sys/geom/mirror/g_mirror.h @@ -207,6 +207,7 @@ struct g_mirror_softc { int sc_idle; /* DIRTY flags removed. */ time_t sc_last_write; u_int sc_writes; + u_int sc_refcnt; /* Number of softc references */ TAILQ_HEAD(, g_mirror_event) sc_events; struct mtx sc_events_mtx; From a256d9237a170154cf1c93857ba5a63d3c18762e Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sun, 13 Nov 2016 08:42:02 +0000 Subject: [PATCH 053/204] Remove bcm2835_common.c from files.arm64, it no longer exists. Sponsored by: ABT Systems Ltd --- sys/conf/files.arm64 | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index ea7b7d4b443..879515185c7 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -52,7 +52,6 @@ arm/arm/pmu.c standard arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq \ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc soc_brcm_bcm2837 -arm/broadcom/bcm2835/bcm2835_common.c optional fdt soc_brcm_bcm2837 arm/broadcom/bcm2835/bcm2835_cpufreq.c optional soc_brcm_bcm2837 arm/broadcom/bcm2835/bcm2835_dma.c optional soc_brcm_bcm2837 arm/broadcom/bcm2835/bcm2835_fbd.c optional vt soc_brcm_bcm2837 From a61804c095588d67704f0d7512f86cbcce08857f Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sun, 13 Nov 2016 09:33:41 +0000 Subject: [PATCH 054/204] Use the new ofw_bus_node_is_compatible function in the mips code. Sponsored by: ABT Systems Ltd --- sys/mips/mediatek/mtk_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/mips/mediatek/mtk_soc.c b/sys/mips/mediatek/mtk_soc.c index ff40abfd1eb..62e01c80563 100644 --- a/sys/mips/mediatek/mtk_soc.c +++ b/sys/mips/mediatek/mtk_soc.c @@ -248,7 +248,7 @@ mtk_soc_try_early_detect(void) return; for (i = 0; compat_data[i].ocd_str != NULL; i++) { - if (fdt_is_compatible(node, compat_data[i].ocd_str)) { + if (ofw_bus_node_is_compatible(node, compat_data[i].ocd_str)) { mtk_soc_socid = compat_data[i].ocd_data; break; } From 53232c0d1d493813a5915992e3dcf754e02c9c75 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sun, 13 Nov 2016 12:06:25 +0000 Subject: [PATCH 055/204] Remove spurious space. MFC after: 1 month --- sys/fs/autofs/autofs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/autofs/autofs.c b/sys/fs/autofs/autofs.c index 5389b1c4b16..1119ee7a4b1 100644 --- a/sys/fs/autofs/autofs.c +++ b/sys/fs/autofs/autofs.c @@ -61,7 +61,7 @@ */ #include - __FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD$"); #include #include From aa1f683bf3a2008d4e8048249bef93e646f5ad3c Mon Sep 17 00:00:00 2001 From: Michal Meloun Date: Sun, 13 Nov 2016 13:31:23 +0000 Subject: [PATCH 056/204] Allow DRM2 code to be built on platforms without AGP. This patch is taken from original drm-3.8 code. Differential Revision: https://reviews.freebsd.org/D8454 MFC after: 3 weeks --- sys/dev/drm2/drmP.h | 207 +++++++++++++++++++++++++++------ sys/dev/drm2/drm_memory.c | 4 +- sys/dev/drm2/drm_os_freebsd.c | 2 + sys/dev/drm2/drm_os_freebsd.h | 2 + sys/dev/drm2/ttm/ttm_bo_util.c | 3 +- 5 files changed, 178 insertions(+), 40 deletions(-) diff --git a/sys/dev/drm2/drmP.h b/sys/dev/drm2/drmP.h index 508fc309917..51f407c14a9 100644 --- a/sys/dev/drm2/drmP.h +++ b/sys/dev/drm2/drmP.h @@ -1204,17 +1204,6 @@ int drm_mmap_single(struct cdev *kdev, vm_ooffset_t *offset, vm_size_t size, struct vm_object **obj_res, int nprot); d_poll_t drm_poll; - /* Memory management support (drm_memory.h) */ -extern void drm_free_agp(DRM_AGP_MEM * handle, int pages); -extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); -#ifdef FREEBSD_NOTYET -extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev, - struct page **pages, - unsigned long num_pages, - uint32_t gtt_offset, - uint32_t type); -#endif /* FREEBSD_NOTYET */ -extern int drm_unbind_agp(DRM_AGP_MEM * handle); /* Misc. IOCTL support (drm_ioctl.h) */ extern int drm_irq_by_busid(struct drm_device *dev, void *data, @@ -1363,32 +1352,6 @@ extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc); extern int drm_modeset_ctl(struct drm_device *dev, void *data, struct drm_file *file_priv); - /* AGP/GART support (drm_agpsupport.h) */ -extern struct drm_agp_head *drm_agp_init(struct drm_device *dev); -extern int drm_agp_acquire(struct drm_device *dev); -extern int drm_agp_acquire_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); -extern int drm_agp_release(struct drm_device *dev); -extern int drm_agp_release_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); -extern int drm_agp_enable(struct drm_device *dev, struct drm_agp_mode mode); -extern int drm_agp_enable_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); -extern int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info); -extern int drm_agp_info_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); -extern int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request); -extern int drm_agp_alloc_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); -extern int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request); -extern int drm_agp_free_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); -extern int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request); -extern int drm_agp_unbind_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); -extern int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); -extern int drm_agp_bind_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); /* Stub support (drm_stub.h) */ extern int drm_setmaster_ioctl(struct drm_device *dev, void *data, @@ -1814,5 +1777,175 @@ int ttm_bo_mmap_single(struct ttm_bo_device *bdev, vm_ooffset_t *offset, struct ttm_buffer_object; void ttm_bo_release_mmap(struct ttm_buffer_object *bo); +#if __OS_HAS_AGP + /* Memory management support (drm_memory.h) */ +extern void drm_free_agp(DRM_AGP_MEM * handle, int pages); +extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); +#ifdef FREEBSD_NOTYET +extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev, + struct page **pages, + unsigned long num_pages, + uint32_t gtt_offset, + uint32_t type); +#endif /* FREEBSD_NOTYET */ +extern int drm_unbind_agp(DRM_AGP_MEM * handle); + + /* AGP/GART support (drm_agpsupport.h) */ +extern struct drm_agp_head *drm_agp_init(struct drm_device *dev); +extern int drm_agp_acquire(struct drm_device *dev); +extern int drm_agp_acquire_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_agp_release(struct drm_device *dev); +extern int drm_agp_release_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_agp_enable(struct drm_device *dev, struct drm_agp_mode mode); +extern int drm_agp_enable_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info); +extern int drm_agp_info_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request); +extern int drm_agp_alloc_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request); +extern int drm_agp_free_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request); +extern int drm_agp_unbind_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); +extern int drm_agp_bind_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); + +#else + +static inline void drm_free_agp(DRM_AGP_MEM * handle, int pages) +{ +} + +static inline int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start) +{ + return -ENODEV; +} + +static inline int drm_unbind_agp(DRM_AGP_MEM * handle) +{ + return -ENODEV; +} +#ifdef FREEBSD_NOTYET +static inline struct agp_memory *drm_agp_bind_pages(struct drm_device *dev, + struct page **pages, + unsigned long num_pages, + uint32_t gtt_offset, + uint32_t type) +{ + return NULL; +} +#endif +static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev) +{ + return NULL; +} + +static inline void drm_agp_clear(struct drm_device *dev) +{ +} + +static inline int drm_agp_acquire(struct drm_device *dev) +{ + return -ENODEV; +} + +static inline int drm_agp_acquire_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + return -ENODEV; +} + +static inline int drm_agp_release(struct drm_device *dev) +{ + return -ENODEV; +} + +static inline int drm_agp_release_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + return -ENODEV; +} + +static inline int drm_agp_enable(struct drm_device *dev, + struct drm_agp_mode mode) +{ + return -ENODEV; +} + +static inline int drm_agp_enable_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + return -ENODEV; +} + +static inline int drm_agp_info(struct drm_device *dev, + struct drm_agp_info *info) +{ + return -ENODEV; +} + +static inline int drm_agp_info_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + return -ENODEV; +} + +static inline int drm_agp_alloc(struct drm_device *dev, + struct drm_agp_buffer *request) +{ + return -ENODEV; +} + +static inline int drm_agp_alloc_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + return -ENODEV; +} + +static inline int drm_agp_free(struct drm_device *dev, + struct drm_agp_buffer *request) +{ + return -ENODEV; +} + +static inline int drm_agp_free_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + return -ENODEV; +} + +static inline int drm_agp_unbind(struct drm_device *dev, + struct drm_agp_binding *request) +{ + return -ENODEV; +} + +static inline int drm_agp_unbind_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + return -ENODEV; +} + +static inline int drm_agp_bind(struct drm_device *dev, + struct drm_agp_binding *request) +{ + return -ENODEV; +} + +static inline int drm_agp_bind_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + return -ENODEV; +} + +#endif /* __OS_HAS_AGP */ + #endif /* __KERNEL__ */ #endif diff --git a/sys/dev/drm2/drm_memory.c b/sys/dev/drm2/drm_memory.c index a25e5a288ee..226c2c15734 100644 --- a/sys/dev/drm2/drm_memory.c +++ b/sys/dev/drm2/drm_memory.c @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include +#define vunmap(handle) + #if __OS_HAS_AGP static void *agp_remap(unsigned long offset, unsigned long size, struct drm_device * dev) @@ -50,8 +52,6 @@ static void *agp_remap(unsigned long offset, unsigned long size, return NULL; } -#define vunmap(handle) - /** Wrapper around agp_free_memory() */ void drm_free_agp(DRM_AGP_MEM * handle, int pages) { diff --git a/sys/dev/drm2/drm_os_freebsd.c b/sys/dev/drm2/drm_os_freebsd.c index d8b45e8fb58..4ce8081887b 100644 --- a/sys/dev/drm2/drm_os_freebsd.c +++ b/sys/dev/drm2/drm_os_freebsd.c @@ -347,6 +347,7 @@ dmi_check_system(const struct dmi_system_id *sysid) return (res); } +#if __OS_HAS_MTRR int drm_mtrr_add(unsigned long offset, unsigned long size, unsigned int flags) { @@ -375,6 +376,7 @@ drm_mtrr_del(int handle __unused, unsigned long offset, unsigned long size, strlcpy(mrdesc.mr_owner, "drm", sizeof(mrdesc.mr_owner)); return (-mem_range_attr_set(&mrdesc, &act)); } +#endif void drm_clflush_pages(vm_page_t *pages, unsigned long num_pages) diff --git a/sys/dev/drm2/drm_os_freebsd.h b/sys/dev/drm2/drm_os_freebsd.h index 3c9983838e1..dc01c6a6459 100644 --- a/sys/dev/drm2/drm_os_freebsd.h +++ b/sys/dev/drm2/drm_os_freebsd.h @@ -592,8 +592,10 @@ typedef struct drm_pci_id_list #define CONFIG_COMPAT #endif +#ifndef __arm__ #define CONFIG_AGP 1 #define CONFIG_MTRR 1 +#endif #define CONFIG_FB 1 extern const char *fb_mode_option; diff --git a/sys/dev/drm2/ttm/ttm_bo_util.c b/sys/dev/drm2/ttm/ttm_bo_util.c index fbbaaf2029f..c53bb21450d 100644 --- a/sys/dev/drm2/ttm/ttm_bo_util.c +++ b/sys/dev/drm2/ttm/ttm_bo_util.c @@ -439,7 +439,8 @@ ttm_buffer_object_transfer(struct ttm_buffer_object *bo, vm_memattr_t ttm_io_prot(uint32_t caching_flags) { -#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) +#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || \ + defined(__arm__) if (caching_flags & TTM_PL_FLAG_WC) return (VM_MEMATTR_WRITE_COMBINING); else From 468faf991e32035732a147f6283032424cd76b70 Mon Sep 17 00:00:00 2001 From: Michal Meloun Date: Sun, 13 Nov 2016 16:31:23 +0000 Subject: [PATCH 057/204] Allow embeding DRM2 code into kernel. It's usefull for development (for netboot) and it also helps to boot FreeBSD on some embeded platforms (where we must boot kernel directly, without standard boot loader). MFC after: 3 weeks --- sys/conf/files | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 7a92df184c7..88760066eba 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1466,6 +1466,49 @@ dev/drm/via_map.c optional viadrm dev/drm/via_mm.c optional viadrm dev/drm/via_verifier.c optional viadrm dev/drm/via_video.c optional viadrm +dev/drm2/drm_agpsupport.c optional drm2 +dev/drm2/drm_auth.c optional drm2 +dev/drm2/drm_bufs.c optional drm2 +dev/drm2/drm_buffer.c optional drm2 +dev/drm2/drm_context.c optional drm2 +dev/drm2/drm_crtc.c optional drm2 +dev/drm2/drm_crtc_helper.c optional drm2 +dev/drm2/drm_dma.c optional drm2 +dev/drm2/drm_dp_helper.c optional drm2 +dev/drm2/drm_dp_iic_helper.c optional drm2 +dev/drm2/drm_drv.c optional drm2 +dev/drm2/drm_edid.c optional drm2 +dev/drm2/drm_fb_helper.c optional drm2 +dev/drm2/drm_fops.c optional drm2 +dev/drm2/drm_gem.c optional drm2 +dev/drm2/drm_gem_names.c optional drm2 +dev/drm2/drm_global.c optional drm2 +dev/drm2/drm_hashtab.c optional drm2 +dev/drm2/drm_ioctl.c optional drm2 +dev/drm2/drm_irq.c optional drm2 +dev/drm2/drm_linux_list_sort.c optional drm2 +dev/drm2/drm_lock.c optional drm2 +dev/drm2/drm_memory.c optional drm2 +dev/drm2/drm_mm.c optional drm2 +dev/drm2/drm_modes.c optional drm2 +dev/drm2/drm_pci.c optional drm2 +dev/drm2/drm_scatter.c optional drm2 +dev/drm2/drm_stub.c optional drm2 +dev/drm2/drm_sysctl.c optional drm2 +dev/drm2/drm_vm.c optional drm2 +dev/drm2/drm_os_freebsd.c optional drm2 +dev/drm2/ttm/ttm_agp_backend.c optional drm2 +dev/drm2/ttm/ttm_lock.c optional drm2 +dev/drm2/ttm/ttm_object.c optional drm2 +dev/drm2/ttm/ttm_tt.c optional drm2 +dev/drm2/ttm/ttm_bo_util.c optional drm2 +dev/drm2/ttm/ttm_bo.c optional drm2 +dev/drm2/ttm/ttm_bo_manager.c optional drm2 +dev/drm2/ttm/ttm_execbuf_util.c optional drm2 +dev/drm2/ttm/ttm_memory.c optional drm2 +dev/drm2/ttm/ttm_page_alloc.c optional drm2 +dev/drm2/ttm/ttm_bo_vm.c optional drm2 +dev/drm2/ati_pcigart.c optional drm2 agp pci dev/ed/if_ed.c optional ed dev/ed/if_ed_novell.c optional ed dev/ed/if_ed_rtl80x9.c optional ed From 3f558d0b91ecb6f358c77eabcf140f92d66807a3 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Sun, 13 Nov 2016 17:28:32 +0000 Subject: [PATCH 058/204] Attempt to make the parts that people are supposed to change stand out more by capitalizing them. Approved by: dteske --- share/examples/jails/rc.conf.jails | 22 +++++++++++----------- share/examples/jails/rcjail.xxx.conf | 26 +++++++++++++------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/share/examples/jails/rc.conf.jails b/share/examples/jails/rc.conf.jails index 674dce538ea..6906b7a2eeb 100644 --- a/share/examples/jails/rc.conf.jails +++ b/share/examples/jails/rc.conf.jails @@ -5,7 +5,7 @@ ############################################################################### jail_enable="YES" -jail_list="xxx" +jail_list="XXX" # # Global presets for all jails @@ -57,19 +57,19 @@ jail_devfs_enable="YES" # mount devfs # # XXX # -jail_xxx_hostname="xxx.yyy" # hostname -jail_xxx_rootdir="/vm/xxx" # root directory +jail_XXX_hostname="XXX.YYY" # hostname +jail_XXX_rootdir="/vm/XXX" # root directory # netgraph -jail_xxx_vnet_interface="ng0_xxx" # vnet interface(s) -jail_xxx_exec_prestart0="jng bridge xxx em0" # bridge interface(s) -jail_xxx_exec_poststop0="jng shutdown xxx" # destroy interface(s) +jail_XXX_vnet_interface="ng0_XXX" # vnet interface(s) +jail_XXX_exec_prestart0="jng bridge XXX em0" # bridge interface(s) +jail_XXX_exec_poststop0="jng shutdown XXX" # destroy interface(s) # if_bridge -#jail_xxx_vnet_interface="e0b_xxx" # vnet interface(s) -#jail_xxx_exec_prestart0="jib addm xxx em0" # bridge interface(s) -#jail_xxx_exec_poststop0="jib destroy xxx" # destroy interface(s) +#jail_XXX_vnet_interface="e0b_XXX" # vnet interface(s) +#jail_XXX_exec_prestart0="jib addm XXX em0" # bridge interface(s) +#jail_XXX_exec_poststop0="jib destroy XXX" # destroy interface(s) # Optional (default off) -#jail_xxx_devfs_ruleset="11" # rule to unhide bpf for DHCP -#jail_xxx_mount_enable="YES" # mount /etc/fstab.xxx +#jail_XXX_devfs_ruleset="11" # rule to unhide bpf for DHCP +#jail_XXX_mount_enable="YES" # mount /etc/fstab.XXX ################################################################################ # END diff --git a/share/examples/jails/rcjail.xxx.conf b/share/examples/jails/rcjail.xxx.conf index a292905109c..be711833e29 100644 --- a/share/examples/jails/rcjail.xxx.conf +++ b/share/examples/jails/rcjail.xxx.conf @@ -1,25 +1,25 @@ # $FreeBSD$ -jail_xxx_hostname="xxx.yyy" # hostname -jail_xxx_rootdir="/vm/xxx" # root directory +jail_XXX_hostname="XXX.YYY" # hostname +jail_XXX_rootdir="/vm/XXX" # root directory # # NB: Below 3 lines required # # netgraph -jail_xxx_vnet_interface="ng0_xxx" # vnet interface(s) -jail_xxx_exec_prestart0="jng bridge xxx em0" # bridge interface(s) -jail_xxx_exec_poststop0="jng shutdown xxx" # destroy interface(s) +jail_XXX_vnet_interface="ng0_XXX" # vnet interface(s) +jail_XXX_exec_prestart0="jng bridge XXX em0" # bridge interface(s) +jail_XXX_exec_poststop0="jng shutdown XXX" # destroy interface(s) # if_bridge -#jail_xxx_vnet_interface="e0b_xxx" # vnet interface(s) -#jail_xxx_exec_prestart0="jib addm xxx em0" # bridge interface(s) -#jail_xxx_exec_poststop0="jib destroy xxx" # destroy interface(s) +#jail_XXX_vnet_interface="e0b_XXX" # vnet interface(s) +#jail_XXX_exec_prestart0="jib addm XXX em0" # bridge interface(s) +#jail_XXX_exec_poststop0="jib destroy XXX" # destroy interface(s) # Standard recipe -jail_xxx_devfs_enable="YES" # mount devfs +jail_XXX_devfs_enable="YES" # mount devfs # Optional (default off) -#jail_xxx_devfs_ruleset="11" # rule to unhide bpf for DHCP -#jail_xxx_mount_enable="YES" # mount /etc/fstab.xxx -#jail_xxx_set_hostname_allow="YES" # Allow hostname to change -#jail_xxx_sysvipc_allow="YES" # Allow SysV Interprocess Comm. +#jail_XXX_devfs_ruleset="11" # rule to unhide bpf for DHCP +#jail_XXX_mount_enable="YES" # mount /etc/fstab.XXX +#jail_XXX_set_hostname_allow="YES" # Allow hostname to change +#jail_XXX_sysvipc_allow="YES" # Allow SysV Interprocess Comm. From ab51358e76ae2e941080694a5087eeb79abaf737 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sun, 13 Nov 2016 17:55:27 +0000 Subject: [PATCH 059/204] Fix typo. MFC after: 1 month Sponsored by: Netflix --- usr.sbin/bhyvectl/bhyvectl.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyvectl/bhyvectl.8 b/usr.sbin/bhyvectl/bhyvectl.8 index d72a795f383..035f9f6c758 100644 --- a/usr.sbin/bhyvectl/bhyvectl.8 +++ b/usr.sbin/bhyvectl/bhyvectl.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2016 +.Dd November 13, 2016 .Dt BHYVECTL 8 .Os .Sh NAME @@ -64,7 +64,7 @@ Operate on the virtual machine Create the specified VM. .It Fl -destroy Destroy the specified VM. -.It Fl -get-state +.It Fl -get-stats Retrieve statistics for the specified VM. .It Fl -inject-nmi Inject a non-maskable interrupt (NMI) into the VM. From 9eb8f495b86947b212bafde872be404ac9d621a6 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sun, 13 Nov 2016 21:39:55 +0000 Subject: [PATCH 060/204] Move common cleanup code into helper. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_mount.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index da8b824f6c3..4d3a19d53da 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1235,6 +1235,24 @@ vfs_check_usecounts(struct mount *mp) return (0); } +static void +dounmount_cleanup(struct mount *mp, struct vnode *coveredvp, int mntkflags) +{ + + mtx_assert(MNT_MTX(mp), MA_OWNED); + mp->mnt_kern_flag &= ~mntkflags; + if ((mp->mnt_kern_flag & MNTK_MWAIT) != 0) { + mp->mnt_kern_flag &= ~MNTK_MWAIT; + wakeup(mp); + } + MNT_IUNLOCK(mp); + if (coveredvp != NULL) { + VOP_UNLOCK(coveredvp, 0); + vdrop(coveredvp); + } + vn_finished_write(mp); +} + /* * Do the actual filesystem unmount. */ @@ -1282,12 +1300,7 @@ dounmount(struct mount *mp, int flags, struct thread *td) MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 || !TAILQ_EMPTY(&mp->mnt_uppers)) { - MNT_IUNLOCK(mp); - if (coveredvp != NULL) { - VOP_UNLOCK(coveredvp, 0); - vdrop(coveredvp); - } - vn_finished_write(mp); + dounmount_cleanup(mp, coveredvp, 0); return (EBUSY); } mp->mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ; @@ -1296,17 +1309,8 @@ dounmount(struct mount *mp, int flags, struct thread *td) error = vfs_check_usecounts(mp); MNT_ILOCK(mp); if (error != 0) { - mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_NOINSMNTQ); - if (mp->mnt_kern_flag & MNTK_MWAIT) { - mp->mnt_kern_flag &= ~MNTK_MWAIT; - wakeup(mp); - } - MNT_IUNLOCK(mp); - if (coveredvp != NULL) { - VOP_UNLOCK(coveredvp, 0); - vdrop(coveredvp); - } - vn_finished_write(mp); + dounmount_cleanup(mp, coveredvp, MNTK_UNMOUNT | + MNTK_NOINSMNTQ); return (error); } } From 714b7df5020eae6168bda2a297037e3523fda3a2 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sun, 13 Nov 2016 21:49:51 +0000 Subject: [PATCH 061/204] Provide simple mutual exclusion between mount point update and unmount. Currently mount update keeps vfs_busy(9) reference on the mount point during MNT_UPDATE VFS_MOUNT() vfsops call. This already provides the exclusion, but is problematic for filesystems which need to perform namei(9) during VFS_MOUNT(MNT_UPDATE) operations, e.g. to refresh mnt_from path, because namei(9) must not be called while the vfs_busy(9) reference is owned. Check for MNT_UPDATE flag before setting MNTK_UNMOUNT, and for MNTK_UNMOUNT before entering innards of vfs_domount_update(), failing syscalls with EBUSY if conflict is detected. Keep vfs_busy(9) reference around VFS_MOUNT(MNT_UPDATE) calls still to not change VFS KPI. In the update path in ffs_mount(), drop vfs_busy() reference around namei(), which is now safe due to unmount never executing in parallel with VFS_MOUNT(MNT_UPDATE), and which avoids the deadlock. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks --- sys/kern/vfs_mount.c | 6 ++++++ sys/ufs/ffs/ffs_vfsops.c | 20 ++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 4d3a19d53da..99bfb101f13 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -940,6 +940,11 @@ vfs_domount_update( VOP_UNLOCK(vp, 0); MNT_ILOCK(mp); + if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) { + MNT_IUNLOCK(mp); + error = EBUSY; + goto end; + } mp->mnt_flag &= ~MNT_UPDATEMASK; mp->mnt_flag |= fsflags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE | MNT_SNAPSHOT | MNT_ROOTFS | MNT_UPDATEMASK | MNT_RDONLY); @@ -1299,6 +1304,7 @@ dounmount(struct mount *mp, int flags, struct thread *td) vn_start_write(NULL, &mp, V_WAIT | V_MNTREF); MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 || + (mp->mnt_flag & MNT_UPDATE) != 0 || !TAILQ_EMPTY(&mp->mnt_uppers)) { dounmount_cleanup(mp, coveredvp, 0); return (EBUSY); diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 2520f007ec6..c258a202920 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -147,7 +147,7 @@ ffs_mount(struct mount *mp) struct ufsmount *ump = NULL; struct fs *fs; pid_t fsckpid = 0; - int error, flags; + int error, error1, flags; uint64_t mntorflags; accmode_t accmode; struct nameidata ndp; @@ -453,6 +453,11 @@ ffs_mount(struct mount *mp) */ if (mp->mnt_flag & MNT_SNAPSHOT) return (ffs_snapshot(mp, fspec)); + + /* + * Must not call namei() while owning busy ref. + */ + vfs_unbusy(mp); } /* @@ -460,7 +465,18 @@ ffs_mount(struct mount *mp) * and verify that it refers to a sensible disk device. */ NDINIT(&ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, fspec, td); - if ((error = namei(&ndp)) != 0) + error = namei(&ndp); + if ((mp->mnt_flag & MNT_UPDATE) != 0) { + /* + * Unmount does not start if MNT_UPDATE is set. Mount + * update busies mp before setting MNT_UPDATE. We + * must be able to retain our busy ref succesfully, + * without sleep. + */ + error1 = vfs_busy(mp, MBF_NOWAIT); + MPASS(error1 == 0); + } + if (error != 0) return (error); NDFREE(&ndp, NDF_ONLY_PNBUF); devvp = ndp.ni_vp; From ab21a37ab4af6f224a9e9e74e1d43b3a4d74350f Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Mon, 14 Nov 2016 00:33:03 +0000 Subject: [PATCH 062/204] Fix mips 32-bit buildworld. Reported by: adrian MFC after: 6 weeks X-MFC with: r308493 --- contrib/amd/amd/readdir.c | 13 +++++++------ contrib/amd/amq/amq.c | 2 +- contrib/amd/include/amq_defs.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/contrib/amd/amd/readdir.c b/contrib/amd/amd/readdir.c index 3d3c7add01a..69be7a71d65 100644 --- a/contrib/amd/amd/readdir.c +++ b/contrib/amd/amd/readdir.c @@ -38,6 +38,7 @@ */ +#include #ifdef HAVE_CONFIG_H # include #endif /* HAVE_CONFIG_H */ @@ -201,7 +202,7 @@ make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable static int amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count, int fully_browsable) { - u_int gen = *(u_int *) cookie; + u_int gen = *(u_int *) (uintptr_t) cookie; int chain_length, i; static nfsentry *te, *te_next; static int j; @@ -364,7 +365,7 @@ amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry * static int amfs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count) { - u_int gen = *(u_int *) cookie; + u_int gen = *(u_int *) (uintptr_t) cookie; am_node *xp; dp->dl_eof = FALSE; /* assume readdir not done */ @@ -639,7 +640,7 @@ amfs_readdir3_browsable(am_node *mp, am_cookie3 cookie, am_dirlist3 *dp, am_entry3 *ep, u_int count, int fully_browsable) { - uint64 gen = *(uint64 *) cookie; + uint64 gen = *(uint64 *) (uintptr_t) cookie; int chain_length, i; static am_entry3 *te, *te_next; static int j; @@ -796,7 +797,7 @@ static int amfs_readdir3(am_node *mp, am_cookie3 cookie, am_dirlist3 *dp, am_entry3 *ep, u_int count) { - uint64 gen = *(uint64 *) cookie; + uint64 gen = *(uint64 *) (uintptr_t) cookie; am_node *xp; if (amuDebug(D_READDIR)) @@ -944,8 +945,8 @@ amfs_generic_readdir(am_node *mp, voidp cookie, voidp dp, voidp ep, u_int count) return amfs_readdir(mp, cookie, dp, ep, count); } else { if (browsable) - return amfs_readdir3_browsable(mp, (am_cookie3) cookie, dp, ep, count, full); + return amfs_readdir3_browsable(mp, (am_cookie3) (uintptr_t) cookie, dp, ep, count, full); else - return amfs_readdir3(mp, (am_cookie3) cookie, dp, ep, count); + return amfs_readdir3(mp, (am_cookie3) (uintptr_t) cookie, dp, ep, count); } } diff --git a/contrib/amd/amq/amq.c b/contrib/amd/amq/amq.c index e99732fded5..7140784c863 100644 --- a/contrib/amd/amq/amq.c +++ b/contrib/amd/amq/amq.c @@ -79,7 +79,7 @@ enum show_opt { static void time_print(time_type tt) { - time_t t = (time_t)tt; + time_t t = (time_t)*tt; struct tm *tp = localtime(&t); printf("%02d/%02d/%04d %02d:%02d:%02d", tp->tm_mon + 1, tp->tm_mday, diff --git a/contrib/amd/include/amq_defs.h b/contrib/amd/include/amq_defs.h index 89f61805fc6..4db5133cba4 100644 --- a/contrib/amd/include/amq_defs.h +++ b/contrib/amd/include/amq_defs.h @@ -66,7 +66,7 @@ /* * TYPEDEFS */ -typedef long *time_type; +typedef time_t *time_type; typedef struct amq_mount_info amq_mount_info; typedef struct amq_map_info amq_map_info; typedef struct amq_mount_stats amq_mount_stats; From 32a455e090f82853f4bbf610ce687740762a7f17 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Mon, 14 Nov 2016 10:41:04 +0000 Subject: [PATCH 063/204] Fix function prototypes in usbdi(9) man page, and tweak it a little. MFC after: 1 month --- share/man/man9/usbdi.9 | 82 ++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 51 deletions(-) diff --git a/share/man/man9/usbdi.9 b/share/man/man9/usbdi.9 index 588c79e501b..640222b8067 100644 --- a/share/man/man9/usbdi.9 +++ b/share/man/man9/usbdi.9 @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd June 24, 2009 +.Dd November 14, 2016 .Dt USBDI 9 .Os .Sh NAME @@ -84,6 +84,33 @@ .In dev/usb/usb.h .In dev/usb/usbdi.h .In dev/usb/usbdi_util.h +.Ft "usb_error_t" +.Fo "usbd_transfer_setup" +.Fa "struct usb_device *udev" +.Fa "const uint8_t *ifaces" +.Fa "struct usb_xfer **pxfer" +.Fa "const struct usb_config *setup_start" +.Fa "uint16_t n_setup" +.Fa "void *priv_sc" +.Fa "struct mtx *priv_mtx" +.Fc +.Ft "void" +.Fo "usbd_transfer_unsetup" +.Fa "struct usb_xfer **pxfer" +.Fa "uint16_t n_setup" +.Fc +.Ft "void" +.Fo "usbd_transfer_start" +.Fa "struct usb_xfer *xfer" +.Fc +.Ft "void" +.Fo "usbd_transfer_stop" +.Fa "struct usb_xfer *xfer" +.Fc +.Ft "void" +.Fo "usbd_transfer_drain" +.Fa "struct usb_xfer *xfer" +.Fc .Sh DESCRIPTION The Universal Serial Bus (USB) driver programming interface provides USB peripheral drivers with a host controller independent API for @@ -91,53 +118,6 @@ controlling and communicating with USB peripherals. The .Nm usb module supports both USB Host and USB Device side mode. -. -.Sh USB KERNEL PROGRAMMING -Here is a list of commonly used functions: -.Pp -. -.Ft "usb_error_t" -.Fo "usbd_transfer_setup" -.Fa "udev" -.Fa "ifaces" -.Fa "pxfer" -.Fa "setup_start" -.Fa "n_setup" -.Fa "priv_sc" -.Fa "priv_mtx" -.Fc -. -.Pp -. -.Ft "void" -.Fo "usbd_transfer_unsetup" -.Fa "pxfer" -.Fa "n_setup" -.Fc -. -.Pp -. -.Ft "void" -.Fo "usbd_transfer_start" -.Fa "xfer" -.Fc -. -.Pp -. -.Ft "void" -.Fo "usbd_transfer_stop" -.Fa "xfer" -.Fc -. -.Pp -. -.Ft "void" -.Fo "usbd_transfer_drain" -.Fa "xfer" -.Fc -. -. -. .Sh USB TRANSFER MANAGEMENT FUNCTIONS The USB standard defines four types of USB transfers. . @@ -552,7 +532,7 @@ for the 8-bytes of SETUP header. These 8-bytes are not counted by the "xfer->max_data_length" variable. . -This flag can not be changed during operation. +This flag cannot be changed during operation. . . .It ext_buffer @@ -561,7 +541,7 @@ allocated. . Instead the USB client must supply a data buffer. . -This flag can not be changed during operation. +This flag cannot be changed during operation. . . .It manual_status @@ -579,7 +559,7 @@ This flag can be changed during operation. . .It no_pipe_ok Setting this flag causes the USB_ERR_NO_PIPE error to be ignored. -This flag can not be changed during operation. +This flag cannot be changed during operation. . . .It stall_pipe From df7675353ea71a3ed3f17e1b88e4d0c38ceaa834 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 14 Nov 2016 11:41:22 +0000 Subject: [PATCH 064/204] Stop including fdt_common.h from the arm code when it's unneeded. Sponsored by: ABT Systems Ltd --- sys/arm/allwinner/a10/a10_intc.c | 1 - sys/arm/allwinner/a10_sramc.c | 1 - sys/arm/allwinner/a20/a20_cpu_cfg.c | 1 - sys/arm/allwinner/aw_ccu.c | 1 - sys/arm/allwinner/aw_cir.c | 1 - sys/arm/allwinner/aw_machdep.c | 2 -- sys/arm/allwinner/aw_nmi.c | 1 - sys/arm/allwinner/aw_ts.c | 1 - sys/arm/allwinner/aw_wdog.c | 1 - sys/arm/allwinner/clk/aw_gate.c | 1 - sys/arm/allwinner/if_emac.c | 1 - sys/arm/allwinner/timer.c | 1 - sys/arm/altera/socfpga/socfpga_gpio.c | 1 - sys/arm/altera/socfpga/socfpga_manager.c | 1 - sys/arm/amlogic/aml8726/aml8726_ccm.c | 1 - sys/arm/amlogic/aml8726/aml8726_fb.c | 1 - sys/arm/amlogic/aml8726/aml8726_gpio.c | 1 - sys/arm/amlogic/aml8726/aml8726_i2c.c | 1 - sys/arm/amlogic/aml8726/aml8726_mmc.c | 1 - sys/arm/amlogic/aml8726/aml8726_pic.c | 1 - sys/arm/amlogic/aml8726/aml8726_rng.c | 1 - sys/arm/amlogic/aml8726/aml8726_rtc.c | 1 - sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c | 1 - sys/arm/amlogic/aml8726/aml8726_timer.c | 1 - sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c | 1 - sys/arm/amlogic/aml8726/aml8726_wdt.c | 1 - sys/arm/amlogic/aml8726/uart_dev_aml8726.c | 1 - sys/arm/annapurna/alpine/alpine_machdep.c | 2 -- sys/arm/arm/generic_timer.c | 1 - sys/arm/arm/gic.c | 1 - sys/arm/arm/gic_fdt.c | 1 - sys/arm/arm/mp_machdep.c | 1 - sys/arm/arm/mpcore_timer.c | 1 - sys/arm/arm/pl190.c | 1 - sys/arm/arm/pl310.c | 1 - sys/arm/arm/pmu.c | 1 - sys/arm/at91/at91_aic.c | 1 - sys/arm/at91/at91_mci.c | 1 - sys/arm/at91/at91_ohci_fdt.c | 1 - sys/arm/at91/at91_pinctrl.c | 1 - sys/arm/at91/at91_pio.c | 1 - sys/arm/at91/at91_pit.c | 1 - sys/arm/at91/at91_pmc.c | 1 - sys/arm/at91/at91_rst.c | 1 - sys/arm/at91/at91_sdramc.c | 1 - sys/arm/at91/at91_shdwc.c | 1 - sys/arm/at91/at91_spi.c | 1 - sys/arm/at91/at91_tcb.c | 1 - sys/arm/at91/at91_twi.c | 1 - sys/arm/at91/at91_wdt.c | 1 - sys/arm/at91/if_ate.c | 1 - sys/arm/at91/if_macb.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c | 2 -- sys/arm/broadcom/bcm2835/bcm2835_dma.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_fb.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_fbd.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_ft5406.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_intr.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_sdhci.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_spi.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_systimer.c | 1 - sys/arm/broadcom/bcm2835/bcm2835_wdog.c | 1 - sys/arm/freescale/imx/imx51_ccm.c | 1 - sys/arm/freescale/imx/imx51_ipuv3_fbd.c | 1 - sys/arm/freescale/imx/imx6_audmux.c | 1 - sys/arm/freescale/imx/imx6_ipu.c | 1 - sys/arm/freescale/imx/imx6_sdma.c | 1 - sys/arm/freescale/imx/imx6_ssi.c | 1 - sys/arm/freescale/imx/imx_gpio.c | 1 - sys/arm/freescale/imx/imx_gpt.c | 1 - sys/arm/freescale/imx/imx_i2c.c | 1 - sys/arm/freescale/imx/imx_wdog.c | 1 - sys/arm/freescale/imx/tzic.c | 1 - sys/arm/freescale/vybrid/vf_adc.c | 1 - sys/arm/freescale/vybrid/vf_anadig.c | 1 - sys/arm/freescale/vybrid/vf_dmamux.c | 1 - sys/arm/freescale/vybrid/vf_ehci.c | 2 -- sys/arm/freescale/vybrid/vf_gpio.c | 1 - sys/arm/freescale/vybrid/vf_i2c.c | 1 - sys/arm/freescale/vybrid/vf_machdep.c | 2 -- sys/arm/freescale/vybrid/vf_mscm.c | 1 - sys/arm/freescale/vybrid/vf_port.c | 1 - sys/arm/freescale/vybrid/vf_spi.c | 1 - sys/arm/freescale/vybrid/vf_src.c | 1 - sys/arm/freescale/vybrid/vf_tcon.c | 1 - sys/arm/lpc/lpc_machdep.c | 2 -- sys/arm/mv/armadaxp/armadaxp.c | 1 - sys/arm/mv/mv_ts.c | 1 - sys/arm/nvidia/tegra124/tegra124_machdep.c | 1 - sys/arm/nvidia/tegra124/tegra124_pmc.c | 1 - sys/arm/nvidia/tegra_abpmisc.c | 1 - sys/arm/nvidia/tegra_ahci.c | 1 - sys/arm/nvidia/tegra_efuse.c | 1 - sys/arm/nvidia/tegra_gpio.c | 1 - sys/arm/nvidia/tegra_i2c.c | 1 - sys/arm/nvidia/tegra_pcie.c | 1 - sys/arm/nvidia/tegra_rtc.c | 1 - sys/arm/nvidia/tegra_uart.c | 3 +-- sys/arm/nvidia/tegra_usbphy.c | 1 - sys/arm/rockchip/rk30xx_grf.c | 1 - sys/arm/rockchip/rk30xx_machdep.c | 2 -- sys/arm/rockchip/rk30xx_pmu.c | 1 - sys/arm/rockchip/rk30xx_wdog.c | 1 - sys/arm/samsung/exynos/exynos5_common.c | 1 - sys/arm/ti/aintc.c | 1 - sys/arm/ti/am335x/am335x_ecap.c | 1 - sys/arm/ti/am335x/am335x_ehrpwm.c | 1 - sys/arm/ti/am335x/am335x_gpio.c | 1 - sys/arm/ti/am335x/am335x_lcd_syscons.c | 1 - sys/arm/ti/am335x/am335x_musb.c | 1 - sys/arm/ti/am335x/am335x_prcm.c | 1 - sys/arm/ti/am335x/am335x_pwmss.c | 1 - sys/arm/ti/am335x/am335x_usbss.c | 1 - sys/arm/ti/cpsw/if_cpsw.c | 1 - sys/arm/ti/omap4/omap4_gpio.c | 1 - sys/arm/ti/omap4/omap4_prcm_clks.c | 1 - sys/arm/ti/ti_edma3.c | 1 - sys/arm/ti/ti_gpio.c | 1 - sys/arm/ti/ti_hwmods.c | 1 - sys/arm/ti/ti_mbox.c | 1 - sys/arm/ti/ti_pruss.c | 1 - sys/arm/ti/ti_sdma.c | 1 - sys/arm/ti/ti_spi.c | 1 - sys/arm/ti/ti_wdt.c | 1 - sys/arm/ti/usb/omap_ehci.c | 1 - sys/arm/ti/usb/omap_host.c | 1 - sys/arm/ti/usb/omap_tll.c | 1 - sys/arm/versatile/pl050.c | 1 - sys/arm/versatile/versatile_clcd.c | 1 - sys/arm/versatile/versatile_machdep.c | 2 -- sys/arm/versatile/versatile_pci.c | 1 - sys/arm/versatile/versatile_sic.c | 1 - sys/arm/versatile/versatile_timer.c | 1 - sys/arm/xilinx/zy7_devcfg.c | 1 - sys/arm/xilinx/zy7_ehci.c | 1 - sys/arm/xilinx/zy7_gpio.c | 1 - sys/arm/xilinx/zy7_machdep.c | 2 -- 137 files changed, 1 insertion(+), 147 deletions(-) diff --git a/sys/arm/allwinner/a10/a10_intc.c b/sys/arm/allwinner/a10/a10_intc.c index fd6c4073fb3..996d28a950d 100644 --- a/sys/arm/allwinner/a10/a10_intc.c +++ b/sys/arm/allwinner/a10/a10_intc.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/allwinner/a10_sramc.c b/sys/arm/allwinner/a10_sramc.c index 22ba1f7c4ad..ea9654518e5 100644 --- a/sys/arm/allwinner/a10_sramc.c +++ b/sys/arm/allwinner/a10_sramc.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/allwinner/a20/a20_cpu_cfg.c b/sys/arm/allwinner/a20/a20_cpu_cfg.c index a0bdb5a0b46..3fe53349b4d 100644 --- a/sys/arm/allwinner/a20/a20_cpu_cfg.c +++ b/sys/arm/allwinner/a20/a20_cpu_cfg.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/allwinner/aw_ccu.c b/sys/arm/allwinner/aw_ccu.c index 306d33a298b..fca85b85bd5 100644 --- a/sys/arm/allwinner/aw_ccu.c +++ b/sys/arm/allwinner/aw_ccu.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/allwinner/aw_cir.c b/sys/arm/allwinner/aw_cir.c index 926109a4d12..2c6c275b1fb 100644 --- a/sys/arm/allwinner/aw_cir.c +++ b/sys/arm/allwinner/aw_cir.c @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/allwinner/aw_machdep.c b/sys/arm/allwinner/aw_machdep.c index 73b1e58f949..d9effb8eec9 100644 --- a/sys/arm/allwinner/aw_machdep.c +++ b/sys/arm/allwinner/aw_machdep.c @@ -48,8 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include #include diff --git a/sys/arm/allwinner/aw_nmi.c b/sys/arm/allwinner/aw_nmi.c index 67be72d6b05..86c122f5300 100644 --- a/sys/arm/allwinner/aw_nmi.c +++ b/sys/arm/allwinner/aw_nmi.c @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/allwinner/aw_ts.c b/sys/arm/allwinner/aw_ts.c index e010ac469b0..2963fb84ce6 100644 --- a/sys/arm/allwinner/aw_ts.c +++ b/sys/arm/allwinner/aw_ts.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/allwinner/aw_wdog.c b/sys/arm/allwinner/aw_wdog.c index 4dcefd432b6..ca1ac0d98a7 100644 --- a/sys/arm/allwinner/aw_wdog.c +++ b/sys/arm/allwinner/aw_wdog.c @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/allwinner/clk/aw_gate.c b/sys/arm/allwinner/clk/aw_gate.c index f26b7c2d1b9..078a5e8031f 100644 --- a/sys/arm/allwinner/clk/aw_gate.c +++ b/sys/arm/allwinner/clk/aw_gate.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c index 097e4911037..a500f7b64e7 100644 --- a/sys/arm/allwinner/if_emac.c +++ b/sys/arm/allwinner/if_emac.c @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/allwinner/timer.c b/sys/arm/allwinner/timer.c index 2b4ec843d77..fec5f9a1eb3 100644 --- a/sys/arm/allwinner/timer.c +++ b/sys/arm/allwinner/timer.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/altera/socfpga/socfpga_gpio.c b/sys/arm/altera/socfpga/socfpga_gpio.c index 0e71d18cc48..2c064147414 100644 --- a/sys/arm/altera/socfpga/socfpga_gpio.c +++ b/sys/arm/altera/socfpga/socfpga_gpio.c @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/altera/socfpga/socfpga_manager.c b/sys/arm/altera/socfpga/socfpga_manager.c index 3b63f79bbce..33e4c74e494 100644 --- a/sys/arm/altera/socfpga/socfpga_manager.c +++ b/sys/arm/altera/socfpga/socfpga_manager.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_ccm.c b/sys/arm/amlogic/aml8726/aml8726_ccm.c index fb2c9a56f60..1c804c3ecda 100644 --- a/sys/arm/amlogic/aml8726/aml8726_ccm.c +++ b/sys/arm/amlogic/aml8726/aml8726_ccm.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_fb.c b/sys/arm/amlogic/aml8726/aml8726_fb.c index 94d39065afc..f2fc36de5ca 100644 --- a/sys/arm/amlogic/aml8726/aml8726_fb.c +++ b/sys/arm/amlogic/aml8726/aml8726_fb.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_gpio.c b/sys/arm/amlogic/aml8726/aml8726_gpio.c index afc6f5b7ce0..df26d91ee49 100644 --- a/sys/arm/amlogic/aml8726/aml8726_gpio.c +++ b/sys/arm/amlogic/aml8726/aml8726_gpio.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_i2c.c b/sys/arm/amlogic/aml8726/aml8726_i2c.c index c47bb6eec80..7fd8d71cea4 100644 --- a/sys/arm/amlogic/aml8726/aml8726_i2c.c +++ b/sys/arm/amlogic/aml8726/aml8726_i2c.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_mmc.c b/sys/arm/amlogic/aml8726/aml8726_mmc.c index 3cc074442f6..b14dab00589 100644 --- a/sys/arm/amlogic/aml8726/aml8726_mmc.c +++ b/sys/arm/amlogic/aml8726/aml8726_mmc.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_pic.c b/sys/arm/amlogic/aml8726/aml8726_pic.c index 70257f747cd..fd296ea63ca 100644 --- a/sys/arm/amlogic/aml8726/aml8726_pic.c +++ b/sys/arm/amlogic/aml8726/aml8726_pic.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_rng.c b/sys/arm/amlogic/aml8726/aml8726_rng.c index e3397aa117a..9c38e3c8c06 100644 --- a/sys/arm/amlogic/aml8726/aml8726_rng.c +++ b/sys/arm/amlogic/aml8726/aml8726_rng.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_rtc.c b/sys/arm/amlogic/aml8726/aml8726_rtc.c index 5af51ce4d34..6ed8d7b7752 100644 --- a/sys/arm/amlogic/aml8726/aml8726_rtc.c +++ b/sys/arm/amlogic/aml8726/aml8726_rtc.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c b/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c index fc225352ed5..563eb573801 100644 --- a/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c +++ b/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_timer.c b/sys/arm/amlogic/aml8726/aml8726_timer.c index 60617035ab0..2fa4db8f398 100644 --- a/sys/arm/amlogic/aml8726/aml8726_timer.c +++ b/sys/arm/amlogic/aml8726/aml8726_timer.c @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c b/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c index 3a108e46154..3c6b796ead3 100644 --- a/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c +++ b/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_wdt.c b/sys/arm/amlogic/aml8726/aml8726_wdt.c index cd78c9321bf..46bafccab95 100644 --- a/sys/arm/amlogic/aml8726/aml8726_wdt.c +++ b/sys/arm/amlogic/aml8726/aml8726_wdt.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include diff --git a/sys/arm/amlogic/aml8726/uart_dev_aml8726.c b/sys/arm/amlogic/aml8726/uart_dev_aml8726.c index 5d21fb05569..162e2eb2a9a 100644 --- a/sys/arm/amlogic/aml8726/uart_dev_aml8726.c +++ b/sys/arm/amlogic/aml8726/uart_dev_aml8726.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/annapurna/alpine/alpine_machdep.c b/sys/arm/annapurna/alpine/alpine_machdep.c index 3d35834f1ca..7f87c7d6898 100644 --- a/sys/arm/annapurna/alpine/alpine_machdep.c +++ b/sys/arm/annapurna/alpine/alpine_machdep.c @@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include "opt_ddb.h" #include "opt_platform.h" diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index d91eee14ee4..e42a699986c 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #endif #ifdef FDT -#include #include #include #include diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c index 1efa9853e53..ff97f5cde88 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/arm/gic_fdt.c b/sys/arm/arm/gic_fdt.c index 1ababce6e0f..bd361c928c7 100644 --- a/sys/arm/arm/gic_fdt.c +++ b/sys/arm/arm/gic_fdt.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include diff --git a/sys/arm/arm/mp_machdep.c b/sys/arm/arm/mp_machdep.c index 2dc71718e06..25a9fcaebe1 100644 --- a/sys/arm/arm/mp_machdep.c +++ b/sys/arm/arm/mp_machdep.c @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #endif #ifdef CPU_MV_PJ4B #include -#include #endif extern struct pcpu __pcpu[]; diff --git a/sys/arm/arm/mpcore_timer.c b/sys/arm/arm/mpcore_timer.c index 03f8e4bad6a..e68a5e921ba 100644 --- a/sys/arm/arm/mpcore_timer.c +++ b/sys/arm/arm/mpcore_timer.c @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/arm/pl190.c b/sys/arm/arm/pl190.c index 8cd744e6c99..9817fa5ac17 100644 --- a/sys/arm/arm/pl190.c +++ b/sys/arm/arm/pl190.c @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/arm/pl310.c b/sys/arm/arm/pl310.c index c269b47a8be..18adabbd97c 100644 --- a/sys/arm/arm/pl310.c +++ b/sys/arm/arm/pl310.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/arm/pmu.c b/sys/arm/arm/pmu.c index c98d6c98874..ad785ca960e 100644 --- a/sys/arm/arm/pmu.c +++ b/sys/arm/arm/pmu.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/at91/at91_aic.c b/sys/arm/at91/at91_aic.c index 92d6eada203..a6756da1dfa 100644 --- a/sys/arm/at91/at91_aic.c +++ b/sys/arm/at91/at91_aic.c @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_mci.c b/sys/arm/at91/at91_mci.c index 2049fc74f93..477ce9dcc3c 100644 --- a/sys/arm/at91/at91_mci.c +++ b/sys/arm/at91/at91_mci.c @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_ohci_fdt.c b/sys/arm/at91/at91_ohci_fdt.c index 51d9509fedc..091cd98305f 100644 --- a/sys/arm/at91/at91_ohci_fdt.c +++ b/sys/arm/at91/at91_ohci_fdt.c @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include diff --git a/sys/arm/at91/at91_pinctrl.c b/sys/arm/at91/at91_pinctrl.c index 7ca379be930..f2c3824f2d5 100644 --- a/sys/arm/at91/at91_pinctrl.c +++ b/sys/arm/at91/at91_pinctrl.c @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/at91/at91_pio.c b/sys/arm/at91/at91_pio.c index 0d9bd46a421..20f5002db2d 100644 --- a/sys/arm/at91/at91_pio.c +++ b/sys/arm/at91/at91_pio.c @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_pit.c b/sys/arm/at91/at91_pit.c index 7f7890b0178..a48af882391 100644 --- a/sys/arm/at91/at91_pit.c +++ b/sys/arm/at91/at91_pit.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_pmc.c b/sys/arm/at91/at91_pmc.c index 3784bada941..572bfa0de2b 100644 --- a/sys/arm/at91/at91_pmc.c +++ b/sys/arm/at91/at91_pmc.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_rst.c b/sys/arm/at91/at91_rst.c index 77ace5fbe61..48f781ac053 100644 --- a/sys/arm/at91/at91_rst.c +++ b/sys/arm/at91/at91_rst.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #define FDT_HACKS 1 diff --git a/sys/arm/at91/at91_sdramc.c b/sys/arm/at91/at91_sdramc.c index 99787ba7a71..3136db6a091 100644 --- a/sys/arm/at91/at91_sdramc.c +++ b/sys/arm/at91/at91_sdramc.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_shdwc.c b/sys/arm/at91/at91_shdwc.c index f3fa491dad8..92d56440e76 100644 --- a/sys/arm/at91/at91_shdwc.c +++ b/sys/arm/at91/at91_shdwc.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_spi.c b/sys/arm/at91/at91_spi.c index cdbc7b8e298..bbe80ab1d36 100644 --- a/sys/arm/at91/at91_spi.c +++ b/sys/arm/at91/at91_spi.c @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_tcb.c b/sys/arm/at91/at91_tcb.c index 42491ed74bd..5db1d3c4f74 100644 --- a/sys/arm/at91/at91_tcb.c +++ b/sys/arm/at91/at91_tcb.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_twi.c b/sys/arm/at91/at91_twi.c index 28676fc7cd8..8549406c57c 100644 --- a/sys/arm/at91/at91_twi.c +++ b/sys/arm/at91/at91_twi.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include "iicbus_if.h" #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/at91_wdt.c b/sys/arm/at91/at91_wdt.c index 95332025e2f..dd0887dd905 100644 --- a/sys/arm/at91/at91_wdt.c +++ b/sys/arm/at91/at91_wdt.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/if_ate.c b/sys/arm/at91/if_ate.c index fdca46bf95f..8f742048b07 100644 --- a/sys/arm/at91/if_ate.c +++ b/sys/arm/at91/if_ate.c @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/at91/if_macb.c b/sys/arm/at91/if_macb.c index c62184d2803..f0709a3335a 100644 --- a/sys/arm/at91/if_macb.c +++ b/sys/arm/at91/if_macb.c @@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT -#include #include #include #endif diff --git a/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c b/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c index 49217799d16..f20d5204828 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include diff --git a/sys/arm/broadcom/bcm2835/bcm2835_dma.c b/sys/arm/broadcom/bcm2835/bcm2835_dma.c index 3b6c03201fa..acb6e3afa97 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_dma.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_dma.c @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/broadcom/bcm2835/bcm2835_fb.c b/sys/arm/broadcom/bcm2835/bcm2835_fb.c index 58caac2cd88..a9fff7c363e 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_fb.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_fb.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/broadcom/bcm2835/bcm2835_fbd.c b/sys/arm/broadcom/bcm2835/bcm2835_fbd.c index 04cc83a42c8..f26b5c19697 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_fbd.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_fbd.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c b/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c index 86432cfca4a..026d4c574f6 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/broadcom/bcm2835/bcm2835_intr.c b/sys/arm/broadcom/bcm2835/bcm2835_intr.c index f3a5a283284..249b86703fd 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_intr.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_intr.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c index b74fefd958e..f98d07df193 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include diff --git a/sys/arm/broadcom/bcm2835/bcm2835_spi.c b/sys/arm/broadcom/bcm2835/bcm2835_spi.c index b30fac7819c..dbfec6ea4f9 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_spi.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_spi.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/broadcom/bcm2835/bcm2835_systimer.c b/sys/arm/broadcom/bcm2835/bcm2835_systimer.c index 3fbaa903c59..724e5efbc86 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_systimer.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_systimer.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/broadcom/bcm2835/bcm2835_wdog.c b/sys/arm/broadcom/bcm2835/bcm2835_wdog.c index 39b16e34c5c..7a11b660a4e 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_wdog.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_wdog.c @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/imx/imx51_ccm.c b/sys/arm/freescale/imx/imx51_ccm.c index 7a05d1e6830..e58c7abcae8 100644 --- a/sys/arm/freescale/imx/imx51_ccm.c +++ b/sys/arm/freescale/imx/imx51_ccm.c @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c index 800244a80cd..ea9ca6da730 100644 --- a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c +++ b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/freescale/imx/imx6_audmux.c b/sys/arm/freescale/imx/imx6_audmux.c index 3b08a142a43..61ec0b6da51 100644 --- a/sys/arm/freescale/imx/imx6_audmux.c +++ b/sys/arm/freescale/imx/imx6_audmux.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/imx/imx6_ipu.c b/sys/arm/freescale/imx/imx6_ipu.c index f561fa77ffd..426ef474ef7 100644 --- a/sys/arm/freescale/imx/imx6_ipu.c +++ b/sys/arm/freescale/imx/imx6_ipu.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include diff --git a/sys/arm/freescale/imx/imx6_sdma.c b/sys/arm/freescale/imx/imx6_sdma.c index 4839270e7cc..aa39ea93289 100644 --- a/sys/arm/freescale/imx/imx6_sdma.c +++ b/sys/arm/freescale/imx/imx6_sdma.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/imx/imx6_ssi.c b/sys/arm/freescale/imx/imx6_ssi.c index 9000ae3ec9d..c239b2bc290 100644 --- a/sys/arm/freescale/imx/imx6_ssi.c +++ b/sys/arm/freescale/imx/imx6_ssi.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/imx/imx_gpio.c b/sys/arm/freescale/imx/imx_gpio.c index 922548e33cb..1c308dbbd68 100644 --- a/sys/arm/freescale/imx/imx_gpio.c +++ b/sys/arm/freescale/imx/imx_gpio.c @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/imx/imx_gpt.c b/sys/arm/freescale/imx/imx_gpt.c index 8da0b2e0791..f0eb7665dc0 100644 --- a/sys/arm/freescale/imx/imx_gpt.c +++ b/sys/arm/freescale/imx/imx_gpt.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/imx/imx_i2c.c b/sys/arm/freescale/imx/imx_i2c.c index 2e453dacc32..c679c2fc56f 100644 --- a/sys/arm/freescale/imx/imx_i2c.c +++ b/sys/arm/freescale/imx/imx_i2c.c @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include "iicbus_if.h" -#include #include #include #include diff --git a/sys/arm/freescale/imx/imx_wdog.c b/sys/arm/freescale/imx/imx_wdog.c index cbf9343b1c6..f1e450102a8 100644 --- a/sys/arm/freescale/imx/imx_wdog.c +++ b/sys/arm/freescale/imx/imx_wdog.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/imx/tzic.c b/sys/arm/freescale/imx/tzic.c index 0f3cf5cc075..e1b0635418d 100644 --- a/sys/arm/freescale/imx/tzic.c +++ b/sys/arm/freescale/imx/tzic.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_adc.c b/sys/arm/freescale/vybrid/vf_adc.c index 0a806fb96c7..7a506b89300 100644 --- a/sys/arm/freescale/vybrid/vf_adc.c +++ b/sys/arm/freescale/vybrid/vf_adc.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_anadig.c b/sys/arm/freescale/vybrid/vf_anadig.c index 3a2cbc4e481..411c3a1cd9f 100644 --- a/sys/arm/freescale/vybrid/vf_anadig.c +++ b/sys/arm/freescale/vybrid/vf_anadig.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_dmamux.c b/sys/arm/freescale/vybrid/vf_dmamux.c index a887ffa16d9..3e6b84e1ef5 100644 --- a/sys/arm/freescale/vybrid/vf_dmamux.c +++ b/sys/arm/freescale/vybrid/vf_dmamux.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_ehci.c b/sys/arm/freescale/vybrid/vf_ehci.c index 0a7dc941fef..9ac26d0513c 100644 --- a/sys/arm/freescale/vybrid/vf_ehci.c +++ b/sys/arm/freescale/vybrid/vf_ehci.c @@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include diff --git a/sys/arm/freescale/vybrid/vf_gpio.c b/sys/arm/freescale/vybrid/vf_gpio.c index 0c1cf82303d..9cab805c287 100644 --- a/sys/arm/freescale/vybrid/vf_gpio.c +++ b/sys/arm/freescale/vybrid/vf_gpio.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_i2c.c b/sys/arm/freescale/vybrid/vf_i2c.c index 8008d1af897..6c634c069a9 100644 --- a/sys/arm/freescale/vybrid/vf_i2c.c +++ b/sys/arm/freescale/vybrid/vf_i2c.c @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include "iicbus_if.h" -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_machdep.c b/sys/arm/freescale/vybrid/vf_machdep.c index 15566a4f383..6628a7608a4 100644 --- a/sys/arm/freescale/vybrid/vf_machdep.c +++ b/sys/arm/freescale/vybrid/vf_machdep.c @@ -42,8 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - vm_offset_t platform_lastaddr(void) { diff --git a/sys/arm/freescale/vybrid/vf_mscm.c b/sys/arm/freescale/vybrid/vf_mscm.c index 02850e58936..1f78b45f309 100644 --- a/sys/arm/freescale/vybrid/vf_mscm.c +++ b/sys/arm/freescale/vybrid/vf_mscm.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_port.c b/sys/arm/freescale/vybrid/vf_port.c index 6ff8bfcccb1..2c2be2907e5 100644 --- a/sys/arm/freescale/vybrid/vf_port.c +++ b/sys/arm/freescale/vybrid/vf_port.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_spi.c b/sys/arm/freescale/vybrid/vf_spi.c index 8fa466bf83b..c089d01bfd3 100644 --- a/sys/arm/freescale/vybrid/vf_spi.c +++ b/sys/arm/freescale/vybrid/vf_spi.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include "spibus_if.h" -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_src.c b/sys/arm/freescale/vybrid/vf_src.c index 83d7e969e09..20fc59f6df0 100644 --- a/sys/arm/freescale/vybrid/vf_src.c +++ b/sys/arm/freescale/vybrid/vf_src.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/freescale/vybrid/vf_tcon.c b/sys/arm/freescale/vybrid/vf_tcon.c index 31f85b58b46..8bc256b1cc1 100644 --- a/sys/arm/freescale/vybrid/vf_tcon.c +++ b/sys/arm/freescale/vybrid/vf_tcon.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/lpc/lpc_machdep.c b/sys/arm/lpc/lpc_machdep.c index d193ac9f8d0..7a3c4b5b6c2 100644 --- a/sys/arm/lpc/lpc_machdep.c +++ b/sys/arm/lpc/lpc_machdep.c @@ -58,8 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - vm_offset_t platform_lastaddr(void) { diff --git a/sys/arm/mv/armadaxp/armadaxp.c b/sys/arm/mv/armadaxp/armadaxp.c index 172d3d71b4d..29b2642f847 100644 --- a/sys/arm/mv/armadaxp/armadaxp.c +++ b/sys/arm/mv/armadaxp/armadaxp.c @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/mv/mv_ts.c b/sys/arm/mv/mv_ts.c index 35cd06221e4..3ed8ab748d1 100644 --- a/sys/arm/mv/mv_ts.c +++ b/sys/arm/mv/mv_ts.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_machdep.c b/sys/arm/nvidia/tegra124/tegra124_machdep.c index 0e881cc83ad..b874b5abd0f 100644 --- a/sys/arm/nvidia/tegra124/tegra124_machdep.c +++ b/sys/arm/nvidia/tegra124/tegra124_machdep.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/nvidia/tegra124/tegra124_pmc.c b/sys/arm/nvidia/tegra124/tegra124_pmc.c index 04ff73cd1d9..cae31238037 100644 --- a/sys/arm/nvidia/tegra124/tegra124_pmc.c +++ b/sys/arm/nvidia/tegra124/tegra124_pmc.c @@ -38,7 +38,6 @@ #include #include -#include #include #include diff --git a/sys/arm/nvidia/tegra_abpmisc.c b/sys/arm/nvidia/tegra_abpmisc.c index 56d91b7caa9..d51ec2e9729 100644 --- a/sys/arm/nvidia/tegra_abpmisc.c +++ b/sys/arm/nvidia/tegra_abpmisc.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index bfa34132581..2ea714a7764 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/arm/nvidia/tegra_efuse.c b/sys/arm/nvidia/tegra_efuse.c index 34e0da00f0e..13d97abd033 100644 --- a/sys/arm/nvidia/tegra_efuse.c +++ b/sys/arm/nvidia/tegra_efuse.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/nvidia/tegra_gpio.c b/sys/arm/nvidia/tegra_gpio.c index d715a692a4c..7626d3072be 100644 --- a/sys/arm/nvidia/tegra_gpio.c +++ b/sys/arm/nvidia/tegra_gpio.c @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/nvidia/tegra_i2c.c b/sys/arm/nvidia/tegra_i2c.c index f88768e6939..ed0074277d0 100644 --- a/sys/arm/nvidia/tegra_i2c.c +++ b/sys/arm/nvidia/tegra_i2c.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index 4fe7c710261..e62f35308e4 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/arm/nvidia/tegra_rtc.c b/sys/arm/nvidia/tegra_rtc.c index 09a7c74728a..2a783735f4b 100644 --- a/sys/arm/nvidia/tegra_rtc.c +++ b/sys/arm/nvidia/tegra_rtc.c @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/nvidia/tegra_uart.c b/sys/arm/nvidia/tegra_uart.c index c70303ff5e0..05c306931e3 100644 --- a/sys/arm/nvidia/tegra_uart.c +++ b/sys/arm/nvidia/tegra_uart.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -248,4 +247,4 @@ static driver_t tegra_uart_driver = { }; DRIVER_MODULE(tegra_uart, simplebus, tegra_uart_driver, uart_devclass, - 0, 0); \ No newline at end of file + 0, 0); diff --git a/sys/arm/nvidia/tegra_usbphy.c b/sys/arm/nvidia/tegra_usbphy.c index d1c6eeb45cf..811c5a878bd 100644 --- a/sys/arm/nvidia/tegra_usbphy.c +++ b/sys/arm/nvidia/tegra_usbphy.c @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/arm/rockchip/rk30xx_grf.c b/sys/arm/rockchip/rk30xx_grf.c index ce61e8c4e5f..6261928ff11 100644 --- a/sys/arm/rockchip/rk30xx_grf.c +++ b/sys/arm/rockchip/rk30xx_grf.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/rockchip/rk30xx_machdep.c b/sys/arm/rockchip/rk30xx_machdep.c index bb3731504d9..d45ef8d4c04 100644 --- a/sys/arm/rockchip/rk30xx_machdep.c +++ b/sys/arm/rockchip/rk30xx_machdep.c @@ -47,8 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include vm_offset_t diff --git a/sys/arm/rockchip/rk30xx_pmu.c b/sys/arm/rockchip/rk30xx_pmu.c index 514e961d0d1..a3d1bd74cba 100644 --- a/sys/arm/rockchip/rk30xx_pmu.c +++ b/sys/arm/rockchip/rk30xx_pmu.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/rockchip/rk30xx_wdog.c b/sys/arm/rockchip/rk30xx_wdog.c index 32ef5bdb029..612b793fcbe 100644 --- a/sys/arm/rockchip/rk30xx_wdog.c +++ b/sys/arm/rockchip/rk30xx_wdog.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/samsung/exynos/exynos5_common.c b/sys/arm/samsung/exynos/exynos5_common.c index 8d011142ee0..c5174d48b26 100644 --- a/sys/arm/samsung/exynos/exynos5_common.c +++ b/sys/arm/samsung/exynos/exynos5_common.c @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/ti/aintc.c b/sys/arm/ti/aintc.c index 764f3a0726d..78b54883c4b 100644 --- a/sys/arm/ti/aintc.c +++ b/sys/arm/ti/aintc.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/am335x/am335x_ecap.c b/sys/arm/ti/am335x/am335x_ecap.c index eba5f722aed..75b845f56e0 100644 --- a/sys/arm/ti/am335x/am335x_ecap.c +++ b/sys/arm/ti/am335x/am335x_ecap.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include diff --git a/sys/arm/ti/am335x/am335x_ehrpwm.c b/sys/arm/ti/am335x/am335x_ehrpwm.c index 331331fcd94..53cb3bb7824 100644 --- a/sys/arm/ti/am335x/am335x_ehrpwm.c +++ b/sys/arm/ti/am335x/am335x_ehrpwm.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include diff --git a/sys/arm/ti/am335x/am335x_gpio.c b/sys/arm/ti/am335x/am335x_gpio.c index 63fc54429a7..6cee0970aa6 100644 --- a/sys/arm/ti/am335x/am335x_gpio.c +++ b/sys/arm/ti/am335x/am335x_gpio.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/ti/am335x/am335x_lcd_syscons.c b/sys/arm/ti/am335x/am335x_lcd_syscons.c index cf2c8394f6e..ba8d69a5d8c 100644 --- a/sys/arm/ti/am335x/am335x_lcd_syscons.c +++ b/sys/arm/ti/am335x/am335x_lcd_syscons.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/ti/am335x/am335x_musb.c b/sys/arm/ti/am335x/am335x_musb.c index c168493d086..8abcc89079b 100644 --- a/sys/arm/ti/am335x/am335x_musb.c +++ b/sys/arm/ti/am335x/am335x_musb.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/am335x/am335x_prcm.c b/sys/arm/ti/am335x/am335x_prcm.c index f7934328e35..7f65f0f6b4a 100644 --- a/sys/arm/ti/am335x/am335x_prcm.c +++ b/sys/arm/ti/am335x/am335x_prcm.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/am335x/am335x_pwmss.c b/sys/arm/ti/am335x/am335x_pwmss.c index dbc613e9190..814865d6b76 100644 --- a/sys/arm/ti/am335x/am335x_pwmss.c +++ b/sys/arm/ti/am335x/am335x_pwmss.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include diff --git a/sys/arm/ti/am335x/am335x_usbss.c b/sys/arm/ti/am335x/am335x_usbss.c index 6ddc562c5a9..8355faaa0f1 100644 --- a/sys/arm/ti/am335x/am335x_usbss.c +++ b/sys/arm/ti/am335x/am335x_usbss.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c index a7a7569dd98..79bfa0d44ca 100644 --- a/sys/arm/ti/cpsw/if_cpsw.c +++ b/sys/arm/ti/cpsw/if_cpsw.c @@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/ti/omap4/omap4_gpio.c b/sys/arm/ti/omap4/omap4_gpio.c index dd38f4a6a56..9f0f55b62ac 100644 --- a/sys/arm/ti/omap4/omap4_gpio.c +++ b/sys/arm/ti/omap4/omap4_gpio.c @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/ti/omap4/omap4_prcm_clks.c b/sys/arm/ti/omap4/omap4_prcm_clks.c index 782e7ac7111..d350121d7a4 100644 --- a/sys/arm/ti/omap4/omap4_prcm_clks.c +++ b/sys/arm/ti/omap4/omap4_prcm_clks.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/ti_edma3.c b/sys/arm/ti/ti_edma3.c index 080e7bddbe7..e12d82b3706 100644 --- a/sys/arm/ti/ti_edma3.c +++ b/sys/arm/ti/ti_edma3.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/ti/ti_gpio.c b/sys/arm/ti/ti_gpio.c index fe2b5ff06bd..cf2de36eac1 100644 --- a/sys/arm/ti/ti_gpio.c +++ b/sys/arm/ti/ti_gpio.c @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/ti_hwmods.c b/sys/arm/ti/ti_hwmods.c index e662d27e460..1dfb074a790 100644 --- a/sys/arm/ti/ti_hwmods.c +++ b/sys/arm/ti/ti_hwmods.c @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/ti_mbox.c b/sys/arm/ti/ti_mbox.c index 9729ed40fc4..9747be13aac 100644 --- a/sys/arm/ti/ti_mbox.c +++ b/sys/arm/ti/ti_mbox.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/ti_pruss.c b/sys/arm/ti/ti_pruss.c index cbf8050a57b..8ffb9e07899 100644 --- a/sys/arm/ti/ti_pruss.c +++ b/sys/arm/ti/ti_pruss.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/ti_sdma.c b/sys/arm/ti/ti_sdma.c index 7e5e9574e4c..6f3024153fa 100644 --- a/sys/arm/ti/ti_sdma.c +++ b/sys/arm/ti/ti_sdma.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/ti_spi.c b/sys/arm/ti/ti_spi.c index e35f365b5e1..75f3df77710 100644 --- a/sys/arm/ti/ti_spi.c +++ b/sys/arm/ti/ti_spi.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/ti/ti_wdt.c b/sys/arm/ti/ti_wdt.c index 2b51cc2d138..179b783029d 100644 --- a/sys/arm/ti/ti_wdt.c +++ b/sys/arm/ti/ti_wdt.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/ti/usb/omap_ehci.c b/sys/arm/ti/usb/omap_ehci.c index f7e2057b852..e60d721a17f 100644 --- a/sys/arm/ti/usb/omap_ehci.c +++ b/sys/arm/ti/usb/omap_ehci.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/ti/usb/omap_host.c b/sys/arm/ti/usb/omap_host.c index 326a5b39c38..0bc1118db58 100644 --- a/sys/arm/ti/usb/omap_host.c +++ b/sys/arm/ti/usb/omap_host.c @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/ti/usb/omap_tll.c b/sys/arm/ti/usb/omap_tll.c index 9bcb7d660a3..eb3e246a61d 100644 --- a/sys/arm/ti/usb/omap_tll.c +++ b/sys/arm/ti/usb/omap_tll.c @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/versatile/pl050.c b/sys/arm/versatile/pl050.c index c5d8a61372c..51d22afd340 100644 --- a/sys/arm/versatile/pl050.c +++ b/sys/arm/versatile/pl050.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/versatile/versatile_clcd.c b/sys/arm/versatile/versatile_clcd.c index 76c6c63d8c5..93f71d53f03 100644 --- a/sys/arm/versatile/versatile_clcd.c +++ b/sys/arm/versatile/versatile_clcd.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/versatile/versatile_machdep.c b/sys/arm/versatile/versatile_machdep.c index a0c97eeed15..2ce2faf969d 100644 --- a/sys/arm/versatile/versatile_machdep.c +++ b/sys/arm/versatile/versatile_machdep.c @@ -51,8 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - /* Start of address space used for bootstrap map */ #define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000 diff --git a/sys/arm/versatile/versatile_pci.c b/sys/arm/versatile/versatile_pci.c index 0bc49264c7e..7db737cc067 100644 --- a/sys/arm/versatile/versatile_pci.c +++ b/sys/arm/versatile/versatile_pci.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include "pcib_if.h" -#include #include #include #include diff --git a/sys/arm/versatile/versatile_sic.c b/sys/arm/versatile/versatile_sic.c index 99ffb27a72d..d695bbfa754 100644 --- a/sys/arm/versatile/versatile_sic.c +++ b/sys/arm/versatile/versatile_sic.c @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/versatile/versatile_timer.c b/sys/arm/versatile/versatile_timer.c index c5f6def30c6..b6f508393c8 100644 --- a/sys/arm/versatile/versatile_timer.c +++ b/sys/arm/versatile/versatile_timer.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/xilinx/zy7_devcfg.c b/sys/arm/xilinx/zy7_devcfg.c index 385afd16a33..74e1cfe8752 100644 --- a/sys/arm/xilinx/zy7_devcfg.c +++ b/sys/arm/xilinx/zy7_devcfg.c @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/xilinx/zy7_ehci.c b/sys/arm/xilinx/zy7_ehci.c index 6468faa7ac1..f6e34f77449 100644 --- a/sys/arm/xilinx/zy7_ehci.c +++ b/sys/arm/xilinx/zy7_ehci.c @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/arm/xilinx/zy7_gpio.c b/sys/arm/xilinx/zy7_gpio.c index 25d22f87e4d..a51d60fa352 100644 --- a/sys/arm/xilinx/zy7_gpio.c +++ b/sys/arm/xilinx/zy7_gpio.c @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include diff --git a/sys/arm/xilinx/zy7_machdep.c b/sys/arm/xilinx/zy7_machdep.c index 2efe694a243..472f70c6473 100644 --- a/sys/arm/xilinx/zy7_machdep.c +++ b/sys/arm/xilinx/zy7_machdep.c @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include #include From 222102cfcad6179aa3d99658453ef68e6bccc1d1 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 14 Nov 2016 11:52:22 +0000 Subject: [PATCH 065/204] Move including fdt_pinctrl.h after openfirm.h to get th edefinition of phandle_t and remove the need for including fdt_common.h. Sponsored by: ABT Systems Ltd --- sys/arm/allwinner/a10_gpio.c | 3 +-- sys/arm/amlogic/aml8726/aml8726_pinctrl.c | 3 +-- sys/arm/annapurna/alpine/alpine_machdep_mp.c | 1 + sys/arm/freescale/imx/imx_iomux.c | 3 +-- sys/arm/ti/ti_pinmux.c | 3 +-- sys/arm/ti/ti_scm.c | 3 +-- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/arm/allwinner/a10_gpio.c b/sys/arm/allwinner/a10_gpio.c index 1ea55357c14..85c26504058 100644 --- a/sys/arm/allwinner/a10_gpio.c +++ b/sys/arm/allwinner/a10_gpio.c @@ -44,11 +44,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include #include +#include #include #include diff --git a/sys/arm/amlogic/aml8726/aml8726_pinctrl.c b/sys/arm/amlogic/aml8726/aml8726_pinctrl.c index a71c25ae82f..5465b1cbe04 100644 --- a/sys/arm/amlogic/aml8726/aml8726_pinctrl.c +++ b/sys/arm/amlogic/aml8726/aml8726_pinctrl.c @@ -45,10 +45,9 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include #include +#include #include #include diff --git a/sys/arm/annapurna/alpine/alpine_machdep_mp.c b/sys/arm/annapurna/alpine/alpine_machdep_mp.c index 122391a2419..4ef2db1ba0f 100644 --- a/sys/arm/annapurna/alpine/alpine_machdep_mp.c +++ b/sys/arm/annapurna/alpine/alpine_machdep_mp.c @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include diff --git a/sys/arm/freescale/imx/imx_iomux.c b/sys/arm/freescale/imx/imx_iomux.c index be3a3e81b22..c9de2a31f8d 100644 --- a/sys/arm/freescale/imx/imx_iomux.c +++ b/sys/arm/freescale/imx/imx_iomux.c @@ -59,11 +59,10 @@ #include -#include -#include #include #include #include +#include #include #include diff --git a/sys/arm/ti/ti_pinmux.c b/sys/arm/ti/ti_pinmux.c index d3daf76eca7..605a54172d5 100644 --- a/sys/arm/ti/ti_pinmux.c +++ b/sys/arm/ti/ti_pinmux.c @@ -49,11 +49,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include #include +#include #include "ti_pinmux.h" diff --git a/sys/arm/ti/ti_scm.c b/sys/arm/ti/ti_scm.c index ae36a9b63a7..bc7861828f1 100644 --- a/sys/arm/ti/ti_scm.c +++ b/sys/arm/ti/ti_scm.c @@ -61,11 +61,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include #include +#include #include "ti_scm.h" From 9783ea5c9f762c43a4a43f344382e90ce2d53fa8 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 14 Nov 2016 12:03:08 +0000 Subject: [PATCH 066/204] Use the correct OF_getencprop over OF_getprop + fdt32_to_cpu to read integer data from the device tree. Sponsored by: ABT Systems Ltd --- sys/arm/altera/socfpga/socfpga_common.c | 8 +++--- sys/arm/altera/socfpga/socfpga_rstmgr.c | 8 +++--- sys/arm/broadcom/bcm2835/bcm2835_fb.c | 6 ++--- sys/arm/broadcom/bcm2835/bcm2835_machdep.c | 10 ++++--- sys/arm/freescale/imx/imx51_ipuv3.c | 5 ++-- sys/arm/freescale/imx/imx51_ipuv3_fbd.c | 4 +-- sys/arm/freescale/imx/imx6_ssi.c | 8 +++--- sys/arm/freescale/vybrid/vf_common.c | 8 +++--- sys/arm/freescale/vybrid/vf_dcu4.c | 31 +++++++++++----------- sys/arm/freescale/vybrid/vf_edma.c | 5 ++-- sys/arm/freescale/vybrid/vf_iomuxc.c | 6 ++--- sys/arm/freescale/vybrid/vf_sai.c | 17 ++++++------ sys/arm/lpc/lpc_fb.c | 4 +-- sys/arm/lpc/lpc_timer.c | 5 +--- sys/arm/mv/gpio.c | 22 +++++++-------- sys/arm/mv/mv_machdep.c | 16 +++++------ sys/arm/rockchip/rk30xx_gpio.c | 14 +++++----- sys/arm/ti/am335x/am335x_lcd.c | 4 +-- sys/arm/ti/am335x/am335x_lcd_syscons.c | 12 ++++----- sys/arm/ti/ti_adc.c | 20 +++++++------- sys/arm/ti/ti_sdhci.c | 5 ++-- sys/arm/versatile/sp804.c | 5 ++-- sys/arm/xilinx/zy7_slcr.c | 5 ++-- 23 files changed, 103 insertions(+), 125 deletions(-) diff --git a/sys/arm/altera/socfpga/socfpga_common.c b/sys/arm/altera/socfpga/socfpga_common.c index c36517f2ee2..12a2cc5c471 100644 --- a/sys/arm/altera/socfpga/socfpga_common.c +++ b/sys/arm/altera/socfpga/socfpga_common.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -47,7 +46,7 @@ __FBSDID("$FreeBSD$"); void cpu_reset(void) { - uint32_t addr, paddr; + uint32_t paddr; bus_addr_t vaddr; phandle_t node; @@ -58,9 +57,8 @@ cpu_reset(void) if (node == -1) goto end; - if ((OF_getprop(node, "reg", &paddr, sizeof(paddr))) > 0) { - addr = fdt32_to_cpu(paddr); - if (bus_space_map(fdtbus_bs_tag, addr, 0x8, 0, &vaddr) == 0) { + if ((OF_getencprop(node, "reg", &paddr, sizeof(paddr))) > 0) { + if (bus_space_map(fdtbus_bs_tag, paddr, 0x8, 0, &vaddr) == 0) { bus_space_write_4(fdtbus_bs_tag, vaddr, RSTMGR_CTRL, CTRL_SWWARMRSTREQ); } diff --git a/sys/arm/altera/socfpga/socfpga_rstmgr.c b/sys/arm/altera/socfpga/socfpga_rstmgr.c index 49db05ef4a1..d5f773f5bfe 100644 --- a/sys/arm/altera/socfpga/socfpga_rstmgr.c +++ b/sys/arm/altera/socfpga/socfpga_rstmgr.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -84,7 +83,7 @@ enum { static int l3remap(struct rstmgr_softc *sc, int remap, int enable) { - uint32_t addr, paddr; + uint32_t paddr; bus_addr_t vaddr; phandle_t node; int reg; @@ -106,9 +105,8 @@ l3remap(struct rstmgr_softc *sc, int remap, int enable) return (1); } - if ((OF_getprop(node, "reg", &paddr, sizeof(paddr))) > 0) { - addr = fdt32_to_cpu(paddr); - if (bus_space_map(fdtbus_bs_tag, addr, 0x4, 0, &vaddr) == 0) { + if ((OF_getencprop(node, "reg", &paddr, sizeof(paddr))) > 0) { + if (bus_space_map(fdtbus_bs_tag, paddr, 0x4, 0, &vaddr) == 0) { bus_space_write_4(fdtbus_bs_tag, vaddr, L3REGS_REMAP, reg); return (0); diff --git a/sys/arm/broadcom/bcm2835/bcm2835_fb.c b/sys/arm/broadcom/bcm2835/bcm2835_fb.c index a9fff7c363e..b8397ac0987 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_fb.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_fb.c @@ -473,15 +473,15 @@ bcmfb_configure(int flags) if ((root != 0) && (display = fdt_find_compatible(root, "broadcom,bcm2835-fb", 1))) { if (sc->width == 0) { - if ((OF_getprop(display, "broadcom,width", + if ((OF_getencprop(display, "broadcom,width", &cell, sizeof(cell))) > 0) - sc->width = (int)fdt32_to_cpu(cell); + sc->width = cell; } if (sc->height == 0) { if ((OF_getprop(display, "broadcom,height", &cell, sizeof(cell))) > 0) - sc->height = (int)fdt32_to_cpu(cell); + sc->height = cell; } } diff --git a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c index 56413beb628..bd1762f8896 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c @@ -78,13 +78,15 @@ bcm2835_late_init(platform_t plat) system = OF_finddevice("/system"); if (system != 0) { - len = OF_getprop(system, "linux,serial", &cells, sizeof(cells)); + len = OF_getencprop(system, "linux,serial", cells, + sizeof(cells)); if (len > 0) - board_set_serial(fdt64_to_cpu(*((uint64_t *)cells))); + board_set_serial(((uint64_t)cells[0]) << 32 | cells[1]); - len = OF_getprop(system, "linux,revision", &cells, sizeof(cells)); + len = OF_getencprop(system, "linux,revision", cells, + sizeof(cells)); if (len > 0) - board_set_revision(fdt32_to_cpu(*((uint32_t *)cells))); + board_set_revision(cells[0]); } } diff --git a/sys/arm/freescale/imx/imx51_ipuv3.c b/sys/arm/freescale/imx/imx51_ipuv3.c index a96b1852eb6..b88bb3fdb5d 100644 --- a/sys/arm/freescale/imx/imx51_ipuv3.c +++ b/sys/arm/freescale/imx/imx51_ipuv3.c @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -313,10 +312,10 @@ ipu3_fb_attach(device_t dev) * On i.MX53, the offset is 0. */ node = ofw_bus_get_node(dev); - if ((OF_getprop(node, "reg", ®, sizeof(reg))) <= 0) + if ((OF_getencprop(node, "reg", ®, sizeof(reg))) <= 0) base = 0; else - base = fdt32_to_cpu(reg) - IPU_CM_BASE(0); + base = reg - IPU_CM_BASE(0); /* map controller registers */ err = bus_space_map(iot, IPU_CM_BASE(base), IPU_CM_SIZE, 0, &ioh); if (err) diff --git a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c index ea9ca6da730..ee6833fc392 100644 --- a/sys/arm/freescale/imx/imx51_ipuv3_fbd.c +++ b/sys/arm/freescale/imx/imx51_ipuv3_fbd.c @@ -221,10 +221,10 @@ ipu3_fb_attach(device_t dev) * On i.MX53, the offset is 0. */ node = ofw_bus_get_node(dev); - if ((OF_getprop(node, "reg", ®, sizeof(reg))) <= 0) + if ((OF_getencprop(node, "reg", ®, sizeof(reg))) <= 0) base = 0; else - base = fdt32_to_cpu(reg) - IPU_CM_BASE(0); + base = reg - IPU_CM_BASE(0); /* map controller registers */ err = bus_space_map(iot, IPU_CM_BASE(base), IPU_CM_SIZE, 0, &ioh); if (err) diff --git a/sys/arm/freescale/imx/imx6_ssi.c b/sys/arm/freescale/imx/imx6_ssi.c index c239b2bc290..4f4dadb99c8 100644 --- a/sys/arm/freescale/imx/imx6_ssi.c +++ b/sys/arm/freescale/imx/imx6_ssi.c @@ -446,12 +446,12 @@ find_sdma_controller(struct sc_info *sc) if ((len = OF_getproplen(node, "dmas")) <= 0) return (ENXIO); - OF_getprop(node, "dmas", &dts_value, len); + OF_getencprop(node, "dmas", &dts_value, len); - sc->sdma_ev_rx = fdt32_to_cpu(dts_value[1]); - sc->sdma_ev_tx = fdt32_to_cpu(dts_value[5]); + sc->sdma_ev_rx = dts_value[1]; + sc->sdma_ev_tx = dts_value[5]; - sdma_node = OF_node_from_xref(fdt32_to_cpu(dts_value[0])); + sdma_node = OF_node_from_xref(dts_value[0]); sdma_sc = NULL; diff --git a/sys/arm/freescale/vybrid/vf_common.c b/sys/arm/freescale/vybrid/vf_common.c index 13408caaaa7..9c3082b6800 100644 --- a/sys/arm/freescale/vybrid/vf_common.c +++ b/sys/arm/freescale/vybrid/vf_common.c @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -44,16 +43,15 @@ void cpu_reset(void) { phandle_t src; - uint32_t addr, paddr; + uint32_t paddr; bus_addr_t vaddr; if (src_swreset() == 0) goto end; src = OF_finddevice("src"); - if ((src != 0) && (OF_getprop(src, "reg", &paddr, sizeof(paddr))) > 0) { - addr = fdt32_to_cpu(paddr); - if (bus_space_map(fdtbus_bs_tag, addr, 0x10, 0, &vaddr) == 0) { + if ((src != 0) && (OF_getencprop(src, "reg", &paddr, sizeof(paddr))) > 0) { + if (bus_space_map(fdtbus_bs_tag, paddr, 0x10, 0, &vaddr) == 0) { bus_space_write_4(fdtbus_bs_tag, vaddr, 0x00, SW_RST); } } diff --git a/sys/arm/freescale/vybrid/vf_dcu4.c b/sys/arm/freescale/vybrid/vf_dcu4.c index 34dea4600a9..7fbf4a36ebb 100644 --- a/sys/arm/freescale/vybrid/vf_dcu4.c +++ b/sys/arm/freescale/vybrid/vf_dcu4.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -246,37 +245,37 @@ get_panel_info(struct dcu_softc *sc, struct panel_info *panel) /* panel size */ if ((len = OF_getproplen(node, "panel-size")) <= 0) return (ENXIO); - OF_getprop(node, "panel-size", &dts_value, len); - panel->width = fdt32_to_cpu(dts_value[0]); - panel->height = fdt32_to_cpu(dts_value[1]); + OF_getencprop(node, "panel-size", dts_value, len); + panel->width = dts_value[0]; + panel->height = dts_value[1]; /* hsync */ if ((len = OF_getproplen(node, "panel-hsync")) <= 0) return (ENXIO); - OF_getprop(node, "panel-hsync", &dts_value, len); - panel->h_back_porch = fdt32_to_cpu(dts_value[0]); - panel->h_pulse_width = fdt32_to_cpu(dts_value[1]); - panel->h_front_porch = fdt32_to_cpu(dts_value[2]); + OF_getencprop(node, "panel-hsync", dts_value, len); + panel->h_back_porch = dts_value[0]; + panel->h_pulse_width = dts_value[1]; + panel->h_front_porch = dts_value[2]; /* vsync */ if ((len = OF_getproplen(node, "panel-vsync")) <= 0) return (ENXIO); - OF_getprop(node, "panel-vsync", &dts_value, len); - panel->v_back_porch = fdt32_to_cpu(dts_value[0]); - panel->v_pulse_width = fdt32_to_cpu(dts_value[1]); - panel->v_front_porch = fdt32_to_cpu(dts_value[2]); + OF_getencprop(node, "panel-vsync", dts_value, len); + panel->v_back_porch = dts_value[0]; + panel->v_pulse_width = dts_value[1]; + panel->v_front_porch = dts_value[2]; /* clk divider */ if ((len = OF_getproplen(node, "panel-clk-div")) <= 0) return (ENXIO); - OF_getprop(node, "panel-clk-div", &dts_value, len); - panel->clk_div = fdt32_to_cpu(dts_value[0]); + OF_getencprop(node, "panel-clk-div", dts_value, len); + panel->clk_div = dts_value[0]; /* backlight pin */ if ((len = OF_getproplen(node, "panel-backlight-pin")) <= 0) return (ENXIO); - OF_getprop(node, "panel-backlight-pin", &dts_value, len); - panel->backlight_pin = fdt32_to_cpu(dts_value[0]); + OF_getencprop(node, "panel-backlight-pin", dts_value, len); + panel->backlight_pin = dts_value[0]; return (0); } diff --git a/sys/arm/freescale/vybrid/vf_edma.c b/sys/arm/freescale/vybrid/vf_edma.c index 93179216a5b..eb6e514840d 100644 --- a/sys/arm/freescale/vybrid/vf_edma.c +++ b/sys/arm/freescale/vybrid/vf_edma.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -284,8 +283,8 @@ edma_attach(device_t dev) if ((len = OF_getproplen(node, "device-id")) <= 0) return (ENXIO); - OF_getprop(node, "device-id", &dts_value, len); - sc->device_id = fdt32_to_cpu(dts_value); + OF_getencprop(node, "device-id", &dts_value, len); + sc->device_id = dts_value; sc->dma_stop = dma_stop; sc->dma_setup = dma_setup; diff --git a/sys/arm/freescale/vybrid/vf_iomuxc.c b/sys/arm/freescale/vybrid/vf_iomuxc.c index 95711d67647..c4e29fe89cc 100644 --- a/sys/arm/freescale/vybrid/vf_iomuxc.c +++ b/sys/arm/freescale/vybrid/vf_iomuxc.c @@ -148,12 +148,12 @@ pinmux_set(struct iomuxc_softc *sc) continue; if ((len = OF_getproplen(child, "iomux_config")) > 0) { - OF_getprop(child, "iomux_config", &iomux_config, len); + OF_getencprop(child, "iomux_config", iomux_config, len); values = len / (sizeof(uint32_t)); for (i = 0; i < values; i += 2) { - pin = fdt32_to_cpu(iomux_config[i]); - pin_cfg = fdt32_to_cpu(iomux_config[i+1]); + pin = iomux_config[i]; + pin_cfg = iomux_config[i+1]; #if 0 device_printf(sc->dev, "Set pin %d to 0x%08x\n", pin, pin_cfg); diff --git a/sys/arm/freescale/vybrid/vf_sai.c b/sys/arm/freescale/vybrid/vf_sai.c index 83f689f87d2..8ff802a37f3 100644 --- a/sys/arm/freescale/vybrid/vf_sai.c +++ b/sys/arm/freescale/vybrid/vf_sai.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -424,19 +423,19 @@ find_edma_controller(struct sc_info *sc) if ((len = OF_getproplen(node, "edma-mux-group")) <= 0) return (ENXIO); - OF_getprop(node, "edma-src-transmit", &dts_value, len); - edma_src_transmit = fdt32_to_cpu(dts_value); - OF_getprop(node, "edma-mux-group", &dts_value, len); - edma_mux_group = fdt32_to_cpu(dts_value); - OF_getprop(node, "edma-controller", &dts_value, len); - edma_node = OF_node_from_xref(fdt32_to_cpu(dts_value)); + OF_getencprop(node, "edma-src-transmit", &dts_value, len); + edma_src_transmit = dts_value; + OF_getencprop(node, "edma-mux-group", &dts_value, len); + edma_mux_group = dts_value; + OF_getencprop(node, "edma-controller", &dts_value, len); + edma_node = OF_node_from_xref(dts_value); if ((len = OF_getproplen(edma_node, "device-id")) <= 0) { return (ENXIO); } - OF_getprop(edma_node, "device-id", &dts_value, len); - edma_device_id = fdt32_to_cpu(dts_value); + OF_getencprop(edma_node, "device-id", &dts_value, len); + edma_device_id = dts_value; edma_sc = NULL; diff --git a/sys/arm/lpc/lpc_fb.c b/sys/arm/lpc/lpc_fb.c index b2eab8b526a..e4969159a45 100644 --- a/sys/arm/lpc/lpc_fb.c +++ b/sys/arm/lpc/lpc_fb.c @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -280,10 +279,9 @@ lpc_fb_intr(void *arg) static int lpc_fb_fdt_read(phandle_t node, const char *name, uint32_t *ret) { - if (OF_getprop(node, name, ret, sizeof(uint32_t)) <= 0) + if (OF_getencprop(node, name, ret, sizeof(uint32_t)) <= 0) return (ENOENT); - *ret = fdt32_to_cpu(*ret); return (0); } diff --git a/sys/arm/lpc/lpc_timer.c b/sys/arm/lpc/lpc_timer.c index ded53fa9931..f745cf01b39 100644 --- a/sys/arm/lpc/lpc_timer.c +++ b/sys/arm/lpc/lpc_timer.c @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -158,7 +157,7 @@ lpc_timer_attach(device_t dev) /* Get PERIPH_CLK encoded in parent bus 'bus-frequency' property */ node = ofw_bus_get_node(dev); - if (OF_getprop(OF_parent(node), "bus-frequency", &freq, + if (OF_getencprop(OF_parent(node), "bus-frequency", &freq, sizeof(pcell_t)) <= 0) { bus_release_resources(dev, lpc_timer_spec, sc->lt_res); bus_teardown_intr(dev, sc->lt_res[2], intrcookie); @@ -166,8 +165,6 @@ lpc_timer_attach(device_t dev) return (ENXIO); } - freq = fdt32_to_cpu(freq); - /* Set desired frequency in event timer and timecounter */ sc->lt_et.et_frequency = (uint64_t)freq; lpc_timecounter.tc_frequency = (uint64_t)freq; diff --git a/sys/arm/mv/gpio.c b/sys/arm/mv/gpio.c index f6f116c66b7..70d3d06be43 100644 --- a/sys/arm/mv/gpio.c +++ b/sys/arm/mv/gpio.c @@ -113,7 +113,7 @@ struct gpio_ctrl_entry { gpios_phandler_t handler; }; -int mv_handle_gpios_prop(phandle_t ctrl, pcell_t *gpios, int len); +static int mv_handle_gpios_prop(phandle_t ctrl, pcell_t *gpios, int len); int gpio_get_config_from_dt(void); struct gpio_ctrl_entry gpio_controllers[] = { @@ -540,7 +540,7 @@ mv_gpio_value_set(uint32_t pin, uint8_t val) mv_gpio_reg_clear(reg, pin); } -int +static int mv_handle_gpios_prop(phandle_t ctrl, pcell_t *gpios, int len) { pcell_t gpio_cells, pincnt; @@ -554,10 +554,8 @@ mv_handle_gpios_prop(phandle_t ctrl, pcell_t *gpios, int len) /* Node is not a GPIO controller. */ return (ENXIO); - if (OF_getprop(ctrl, "#gpio-cells", &gpio_cells, sizeof(pcell_t)) < 0) + if (OF_getencprop(ctrl, "#gpio-cells", &gpio_cells, sizeof(pcell_t)) < 0) return (ENXIO); - - gpio_cells = fdt32_to_cpu(gpio_cells); if (gpio_cells != 3) return (ENXIO); @@ -567,9 +565,9 @@ mv_handle_gpios_prop(phandle_t ctrl, pcell_t *gpios, int len) if (fdt_regsize(ctrl, &gpio_ctrl, &size)) return (ENXIO); - if (OF_getprop(ctrl, "pin-count", &pincnt, sizeof(pcell_t)) < 0) + if (OF_getencprop(ctrl, "pin-count", &pincnt, sizeof(pcell_t)) < 0) return (ENXIO); - sc.pin_num = fdt32_to_cpu(pincnt); + sc.pin_num = pincnt; /* * Skip controller reference, since controller's phandle is given @@ -579,9 +577,9 @@ mv_handle_gpios_prop(phandle_t ctrl, pcell_t *gpios, int len) gpios += inc; for (t = 0; t < tuples; t++) { - pin = fdt32_to_cpu(gpios[0]); - dir = fdt32_to_cpu(gpios[1]); - flags = fdt32_to_cpu(gpios[2]); + pin = gpios[0]; + dir = gpios[1]; + flags = gpios[2]; mv_gpio_configure(pin, flags); @@ -630,7 +628,7 @@ mv_gpio_init(void) return (ENXIO); /* Get 'gpios' property. */ - OF_getprop(child, "gpios", &gpios, len); + OF_getencprop(child, "gpios", gpios, len); e = (struct gpio_ctrl_entry *)&gpio_controllers; @@ -641,7 +639,7 @@ mv_gpio_init(void) * contain a ref. to a node defining GPIO * controller. */ - ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0])); + ctrl = OF_node_from_xref(gpios[0]); if (ofw_bus_node_is_compatible(ctrl, e->compat)) /* Call a handler. */ diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c index f88294b9dd0..b5bda023146 100644 --- a/sys/arm/mv/mv_machdep.c +++ b/sys/arm/mv/mv_machdep.c @@ -147,21 +147,19 @@ moveon: /* * Process 'pin-count' and 'pin-map' props. */ - if (OF_getprop(node, "pin-count", &pin_count, sizeof(pin_count)) <= 0) + if (OF_getencprop(node, "pin-count", &pin_count, sizeof(pin_count)) <= 0) return (ENXIO); - pin_count = fdt32_to_cpu(pin_count); if (pin_count > MPP_PIN_MAX) return (ERANGE); - if (OF_getprop(node, "#pin-cells", &pin_cells, sizeof(pin_cells)) <= 0) + if (OF_getencprop(node, "#pin-cells", &pin_cells, sizeof(pin_cells)) <= 0) pin_cells = MPP_PIN_CELLS; - pin_cells = fdt32_to_cpu(pin_cells); if (pin_cells > MPP_PIN_CELLS) return (ERANGE); tuple_size = sizeof(pcell_t) * pin_cells; bzero(pinmap, sizeof(pinmap)); - len = OF_getprop(node, "pin-map", pinmap, sizeof(pinmap)); + len = OF_getencprop(node, "pin-map", pinmap, sizeof(pinmap)); if (len <= 0) return (ERANGE); if (len % tuple_size) @@ -176,8 +174,8 @@ moveon: bzero(mpp, sizeof(mpp)); pinmap_ptr = pinmap; for (i = 0; i < pins; i++) { - mpp_pin = fdt32_to_cpu(*pinmap_ptr); - mpp_function = fdt32_to_cpu(*(pinmap_ptr + 1)); + mpp_pin = *pinmap_ptr; + mpp_function = *(pinmap_ptr + 1); mpp[mpp_pin] = mpp_function; pinmap_ptr += pin_cells; } @@ -409,12 +407,10 @@ platform_devmap_init(void) if (ofw_bus_node_is_compatible(child, "mrvl,lbc")) { /* Check available space */ - if (OF_getprop(child, "bank-count", (void *)&bank_count, + if (OF_getencprop(child, "bank-count", &bank_count, sizeof(bank_count)) <= 0) /* If no property, use default value */ bank_count = 1; - else - bank_count = fdt32_to_cpu(bank_count); if ((i + bank_count) >= FDT_DEVMAP_MAX) return (ENOMEM); diff --git a/sys/arm/rockchip/rk30xx_gpio.c b/sys/arm/rockchip/rk30xx_gpio.c index 668b0e699c5..75bfd003404 100644 --- a/sys/arm/rockchip/rk30xx_gpio.c +++ b/sys/arm/rockchip/rk30xx_gpio.c @@ -526,10 +526,8 @@ rk30_gpios_prop_handle(phandle_t ctrl, pcell_t *gpios, int len) if (sc == NULL) return ENXIO; - if (OF_getprop(ctrl, "#gpio-cells", &gpio_cells, sizeof(pcell_t)) < 0) + if (OF_getencprop(ctrl, "#gpio-cells", &gpio_cells, sizeof(pcell_t)) < 0) return (ENXIO); - - gpio_cells = fdt32_to_cpu(gpio_cells); if (gpio_cells != 2) return (ENXIO); @@ -546,9 +544,9 @@ rk30_gpios_prop_handle(phandle_t ctrl, pcell_t *gpios, int len) inc = sizeof(ihandle_t) / sizeof(pcell_t); gpios += inc; for (t = 0; t < tuples; t++) { - pin = fdt32_to_cpu(gpios[0]); - dir = fdt32_to_cpu(gpios[1]); - flags = fdt32_to_cpu(gpios[2]); + pin = gpios[0]; + dir = gpios[1]; + flags = gpios[2]; for (i = 0; i < sc->sc_gpio_npins; i++) { if (sc->sc_gpio_pins[i].gp_pin == pin) @@ -601,7 +599,7 @@ rk30_gpio_init(void) return (ENXIO); /* Get 'gpios' property. */ - OF_getprop(child, "gpios", &gpios, len); + OF_getencprop(child, "gpios", gpios, len); e = (struct gpio_ctrl_entry *)&gpio_controllers; @@ -612,7 +610,7 @@ rk30_gpio_init(void) * contain a ref. to a node defining GPIO * controller. */ - ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0])); + ctrl = OF_node_from_xref(gpios[0]); if (ofw_bus_node_is_compatible(ctrl, e->compat)) /* Call a handler. */ diff --git a/sys/arm/ti/am335x/am335x_lcd.c b/sys/arm/ti/am335x/am335x_lcd.c index 8121ef58e7c..c23aa24fb65 100644 --- a/sys/arm/ti/am335x/am335x_lcd.c +++ b/sys/arm/ti/am335x/am335x_lcd.c @@ -359,13 +359,13 @@ am335x_read_property(device_t dev, phandle_t node, const char *name, uint32_t *v { pcell_t cell; - if ((OF_getprop(node, name, &cell, sizeof(cell))) <= 0) { + if ((OF_getencprop(node, name, &cell, sizeof(cell))) <= 0) { device_printf(dev, "missing '%s' attribute in LCD panel info\n", name); return (ENXIO); } - *val = fdt32_to_cpu(cell); + *val = cell; return (0); } diff --git a/sys/arm/ti/am335x/am335x_lcd_syscons.c b/sys/arm/ti/am335x/am335x_lcd_syscons.c index ba8d69a5d8c..946722fb878 100644 --- a/sys/arm/ti/am335x/am335x_lcd_syscons.c +++ b/sys/arm/ti/am335x/am335x_lcd_syscons.c @@ -382,13 +382,13 @@ am335x_syscons_configure(int flags) root = OF_finddevice("/"); if ((root != 0) && (display = am335x_syscons_find_panel_node(root))) { - if ((OF_getprop(display, "panel_width", - &cell, sizeof(cell))) > 0) - va_sc->width = (int)fdt32_to_cpu(cell); + if ((OF_getencprop(display, "panel_width", &cell, + sizeof(cell))) > 0) + va_sc->width = cell; - if ((OF_getprop(display, "panel_height", - &cell, sizeof(cell))) > 0) - va_sc->height = (int)fdt32_to_cpu(cell); + if ((OF_getencprop(display, "panel_height", &cell, + sizeof(cell))) > 0) + va_sc->height = cell; } if (va_sc->width == 0) diff --git a/sys/arm/ti/ti_adc.c b/sys/arm/ti/ti_adc.c index 154cd78b630..2b49789f5ce 100644 --- a/sys/arm/ti/ti_adc.c +++ b/sys/arm/ti/ti_adc.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -767,14 +766,17 @@ ti_adc_attach(device_t dev) /* Read "tsc" node properties */ child = ofw_bus_find_child(node, "tsc"); if (child != 0 && OF_hasprop(child, "ti,wires")) { - if ((OF_getprop(child, "ti,wires", &cell, sizeof(cell))) > 0) - sc->sc_tsc_wires = fdt32_to_cpu(cell); - if ((OF_getprop(child, "ti,coordinate-readouts", &cell, sizeof(cell))) > 0) - sc->sc_coord_readouts = fdt32_to_cpu(cell); - if ((OF_getprop(child, "ti,x-plate-resistance", &cell, sizeof(cell))) > 0) - sc->sc_x_plate_resistance = fdt32_to_cpu(cell); - if ((OF_getprop(child, "ti,charge-delay", &cell, sizeof(cell))) > 0) - sc->sc_charge_delay = fdt32_to_cpu(cell); + if ((OF_getencprop(child, "ti,wires", &cell, sizeof(cell))) > 0) + sc->sc_tsc_wires = cell; + if ((OF_getencprop(child, "ti,coordinate-readouts", &cell, + sizeof(cell))) > 0) + sc->sc_coord_readouts = cell; + if ((OF_getencprop(child, "ti,x-plate-resistance", &cell, + sizeof(cell))) > 0) + sc->sc_x_plate_resistance = cell; + if ((OF_getencprop(child, "ti,charge-delay", &cell, + sizeof(cell))) > 0) + sc->sc_charge_delay = cell; nwire_configs = OF_getencprop_alloc(child, "ti,wire-config", sizeof(*wire_configs), (void **)&wire_configs); if (nwire_configs != sc->sc_tsc_wires) { diff --git a/sys/arm/ti/ti_sdhci.c b/sys/arm/ti/ti_sdhci.c index a24e6936a62..ed7f1e72dac 100644 --- a/sys/arm/ti/ti_sdhci.c +++ b/sys/arm/ti/ti_sdhci.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -506,10 +505,10 @@ ti_sdhci_attach(device_t dev) * See if we've got a GPIO-based write detect pin. This is not the * standard documented property for this, we added it in freebsd. */ - if ((OF_getprop(node, "mmchs-wp-gpio-pin", &prop, sizeof(prop))) <= 0) + if ((OF_getencprop(node, "mmchs-wp-gpio-pin", &prop, sizeof(prop))) <= 0) sc->wp_gpio_pin = 0xffffffff; else - sc->wp_gpio_pin = fdt32_to_cpu(prop); + sc->wp_gpio_pin = prop; if (sc->wp_gpio_pin != 0xffffffff) { sc->gpio_dev = devclass_get_device(devclass_find("gpio"), 0); diff --git a/sys/arm/versatile/sp804.c b/sys/arm/versatile/sp804.c index de05700dd1c..894415ba11c 100644 --- a/sys/arm/versatile/sp804.c +++ b/sys/arm/versatile/sp804.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -223,8 +222,8 @@ sp804_timer_attach(device_t dev) sc->sysclk_freq = DEFAULT_FREQUENCY; /* Get the base clock frequency */ node = ofw_bus_get_node(dev); - if ((OF_getprop(node, "clock-frequency", &clock, sizeof(clock))) > 0) { - sc->sysclk_freq = fdt32_to_cpu(clock); + if ((OF_getencprop(node, "clock-frequency", &clock, sizeof(clock))) > 0) { + sc->sysclk_freq = clock; } /* Setup and enable the timer */ diff --git a/sys/arm/xilinx/zy7_slcr.c b/sys/arm/xilinx/zy7_slcr.c index c99d5b0b5ae..bd0311c3320 100644 --- a/sys/arm/xilinx/zy7_slcr.c +++ b/sys/arm/xilinx/zy7_slcr.c @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -621,8 +620,8 @@ zy7_slcr_attach(device_t dev) /* Derive PLL frequencies from PS_CLK. */ node = ofw_bus_get_node(dev); - if (OF_getprop(node, "clock-frequency", &cell, sizeof(cell)) > 0) - ps_clk_frequency = fdt32_to_cpu(cell); + if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) > 0) + ps_clk_frequency = cell; else ps_clk_frequency = ZYNQ_DEFAULT_PS_CLK_FREQUENCY; From 876fe7b1bdd0aa8bbdc0cd0d7dc2c95193e69210 Mon Sep 17 00:00:00 2001 From: Konrad Witaszczyk Date: Mon, 14 Nov 2016 12:56:18 +0000 Subject: [PATCH 067/204] Move text dump version as it's not an architecture version. Reported by: jhb Approved by: pjd (mentor) --- sys/sys/kerneldump.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/kerneldump.h b/sys/sys/kerneldump.h index fd010181eb1..13bef698ffc 100644 --- a/sys/sys/kerneldump.h +++ b/sys/sys/kerneldump.h @@ -64,7 +64,8 @@ struct kerneldumpheader { #define KERNELDUMPMAGIC_CLEARED "Cleared Kernel Dump" char architecture[12]; uint32_t version; -#define KERNELDUMPVERSION 1 +#define KERNELDUMPVERSION 1 +#define KERNELDUMP_TEXT_VERSION 1 uint32_t architectureversion; #define KERNELDUMP_AARCH64_VERSION 1 #define KERNELDUMP_AMD64_VERSION 2 @@ -74,7 +75,6 @@ struct kerneldumpheader { #define KERNELDUMP_POWERPC_VERSION 1 #define KERNELDUMP_RISCV_VERSION 1 #define KERNELDUMP_SPARC64_VERSION 1 -#define KERNELDUMP_TEXT_VERSION 1 uint64_t dumplength; /* excl headers */ uint64_t dumptime; uint32_t blocksize; From ae44bb014612f46a12d300be82381d2e16386fb8 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 14 Nov 2016 13:20:10 +0000 Subject: [PATCH 068/204] Initialize reserved bytes in struct mq_attr and its 32compat counterpart, to avoid kernel stack content leak in kmq_setattr(2) syscall. Also slightly simplify the checks around copyout()s. Reported by: Vlad Tsyrklevich PR: 214488 MFC after: 1 week --- sys/kern/uipc_mqueue.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index a04569e2eea..488650190a3 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2242,10 +2242,10 @@ sys_kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) } error = kern_kmq_setattr(td, uap->mqd, uap->attr != NULL ? &attr : NULL, &oattr); - if (error != 0) - return (error); - if (uap->oattr != NULL) + if (error == 0 && uap->oattr != NULL) { + bzero(oattr.__reserved, sizeof(oattr.__reserved)); error = copyout(&oattr, uap->oattr, sizeof(oattr)); + } return (error); } @@ -2759,10 +2759,9 @@ freebsd32_kmq_setattr(struct thread *td, struct freebsd32_kmq_setattr_args *uap) } error = kern_kmq_setattr(td, uap->mqd, uap->attr != NULL ? &attr : NULL, &oattr); - if (error != 0) - return (error); - if (uap->oattr != NULL) { + if (error == 0 && uap->oattr != NULL) { mq_attr_to32(&oattr, &oattr32); + bzero(oattr32.__reserved, sizeof(oattr32.__reserved)); error = copyout(&oattr32, uap->oattr, sizeof(oattr32)); } return (error); From 751e35548bce37780026366cd58d3028664e7fad Mon Sep 17 00:00:00 2001 From: Sean Bruno Date: Mon, 14 Nov 2016 17:19:03 +0000 Subject: [PATCH 069/204] Update WOL support for newer em(4) devices. Do not overwrite the contents of the WUC register, add E1000_WUC_PME_EN to the register contents, leaving the default contents intact. PR: 208343 Submitted by: Kaho Toshikazu Reviewed by: jeffrey piper Approved by: erj@ MFC after: 2 weeks --- sys/dev/e1000/if_em.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index fd602bf482f..b1bf35b5e46 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -5274,6 +5274,8 @@ em_get_wakeup(device_t dev) case e1000_ich10lan: case e1000_pchlan: case e1000_pch2lan: + case e1000_pch_lpt: + case e1000_pch_spt: apme_mask = E1000_WUC_APME; adapter->has_amt = TRUE; eeprom_data = E1000_READ_REG(&adapter->hw, E1000_WUC); @@ -5322,7 +5324,7 @@ em_enable_wakeup(device_t dev) { struct adapter *adapter = device_get_softc(dev); if_t ifp = adapter->ifp; - u32 pmc, ctrl, ctrl_ext, rctl; + u32 pmc, ctrl, ctrl_ext, rctl, wuc; u16 status; if ((pci_find_cap(dev, PCIY_PMG, &pmc) != 0)) @@ -5332,7 +5334,9 @@ em_enable_wakeup(device_t dev) ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); ctrl |= (E1000_CTRL_SWDPIN2 | E1000_CTRL_SWDPIN3); E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); - E1000_WRITE_REG(&adapter->hw, E1000_WUC, E1000_WUC_PME_EN); + wuc = E1000_READ_REG(&adapter->hw, E1000_WUC); + wuc |= E1000_WUC_PME_EN; + E1000_WRITE_REG(&adapter->hw, E1000_WUC, wuc); if ((adapter->hw.mac.type == e1000_ich8lan) || (adapter->hw.mac.type == e1000_pchlan) || @@ -5363,8 +5367,10 @@ em_enable_wakeup(device_t dev) E1000_WRITE_REG(&adapter->hw, E1000_RCTL, rctl); } - if ((adapter->hw.mac.type == e1000_pchlan) || - (adapter->hw.mac.type == e1000_pch2lan)) { + if ((adapter->hw.mac.type == e1000_pchlan) || + (adapter->hw.mac.type == e1000_pch2lan) || + (adapter->hw.mac.type == e1000_pch_lpt) || + (adapter->hw.mac.type == e1000_pch_spt)) { if (em_enable_phy_wakeup(adapter)) return; } else { From 71e35b7da8a1f360339fc706a83d9e9137e60d48 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Mon, 14 Nov 2016 18:30:03 +0000 Subject: [PATCH 070/204] Check if L2 entry exists for the given VA before loading L3 entry. This is a fix for a panic that was easy to reproduce executing "(/bin/ls &)" in the shell. Sponsored by: DARPA, AFRL --- sys/riscv/riscv/pmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 472779c35ad..af8806d8eea 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -1992,6 +1992,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) l2 = pmap_l1_to_l2(l1, sva); if (l2 == NULL) continue; + if (pmap_load(l2) == 0) + continue; if ((pmap_load(l2) & PTE_RX) != 0) continue; From 7b12aa57c1bc006402ca3ef2499d547d8ed975df Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Mon, 14 Nov 2016 19:53:46 +0000 Subject: [PATCH 071/204] Build the Ti/AM335x DTBs as part of GENERIC kernel. Sponsored by: Rubicon Communications, LLC (Netgate) --- sys/arm/conf/GENERIC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index f32f2e5fd17..3728d2bb796 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -219,4 +219,4 @@ options EFI # Flattened Device Tree options FDT # Configure using FDT/DTB data -makeoptions MODULES_EXTRA="dtb/allwinner dtb/nvidia dtb/rpi" +makeoptions MODULES_EXTRA="dtb/allwinner dtb/am335x dtb/nvidia dtb/rpi" From 800762ee73eb0a3294586a8ac66ae84bb252af24 Mon Sep 17 00:00:00 2001 From: Andriy Voskoboinyk Date: Mon, 14 Nov 2016 20:37:07 +0000 Subject: [PATCH 072/204] rtwn: drop excessive includes. Since rom_defs.h is included in rxxx_var.h there is no need to include both of them. Submitted by: kevlo --- sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c | 1 - sys/dev/rtwn/rtl8812a/usb/r12au_attach.c | 1 - sys/dev/rtwn/rtl8821a/usb/r21au_attach.c | 1 - 3 files changed, 3 deletions(-) diff --git a/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c b/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c index e6edea7af49..c15d1e2a034 100644 --- a/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c +++ b/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c b/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c index 9134dce51af..855d2b0b7c8 100644 --- a/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c +++ b/sys/dev/rtwn/rtl8812a/usb/r12au_attach.c @@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include diff --git a/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c b/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c index a9bc47b8969..86f605c335d 100644 --- a/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c +++ b/sys/dev/rtwn/rtl8821a/usb/r21au_attach.c @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include From 047dd1cd6661c0f1669311ece4281fb1c3381ad7 Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Mon, 14 Nov 2016 20:57:30 +0000 Subject: [PATCH 073/204] Add the cpsw, the NIC driver for ti/am335x, to GENERIC kernel. While here: - remove 'device mii' - included by miibus; - remove 'device smcphy' - included by miibus; - sorted the network drivers list; - added a comment about miibus based on amd64/GENERIC. Sponsored by: Rubicon Communications, LLC (Netgate) --- sys/arm/conf/GENERIC | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 3728d2bb796..5b47be76d7f 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -182,18 +182,18 @@ device usfs device loop device ether device vlan # 802.1Q VLAN support -device mii device bpf -device emac # 10/100 integrated EMAC controller -device dwc # 10/100/1000 integrated GMAC controller -device awg # 10/100/1000 integrated EMAC controller - -# USB ethernet support, requires miibus -device smcphy -device smsc +# Ethernet NICs that use the common MII bus controller code. +# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus +device awg # 10/100/1000 integrated EMAC controller +device cpsw # TI Common Platform Ethernet Switch (CPSW) +device dwc # 10/100/1000 integrated GMAC controller +device emac # 10/100 integrated EMAC controller +device smsc # SMSC LAN91C111 + # Sound support device sound From 679761c0e0e080328eebd0a5f562fdcdd9350934 Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Mon, 14 Nov 2016 21:38:36 +0000 Subject: [PATCH 074/204] [MIPS] Print Config7 on boot for several MIPS architectures Config7 contains useful fields, for instance, field AR indicating that the D-cache is configured to avoid cache aliases. This patch brings printing of config7 for MIPS 24K, 74K, 1004K. Reviewed by: adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8514 --- sys/mips/include/cpufunc.h | 3 ++- sys/mips/mips/cpu.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/mips/include/cpufunc.h b/sys/mips/include/cpufunc.h index 427aba74cd3..d891b17ba78 100644 --- a/sys/mips/include/cpufunc.h +++ b/sys/mips/include/cpufunc.h @@ -249,7 +249,8 @@ MIPS_RW32_COP0_SEL(config5, MIPS_COP_0_CONFIG, 5); #if defined(CPU_NLM) || defined(BERI_LARGE_TLB) MIPS_RW32_COP0_SEL(config6, MIPS_COP_0_CONFIG, 6); #endif -#if defined(CPU_NLM) || defined(CPU_MIPS1004K) +#if defined(CPU_NLM) || defined(CPU_MIPS1004K) || defined (CPU_MIPS74K) || \ + defined(CPU_MIPS24K) MIPS_RW32_COP0_SEL(config7, MIPS_COP_0_CONFIG, 7); #endif MIPS_RW32_COP0(count, MIPS_COP_0_COUNT); diff --git a/sys/mips/mips/cpu.c b/sys/mips/mips/cpu.c index e8f48dcb8f8..0bdac90002c 100644 --- a/sys/mips/mips/cpu.c +++ b/sys/mips/mips/cpu.c @@ -337,6 +337,9 @@ static void cpu_identify(void) { uint32_t cfg0, cfg1, cfg2, cfg3; +#if defined(CPU_MIPS1004K) || defined (CPU_MIPS74K) || defined (CPU_MIPS24K) + uint32_t cfg7; +#endif printf("cpu%d: ", 0); /* XXX per-cpu */ switch (cpuinfo.cpu_vendor) { case MIPS_PRID_CID_MTI: @@ -479,6 +482,11 @@ cpu_identify(void) /* Print Config3 if it contains any useful info */ if (cfg3 & ~(0x80000000)) printf(" Config3=0x%b\n", cfg3, "\20\14ULRI\2SmartMIPS\1TraceLogic"); + +#if defined(CPU_MIPS1004K) || defined (CPU_MIPS74K) || defined (CPU_MIPS24K) + cfg7 = mips_rd_config7(); + printf(" Config7=0x%b\n", cfg7, "\20\40WII\21AR"); +#endif } static struct rman cpu_hardirq_rman; From 7db788c66fe734d9f035ae2d2fc225f0dbe7c7d3 Mon Sep 17 00:00:00 2001 From: Andriy Voskoboinyk Date: Mon, 14 Nov 2016 23:51:28 +0000 Subject: [PATCH 075/204] net80211: switch from ieee80211_iterate_nodes() to ieee80211_iterate_nodes_vap() where possible; this should make the code a bit cleaner. --- sys/net80211/ieee80211_adhoc.c | 7 ++++--- sys/net80211/ieee80211_hostap.c | 22 ++++++++++++---------- sys/net80211/ieee80211_ioctl.c | 20 ++++++++------------ sys/net80211/ieee80211_node.c | 17 ++++++----------- sys/net80211/ieee80211_tdma.c | 7 ++++--- 5 files changed, 34 insertions(+), 39 deletions(-) diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index 8362f54bf1a..54cc570b5f8 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -120,9 +120,9 @@ adhoc_vattach(struct ieee80211vap *vap) static void sta_leave(void *arg, struct ieee80211_node *ni) { - struct ieee80211vap *vap = arg; + struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_vap == vap && ni != vap->iv_bss) + if (ni != vap->iv_bss) ieee80211_node_leave(ni); } @@ -164,7 +164,8 @@ adhoc_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) switch (ostate) { case IEEE80211_S_RUN: /* beacon miss */ /* purge station table; entries are stale */ - ieee80211_iterate_nodes(&ic->ic_sta, sta_leave, vap); + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, + sta_leave, NULL); /* fall thru... */ case IEEE80211_S_INIT: if (vap->iv_des_chan != IEEE80211_CHAN_ANYC && diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 5a9a301e74b..8189964e52c 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -107,9 +107,8 @@ hostap_vattach(struct ieee80211vap *vap) static void sta_disassoc(void *arg, struct ieee80211_node *ni) { - struct ieee80211vap *vap = arg; - if (ni->ni_vap == vap && ni->ni_associd != 0) { + if (ni->ni_associd != 0) { IEEE80211_SEND_MGMT(ni, IEEE80211_FC0_SUBTYPE_DISASSOC, IEEE80211_REASON_ASSOC_LEAVE); ieee80211_node_leave(ni); @@ -119,9 +118,9 @@ sta_disassoc(void *arg, struct ieee80211_node *ni) static void sta_csa(void *arg, struct ieee80211_node *ni) { - struct ieee80211vap *vap = arg; + struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_vap == vap && ni->ni_associd != 0) + if (ni->ni_associd != 0) if (ni->ni_inact > vap->iv_inact_init) { ni->ni_inact = vap->iv_inact_init; IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni, @@ -132,9 +131,8 @@ sta_csa(void *arg, struct ieee80211_node *ni) static void sta_drop(void *arg, struct ieee80211_node *ni) { - struct ieee80211vap *vap = arg; - if (ni->ni_vap == vap && ni->ni_associd != 0) + if (ni->ni_associd != 0) ieee80211_node_leave(ni); } @@ -179,7 +177,8 @@ hostap_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) ieee80211_dfs_cac_stop(vap); break; case IEEE80211_S_RUN: - ieee80211_iterate_nodes(&ic->ic_sta, sta_disassoc, vap); + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, + sta_disassoc, NULL); break; default: break; @@ -195,7 +194,8 @@ hostap_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) switch (ostate) { case IEEE80211_S_CSA: case IEEE80211_S_RUN: - ieee80211_iterate_nodes(&ic->ic_sta, sta_disassoc, vap); + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, + sta_disassoc, NULL); /* * Clear overlapping BSS state; the beacon frame * will be reconstructed on transition to the RUN @@ -289,7 +289,8 @@ hostap_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) * Shorten inactivity timer of associated stations * to weed out sta's that don't follow a CSA. */ - ieee80211_iterate_nodes(&ic->ic_sta, sta_csa, vap); + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, + sta_csa, NULL); /* * Update bss node channel to reflect where * we landed after CSA. @@ -340,7 +341,8 @@ hostap_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) * such as capabilities and the negotiated rate * set may/will be wrong). */ - ieee80211_iterate_nodes(&ic->ic_sta, sta_drop, vap); + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, + sta_drop, NULL); } break; default: diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 5d323c05a53..3a797d8175a 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -347,7 +347,6 @@ ieee80211_ioctl_getscanresults(struct ieee80211vap *vap, } struct stainforeq { - struct ieee80211vap *vap; struct ieee80211req_sta_info *si; size_t space; }; @@ -366,8 +365,6 @@ get_sta_space(void *arg, struct ieee80211_node *ni) struct stainforeq *req = arg; size_t ielen; - if (req->vap != ni->ni_vap) - return; if (ni->ni_vap->iv_opmode == IEEE80211_M_HOSTAP && ni->ni_associd == 0) /* only associated stations */ return; @@ -383,8 +380,6 @@ get_sta_info(void *arg, struct ieee80211_node *ni) size_t ielen, len; uint8_t *cp; - if (req->vap != ni->ni_vap) - return; if (vap->iv_opmode == IEEE80211_M_HOSTAP && ni->ni_associd == 0) /* only associated stations */ return; @@ -472,10 +467,10 @@ getstainfo_common(struct ieee80211vap *vap, struct ieee80211req *ireq, error = 0; req.space = 0; - req.vap = vap; - if (ni == NULL) - ieee80211_iterate_nodes(&ic->ic_sta, get_sta_space, &req); - else + if (ni == NULL) { + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_sta_space, + &req); + } else get_sta_space(&req, ni); if (req.space > ireq->i_len) req.space = ireq->i_len; @@ -489,9 +484,10 @@ getstainfo_common(struct ieee80211vap *vap, struct ieee80211req *ireq, goto bad; } req.si = p; - if (ni == NULL) - ieee80211_iterate_nodes(&ic->ic_sta, get_sta_info, &req); - else + if (ni == NULL) { + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, + get_sta_info, &req); + } else get_sta_info(&req, ni); ireq->i_len = space - req.space; error = copyout(p, (uint8_t *) ireq->i_data+off, ireq->i_len); diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 80c61f169ec..05746ad9561 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -2717,7 +2717,6 @@ done: } struct rssiinfo { - struct ieee80211vap *vap; int rssi_samples; uint32_t rssi_total; }; @@ -2729,8 +2728,6 @@ get_hostap_rssi(void *arg, struct ieee80211_node *ni) struct ieee80211vap *vap = ni->ni_vap; int8_t rssi; - if (info->vap != vap) - return; /* only associated stations */ if (ni->ni_associd == 0) return; @@ -2748,8 +2745,6 @@ get_adhoc_rssi(void *arg, struct ieee80211_node *ni) struct ieee80211vap *vap = ni->ni_vap; int8_t rssi; - if (info->vap != vap) - return; /* only neighbors */ /* XXX check bssid */ if ((ni->ni_capinfo & IEEE80211_CAPINFO_IBSS) == 0) @@ -2769,8 +2764,6 @@ get_mesh_rssi(void *arg, struct ieee80211_node *ni) struct ieee80211vap *vap = ni->ni_vap; int8_t rssi; - if (info->vap != vap) - return; /* only neighbors that peered successfully */ if (ni->ni_mlstate != IEEE80211_NODE_MESH_ESTABLISHED) return; @@ -2791,18 +2784,20 @@ ieee80211_getrssi(struct ieee80211vap *vap) info.rssi_total = 0; info.rssi_samples = 0; - info.vap = vap; switch (vap->iv_opmode) { case IEEE80211_M_IBSS: /* average of all ibss neighbors */ case IEEE80211_M_AHDEMO: /* average of all neighbors */ - ieee80211_iterate_nodes(&ic->ic_sta, get_adhoc_rssi, &info); + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_adhoc_rssi, + &info); break; case IEEE80211_M_HOSTAP: /* average of all associated stations */ - ieee80211_iterate_nodes(&ic->ic_sta, get_hostap_rssi, &info); + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_hostap_rssi, + &info); break; #ifdef IEEE80211_SUPPORT_MESH case IEEE80211_M_MBSS: /* average of all mesh neighbors */ - ieee80211_iterate_nodes(&ic->ic_sta, get_mesh_rssi, &info); + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_mesh_rssi, + &info); break; #endif case IEEE80211_M_MONITOR: /* XXX */ diff --git a/sys/net80211/ieee80211_tdma.c b/sys/net80211/ieee80211_tdma.c index e85cb9827de..aac8c7fd55c 100644 --- a/sys/net80211/ieee80211_tdma.c +++ b/sys/net80211/ieee80211_tdma.c @@ -209,9 +209,9 @@ tdma_vdetach(struct ieee80211vap *vap) static void sta_leave(void *arg, struct ieee80211_node *ni) { - struct ieee80211vap *vap = arg; + struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_vap == vap && ni != vap->iv_bss) + if (ni != vap->iv_bss) ieee80211_node_leave(ni); } @@ -246,7 +246,8 @@ tdma_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) ieee80211_cancel_scan(vap); /* background scan */ if (ostate == IEEE80211_S_RUN) { /* purge station table; entries are stale */ - ieee80211_iterate_nodes(&ic->ic_sta, sta_leave, vap); + ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, + sta_leave, NULL); } if (vap->iv_flags_ext & IEEE80211_FEXT_SCANREQ) { ieee80211_check_scan(vap, From e961ace3ca67ec24de27b017056fdbfe89e8423a Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Tue, 15 Nov 2016 00:24:18 +0000 Subject: [PATCH 076/204] fold(1): Revert incorrect r308432 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As Jean-Sébastien notes, fold(1) requires handling argv-supplied files. That will require a slightly more sophisticated approach. Reported by: dumbbell@ Sponsored by: Dell EMC Isilon --- usr.bin/fold/fold.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/usr.bin/fold/fold.c b/usr.bin/fold/fold.c index 7eedfe252c0..1ce9b5eb3a9 100644 --- a/usr.bin/fold/fold.c +++ b/usr.bin/fold/fold.c @@ -45,7 +45,6 @@ static char sccsid[] = "@(#)fold.c 8.1 (Berkeley) 6/6/93"; #include __FBSDID("$FreeBSD$"); -#include #include #include #include @@ -73,9 +72,6 @@ main(int argc, char **argv) (void) setlocale(LC_CTYPE, ""); - if (caph_limit_stdio() < 0 || (cap_enter() < 0 && errno != ENOSYS)) - err(1, "capsicum"); - width = -1; previous_ch = 0; while ((ch = getopt(argc, argv, "0123456789bsw:")) != -1) { From 7e9a1606428007a73927f27e9c0f82769f2c0dcb Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Tue, 15 Nov 2016 00:58:31 +0000 Subject: [PATCH 077/204] Reduce dmesg verbosity. --- sys/contrib/vchiq/interface/compat/vchi_bsd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/contrib/vchiq/interface/compat/vchi_bsd.c b/sys/contrib/vchiq/interface/compat/vchi_bsd.c index 3d939b130a2..5e9965f03c7 100644 --- a/sys/contrib/vchiq/interface/compat/vchi_bsd.c +++ b/sys/contrib/vchiq/interface/compat/vchi_bsd.c @@ -300,7 +300,6 @@ void sema_sysinit(void *arg) { struct semaphore *s = arg; - printf("sema_sysinit\n"); _sema_init(s, 1); } From 0046bef85a49d6f58542c9fdb3ae2b35c599824d Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 15 Nov 2016 01:34:38 +0000 Subject: [PATCH 078/204] [mips] make UMTX_CHAINS configurable at compile time. The default (512) wastes quite a bit of space which doesn't really buy us much on highly embedded systems which don't take a lot of locks in parallel. This makes it at least build time configurable so people can experiment. --- sys/conf/options | 2 ++ sys/kern/kern_umtx.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/conf/options b/sys/conf/options index 79f71a8e487..c3d0a7255aa 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -220,6 +220,7 @@ SYSVSHM opt_sysvipc.h SW_WATCHDOG opt_watchdog.h TURNSTILE_PROFILING UMTX_PROFILING +UMTX_CHAINS opt_global.h VERBOSE_SYSINIT # POSIX kernel options @@ -996,3 +997,4 @@ GPIO_SPI_DEBUG opt_gpio.h EVDEV_SUPPORT opt_evdev.h EVDEV_DEBUG opt_evdev.h UINPUT_DEBUG opt_evdev.h + diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index ae2dfcd52ec..2bdc2bf8d81 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -198,7 +198,9 @@ struct umtxq_chain { PRI_MAX_TIMESHARE : (td)->td_user_pri) #define GOLDEN_RATIO_PRIME 2654404609U +#ifndef UMTX_CHAINS #define UMTX_CHAINS 512 +#endif #define UMTX_SHIFTS (__WORD_BIT - 9) #define GET_SHARE(flags) \ From 8ffa01a06199df4d14b56a9261dc2a8b3b156a2f Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 15 Nov 2016 01:41:45 +0000 Subject: [PATCH 079/204] [mips] enable relbuf on mips for now to work around page aliasing in mips hardware. Although the higher end MIPS hardware handles cache aliasing issues in hardware, the older cores (r4k, etc) and some compile versions of the newer cores (mips24k, mips34k, mips74k) don't have this feature. This means we end up with some very unfortunate behaviour that was made very obvious by some recent changes to the FFS pager by kib. So, flip this off until we get our MIPS pmap/cache code upgraded to handle aliased pages in software. Discussed with: kib, bsdimp, juli --- sys/kern/vfs_bio.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 54f32c99d27..8d3d839d99e 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -4655,7 +4655,24 @@ bdata2bio(struct buf *bp, struct bio *bip) } } -static int buf_pager_relbuf; +/* + * The MIPS pmap code currently doesn't handle aliased pages. + * The VIPT caches may not handle page aliasing themselves, leading + * to data corruption. + * + * As such, this code makes a system extremely unhappy if said + * system doesn't support unaliasing the above situation in hardware. + * Some "recent" systems (eg some mips24k/mips74k cores) don't enable + * this feature at build time, so it has to be handled in software. + * + * Once the MIPS pmap/cache code grows to support this function on + * earlier chips, it should be flipped back off. + */ +#ifdef __mips__ +static int buf_pager_relbuf = 1; +#else +static int buf_pager_relbuf = 0; +#endif SYSCTL_INT(_vfs, OID_AUTO, buf_pager_relbuf, CTLFLAG_RWTUN, &buf_pager_relbuf, 0, "Make buffer pager release buffers after reading"); From f8a67728f3b657f7f45a402e6841bee1736862eb Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 15 Nov 2016 01:47:37 +0000 Subject: [PATCH 080/204] [net80211] announce 11n capabilities in probe requests in IBSS mode. The 802.11-2012 specification notes that a subset of IEs should be present in IBSS probe requests. This is what (initially) allows nodes to discover that other nodes are 11n capable. Notably - HTCAP, but not HTINFO. This isn't everything required to reliably enable 11n between net80211 peers; there's more work to come. Tested: * AR9380, IBSS+11n mode --- sys/net80211/ieee80211_output.c | 38 +++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 5a6cce625b9..c71f8541085 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -2074,6 +2074,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; + struct ieee80211_node *bss; const struct ieee80211_txparam *tp; struct ieee80211_bpf_params params; const struct ieee80211_rateset *rs; @@ -2081,10 +2082,13 @@ ieee80211_send_probereq(struct ieee80211_node *ni, uint8_t *frm; int ret; + bss = ieee80211_ref_node(vap->iv_bss); + if (vap->iv_state == IEEE80211_S_CAC) { IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT, ni, "block %s frame in CAC state", "probe request"); vap->iv_stats.is_tx_badstate++; + ieee80211_free_node(bss); return EIO; /* XXX */ } @@ -2106,6 +2110,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, * [tlv] supported rates * [tlv] RSN (optional) * [tlv] extended supported rates + * [tlv] HT cap (optional) * [tlv] WPA (optional) * [tlv] user-specified ie's */ @@ -2113,6 +2118,8 @@ ieee80211_send_probereq(struct ieee80211_node *ni, ic->ic_headroom + sizeof(struct ieee80211_frame), 2 + IEEE80211_NWID_LEN + 2 + IEEE80211_RATE_SIZE + + sizeof(struct ieee80211_ie_htcap) + + sizeof(struct ieee80211_ie_htinfo) + sizeof(struct ieee80211_ie_wpa) + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE) + sizeof(struct ieee80211_ie_wpa) @@ -2122,6 +2129,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, if (m == NULL) { vap->iv_stats.is_tx_nobuf++; ieee80211_free_node(ni); + ieee80211_free_node(bss); return ENOMEM; } @@ -2130,6 +2138,27 @@ ieee80211_send_probereq(struct ieee80211_node *ni, frm = ieee80211_add_rates(frm, rs); frm = ieee80211_add_rsn(frm, vap); frm = ieee80211_add_xrates(frm, rs); + + /* + * Note: we can't use bss; we don't have one yet. + * + * So, we should announce our capabilities + * in this channel mode (2g/5g), not the + * channel details itself. + */ + if ((vap->iv_opmode == IEEE80211_M_IBSS) && + (vap->iv_flags_ht & IEEE80211_FHT_HT)) { + struct ieee80211_channel *c; + + /* + * Get the HT channel that we should try upgrading to. + * If we can do 40MHz then this'll upgrade it appropriately. + */ + c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan, + vap->iv_flags_ht); + frm = ieee80211_add_htcap_ch(frm, vap, c); + } + frm = ieee80211_add_wpa(frm, vap); if (vap->iv_appie_probereq != NULL) frm = add_appie(frm, vap->iv_appie_probereq); @@ -2141,6 +2170,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, if (m == NULL) { /* NB: cannot happen */ ieee80211_free_node(ni); + ieee80211_free_node(bss); return ENOMEM; } @@ -2157,8 +2187,11 @@ ieee80211_send_probereq(struct ieee80211_node *ni, IEEE80211_NODE_STAT(ni, tx_mgmt); IEEE80211_DPRINTF(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_DUMPPKTS, - "send probe req on channel %u bssid %s ssid \"%.*s\"\n", - ieee80211_chan2ieee(ic, ic->ic_curchan), ether_sprintf(bssid), + "send probe req on channel %u bssid %s sa %6D da %6D ssid \"%.*s\"\n", + ieee80211_chan2ieee(ic, ic->ic_curchan), + ether_sprintf(bssid), + sa, ":", + da, ":", ssidlen, ssid); memset(¶ms, 0, sizeof(params)); @@ -2173,6 +2206,7 @@ ieee80211_send_probereq(struct ieee80211_node *ni, params.ibp_power = ni->ni_txpower; ret = ieee80211_raw_output(vap, ni, m, ¶ms); IEEE80211_TX_UNLOCK(ic); + ieee80211_free_node(bss); return (ret); } From 168fce73b59d6023cab45d063a452551a1f2103e Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Tue, 15 Nov 2016 02:36:12 +0000 Subject: [PATCH 081/204] hyperv/vss: Add driver and tools for VSS VSS stands for "Volume Shadow Copy Service". Unlike virtual machine snapshot, it only takes snapshot for the virtual disks, so both filesystem and applications have to aware of it, and cooperate the whole VSS process. This driver exposes two device files to the userland: /dev/hv_fsvss_dev Normally userland programs should _not_ mess with this device file. It is currently used by the hv_vss_daemon(8), which freezes and thaws the filesystem. NOTE: currently only UFS is supported, if the system mounts _any_ other filesystems, the hv_vss_daemon(8) will veto the VSS process. If hv_vss_daemon(8) was disabled, then this device file must be opened, and proper ioctls must be issued to keep the VSS working. /dev/hv_appvss_dev Userland application can opened this device file to receive the VSS freeze notification, hold the VSS for a while (mainly to flush application data to filesystem), release the VSS process, and receive the VSS thaw notification i.e. applications can run again. The VSS will still work, even if this device file is not opened. However, only filesystem consistency is promised, if this device file is not opened or is not operated properly. hv_vss_daemon(8) is started by devd(8) by default. It can be disabled by editting /etc/devd/hyperv.conf. Submitted by: Hongjiang Zhang Reviewed by: kib, mckusick MFC after: 3 weeks Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8224 --- contrib/hyperv/tools/hv_vss_daemon.8 | 88 ++ contrib/hyperv/tools/hv_vss_daemon.c | 275 +++++ etc/devd/hyperv.conf | 16 + etc/mtree/BSD.include.dist | 2 + include/Makefile | 14 +- share/man/man4/Makefile | 1 + share/man/man4/hv_vss.4 | 366 ++++++ sys/conf/files.amd64 | 1 + sys/conf/files.i386 | 1 + sys/dev/hyperv/utilities/hv_snapshot.c | 1061 +++++++++++++++++ sys/dev/hyperv/utilities/hv_snapshot.h | 56 + sys/modules/hyperv/utilities/Makefile | 2 +- usr.sbin/hyperv/Makefile | 4 +- usr.sbin/hyperv/tools/{ => kvp}/Makefile | 4 +- .../hyperv/tools/{ => kvp}/Makefile.depend | 0 usr.sbin/hyperv/tools/vss/Makefile | 14 + usr.sbin/hyperv/tools/vss/Makefile.depend | 18 + 17 files changed, 1916 insertions(+), 7 deletions(-) create mode 100644 contrib/hyperv/tools/hv_vss_daemon.8 create mode 100644 contrib/hyperv/tools/hv_vss_daemon.c create mode 100644 share/man/man4/hv_vss.4 create mode 100644 sys/dev/hyperv/utilities/hv_snapshot.c create mode 100644 sys/dev/hyperv/utilities/hv_snapshot.h rename usr.sbin/hyperv/tools/{ => kvp}/Makefile (52%) rename usr.sbin/hyperv/tools/{ => kvp}/Makefile.depend (100%) create mode 100644 usr.sbin/hyperv/tools/vss/Makefile create mode 100644 usr.sbin/hyperv/tools/vss/Makefile.depend diff --git a/contrib/hyperv/tools/hv_vss_daemon.8 b/contrib/hyperv/tools/hv_vss_daemon.8 new file mode 100644 index 00000000000..090690c368b --- /dev/null +++ b/contrib/hyperv/tools/hv_vss_daemon.8 @@ -0,0 +1,88 @@ +.\" Copyright (c) 2016 Microsoft Corp. +.\" 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$ +.Dd October 12, 2016 +.Dt HV_VSS_DAEMON 8 +.Os +.Sh NAME +.Nm hv_vss_daemon +.Nd Hyper-V Volume Shadow Copy Service Daemon +.Sh SYNOPSIS +.Nm +.Op Fl dn +.Sh DESCRIPTION +The +.Nm +daemon provides the ability to freeze and thaw the file system for +.Fx +guest partitions running on Hyper-V. +.Pp +Hyper-V allows administrators to backup or restore the +.Fx +guest partition. +Administrators can +use Windows Powershell scripts to backup or restore the +.Fx +VM. +.Pp +The +.Nm +accepts file system freeze and thaw requests from the +.Xr hv_utils 4 +driver and performs the actual file-system operation. +.Pp +The file system freeze and thaw functionality is +useful when the Hyper-V host wants to do live backup of +.Fx +guest. Hyper-V host sends file system freezing request to +.Nm +which conducts the real operation. After successfully freezing file +system, Hyper-V host takes a snapshot of the VM. In the future, +Hyper-V host can restore the +.Fx +VM through that snapshot. +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl d +Run as regular process instead of a daemon for debugging purpose. +.It Fl n +Generate debugging output. +.El +.Sh SEE ALSO +.Xr hv_vmbus 4 , +.Xr hv_utils 4 , +.Xr hv_netvsc 4 , +.Xr hv_storvsc 4 , +.Xr hv_kvp 4 +.Sh HISTORY +The daemon was introduced in October 2016 and developed by Microsoft Corp. +.Sh AUTHORS +.An -nosplit +.Fx +support for +.Nm +was first added by +.An Microsoft BSD Integration Services Team Aq Mt bsdic@microsoft.com . diff --git a/contrib/hyperv/tools/hv_vss_daemon.c b/contrib/hyperv/tools/hv_vss_daemon.c new file mode 100644 index 00000000000..8b58bc93a25 --- /dev/null +++ b/contrib/hyperv/tools/hv_vss_daemon.c @@ -0,0 +1,275 @@ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "hv_snapshot.h" + +#define UNDEF_FREEZE_THAW (0) +#define FREEZE (1) +#define THAW (2) + +#define VSS_LOG(priority, format, args...) do { \ + if (is_debugging == 1) { \ + if (is_daemon == 1) \ + syslog(priority, format, ## args); \ + else \ + printf(format, ## args); \ + } else { \ + if (priority < LOG_DEBUG) { \ + if (is_daemon == 1) \ + syslog(priority, format, ## args); \ + else \ + printf(format, ## args); \ + } \ + } \ + } while(0) + +static int is_daemon = 1; +static int is_debugging = 0; +static int g_ufs_suspend_handle = -1; + +static const char *dev = "/dev"; + +static int +check(void) +{ + struct statfs *mntbuf, *statfsp; + int mntsize; + int i; + + mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); + if (mntsize == 0) { + VSS_LOG(LOG_ERR, "There is no mount information\n"); + return (EINVAL); + } + for (i = mntsize - 1; i >= 0; --i) + { + statfsp = &mntbuf[i]; + + if (strncmp(statfsp->f_mntonname, dev, strlen(dev)) == 0) { + continue; /* skip to freeze '/dev' */ + } else if (statfsp->f_flags & MNT_RDONLY) { + continue; /* skip to freeze RDONLY partition */ + } else if (strncmp(statfsp->f_fstypename, "ufs", 3) != 0) { + return (EPERM); /* only UFS can be freezed */ + } + } + + return (0); +} + +static int +freeze(void) +{ + struct statfs *mntbuf, *statfsp; + int mntsize; + int error = 0; + int i; + + g_ufs_suspend_handle = open(_PATH_UFSSUSPEND, O_RDWR); + if (g_ufs_suspend_handle == -1) { + VSS_LOG(LOG_ERR, "unable to open %s", _PATH_UFSSUSPEND); + return (errno); + } + + mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); + if (mntsize == 0) { + VSS_LOG(LOG_ERR, "There is no mount information\n"); + return (EINVAL); + } + for (i = mntsize - 1; i >= 0; --i) + { + statfsp = &mntbuf[i]; + + if (strncmp(statfsp->f_mntonname, dev, strlen(dev)) == 0) { + continue; /* skip to freeze '/dev' */ + } else if (statfsp->f_flags & MNT_RDONLY) { + continue; /* skip to freeze RDONLY partition */ + } else if (strncmp(statfsp->f_fstypename, "ufs", 3) != 0) { + continue; /* only UFS can be freezed */ + } + error = ioctl(g_ufs_suspend_handle, UFSSUSPEND, &statfsp->f_fsid); + if (error != 0) { + VSS_LOG(LOG_ERR, "error: %d\n", errno); + error = errno; + } else { + VSS_LOG(LOG_INFO, "Successfully suspend fs: %s\n", + statfsp->f_mntonname); + } + } + + return (error); +} + +/** + * close the opened handle will thaw the FS. + */ +static int +thaw(void) +{ + int error = 0; + if (g_ufs_suspend_handle != -1) { + error = close(g_ufs_suspend_handle); + if (!error) { + g_ufs_suspend_handle = -1; + VSS_LOG(LOG_INFO, "Successfully thaw the fs\n"); + } else { + error = errno; + VSS_LOG(LOG_ERR, "Fail to thaw the fs: " + "%d %s\n", errno, strerror(errno)); + } + } else { + VSS_LOG(LOG_INFO, "The fs has already been thawed\n"); + } + + return (error); +} + +static void +usage(const char* cmd) +{ + fprintf(stderr, "%s: daemon for UFS file system freeze/thaw\n" + " -d : enable debug log printing. Default is disabled.\n" + " -n : run as a regular process instead of a daemon. Default is a daemon.\n" + " -h : print usage.\n", cmd); + exit(1); +} + +int +main(int argc, char* argv[]) +{ + struct hv_vss_opt_msg userdata; + + struct pollfd hv_vss_poll_fd[1]; + uint32_t op; + int ch, r, len, error; + int hv_vss_dev_fd; + + int freeze_thaw = UNDEF_FREEZE_THAW; + while ((ch = getopt(argc, argv, "dnh")) != -1) { + switch (ch) { + case 'n': + /* Run as regular process for debugging purpose. */ + is_daemon = 0; + break; + case 'd': + /* Generate debugging output */ + is_debugging = 1; + break; + case 'h': + default: + usage(argv[0]); + break; + } + } + + openlog("HV_VSS", 0, LOG_USER); + + /* Become daemon first. */ + if (is_daemon == 1) + daemon(1, 0); + else + VSS_LOG(LOG_DEBUG, "Run as regular process.\n"); + + VSS_LOG(LOG_INFO, "HV_VSS starting; pid is: %d\n", getpid()); + + memset(&userdata, 0, sizeof(struct hv_vss_opt_msg)); + /* register the daemon */ + hv_vss_dev_fd = open(VSS_DEV(FS_VSS_DEV_NAME), O_RDWR); + + if (hv_vss_dev_fd < 0) { + VSS_LOG(LOG_ERR, "Fail to open %s, error: %d %s\n", + VSS_DEV(FS_VSS_DEV_NAME), errno, strerror(errno)); + exit(EXIT_FAILURE); + } + hv_vss_poll_fd[0].fd = hv_vss_dev_fd; + hv_vss_poll_fd[0].events = POLLIN | POLLRDNORM; + + while (1) { + r = poll(hv_vss_poll_fd, 1, INFTIM); + + VSS_LOG(LOG_DEBUG, "poll returned r = %d, revent = 0x%x\n", + r, hv_vss_poll_fd[0].revents); + + if (r == 0 || (r < 0 && errno == EAGAIN) || + (r < 0 && errno == EINTR)) { + /* Nothing to read */ + continue; + } + + if (r < 0) { + /* + * For poll return failure other than EAGAIN, + * we want to exit. + */ + VSS_LOG(LOG_ERR, "Poll failed.\n"); + perror("poll"); + exit(EIO); + } + + /* Read from character device */ + error = ioctl(hv_vss_dev_fd, IOCHVVSSREAD, &userdata); + if (error < 0) { + VSS_LOG(LOG_ERR, "Read failed.\n"); + perror("pread"); + exit(EIO); + } + + if (userdata.status != 0) { + VSS_LOG(LOG_ERR, "data read error\n"); + continue; + } + + /* + * We will use the KVP header information to pass back + * the error from this daemon. So, first save the op + * and pool info to local variables. + */ + + op = userdata.opt; + + switch (op) { + case HV_VSS_CHECK: + error = check(); + break; + case HV_VSS_FREEZE: + error = freeze(); + break; + case HV_VSS_THAW: + error = thaw(); + break; + default: + VSS_LOG(LOG_ERR, "Illegal operation: %d\n", op); + error = VSS_FAIL; + } + if (error) + userdata.status = VSS_FAIL; + else + userdata.status = VSS_SUCCESS; + error = ioctl(hv_vss_dev_fd, IOCHVVSSWRITE, &userdata); + if (error != 0) { + VSS_LOG(LOG_ERR, "Fail to write to device\n"); + exit(EXIT_FAILURE); + } else { + VSS_LOG(LOG_INFO, "Send response %d for %s to kernel\n", + userdata.status, op == HV_VSS_FREEZE ? "Freeze" : + (op == HV_VSS_THAW ? "Thaw" : "Check")); + } + } +} diff --git a/etc/devd/hyperv.conf b/etc/devd/hyperv.conf index bed7383d081..0abf284a9ce 100644 --- a/etc/devd/hyperv.conf +++ b/etc/devd/hyperv.conf @@ -17,3 +17,19 @@ notify 10 { match "cdev" "hv_kvp_dev"; action "pkill -x hv_kvp_daemon"; }; + +notify 11 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "hv_fsvss_dev"; + action "/usr/sbin/hv_vss_daemon"; +}; + +notify 11 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "DESTROY"; + match "cdev" "hv_fsvss_dev"; + action "pkill -x hv_vss_daemon"; +}; diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index 5beaf3d2db6..8a9bbeabdb9 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -118,6 +118,8 @@ .. hwpmc .. + hyperv + .. ic .. iicbus diff --git a/include/Makefile b/include/Makefile index f2d76b6af06..302d26957c3 100644 --- a/include/Makefile +++ b/include/Makefile @@ -44,7 +44,7 @@ LDIRS= bsm cam geom net net80211 netgraph netinet netinet6 \ LSUBDIRS= cam/ata cam/nvme cam/scsi \ dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ - dev/hwpmc \ + dev/hwpmc dev/hyperv \ dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/utopia dev/vkbd dev/wi \ @@ -155,7 +155,7 @@ copies: .PHONY .META done; \ fi .endfor -.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS} +.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS} cd ${.CURDIR}/../sys; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ ${DESTDIR}${INCLUDEDIR}/$i @@ -185,6 +185,9 @@ copies: .PHONY .META ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \ ${DESTDIR}${INCLUDEDIR}/dev/evdev + cd ${.CURDIR}/../sys/dev/hyperv/utilities; \ + ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hv_snapshot.h \ + ${DESTDIR}${INCLUDEDIR}/dev/hyperv cd ${.CURDIR}/../sys/dev/pci; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \ ${DESTDIR}${INCLUDEDIR}/dev/pci @@ -257,7 +260,7 @@ symlinks: .PHONY .META ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ done .endfor -.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/nand:Ndev/pci} +.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/nand:Ndev/pci} cd ${.CURDIR}/../sys/$i; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ @@ -290,6 +293,11 @@ symlinks: .PHONY .META ln -fs ../../../../sys/dev/evdev/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ done + cd ${.CURDIR}/../sys/dev/hyperv/utilities; \ + for h in hv_snapshot.h; do \ + ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/utilities/$$h \ + ${DESTDIR}${INCLUDEDIR}/dev/hyperv; \ + done cd ${.CURDIR}/../sys/dev/pci; \ for h in pcireg.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/pci/$$h \ diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 61f1a89c5f2..1b52dce6d3e 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -192,6 +192,7 @@ MAN= aac.4 \ hv_storvsc.4 \ hv_utils.4 \ hv_vmbus.4 \ + hv_vss.4 \ hwpmc.4 \ ichsmb.4 \ ${_ichwd.4} \ diff --git a/share/man/man4/hv_vss.4 b/share/man/man4/hv_vss.4 new file mode 100644 index 00000000000..4db54e364d9 --- /dev/null +++ b/share/man/man4/hv_vss.4 @@ -0,0 +1,366 @@ +.\" Copyright (c) 2016 Microsoft Corp. +.\" 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$ +.Dd October 12, 2016 +.Dt HV_VSS 4 +.Os +.Sh NAME +.Nm hv_vss +.Nd Hyper-V Volume Shadow Copy Service API +.Sh SYNOPSIS +.In dev/hyperv/hv_snapshot.h +.Bd -literal +#define VSS_SUCCESS 0x00000000 +#define VSS_FAIL 0x00000001 + +enum hv_vss_op_t { + HV_VSS_NONE = 0, + HV_VSS_CHECK, + HV_VSS_FREEZE, + HV_VSS_THAW, + HV_VSS_COUNT +}; + +struct hv_vss_opt_msg { + uint32_t opt; /* operation */ + uint32_t status; /* 0 for success, 1 for error */ + uint64_t msgid; /* an ID used to identify the transaction */ + uint8_t reserved[48]; /* reserved values are all zeroes */ +}; +.Ed +.Sh DESCRIPTION +The freeze or thaw functionality of application is important to guarantee +the application consistent backup. On windows platform, VSS is defined to do +live backup. But for VM guest running on Hyper-V, the corresponding VSS is +not defined yet. For example, a running database server instance, it knows when the +applications' freeze/thaw should start or finish. But it is not aware of +the freeze/thaw notification from Hyper-V host. The +.Nm +is designed to notify application freeze/thaw request. +Thus, it plays a role of broker to forward the freeze/thaw command from Hyper-V host +to userland application if it registered VSS service on +.Fx +VM, and sends the result back to Hyper-V host. +.Pp +Generally, +.Xr hv_vss_daemon 8 +takes the responsiblity to freeze/thaw UFS file system, +and it is automatically launched after system boots. When Hyper-V host wants to +take a snapshot of the +.Fx +VM, it will first send VSS capability check to +.Fx +VM. The +.Nm +received the request and forward the request to userland application if it is +registered. Only after +.Nm +received the VSS_SUCCESS response from application, the +.Xr hv_vss_daemon 8 +will be informed to check whether file system freeze/thaw is supported. Any error +occurs during this period, +.Nm +will inform Hyper-V host that VSS is not supported. In addition, there is a default +timeout limit before sending response to Hyper-V host. +If the total response time from application and +.Xr hv_vss_daemon 8 +exceeds this value, timeout +will occurs and VSS unsupported is responsed to Hyper-V host. +.Pp +After Hyper-V host confirmed the +.Fx +VM supports VSS, it will send freeze request to VM, and +.Nm +will first forward it to application. After application finished freezing, it should +inform +.Nm +and file system level freezing will be triggered by +.Xr hv_vss_daemon 8 . After all freezing +on both application and +.Xr hv_vss_daemon 8 +were finished, the +.Nm +will inform Hyper-V host that freezing is done. Of course, there is a timeout limit as +same as VSS capability is set to make sure freezing on +.Fx +VM is not hang. If there is any error occurs or timeout happened, the freezing is failed +on Hyper-V side. +.Pp +Hyper-V host will send thaw request after taking the snapshot, typically, this period is +very short in order not to block the running application. +.Nm +firstly thaw the file system by notifying +.Xr hv_vss_daemon 8 , +then notifies user registered +application. There is also a timeout check before sending response to Hyper-V host. +.Pp +All the default timeout limit used in VSS capability check, freeze or thaw is the same. +It is 15 seconds currently. +.Sh NOTES +.Nm +only support UFS currently. If any of file system partition is non UFS, the VSS capability +check will fail. If application does not register VSS, +.Nm +only support backup for file system level consistent. The device should be closed before it +was opened again. If you want to simultaneously open "/dev/hv_appvss_dev" two or more times, +an error (-1) will be returned, and errno was set. +.Pp +If +.Xr hv_vss_daemon 8 +was killed after system boots, the VSS functionality will not work. +.Sh EXAMPLES +The following is a complete example which does nothing except for waiting 2 seconds when +receiving those notifications from +.Nm +.Bd -literal +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define UNDEF_FREEZE_THAW (0) +#define FREEZE (1) +#define THAW (2) +#define CHECK (3) + +#define VSS_LOG(priority, format, args...) do { \\ + if (is_debugging == 1) { \\ + if (is_daemon == 1) \\ + syslog(priority, format, ## args); \\ + else \\ + printf(format, ## args); \\ + } else { \\ + if (priority < LOG_DEBUG) { \\ + if (is_daemon == 1) \\ + syslog(priority, format, ## args); \\ + else \\ + printf(format, ## args); \\ + } \\ + } \\ + } while(0) + +#define CHECK_TIMEOUT 1 +#define CHECK_FAIL 2 +#define FREEZE_TIMEOUT 1 +#define FREEZE_FAIL 2 +#define THAW_TIMEOUT 1 +#define THAW_FAIL 2 + +static int is_daemon = 1; +static int is_debugging = 0; +static int simu_opt_waiting = 2; // seconds + +#define GENERIC_OPT(TIMEOUT, FAIL) \\ + do { \\ + sleep(simu_opt_waiting); \\ + if (opt == CHECK_TIMEOUT) { \\ + sleep(simu_opt_waiting * 10); \\ + VSS_LOG(LOG_INFO, "%s timeout simulation\\n", \\ + __func__); \\ + return (0); \\ + } else if (opt == CHECK_FAIL) { \\ + VSS_LOG(LOG_INFO, "%s failure simulation\\n", \\ + __func__); \\ + return (CHECK_FAIL); \\ + } else { \\ + VSS_LOG(LOG_INFO, "%s success simulation\\n", \\ + __func__); \\ + return (0); \\ + } \\ + } while (0) + +static int +check(int opt) +{ + GENERIC_OPT(CHECK_TIMEOUT, CHECK_FAIL); +} + +static int +freeze(int opt) +{ + GENERIC_OPT(FREEZE_TIMEOUT, FREEZE_FAIL); +} + +static int +thaw(int opt) +{ + GENERIC_OPT(THAW_TIMEOUT, THAW_FAIL); +} + +static void usage(const char* cmd) { + fprintf(stderr, + "%s -f <0|1|2>: simulate app freeze." + " 0: successful, 1: freeze timeout, 2: freeze failed\\n" + " -c <0|1|2>: simulate vss feature check" + " -t <0|1|2>: simulate app thaw." + " 0: successful, 1: freeze timeout, 2: freeze failed\\n" + " -d : enable debug mode\\n" + " -n : run this tool under non-daemon mode\\n", cmd); +} + +int +main(int argc, char* argv[]) { + int ch, freezesimuop = 0, thawsimuop = 0, checksimuop = 0, fd, r, error; + uint32_t op; + struct pollfd app_vss_fd[1]; + struct hv_vss_opt_msg userdata; + + while ((ch = getopt(argc, argv, "f:c:t:dnh")) != -1) { + switch (ch) { + case 'f': + /* Run as regular process for debugging purpose. */ + freezesimuop = (int)strtol(optarg, NULL, 10); + break; + case 't': + thawsimuop = (int)strtol(optarg, NULL, 10); + break; + case 'c': + checksimuop = (int)strtol(optarg, NULL, 10); + break; + case 'd': + is_debugging = 1; + break; + case 'n': + is_daemon = 0; + break; + case 'h': + default: + usage(argv[0]); + exit(0); + } + } + + openlog("APPVSS", 0, LOG_USER); + /* Become daemon first. */ + if (is_daemon == 1) + daemon(1, 0); + else + VSS_LOG(LOG_DEBUG, "Run as regular process.\\n"); + + VSS_LOG(LOG_INFO, "HV_VSS starting; pid is: %d\\n", getpid()); + + fd = open(VSS_DEV(APP_VSS_DEV_NAME), O_RDWR); + if (fd < 0) { + VSS_LOG(LOG_ERR, "Fail to open %s, error: %d %s\\n", + VSS_DEV(APP_VSS_DEV_NAME), errno, strerror(errno)); + exit(EXIT_FAILURE); + } + app_vss_fd[0].fd = fd; + app_vss_fd[0].events = POLLIN | POLLRDNORM; + + while (1) { + r = poll(app_vss_fd, 1, INFTIM); + + VSS_LOG(LOG_DEBUG, "poll returned r = %d, revent = 0x%x\\n", + r, app_vss_fd[0].revents); + + if (r == 0 || (r < 0 && errno == EAGAIN) || + (r < 0 && errno == EINTR)) { + /* Nothing to read */ + continue; + } + + if (r < 0) { + /* + * For poll return failure other than EAGAIN, + * we want to exit. + */ + VSS_LOG(LOG_ERR, "Poll failed.\\n"); + perror("poll"); + exit(EIO); + } + + /* Read from character device */ + error = ioctl(fd, IOCHVVSSREAD, &userdata); + if (error < 0) { + VSS_LOG(LOG_ERR, "Read failed.\\n"); + perror("pread"); + exit(EIO); + } + + if (userdata.status != 0) { + VSS_LOG(LOG_ERR, "data read error\\n"); + continue; + } + + op = userdata.opt; + + switch (op) { + case HV_VSS_CHECK: + error = check(checksimuop); + break; + case HV_VSS_FREEZE: + error = freeze(freezesimuop); + break; + case HV_VSS_THAW: + error = thaw(thawsimuop); + break; + default: + VSS_LOG(LOG_ERR, "Illegal operation: %d\\n", op); + error = VSS_FAIL; + } + if (error) + userdata.status = VSS_FAIL; + else + userdata.status = VSS_SUCCESS; + error = ioctl(fd, IOCHVVSSWRITE, &userdata); + if (error != 0) { + VSS_LOG(LOG_ERR, "Fail to write to device\\n"); + exit(EXIT_FAILURE); + } else { + VSS_LOG(LOG_INFO, "Send response %d for %s to kernel\\n", + userdata.status, op == HV_VSS_FREEZE ? "Freeze" : + (op == HV_VSS_THAW ? "Thaw" : "Check")); + } + } + return 0; +} +.Sh SEE ALSO +.Xr hv_vss_daemon 8 , +.Xr hv_utils 4 +.Sh HISTORY +The daemon was introduced in October 2016 and developed by Microsoft Corp. +.Sh AUTHORS +.An -nosplit +.Fx +support for +.Nm +was first added by +.An Microsoft BSD Integration Services Team Aq Mt bsdic@microsoft.com . diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 99d4aef326b..80f6a9b022d 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -298,6 +298,7 @@ dev/hyperv/netvsc/if_hn.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv dev/hyperv/utilities/hv_heartbeat.c optional hyperv dev/hyperv/utilities/hv_kvp.c optional hyperv +dev/hyperv/utilities/hv_snapshot.c optional hyperv dev/hyperv/utilities/hv_shutdown.c optional hyperv dev/hyperv/utilities/hv_timesync.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 681b81f218b..34fd8c974ad 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -255,6 +255,7 @@ dev/hyperv/netvsc/if_hn.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv dev/hyperv/utilities/hv_heartbeat.c optional hyperv dev/hyperv/utilities/hv_kvp.c optional hyperv +dev/hyperv/utilities/hv_snapshot.c optional hyperv dev/hyperv/utilities/hv_shutdown.c optional hyperv dev/hyperv/utilities/hv_timesync.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv diff --git a/sys/dev/hyperv/utilities/hv_snapshot.c b/sys/dev/hyperv/utilities/hv_snapshot.c new file mode 100644 index 00000000000..23162973f2c --- /dev/null +++ b/sys/dev/hyperv/utilities/hv_snapshot.c @@ -0,0 +1,1061 @@ +/*- + * Copyright (c) 2016 Microsoft Corp. + * 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 ``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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "hv_util.h" +#include "hv_snapshot.h" +#include "vmbus_if.h" + +#define VSS_MAJOR 5 +#define VSS_MINOR 0 +#define VSS_MSGVER VMBUS_IC_VERSION(VSS_MAJOR, VSS_MINOR) + +#define VSS_FWVER_MAJOR 3 +#define VSS_FWVER VMBUS_IC_VERSION(VSS_FWVER_MAJOR, 0) + +#define TIMEOUT_LIMIT (15) // seconds +enum hv_vss_op { + VSS_OP_CREATE = 0, + VSS_OP_DELETE, + VSS_OP_HOT_BACKUP, + VSS_OP_GET_DM_INFO, + VSS_OP_BU_COMPLETE, + /* + * Following operations are only supported with IC version >= 5.0 + */ + VSS_OP_FREEZE, /* Freeze the file systems in the VM */ + VSS_OP_THAW, /* Unfreeze the file systems */ + VSS_OP_AUTO_RECOVER, + VSS_OP_COUNT /* Number of operations, must be last */ +}; + +/* + * Header for all VSS messages. + */ +struct hv_vss_hdr { + struct vmbus_icmsg_hdr ic_hdr; + uint8_t operation; + uint8_t reserved[7]; +} __packed; + + +/* + * Flag values for the hv_vss_check_feature. Here supports only + * one value. + */ +#define VSS_HBU_NO_AUTO_RECOVERY 0x00000005 + +struct hv_vss_check_feature { + uint32_t flags; +} __packed; + +struct hv_vss_check_dm_info { + uint32_t flags; +} __packed; + +struct hv_vss_msg { + union { + struct hv_vss_hdr vss_hdr; + } hdr; + union { + struct hv_vss_check_feature vss_cf; + struct hv_vss_check_dm_info dm_info; + } body; +} __packed; + +struct hv_vss_req { + struct hv_vss_opt_msg opt_msg; /* used to communicate with daemon */ + struct hv_vss_msg msg; /* used to communicate with host */ +} __packed; + +/* hv_vss debug control */ +static int hv_vss_log = 0; + +#define hv_vss_log_error(...) do { \ + if (hv_vss_log > 0) \ + log(LOG_ERR, "hv_vss: " __VA_ARGS__); \ +} while (0) + +#define hv_vss_log_info(...) do { \ + if (hv_vss_log > 1) \ + log(LOG_INFO, "hv_vss: " __VA_ARGS__); \ +} while (0) + +static const struct vmbus_ic_desc vmbus_vss_descs[] = { + { + .ic_guid = { .hv_guid = { + 0x29, 0x2e, 0xfa, 0x35, 0x23, 0xea, 0x36, 0x42, + 0x96, 0xae, 0x3a, 0x6e, 0xba, 0xcb, 0xa4, 0x40} }, + .ic_desc = "Hyper-V VSS" + }, + VMBUS_IC_DESC_END +}; + +static const char * vss_opt_name[] = {"None", "VSSCheck", "Freeze", "Thaw"}; + +/* character device prototypes */ +static d_open_t hv_vss_dev_open; +static d_close_t hv_vss_dev_close; +static d_poll_t hv_vss_dev_daemon_poll; +static d_ioctl_t hv_vss_dev_daemon_ioctl; + +static d_open_t hv_appvss_dev_open; +static d_close_t hv_appvss_dev_close; +static d_poll_t hv_appvss_dev_poll; +static d_ioctl_t hv_appvss_dev_ioctl; + +/* hv_vss character device structure */ +static struct cdevsw hv_vss_cdevsw = +{ + .d_version = D_VERSION, + .d_open = hv_vss_dev_open, + .d_close = hv_vss_dev_close, + .d_poll = hv_vss_dev_daemon_poll, + .d_ioctl = hv_vss_dev_daemon_ioctl, + .d_name = FS_VSS_DEV_NAME, +}; + +static struct cdevsw hv_appvss_cdevsw = +{ + .d_version = D_VERSION, + .d_open = hv_appvss_dev_open, + .d_close = hv_appvss_dev_close, + .d_poll = hv_appvss_dev_poll, + .d_ioctl = hv_appvss_dev_ioctl, + .d_name = APP_VSS_DEV_NAME, +}; + +struct hv_vss_sc; +/* + * Global state to track cdev + */ +struct hv_vss_dev_sc { + /* + * msg was transferred from host to notify queue, and + * ack queue. Finally, it was recyled to free list. + */ + STAILQ_HEAD(, hv_vss_req_internal) to_notify_queue; + STAILQ_HEAD(, hv_vss_req_internal) to_ack_queue; + struct hv_vss_sc *sc; + struct proc *proc_task; + struct selinfo hv_vss_selinfo; +}; +/* + * Global state to track and synchronize the transaction requests from the host. + * The VSS allows user to register their function to do freeze/thaw for application. + * VSS kernel will notify both vss daemon and user application if it is registered. + * The implementation state transition is illustrated by: + * https://clovertrail.github.io/assets/vssdot.png + */ +typedef struct hv_vss_sc { + struct hv_util_sc util_sc; + device_t dev; + + struct task task; + + /* + * mutex is used to protect access of list/queue, + * callout in request is also used this mutex. + */ + struct mtx pending_mutex; + /* + * req_free_list contains all free items + */ + LIST_HEAD(, hv_vss_req_internal) req_free_list; + + /* Indicates if daemon registered with driver */ + boolean_t register_done; + + boolean_t app_register_done; + + /* cdev for file system freeze/thaw */ + struct cdev *hv_vss_dev; + /* cdev for application freeze/thaw */ + struct cdev *hv_appvss_dev; + + /* sc for app */ + struct hv_vss_dev_sc app_sc; + /* sc for deamon */ + struct hv_vss_dev_sc daemon_sc; +} hv_vss_sc; + +typedef struct hv_vss_req_internal { + LIST_ENTRY(hv_vss_req_internal) link; + STAILQ_ENTRY(hv_vss_req_internal) slink; + struct hv_vss_req vss_req; + + /* Rcv buffer for communicating with the host*/ + uint8_t *rcv_buf; + /* Length of host message */ + uint32_t host_msg_len; + /* Host message id */ + uint64_t host_msg_id; + + hv_vss_sc *sc; + + struct callout callout; +} hv_vss_req_internal; + +#define SEARCH_REMOVE_REQ_LOCKED(reqp, queue, link, tmp, id) \ + do { \ + STAILQ_FOREACH_SAFE(reqp, queue, link, tmp) { \ + if (reqp->vss_req.opt_msg.msgid == id) { \ + STAILQ_REMOVE(queue, \ + reqp, hv_vss_req_internal, link); \ + break; \ + } \ + } \ + } while (0) + +static bool +hv_vss_is_daemon_killed_after_launch(hv_vss_sc *sc) +{ + return (!sc->register_done && sc->daemon_sc.proc_task); +} + +/* + * Callback routine that gets called whenever there is a message from host + */ +static void +hv_vss_callback(struct vmbus_channel *chan __unused, void *context) +{ + hv_vss_sc *sc = (hv_vss_sc*)context; + if (hv_vss_is_daemon_killed_after_launch(sc)) + hv_vss_log_info("%s: daemon was killed!\n", __func__); + if (sc->register_done || sc->daemon_sc.proc_task) { + hv_vss_log_info("%s: Queuing work item\n", __func__); + if (hv_vss_is_daemon_killed_after_launch(sc)) + hv_vss_log_info("%s: daemon was killed!\n", __func__); + taskqueue_enqueue(taskqueue_thread, &sc->task); + } else { + hv_vss_log_info("%s: daemon has never been registered\n", __func__); + } + hv_vss_log_info("%s: received msg from host\n", __func__); +} +/* + * Send the response back to the host. + */ +static void +hv_vss_respond_host(uint8_t *rcv_buf, struct vmbus_channel *ch, + uint32_t recvlen, uint64_t requestid, uint32_t error) +{ + struct vmbus_icmsg_hdr *hv_icmsg_hdrp; + + hv_icmsg_hdrp = (struct vmbus_icmsg_hdr *)rcv_buf; + + hv_icmsg_hdrp->ic_status = error; + hv_icmsg_hdrp->ic_flags = HV_ICMSGHDRFLAG_TRANSACTION | HV_ICMSGHDRFLAG_RESPONSE; + + error = vmbus_chan_send(ch, VMBUS_CHANPKT_TYPE_INBAND, 0, + rcv_buf, recvlen, requestid); + if (error) + hv_vss_log_info("%s: hv_vss_respond_host: sendpacket error:%d\n", + __func__, error); +} + +static void +hv_vss_notify_host_result_locked(struct hv_vss_req_internal *reqp, uint32_t status) +{ + struct hv_vss_msg* msg = (struct hv_vss_msg *)reqp->rcv_buf; + hv_vss_sc *sc = reqp->sc; + if (reqp->vss_req.opt_msg.opt == HV_VSS_CHECK) { + msg->body.vss_cf.flags = VSS_HBU_NO_AUTO_RECOVERY; + } + hv_vss_log_info("%s, %s response %s to host\n", __func__, + vss_opt_name[reqp->vss_req.opt_msg.opt], + status == HV_S_OK ? "Success" : "Fail"); + hv_vss_respond_host(reqp->rcv_buf, vmbus_get_channel(reqp->sc->dev), + reqp->host_msg_len, reqp->host_msg_id, status); + /* recycle the request */ + LIST_INSERT_HEAD(&sc->req_free_list, reqp, link); +} + +static void +hv_vss_notify_host_result(struct hv_vss_req_internal *reqp, uint32_t status) +{ + mtx_lock(&reqp->sc->pending_mutex); + hv_vss_notify_host_result_locked(reqp, status); + mtx_unlock(&reqp->sc->pending_mutex); +} + +static void +hv_vss_cp_vssreq_to_user(struct hv_vss_req_internal *reqp, + struct hv_vss_opt_msg *userdata) +{ + struct hv_vss_req *hv_vss_dev_buf; + hv_vss_dev_buf = &reqp->vss_req; + hv_vss_dev_buf->opt_msg.opt = HV_VSS_NONE; + switch (reqp->vss_req.msg.hdr.vss_hdr.operation) { + case VSS_OP_FREEZE: + hv_vss_dev_buf->opt_msg.opt = HV_VSS_FREEZE; + break; + case VSS_OP_THAW: + hv_vss_dev_buf->opt_msg.opt = HV_VSS_THAW; + break; + case VSS_OP_HOT_BACKUP: + hv_vss_dev_buf->opt_msg.opt = HV_VSS_CHECK; + break; + } + *userdata = hv_vss_dev_buf->opt_msg; + hv_vss_log_info("%s, read data from user for " + "%s (%ju) \n", __func__, vss_opt_name[userdata->opt], + (uintmax_t)userdata->msgid); +} + +/** + * Remove the request id from app notifiy or ack queue, + * and recyle the request by inserting it to free list. + * + * When app was notified but not yet sending ack, the request + * should locate in either notify queue or ack queue. + */ +static struct hv_vss_req_internal* +hv_vss_drain_req_queue_locked(hv_vss_sc *sc, uint64_t req_id) +{ + struct hv_vss_req_internal *reqp, *tmp; + SEARCH_REMOVE_REQ_LOCKED(reqp, &sc->daemon_sc.to_notify_queue, + slink, tmp, req_id); + if (reqp == NULL) + SEARCH_REMOVE_REQ_LOCKED(reqp, &sc->daemon_sc.to_ack_queue, + slink, tmp, req_id); + if (reqp == NULL) + SEARCH_REMOVE_REQ_LOCKED(reqp, &sc->app_sc.to_notify_queue, + slink, tmp, req_id); + if (reqp == NULL) + SEARCH_REMOVE_REQ_LOCKED(reqp, &sc->app_sc.to_ack_queue, slink, + tmp, req_id); + return (reqp); +} +/** + * Actions for daemon who has been notified. + */ +static void +hv_vss_notified(struct hv_vss_dev_sc *dev_sc, struct hv_vss_opt_msg *userdata) +{ + struct hv_vss_req_internal *reqp; + mtx_lock(&dev_sc->sc->pending_mutex); + if (!STAILQ_EMPTY(&dev_sc->to_notify_queue)) { + reqp = STAILQ_FIRST(&dev_sc->to_notify_queue); + hv_vss_cp_vssreq_to_user(reqp, userdata); + STAILQ_REMOVE_HEAD(&dev_sc->to_notify_queue, slink); + /* insert the msg to queue for write */ + STAILQ_INSERT_TAIL(&dev_sc->to_ack_queue, reqp, slink); + userdata->status = VSS_SUCCESS; + } else { + /* Timeout occur, thus request was removed from queue. */ + hv_vss_log_info("%s: notify queue is empty!\n", __func__); + userdata->status = VSS_FAIL; + } + mtx_unlock(&dev_sc->sc->pending_mutex); +} + +static void +hv_vss_notify(struct hv_vss_dev_sc *dev_sc, struct hv_vss_req_internal *reqp) +{ + uint32_t opt = reqp->vss_req.opt_msg.opt; + mtx_lock(&dev_sc->sc->pending_mutex); + STAILQ_INSERT_TAIL(&dev_sc->to_notify_queue, reqp, slink); + hv_vss_log_info("%s: issuing query %s (%ju) to %s\n", __func__, + vss_opt_name[opt], (uintmax_t)reqp->vss_req.opt_msg.msgid, + &dev_sc->sc->app_sc == dev_sc ? "app" : "daemon"); + mtx_unlock(&dev_sc->sc->pending_mutex); + selwakeup(&dev_sc->hv_vss_selinfo); +} + +/** + * Actions for daemon who has acknowledged. + */ +static void +hv_vss_daemon_acked(struct hv_vss_dev_sc *dev_sc, struct hv_vss_opt_msg *userdata) +{ + struct hv_vss_req_internal *reqp, *tmp; + uint64_t req_id; + int opt; + uint32_t status; + + opt = userdata->opt; + req_id = userdata->msgid; + status = userdata->status; + /* make sure the reserved fields are all zeros. */ + memset(&userdata->reserved, 0, sizeof(struct hv_vss_opt_msg) - + __offsetof(struct hv_vss_opt_msg, reserved)); + mtx_lock(&dev_sc->sc->pending_mutex); + SEARCH_REMOVE_REQ_LOCKED(reqp, &dev_sc->to_ack_queue, slink, tmp, req_id); + mtx_unlock(&dev_sc->sc->pending_mutex); + if (reqp == NULL) { + hv_vss_log_info("%s Timeout: fail to find daemon ack request\n", + __func__); + userdata->status = VSS_FAIL; + return; + } + KASSERT(opt == reqp->vss_req.opt_msg.opt, ("Mismatched VSS operation!")); + hv_vss_log_info("%s, get response %d from daemon for %s (%ju) \n", __func__, + status, vss_opt_name[opt], (uintmax_t)req_id); + switch (opt) { + case HV_VSS_CHECK: + case HV_VSS_FREEZE: + callout_drain(&reqp->callout); + hv_vss_notify_host_result(reqp, + status == VSS_SUCCESS ? HV_S_OK : HV_E_FAIL); + break; + case HV_VSS_THAW: + if (dev_sc->sc->app_register_done) { + if (status == VSS_SUCCESS) { + hv_vss_notify(&dev_sc->sc->app_sc, reqp); + } else { + /* handle error */ + callout_drain(&reqp->callout); + hv_vss_notify_host_result(reqp, HV_E_FAIL); + } + } else { + callout_drain(&reqp->callout); + hv_vss_notify_host_result(reqp, + status == VSS_SUCCESS ? HV_S_OK : HV_E_FAIL); + } + break; + } +} + +/** + * Actions for app who has acknowledged. + */ +static void +hv_vss_app_acked(struct hv_vss_dev_sc *dev_sc, struct hv_vss_opt_msg *userdata) +{ + struct hv_vss_req_internal *reqp, *tmp; + uint64_t req_id; + int opt; + uint8_t status; + + opt = userdata->opt; + req_id = userdata->msgid; + status = userdata->status; + /* make sure the reserved fields are all zeros. */ + memset(&userdata->reserved, 0, sizeof(struct hv_vss_opt_msg) - + __offsetof(struct hv_vss_opt_msg, reserved)); + mtx_lock(&dev_sc->sc->pending_mutex); + SEARCH_REMOVE_REQ_LOCKED(reqp, &dev_sc->to_ack_queue, slink, tmp, req_id); + mtx_unlock(&dev_sc->sc->pending_mutex); + if (reqp == NULL) { + hv_vss_log_info("%s Timeout: fail to find app ack request\n", + __func__); + userdata->status = VSS_FAIL; + return; + } + KASSERT(opt == reqp->vss_req.opt_msg.opt, ("Mismatched VSS operation!")); + hv_vss_log_info("%s, get response %d from app for %s (%ju) \n", + __func__, status, vss_opt_name[opt], (uintmax_t)req_id); + if (dev_sc->sc->register_done) { + switch (opt) { + case HV_VSS_CHECK: + case HV_VSS_FREEZE: + if (status == VSS_SUCCESS) { + hv_vss_notify(&dev_sc->sc->daemon_sc, reqp); + } else { + /* handle error */ + callout_drain(&reqp->callout); + hv_vss_notify_host_result(reqp, HV_E_FAIL); + } + break; + case HV_VSS_THAW: + callout_drain(&reqp->callout); + hv_vss_notify_host_result(reqp, + status == VSS_SUCCESS ? HV_S_OK : HV_E_FAIL); + break; + } + } else { + hv_vss_log_info("%s, Fatal: vss daemon was killed\n", __func__); + } +} + +static int +hv_vss_dev_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +{ + struct proc *td_proc; + td_proc = td->td_proc; + + struct hv_vss_dev_sc *dev_sc = (struct hv_vss_dev_sc*)dev->si_drv1; + hv_vss_log_info("%s: %s opens device \"%s\" successfully.\n", + __func__, td_proc->p_comm, FS_VSS_DEV_NAME); + + if (dev_sc->sc->register_done) + return (EBUSY); + + dev_sc->sc->register_done = true; + hv_vss_callback(vmbus_get_channel(dev_sc->sc->dev), dev_sc->sc); + + dev_sc->proc_task = curproc; + return (0); +} + +static int +hv_vss_dev_close(struct cdev *dev, int fflag __unused, int devtype __unused, + struct thread *td) +{ + struct proc *td_proc; + td_proc = td->td_proc; + + struct hv_vss_dev_sc *dev_sc = (struct hv_vss_dev_sc*)dev->si_drv1; + + hv_vss_log_info("%s: %s closes device \"%s\"\n", + __func__, td_proc->p_comm, FS_VSS_DEV_NAME); + dev_sc->sc->register_done = false; + return (0); +} + +static int +hv_vss_dev_daemon_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, + struct thread *td) +{ + struct proc *td_proc; + struct hv_vss_dev_sc *sc; + + td_proc = td->td_proc; + sc = (struct hv_vss_dev_sc*)dev->si_drv1; + + hv_vss_log_info("%s: %s invoked vss ioctl\n", __func__, td_proc->p_comm); + + struct hv_vss_opt_msg* userdata = (struct hv_vss_opt_msg*)data; + switch(cmd) { + case IOCHVVSSREAD: + hv_vss_notified(sc, userdata); + break; + case IOCHVVSSWRITE: + hv_vss_daemon_acked(sc, userdata); + break; + } + return (0); +} + +/* + * hv_vss_daemon poll invokes this function to check if data is available + * for daemon to read. + */ +static int +hv_vss_dev_daemon_poll(struct cdev *dev, int events, struct thread *td) +{ + int revent = 0; + struct hv_vss_dev_sc *dev_sc = (struct hv_vss_dev_sc*)dev->si_drv1; + + mtx_lock(&dev_sc->sc->pending_mutex); + /** + * if there is data ready, inform daemon's poll + */ + if (!STAILQ_EMPTY(&dev_sc->to_notify_queue)) + revent = POLLIN; + if (revent == 0) + selrecord(td, &dev_sc->hv_vss_selinfo); + hv_vss_log_info("%s return 0x%x\n", __func__, revent); + mtx_unlock(&dev_sc->sc->pending_mutex); + return (revent); +} + +static int +hv_appvss_dev_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +{ + struct proc *td_proc; + td_proc = td->td_proc; + + struct hv_vss_dev_sc *dev_sc = (struct hv_vss_dev_sc*)dev->si_drv1; + hv_vss_log_info("%s: %s opens device \"%s\" successfully.\n", + __func__, td_proc->p_comm, APP_VSS_DEV_NAME); + + if (dev_sc->sc->app_register_done) + return (EBUSY); + + dev_sc->sc->app_register_done = true; + dev_sc->proc_task = curproc; + return (0); +} + +static int +hv_appvss_dev_close(struct cdev *dev, int fflag __unused, int devtype __unused, + struct thread *td) +{ + struct proc *td_proc; + td_proc = td->td_proc; + + struct hv_vss_dev_sc *dev_sc = (struct hv_vss_dev_sc*)dev->si_drv1; + + hv_vss_log_info("%s: %s closes device \"%s\".\n", + __func__, td_proc->p_comm, APP_VSS_DEV_NAME); + dev_sc->sc->app_register_done = false; + return (0); +} + +static int +hv_appvss_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, + struct thread *td) +{ + struct proc *td_proc; + struct hv_vss_dev_sc *dev_sc; + + td_proc = td->td_proc; + dev_sc = (struct hv_vss_dev_sc*)dev->si_drv1; + + hv_vss_log_info("%s: %s invoked vss ioctl\n", __func__, td_proc->p_comm); + + struct hv_vss_opt_msg* userdata = (struct hv_vss_opt_msg*)data; + switch(cmd) { + case IOCHVVSSREAD: + hv_vss_notified(dev_sc, userdata); + break; + case IOCHVVSSWRITE: + hv_vss_app_acked(dev_sc, userdata); + break; + } + return (0); +} + +/* + * hv_vss_daemon poll invokes this function to check if data is available + * for daemon to read. + */ +static int +hv_appvss_dev_poll(struct cdev *dev, int events, struct thread *td) +{ + int revent = 0; + struct hv_vss_dev_sc *dev_sc = (struct hv_vss_dev_sc*)dev->si_drv1; + + mtx_lock(&dev_sc->sc->pending_mutex); + /** + * if there is data ready, inform daemon's poll + */ + if (!STAILQ_EMPTY(&dev_sc->to_notify_queue)) + revent = POLLIN; + if (revent == 0) + selrecord(td, &dev_sc->hv_vss_selinfo); + hv_vss_log_info("%s return 0x%x\n", __func__, revent); + mtx_unlock(&dev_sc->sc->pending_mutex); + return (revent); +} + +static void +hv_vss_timeout(void *arg) +{ + hv_vss_req_internal *reqp = arg; + hv_vss_req_internal *request; + hv_vss_sc* sc = reqp->sc; + uint64_t req_id = reqp->vss_req.opt_msg.msgid; + /* This thread is locked */ + KASSERT(mtx_owned(&sc->pending_mutex), ("mutex lock is not owned!")); + request = hv_vss_drain_req_queue_locked(sc, req_id); + KASSERT(request != NULL, ("timeout but fail to find request")); + hv_vss_notify_host_result_locked(reqp, HV_E_FAIL); +} + +/* + * This routine is called whenever a message is received from the host + */ +static void +hv_vss_init_req(hv_vss_req_internal *reqp, + uint32_t recvlen, uint64_t requestid, uint8_t *vss_buf, hv_vss_sc *sc) +{ + struct timespec vm_ts; + struct hv_vss_msg* msg = (struct hv_vss_msg *)vss_buf; + + memset(reqp, 0, __offsetof(hv_vss_req_internal, callout)); + reqp->host_msg_len = recvlen; + reqp->host_msg_id = requestid; + reqp->rcv_buf = vss_buf; + reqp->sc = sc; + memcpy(&reqp->vss_req.msg, + (struct hv_vss_msg *)vss_buf, sizeof(struct hv_vss_msg)); + /* set the opt for users */ + switch (msg->hdr.vss_hdr.operation) { + case VSS_OP_FREEZE: + reqp->vss_req.opt_msg.opt = HV_VSS_FREEZE; + break; + case VSS_OP_THAW: + reqp->vss_req.opt_msg.opt = HV_VSS_THAW; + break; + case VSS_OP_HOT_BACKUP: + reqp->vss_req.opt_msg.opt = HV_VSS_CHECK; + break; + } + /* Use a timestamp as msg request ID */ + nanotime(&vm_ts); + reqp->vss_req.opt_msg.msgid = (vm_ts.tv_sec * NANOSEC) + vm_ts.tv_nsec; +} + +static hv_vss_req_internal* +hv_vss_get_new_req_locked(hv_vss_sc *sc) +{ + hv_vss_req_internal *reqp; + if (!STAILQ_EMPTY(&sc->daemon_sc.to_notify_queue) || + !STAILQ_EMPTY(&sc->daemon_sc.to_ack_queue) || + !STAILQ_EMPTY(&sc->app_sc.to_notify_queue) || + !STAILQ_EMPTY(&sc->app_sc.to_ack_queue)) { + /* + * There is request coming from host before + * finishing previous requests + */ + hv_vss_log_info("%s: Warning: there is new request " + "coming before finishing previous requests\n", __func__); + return (NULL); + } + if (LIST_EMPTY(&sc->req_free_list)) { + /* TODO Error: no buffer */ + hv_vss_log_info("Error: No buffer\n"); + return (NULL); + } + reqp = LIST_FIRST(&sc->req_free_list); + LIST_REMOVE(reqp, link); + return (reqp); +} + +static void +hv_vss_start_notify(hv_vss_req_internal *reqp, uint32_t opt) +{ + hv_vss_sc *sc = reqp->sc; + /* + * Freeze/Check notification sequence: kernel -> app -> daemon(fs) + * Thaw notification sequence: kernel -> daemon(fs) -> app + * + * We should wake up the daemon, in case it's doing poll(). + * The response should be received after 5s, otherwise, trigger timeout. + */ + switch (opt) { + case VSS_OP_FREEZE: + case VSS_OP_HOT_BACKUP: + if (sc->app_register_done) + hv_vss_notify(&sc->app_sc, reqp); + else + hv_vss_notify(&sc->daemon_sc, reqp); + callout_reset(&reqp->callout, TIMEOUT_LIMIT * hz, + hv_vss_timeout, reqp); + break; + case VSS_OP_THAW: + hv_vss_notify(&sc->daemon_sc, reqp); + callout_reset(&reqp->callout, TIMEOUT_LIMIT * hz, + hv_vss_timeout, reqp); + break; + } +} + +/* + * Function to read the vss request buffer from host + * and interact with daemon + */ +static void +hv_vss_process_request(void *context, int pending __unused) +{ + uint8_t *vss_buf; + struct vmbus_channel *channel; + uint32_t recvlen = 0; + uint64_t requestid; + struct vmbus_icmsg_hdr *icmsghdrp; + int ret = 0; + hv_vss_sc *sc; + hv_vss_req_internal *reqp; + + hv_vss_log_info("%s: entering hv_vss_process_request\n", __func__); + + sc = (hv_vss_sc*)context; + vss_buf = sc->util_sc.receive_buffer; + channel = vmbus_get_channel(sc->dev); + + recvlen = sc->util_sc.ic_buflen; + ret = vmbus_chan_recv(channel, vss_buf, &recvlen, &requestid); + KASSERT(ret != ENOBUFS, ("hvvss recvbuf is not large enough")); + /* XXX check recvlen to make sure that it contains enough data */ + + while ((ret == 0) && (recvlen > 0)) { + icmsghdrp = (struct vmbus_icmsg_hdr *)vss_buf; + + if (icmsghdrp->ic_type == HV_ICMSGTYPE_NEGOTIATE) { + ret = vmbus_ic_negomsg(&sc->util_sc, vss_buf, + &recvlen, VSS_FWVER, VSS_MSGVER); + hv_vss_respond_host(vss_buf, vmbus_get_channel(sc->dev), + recvlen, requestid, ret); + hv_vss_log_info("%s: version negotiated\n", __func__); + } else if (!hv_vss_is_daemon_killed_after_launch(sc)) { + struct hv_vss_msg* msg = (struct hv_vss_msg *)vss_buf; + switch(msg->hdr.vss_hdr.operation) { + case VSS_OP_FREEZE: + case VSS_OP_THAW: + case VSS_OP_HOT_BACKUP: + mtx_lock(&sc->pending_mutex); + reqp = hv_vss_get_new_req_locked(sc); + mtx_unlock(&sc->pending_mutex); + if (reqp == NULL) { + /* ignore this request from host */ + break; + } + hv_vss_init_req(reqp, recvlen, requestid, vss_buf, sc); + hv_vss_log_info("%s: receive %s (%ju) from host\n", + __func__, + vss_opt_name[reqp->vss_req.opt_msg.opt], + (uintmax_t)reqp->vss_req.opt_msg.msgid); + hv_vss_start_notify(reqp, msg->hdr.vss_hdr.operation); + break; + case VSS_OP_GET_DM_INFO: + hv_vss_log_info("%s: receive GET_DM_INFO from host\n", + __func__); + msg->body.dm_info.flags = 0; + hv_vss_respond_host(vss_buf, vmbus_get_channel(sc->dev), + recvlen, requestid, HV_S_OK); + break; + default: + device_printf(sc->dev, "Unknown opt from host: %d\n", + msg->hdr.vss_hdr.operation); + break; + } + } else { + /* daemon was killed for some reason after it was launched */ + struct hv_vss_msg* msg = (struct hv_vss_msg *)vss_buf; + switch(msg->hdr.vss_hdr.operation) { + case VSS_OP_FREEZE: + hv_vss_log_info("%s: response fail for FREEZE\n", + __func__); + break; + case VSS_OP_THAW: + hv_vss_log_info("%s: response fail for THAW\n", + __func__); + break; + case VSS_OP_HOT_BACKUP: + hv_vss_log_info("%s: response fail for HOT_BACKUP\n", + __func__); + msg->body.vss_cf.flags = VSS_HBU_NO_AUTO_RECOVERY; + break; + case VSS_OP_GET_DM_INFO: + hv_vss_log_info("%s: response fail for GET_DM_INFO\n", + __func__); + msg->body.dm_info.flags = 0; + break; + default: + device_printf(sc->dev, "Unknown opt from host: %d\n", + msg->hdr.vss_hdr.operation); + break; + } + hv_vss_respond_host(vss_buf, vmbus_get_channel(sc->dev), + recvlen, requestid, HV_E_FAIL); + } + /* + * Try reading next buffer + */ + recvlen = sc->util_sc.ic_buflen; + ret = vmbus_chan_recv(channel, vss_buf, &recvlen, &requestid); + KASSERT(ret != ENOBUFS, ("hvvss recvbuf is not large enough")); + /* XXX check recvlen to make sure that it contains enough data */ + + hv_vss_log_info("%s: read: context %p, ret =%d, recvlen=%d\n", + __func__, context, ret, recvlen); + } +} + +static int +hv_vss_probe(device_t dev) +{ + return (vmbus_ic_probe(dev, vmbus_vss_descs)); +} + +static int +hv_vss_init_send_receive_queue(device_t dev) +{ + hv_vss_sc *sc = (hv_vss_sc*)device_get_softc(dev); + int i; + const int max_list = 4; /* It is big enough for the list */ + struct hv_vss_req_internal* reqp; + + LIST_INIT(&sc->req_free_list); + STAILQ_INIT(&sc->daemon_sc.to_notify_queue); + STAILQ_INIT(&sc->daemon_sc.to_ack_queue); + STAILQ_INIT(&sc->app_sc.to_notify_queue); + STAILQ_INIT(&sc->app_sc.to_ack_queue); + + for (i = 0; i < max_list; i++) { + reqp = malloc(sizeof(struct hv_vss_req_internal), + M_DEVBUF, M_WAITOK|M_ZERO); + LIST_INSERT_HEAD(&sc->req_free_list, reqp, link); + callout_init_mtx(&reqp->callout, &sc->pending_mutex, 0); + } + return (0); +} + +static int +hv_vss_destroy_send_receive_queue(device_t dev) +{ + hv_vss_sc *sc = (hv_vss_sc*)device_get_softc(dev); + hv_vss_req_internal* reqp; + + while (!LIST_EMPTY(&sc->req_free_list)) { + reqp = LIST_FIRST(&sc->req_free_list); + LIST_REMOVE(reqp, link); + free(reqp, M_DEVBUF); + } + + while (!STAILQ_EMPTY(&sc->daemon_sc.to_notify_queue)) { + reqp = STAILQ_FIRST(&sc->daemon_sc.to_notify_queue); + STAILQ_REMOVE_HEAD(&sc->daemon_sc.to_notify_queue, slink); + free(reqp, M_DEVBUF); + } + + while (!STAILQ_EMPTY(&sc->daemon_sc.to_ack_queue)) { + reqp = STAILQ_FIRST(&sc->daemon_sc.to_ack_queue); + STAILQ_REMOVE_HEAD(&sc->daemon_sc.to_ack_queue, slink); + free(reqp, M_DEVBUF); + } + + while (!STAILQ_EMPTY(&sc->app_sc.to_notify_queue)) { + reqp = STAILQ_FIRST(&sc->app_sc.to_notify_queue); + STAILQ_REMOVE_HEAD(&sc->app_sc.to_notify_queue, slink); + free(reqp, M_DEVBUF); + } + + while (!STAILQ_EMPTY(&sc->app_sc.to_ack_queue)) { + reqp = STAILQ_FIRST(&sc->app_sc.to_ack_queue); + STAILQ_REMOVE_HEAD(&sc->app_sc.to_ack_queue, slink); + free(reqp, M_DEVBUF); + } + return (0); +} + +static int +hv_vss_attach(device_t dev) +{ + int error; + struct sysctl_oid_list *child; + struct sysctl_ctx_list *ctx; + + hv_vss_sc *sc = (hv_vss_sc*)device_get_softc(dev); + + sc->dev = dev; + mtx_init(&sc->pending_mutex, "hv_vss pending mutex", NULL, MTX_DEF); + + ctx = device_get_sysctl_ctx(dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "hv_vss_log", + CTLFLAG_RWTUN, &hv_vss_log, 0, "Hyperv VSS service log level"); + + TASK_INIT(&sc->task, 0, hv_vss_process_request, sc); + hv_vss_init_send_receive_queue(dev); + /* create character device for file system freeze/thaw */ + error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, + &sc->hv_vss_dev, + &hv_vss_cdevsw, + 0, + UID_ROOT, + GID_WHEEL, + 0640, + FS_VSS_DEV_NAME); + + if (error != 0) { + hv_vss_log_info("Fail to create '%s': %d\n", FS_VSS_DEV_NAME, error); + return (error); + } + sc->hv_vss_dev->si_drv1 = &sc->daemon_sc; + sc->daemon_sc.sc = sc; + /* create character device for application freeze/thaw */ + error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, + &sc->hv_appvss_dev, + &hv_appvss_cdevsw, + 0, + UID_ROOT, + GID_WHEEL, + 0640, + APP_VSS_DEV_NAME); + + if (error != 0) { + hv_vss_log_info("Fail to create '%s': %d\n", APP_VSS_DEV_NAME, error); + return (error); + } + sc->hv_appvss_dev->si_drv1 = &sc->app_sc; + sc->app_sc.sc = sc; + + return hv_util_attach(dev, hv_vss_callback); +} + +static int +hv_vss_detach(device_t dev) +{ + hv_vss_sc *sc = (hv_vss_sc*)device_get_softc(dev); + mtx_destroy(&sc->pending_mutex); + if (sc->daemon_sc.proc_task != NULL) { + PROC_LOCK(sc->daemon_sc.proc_task); + kern_psignal(sc->daemon_sc.proc_task, SIGKILL); + PROC_UNLOCK(sc->daemon_sc.proc_task); + } + if (sc->app_sc.proc_task != NULL) { + PROC_LOCK(sc->app_sc.proc_task); + kern_psignal(sc->app_sc.proc_task, SIGKILL); + PROC_UNLOCK(sc->app_sc.proc_task); + } + hv_vss_destroy_send_receive_queue(dev); + destroy_dev(sc->hv_vss_dev); + destroy_dev(sc->hv_appvss_dev); + return hv_util_detach(dev); +} + +static device_method_t vss_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, hv_vss_probe), + DEVMETHOD(device_attach, hv_vss_attach), + DEVMETHOD(device_detach, hv_vss_detach), + { 0, 0 } +}; + +static driver_t vss_driver = { "hvvss", vss_methods, sizeof(hv_vss_sc)}; + +static devclass_t vss_devclass; + +DRIVER_MODULE(hv_vss, vmbus, vss_driver, vss_devclass, NULL, NULL); +MODULE_VERSION(hv_vss, 1); +MODULE_DEPEND(hv_vss, vmbus, 1, 1, 1); diff --git a/sys/dev/hyperv/utilities/hv_snapshot.h b/sys/dev/hyperv/utilities/hv_snapshot.h new file mode 100644 index 00000000000..e3c9e0c9fef --- /dev/null +++ b/sys/dev/hyperv/utilities/hv_snapshot.h @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2016 Microsoft Corp. + * 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 ``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. + * + * $FreeBSD$ + */ + +#ifndef _VSS_H +#define _VSS_H +#include +#define FS_VSS_DEV_NAME "hv_fsvss_dev" +#define APP_VSS_DEV_NAME "hv_appvss_dev" + +#define VSS_DEV(VSS) "/dev/"VSS + +#define VSS_SUCCESS 0x00000000 +#define VSS_FAIL 0x00000001 + +enum hv_vss_op_t { + HV_VSS_NONE = 0, + HV_VSS_CHECK, + HV_VSS_FREEZE, + HV_VSS_THAW, + HV_VSS_COUNT +}; + +struct hv_vss_opt_msg { + uint32_t opt; /* operation */ + uint32_t status; /* 0 for success, 1 for error */ + uint64_t msgid; /* an ID used to identify the transaction */ + uint8_t reserved[48]; /* reserved values are all zeroes */ +}; +#define IOCHVVSSREAD _IOR('v', 2, struct hv_vss_opt_msg) +#define IOCHVVSSWRITE _IOW('v', 3, struct hv_vss_opt_msg) +#endif diff --git a/sys/modules/hyperv/utilities/Makefile b/sys/modules/hyperv/utilities/Makefile index 290bd2737ad..28125fd2867 100644 --- a/sys/modules/hyperv/utilities/Makefile +++ b/sys/modules/hyperv/utilities/Makefile @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../../dev/hyperv/utilities KMOD= hv_utils -SRCS= hv_util.c hv_kvp.c hv_timesync.c hv_shutdown.c hv_heartbeat.c +SRCS= hv_util.c hv_kvp.c hv_snapshot.c hv_timesync.c hv_shutdown.c hv_heartbeat.c hv_snapshot.c SRCS+= bus_if.h device_if.h vmbus_if.h CFLAGS+= -I${.CURDIR}/../../../dev/hyperv/include \ diff --git a/usr.sbin/hyperv/Makefile b/usr.sbin/hyperv/Makefile index c11b3417c19..d42817f4a74 100644 --- a/usr.sbin/hyperv/Makefile +++ b/usr.sbin/hyperv/Makefile @@ -2,6 +2,8 @@ .include -SUBDIR = tools +SUBDIR= \ + tools/kvp \ + tools/vss .include diff --git a/usr.sbin/hyperv/tools/Makefile b/usr.sbin/hyperv/tools/kvp/Makefile similarity index 52% rename from usr.sbin/hyperv/tools/Makefile rename to usr.sbin/hyperv/tools/kvp/Makefile index 3cfc0013cf5..e1bc47c0011 100644 --- a/usr.sbin/hyperv/tools/Makefile +++ b/usr.sbin/hyperv/tools/kvp/Makefile @@ -2,12 +2,12 @@ .include -HV_KVP_DAEMON_DISTDIR?= ${.CURDIR}/../../../contrib/hyperv/tools +HV_KVP_DAEMON_DISTDIR?= ${.CURDIR}/../../../../contrib/hyperv/tools .PATH: ${HV_KVP_DAEMON_DISTDIR} PROG= hv_kvp_daemon MAN= hv_kvp_daemon.8 -CFLAGS+= -I${.CURDIR}/../../../sys/dev/hyperv/utilities +CFLAGS+= -I${.CURDIR}/../../../../sys/dev/hyperv/utilities .include diff --git a/usr.sbin/hyperv/tools/Makefile.depend b/usr.sbin/hyperv/tools/kvp/Makefile.depend similarity index 100% rename from usr.sbin/hyperv/tools/Makefile.depend rename to usr.sbin/hyperv/tools/kvp/Makefile.depend diff --git a/usr.sbin/hyperv/tools/vss/Makefile b/usr.sbin/hyperv/tools/vss/Makefile new file mode 100644 index 00000000000..c9a2e6a9610 --- /dev/null +++ b/usr.sbin/hyperv/tools/vss/Makefile @@ -0,0 +1,14 @@ +# $FreeBSD$ +DIRDEPS = lib/libc + +.include + +HV_VSS_DAEMON_DISTDIR?= ${.CURDIR}/../../../../contrib/hyperv/tools +.PATH: ${HV_VSS_DAEMON_DISTDIR} + +PROG= hv_vss_daemon +MAN= hv_vss_daemon.8 + +CFLAGS+= -I${.CURDIR}/../../../../sys/dev/hyperv/utilities + +.include diff --git a/usr.sbin/hyperv/tools/vss/Makefile.depend b/usr.sbin/hyperv/tools/vss/Makefile.depend new file mode 100644 index 00000000000..3646e2e2b1a --- /dev/null +++ b/usr.sbin/hyperv/tools/vss/Makefile.depend @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From 317cac6d5af0a199ab03d3bd045118e33b84ed6b Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Tue, 15 Nov 2016 03:38:05 +0000 Subject: [PATCH 082/204] cache: fix a race between entry removal and demotion The negative list shrinker can demote an entry with only hotlist + neglist locks held. On the other hand entry removal possibly sets the NCF_DVDROP without aformentioned locks held prior to detaching it from the respective netlist., which can lose the update made by the shrinker. Reported and tested by: truckman --- sys/kern/vfs_cache.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index bcfa5001219..54b8db348d6 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -868,6 +868,13 @@ cache_zap_locked(struct namecache *ncp, bool neg_locked) nc_get_name(ncp), ncp->nc_neghits); } LIST_REMOVE(ncp, nc_hash); + if (!(ncp->nc_flag & NCF_NEGATIVE)) { + TAILQ_REMOVE(&ncp->nc_vp->v_cache_dst, ncp, nc_dst); + if (ncp == ncp->nc_vp->v_cache_dd) + ncp->nc_vp->v_cache_dd = NULL; + } else { + cache_negative_remove(ncp, neg_locked); + } if (ncp->nc_flag & NCF_ISDOTDOT) { if (ncp == ncp->nc_dvp->v_cache_dd) ncp->nc_dvp->v_cache_dd = NULL; @@ -878,13 +885,6 @@ cache_zap_locked(struct namecache *ncp, bool neg_locked) atomic_subtract_rel_long(&numcachehv, 1); } } - if (!(ncp->nc_flag & NCF_NEGATIVE)) { - TAILQ_REMOVE(&ncp->nc_vp->v_cache_dst, ncp, nc_dst); - if (ncp == ncp->nc_vp->v_cache_dd) - ncp->nc_vp->v_cache_dd = NULL; - } else { - cache_negative_remove(ncp, neg_locked); - } atomic_subtract_rel_long(&numcache, 1); } From 6ce45c6ac38c4ca9113fc5c33ce1a24ae7735971 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Tue, 15 Nov 2016 03:43:10 +0000 Subject: [PATCH 083/204] cache: plug a write-only variable in cache_negative_zap_one --- sys/kern/vfs_cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 54b8db348d6..bdde50222e6 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -783,7 +783,7 @@ cache_negative_shrink_select(int start, struct namecache **ncpp, static void cache_negative_zap_one(void) { - struct namecache *ncp, *ncp2, *ncpc; + struct namecache *ncp, *ncp2; struct neglist *neglist; struct mtx *dvlp; struct rwlock *blp; @@ -791,7 +791,6 @@ cache_negative_zap_one(void) if (!mtx_trylock(&ncneg_shrink_lock)) return; - ncpc = NULL; mtx_lock(&ncneg_hot.nl_lock); ncp = TAILQ_FIRST(&ncneg_hot.nl_list); if (ncp != NULL) { From 97fc5dbe896ac59322b94052dfccef4062868699 Mon Sep 17 00:00:00 2001 From: Oleksandr Tymoshenko Date: Tue, 15 Nov 2016 04:12:19 +0000 Subject: [PATCH 084/204] [evdev] Add evdev support to kbdmux(4) driver To enable event sourcing from kbdmux(4) kern.evdev.rcpt_mask value should have bit 1 set (this is default) Submitted by: Vladimir Kondratiev MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8437 --- sys/dev/kbdmux/kbdmux.c | 79 +++++++++++++++++++++++++++++++++++-- sys/modules/kbdmux/Makefile | 3 +- 2 files changed, 78 insertions(+), 4 deletions(-) diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index 4720a0e6fc8..9a80760a873 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -32,6 +32,7 @@ */ #include "opt_compat.h" +#include "opt_evdev.h" #include "opt_kbd.h" #include "opt_kbdmux.h" @@ -64,6 +65,11 @@ #include +#ifdef EVDEV_SUPPORT +#include +#include +#endif + #define KEYBOARD_NAME "kbdmux" MALLOC_DECLARE(M_KBDMUX); @@ -159,6 +165,11 @@ struct kbdmux_state u_int ks_composed_char; /* composed char code */ u_char ks_prefix; /* AT scan code prefix */ +#ifdef EVDEV_SUPPORT + struct evdev_dev * ks_evdev; + int ks_evdev_state; +#endif + SLIST_HEAD(, kbdmux_kbd) ks_kbds; /* keyboards */ KBDMUX_LOCK_DECL_GLOBAL; @@ -371,6 +382,12 @@ static keyboard_switch_t kbdmuxsw = { .diag = genkbd_diag, }; +#ifdef EVDEV_SUPPORT +static const struct evdev_methods kbdmux_evdev_methods = { + .ev_event = evdev_ev_kbd_event, +}; +#endif + /* * Return the number of found keyboards */ @@ -404,6 +421,10 @@ kbdmux_init(int unit, keyboard_t **kbdp, void *arg, int flags) accentmap_t *accmap = NULL; fkeytab_t *fkeymap = NULL; int error, needfree, fkeymap_size, delay[2]; +#ifdef EVDEV_SUPPORT + struct evdev_dev *evdev; + char phys_loc[NAMELEN]; +#endif if (*kbdp == NULL) { *kbdp = kbd = malloc(sizeof(*kbd), M_KBDMUX, M_NOWAIT | M_ZERO); @@ -464,6 +485,30 @@ kbdmux_init(int unit, keyboard_t **kbdp, void *arg, int flags) delay[1] = kbd->kb_delay2; kbdmux_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); +#ifdef EVDEV_SUPPORT + /* register as evdev provider */ + evdev = evdev_alloc(); + evdev_set_name(evdev, "System keyboard multiplexer"); + snprintf(phys_loc, NAMELEN, KEYBOARD_NAME"%d", unit); + evdev_set_phys(evdev, phys_loc); + evdev_set_id(evdev, BUS_VIRTUAL, 0, 0, 0); + evdev_set_methods(evdev, kbd, &kbdmux_evdev_methods); + evdev_support_event(evdev, EV_SYN); + evdev_support_event(evdev, EV_KEY); + evdev_support_event(evdev, EV_LED); + evdev_support_event(evdev, EV_REP); + evdev_support_all_known_keys(evdev); + evdev_support_led(evdev, LED_NUML); + evdev_support_led(evdev, LED_CAPSL); + evdev_support_led(evdev, LED_SCROLLL); + + if (evdev_register(evdev)) + evdev_free(evdev); + else + state->ks_evdev = evdev; + state->ks_evdev_state = 0; +#endif + KBD_INIT_DONE(kbd); } @@ -532,6 +577,10 @@ kbdmux_term(keyboard_t *kbd) kbd_unregister(kbd); +#ifdef EVDEV_SUPPORT + evdev_free(state->ks_evdev); +#endif + KBDMUX_LOCK_DESTROY(state); bzero(state, sizeof(*state)); free(state, M_KBDMUX); @@ -694,6 +743,20 @@ next_code: kbd->kb_count ++; +#ifdef EVDEV_SUPPORT + /* push evdev event */ + if (evdev_rcpt_mask & EVDEV_RCPT_KBDMUX && state->ks_evdev != NULL) { + uint16_t key = evdev_scancode2key(&state->ks_evdev_state, + scancode); + + if (key != KEY_RESERVED) { + evdev_push_event(state->ks_evdev, EV_KEY, + key, scancode & 0x80 ? 0 : 1); + evdev_sync(state->ks_evdev); + } + } +#endif + /* return the byte as is for the K_RAW mode */ if (state->ks_mode == K_RAW) { KBDMUX_UNLOCK(state); @@ -1120,7 +1183,11 @@ kbdmux_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) } KBD_LED_VAL(kbd) = *(int *)arg; - +#ifdef EVDEV_SUPPORT + if (state->ks_evdev != NULL && + evdev_rcpt_mask & EVDEV_RCPT_KBDMUX) + evdev_push_leds(state->ks_evdev, *(int *)arg); +#endif /* KDSETLED on all slave keyboards */ SLIST_FOREACH(k, &state->ks_kbds, next) (void)kbdd_ioctl(k->kbd, KDSETLED, arg); @@ -1197,7 +1264,11 @@ kbdmux_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) kbd->kb_delay1 = delays[(mode >> 5) & 3]; kbd->kb_delay2 = rates[mode & 0x1f]; - +#ifdef EVDEV_SUPPORT + if (state->ks_evdev != NULL && + evdev_rcpt_mask & EVDEV_RCPT_KBDMUX) + evdev_push_repeats(state->ks_evdev, kbd); +#endif /* perform command on all slave keyboards */ SLIST_FOREACH(k, &state->ks_kbds, next) (void)kbdd_ioctl(k->kbd, cmd, arg); @@ -1396,4 +1467,6 @@ kbdmux_modevent(module_t mod, int type, void *data) } DEV_MODULE(kbdmux, kbdmux_modevent, NULL); - +#ifdef EVDEV_SUPPORT +MODULE_DEPEND(kbdmux, evdev, 1, 1, 1); +#endif diff --git a/sys/modules/kbdmux/Makefile b/sys/modules/kbdmux/Makefile index 363343a87db..03feb8fb8b5 100644 --- a/sys/modules/kbdmux/Makefile +++ b/sys/modules/kbdmux/Makefile @@ -4,7 +4,8 @@ .PATH: ${.CURDIR}/../../dev/kbdmux KMOD= kbdmux -SRCS= kbdmux.c opt_compat.h opt_kbd.h opt_kbdmux.h bus_if.h device_if.h +SRCS= kbdmux.c opt_compat.h opt_evdev.h opt_kbd.h opt_kbdmux.h bus_if.h \ + device_if.h .if !defined(KERNBUILDDIR) opt_compat.h: From e5c491ad334ae8941c632479649bb049c0a380e0 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Tue, 15 Nov 2016 04:49:26 +0000 Subject: [PATCH 085/204] Write to the correct GPIO registers. Offset 0 is the direction register, not the data register. MFC after: 1 week --- sys/powerpc/mpc85xx/qoriq_gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/mpc85xx/qoriq_gpio.c b/sys/powerpc/mpc85xx/qoriq_gpio.c index d09719cc387..15e0a2cd325 100644 --- a/sys/powerpc/mpc85xx/qoriq_gpio.c +++ b/sys/powerpc/mpc85xx/qoriq_gpio.c @@ -173,7 +173,7 @@ qoriq_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) outvals = bus_read_4(sc->sc_mem, GPIO_GPDAT); outvals &= ~(1 << pinbit); outvals |= (value << pinbit); - bus_write_4(sc->sc_mem, 0, outvals); + bus_write_4(sc->sc_mem, GPIO_GPDAT, outvals); GPIO_UNLOCK(sc); @@ -208,7 +208,7 @@ qoriq_gpio_pin_toggle(device_t dev, uint32_t pin) val = bus_read_4(sc->sc_mem, GPIO_GPDAT); val ^= (1 << (31 - pin)); - bus_write_4(sc->sc_mem, 0, val); + bus_write_4(sc->sc_mem, GPIO_GPDAT, val); GPIO_UNLOCK(sc); From 0323f4e1771e98dbf1ca1d337a345a418630fb39 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Tue, 15 Nov 2016 05:05:51 +0000 Subject: [PATCH 086/204] Add sdhci and mmc drivers to MPC85XX/MPC85XXSPE sdhci was missing from MPC85XXSPE, and mmc/mmcsd were missing from both. --- sys/powerpc/conf/MPC85XX | 2 ++ sys/powerpc/conf/MPC85XXSPE | 3 +++ 2 files changed, 5 insertions(+) diff --git a/sys/powerpc/conf/MPC85XX b/sys/powerpc/conf/MPC85XX index b26340fe539..86e13862e67 100644 --- a/sys/powerpc/conf/MPC85XX +++ b/sys/powerpc/conf/MPC85XX @@ -81,6 +81,8 @@ device iicbus device loop device md device miibus +device mmc +device mmcsd device pass device pci device quicc diff --git a/sys/powerpc/conf/MPC85XXSPE b/sys/powerpc/conf/MPC85XXSPE index 15470d578be..94da34fc129 100644 --- a/sys/powerpc/conf/MPC85XXSPE +++ b/sys/powerpc/conf/MPC85XXSPE @@ -81,6 +81,8 @@ device iicbus device loop device md device miibus +device mmc +device mmcsd device pass device pci device quicc @@ -88,6 +90,7 @@ device random #device rl device scbus device scc +device sdhci device sec device tsec device dpaa From 06723a8e572b541eeb4c340d24f6824d2222db4d Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Tue, 15 Nov 2016 06:37:44 +0000 Subject: [PATCH 087/204] When you select make OLDTIMEZONES=1 then you need a few added directories to be made or the command fails Sponsored by: panzura --- share/zoneinfo/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile index 2269b1f40bc..701a02a579f 100644 --- a/share/zoneinfo/Makefile +++ b/share/zoneinfo/Makefile @@ -67,6 +67,10 @@ TZBUILDSUBDIRS= \ Pacific \ SystemV +.if defined(OLDTIMEZONES) +TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil +.endif + .if !defined(_SKIP_BUILD) all: zoneinfo .endif From 51503e707bb5d64205890e054fa5181103272250 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Tue, 15 Nov 2016 07:08:33 +0000 Subject: [PATCH 088/204] Upstream DTS provides PLL3 and PLL7 nodes (and their x2 form), so remove them from our DTS and adapt the code to handle them correctly. This fix HDMI video on A20. --- sys/arm/allwinner/a10_hdmi.c | 2 +- sys/arm/allwinner/clk/aw_pll.c | 10 ---------- sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi | 22 ++++------------------ 3 files changed, 5 insertions(+), 29 deletions(-) diff --git a/sys/arm/allwinner/a10_hdmi.c b/sys/arm/allwinner/a10_hdmi.c index 1b7cbd2145a..96613719e2e 100644 --- a/sys/arm/allwinner/a10_hdmi.c +++ b/sys/arm/allwinner/a10_hdmi.c @@ -581,7 +581,7 @@ a10hdmi_get_tcon_config(struct a10hdmi_softc *sc, int *div, int *dbl) /* Detect LCD CH1 special clock using a 1X or 2X source */ /* XXX */ pname = clk_get_name(clk_lcd_parent); - if (strcmp(pname, "pll3-1x") == 0 || strcmp(pname, "pll7-1x") == 0) + if (strcmp(pname, "pll3") == 0 || strcmp(pname, "pll7") == 0) *dbl = 0; else *dbl = 1; diff --git a/sys/arm/allwinner/clk/aw_pll.c b/sys/arm/allwinner/clk/aw_pll.c index ab12dfa94de..6d8226399c5 100644 --- a/sys/arm/allwinner/clk/aw_pll.c +++ b/sys/arm/allwinner/clk/aw_pll.c @@ -180,9 +180,6 @@ __FBSDID("$FreeBSD$"); #define H3_PLL2_PRE_DIV (0x1f << 0) #define H3_PLL2_PRE_DIV_SHIFT 0 -#define CLKID_A10_PLL3_1X 0 -#define CLKID_A10_PLL3_2X 1 - #define CLKID_A10_PLL5_DDR 0 #define CLKID_A10_PLL5_OTHER 1 @@ -476,9 +473,6 @@ a10_pll3_recalc(struct aw_pll_sc *sc, uint64_t *freq) *freq = 297000000; } - if (sc->id == CLKID_A10_PLL3_2X) - *freq *= 2; - return (0); } @@ -489,14 +483,10 @@ a10_pll3_set_freq(struct aw_pll_sc *sc, uint64_t fin, uint64_t *fout, uint32_t val, m, mode, func; m = *fout / A10_PLL3_REF_FREQ; - if (sc->id == CLKID_A10_PLL3_2X) - m /= 2; mode = A10_PLL3_MODE_SEL_INT; func = 0; *fout = m * A10_PLL3_REF_FREQ; - if (sc->id == CLKID_A10_PLL3_2X) - *fout *= 2; DEVICE_LOCK(sc); PLL_READ(sc, &val); diff --git a/sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi b/sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi index 2567be51da6..c83d6a2c1d9 100644 --- a/sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi +++ b/sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi @@ -28,25 +28,11 @@ / { clocks { - pll3: clk@01c20010 { - #clock-cells = <1>; - compatible = "allwinner,sun4i-a10-pll3-clk"; - reg = <0x01c20010 0x4>; - clock-output-names = "pll3-1x", "pll3-2x"; - }; - - pll7: clk@01c20030 { - #clock-cells = <1>; - compatible = "allwinner,sun4i-a10-pll3-clk"; - reg = <0x01c20030 0x4>; - clock-output-names = "pll7-1x", "pll7-2x"; - }; - hdmi_clk: clk@01c20150 { #clock-cells = <0>; compatible = "allwinner,sun4i-a10-hdmi-clk"; reg = <0x01c20150 0x4>; - clocks = <&pll3 0>, <&pll7 0>, <&pll3 1>, <&pll7 1>; + clocks = <&pll3>, <&pll7>, <&pll3x2>, <&pll7x2>; clock-output-names = "hdmi"; }; @@ -55,7 +41,7 @@ #reset-cells = <0>; compatible = "allwinner,sun4i-a10-lcd-ch0-clk"; reg = <0x01c20118 0x4>; - clocks = <&pll3 0>, <&pll7 0>, <&pll3 1>, <&pll6 2>; + clocks = <&pll3>, <&pll7>, <&pll3x2>, <&pll6 2>; clock-output-names = "lcd0_ch0"; }; @@ -63,7 +49,7 @@ #clock-cells = <1>; compatible = "allwinner,sun4i-a10-lcd-ch1-clk"; reg = <0x01c2012c 0x4>; - clocks = <&pll3 0>, <&pll7 0>, <&pll3 1>, <&pll7 1>; + clocks = <&pll3>, <&pll7>, <&pll3x2>, <&pll7x2>; clock-output-names = "lcd0_ch1_sclk1", "lcd0_ch1_sclk2"; }; @@ -73,7 +59,7 @@ #reset-cells = <0>; compatible = "allwinner,sun4i-a10-de-be-clk"; reg = <0x01c20104 0x4>; - clocks = <&pll3 0>, <&pll7 0>, <&pll5 1>; + clocks = <&pll3>, <&pll7>, <&pll5 1>; clock-output-names = "de_be0"; }; }; From 757b5d879212bd8121ef53f249580540b3690f88 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Tue, 15 Nov 2016 07:13:16 +0000 Subject: [PATCH 089/204] Add missing support of named lookup tables to the IPv6 code. PR: 214419 MFC after: 1 week Sponsored by: Yandex LLC --- sbin/ipfw/ipfw2.c | 13 +++++++------ sbin/ipfw/ipfw2.h | 9 +++++++-- sbin/ipfw/ipv6.c | 23 ++++++----------------- 3 files changed, 20 insertions(+), 25 deletions(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index b3218d5ed38..2834a0b664d 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -2910,8 +2910,9 @@ pack_table(struct tidx *tstate, char *name) return (pack_object(tstate, name, IPFW_TLV_TBL_NAME)); } -static void -fill_table(ipfw_insn *cmd, char *av, uint8_t opcode, struct tidx *tstate) +void +fill_table(struct _ipfw_insn *cmd, char *av, uint8_t opcode, + struct tidx *tstate) { uint32_t *d = ((ipfw_insn_u32 *)cmd)->d; uint16_t uidx; @@ -3570,7 +3571,7 @@ add_src(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate) if (proto == IPPROTO_IPV6 || strcmp(av, "me6") == 0 || inet_pton(AF_INET6, host, &a) == 1) - ret = add_srcip6(cmd, av, cblen); + ret = add_srcip6(cmd, av, cblen, tstate); /* XXX: should check for IPv4, not !IPv6 */ if (ret == NULL && (proto == IPPROTO_IP || strcmp(av, "me") == 0 || inet_pton(AF_INET6, host, &a) != 1)) @@ -3601,7 +3602,7 @@ add_dst(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate) if (proto == IPPROTO_IPV6 || strcmp(av, "me6") == 0 || inet_pton(AF_INET6, host, &a) == 1) - ret = add_dstip6(cmd, av, cblen); + ret = add_dstip6(cmd, av, cblen, tstate); /* XXX: should check for IPv4, not !IPv6 */ if (ret == NULL && (proto == IPPROTO_IP || strcmp(av, "me") == 0 || inet_pton(AF_INET6, host, &a) != 1)) @@ -4670,14 +4671,14 @@ read_options: case TOK_SRCIP6: NEED1("missing source IP6"); - if (add_srcip6(cmd, *av, cblen)) { + if (add_srcip6(cmd, *av, cblen, tstate)) { av++; } break; case TOK_DSTIP6: NEED1("missing destination IP6"); - if (add_dstip6(cmd, *av, cblen)) { + if (add_dstip6(cmd, *av, cblen, tstate)) { av++; } break; diff --git a/sbin/ipfw/ipfw2.h b/sbin/ipfw/ipfw2.h index 0768b2f37a9..efcdde9c422 100644 --- a/sbin/ipfw/ipfw2.h +++ b/sbin/ipfw/ipfw2.h @@ -396,8 +396,11 @@ void print_flow6id(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd); void print_icmp6types(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd); void print_ext6hdr(struct buf_pr *bp, struct _ipfw_insn *cmd ); -struct _ipfw_insn *add_srcip6(struct _ipfw_insn *cmd, char *av, int cblen); -struct _ipfw_insn *add_dstip6(struct _ipfw_insn *cmd, char *av, int cblen); +struct tidx; +struct _ipfw_insn *add_srcip6(struct _ipfw_insn *cmd, char *av, int cblen, + struct tidx *tstate); +struct _ipfw_insn *add_dstip6(struct _ipfw_insn *cmd, char *av, int cblen, + struct tidx *tstate); void fill_flow6(struct _ipfw_insn_u32 *cmd, char *av, int cblen); void fill_unreach6_code(u_short *codep, char *str); @@ -406,6 +409,8 @@ int fill_ext6hdr(struct _ipfw_insn *cmd, char *av); /* ipfw2.c */ void bp_flush(struct buf_pr *b); +void fill_table(struct _ipfw_insn *cmd, char *av, uint8_t opcode, + struct tidx *tstate); /* tables.c */ struct _ipfw_obj_ctlv; diff --git a/sbin/ipfw/ipv6.c b/sbin/ipfw/ipv6.c index e54ad512d94..fca666d394b 100644 --- a/sbin/ipfw/ipv6.c +++ b/sbin/ipfw/ipv6.c @@ -335,7 +335,7 @@ lookup_host6 (char *host, struct in6_addr *ip6addr) * Return 1 on success, 0 on failure. */ static int -fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen) +fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, struct tidx *tstate) { int len = 0; struct in6_addr *d = &(cmd->addr6); @@ -361,18 +361,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen) } if (strncmp(av, "table(", 6) == 0) { - char *p = strchr(av + 6, ','); - uint32_t *dm = ((ipfw_insn_u32 *)cmd)->d; - - if (p) - *p++ = '\0'; - cmd->o.opcode = O_IP_DST_LOOKUP; - cmd->o.arg1 = strtoul(av + 6, NULL, 0); - if (p) { - cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); - dm[0] = strtoul(p, NULL, 0); - } else - cmd->o.len |= F_INSN_SIZE(ipfw_insn); + fill_table(&cmd->o, av, O_IP_DST_LOOKUP, tstate); return (1); } @@ -498,10 +487,10 @@ fill_flow6( ipfw_insn_u32 *cmd, char *av, int cblen) } ipfw_insn * -add_srcip6(ipfw_insn *cmd, char *av, int cblen) +add_srcip6(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate) { - fill_ip6((ipfw_insn_ip6 *)cmd, av, cblen); + fill_ip6((ipfw_insn_ip6 *)cmd, av, cblen, tstate); if (cmd->opcode == O_IP_DST_SET) /* set */ cmd->opcode = O_IP_SRC_SET; else if (cmd->opcode == O_IP_DST_LOOKUP) /* table */ @@ -520,10 +509,10 @@ add_srcip6(ipfw_insn *cmd, char *av, int cblen) } ipfw_insn * -add_dstip6(ipfw_insn *cmd, char *av, int cblen) +add_dstip6(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate) { - fill_ip6((ipfw_insn_ip6 *)cmd, av, cblen); + fill_ip6((ipfw_insn_ip6 *)cmd, av, cblen, tstate); if (cmd->opcode == O_IP_DST_SET) /* set */ ; else if (cmd->opcode == O_IP_DST_LOOKUP) /* table */ From 4085e878b6f6abff7a216c8032f965d327fa516d Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Tue, 15 Nov 2016 09:20:28 +0000 Subject: [PATCH 090/204] Add myself (dexuan) as a src committer and sephe as my mentor. Approved by: sephe (mentor) --- share/misc/committers-src.dot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 78958bd3c61..59565c15050 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -146,6 +146,7 @@ dchagin [label="Dmitry Chagin\ndchagin@FreeBSD.org\n2009/02/28"] def [label="Konrad Witaszczyk\ndef@FreeBSD.org\n2016/11/02"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2004/09/14"] des [label="Dag-Erling Smorgrav\ndes@FreeBSD.org\n1998/04/03"] +dexuan [label="Dexuan Cui\ndexuan@FreeBSD.org\n2016/10/24"] dfr [label="Doug Rabson\ndfr@FreeBSD.org\n????/??/??"] dg [label="David Greenman\ndg@FreeBSD.org\n1993/06/14"] dim [label="Dimitry Andric\ndim@FreeBSD.org\n2010/08/30"] @@ -755,6 +756,8 @@ scottl -> sbruno scottl -> slm scottl -> yongari +sephe -> dexuan + sheldonh -> dwmalone sheldonh -> iedowse From 093513c76b471360ff66d776f5e3d9ce1c1f7b39 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 15 Nov 2016 09:37:35 +0000 Subject: [PATCH 091/204] Update hint to utilize user variable. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index de98da2553a..b62bff056d5 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -2,7 +2,7 @@ # Use the following command to build local debug version of dynamic # linker: -# make DEBUG_FLAGS=-g DEBUG=-DDEBUG MK_TESTS=no all +# make DEBUG_FLAGS=-g DEBUG=-DDEBUG WITHOUT_TESTS=yes all .include PACKAGE= clibs From 4562cfc40ef4808b6fab98ddd77940a4b2053b11 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 15 Nov 2016 09:40:03 +0000 Subject: [PATCH 092/204] Assert that there is no unresolved symbols during rtld linking. Reviewed by: emaste, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week X-Differential revision: https://reviews.freebsd.org/D8448 --- libexec/rtld-elf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index b62bff056d5..7efe2f2cc92 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -47,7 +47,7 @@ CFLAGS+= -DPIC $(DEBUG) .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" CFLAGS+= -fvisibility=hidden .endif -LDFLAGS+= -shared -Wl,-Bsymbolic +LDFLAGS+= -shared -Wl,-Bsymbolic -Wl,-z,defs LIBADD= c_pic .if ${MK_TOOLCHAIN} == "no" LDFLAGS+= -L${LIBCDIR} From 4352999e0e6cd2d971642274202f03e50ef9c4c2 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 15 Nov 2016 09:43:26 +0000 Subject: [PATCH 093/204] Pass CPUID[1] %edx (cpu_feature), %ecx (cpu_feature2) and CPUID[7].%ebx (cpu_stdext_feature), %ecx (cpu_stdext_feature2) to the ifunc resolvers on x86. It is much more clean to use CPUID instruction in usermode to retrieve this information than to pass AT_HWCAP aux vector from kernel, on x86. Still, the change does allow for use of AT_HWCAP on arches where it is needed, by passing aux array to ifunc_init() initializer which should prepare arguments for ifunc resolvers. Current signature for resolvers on x86 is func_t iresolve(uint32_t cpu_feature, uint32_t cpu_feature2, uint32_t cpu_stdext_feature, uint32_t cpu_stdext_feature2); where arguments have identical meaning as the kernel variables of the same name. The ABIs allow to use resolvers with the void or shortened list of arguments. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8448 --- libexec/rtld-elf/aarch64/reloc.c | 5 +++ libexec/rtld-elf/aarch64/rtld_machdep.h | 5 ++- libexec/rtld-elf/amd64/reloc.c | 22 +++++++++++- libexec/rtld-elf/amd64/rtld_machdep.h | 8 +++++ libexec/rtld-elf/arm/reloc.c | 5 +++ libexec/rtld-elf/arm/rtld_machdep.h | 3 ++ libexec/rtld-elf/i386/reloc.c | 42 ++++++++++++++++++++++- libexec/rtld-elf/i386/rtld_machdep.h | 8 +++++ libexec/rtld-elf/mips/reloc.c | 5 +++ libexec/rtld-elf/mips/rtld_machdep.h | 3 ++ libexec/rtld-elf/powerpc/reloc.c | 5 +++ libexec/rtld-elf/powerpc/rtld_machdep.h | 3 ++ libexec/rtld-elf/powerpc64/reloc.c | 5 +++ libexec/rtld-elf/powerpc64/rtld_machdep.h | 3 ++ libexec/rtld-elf/riscv/reloc.c | 5 +++ libexec/rtld-elf/riscv/rtld_machdep.h | 3 ++ libexec/rtld-elf/rtld.c | 3 +- libexec/rtld-elf/rtld.h | 1 + libexec/rtld-elf/sparc64/reloc.c | 5 +++ libexec/rtld-elf/sparc64/rtld_machdep.h | 5 ++- 20 files changed, 139 insertions(+), 5 deletions(-) diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c index de7ffd59482..cff813ac805 100644 --- a/libexec/rtld-elf/aarch64/reloc.c +++ b/libexec/rtld-elf/aarch64/reloc.c @@ -299,6 +299,11 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const Obj_Entry *defobj, return target; } +void +ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +{ +} + /* * Process non-PLT relocations */ diff --git a/libexec/rtld-elf/aarch64/rtld_machdep.h b/libexec/rtld-elf/aarch64/rtld_machdep.h index a2fc74af73e..46101432567 100644 --- a/libexec/rtld-elf/aarch64/rtld_machdep.h +++ b/libexec/rtld-elf/aarch64/rtld_machdep.h @@ -61,7 +61,10 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) -#define round(size, align) \ +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(void))ptr)()) + +#define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ round(16, align) diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c index 80a3c35d659..43e3ce969c5 100644 --- a/libexec/rtld-elf/amd64/reloc.c +++ b/libexec/rtld-elf/amd64/reloc.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -406,7 +407,7 @@ reloc_iresolve(Obj_Entry *obj, RtldLockState *lockstate) ptr = (Elf_Addr *)(obj->relocbase + rela->r_addend); where = (Elf_Addr *)(obj->relocbase + rela->r_offset); lock_release(rtld_bind_lock, lockstate); - target = ((Elf_Addr (*)(void))ptr)(); + target = call_ifunc_resolver(ptr); wlock_acquire(rtld_bind_lock, lockstate); *where = target; break; @@ -450,6 +451,25 @@ reloc_gnu_ifunc(Obj_Entry *obj, int flags, RtldLockState *lockstate) return (0); } +uint32_t cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2; + +void +ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +{ + u_int p[4], cpu_high; + + do_cpuid(1, p); + cpu_feature = p[3]; + cpu_feature2 = p[2]; + do_cpuid(0, p); + cpu_high = p[0]; + if (cpu_high >= 7) { + cpuid_count(7, 0, p); + cpu_stdext_feature = p[1]; + cpu_stdext_feature2 = p[2]; + } +} + void allocate_initial_tls(Obj_Entry *objs) { diff --git a/libexec/rtld-elf/amd64/rtld_machdep.h b/libexec/rtld-elf/amd64/rtld_machdep.h index a8696feb37a..df6fc339132 100644 --- a/libexec/rtld-elf/amd64/rtld_machdep.h +++ b/libexec/rtld-elf/amd64/rtld_machdep.h @@ -61,6 +61,14 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) +extern uint32_t cpu_feature; +extern uint32_t cpu_feature2; +extern uint32_t cpu_stdext_feature; +extern uint32_t cpu_stdext_feature2; +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(uint32_t, uint32_t, uint32_t, uint32_t))ptr)( \ + cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2)) + #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index b6d0babfc87..94a9bf0e021 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -479,6 +479,11 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const Obj_Entry *defobj, return target; } +void +ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +{ +} + void allocate_initial_tls(Obj_Entry *objs) { diff --git a/libexec/rtld-elf/arm/rtld_machdep.h b/libexec/rtld-elf/arm/rtld_machdep.h index c61bce0cdd2..2c1a2b80c89 100644 --- a/libexec/rtld-elf/arm/rtld_machdep.h +++ b/libexec/rtld-elf/arm/rtld_machdep.h @@ -51,6 +51,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(void))ptr)()) + #define TLS_TCB_SIZE 8 typedef struct { unsigned long ti_module; diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c index 2d6021c9779..8a405fbccb6 100644 --- a/libexec/rtld-elf/i386/reloc.c +++ b/libexec/rtld-elf/i386/reloc.c @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -359,7 +360,7 @@ reloc_iresolve(Obj_Entry *obj, RtldLockState *lockstate) case R_386_IRELATIVE: where = (Elf_Addr *)(obj->relocbase + rel->r_offset); lock_release(rtld_bind_lock, lockstate); - target = ((Elf_Addr (*)(void))(obj->relocbase + *where))(); + target = call_ifunc_resolver(obj->relocbase + *where); wlock_acquire(rtld_bind_lock, lockstate); *where = target; break; @@ -404,6 +405,45 @@ reloc_gnu_ifunc(Obj_Entry *obj, int flags, RtldLockState *lockstate) return (0); } +uint32_t cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2; + +void +ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +{ + u_int p[4], cpu_high; + int cpuid_supported; + + __asm __volatile( + " pushfl\n" + " popl %%eax\n" + " movl %%eax,%%ecx\n" + " xorl $0x200000,%%eax\n" + " pushl %%eax\n" + " popfl\n" + " pushfl\n" + " popl %%eax\n" + " xorl %%eax,%%ecx\n" + " je 1f\n" + " movl $1,%0\n" + " jmp 2f\n" + "1: movl $0,%0\n" + "2:\n" + : "=r" (cpuid_supported) : : "eax", "ecx"); + if (!cpuid_supported) + return; + + do_cpuid(1, p); + cpu_feature = p[3]; + cpu_feature2 = p[2]; + do_cpuid(0, p); + cpu_high = p[0]; + if (cpu_high >= 7) { + cpuid_count(7, 0, p); + cpu_stdext_feature = p[1]; + cpu_stdext_feature2 = p[2]; + } +} + void allocate_initial_tls(Obj_Entry *objs) { diff --git a/libexec/rtld-elf/i386/rtld_machdep.h b/libexec/rtld-elf/i386/rtld_machdep.h index 5237d4fce04..1ffdca411c7 100644 --- a/libexec/rtld-elf/i386/rtld_machdep.h +++ b/libexec/rtld-elf/i386/rtld_machdep.h @@ -61,6 +61,14 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) +extern uint32_t cpu_feature; +extern uint32_t cpu_feature2; +extern uint32_t cpu_stdext_feature; +extern uint32_t cpu_stdext_feature2; +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(uint32_t, uint32_t, uint32_t, uint32_t))ptr)( \ + cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2)) + #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ diff --git a/libexec/rtld-elf/mips/reloc.c b/libexec/rtld-elf/mips/reloc.c index 0f4a5d66bd1..4f3d5c450d1 100644 --- a/libexec/rtld-elf/mips/reloc.c +++ b/libexec/rtld-elf/mips/reloc.c @@ -617,6 +617,11 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const Obj_Entry *defobj, return target; } +void +ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +{ +} + void allocate_initial_tls(Obj_Entry *objs) { diff --git a/libexec/rtld-elf/mips/rtld_machdep.h b/libexec/rtld-elf/mips/rtld_machdep.h index 34e8f3c591f..484af1b4133 100644 --- a/libexec/rtld-elf/mips/rtld_machdep.h +++ b/libexec/rtld-elf/mips/rtld_machdep.h @@ -52,6 +52,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(void))ptr)()) + typedef struct { unsigned long ti_module; unsigned long ti_offset; diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index 79d41f21fb6..e76da987f21 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -619,6 +619,11 @@ init_pltgot(Obj_Entry *obj) */ } +void +ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +{ +} + void allocate_initial_tls(Obj_Entry *list) { diff --git a/libexec/rtld-elf/powerpc/rtld_machdep.h b/libexec/rtld-elf/powerpc/rtld_machdep.h index 3e39c8231c0..92bbf9a3de0 100644 --- a/libexec/rtld-elf/powerpc/rtld_machdep.h +++ b/libexec/rtld-elf/powerpc/rtld_machdep.h @@ -51,6 +51,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(void))ptr)()) + /* * Lazy binding entry point, called via PLT. */ diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index 3db5fd25441..6a09185b73a 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -523,6 +523,11 @@ init_pltgot(Obj_Entry *obj) #endif } +void +ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +{ +} + void allocate_initial_tls(Obj_Entry *list) { diff --git a/libexec/rtld-elf/powerpc64/rtld_machdep.h b/libexec/rtld-elf/powerpc64/rtld_machdep.h index 32c7d12d449..90253d70d92 100644 --- a/libexec/rtld-elf/powerpc64/rtld_machdep.h +++ b/libexec/rtld-elf/powerpc64/rtld_machdep.h @@ -51,6 +51,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(void))ptr)()) + /* * Lazy binding entry point, called via PLT. */ diff --git a/libexec/rtld-elf/riscv/reloc.c b/libexec/rtld-elf/riscv/reloc.c index 92c4276df08..5da0bd17566 100644 --- a/libexec/rtld-elf/riscv/reloc.c +++ b/libexec/rtld-elf/riscv/reloc.c @@ -366,6 +366,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, return (0); } +void +ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +{ +} + void allocate_initial_tls(Obj_Entry *objs) { diff --git a/libexec/rtld-elf/riscv/rtld_machdep.h b/libexec/rtld-elf/riscv/rtld_machdep.h index 660787f5d16..46387e7bcdd 100644 --- a/libexec/rtld-elf/riscv/rtld_machdep.h +++ b/libexec/rtld-elf/riscv/rtld_machdep.h @@ -78,6 +78,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target, __asm __volatile("mv gp, %0" :: "r"(old1)); \ }) +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(void))ptr)()) + /* * Lazy binding entry point, called via PLT. */ diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 6c8aff44bf9..874f80bdd35 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -642,6 +642,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) r_debug_state(NULL, &obj_main->linkmap); /* say hello to gdb! */ map_stacks_exec(NULL); + ifunc_init(aux); dbg("resolving ifuncs"); if (resolve_objects_ifunc(obj_main, @@ -690,7 +691,7 @@ rtld_resolve_ifunc(const Obj_Entry *obj, const Elf_Sym *def) Elf_Addr target; ptr = (void *)make_function_pointer(def, obj); - target = ((Elf_Addr (*)(void))ptr)(); + target = call_ifunc_resolver(ptr); return ((void *)target); } diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 8b7024b841a..99b56c12959 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -367,6 +367,7 @@ void dump_Elf_Rela(Obj_Entry *, const Elf_Rela *, u_long); unsigned long elf_hash(const char *); const Elf_Sym *find_symdef(unsigned long, const Obj_Entry *, const Obj_Entry **, int, SymCache *, struct Struct_RtldLockState *); +void ifunc_init(Elf_Auxinfo[static AT_COUNT]); void init_pltgot(Obj_Entry *); void lockdflt_init(void); void digest_notes(Obj_Entry *, Elf_Addr, Elf_Addr); diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c index f8534e8712f..981eea502b8 100644 --- a/libexec/rtld-elf/sparc64/reloc.c +++ b/libexec/rtld-elf/sparc64/reloc.c @@ -786,6 +786,11 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj, return (target); } +void +ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +{ +} + /* * Install rtld function call into this PLT slot. */ diff --git a/libexec/rtld-elf/sparc64/rtld_machdep.h b/libexec/rtld-elf/sparc64/rtld_machdep.h index 9df63b8bb1f..b53f79795e1 100644 --- a/libexec/rtld-elf/sparc64/rtld_machdep.h +++ b/libexec/rtld-elf/sparc64/rtld_machdep.h @@ -53,7 +53,10 @@ Elf_Addr reloc_jmpslot(Elf_Addr *, Elf_Addr, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) -#define round(size, align) \ +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(void))ptr)()) + +#define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ round(size, align) From 08dc89a62127d6df205b2e8c94a1f79ed1b6e938 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 15 Nov 2016 17:01:48 +0000 Subject: [PATCH 094/204] Sync instruction cache's after writing user breakpoints on MIPS. Add an implementation for pmaps_sync_icache() on MIPS that sync's the instruction cache on all CPUs via smp_rendezvous() after a debugger inserts a breakpoint via ptrace(PT_IO). Tested by: kan (on Creator CI20 running Ingenic JZ4780 SOC) MFC after: 2 weeks Sponsored by: DARPA / AFRL --- sys/mips/mips/pmap.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index 2bc7787dc05..638c9cbc50f 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -74,11 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SMP #include -#else -#include -#endif #include #include @@ -3266,9 +3262,19 @@ pmap_activate(struct thread *td) critical_exit(); } +static void +pmap_sync_icache_one(void *arg __unused) +{ + + mips_icache_sync_all(); + mips_dcache_wbinv_all(); +} + void pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) { + + smp_rendezvous(NULL, pmap_sync_icache_one, NULL, NULL); } /* From 7667839a7ec4354de9984d411c45cbacf9fe8e3b Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 15 Nov 2016 18:22:50 +0000 Subject: [PATCH 095/204] Remove most of the code for implementing PG_CACHED pages. (This change does not remove user-space visible fields from vm_cnt or all of the references to cached pages from comments. Those changes will come later.) Reviewed by: kib, markj Tested by: pho Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8497 --- sys/cddl/compat/opensolaris/sys/vnode.h | 3 +- .../opensolaris/uts/common/fs/zfs/zfs_vnops.c | 4 - sys/fs/tmpfs/tmpfs_subr.c | 9 +- sys/kern/kern_exec.c | 2 +- sys/kern/uipc_shm.c | 9 +- sys/vm/swap_pager.c | 5 +- sys/vm/vm_fault.c | 3 +- sys/vm/vm_mmap.c | 3 - sys/vm/vm_object.c | 39 +- sys/vm/vm_object.h | 8 - sys/vm/vm_page.c | 364 ++---------------- sys/vm/vm_page.h | 6 - sys/vm/vm_reserv.c | 39 -- sys/vm/vm_reserv.h | 1 - sys/vm/vnode_pager.c | 10 +- 15 files changed, 39 insertions(+), 466 deletions(-) diff --git a/sys/cddl/compat/opensolaris/sys/vnode.h b/sys/cddl/compat/opensolaris/sys/vnode.h index e7a92ae9957..d15cd88c193 100644 --- a/sys/cddl/compat/opensolaris/sys/vnode.h +++ b/sys/cddl/compat/opensolaris/sys/vnode.h @@ -75,8 +75,7 @@ vn_is_readonly(vnode_t *vp) #define vn_mountedvfs(vp) ((vp)->v_mountedhere) #define vn_has_cached_data(vp) \ ((vp)->v_object != NULL && \ - ((vp)->v_object->resident_page_count > 0 || \ - !vm_object_cache_is_empty((vp)->v_object))) + (vp)->v_object->resident_page_count > 0) #define vn_exists(vp) do { } while (0) #define vn_invalid(vp) do { } while (0) #define vn_renamepath(tdvp, svp, tnm, lentnm) do { } while (0) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 17c702a335f..dee837eb738 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -426,10 +426,6 @@ page_busy(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes) continue; } vm_page_sbusy(pp); - } else if (pp == NULL) { - pp = vm_page_alloc(obj, OFF_TO_IDX(start), - VM_ALLOC_SYSTEM | VM_ALLOC_IFCACHED | - VM_ALLOC_SBUSY); } else { ASSERT(pp != NULL && !pp->valid); pp = NULL; diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 7ce4789c72a..d3019f60549 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -1372,12 +1372,9 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(uobj); goto retry; - } else if (m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(uobj, &m, 1, - NULL, NULL); - else - /* A cached page was reactivated. */ - rv = VM_PAGER_OK; + } + rv = vm_pager_get_pages(uobj, &m, 1, NULL, + NULL); vm_page_lock(m); if (rv == VM_PAGER_OK) { vm_page_deactivate(m); diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 7d9adb05021..1a41aac581d 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1006,7 +1006,7 @@ exec_map_first_page(imgp) break; } else { ma[i] = vm_page_alloc(object, i, - VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + VM_ALLOC_NORMAL); if (ma[i] == NULL) break; } diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index be922edf0b0..febba784835 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -455,12 +455,9 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(object); goto retry; - } else if (m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(object, &m, 1, - NULL, NULL); - else - /* A cached page was reactivated. */ - rv = VM_PAGER_OK; + } + rv = vm_pager_get_pages(object, &m, 1, NULL, + NULL); vm_page_lock(m); if (rv == VM_PAGER_OK) { vm_page_deactivate(m); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 8f46cf38e7b..bf57203c119 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1126,7 +1126,7 @@ swap_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind, if (shift != 0) { for (i = 1; i <= shift; i++) { p = vm_page_alloc(object, m[0]->pindex - i, - VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + VM_ALLOC_NORMAL); if (p == NULL) { /* Shift allocated pages to the left. */ for (j = 0; j < i - 1; j++) @@ -1144,8 +1144,7 @@ swap_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind, if (rahead != NULL) { for (i = 0; i < *rahead; i++) { p = vm_page_alloc(object, - m[reqcount - 1]->pindex + i + 1, - VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED); + m[reqcount - 1]->pindex + i + 1, VM_ALLOC_NORMAL); if (p == NULL) break; bp->b_pages[shift + reqcount + i] = p; diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index b73cf645918..60aaa6c4084 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -559,8 +559,7 @@ fast_failed: unlock_and_deallocate(&fs); VM_WAITPFAULT; goto RetryFault; - } else if (fs.m->valid == VM_PAGE_BITS_ALL) - break; + } } readrest: diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 1fd97d1f5aa..be84ec2167e 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -877,9 +877,6 @@ RestartScan: pindex = OFF_TO_IDX(current->offset + (addr - current->start)); m = vm_page_lookup(object, pindex); - if (m == NULL && - vm_page_is_cached(object, pindex)) - mincoreinfo = MINCORE_INCORE; if (m != NULL && m->valid == 0) m = NULL; if (m != NULL) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 0cf364fcaa4..676a6971f32 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -178,9 +178,6 @@ vm_object_zdtor(void *mem, int size, void *arg) ("object %p has reservations", object)); #endif - KASSERT(vm_object_cache_is_empty(object), - ("object %p has cached pages", - object)); KASSERT(object->paging_in_progress == 0, ("object %p paging_in_progress = %d", object, object->paging_in_progress)); @@ -212,8 +209,6 @@ vm_object_zinit(void *mem, int size, int flags) object->paging_in_progress = 0; object->resident_page_count = 0; object->shadow_count = 0; - object->cache.rt_root = 0; - object->cache.rt_flags = 0; mtx_lock(&vm_object_list_mtx); TAILQ_INSERT_TAIL(&vm_object_list, object, object_list); @@ -792,8 +787,6 @@ vm_object_terminate(vm_object_t object) if (__predict_false(!LIST_EMPTY(&object->rvq))) vm_reserv_break_all(object); #endif - if (__predict_false(!vm_object_cache_is_empty(object))) - vm_page_cache_free(object, 0, 0); KASSERT(object->cred == NULL || object->type == OBJT_DEFAULT || object->type == OBJT_SWAP, @@ -1135,13 +1128,6 @@ shadowlookup: } else if ((tobject->flags & OBJ_UNMANAGED) != 0) goto unlock_tobject; m = vm_page_lookup(tobject, tpindex); - if (m == NULL && advise == MADV_WILLNEED) { - /* - * If the page is cached, reactivate it. - */ - m = vm_page_alloc(tobject, tpindex, VM_ALLOC_IFCACHED | - VM_ALLOC_NOBUSY); - } if (m == NULL) { /* * There may be swap even if there is no backing page @@ -1406,19 +1392,6 @@ retry: swap_pager_copy(orig_object, new_object, offidxstart, 0); TAILQ_FOREACH(m, &new_object->memq, listq) vm_page_xunbusy(m); - - /* - * Transfer any cached pages from orig_object to new_object. - * If swap_pager_copy() found swapped out pages within the - * specified range of orig_object, then it changed - * new_object's type to OBJT_SWAP when it transferred those - * pages to new_object. Otherwise, new_object's type - * should still be OBJT_DEFAULT and orig_object should not - * contain any cached pages within the specified range. - */ - if (__predict_false(!vm_object_cache_is_empty(orig_object))) - vm_page_cache_transfer(orig_object, offidxstart, - new_object); } VM_OBJECT_WUNLOCK(orig_object); VM_OBJECT_WUNLOCK(new_object); @@ -1754,13 +1727,6 @@ vm_object_collapse(vm_object_t object) backing_object, object, OFF_TO_IDX(object->backing_object_offset), TRUE); - - /* - * Free any cached pages from backing_object. - */ - if (__predict_false( - !vm_object_cache_is_empty(backing_object))) - vm_page_cache_free(backing_object, 0, 0); } /* * Object now shadows whatever backing_object did. @@ -1889,7 +1855,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end, (options & (OBJPR_CLEANONLY | OBJPR_NOTMAPPED)) == OBJPR_NOTMAPPED, ("vm_object_page_remove: illegal options for object %p", object)); if (object->resident_page_count == 0) - goto skipmemq; + return; vm_object_pip_add(object, 1); again: p = vm_page_find_least(object, start); @@ -1946,9 +1912,6 @@ next: vm_page_unlock(p); } vm_object_pip_wakeup(object); -skipmemq: - if (__predict_false(!vm_object_cache_is_empty(object))) - vm_page_cache_free(object, start, end); } /* diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 73998aae843..52bc44ce2b3 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -118,7 +118,6 @@ struct vm_object { vm_ooffset_t backing_object_offset;/* Offset in backing object */ TAILQ_ENTRY(vm_object) pager_object_list; /* list of all objects of this pager type */ LIST_HEAD(, vm_reserv) rvq; /* list of reservations */ - struct vm_radix cache; /* (o + f) root of the cache page radix trie */ void *handle; union { /* @@ -290,13 +289,6 @@ void vm_object_pip_wakeup(vm_object_t object); void vm_object_pip_wakeupn(vm_object_t object, short i); void vm_object_pip_wait(vm_object_t object, char *waitid); -static __inline boolean_t -vm_object_cache_is_empty(vm_object_t object) -{ - - return (vm_radix_is_empty(&object->cache)); -} - void umtx_shm_object_init(vm_object_t object); void umtx_shm_object_terminated(vm_object_t object); extern int umtx_shm_vnobj_persistent; diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 78bf98ae016..50c95bf5c40 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -154,8 +154,7 @@ static int vm_pageout_pages_needed; static uma_zone_t fakepg_zone; -static struct vnode *vm_page_alloc_init(vm_page_t m); -static void vm_page_cache_turn_free(vm_page_t m); +static void vm_page_alloc_check(vm_page_t m); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); static void vm_page_enqueue(uint8_t queue, vm_page_t m); static void vm_page_free_wakeup(void); @@ -1118,9 +1117,7 @@ void vm_page_dirty_KBI(vm_page_t m) { - /* These assertions refer to this operation by its public name. */ - KASSERT((m->flags & PG_CACHED) == 0, - ("vm_page_dirty: page in cache!")); + /* Refer to this operation by its public name. */ KASSERT(m->valid == VM_PAGE_BITS_ALL, ("vm_page_dirty: page is invalid!")); m->dirty = VM_PAGE_BITS_ALL; @@ -1458,142 +1455,6 @@ vm_page_rename(vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) return (0); } -/* - * Convert all of the given object's cached pages that have a - * pindex within the given range into free pages. If the value - * zero is given for "end", then the range's upper bound is - * infinity. If the given object is backed by a vnode and it - * transitions from having one or more cached pages to none, the - * vnode's hold count is reduced. - */ -void -vm_page_cache_free(vm_object_t object, vm_pindex_t start, vm_pindex_t end) -{ - vm_page_t m; - boolean_t empty; - - mtx_lock(&vm_page_queue_free_mtx); - if (__predict_false(vm_radix_is_empty(&object->cache))) { - mtx_unlock(&vm_page_queue_free_mtx); - return; - } - while ((m = vm_radix_lookup_ge(&object->cache, start)) != NULL) { - if (end != 0 && m->pindex >= end) - break; - vm_radix_remove(&object->cache, m->pindex); - vm_page_cache_turn_free(m); - } - empty = vm_radix_is_empty(&object->cache); - mtx_unlock(&vm_page_queue_free_mtx); - if (object->type == OBJT_VNODE && empty) - vdrop(object->handle); -} - -/* - * Returns the cached page that is associated with the given - * object and offset. If, however, none exists, returns NULL. - * - * The free page queue must be locked. - */ -static inline vm_page_t -vm_page_cache_lookup(vm_object_t object, vm_pindex_t pindex) -{ - - mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - return (vm_radix_lookup(&object->cache, pindex)); -} - -/* - * Remove the given cached page from its containing object's - * collection of cached pages. - * - * The free page queue must be locked. - */ -static void -vm_page_cache_remove(vm_page_t m) -{ - - mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - KASSERT((m->flags & PG_CACHED) != 0, - ("vm_page_cache_remove: page %p is not cached", m)); - vm_radix_remove(&m->object->cache, m->pindex); - m->object = NULL; - vm_cnt.v_cache_count--; -} - -/* - * Transfer all of the cached pages with offset greater than or - * equal to 'offidxstart' from the original object's cache to the - * new object's cache. However, any cached pages with offset - * greater than or equal to the new object's size are kept in the - * original object. Initially, the new object's cache must be - * empty. Offset 'offidxstart' in the original object must - * correspond to offset zero in the new object. - * - * The new object must be locked. - */ -void -vm_page_cache_transfer(vm_object_t orig_object, vm_pindex_t offidxstart, - vm_object_t new_object) -{ - vm_page_t m; - - /* - * Insertion into an object's collection of cached pages - * requires the object to be locked. In contrast, removal does - * not. - */ - VM_OBJECT_ASSERT_WLOCKED(new_object); - KASSERT(vm_radix_is_empty(&new_object->cache), - ("vm_page_cache_transfer: object %p has cached pages", - new_object)); - mtx_lock(&vm_page_queue_free_mtx); - while ((m = vm_radix_lookup_ge(&orig_object->cache, - offidxstart)) != NULL) { - /* - * Transfer all of the pages with offset greater than or - * equal to 'offidxstart' from the original object's - * cache to the new object's cache. - */ - if ((m->pindex - offidxstart) >= new_object->size) - break; - vm_radix_remove(&orig_object->cache, m->pindex); - /* Update the page's object and offset. */ - m->object = new_object; - m->pindex -= offidxstart; - if (vm_radix_insert(&new_object->cache, m)) - vm_page_cache_turn_free(m); - } - mtx_unlock(&vm_page_queue_free_mtx); -} - -/* - * Returns TRUE if a cached page is associated with the given object and - * offset, and FALSE otherwise. - * - * The object must be locked. - */ -boolean_t -vm_page_is_cached(vm_object_t object, vm_pindex_t pindex) -{ - vm_page_t m; - - /* - * Insertion into an object's collection of cached pages requires the - * object to be locked. Therefore, if the object is locked and the - * object's collection is empty, there is no need to acquire the free - * page queues lock in order to prove that the specified page doesn't - * exist. - */ - VM_OBJECT_ASSERT_WLOCKED(object); - if (__predict_true(vm_object_cache_is_empty(object))) - return (FALSE); - mtx_lock(&vm_page_queue_free_mtx); - m = vm_page_cache_lookup(object, pindex); - mtx_unlock(&vm_page_queue_free_mtx); - return (m != NULL); -} - /* * vm_page_alloc: * @@ -1610,9 +1471,6 @@ vm_page_is_cached(vm_object_t object, vm_pindex_t pindex) * optional allocation flags: * VM_ALLOC_COUNT(number) the number of additional pages that the caller * intends to allocate - * VM_ALLOC_IFCACHED return page only if it is cached - * VM_ALLOC_IFNOTCACHED return NULL, do not reactivate if the page - * is cached * VM_ALLOC_NOBUSY do not exclusive busy the page * VM_ALLOC_NODUMP do not include the page in a kernel core dump * VM_ALLOC_NOOBJ page is not associated with an object and @@ -1626,8 +1484,6 @@ vm_page_is_cached(vm_object_t object, vm_pindex_t pindex) vm_page_t vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) { - struct vnode *vp = NULL; - vm_object_t m_object; vm_page_t m, mpred; int flags, req_class; @@ -1670,31 +1526,12 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) * Allocate from the free queue if the number of free pages * exceeds the minimum for the request class. */ - if (object != NULL && - (m = vm_page_cache_lookup(object, pindex)) != NULL) { - if ((req & VM_ALLOC_IFNOTCACHED) != 0) { - mtx_unlock(&vm_page_queue_free_mtx); - return (NULL); - } - if (vm_phys_unfree_page(m)) - vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, 0); #if VM_NRESERVLEVEL > 0 - else if (!vm_reserv_reactivate_page(m)) -#else - else -#endif - panic("vm_page_alloc: cache page %p is missing" - " from the free queue", m); - } else if ((req & VM_ALLOC_IFCACHED) != 0) { - mtx_unlock(&vm_page_queue_free_mtx); - return (NULL); -#if VM_NRESERVLEVEL > 0 - } else if (object == NULL || (object->flags & (OBJ_COLORED | + if (object == NULL || (object->flags & (OBJ_COLORED | OBJ_FICTITIOUS)) != OBJ_COLORED || (m = - vm_reserv_alloc_page(object, pindex, mpred)) == NULL) { -#else - } else { + vm_reserv_alloc_page(object, pindex, mpred)) == NULL) #endif + { m = vm_phys_alloc_pages(object != NULL ? VM_FREEPOOL_DEFAULT : VM_FREEPOOL_DIRECT, 0); #if VM_NRESERVLEVEL > 0 @@ -1720,33 +1557,9 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) * At this point we had better have found a good page. */ KASSERT(m != NULL, ("vm_page_alloc: missing page")); - KASSERT(m->queue == PQ_NONE, - ("vm_page_alloc: page %p has unexpected queue %d", m, m->queue)); - KASSERT(m->wire_count == 0, ("vm_page_alloc: page %p is wired", m)); - KASSERT(m->hold_count == 0, ("vm_page_alloc: page %p is held", m)); - KASSERT(!vm_page_busied(m), ("vm_page_alloc: page %p is busy", m)); - KASSERT(m->dirty == 0, ("vm_page_alloc: page %p is dirty", m)); - KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, - ("vm_page_alloc: page %p has unexpected memattr %d", m, - pmap_page_get_memattr(m))); - if ((m->flags & PG_CACHED) != 0) { - KASSERT((m->flags & PG_ZERO) == 0, - ("vm_page_alloc: cached page %p is PG_ZERO", m)); - KASSERT(m->valid != 0, - ("vm_page_alloc: cached page %p is invalid", m)); - if (m->object != object || m->pindex != pindex) - m->valid = 0; - m_object = m->object; - vm_page_cache_remove(m); - if (m_object->type == OBJT_VNODE && - vm_object_cache_is_empty(m_object)) - vp = m_object->handle; - } else { - KASSERT(m->valid == 0, - ("vm_page_alloc: free page %p is valid", m)); - vm_phys_freecnt_adj(m, -1); - } + vm_phys_freecnt_adj(m, -1); mtx_unlock(&vm_page_queue_free_mtx); + vm_page_alloc_check(m); /* * Initialize the page. Only the PG_ZERO flag is inherited. @@ -1778,9 +1591,6 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) if (object != NULL) { if (vm_page_insert_after(m, object, pindex, mpred)) { - /* See the comment below about hold count. */ - if (vp != NULL) - vdrop(vp); pagedaemon_wakeup(); if (req & VM_ALLOC_WIRED) { atomic_subtract_int(&vm_cnt.v_wire_count, 1); @@ -1800,15 +1610,6 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) } else m->pindex = pindex; - /* - * The following call to vdrop() must come after the above call - * to vm_page_insert() in case both affect the same object and - * vnode. Otherwise, the affected vnode's hold count could - * temporarily become zero. - */ - if (vp != NULL) - vdrop(vp); - /* * Don't wakeup too often - wakeup the pageout daemon when * we would be nearly out of memory. @@ -1819,16 +1620,6 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) return (m); } -static void -vm_page_alloc_contig_vdrop(struct spglist *lst) -{ - - while (!SLIST_EMPTY(lst)) { - vdrop((struct vnode *)SLIST_FIRST(lst)-> plinks.s.pv); - SLIST_REMOVE_HEAD(lst, plinks.s.ss); - } -} - /* * vm_page_alloc_contig: * @@ -1873,8 +1664,6 @@ vm_page_alloc_contig(vm_object_t object, vm_pindex_t pindex, int req, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr) { - struct vnode *drop; - struct spglist deferred_vdrop_list; vm_page_t m, m_tmp, m_ret; u_int flags; int req_class; @@ -1900,7 +1689,6 @@ vm_page_alloc_contig(vm_object_t object, vm_pindex_t pindex, int req, if (curproc == pageproc && req_class != VM_ALLOC_INTERRUPT) req_class = VM_ALLOC_SYSTEM; - SLIST_INIT(&deferred_vdrop_list); mtx_lock(&vm_page_queue_free_mtx); if (vm_cnt.v_free_count + vm_cnt.v_cache_count >= npages + vm_cnt.v_free_reserved || (req_class == VM_ALLOC_SYSTEM && @@ -1922,17 +1710,7 @@ retry: return (NULL); } if (m_ret != NULL) - for (m = m_ret; m < &m_ret[npages]; m++) { - drop = vm_page_alloc_init(m); - if (drop != NULL) { - /* - * Enqueue the vnode for deferred vdrop(). - */ - m->plinks.s.pv = drop; - SLIST_INSERT_HEAD(&deferred_vdrop_list, m, - plinks.s.ss); - } - } + vm_phys_freecnt_adj(m_ret, -npages); else { #if VM_NRESERVLEVEL > 0 if (vm_reserv_reclaim_contig(npages, low, high, alignment, @@ -1943,6 +1721,8 @@ retry: mtx_unlock(&vm_page_queue_free_mtx); if (m_ret == NULL) return (NULL); + for (m = m_ret; m < &m_ret[npages]; m++) + vm_page_alloc_check(m); /* * Initialize the pages. Only the PG_ZERO flag is inherited. @@ -1975,8 +1755,6 @@ retry: m->oflags = VPO_UNMANAGED; if (object != NULL) { if (vm_page_insert(m, object, pindex)) { - vm_page_alloc_contig_vdrop( - &deferred_vdrop_list); if (vm_paging_needed()) pagedaemon_wakeup(); if ((req & VM_ALLOC_WIRED) != 0) @@ -2001,57 +1779,28 @@ retry: pmap_page_set_memattr(m, memattr); pindex++; } - vm_page_alloc_contig_vdrop(&deferred_vdrop_list); if (vm_paging_needed()) pagedaemon_wakeup(); return (m_ret); } /* - * Initialize a page that has been freshly dequeued from a freelist. - * The caller has to drop the vnode returned, if it is not NULL. - * - * This function may only be used to initialize unmanaged pages. - * - * To be called with vm_page_queue_free_mtx held. + * Check a page that has been freshly dequeued from a freelist. */ -static struct vnode * -vm_page_alloc_init(vm_page_t m) +static void +vm_page_alloc_check(vm_page_t m) { - struct vnode *drop; - vm_object_t m_object; KASSERT(m->queue == PQ_NONE, - ("vm_page_alloc_init: page %p has unexpected queue %d", - m, m->queue)); - KASSERT(m->wire_count == 0, - ("vm_page_alloc_init: page %p is wired", m)); - KASSERT(m->hold_count == 0, - ("vm_page_alloc_init: page %p is held", m)); - KASSERT(!vm_page_busied(m), - ("vm_page_alloc_init: page %p is busy", m)); - KASSERT(m->dirty == 0, - ("vm_page_alloc_init: page %p is dirty", m)); + ("page %p has unexpected queue %d", m, m->queue)); + KASSERT(m->wire_count == 0, ("page %p is wired", m)); + KASSERT(m->hold_count == 0, ("page %p is held", m)); + KASSERT(!vm_page_busied(m), ("page %p is busy", m)); + KASSERT(m->dirty == 0, ("page %p is dirty", m)); KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, - ("vm_page_alloc_init: page %p has unexpected memattr %d", + ("page %p has unexpected memattr %d", m, pmap_page_get_memattr(m))); - mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - drop = NULL; - if ((m->flags & PG_CACHED) != 0) { - KASSERT((m->flags & PG_ZERO) == 0, - ("vm_page_alloc_init: cached page %p is PG_ZERO", m)); - m->valid = 0; - m_object = m->object; - vm_page_cache_remove(m); - if (m_object->type == OBJT_VNODE && - vm_object_cache_is_empty(m_object)) - drop = m_object->handle; - } else { - KASSERT(m->valid == 0, - ("vm_page_alloc_init: free page %p is valid", m)); - vm_phys_freecnt_adj(m, -1); - } - return (drop); + KASSERT(m->valid == 0, ("free page %p is valid", m)); } /* @@ -2077,7 +1826,6 @@ vm_page_alloc_init(vm_page_t m) vm_page_t vm_page_alloc_freelist(int flind, int req) { - struct vnode *drop; vm_page_t m; u_int flags; int req_class; @@ -2111,8 +1859,9 @@ vm_page_alloc_freelist(int flind, int req) mtx_unlock(&vm_page_queue_free_mtx); return (NULL); } - drop = vm_page_alloc_init(m); + vm_phys_freecnt_adj(m, -1); mtx_unlock(&vm_page_queue_free_mtx); + vm_page_alloc_check(m); /* * Initialize the page. Only the PG_ZERO flag is inherited. @@ -2132,8 +1881,6 @@ vm_page_alloc_freelist(int flind, int req) } /* Unmanaged pages don't use "act_count". */ m->oflags = VPO_UNMANAGED; - if (drop != NULL) - vdrop(drop); if (vm_paging_needed()) pagedaemon_wakeup(); return (m); @@ -2259,38 +2006,8 @@ retry: /* Don't care: PG_NODUMP, PG_ZERO. */ if (object->type != OBJT_DEFAULT && object->type != OBJT_SWAP && - object->type != OBJT_VNODE) + object->type != OBJT_VNODE) { run_ext = 0; - else if ((m->flags & PG_CACHED) != 0 || - m != vm_page_lookup(object, m->pindex)) { - /* - * The page is cached or recently converted - * from cached to free. - */ -#if VM_NRESERVLEVEL > 0 - if (level >= 0) { - /* - * The page is reserved. Extend the - * current run by one page. - */ - run_ext = 1; - } else -#endif - if ((order = m->order) < VM_NFREEORDER) { - /* - * The page is enqueued in the - * physical memory allocator's cache/ - * free page queues. Moreover, it is - * the first page in a power-of-two- - * sized run of contiguous cache/free - * pages. Add these pages to the end - * of the current run, and jump - * ahead. - */ - run_ext = 1 << order; - m_inc = 1 << order; - } else - run_ext = 0; #if VM_NRESERVLEVEL > 0 } else if ((options & VPSC_NOSUPER) != 0 && (level = vm_reserv_level_iffullpop(m)) >= 0) { @@ -2457,15 +2174,7 @@ retry: object->type != OBJT_SWAP && object->type != OBJT_VNODE) error = EINVAL; - else if ((m->flags & PG_CACHED) != 0 || - m != vm_page_lookup(object, m->pindex)) { - /* - * The page is cached or recently converted - * from cached to free. - */ - VM_OBJECT_WUNLOCK(object); - goto cached; - } else if (object->memattr != VM_MEMATTR_DEFAULT) + else if (object->memattr != VM_MEMATTR_DEFAULT) error = EINVAL; else if (m->queue != PQ_NONE && !vm_page_busied(m)) { KASSERT(pmap_page_get_memattr(m) == @@ -2566,7 +2275,6 @@ retry: unlock: VM_OBJECT_WUNLOCK(object); } else { -cached: mtx_lock(&vm_page_queue_free_mtx); order = m->order; if (order < VM_NFREEORDER) { @@ -2963,27 +2671,6 @@ vm_page_free_wakeup(void) } } -/* - * Turn a cached page into a free page, by changing its attributes. - * Keep the statistics up-to-date. - * - * The free page queue must be locked. - */ -static void -vm_page_cache_turn_free(vm_page_t m) -{ - - mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - - m->object = NULL; - m->valid = 0; - KASSERT((m->flags & PG_CACHED) != 0, - ("vm_page_cache_turn_free: page %p is not cached", m)); - m->flags &= ~PG_CACHED; - vm_cnt.v_cache_count--; - vm_phys_freecnt_adj(m, 1); -} - /* * vm_page_free_toq: * @@ -3383,8 +3070,7 @@ retrylookup: VM_WAIT; VM_OBJECT_WLOCK(object); goto retrylookup; - } else if (m->valid != 0) - return (m); + } if (allocflags & VM_ALLOC_ZERO && (m->flags & PG_ZERO) == 0) pmap_zero_page(m); return (m); diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 417d9d87a72..8d44e65c53a 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -326,7 +326,6 @@ extern struct mtx_padalign pa_lock[]; * Page flags. If changed at any other time than page allocation or * freeing, the modification must be protected by the vm_page lock. */ -#define PG_CACHED 0x0001 /* page is cached */ #define PG_FICTITIOUS 0x0004 /* physical page doesn't exist */ #define PG_ZERO 0x0008 /* page is zeroed */ #define PG_MARKER 0x0010 /* special queue marker page */ @@ -409,8 +408,6 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); #define VM_ALLOC_ZERO 0x0040 /* (acfg) Try to obtain a zeroed page */ #define VM_ALLOC_NOOBJ 0x0100 /* (acg) No associated object */ #define VM_ALLOC_NOBUSY 0x0200 /* (acg) Do not busy the page */ -#define VM_ALLOC_IFCACHED 0x0400 /* (ag) Fail if page is not cached */ -#define VM_ALLOC_IFNOTCACHED 0x0800 /* (ag) Fail if page is cached */ #define VM_ALLOC_IGN_SBUSY 0x1000 /* (g) Ignore shared busy flag */ #define VM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ #define VM_ALLOC_SBUSY 0x4000 /* (acg) Shared busy the page */ @@ -453,8 +450,6 @@ vm_page_t vm_page_alloc_contig(vm_object_t object, vm_pindex_t pindex, int req, vm_paddr_t boundary, vm_memattr_t memattr); vm_page_t vm_page_alloc_freelist(int, int); vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int); -void vm_page_cache_free(vm_object_t, vm_pindex_t, vm_pindex_t); -void vm_page_cache_transfer(vm_object_t, vm_pindex_t, vm_object_t); int vm_page_try_to_free (vm_page_t); void vm_page_deactivate (vm_page_t); void vm_page_deactivate_noreuse(vm_page_t); @@ -464,7 +459,6 @@ vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); -boolean_t vm_page_is_cached(vm_object_t object, vm_pindex_t pindex); void vm_page_launder(vm_page_t m); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); vm_page_t vm_page_next(vm_page_t m); diff --git a/sys/vm/vm_reserv.c b/sys/vm/vm_reserv.c index 8bb178817e6..5519d2fc1a0 100644 --- a/sys/vm/vm_reserv.c +++ b/sys/vm/vm_reserv.c @@ -907,45 +907,6 @@ vm_reserv_level_iffullpop(vm_page_t m) return (rv->popcnt == VM_LEVEL_0_NPAGES ? 0 : -1); } -/* - * Prepare for the reactivation of a cached page. - * - * First, suppose that the given page "m" was allocated individually, i.e., not - * as part of a reservation, and cached. Then, suppose a reservation - * containing "m" is allocated by the same object. Although "m" and the - * reservation belong to the same object, "m"'s pindex may not match the - * reservation's. - * - * The free page queue must be locked. - */ -boolean_t -vm_reserv_reactivate_page(vm_page_t m) -{ - vm_reserv_t rv; - int index; - - mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - rv = vm_reserv_from_page(m); - if (rv->object == NULL) - return (FALSE); - KASSERT((m->flags & PG_CACHED) != 0, - ("vm_reserv_reactivate_page: page %p is not cached", m)); - if (m->object == rv->object && - m->pindex - rv->pindex == (index = VM_RESERV_INDEX(m->object, - m->pindex))) - vm_reserv_populate(rv, index); - else { - KASSERT(rv->inpartpopq, - ("vm_reserv_reactivate_page: reserv %p's inpartpopq is FALSE", - rv)); - TAILQ_REMOVE(&vm_rvq_partpop, rv, partpopq); - rv->inpartpopq = FALSE; - /* Don't release "m" to the physical memory allocator. */ - vm_reserv_break(rv, m); - } - return (TRUE); -} - /* * Breaks the given partially-populated reservation, releasing its cached and * free pages to the physical memory allocator. diff --git a/sys/vm/vm_reserv.h b/sys/vm/vm_reserv.h index 52f6ab25477..1a3c0a1d491 100644 --- a/sys/vm/vm_reserv.h +++ b/sys/vm/vm_reserv.h @@ -56,7 +56,6 @@ void vm_reserv_init(void); bool vm_reserv_is_page_free(vm_page_t m); int vm_reserv_level(vm_page_t m); int vm_reserv_level_iffullpop(vm_page_t m); -boolean_t vm_reserv_reactivate_page(vm_page_t m); boolean_t vm_reserv_reclaim_contig(u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary); boolean_t vm_reserv_reclaim_inactive(void); diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 92c28f3098a..3458c2032a0 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -466,10 +466,6 @@ vnode_pager_setsize(struct vnode *vp, vm_ooffset_t nsize) * replacement from working properly. */ vm_page_clear_dirty(m, base, PAGE_SIZE - base); - } else if ((nsize & PAGE_MASK) && - vm_page_is_cached(object, OFF_TO_IDX(nsize))) { - vm_page_cache_free(object, OFF_TO_IDX(nsize), - nobjsize); } } object->un_pager.vnp.vnp_size = nsize; @@ -894,8 +890,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, for (tpindex = m[0]->pindex - 1; tpindex >= startpindex && tpindex < m[0]->pindex; tpindex--, i++) { - p = vm_page_alloc(object, tpindex, VM_ALLOC_NORMAL | - VM_ALLOC_IFNOTCACHED); + p = vm_page_alloc(object, tpindex, VM_ALLOC_NORMAL); if (p == NULL) { /* Shift the array. */ for (int j = 0; j < i; j++) @@ -932,8 +927,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, for (tpindex = m[count - 1]->pindex + 1; tpindex < endpindex; i++, tpindex++) { - p = vm_page_alloc(object, tpindex, VM_ALLOC_NORMAL | - VM_ALLOC_IFNOTCACHED); + p = vm_page_alloc(object, tpindex, VM_ALLOC_NORMAL); if (p == NULL) break; bp->b_pages[i] = p; From 197029fec2dcdf42f66bbf3aa3d512d744c7971c Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Tue, 15 Nov 2016 18:57:25 +0000 Subject: [PATCH 096/204] Fix ti_gpio_detach() to avoid crashing if something goes wrong. Sponsored by: Rubicon Communication, LLC (Netgate) --- sys/arm/ti/ti_gpio.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/arm/ti/ti_gpio.c b/sys/arm/ti/ti_gpio.c index cf2de36eac1..4f0f4f35aee 100644 --- a/sys/arm/ti/ti_gpio.c +++ b/sys/arm/ti/ti_gpio.c @@ -710,7 +710,8 @@ ti_gpio_detach(device_t dev) /* Disable all interrupts */ if (sc->sc_mem_res != NULL) ti_gpio_intr_clr(sc, 0xffffffff); - gpiobus_detach_bus(dev); + if (sc->sc_busdev != NULL) + gpiobus_detach_bus(dev); if (sc->sc_isrcs != NULL) ti_gpio_pic_detach(sc); /* Release the memory and IRQ resources. */ @@ -718,10 +719,12 @@ ti_gpio_detach(device_t dev) bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_irq_hdl); } - bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irq_rid, - sc->sc_irq_res); - bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_mem_rid, - sc->sc_mem_res); + if (sc->sc_irq_res) + bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irq_rid, + sc->sc_irq_res); + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_mem_rid, + sc->sc_mem_res); TI_GPIO_LOCK_DESTROY(sc); return (0); From d47e148e0bc59392f73c71d395182d23bd3130c4 Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Tue, 15 Nov 2016 19:09:36 +0000 Subject: [PATCH 097/204] Change the TI aintc driver name to "ti_aintc" to avoid the conflict with the aintc driver for Allwinner A10. This fixes the boot of the GENERIC ARM kernel on TI/AM335x SoCs. Sponsored by: Rubicon Communications, LLC (Netgate) --- sys/arm/ti/aintc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm/ti/aintc.c b/sys/arm/ti/aintc.c index 78b54883c4b..ec2aad83059 100644 --- a/sys/arm/ti/aintc.c +++ b/sys/arm/ti/aintc.c @@ -297,13 +297,13 @@ static device_method_t ti_aintc_methods[] = { }; static driver_t ti_aintc_driver = { - "aintc", + "ti_aintc", ti_aintc_methods, sizeof(struct ti_aintc_softc), }; static devclass_t ti_aintc_devclass; -EARLY_DRIVER_MODULE(aintc, simplebus, ti_aintc_driver, ti_aintc_devclass, +EARLY_DRIVER_MODULE(ti_aintc, simplebus, ti_aintc_driver, ti_aintc_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); SIMPLEBUS_PNP_INFO(compat_data); From 55dfce589cb685bcf216c7d5a3d353fec2122c41 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 15 Nov 2016 19:23:48 +0000 Subject: [PATCH 098/204] Plug a lock leak in sysctl_ifmalist(). Fix style in the local variable declarations. PR: 214542 MFC after: 1 week --- sys/net/rtsock.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index ca89002d306..5f14287d10c 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1773,13 +1773,15 @@ done: static int sysctl_ifmalist(int af, struct walkarg *w) { - struct ifnet *ifp; - struct ifmultiaddr *ifma; - struct rt_addrinfo info; - int len, error = 0; + struct rt_addrinfo info; struct ifaddr *ifa; + struct ifmultiaddr *ifma; + struct ifnet *ifp; + int error, len; + error = 0; bzero((caddr_t)&info, sizeof(info)); + IFNET_RLOCK_NOSLEEP(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { if (w->w_arg && w->w_arg != ifp->if_index) @@ -1799,7 +1801,7 @@ sysctl_ifmalist(int af, struct walkarg *w) ifma->ifma_lladdr : NULL; error = rtsock_msg_buffer(RTM_NEWMADDR, &info, w, &len); if (error != 0) - goto done; + break; if (w->w_req && w->w_tmem) { struct ifma_msghdr *ifmam; @@ -1808,15 +1810,14 @@ sysctl_ifmalist(int af, struct walkarg *w) ifmam->ifmam_flags = 0; ifmam->ifmam_addrs = info.rti_addrs; error = SYSCTL_OUT(w->w_req, w->w_tmem, len); - if (error) { - IF_ADDR_RUNLOCK(ifp); - goto done; - } + if (error != 0) + break; } } IF_ADDR_RUNLOCK(ifp); + if (error != 0) + break; } -done: IFNET_RUNLOCK_NOSLEEP(); return (error); } From ba3eb10d85f675c9134b422cf455e1794dba321c Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Tue, 15 Nov 2016 20:05:22 +0000 Subject: [PATCH 099/204] [BHND] correct spelling error in macro name This commit is part of D6920 review. One of macro had wrong prefix: BMCA => BCMA Reviewed by: landonf, adrian (mentor) Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D6920 --- sys/dev/bhnd/bcma/bcma.c | 6 +++--- sys/dev/bhnd/bcma/bcma_dmp.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/bhnd/bcma/bcma.c b/sys/dev/bhnd/bcma/bcma.c index 08808955ba0..7b4be6cb61b 100644 --- a/sys/dev/bhnd/bcma/bcma.c +++ b/sys/dev/bhnd/bcma/bcma.c @@ -274,7 +274,7 @@ bcma_is_hw_suspended(device_t dev, device_t child) return (true); } - if (rst & BMCA_DMP_RC_RESET) + if (rst & BCMA_DMP_RC_RESET) return (true); /* Is core clocked? */ @@ -367,11 +367,11 @@ bcma_suspend_hw(device_t dev, device_t child) /* Already in reset? */ rst = bhnd_bus_read_4(r, BCMA_DMP_RESETCTRL); - if (rst & BMCA_DMP_RC_RESET) + if (rst & BCMA_DMP_RC_RESET) return (0); /* Put core into reset */ - if ((error = bcma_dmp_write_reset(child, dinfo, BMCA_DMP_RC_RESET))) + if ((error = bcma_dmp_write_reset(child, dinfo, BCMA_DMP_RC_RESET))) return (error); /* Clear core flags */ diff --git a/sys/dev/bhnd/bcma/bcma_dmp.h b/sys/dev/bhnd/bcma/bcma_dmp.h index 0fd41a7a4f2..36f84f1388d 100644 --- a/sys/dev/bhnd/bcma/bcma_dmp.h +++ b/sys/dev/bhnd/bcma/bcma_dmp.h @@ -252,7 +252,7 @@ #define BCMA_DMP_IOST_MASK 0x0000FFFF /* resetctrl */ -#define BMCA_DMP_RC_RESET 0x00000001 +#define BCMA_DMP_RC_RESET 0x00000001 /* config */ #define BCMA_DMP_CFG_OOB 0x00000020 From d933e97f9d7c919e68dc6aca4a6819a13ab3fbbf Mon Sep 17 00:00:00 2001 From: Stephen Hurd Date: Tue, 15 Nov 2016 20:35:29 +0000 Subject: [PATCH 100/204] New driver for Broadcom NetXtreme-C and NetXtreme-E devices. This driver uses the iflib framework supporting Broadcom 25/50Gbps devices. Reviewed by: gallatin, wblock Approved by: davidch MFC after: 2 weeks Relnotes: yes Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D7551 --- share/man/man4/Makefile | 2 + share/man/man4/bnxt.4 | 222 + sys/boot/forth/loader.conf | 1 + sys/conf/NOTES | 2 + sys/conf/files | 4 + sys/dev/bnxt/bnxt.h | 568 ++ sys/dev/bnxt/bnxt_hwrm.c | 1485 +++ sys/dev/bnxt/bnxt_hwrm.h | 102 + sys/dev/bnxt/bnxt_ioctl.h | 192 + sys/dev/bnxt/bnxt_sysctl.c | 618 ++ sys/dev/bnxt/bnxt_sysctl.h | 41 + sys/dev/bnxt/bnxt_txrx.c | 641 ++ sys/dev/bnxt/convert_hsi.pl | 356 + sys/dev/bnxt/hsi_struct_def.h | 17576 ++++++++++++++++++++++++++++++++ sys/dev/bnxt/if_bnxt.c | 2358 +++++ sys/modules/Makefile | 1 + sys/modules/bnxt/Makefile | 14 + 17 files changed, 24183 insertions(+) create mode 100644 share/man/man4/bnxt.4 create mode 100644 sys/dev/bnxt/bnxt.h create mode 100644 sys/dev/bnxt/bnxt_hwrm.c create mode 100644 sys/dev/bnxt/bnxt_hwrm.h create mode 100644 sys/dev/bnxt/bnxt_ioctl.h create mode 100644 sys/dev/bnxt/bnxt_sysctl.c create mode 100644 sys/dev/bnxt/bnxt_sysctl.h create mode 100644 sys/dev/bnxt/bnxt_txrx.c create mode 100755 sys/dev/bnxt/convert_hsi.pl create mode 100644 sys/dev/bnxt/hsi_struct_def.h create mode 100644 sys/dev/bnxt/if_bnxt.c create mode 100644 sys/modules/bnxt/Makefile diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 1b52dce6d3e..35438324165 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -79,6 +79,7 @@ MAN= aac.4 \ bhndb.4 \ bktr.4 \ blackhole.4 \ + bnxt.4 \ bpf.4 \ bridge.4 \ bt.4 \ @@ -592,6 +593,7 @@ MLINKS+=bce.4 if_bce.4 MLINKS+=bfe.4 if_bfe.4 MLINKS+=bge.4 if_bge.4 MLINKS+=bktr.4 brooktree.4 +MLINKS+=bnxt.4 if_bnxt.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 MLINKS+=bwn.4 if_bwn.4 diff --git a/share/man/man4/bnxt.4 b/share/man/man4/bnxt.4 new file mode 100644 index 00000000000..00268b14250 --- /dev/null +++ b/share/man/man4/bnxt.4 @@ -0,0 +1,222 @@ +.\" Copyright (c) 2016 Broadcom, All Rights Reserved. +.\" The term Broadcom refers to Broadcom Limited and/or its subsidiaries +.\" +.\" 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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$ +.\" +.Dd May 12, 2016 +.Dt BNXT 4 +.Os +.Sh NAME +.Nm bnxt +.Nd "Broadcom NetXtreme-C/NetXtreme-E Family Ethernet driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device bnxt" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_bnxt_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for various NICs based on the Broadcom BCM57301/2/4, +and BCM57402/4/6 Ethernet controller chips. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for various NICs based on the Broadcom NetXtreme-C and +NetXtreme-E families of Gigabit Ethernet controller chips, including the +following: +.Pp +.Bl -bullet -compact +.It +Broadcom BCM57301 NetXtreme-C 10Gb Ethernet Controller +.It +Broadcom BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller +.It +Broadcom BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller +.It +Broadcom BCM57402 NetXtreme-E 10Gb Ethernet Controller +.It +Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller +.It +Broadcom BCM57406 NetXtreme-E 10GBase-T Ethernet Controller +.It +Broadcom BCM57402 NetXtreme-E Partition +.It +Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet Controller +.It +Broadcom BCM57404 NetXtreme-E Partition +.It +Broadcom BCM57406 NetXtreme-E Partition +.It +Broadcom BCM57407 NetXtreme-E 25Gb Ethernet Controller +.It +Broadcom BCM57304 NetXtreme-C Virtual Function +.It +Broadcom BCM57404 NetXtreme-E Virtual Function +.El +.Sh SYSCTL VARIABLES +These variables must be set before loading the driver, either via +.Xr loader.conf 5 +or through the use of +.Xr kenv 1 . +These are provided by the +.Xr iflib 9 +framework, and might be better documented there. +.Bl -tag -width indent +.It Va dev.bnxt.X.iflib.override_nrxds +Override the number of RX descriptors for each queue. +The value is a comma separated list of three positive integers: the size of the +completion ring, +the size of the receive ring, and the size of the aggregation ring respectively. +The completion ring should be at least the size of the aggregation ring plus +four times the size of the receive ring. +These numbers must be powers of two, and zero means to use the default. +Defaults to 0,0,0. +.It Va dev.bnxt.X.iflib.override_ntxds +Override the number of TX descriptors for each queue. +The value is a comma separated list of two positive integers: the size of the +completion ring, and the size of the transmit ring respectively. +The completion ring should be at least twice the size of the transmit ring. +These numbers must be powers of two, and zero means to use the default. +Defaults to 0,0. +.It Va override_qs_enable +When set, allows the number of transmit and receive queues to be different. +If not set, the lower of the number of TX or RX queues will be used for both. +.It Va override_nrxqs +Set the number of RX queues. +If zero, the number of RX queues is derived from the number of cores on the +socket connected to the controller. +Defaults to 0. +.It Va override_ntxqs +Set the number of TX queues. +If zero, the number of TX queues is derived from the number of cores on the +socket connected to the controller. +.El +.Pp +These +.Xr sysctl 8 +variables can be changed at any time: +.Bl -tag -width indent +.It Va dev.bnxt.X.vlan_only +Require that incoming frames must have a VLAN tag on them that matches one that +is configured for the NIC. +Normally, both frames that have a matching VLAN tag and frames that have no +VLAN tag are accepted. +Defaults to 0. +.It Va dev.bnxt.X.vlan_strip +When non-zero the NIC strips VLAN tags on receive. +Defaults to 0. +.It Va dev.bnxt.X.rx_stall +Enable buffering rather than dropping frames when there are no available host +RX buffers for DMA. +Defaults to 0. +.It Va dev.bnxt.X.rss_type +Comma-separated list of RSS hash types to support. +Default is all types. +Defaults to ipv4,tcp_ipv4,udp_ipv4,ipv6,tcp_ipv6,udp_ipv6. +.It Va dev.bnxt.X.rss_key +Current RSS key. +Defaults to a randomly generated value which is generated for each device +during attach. +.It Va dev.bnxt.X.ver.hwrm_min_ver +Minimum HWRM (HardWare Resource Manager) firmware API to support. +If the firmware implements an older version, a warning will be printed, and the +firmware should be upgraded. +Defaults to 1.2.2. +.El +.Pp +These +.Xr sysctl 8 +variables are read-only: +.Bl -tag -width indent +.It Va dev.bnxt.X.if_name +Current interface name of the device. +This will normally be +.Va bnxtX , +but this can be changed using +.Cm ifconfig name . +This sysctl allows correlating an interface with a child of dev.bnxt. +.It Va dev.bnxt.X.nvram.* +Information about the NVRAM device which contains the device firmware. +.It Va dev.bnxt.X.ver.* +Version-related information about the device and firmware: +.It Va dev.bnxt.X.ver.hwrm_if +Supported HWRM API version of the currently running firmware. +.It Va dev.bnxt.X.ver.driver_hwrm_if +HWRM API version the driver was built to support. +.It Va dev.bnxt.X.hwstats.* +Per-queue statistics tracked by the hardware. +.It Va dev.bnxt.X.hwstats.rxq0.drop_pkts +Number of packets dropped by hardware on queue zero. +This number might seem high, but the count includes packets dropped due to +incorrect destination MAC, unsubscribed multicast address, and other normal +reasons to ignore Ethernet frames. +.El +.Sh DIAGNOSTICS +.Bl -diag +.It "bnxt%d: %s command returned %s error." +Device firmware rejected a command from the driver. +There might be a driver/firmware HWRM API mismatch. +.It "bnxt%d: Timeout sending %s (timeout: %d) seq %d\n" +Device firmware unresponsive. +A PCI device reset is likely needed. +.It "bnxt%d: Timeout sending %s (timeout: %d) msg {0x%x 0x%x} len:%d v: %d\n" +Partial firmware response. +A PCI device reset is likely needed. +.Pp +As of this writing, the system must be rebooted to initiate a PCI device reset. +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 , +.Xr iflib 4 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Jack Vogel Aq Mt jfvogel@gmail.com . +and is currently maintained by +.An Stephen Hurd Aq Mt stephen.hurd@broadcom.com . diff --git a/sys/boot/forth/loader.conf b/sys/boot/forth/loader.conf index 69a4fcde213..d17d33580db 100644 --- a/sys/boot/forth/loader.conf +++ b/sys/boot/forth/loader.conf @@ -312,6 +312,7 @@ if_axe_load="NO" # ASIX Electronics AX88172 USB Ethernet if_bce_load="NO" # Broadcom NetXtreme II Gigabit Ethernet if_bfe_load="NO" # Broadcom BCM4401 if_bge_load="NO" # Broadcom BCM570x PCI Gigabit Ethernet +if_bnxt_load="NO" # Broadcom NetXtreme-C/NetXtreme-E if_bridge_load="NO" # if_bridge(4) devices if_bwi_load="NO" # Broadcom BCM53xx IEEE 802.11b/g wireness NICs if_bwn_load="NO" # Broadcom BCM43xx IEEE 802.11 wireless NICs diff --git a/sys/conf/NOTES b/sys/conf/NOTES index f964d256a61..ebb7d424545 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1903,6 +1903,7 @@ device amphy # AMD AM79c873 / Davicom DM910{1,2} device atphy # Attansic/Atheros F1 device axphy # Asix Semiconductor AX88x9x device bmtphy # Broadcom BCM5201/BCM5202 and 3Com 3c905C +device bnxt # Broadcom NetXtreme-C/NetXtreme-E device brgphy # Broadcom BCM54xx/57xx 1000baseTX device ciphy # Cicada/Vitesse CS/VSC8xxx device e1000phy # Marvell 88E1000 1000/100/10-BT @@ -1943,6 +1944,7 @@ device xmphy # XaQti XMAC II # BCM570x family of controllers, including the 3Com 3c996-T, # the Netgear GA302T, the SysKonnect SK-9D21 and SK-9D41, and # the embedded gigE NICs on Dell PowerEdge 2550 servers. +# bnxt: Broadcom NetXtreme-C and NetXtreme-E PCIe 10/25/50G Ethernet adapters. # bxe: Broadcom NetXtreme II (BCM5771X/BCM578XX) PCIe 10Gb Ethernet # adapters. # bwi: Broadcom BCM430* and BCM431* family of wireless adapters. diff --git a/sys/conf/files b/sys/conf/files index 88760066eba..c21463ab7a1 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1242,6 +1242,10 @@ dev/bktr/bktr_i2c.c optional bktr pci smbus dev/bktr/bktr_os.c optional bktr pci dev/bktr/bktr_tuner.c optional bktr pci dev/bktr/msp34xx.c optional bktr pci +dev/bnxt/bnxt_hwrm.c optional bnxt iflib pci +dev/bnxt/bnxt_sysctl.c optional bnxt iflib pci +dev/bnxt/bnxt_txrx.c optional bnxt iflib pci +dev/bnxt/if_bnxt.c optional bnxt iflib pci dev/buslogic/bt.c optional bt dev/buslogic/bt_eisa.c optional bt eisa dev/buslogic/bt_isa.c optional bt isa diff --git a/sys/dev/bnxt/bnxt.h b/sys/dev/bnxt/bnxt.h new file mode 100644 index 00000000000..dee88885e8a --- /dev/null +++ b/sys/dev/bnxt/bnxt.h @@ -0,0 +1,568 @@ +/*- + * Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2016 Broadcom, All Rights Reserved. + * The term Broadcom refers to Broadcom Limited and/or its subsidiaries + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 +__FBSDID("$FreeBSD$"); + +#ifndef _BNXT_H +#define _BNXT_H + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "hsi_struct_def.h" + +/* PCI IDs */ +#define BROADCOM_VENDOR_ID 0x14E4 + +#define BCM57301 0x16c8 +#define BCM57302 0x16c9 +#define BCM57304 0x16ca +#define BCM57402 0x16d0 +#define BCM57404 0x16d1 +#define BCM57406 0x16d2 +#define BCM57402_NPAR 0x16d4 +#define BCM57407 0x16d5 +#define BCM57404_NPAR 0x16e7 +#define BCM57406_NPAR 0x16e8 +#define BCM57407_SFP 0x16e9 +#define BCM57304_VF 0x16cb +#define BCM57404_VF 0x16d3 + +#define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ + CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ + CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP) + +#define BNXT_MAX_MTU 9000 + +/* Completion related defines */ +#define CMP_VALID(cmp, v_bit) \ + ((!!(((struct cmpl_base *)(cmp))->info3_v & htole32(CMPL_BASE_V))) == !!(v_bit) ) + +#define NEXT_CP_CONS_V(ring, cons, v_bit) do { \ + if (__predict_false(++(cons) == (ring)->ring_size)) \ + ((cons) = 0, (v_bit) = !v_bit); \ +} while (0) + +#define RING_NEXT(ring, idx) (__predict_false(idx + 1 == (ring)->ring_size) ? \ + 0 : idx + 1) + +#define CMPL_PREFETCH_NEXT(cpr, idx) \ + __builtin_prefetch(&((struct cmpl_base *)(cpr)->ring.vaddr)[((idx) +\ + (CACHE_LINE_SIZE / sizeof(struct cmpl_base))) & \ + ((cpr)->ring.ring_size - 1)]) + +/* + * If we update the index, a write barrier is needed after the write to ensure + * the completion ring has space before the RX/TX ring does. Since we can't + * make the RX and AG doorbells covered by the same barrier without remapping + * MSI-X vectors, we create the barrier over the enture doorbell bar. + * TODO: Remap the MSI-X vectors to allow a barrier to only cover the doorbells + * for a single ring group. + * + * A barrier of just the size of the write is used to ensure the ordering + * remains correct and no writes are lost. + */ +#define BNXT_CP_DISABLE_DB(ring) do { \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, 4, \ + BUS_SPACE_BARRIER_WRITE); \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, 0, \ + (ring)->softc->doorbell_bar.size, BUS_SPACE_BARRIER_WRITE); \ + bus_space_write_4((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, \ + htole32(CMPL_DOORBELL_KEY_CMPL | CMPL_DOORBELL_MASK)); \ +} while (0) + +#define BNXT_CP_ENABLE_DB(ring) do { \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, 4, \ + BUS_SPACE_BARRIER_WRITE); \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, 0, \ + (ring)->softc->doorbell_bar.size, BUS_SPACE_BARRIER_WRITE); \ + bus_space_write_4((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, \ + htole32(CMPL_DOORBELL_KEY_CMPL)); \ +} while (0) + +#define BNXT_CP_IDX_ENABLE_DB(ring, cons) do { \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, 4, \ + BUS_SPACE_BARRIER_WRITE); \ + bus_space_write_4((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, \ + htole32(CMPL_DOORBELL_KEY_CMPL | CMPL_DOORBELL_IDX_VALID | \ + (cons))); \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, 0, \ + (ring)->softc->doorbell_bar.size, BUS_SPACE_BARRIER_WRITE); \ +} while (0) + +#define BNXT_CP_IDX_DISABLE_DB(ring, cons) do { \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, 4, \ + BUS_SPACE_BARRIER_WRITE); \ + bus_space_write_4((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, \ + htole32(CMPL_DOORBELL_KEY_CMPL | CMPL_DOORBELL_IDX_VALID | \ + CMPL_DOORBELL_MASK | (cons))); \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, 0, \ + (ring)->softc->doorbell_bar.size, BUS_SPACE_BARRIER_WRITE); \ +} while (0) + +#define BNXT_TX_DB(ring, idx) do { \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, 4, \ + BUS_SPACE_BARRIER_WRITE); \ + bus_space_write_4( \ + (ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, \ + (ring)->doorbell, htole32(TX_DOORBELL_KEY_TX | (idx))); \ +} while (0) + +#define BNXT_RX_DB(ring, idx) do { \ + bus_space_barrier((ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, (ring)->doorbell, 4, \ + BUS_SPACE_BARRIER_WRITE); \ + bus_space_write_4( \ + (ring)->softc->doorbell_bar.tag, \ + (ring)->softc->doorbell_bar.handle, \ + (ring)->doorbell, htole32(RX_DOORBELL_KEY_RX | (idx))); \ +} while (0) + +/* Lock macros */ +#define BNXT_HWRM_LOCK_INIT(_softc, _name) \ + mtx_init(&(_softc)->hwrm_lock, _name, "BNXT HWRM Lock", MTX_DEF) +#define BNXT_HWRM_LOCK(_softc) mtx_lock(&(_softc)->hwrm_lock) +#define BNXT_HWRM_UNLOCK(_softc) mtx_unlock(&(_softc)->hwrm_lock) +#define BNXT_HWRM_LOCK_DESTROY(_softc) mtx_destroy(&(_softc)->hwrm_lock) +#define BNXT_HWRM_LOCK_ASSERT(_softc) mtx_assert(&(_softc)->hwrm_lock, \ + MA_OWNED) + +/* Chip info */ +#define BNXT_TSO_SIZE UINT16_MAX + +/* NVRAM access */ +enum bnxt_nvm_directory_type { + BNX_DIR_TYPE_UNUSED = 0, + BNX_DIR_TYPE_PKG_LOG = 1, + BNX_DIR_TYPE_UPDATE = 2, + BNX_DIR_TYPE_CHIMP_PATCH = 3, + BNX_DIR_TYPE_BOOTCODE = 4, + BNX_DIR_TYPE_VPD = 5, + BNX_DIR_TYPE_EXP_ROM_MBA = 6, + BNX_DIR_TYPE_AVS = 7, + BNX_DIR_TYPE_PCIE = 8, + BNX_DIR_TYPE_PORT_MACRO = 9, + BNX_DIR_TYPE_APE_FW = 10, + BNX_DIR_TYPE_APE_PATCH = 11, + BNX_DIR_TYPE_KONG_FW = 12, + BNX_DIR_TYPE_KONG_PATCH = 13, + BNX_DIR_TYPE_BONO_FW = 14, + BNX_DIR_TYPE_BONO_PATCH = 15, + BNX_DIR_TYPE_TANG_FW = 16, + BNX_DIR_TYPE_TANG_PATCH = 17, + BNX_DIR_TYPE_BOOTCODE_2 = 18, + BNX_DIR_TYPE_CCM = 19, + BNX_DIR_TYPE_PCI_CFG = 20, + BNX_DIR_TYPE_TSCF_UCODE = 21, + BNX_DIR_TYPE_ISCSI_BOOT = 22, + BNX_DIR_TYPE_ISCSI_BOOT_IPV6 = 24, + BNX_DIR_TYPE_ISCSI_BOOT_IPV4N6 = 25, + BNX_DIR_TYPE_ISCSI_BOOT_CFG6 = 26, + BNX_DIR_TYPE_EXT_PHY = 27, + BNX_DIR_TYPE_SHARED_CFG = 40, + BNX_DIR_TYPE_PORT_CFG = 41, + BNX_DIR_TYPE_FUNC_CFG = 42, + BNX_DIR_TYPE_MGMT_CFG = 48, + BNX_DIR_TYPE_MGMT_DATA = 49, + BNX_DIR_TYPE_MGMT_WEB_DATA = 50, + BNX_DIR_TYPE_MGMT_WEB_META = 51, + BNX_DIR_TYPE_MGMT_EVENT_LOG = 52, + BNX_DIR_TYPE_MGMT_AUDIT_LOG = 53 +}; + +enum bnxnvm_pkglog_field_index { + BNX_PKG_LOG_FIELD_IDX_INSTALLED_TIMESTAMP = 0, + BNX_PKG_LOG_FIELD_IDX_PKG_DESCRIPTION = 1, + BNX_PKG_LOG_FIELD_IDX_PKG_VERSION = 2, + BNX_PKG_LOG_FIELD_IDX_PKG_TIMESTAMP = 3, + BNX_PKG_LOG_FIELD_IDX_PKG_CHECKSUM = 4, + BNX_PKG_LOG_FIELD_IDX_INSTALLED_ITEMS = 5, + BNX_PKG_LOG_FIELD_IDX_INSTALLED_MASK = 6 +}; + +#define BNX_DIR_ORDINAL_FIRST 0 +#define BNX_DIR_EXT_NONE 0 + +struct bnxt_bar_info { + struct resource *res; + bus_space_tag_t tag; + bus_space_handle_t handle; + bus_size_t size; + int rid; +}; + +struct bnxt_link_info { + uint8_t media_type; + uint8_t transceiver; + uint8_t phy_addr; + uint8_t phy_link_status; + uint8_t wire_speed; + uint8_t loop_back; + uint8_t link_up; + uint8_t last_link_up; + uint8_t duplex; + uint8_t last_duplex; + uint8_t pause; + uint8_t last_pause; + uint8_t auto_pause; + uint8_t force_pause; + uint8_t duplex_setting; + uint8_t auto_mode; +#define PHY_VER_LEN 3 + uint8_t phy_ver[PHY_VER_LEN]; + uint8_t phy_type; + uint16_t link_speed; + uint16_t support_speeds; + uint16_t auto_link_speeds; + uint16_t auto_link_speed; + uint16_t force_link_speed; + uint32_t preemphasis; + + /* copy of requested setting */ + uint8_t autoneg; +#define BNXT_AUTONEG_SPEED 1 +#define BNXT_AUTONEG_FLOW_CTRL 2 + uint8_t req_duplex; + uint8_t req_flow_ctrl; + uint16_t req_link_speed; +}; + +enum bnxt_cp_type { + BNXT_DEFAULT, + BNXT_TX, + BNXT_RX, + BNXT_SHARED +}; + +struct bnxt_cos_queue { + uint8_t id; + uint8_t profile; +}; + +struct bnxt_func_info { + uint32_t fw_fid; + uint8_t mac_addr[ETHER_ADDR_LEN]; + uint16_t max_rsscos_ctxs; + uint16_t max_cp_rings; + uint16_t max_tx_rings; + uint16_t max_rx_rings; + uint16_t max_hw_ring_grps; + uint16_t max_irqs; + uint16_t max_l2_ctxs; + uint16_t max_vnics; + uint16_t max_stat_ctxs; +}; + +struct bnxt_pf_info { +#define BNXT_FIRST_PF_FID 1 +#define BNXT_FIRST_VF_FID 128 + uint8_t port_id; + uint32_t first_vf_id; + uint16_t active_vfs; + uint16_t max_vfs; + uint32_t max_encap_records; + uint32_t max_decap_records; + uint32_t max_tx_em_flows; + uint32_t max_tx_wm_flows; + uint32_t max_rx_em_flows; + uint32_t max_rx_wm_flows; + unsigned long *vf_event_bmap; + uint16_t hwrm_cmd_req_pages; + void *hwrm_cmd_req_addr[4]; + bus_addr_t hwrm_cmd_req_dma_addr[4]; +}; + +struct bnxt_vf_info { + uint16_t fw_fid; + uint8_t mac_addr[ETHER_ADDR_LEN]; + uint16_t max_rsscos_ctxs; + uint16_t max_cp_rings; + uint16_t max_tx_rings; + uint16_t max_rx_rings; + uint16_t max_hw_ring_grps; + uint16_t max_l2_ctxs; + uint16_t max_irqs; + uint16_t max_vnics; + uint16_t max_stat_ctxs; + uint32_t vlan; +#define BNXT_VF_QOS 0x1 +#define BNXT_VF_SPOOFCHK 0x2 +#define BNXT_VF_LINK_FORCED 0x4 +#define BNXT_VF_LINK_UP 0x8 + uint32_t flags; + uint32_t func_flags; /* func cfg flags */ + uint32_t min_tx_rate; + uint32_t max_tx_rate; + void *hwrm_cmd_req_addr; + bus_addr_t hwrm_cmd_req_dma_addr; +}; + +#define BNXT_FLAG_VF (1<<1) + +#define BNXT_PF(softc) (!((softc)->flags & BNXT_FLAG_VF)) +#define BNXT_VF(softc) ((softc)->flags & BNXT_FLAG_VF) + +struct bnxt_vlan_tag { + SLIST_ENTRY(bnxt_vlan_tag) next; + uint16_t tpid; + uint16_t tag; +}; + +struct bnxt_vnic_info { + uint16_t id; + uint16_t def_ring_grp; + uint16_t cos_rule; + uint16_t lb_rule; + uint16_t mru; + + uint32_t rx_mask; + bool vlan_only; + struct iflib_dma_info mc_list; + int mc_list_count; +#define BNXT_MAX_MC_ADDRS 16 + + uint32_t flags; +#define BNXT_VNIC_FLAG_DEFAULT 0x01 +#define BNXT_VNIC_FLAG_BD_STALL 0x02 +#define BNXT_VNIC_FLAG_VLAN_STRIP 0x04 + + uint64_t filter_id; + uint32_t flow_id; + + uint16_t rss_id; + uint32_t rss_hash_type; + uint8_t rss_hash_key[HW_HASH_KEY_SIZE]; + struct iflib_dma_info rss_hash_key_tbl; + struct iflib_dma_info rss_grp_tbl; + SLIST_HEAD(vlan_head, bnxt_vlan_tag) vlan_tags; + struct iflib_dma_info vlan_tag_list; +}; + +struct bnxt_grp_info { + uint16_t stats_ctx; + uint16_t grp_id; + uint16_t rx_ring_id; + uint16_t cp_ring_id; + uint16_t ag_ring_id; +}; + +struct bnxt_ring { + uint64_t paddr; + vm_offset_t doorbell; + caddr_t vaddr; + struct bnxt_softc *softc; + uint32_t ring_size; /* Must be a power of two */ + uint16_t id; /* Logical ID */ + uint16_t phys_id; +}; + +struct bnxt_cp_ring { + struct bnxt_ring ring; + struct if_irq irq; + uint32_t cons; + bool v_bit; /* Value of valid bit */ + struct ctx_hw_stats *stats; + uint32_t stats_ctx_id; + uint32_t last_idx; /* Used by RX rings only + * set to the last read pidx + */ +}; + +struct bnxt_full_tpa_start { + struct rx_tpa_start_cmpl low; + struct rx_tpa_start_cmpl_hi high; +}; + +/* All the version information for the part */ +#define BNXT_VERSTR_SIZE (3*3+2+1) /* ie: "255.255.255\0" */ +#define BNXT_NAME_SIZE 17 +struct bnxt_ver_info { + uint8_t hwrm_if_major; + uint8_t hwrm_if_minor; + uint8_t hwrm_if_update; + char hwrm_if_ver[BNXT_VERSTR_SIZE]; + char driver_hwrm_if_ver[BNXT_VERSTR_SIZE]; + char hwrm_fw_ver[BNXT_VERSTR_SIZE]; + char mgmt_fw_ver[BNXT_VERSTR_SIZE]; + char netctrl_fw_ver[BNXT_VERSTR_SIZE]; + char roce_fw_ver[BNXT_VERSTR_SIZE]; + char phy_ver[BNXT_VERSTR_SIZE]; + char pkg_ver[64]; + + char hwrm_fw_name[BNXT_NAME_SIZE]; + char mgmt_fw_name[BNXT_NAME_SIZE]; + char netctrl_fw_name[BNXT_NAME_SIZE]; + char roce_fw_name[BNXT_NAME_SIZE]; + char phy_vendor[BNXT_NAME_SIZE]; + char phy_partnumber[BNXT_NAME_SIZE]; + + uint16_t chip_num; + uint8_t chip_rev; + uint8_t chip_metal; + uint8_t chip_bond_id; + uint8_t chip_type; + + uint8_t hwrm_min_major; + uint8_t hwrm_min_minor; + uint8_t hwrm_min_update; + + struct sysctl_ctx_list ver_ctx; + struct sysctl_oid *ver_oid; +}; + +struct bnxt_nvram_info { + uint16_t mfg_id; + uint16_t device_id; + uint32_t sector_size; + uint32_t size; + uint32_t reserved_size; + uint32_t available_size; + + struct sysctl_ctx_list nvm_ctx; + struct sysctl_oid *nvm_oid; +}; + +struct bnxt_softc { + device_t dev; + if_ctx_t ctx; + if_softc_ctx_t scctx; + if_shared_ctx_t sctx; + struct ifmedia *media; + + struct bnxt_bar_info hwrm_bar; + struct bnxt_bar_info doorbell_bar; + struct bnxt_link_info link_info; +#define BNXT_FLAG_NPAR 1 + uint32_t flags; + uint32_t total_msix; + + struct bnxt_func_info func; + struct bnxt_pf_info pf; + struct bnxt_vf_info vf; + + uint16_t hwrm_cmd_seq; + uint32_t hwrm_cmd_timeo; /* milliseconds */ + struct iflib_dma_info hwrm_cmd_resp; + /* Interrupt info for HWRM */ + struct if_irq irq; + struct mtx hwrm_lock; + uint16_t hwrm_max_req_len; + +#define BNXT_MAX_QUEUE 8 + uint8_t max_tc; + struct bnxt_cos_queue q_info[BNXT_MAX_QUEUE]; + + struct iflib_dma_info hw_rx_port_stats; + struct iflib_dma_info hw_tx_port_stats; + struct rx_port_stats *rx_port_stats; + struct tx_port_stats *tx_port_stats; + + int num_cp_rings; + + struct bnxt_ring *tx_rings; + struct bnxt_cp_ring *tx_cp_rings; + struct iflib_dma_info tx_stats; + int ntxqsets; + + struct bnxt_vnic_info vnic_info; + struct bnxt_ring *ag_rings; + struct bnxt_ring *rx_rings; + struct bnxt_cp_ring *rx_cp_rings; + struct bnxt_grp_info *grp_info; + struct iflib_dma_info rx_stats; + int nrxqsets; + + struct bnxt_cp_ring def_cp_ring; + struct iflib_dma_info def_cp_ring_mem; + struct grouptask def_cp_task; + + struct sysctl_ctx_list hw_stats; + struct sysctl_oid *hw_stats_oid; + + struct bnxt_full_tpa_start *tpa_start; + struct bnxt_ver_info *ver_info; + struct bnxt_nvram_info *nvm_info; +}; + +struct bnxt_filter_info { + STAILQ_ENTRY(bnxt_filter_info) next; + uint64_t fw_l2_filter_id; +#define INVALID_MAC_INDEX ((uint16_t)-1) + uint16_t mac_index; + + /* Filter Characteristics */ + uint32_t flags; + uint32_t enables; + uint8_t l2_addr[ETHER_ADDR_LEN]; + uint8_t l2_addr_mask[ETHER_ADDR_LEN]; + uint16_t l2_ovlan; + uint16_t l2_ovlan_mask; + uint16_t l2_ivlan; + uint16_t l2_ivlan_mask; + uint8_t t_l2_addr[ETHER_ADDR_LEN]; + uint8_t t_l2_addr_mask[ETHER_ADDR_LEN]; + uint16_t t_l2_ovlan; + uint16_t t_l2_ovlan_mask; + uint16_t t_l2_ivlan; + uint16_t t_l2_ivlan_mask; + uint8_t tunnel_type; + uint16_t mirror_vnic_id; + uint32_t vni; + uint8_t pri_hint; + uint64_t l2_filter_id_hint; +}; + +/* Function declarations */ +void bnxt_report_link(struct bnxt_softc *softc); +bool bnxt_check_hwrm_version(struct bnxt_softc *softc); + +#endif /* _BNXT_H */ diff --git a/sys/dev/bnxt/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_hwrm.c new file mode 100644 index 00000000000..53f880731c6 --- /dev/null +++ b/sys/dev/bnxt/bnxt_hwrm.c @@ -0,0 +1,1485 @@ +/*- + * Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2016 Broadcom, All Rights Reserved. + * The term Broadcom refers to Broadcom Limited and/or its subsidiaries + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 +__FBSDID("$FreeBSD$"); + +#include + +#include "bnxt.h" +#include "bnxt_hwrm.h" +#include "hsi_struct_def.h" + +static int bnxt_hwrm_err_map(uint16_t err); +static inline int _is_valid_ether_addr(uint8_t *); +static inline void get_random_ether_addr(uint8_t *); +static void bnxt_hwrm_set_link_common(struct bnxt_softc *softc, + struct hwrm_port_phy_cfg_input *req); +static void bnxt_hwrm_set_pause_common(struct bnxt_softc *softc, + struct hwrm_port_phy_cfg_input *req); +static void bnxt_hwrm_set_eee(struct bnxt_softc *softc, + struct hwrm_port_phy_cfg_input *req); +static int _hwrm_send_message(struct bnxt_softc *, void *, uint32_t); +static int hwrm_send_message(struct bnxt_softc *, void *, uint32_t); +static void bnxt_hwrm_cmd_hdr_init(struct bnxt_softc *, void *, uint16_t); + +/* NVRam stuff has a five minute timeout */ +#define BNXT_NVM_TIMEO (5 * 60 * 1000) + +static int +bnxt_hwrm_err_map(uint16_t err) +{ + int rc; + + switch (err) { + case HWRM_ERR_CODE_SUCCESS: + return 0; + case HWRM_ERR_CODE_INVALID_PARAMS: + case HWRM_ERR_CODE_INVALID_FLAGS: + case HWRM_ERR_CODE_INVALID_ENABLES: + return EINVAL; + case HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED: + return EACCES; + case HWRM_ERR_CODE_RESOURCE_ALLOC_ERROR: + return ENOMEM; + case HWRM_ERR_CODE_CMD_NOT_SUPPORTED: + return ENOSYS; + case HWRM_ERR_CODE_FAIL: + return EIO; + case HWRM_ERR_CODE_HWRM_ERROR: + case HWRM_ERR_CODE_UNKNOWN_ERR: + default: + return EDOOFUS; + } + + return rc; +} + +int +bnxt_alloc_hwrm_dma_mem(struct bnxt_softc *softc) +{ + int rc; + + rc = iflib_dma_alloc(softc->ctx, PAGE_SIZE, &softc->hwrm_cmd_resp, + BUS_DMA_NOWAIT); + return rc; +} + +void +bnxt_free_hwrm_dma_mem(struct bnxt_softc *softc) +{ + if (softc->hwrm_cmd_resp.idi_vaddr) + iflib_dma_free(&softc->hwrm_cmd_resp); + softc->hwrm_cmd_resp.idi_vaddr = NULL; + return; +} + +static void +bnxt_hwrm_cmd_hdr_init(struct bnxt_softc *softc, void *request, + uint16_t req_type) +{ + struct input *req = request; + + req->req_type = htole16(req_type); + req->cmpl_ring = 0xffff; + req->target_id = 0xffff; + req->resp_addr = htole64(softc->hwrm_cmd_resp.idi_paddr); +} + +static int +_hwrm_send_message(struct bnxt_softc *softc, void *msg, uint32_t msg_len) +{ + struct input *req = msg; + struct hwrm_err_output *resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; + uint32_t *data = msg; + int i; + uint16_t cp_ring_id; + uint8_t *valid; + uint16_t err; + + /* TODO: DMASYNC in here. */ + req->seq_id = htole16(softc->hwrm_cmd_seq++); + memset(resp, 0, PAGE_SIZE); + cp_ring_id = le16toh(req->cmpl_ring); + + /* Write request msg to hwrm channel */ + for (i = 0; i < msg_len; i += 4) { + bus_space_write_4(softc->hwrm_bar.tag, + softc->hwrm_bar.handle, + i, *data); + data++; + } + + /* Clear to the end of the request buffer */ + for (i = msg_len; i < HWRM_MAX_REQ_LEN; i += 4) + bus_space_write_4(softc->hwrm_bar.tag, softc->hwrm_bar.handle, + i, 0); + + /* Ring channel doorbell */ + bus_space_write_4(softc->hwrm_bar.tag, + softc->hwrm_bar.handle, + 0x100, htole32(1)); + + /* Check if response len is updated */ + for (i = 0; i < softc->hwrm_cmd_timeo; i++) { + if (resp->resp_len && resp->resp_len <= 4096) + break; + DELAY(1000); + } + if (i >= softc->hwrm_cmd_timeo) { + device_printf(softc->dev, + "Timeout sending %s: (timeout: %u) seq: %d\n", + GET_HWRM_REQ_TYPE(req->req_type), softc->hwrm_cmd_timeo, + le16toh(req->seq_id)); + return ETIMEDOUT; + } + /* Last byte of resp contains the valid key */ + valid = (uint8_t *)resp + resp->resp_len - 1; + for (i = 0; i < softc->hwrm_cmd_timeo; i++) { + if (*valid == HWRM_RESP_VALID_KEY) + break; + DELAY(1000); + } + if (i >= softc->hwrm_cmd_timeo) { + device_printf(softc->dev, "Timeout sending %s: " + "(timeout: %u) msg {0x%x 0x%x} len:%d v: %d\n", + GET_HWRM_REQ_TYPE(req->req_type), + softc->hwrm_cmd_timeo, le16toh(req->req_type), + le16toh(req->seq_id), msg_len, + *valid); + return ETIMEDOUT; + } + + err = le16toh(resp->error_code); + if (err) { + /* HWRM_ERR_CODE_FAIL is a "normal" error, don't log */ + if (err != HWRM_ERR_CODE_FAIL) { + device_printf(softc->dev, + "%s command returned %s error.\n", + GET_HWRM_REQ_TYPE(req->req_type), + GET_HWRM_ERROR_CODE(err)); + } + return bnxt_hwrm_err_map(err); + } + + return 0; +} + +static int +hwrm_send_message(struct bnxt_softc *softc, void *msg, uint32_t msg_len) +{ + int rc; + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, msg, msg_len); + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_queue_qportcfg(struct bnxt_softc *softc) +{ + struct hwrm_queue_qportcfg_input req = {0}; + struct hwrm_queue_qportcfg_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + + int rc = 0; + uint8_t *qptr; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_QUEUE_QPORTCFG); + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto qportcfg_exit; + + if (!resp->max_configurable_queues) { + rc = -EINVAL; + goto qportcfg_exit; + } + softc->max_tc = resp->max_configurable_queues; + if (softc->max_tc > BNXT_MAX_QUEUE) + softc->max_tc = BNXT_MAX_QUEUE; + + qptr = &resp->queue_id0; + for (int i = 0; i < softc->max_tc; i++) { + softc->q_info[i].id = *qptr++; + softc->q_info[i].profile = *qptr++; + } + +qportcfg_exit: + BNXT_HWRM_UNLOCK(softc); + return (rc); +} + + +int +bnxt_hwrm_ver_get(struct bnxt_softc *softc) +{ + struct hwrm_ver_get_input req = {0}; + struct hwrm_ver_get_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc; + const char nastr[] = ""; + const char naver[] = ""; + + softc->hwrm_max_req_len = HWRM_MAX_REQ_LEN; + softc->hwrm_cmd_timeo = 1000; + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VER_GET); + + req.hwrm_intf_maj = HWRM_VERSION_MAJOR; + req.hwrm_intf_min = HWRM_VERSION_MINOR; + req.hwrm_intf_upd = HWRM_VERSION_UPDATE; + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto fail; + + snprintf(softc->ver_info->hwrm_if_ver, BNXT_VERSTR_SIZE, "%d.%d.%d", + resp->hwrm_intf_maj, resp->hwrm_intf_min, resp->hwrm_intf_upd); + softc->ver_info->hwrm_if_major = resp->hwrm_intf_maj; + softc->ver_info->hwrm_if_minor = resp->hwrm_intf_min; + softc->ver_info->hwrm_if_update = resp->hwrm_intf_upd; + snprintf(softc->ver_info->hwrm_fw_ver, BNXT_VERSTR_SIZE, "%d.%d.%d", + resp->hwrm_fw_maj, resp->hwrm_fw_min, resp->hwrm_fw_bld); + strlcpy(softc->ver_info->driver_hwrm_if_ver, HWRM_VERSION_STR, + BNXT_VERSTR_SIZE); + strlcpy(softc->ver_info->hwrm_fw_name, resp->hwrm_fw_name, + BNXT_NAME_SIZE); + + if (resp->mgmt_fw_maj == 0 && resp->mgmt_fw_min == 0 && + resp->mgmt_fw_bld == 0) { + strlcpy(softc->ver_info->mgmt_fw_ver, naver, BNXT_VERSTR_SIZE); + strlcpy(softc->ver_info->mgmt_fw_name, nastr, BNXT_NAME_SIZE); + } + else { + snprintf(softc->ver_info->mgmt_fw_ver, BNXT_VERSTR_SIZE, + "%d.%d.%d", resp->mgmt_fw_maj, resp->mgmt_fw_min, + resp->mgmt_fw_bld); + strlcpy(softc->ver_info->mgmt_fw_name, resp->mgmt_fw_name, + BNXT_NAME_SIZE); + } + if (resp->netctrl_fw_maj == 0 && resp->netctrl_fw_min == 0 && + resp->netctrl_fw_bld == 0) { + strlcpy(softc->ver_info->netctrl_fw_ver, naver, + BNXT_VERSTR_SIZE); + strlcpy(softc->ver_info->netctrl_fw_name, nastr, + BNXT_NAME_SIZE); + } + else { + snprintf(softc->ver_info->netctrl_fw_ver, BNXT_VERSTR_SIZE, + "%d.%d.%d", resp->netctrl_fw_maj, resp->netctrl_fw_min, + resp->netctrl_fw_bld); + strlcpy(softc->ver_info->netctrl_fw_name, resp->netctrl_fw_name, + BNXT_NAME_SIZE); + } + if (resp->roce_fw_maj == 0 && resp->roce_fw_min == 0 && + resp->roce_fw_bld == 0) { + strlcpy(softc->ver_info->roce_fw_ver, naver, BNXT_VERSTR_SIZE); + strlcpy(softc->ver_info->roce_fw_name, nastr, BNXT_NAME_SIZE); + } + else { + snprintf(softc->ver_info->roce_fw_ver, BNXT_VERSTR_SIZE, + "%d.%d.%d", resp->roce_fw_maj, resp->roce_fw_min, + resp->roce_fw_bld); + strlcpy(softc->ver_info->roce_fw_name, resp->roce_fw_name, + BNXT_NAME_SIZE); + } + softc->ver_info->chip_num = le16toh(resp->chip_num); + softc->ver_info->chip_rev = resp->chip_rev; + softc->ver_info->chip_metal = resp->chip_metal; + softc->ver_info->chip_bond_id = resp->chip_bond_id; + softc->ver_info->chip_type = resp->chip_platform_type; + + if (resp->max_req_win_len) + softc->hwrm_max_req_len = le16toh(resp->max_req_win_len); + if (resp->def_req_timeout) + softc->hwrm_cmd_timeo = le16toh(resp->def_req_timeout); + +fail: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_func_drv_rgtr(struct bnxt_softc *softc) +{ + struct hwrm_func_drv_rgtr_input req = {0}; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_DRV_RGTR); + + req.enables = htole32(HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VER | + HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_OS_TYPE); + req.os_type = htole16(HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_FREEBSD); + + req.ver_maj = __FreeBSD_version / 100000; + req.ver_min = (__FreeBSD_version / 1000) % 100; + req.ver_upd = (__FreeBSD_version / 100) % 10; + + return hwrm_send_message(softc, &req, sizeof(req)); +} + + +int +bnxt_hwrm_func_drv_unrgtr(struct bnxt_softc *softc, bool shutdown) +{ + struct hwrm_func_drv_unrgtr_input req = {0}; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_DRV_UNRGTR); + if (shutdown == true) + req.flags |= + HWRM_FUNC_DRV_UNRGTR_INPUT_FLAGS_PREPARE_FOR_SHUTDOWN; + return hwrm_send_message(softc, &req, sizeof(req)); +} + + +static inline int +_is_valid_ether_addr(uint8_t *addr) +{ + char zero_addr[6] = { 0, 0, 0, 0, 0, 0 }; + + if ((addr[0] & 1) || (!bcmp(addr, zero_addr, ETHER_ADDR_LEN))) + return (FALSE); + + return (TRUE); +} + +static inline void +get_random_ether_addr(uint8_t *addr) +{ + uint8_t temp[ETHER_ADDR_LEN]; + + arc4rand(&temp, sizeof(temp), 0); + temp[0] &= 0xFE; + temp[0] |= 0x02; + bcopy(temp, addr, sizeof(temp)); +} + +int +bnxt_hwrm_func_qcaps(struct bnxt_softc *softc) +{ + int rc = 0; + struct hwrm_func_qcaps_input req = {0}; + struct hwrm_func_qcaps_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + struct bnxt_func_info *func = &softc->func; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_QCAPS); + req.fid = htole16(0xffff); + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto fail; + + func->fw_fid = le16toh(resp->fid); + memcpy(func->mac_addr, resp->mac_address, ETHER_ADDR_LEN); + func->max_rsscos_ctxs = le16toh(resp->max_rsscos_ctx); + func->max_cp_rings = le16toh(resp->max_cmpl_rings); + func->max_tx_rings = le16toh(resp->max_tx_rings); + func->max_rx_rings = le16toh(resp->max_rx_rings); + func->max_hw_ring_grps = le32toh(resp->max_hw_ring_grps); + if (!func->max_hw_ring_grps) + func->max_hw_ring_grps = func->max_tx_rings; + func->max_l2_ctxs = le16toh(resp->max_l2_ctxs); + func->max_vnics = le16toh(resp->max_vnics); + func->max_stat_ctxs = le16toh(resp->max_stat_ctx); + if (BNXT_PF(softc)) { + struct bnxt_pf_info *pf = &softc->pf; + + pf->port_id = le16toh(resp->port_id); + pf->first_vf_id = le16toh(resp->first_vf_id); + pf->max_vfs = le16toh(resp->max_vfs); + pf->max_encap_records = le32toh(resp->max_encap_records); + pf->max_decap_records = le32toh(resp->max_decap_records); + pf->max_tx_em_flows = le32toh(resp->max_tx_em_flows); + pf->max_tx_wm_flows = le32toh(resp->max_tx_wm_flows); + pf->max_rx_em_flows = le32toh(resp->max_rx_em_flows); + pf->max_rx_wm_flows = le32toh(resp->max_rx_wm_flows); + } + if (!_is_valid_ether_addr(func->mac_addr)) { + device_printf(softc->dev, "Invalid ethernet address, generating random locally administered address"); + get_random_ether_addr(func->mac_addr); + } + +fail: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_func_reset(struct bnxt_softc *softc) +{ + struct hwrm_func_reset_input req = {0}; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_RESET); + req.enables = 0; + + return hwrm_send_message(softc, &req, sizeof(req)); +} + +static void +bnxt_hwrm_set_link_common(struct bnxt_softc *softc, + struct hwrm_port_phy_cfg_input *req) +{ + uint8_t autoneg = softc->link_info.autoneg; + uint16_t fw_link_speed = softc->link_info.req_link_speed; + + if (autoneg & BNXT_AUTONEG_SPEED) { + req->auto_mode |= + HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ALL_SPEEDS; + + req->enables |= + htole32(HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_MODE); + req->flags |= + htole32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG); + } else { + req->force_link_speed = htole16(fw_link_speed); + req->flags |= htole32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE); + } + + /* tell chimp that the setting takes effect immediately */ + req->flags |= htole32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY); +} + + +static void +bnxt_hwrm_set_pause_common(struct bnxt_softc *softc, + struct hwrm_port_phy_cfg_input *req) +{ + if (softc->link_info.autoneg & BNXT_AUTONEG_FLOW_CTRL) { + req->auto_pause = + HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_AUTONEG_PAUSE; + if (softc->link_info.req_flow_ctrl & + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX) + req->auto_pause |= + HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_RX; + if (softc->link_info.req_flow_ctrl & + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX) + req->auto_pause |= + HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_RX; + req->enables |= + htole32(HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_PAUSE); + } else { + if (softc->link_info.req_flow_ctrl & + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX) + req->force_pause |= + HWRM_PORT_PHY_CFG_INPUT_FORCE_PAUSE_RX; + if (softc->link_info.req_flow_ctrl & + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX) + req->force_pause |= + HWRM_PORT_PHY_CFG_INPUT_FORCE_PAUSE_TX; + req->enables |= + htole32(HWRM_PORT_PHY_CFG_INPUT_ENABLES_FORCE_PAUSE); + req->auto_pause = req->force_pause; + req->enables |= htole32( + HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_PAUSE); + } +} + + +/* JFV this needs interface connection */ +static void +bnxt_hwrm_set_eee(struct bnxt_softc *softc, struct hwrm_port_phy_cfg_input *req) +{ + /* struct ethtool_eee *eee = &softc->eee; */ + bool eee_enabled = false; + + if (eee_enabled) { +#if 0 + uint16_t eee_speeds; + uint32_t flags = HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_ENABLE; + + if (eee->tx_lpi_enabled) + flags |= HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_TX_LPI; + + req->flags |= htole32(flags); + eee_speeds = bnxt_get_fw_auto_link_speeds(eee->advertised); + req->eee_link_speed_mask = htole16(eee_speeds); + req->tx_lpi_timer = htole32(eee->tx_lpi_timer); +#endif + } else { + req->flags |= + htole32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_DISABLE); + } +} + + +int +bnxt_hwrm_set_link_setting(struct bnxt_softc *softc, bool set_pause, + bool set_eee) +{ + struct hwrm_port_phy_cfg_input req = {0}; + + if (softc->flags & BNXT_FLAG_NPAR) + return ENOTSUP; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_PORT_PHY_CFG); + if (set_pause) + bnxt_hwrm_set_pause_common(softc, &req); + + bnxt_hwrm_set_link_common(softc, &req); + if (set_eee) + bnxt_hwrm_set_eee(softc, &req); + return hwrm_send_message(softc, &req, sizeof(req)); +} + + +int +bnxt_hwrm_set_pause(struct bnxt_softc *softc) +{ + struct hwrm_port_phy_cfg_input req = {0}; + int rc; + + if (softc->flags & BNXT_FLAG_NPAR) + return ENOTSUP; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_PORT_PHY_CFG); + bnxt_hwrm_set_pause_common(softc, &req); + + if (softc->link_info.autoneg & BNXT_AUTONEG_FLOW_CTRL) + bnxt_hwrm_set_link_common(softc, &req); + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (!rc && !(softc->link_info.autoneg & BNXT_AUTONEG_FLOW_CTRL)) { + /* since changing of pause setting doesn't trigger any link + * change event, the driver needs to update the current pause + * result upon successfully return of the phy_cfg command */ + softc->link_info.pause = + softc->link_info.force_pause = softc->link_info.req_flow_ctrl; + softc->link_info.auto_pause = 0; + bnxt_report_link(softc); + } + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_vnic_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic) +{ + struct hwrm_vnic_cfg_input req = {0}; + struct hwrm_vnic_cfg_output *resp; + + resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_CFG); + + if (vnic->flags & BNXT_VNIC_FLAG_DEFAULT) + req.flags |= htole32(HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT); + if (vnic->flags & BNXT_VNIC_FLAG_BD_STALL) + req.flags |= htole32(HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE); + if (vnic->flags & BNXT_VNIC_FLAG_VLAN_STRIP) + req.flags |= htole32(HWRM_VNIC_CFG_INPUT_FLAGS_VLAN_STRIP_MODE); + req.enables = htole32(HWRM_VNIC_CFG_INPUT_ENABLES_DFLT_RING_GRP | + HWRM_VNIC_CFG_INPUT_ENABLES_RSS_RULE | + HWRM_VNIC_CFG_INPUT_ENABLES_MRU); + req.vnic_id = htole16(vnic->id); + req.dflt_ring_grp = htole16(vnic->def_ring_grp); + req.rss_rule = htole16(vnic->rss_id); + req.cos_rule = htole16(vnic->cos_rule); + req.lb_rule = htole16(vnic->lb_rule); + req.mru = htole16(vnic->mru); + + return hwrm_send_message(softc, &req, sizeof(req)); +} + +int +bnxt_hwrm_vnic_alloc(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic) +{ + struct hwrm_vnic_alloc_input req = {0}; + struct hwrm_vnic_alloc_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc; + + if (vnic->id != (uint16_t)HWRM_NA_SIGNATURE) { + device_printf(softc->dev, + "Attempt to re-allocate vnic %04x\n", vnic->id); + return EDOOFUS; + } + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_ALLOC); + + if (vnic->flags & BNXT_VNIC_FLAG_DEFAULT) + req.flags = htole32(HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT); + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto fail; + + vnic->id = le32toh(resp->vnic_id); + +fail: + BNXT_HWRM_UNLOCK(softc); + return (rc); +} + +int +bnxt_hwrm_vnic_ctx_alloc(struct bnxt_softc *softc, uint16_t *ctx_id) +{ + struct hwrm_vnic_rss_cos_lb_ctx_alloc_input req = {0}; + struct hwrm_vnic_rss_cos_lb_ctx_alloc_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc; + + if (*ctx_id != (uint16_t)HWRM_NA_SIGNATURE) { + device_printf(softc->dev, + "Attempt to re-allocate vnic ctx %04x\n", *ctx_id); + return EDOOFUS; + } + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_RSS_COS_LB_CTX_ALLOC); + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto fail; + + *ctx_id = le32toh(resp->rss_cos_lb_ctx_id); + +fail: + BNXT_HWRM_UNLOCK(softc); + return (rc); +} + +int +bnxt_hwrm_ring_grp_alloc(struct bnxt_softc *softc, struct bnxt_grp_info *grp) +{ + struct hwrm_ring_grp_alloc_input req = {0}; + struct hwrm_ring_grp_alloc_output *resp; + int rc = 0; + + if (grp->grp_id != (uint16_t)HWRM_NA_SIGNATURE) { + device_printf(softc->dev, + "Attempt to re-allocate ring group %04x\n", grp->grp_id); + return EDOOFUS; + } + + resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_RING_GRP_ALLOC); + req.cr = htole16(grp->cp_ring_id); + req.rr = htole16(grp->rx_ring_id); + req.ar = htole16(grp->ag_ring_id); + req.sc = htole16(grp->stats_ctx); + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto fail; + + grp->grp_id = le32toh(resp->ring_group_id); + +fail: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +/* + * Ring allocation message to the firmware + */ +int +bnxt_hwrm_ring_alloc(struct bnxt_softc *softc, uint8_t type, + struct bnxt_ring *ring, uint16_t cmpl_ring_id, uint32_t stat_ctx_id, + bool irq) +{ + struct hwrm_ring_alloc_input req = {0}; + struct hwrm_ring_alloc_output *resp; + int rc; + + if (ring->phys_id != (uint16_t)HWRM_NA_SIGNATURE) { + device_printf(softc->dev, + "Attempt to re-allocate ring %04x\n", ring->phys_id); + return EDOOFUS; + } + + resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_RING_ALLOC); + req.enables = htole32(0); + req.fbo = htole32(0); + + if (stat_ctx_id != HWRM_NA_SIGNATURE) { + req.enables |= htole32( + HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID); + req.stat_ctx_id = htole32(stat_ctx_id); + } + req.ring_type = type; + req.page_tbl_addr = htole64(ring->paddr); + req.length = htole32(ring->ring_size); + req.logical_id = htole16(ring->id); + req.cmpl_ring_id = htole16(cmpl_ring_id); + req.queue_id = htole16(softc->q_info[0].id); +#if 0 + /* MODE_POLL appears to crash the firmware */ + if (irq) + req.int_mode = HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX; + else + req.int_mode = HWRM_RING_ALLOC_INPUT_INT_MODE_POLL; +#else + req.int_mode = HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX; +#endif + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto fail; + + ring->phys_id = le16toh(resp->ring_id); + +fail: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_stat_ctx_alloc(struct bnxt_softc *softc, struct bnxt_cp_ring *cpr, + uint64_t paddr) +{ + struct hwrm_stat_ctx_alloc_input req = {0}; + struct hwrm_stat_ctx_alloc_output *resp; + int rc = 0; + + if (cpr->stats_ctx_id != HWRM_NA_SIGNATURE) { + device_printf(softc->dev, + "Attempt to re-allocate stats ctx %08x\n", + cpr->stats_ctx_id); + return EDOOFUS; + } + + resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_STAT_CTX_ALLOC); + + req.update_period_ms = htole32(1000); + req.stats_dma_addr = htole64(paddr); + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto fail; + + cpr->stats_ctx_id = le32toh(resp->stat_ctx_id); + +fail: + BNXT_HWRM_UNLOCK(softc); + + return rc; +} + +int +bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt_softc *softc, + struct bnxt_vnic_info *vnic) +{ + struct hwrm_cfa_l2_set_rx_mask_input req = {0}; + struct bnxt_vlan_tag *tag; + uint32_t *tags; + uint32_t num_vlan_tags = 0;; + uint32_t i; + uint32_t mask = vnic->rx_mask; + int rc; + + SLIST_FOREACH(tag, &vnic->vlan_tags, next) + num_vlan_tags++; + + if (num_vlan_tags) { + if (!(mask & + HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN)) { + if (!vnic->vlan_only) + mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN; + else + mask |= + HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY; + } + if (vnic->vlan_tag_list.idi_vaddr) { + iflib_dma_free(&vnic->vlan_tag_list); + vnic->vlan_tag_list.idi_vaddr = NULL; + } + rc = iflib_dma_alloc(softc->ctx, 4 * num_vlan_tags, + &vnic->vlan_tag_list, BUS_DMA_NOWAIT); + if (rc) + return rc; + tags = (uint32_t *)vnic->vlan_tag_list.idi_vaddr; + + i = 0; + SLIST_FOREACH(tag, &vnic->vlan_tags, next) { + tags[i] = htole32((tag->tpid << 16) | tag->tag); + i++; + } + } + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_CFA_L2_SET_RX_MASK); + + req.vnic_id = htole32(vnic->id); + req.mask = htole32(mask); + req.mc_tbl_addr = htole64(vnic->mc_list.idi_paddr); + req.num_mc_entries = htole32(vnic->mc_list_count); + req.vlan_tag_tbl_addr = htole64(vnic->vlan_tag_list.idi_paddr); + req.num_vlan_tags = htole32(num_vlan_tags); + return hwrm_send_message(softc, &req, sizeof(req)); +} + + +int +bnxt_hwrm_set_filter(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic) +{ + struct hwrm_cfa_l2_filter_alloc_input req = {0}; + struct hwrm_cfa_l2_filter_alloc_output *resp; + uint32_t enables = 0; + int rc = 0; + + if (vnic->filter_id != -1) { + device_printf(softc->dev, + "Attempt to re-allocate l2 ctx filter\n"); + return EDOOFUS; + } + + resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_CFA_L2_FILTER_ALLOC); + + req.flags = htole32(HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX); + enables = HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR + | HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK + | HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID; + req.enables = htole32(enables); + req.dst_id = htole16(vnic->id); + memcpy(req.l2_addr, if_getlladdr(iflib_get_ifp(softc->ctx)), + ETHER_ADDR_LEN); + memset(&req.l2_addr_mask, 0xff, sizeof(req.l2_addr_mask)); + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto fail; + + vnic->filter_id = le64toh(resp->l2_filter_id); + vnic->flow_id = le64toh(resp->flow_id); + +fail: + BNXT_HWRM_UNLOCK(softc); + return (rc); +} + +int +bnxt_hwrm_rss_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic, + uint32_t hash_type) +{ + struct hwrm_vnic_rss_cfg_input req = {0}; + struct hwrm_vnic_rss_cfg_output *resp; + + resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_RSS_CFG); + + req.hash_type = htole32(hash_type); + req.ring_grp_tbl_addr = htole64(vnic->rss_grp_tbl.idi_paddr); + req.hash_key_tbl_addr = htole64(vnic->rss_hash_key_tbl.idi_paddr); + req.rss_ctx_idx = htole16(vnic->rss_id); + + return hwrm_send_message(softc, &req, sizeof(req)); +} + +int +bnxt_hwrm_func_cfg(struct bnxt_softc *softc) +{ + struct hwrm_func_cfg_input req = {0}; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_CFG); + + req.fid = 0xffff; + req.enables = htole32(HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); + + req.async_event_cr = softc->def_cp_ring.ring.phys_id; + + return hwrm_send_message(softc, &req, sizeof(req)); +} + +int +bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic, + uint32_t flags) +{ + struct hwrm_vnic_tpa_cfg_input req = {0}; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_TPA_CFG); + + req.flags = htole32(flags); + req.vnic_id = htole16(vnic->id); + req.enables = htole32(HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS | + HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS | + /* HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_TIMER | */ + HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN); + /* TODO: Calculate this based on ring size? */ + req.max_agg_segs = htole16(3); + /* Base this in the allocated TPA start size... */ + req.max_aggs = htole16(2); + /* + * TODO: max_agg_timer? + * req.mag_agg_timer = htole32(XXX); + */ + req.min_agg_len = htole32(0); + + return hwrm_send_message(softc, &req, sizeof(req)); +} + +int +bnxt_hwrm_nvm_find_dir_entry(struct bnxt_softc *softc, uint16_t type, + uint16_t *ordinal, uint16_t ext, uint16_t *index, bool use_index, + uint8_t search_opt, uint32_t *data_length, uint32_t *item_length, + uint32_t *fw_ver) +{ + struct hwrm_nvm_find_dir_entry_input req = {0}; + struct hwrm_nvm_find_dir_entry_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc = 0; + uint32_t old_timeo; + + MPASS(ordinal); + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_FIND_DIR_ENTRY); + if (use_index) { + req.enables = htole32( + HWRM_NVM_FIND_DIR_ENTRY_INPUT_ENABLES_DIR_IDX_VALID); + req.dir_idx = htole16(*index); + } + req.dir_type = htole16(type); + req.dir_ordinal = htole16(*ordinal); + req.dir_ext = htole16(ext); + req.opt_ordinal = search_opt; + + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + if (rc) + goto exit; + + if (item_length) + *item_length = le32toh(resp->dir_item_length); + if (data_length) + *data_length = le32toh(resp->dir_data_length); + if (fw_ver) + *fw_ver = le32toh(resp->fw_ver); + *ordinal = le16toh(resp->dir_ordinal); + if (index) + *index = le16toh(resp->dir_idx); + +exit: + BNXT_HWRM_UNLOCK(softc); + return (rc); +} + +int +bnxt_hwrm_nvm_read(struct bnxt_softc *softc, uint16_t index, uint32_t offset, + uint32_t length, struct iflib_dma_info *data) +{ + struct hwrm_nvm_read_input req = {0}; + int rc; + uint32_t old_timeo; + + if (length > data->idi_size) { + rc = EINVAL; + goto exit; + } + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_READ); + req.host_dest_addr = htole64(data->idi_paddr); + req.dir_idx = htole16(index); + req.offset = htole32(offset); + req.len = htole32(length); + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + BNXT_HWRM_UNLOCK(softc); + if (rc) + goto exit; + bus_dmamap_sync(data->idi_tag, data->idi_map, BUS_DMASYNC_POSTREAD); + + goto exit; + +exit: + return rc; +} + +int +bnxt_hwrm_nvm_modify(struct bnxt_softc *softc, uint16_t index, uint32_t offset, + void *data, bool cpyin, uint32_t length) +{ + struct hwrm_nvm_modify_input req = {0}; + struct iflib_dma_info dma_data; + int rc; + uint32_t old_timeo; + + if (length == 0 || !data) + return EINVAL; + rc = iflib_dma_alloc(softc->ctx, length, &dma_data, + BUS_DMA_NOWAIT); + if (rc) + return ENOMEM; + if (cpyin) { + rc = copyin(data, dma_data.idi_vaddr, length); + if (rc) + goto exit; + } + else + memcpy(dma_data.idi_vaddr, data, length); + bus_dmamap_sync(dma_data.idi_tag, dma_data.idi_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_MODIFY); + req.host_src_addr = htole64(dma_data.idi_paddr); + req.dir_idx = htole16(index); + req.offset = htole32(offset); + req.len = htole32(length); + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + BNXT_HWRM_UNLOCK(softc); + +exit: + iflib_dma_free(&dma_data); + return rc; +} + +int +bnxt_hwrm_fw_reset(struct bnxt_softc *softc, uint8_t processor, + uint8_t *selfreset) +{ + struct hwrm_fw_reset_input req = {0}; + struct hwrm_fw_reset_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc; + + MPASS(selfreset); + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FW_RESET); + req.embedded_proc_type = processor; + req.selfrst_status = *selfreset; + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto exit; + *selfreset = resp->selfrst_status; + +exit: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_fw_qstatus(struct bnxt_softc *softc, uint8_t type, uint8_t *selfreset) +{ + struct hwrm_fw_qstatus_input req = {0}; + struct hwrm_fw_qstatus_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc; + + MPASS(selfreset); + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FW_QSTATUS); + req.embedded_proc_type = type; + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto exit; + *selfreset = resp->selfrst_status; + +exit: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_nvm_write(struct bnxt_softc *softc, void *data, bool cpyin, + uint16_t type, uint16_t ordinal, uint16_t ext, uint16_t attr, + uint16_t option, uint32_t data_length, bool keep, uint32_t *item_length, + uint16_t *index) +{ + struct hwrm_nvm_write_input req = {0}; + struct hwrm_nvm_write_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + struct iflib_dma_info dma_data; + int rc; + uint32_t old_timeo; + + if (data_length) { + rc = iflib_dma_alloc(softc->ctx, data_length, &dma_data, + BUS_DMA_NOWAIT); + if (rc) + return ENOMEM; + if (cpyin) { + rc = copyin(data, dma_data.idi_vaddr, data_length); + if (rc) + goto early_exit; + } + else + memcpy(dma_data.idi_vaddr, data, data_length); + bus_dmamap_sync(dma_data.idi_tag, dma_data.idi_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + } + else + dma_data.idi_paddr = 0; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_WRITE); + + req.host_src_addr = htole64(dma_data.idi_paddr); + req.dir_type = htole16(type); + req.dir_ordinal = htole16(ordinal); + req.dir_ext = htole16(ext); + req.dir_attr = htole16(attr); + req.dir_data_length = htole32(data_length); + req.option = htole16(option); + if (keep) { + req.flags = + htole16(HWRM_NVM_WRITE_INPUT_FLAGS_KEEP_ORIG_ACTIVE_IMG); + } + if (item_length) + req.dir_item_length = htole32(*item_length); + + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + if (rc) + goto exit; + if (item_length) + *item_length = le32toh(resp->dir_item_length); + if (index) + *index = le16toh(resp->dir_idx); + +exit: + BNXT_HWRM_UNLOCK(softc); +early_exit: + if (data_length) + iflib_dma_free(&dma_data); + return rc; +} + +int +bnxt_hwrm_nvm_erase_dir_entry(struct bnxt_softc *softc, uint16_t index) +{ + struct hwrm_nvm_erase_dir_entry_input req = {0}; + uint32_t old_timeo; + int rc; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_ERASE_DIR_ENTRY); + req.dir_idx = htole16(index); + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_nvm_get_dir_info(struct bnxt_softc *softc, uint32_t *entries, + uint32_t *entry_length) +{ + struct hwrm_nvm_get_dir_info_input req = {0}; + struct hwrm_nvm_get_dir_info_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc; + uint32_t old_timeo; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_GET_DIR_INFO); + + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + if (rc) + goto exit; + + if (entries) + *entries = le32toh(resp->entries); + if (entry_length) + *entry_length = le32toh(resp->entry_length); + +exit: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_nvm_get_dir_entries(struct bnxt_softc *softc, uint32_t *entries, + uint32_t *entry_length, struct iflib_dma_info *dma_data) +{ + struct hwrm_nvm_get_dir_entries_input req = {0}; + uint32_t ent; + uint32_t ent_len; + int rc; + uint32_t old_timeo; + + if (!entries) + entries = &ent; + if (!entry_length) + entry_length = &ent_len; + + rc = bnxt_hwrm_nvm_get_dir_info(softc, entries, entry_length); + if (rc) + goto exit; + if (*entries * *entry_length > dma_data->idi_size) { + rc = EINVAL; + goto exit; + } + + /* + * TODO: There's a race condition here that could blow up DMA memory... + * we need to allocate the max size, not the currently in use + * size. The command should totally have a max size here. + */ + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_GET_DIR_ENTRIES); + req.host_dest_addr = htole64(dma_data->idi_paddr); + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + BNXT_HWRM_UNLOCK(softc); + if (rc) + goto exit; + bus_dmamap_sync(dma_data->idi_tag, dma_data->idi_map, + BUS_DMASYNC_POSTWRITE); + +exit: + return rc; +} + +int +bnxt_hwrm_nvm_get_dev_info(struct bnxt_softc *softc, uint16_t *mfg_id, + uint16_t *device_id, uint32_t *sector_size, uint32_t *nvram_size, + uint32_t *reserved_size, uint32_t *available_size) +{ + struct hwrm_nvm_get_dev_info_input req = {0}; + struct hwrm_nvm_get_dev_info_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc; + uint32_t old_timeo; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_GET_DEV_INFO); + + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + if (rc) + goto exit; + + if (mfg_id) + *mfg_id = le16toh(resp->manufacturer_id); + if (device_id) + *device_id = le16toh(resp->device_id); + if (sector_size) + *sector_size = le32toh(resp->sector_size); + if (nvram_size) + *nvram_size = le32toh(resp->nvram_size); + if (reserved_size) + *reserved_size = le32toh(resp->reserved_size); + if (available_size) + *available_size = le32toh(resp->available_size); + +exit: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_nvm_install_update(struct bnxt_softc *softc, + uint32_t install_type, uint64_t *installed_items, uint8_t *result, + uint8_t *problem_item, uint8_t *reset_required) +{ + struct hwrm_nvm_install_update_input req = {0}; + struct hwrm_nvm_install_update_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc; + uint32_t old_timeo; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_INSTALL_UPDATE); + req.install_type = htole32(install_type); + + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + if (rc) + goto exit; + + if (installed_items) + *installed_items = le32toh(resp->installed_items); + if (result) + *result = resp->result; + if (problem_item) + *problem_item = resp->problem_item; + if (reset_required) + *reset_required = resp->reset_required; + +exit: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_nvm_verify_update(struct bnxt_softc *softc, uint16_t type, + uint16_t ordinal, uint16_t ext) +{ + struct hwrm_nvm_verify_update_input req = {0}; + uint32_t old_timeo; + int rc; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_NVM_VERIFY_UPDATE); + + req.dir_type = htole16(type); + req.dir_ordinal = htole16(ordinal); + req.dir_ext = htole16(ext); + + BNXT_HWRM_LOCK(softc); + old_timeo = softc->hwrm_cmd_timeo; + softc->hwrm_cmd_timeo = BNXT_NVM_TIMEO; + rc = _hwrm_send_message(softc, &req, sizeof(req)); + softc->hwrm_cmd_timeo = old_timeo; + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_fw_get_time(struct bnxt_softc *softc, uint16_t *year, uint8_t *month, + uint8_t *day, uint8_t *hour, uint8_t *minute, uint8_t *second, + uint16_t *millisecond, uint16_t *zone) +{ + struct hwrm_fw_get_time_input req = {0}; + struct hwrm_fw_get_time_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FW_GET_TIME); + + BNXT_HWRM_LOCK(softc); + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto exit; + + if (year) + *year = le16toh(resp->year); + if (month) + *month = resp->month; + if (day) + *day = resp->day; + if (hour) + *hour = resp->hour; + if (minute) + *minute = resp->minute; + if (second) + *second = resp->second; + if (millisecond) + *millisecond = le16toh(resp->millisecond); + if (zone) + *zone = le16toh(resp->zone); + +exit: + BNXT_HWRM_UNLOCK(softc); + return rc; +} + +int +bnxt_hwrm_fw_set_time(struct bnxt_softc *softc, uint16_t year, uint8_t month, + uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, + uint16_t millisecond, uint16_t zone) +{ + struct hwrm_fw_set_time_input req = {0}; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FW_SET_TIME); + + req.year = htole16(year); + req.month = month; + req.day = day; + req.hour = hour; + req.minute = minute; + req.second = second; + req.millisecond = htole16(millisecond); + req.zone = htole16(zone); + return hwrm_send_message(softc, &req, sizeof(req)); +} + +int +bnxt_hwrm_port_phy_qcfg(struct bnxt_softc *softc) +{ + struct bnxt_link_info *link_info = &softc->link_info; + struct hwrm_port_phy_qcfg_input req = {0}; + struct hwrm_port_phy_qcfg_output *resp = + (void *)softc->hwrm_cmd_resp.idi_vaddr; + int rc = 0; + + BNXT_HWRM_LOCK(softc); + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_PORT_PHY_QCFG); + + rc = _hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto exit; + + link_info->phy_link_status = resp->link; + link_info->duplex = resp->duplex; + link_info->pause = resp->pause; + link_info->auto_mode = resp->auto_mode; + link_info->auto_pause = resp->auto_pause; + link_info->force_pause = resp->force_pause; + link_info->duplex_setting = resp->duplex; + if (link_info->phy_link_status == HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK) + link_info->link_speed = le16toh(resp->link_speed); + else + link_info->link_speed = 0; + link_info->force_link_speed = le16toh(resp->force_link_speed); + link_info->auto_link_speed = le16toh(resp->auto_link_speed); + link_info->support_speeds = le16toh(resp->support_speeds); + link_info->auto_link_speeds = le16toh(resp->auto_link_speed_mask); + link_info->preemphasis = le32toh(resp->preemphasis); + link_info->phy_ver[0] = resp->phy_maj; + link_info->phy_ver[1] = resp->phy_min; + link_info->phy_ver[2] = resp->phy_bld; + snprintf(softc->ver_info->phy_ver, sizeof(softc->ver_info->phy_ver), + "%d.%d.%d", link_info->phy_ver[0], link_info->phy_ver[1], + link_info->phy_ver[2]); + strlcpy(softc->ver_info->phy_vendor, resp->phy_vendor_name, + BNXT_NAME_SIZE); + strlcpy(softc->ver_info->phy_partnumber, resp->phy_vendor_partnumber, + BNXT_NAME_SIZE); + link_info->media_type = resp->media_type; + link_info->phy_type = resp->phy_type; + link_info->transceiver = resp->xcvr_pkg_type; + link_info->phy_addr = resp->eee_config_phy_addr & + HWRM_PORT_PHY_QCFG_OUTPUT_PHY_ADDR_MASK; + +exit: + BNXT_HWRM_UNLOCK(softc); + return rc; +} diff --git a/sys/dev/bnxt/bnxt_hwrm.h b/sys/dev/bnxt/bnxt_hwrm.h new file mode 100644 index 00000000000..21fc2272c85 --- /dev/null +++ b/sys/dev/bnxt/bnxt_hwrm.h @@ -0,0 +1,102 @@ +/*- + * Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2016 Broadcom, All Rights Reserved. + * The term Broadcom refers to Broadcom Limited and/or its subsidiaries + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 +__FBSDID("$FreeBSD$"); + +#ifndef _BNXT_HWRM_H +#define _BNXT_HWRM_H + +/* HWRM Function Prototypes */ +int bnxt_alloc_hwrm_dma_mem(struct bnxt_softc *softc); +void bnxt_free_hwrm_dma_mem(struct bnxt_softc *softc); +int bnxt_hwrm_ring_alloc(struct bnxt_softc *softc, uint8_t type, + struct bnxt_ring *ring, uint16_t cmpl_ring_id, uint32_t stat_ctx_id, + bool irq); +int bnxt_hwrm_ver_get(struct bnxt_softc *softc); +int bnxt_hwrm_queue_qportcfg(struct bnxt_softc *softc); +int bnxt_hwrm_func_drv_rgtr(struct bnxt_softc *softc); +int bnxt_hwrm_func_drv_unrgtr(struct bnxt_softc *softc, bool shutdown); +int bnxt_hwrm_func_qcaps(struct bnxt_softc *softc); +int bnxt_hwrm_func_reset(struct bnxt_softc *softc); +int bnxt_hwrm_set_link_setting(struct bnxt_softc *, bool set_pause, + bool set_eee); +int bnxt_hwrm_set_pause(struct bnxt_softc *softc); +int bnxt_hwrm_vnic_ctx_alloc(struct bnxt_softc *softc, uint16_t *ctx_id); +int bnxt_hwrm_vnic_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic); +int bnxt_hwrm_stat_ctx_alloc(struct bnxt_softc *softc, struct bnxt_cp_ring *cpr, + uint64_t paddr); +int bnxt_hwrm_ring_grp_alloc(struct bnxt_softc *softc, + struct bnxt_grp_info *grp); +int bnxt_hwrm_vnic_alloc(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic); +int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt_softc *softc, + struct bnxt_vnic_info *vnic); +int bnxt_hwrm_set_filter(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic); +int bnxt_hwrm_rss_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic, + uint32_t hash_type); +int bnxt_hwrm_func_cfg(struct bnxt_softc *softc); +int bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, + struct bnxt_vnic_info *vnic, uint32_t flags); +int bnxt_hwrm_nvm_find_dir_entry(struct bnxt_softc *softc, uint16_t type, + uint16_t *ordinal, uint16_t ext, uint16_t *index, bool use_index, + uint8_t search_opt, uint32_t *data_length, uint32_t *item_length, + uint32_t *fw_ver); +int bnxt_hwrm_nvm_read(struct bnxt_softc *softc, uint16_t index, + uint32_t offset, uint32_t length, struct iflib_dma_info *data); +int bnxt_hwrm_nvm_modify(struct bnxt_softc *softc, uint16_t index, + uint32_t offset, void *data, bool cpyin, uint32_t length); +int bnxt_hwrm_fw_reset(struct bnxt_softc *softc, uint8_t processor, + uint8_t *selfreset); +int bnxt_hwrm_fw_qstatus(struct bnxt_softc *softc, uint8_t type, + uint8_t *selfreset); +int bnxt_hwrm_nvm_write(struct bnxt_softc *softc, void *data, bool cpyin, + uint16_t type, uint16_t ordinal, uint16_t ext, uint16_t attr, + uint16_t option, uint32_t data_length, bool keep, uint32_t *item_length, + uint16_t *index); +int bnxt_hwrm_nvm_erase_dir_entry(struct bnxt_softc *softc, uint16_t index); +int bnxt_hwrm_nvm_get_dir_info(struct bnxt_softc *softc, uint32_t *entries, + uint32_t *entry_length); +int bnxt_hwrm_nvm_get_dir_entries(struct bnxt_softc *softc, + uint32_t *entries, uint32_t *entry_length, struct iflib_dma_info *dma_data); +int bnxt_hwrm_nvm_get_dev_info(struct bnxt_softc *softc, uint16_t *mfg_id, + uint16_t *device_id, uint32_t *sector_size, uint32_t *nvram_size, + uint32_t *reserved_size, uint32_t *available_size); +int bnxt_hwrm_nvm_install_update(struct bnxt_softc *softc, + uint32_t install_type, uint64_t *installed_items, uint8_t *result, + uint8_t *problem_item, uint8_t *reset_required); +int bnxt_hwrm_nvm_verify_update(struct bnxt_softc *softc, uint16_t type, + uint16_t ordinal, uint16_t ext); +int bnxt_hwrm_fw_get_time(struct bnxt_softc *softc, uint16_t *year, + uint8_t *month, uint8_t *day, uint8_t *hour, uint8_t *minute, + uint8_t *second, uint16_t *millisecond, uint16_t *zone); +int bnxt_hwrm_fw_set_time(struct bnxt_softc *softc, uint16_t year, + uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, + uint16_t millisecond, uint16_t zone); +int bnxt_hwrm_port_phy_qcfg(struct bnxt_softc *softc); + +#endif diff --git a/sys/dev/bnxt/bnxt_ioctl.h b/sys/dev/bnxt/bnxt_ioctl.h new file mode 100644 index 00000000000..af6c719b914 --- /dev/null +++ b/sys/dev/bnxt/bnxt_ioctl.h @@ -0,0 +1,192 @@ +/*- + * Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2016 Broadcom, All Rights Reserved. + * The term Broadcom refers to Broadcom Limited and/or its subsidiaries + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 +__FBSDID("$FreeBSD$"); + +#ifndef _BNXT_IOCTL_H +#define _BNXT_IOCTL_H + +enum bnxt_ioctl_type { + BNXT_HWRM_NVM_FIND_DIR_ENTRY, + BNXT_HWRM_NVM_READ, + BNXT_HWRM_FW_RESET, + BNXT_HWRM_FW_QSTATUS, + BNXT_HWRM_NVM_WRITE, + BNXT_HWRM_NVM_ERASE_DIR_ENTRY, + BNXT_HWRM_NVM_GET_DIR_INFO, + BNXT_HWRM_NVM_GET_DIR_ENTRIES, + BNXT_HWRM_NVM_MODIFY, + BNXT_HWRM_NVM_VERIFY_UPDATE, + BNXT_HWRM_NVM_INSTALL_UPDATE, + BNXT_HWRM_FW_GET_TIME, + BNXT_HWRM_FW_SET_TIME, +}; + +struct bnxt_ioctl_header { + enum bnxt_ioctl_type type; + int rc; +}; + +struct bnxt_ioctl_hwrm_nvm_find_dir_entry { + struct bnxt_ioctl_header hdr; + uint32_t data_length; + uint32_t fw_ver; + uint32_t item_length; + uint16_t ext; + uint16_t index; + uint16_t ordinal; + uint16_t type; + uint8_t search_opt; + bool use_index; +}; + +struct bnxt_ioctl_hwrm_nvm_read { + struct bnxt_ioctl_header hdr; + uint8_t *data; + uint32_t length; + uint32_t offset; + uint16_t index; +}; + +struct bnxt_ioctl_hwrm_fw_reset { + struct bnxt_ioctl_header hdr; + uint8_t processor; + uint8_t selfreset; +}; + +struct bnxt_ioctl_hwrm_fw_qstatus { + struct bnxt_ioctl_header hdr; + uint8_t processor; + uint8_t selfreset; +}; + +struct bnxt_ioctl_hwrm_nvm_write { + struct bnxt_ioctl_header hdr; + uint8_t *data; + uint32_t data_length; + uint32_t item_length; + uint16_t attr; + uint16_t ext; + uint16_t index; + uint16_t option; + uint16_t ordinal; + uint16_t type; + bool keep; +}; + +struct bnxt_ioctl_hwrm_nvm_erase_dir_entry { + struct bnxt_ioctl_header hdr; + enum bnxt_ioctl_type type; + int rc; + uint16_t index; +}; + +struct bnxt_ioctl_hwrm_nvm_get_dir_info { + struct bnxt_ioctl_header hdr; + uint32_t entries; + uint32_t entry_length; +}; + +struct bnxt_ioctl_hwrm_nvm_get_dir_entries { + struct bnxt_ioctl_header hdr; + uint8_t *data; + size_t max_size; + uint32_t entries; + uint32_t entry_length; +}; + +struct bnxt_ioctl_hwrm_nvm_install_update { + struct bnxt_ioctl_header hdr; + uint64_t installed_items; + uint32_t install_type; + uint8_t problem_item; + uint8_t reset_required; + uint8_t result; +}; + +struct bnxt_ioctl_hwrm_nvm_verify_update { + struct bnxt_ioctl_header hdr; + uint16_t ext; + uint16_t ordinal; + uint16_t type; +}; + +struct bnxt_ioctl_hwrm_nvm_modify { + struct bnxt_ioctl_header hdr; + uint8_t *data; + uint32_t length; + uint32_t offset; + uint16_t index; +}; + +struct bnxt_ioctl_hwrm_fw_get_time { + struct bnxt_ioctl_header hdr; + uint16_t millisecond; + uint16_t year; + uint16_t zone; + uint8_t day; + uint8_t hour; + uint8_t minute; + uint8_t month; + uint8_t second; +}; + +struct bnxt_ioctl_hwrm_fw_set_time { + struct bnxt_ioctl_header hdr; + uint16_t millisecond; + uint16_t year; + uint16_t zone; + uint8_t day; + uint8_t hour; + uint8_t minute; + uint8_t month; + uint8_t second; +}; + +/* IOCTL interface */ +struct bnxt_ioctl_data { + union { + struct bnxt_ioctl_header hdr; + struct bnxt_ioctl_hwrm_nvm_find_dir_entry find; + struct bnxt_ioctl_hwrm_nvm_read read; + struct bnxt_ioctl_hwrm_fw_reset reset; + struct bnxt_ioctl_hwrm_fw_qstatus status; + struct bnxt_ioctl_hwrm_nvm_write write; + struct bnxt_ioctl_hwrm_nvm_erase_dir_entry erase; + struct bnxt_ioctl_hwrm_nvm_get_dir_info dir_info; + struct bnxt_ioctl_hwrm_nvm_get_dir_entries dir_entries; + struct bnxt_ioctl_hwrm_nvm_install_update install; + struct bnxt_ioctl_hwrm_nvm_verify_update verify; + struct bnxt_ioctl_hwrm_nvm_modify modify; + struct bnxt_ioctl_hwrm_fw_get_time get_time; + struct bnxt_ioctl_hwrm_fw_set_time set_time; + }; +}; + +#endif diff --git a/sys/dev/bnxt/bnxt_sysctl.c b/sys/dev/bnxt/bnxt_sysctl.c new file mode 100644 index 00000000000..6f79b56f07e --- /dev/null +++ b/sys/dev/bnxt/bnxt_sysctl.c @@ -0,0 +1,618 @@ +/*- + * Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2016 Broadcom, All Rights Reserved. + * The term Broadcom refers to Broadcom Limited and/or its subsidiaries + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "bnxt.h" +#include "bnxt_hwrm.h" +#include "bnxt_sysctl.h" + +static int bnxt_vlan_only_sysctl(SYSCTL_HANDLER_ARGS); +/* + * We want to create: + * dev.bnxt.0.hwstats.txq0 + * dev.bnxt.0.hwstats.txq0.txmbufs + * dev.bnxt.0.hwstats.rxq0 + * dev.bnxt.0.hwstats.txq0.rxmbufs + * so the hwstats ctx list needs to be created in attach_post and populated + * during init. + * + * Then, it needs to be cleaned up in stop. + */ + +int +bnxt_init_sysctl_ctx(struct bnxt_softc *softc) +{ + struct sysctl_ctx_list *ctx; + + sysctl_ctx_init(&softc->hw_stats); + ctx = device_get_sysctl_ctx(softc->dev); + softc->hw_stats_oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)), OID_AUTO, + "hwstats", CTLFLAG_RD, 0, "hardware statistics"); + if (!softc->hw_stats_oid) { + sysctl_ctx_free(&softc->hw_stats); + return ENOMEM; + } + + sysctl_ctx_init(&softc->ver_info->ver_ctx); + ctx = device_get_sysctl_ctx(softc->dev); + softc->ver_info->ver_oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)), OID_AUTO, + "ver", CTLFLAG_RD, 0, "hardware/firmware version information"); + if (!softc->ver_info->ver_oid) { + sysctl_ctx_free(&softc->ver_info->ver_ctx); + return ENOMEM; + } + + sysctl_ctx_init(&softc->nvm_info->nvm_ctx); + ctx = device_get_sysctl_ctx(softc->dev); + softc->nvm_info->nvm_oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)), OID_AUTO, + "nvram", CTLFLAG_RD, 0, "nvram information"); + if (!softc->nvm_info->nvm_oid) { + sysctl_ctx_free(&softc->nvm_info->nvm_ctx); + return ENOMEM; + } + + return 0; +} + +int +bnxt_free_sysctl_ctx(struct bnxt_softc *softc) +{ + int orc; + int rc = 0; + + if (softc->hw_stats_oid != NULL) { + orc = sysctl_ctx_free(&softc->hw_stats); + if (orc) + rc = orc; + else + softc->hw_stats_oid = NULL; + } + if (softc->ver_info->ver_oid != NULL) { + orc = sysctl_ctx_free(&softc->ver_info->ver_ctx); + if (orc) + rc = orc; + else + softc->ver_info->ver_oid = NULL; + } + if (softc->nvm_info->nvm_oid != NULL) { + orc = sysctl_ctx_free(&softc->nvm_info->nvm_ctx); + if (orc) + rc = orc; + else + softc->nvm_info->nvm_oid = NULL; + } + + return rc; +} + +int +bnxt_create_tx_sysctls(struct bnxt_softc *softc, int txr) +{ + struct sysctl_oid *oid; + struct ctx_hw_stats *tx_stats = (void *)softc->tx_stats.idi_vaddr; + char name[32]; + char desc[64]; + + sprintf(name, "txq%d", txr); + sprintf(desc, "transmit queue %d", txr); + oid = SYSCTL_ADD_NODE(&softc->hw_stats, + SYSCTL_CHILDREN(softc->hw_stats_oid), OID_AUTO, name, CTLFLAG_RD, 0, + desc); + if (!oid) + return ENOMEM; + + + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "ucast_pkts", CTLFLAG_RD, &tx_stats[txr].tx_ucast_pkts, + "unicast packets sent"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "mcast_pkts", CTLFLAG_RD, &tx_stats[txr].tx_mcast_pkts, + "multicast packets sent"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "bcast_pkts", CTLFLAG_RD, &tx_stats[txr].tx_bcast_pkts, + "broadcast packets sent"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "discard_pkts", CTLFLAG_RD, + &tx_stats[txr].tx_discard_pkts, "discarded transmit packets"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "drop_pkts", CTLFLAG_RD, &tx_stats[txr].tx_drop_pkts, + "dropped transmit packets"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "ucast_bytes", CTLFLAG_RD, &tx_stats[txr].tx_ucast_bytes, + "unicast bytes sent"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "mcast_bytes", CTLFLAG_RD, &tx_stats[txr].tx_mcast_bytes, + "multicast bytes sent"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "bcast_bytes", CTLFLAG_RD, &tx_stats[txr].tx_bcast_bytes, + "broadcast bytes sent"); + + return 0; +} + +int +bnxt_create_rx_sysctls(struct bnxt_softc *softc, int rxr) +{ + struct sysctl_oid *oid; + struct ctx_hw_stats *rx_stats = (void *)softc->rx_stats.idi_vaddr; + char name[32]; + char desc[64]; + + sprintf(name, "rxq%d", rxr); + sprintf(desc, "receive queue %d", rxr); + oid = SYSCTL_ADD_NODE(&softc->hw_stats, + SYSCTL_CHILDREN(softc->hw_stats_oid), OID_AUTO, name, CTLFLAG_RD, 0, + desc); + if (!oid) + return ENOMEM; + + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "ucast_pkts", CTLFLAG_RD, &rx_stats[rxr].rx_ucast_pkts, + "unicast packets received"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "mcast_pkts", CTLFLAG_RD, &rx_stats[rxr].rx_mcast_pkts, + "multicast packets received"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "bcast_pkts", CTLFLAG_RD, &rx_stats[rxr].rx_bcast_pkts, + "broadcast packets received"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "discard_pkts", CTLFLAG_RD, + &rx_stats[rxr].rx_discard_pkts, "discarded receive packets"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "drop_pkts", CTLFLAG_RD, &rx_stats[rxr].rx_drop_pkts, + "dropped receive packets"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "ucast_bytes", CTLFLAG_RD, &rx_stats[rxr].rx_ucast_bytes, + "unicast bytes received"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "mcast_bytes", CTLFLAG_RD, &rx_stats[rxr].rx_mcast_bytes, + "multicast bytes received"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "bcast_bytes", CTLFLAG_RD, &rx_stats[rxr].rx_bcast_bytes, + "broadcast bytes received"); + + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tpa_pkts", CTLFLAG_RD, &rx_stats[rxr].tpa_pkts, + "TPA packets"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tpa_bytes", CTLFLAG_RD, &rx_stats[rxr].tpa_bytes, + "TPA bytes"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tpa_events", CTLFLAG_RD, &rx_stats[rxr].tpa_events, + "TPA events"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tpa_aborts", CTLFLAG_RD, &rx_stats[rxr].tpa_aborts, + "TPA aborts"); + + return 0; +} + +static char *bnxt_chip_type[] = { + "ASIC", + "FPGA", + "Palladium", + "Unknown" +}; +#define MAX_CHIP_TYPE 3 + +static int +bnxt_package_ver_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct bnxt_softc *softc = arg1; + struct iflib_dma_info dma_data; + char *pkglog = NULL; + char *p; + char *next; + char unk[] = ""; + char *buf = unk; + int rc; + int field; + uint16_t ordinal = BNX_DIR_ORDINAL_FIRST; + uint16_t index; + uint32_t data_len; + + rc = bnxt_hwrm_nvm_find_dir_entry(softc, BNX_DIR_TYPE_PKG_LOG, + &ordinal, BNX_DIR_EXT_NONE, &index, false, + HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_EQ, + &data_len, NULL, NULL); + dma_data.idi_vaddr = NULL; + if (rc == 0 && data_len) { + rc = iflib_dma_alloc(softc->ctx, data_len, &dma_data, + BUS_DMA_NOWAIT); + if (rc == 0) { + rc = bnxt_hwrm_nvm_read(softc, index, 0, data_len, + &dma_data); + if (rc == 0) { + pkglog = dma_data.idi_vaddr; + /* NULL terminate (removes last \n) */ + pkglog[data_len-1] = 0; + + /* Set p = start of last line */ + p = strrchr(pkglog, '\n'); + if (p == NULL) + p = pkglog; + + /* Now find the correct tab delimited field */ + for (field = 0, next = p, + p = strsep(&next, "\t"); + field < + BNX_PKG_LOG_FIELD_IDX_PKG_VERSION && p; + p = strsep(&next, "\t")) { + field++; + } + if (field == BNX_PKG_LOG_FIELD_IDX_PKG_VERSION) + buf = p; + } + } + else + dma_data.idi_vaddr = NULL; + } + + rc = sysctl_handle_string(oidp, buf, 0, req); + if (dma_data.idi_vaddr) + iflib_dma_free(&dma_data); + return rc; +} + +static int +bnxt_hwrm_min_ver_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct bnxt_softc *softc = arg1; + char buf[16]; + uint8_t newver[3]; + int rc; + + sprintf(buf, "%hhu.%hhu.%hhu", softc->ver_info->hwrm_min_major, + softc->ver_info->hwrm_min_minor, softc->ver_info->hwrm_min_update); + + rc = sysctl_handle_string(oidp, buf, sizeof(buf), req); + if (rc || req->newptr == NULL) + return rc; + if (sscanf(buf, "%hhu.%hhu.%hhu%*c", &newver[0], &newver[1], + &newver[2]) != 3) + return EINVAL; + softc->ver_info->hwrm_min_major = newver[0]; + softc->ver_info->hwrm_min_minor = newver[1]; + softc->ver_info->hwrm_min_update = newver[2]; + bnxt_check_hwrm_version(softc); + + return rc; +} + +int +bnxt_create_ver_sysctls(struct bnxt_softc *softc) +{ + struct bnxt_ver_info *vi = softc->ver_info; + struct sysctl_oid *oid = vi->ver_oid; + + if (!oid) + return ENOMEM; + + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "hwrm_if", CTLFLAG_RD, vi->hwrm_if_ver, 0, + "HWRM interface version"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "driver_hwrm_if", CTLFLAG_RD, vi->driver_hwrm_if_ver, 0, + "HWRM firmware version"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "hwrm_fw", CTLFLAG_RD, vi->hwrm_fw_ver, 0, + "HWRM firmware version"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "mgmt_fw", CTLFLAG_RD, vi->mgmt_fw_ver, 0, + "management firmware version"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "netctrl_fw", CTLFLAG_RD, vi->netctrl_fw_ver, 0, + "network control firmware version"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "roce_fw", CTLFLAG_RD, vi->roce_fw_ver, 0, + "RoCE firmware version"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "phy", CTLFLAG_RD, vi->phy_ver, 0, + "PHY version"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "hwrm_fw_name", CTLFLAG_RD, vi->hwrm_fw_name, 0, + "HWRM firmware name"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "mgmt_fw_name", CTLFLAG_RD, vi->mgmt_fw_name, 0, + "management firmware name"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "netctrl_fw_name", CTLFLAG_RD, vi->netctrl_fw_name, 0, + "network control firmware name"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "roce_fw_name", CTLFLAG_RD, vi->roce_fw_name, 0, + "RoCE firmware name"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "phy_vendor", CTLFLAG_RD, vi->phy_vendor, 0, + "PHY vendor name"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "phy_partnumber", CTLFLAG_RD, vi->phy_partnumber, 0, + "PHY vendor part number"); + SYSCTL_ADD_U16(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "chip_num", CTLFLAG_RD, &vi->chip_num, 0, "chip number"); + SYSCTL_ADD_U8(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "chip_rev", CTLFLAG_RD, &vi->chip_rev, 0, "chip revision"); + SYSCTL_ADD_U8(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "chip_metal", CTLFLAG_RD, &vi->chip_metal, 0, "chip metal number"); + SYSCTL_ADD_U8(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "chip_bond_id", CTLFLAG_RD, &vi->chip_bond_id, 0, + "chip bond id"); + SYSCTL_ADD_STRING(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "chip_type", CTLFLAG_RD, vi->chip_type > MAX_CHIP_TYPE ? + bnxt_chip_type[MAX_CHIP_TYPE] : bnxt_chip_type[vi->chip_type], 0, + "RoCE firmware name"); + SYSCTL_ADD_PROC(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "package_ver", CTLTYPE_STRING|CTLFLAG_RD, softc, 0, + bnxt_package_ver_sysctl, "A", + "currently installed package version"); + SYSCTL_ADD_PROC(&vi->ver_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "hwrm_min_ver", CTLTYPE_STRING|CTLFLAG_RWTUN, softc, 0, + bnxt_hwrm_min_ver_sysctl, "A", + "minimum hwrm API vesion to support"); + + return 0; +} + +int +bnxt_create_nvram_sysctls(struct bnxt_nvram_info *ni) +{ + struct sysctl_oid *oid = ni->nvm_oid; + + if (!oid) + return ENOMEM; + + SYSCTL_ADD_U16(&ni->nvm_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "mfg_id", CTLFLAG_RD, &ni->mfg_id, 0, "manufacturer id"); + SYSCTL_ADD_U16(&ni->nvm_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "device_id", CTLFLAG_RD, &ni->device_id, 0, "device id"); + SYSCTL_ADD_U32(&ni->nvm_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "sector_size", CTLFLAG_RD, &ni->sector_size, 0, "sector size"); + SYSCTL_ADD_U32(&ni->nvm_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "size", CTLFLAG_RD, &ni->size, 0, "nvram total size"); + SYSCTL_ADD_U32(&ni->nvm_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "reserved_size", CTLFLAG_RD, &ni->reserved_size, 0, + "total reserved space"); + SYSCTL_ADD_U32(&ni->nvm_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "available_size", CTLFLAG_RD, &ni->available_size, 0, + "total available space"); + + return 0; +} + +static int +bnxt_rss_key_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct bnxt_softc *softc = arg1; + char buf[HW_HASH_KEY_SIZE*2+1] = {0}; + char *p; + int i; + int rc; + + for (p = buf, i=0; ivnic_info.rss_hash_key[i]); + + rc = sysctl_handle_string(oidp, buf, sizeof(buf), req); + if (rc || req->newptr == NULL) + return rc; + + if (strspn(buf, "0123456789abcdefABCDEF") != (HW_HASH_KEY_SIZE * 2)) + return EINVAL; + + for (p = buf, i=0; ivnic_info.rss_hash_key[i]) != 1) + return EINVAL; + p += 2; + } + + if (if_getdrvflags(iflib_get_ifp(softc->ctx)) & IFF_DRV_RUNNING) + bnxt_hwrm_rss_cfg(softc, &softc->vnic_info, + softc->vnic_info.rss_hash_type); + + return rc; +} + +static const char *bnxt_hash_types[] = {"ipv4", "tcp_ipv4", "udp_ipv4", "ipv6", + "tcp_ipv6", "udp_ipv6", NULL}; + +static int bnxt_get_rss_type_str_bit(char *str) +{ + int i; + + for (i=0; bnxt_hash_types[i]; i++) + if (strcmp(bnxt_hash_types[i], str) == 0) + return i; + + return -1; +} + +static int +bnxt_rss_type_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct bnxt_softc *softc = arg1; + char buf[256] = {0}; + char *p; + char *next; + int rc; + int type; + int bit; + + for (type = softc->vnic_info.rss_hash_type; type; + type &= ~(1<= sizeof(bnxt_hash_types) / sizeof(const char *)) + continue; + if (type != softc->vnic_info.rss_hash_type) + strcat(buf, ","); + strcat(buf, bnxt_hash_types[bit]); + } + + rc = sysctl_handle_string(oidp, buf, sizeof(buf), req); + if (rc || req->newptr == NULL) + return rc; + + for (type = 0, next = buf, p = strsep(&next, " ,"); p; + p = strsep(&next, " ,")) { + bit = bnxt_get_rss_type_str_bit(p); + if (bit == -1) + return EINVAL; + type |= 1<vnic_info.rss_hash_type) { + softc->vnic_info.rss_hash_type = type; + if (if_getdrvflags(iflib_get_ifp(softc->ctx)) & IFF_DRV_RUNNING) + bnxt_hwrm_rss_cfg(softc, &softc->vnic_info, + softc->vnic_info.rss_hash_type); + } + + return rc; +} + +static int +bnxt_rx_stall_sysctl(SYSCTL_HANDLER_ARGS) { + struct bnxt_softc *softc = arg1; + int rc; + int val; + + if (softc == NULL) + return EBUSY; + + val = (bool)(softc->vnic_info.flags & BNXT_VNIC_FLAG_BD_STALL); + rc = sysctl_handle_int(oidp, &val, 0, req); + if (rc || !req->newptr) + return rc; + + if (val) + softc->vnic_info.flags |= BNXT_VNIC_FLAG_BD_STALL; + else + softc->vnic_info.flags &= ~BNXT_VNIC_FLAG_BD_STALL; + + if (if_getdrvflags(iflib_get_ifp(softc->ctx)) & IFF_DRV_RUNNING) + rc = bnxt_hwrm_vnic_cfg(softc, &softc->vnic_info); + + return rc; +} + +static int +bnxt_vlan_strip_sysctl(SYSCTL_HANDLER_ARGS) { + struct bnxt_softc *softc = arg1; + int rc; + int val; + + if (softc == NULL) + return EBUSY; + + val = (bool)(softc->vnic_info.flags & BNXT_VNIC_FLAG_VLAN_STRIP); + rc = sysctl_handle_int(oidp, &val, 0, req); + if (rc || !req->newptr) + return rc; + + if (val) + softc->vnic_info.flags |= BNXT_VNIC_FLAG_VLAN_STRIP; + else + softc->vnic_info.flags &= ~BNXT_VNIC_FLAG_VLAN_STRIP; + + if (if_getdrvflags(iflib_get_ifp(softc->ctx)) & IFF_DRV_RUNNING) + rc = bnxt_hwrm_vnic_cfg(softc, &softc->vnic_info); + + return rc; +} + +int +bnxt_create_config_sysctls_pre(struct bnxt_softc *softc) +{ + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(softc->dev); + struct sysctl_oid_list *children; + + children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev));; + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rss_key", + CTLTYPE_STRING|CTLFLAG_RWTUN, softc, 0, bnxt_rss_key_sysctl, "A", + "RSS key"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rss_type", + CTLTYPE_STRING|CTLFLAG_RWTUN, softc, 0, bnxt_rss_type_sysctl, "A", + "RSS type bits"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rx_stall", + CTLTYPE_INT|CTLFLAG_RWTUN, softc, 0, bnxt_rx_stall_sysctl, "I", + "buffer rx packets in hardware until the host posts new buffers"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "vlan_strip", + CTLTYPE_INT|CTLFLAG_RWTUN, softc, 0, bnxt_vlan_strip_sysctl, "I", + "strip VLAN tag in the RX path"); + SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "if_name", CTLFLAG_RD, + iflib_get_ifp(softc->ctx)->if_xname, 0, "interface name"); + + return 0; +} + +static int +bnxt_vlan_only_sysctl(SYSCTL_HANDLER_ARGS) { + struct bnxt_softc *softc = arg1; + int rc; + int val; + + if (softc == NULL) + return EBUSY; + + val = softc->vnic_info.vlan_only; + rc = sysctl_handle_int(oidp, &val, 0, req); + if (rc || !req->newptr) + return rc; + + if (val) + val = 1; + + if (val != softc->vnic_info.vlan_only) { + softc->vnic_info.vlan_only = val; + if (if_getdrvflags(iflib_get_ifp(softc->ctx)) & IFF_DRV_RUNNING) + rc = bnxt_hwrm_cfa_l2_set_rx_mask(softc, + &softc->vnic_info); + } + + return rc; +} + +int +bnxt_create_config_sysctls_post(struct bnxt_softc *softc) +{ + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(softc->dev); + struct sysctl_oid_list *children; + + children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev));; + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "vlan_only", + CTLTYPE_INT|CTLFLAG_RWTUN, softc, 0, bnxt_vlan_only_sysctl, "I", + "require vlan tag on received packets when vlan is enabled"); + + return 0; +} diff --git a/sys/dev/bnxt/bnxt_sysctl.h b/sys/dev/bnxt/bnxt_sysctl.h new file mode 100644 index 00000000000..62b7dcf1e37 --- /dev/null +++ b/sys/dev/bnxt/bnxt_sysctl.h @@ -0,0 +1,41 @@ +/*- + * Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2016 Broadcom, All Rights Reserved. + * The term Broadcom refers to Broadcom Limited and/or its subsidiaries + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 +__FBSDID("$FreeBSD$"); + +#include "bnxt.h" + +int bnxt_init_sysctl_ctx(struct bnxt_softc *softc); +int bnxt_free_sysctl_ctx(struct bnxt_softc *softc); +int bnxt_create_tx_sysctls(struct bnxt_softc *softc, int txr); +int bnxt_create_rx_sysctls(struct bnxt_softc *softc, int rxr); +int bnxt_create_ver_sysctls(struct bnxt_softc *softc); +int bnxt_create_nvram_sysctls(struct bnxt_nvram_info *ni); +int bnxt_create_config_sysctls_pre(struct bnxt_softc *softc); +int bnxt_create_config_sysctls_post(struct bnxt_softc *softc); diff --git a/sys/dev/bnxt/bnxt_txrx.c b/sys/dev/bnxt/bnxt_txrx.c new file mode 100644 index 00000000000..b3e8a12b71b --- /dev/null +++ b/sys/dev/bnxt/bnxt_txrx.c @@ -0,0 +1,641 @@ +/*- + * Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2016 Broadcom, All Rights Reserved. + * The term Broadcom refers to Broadcom Limited and/or its subsidiaries + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include "opt_inet.h" +#include "opt_inet6.h" +#include "opt_rss.h" + +#include "bnxt.h" + +/* + * Function prototypes + */ + +static int bnxt_isc_txd_encap(void *sc, if_pkt_info_t pi); +static void bnxt_isc_txd_flush(void *sc, uint16_t txqid, uint32_t pidx); +static int bnxt_isc_txd_credits_update(void *sc, uint16_t txqid, uint32_t cidx, + bool clear); + +static void bnxt_isc_rxd_refill(void *sc, uint16_t rxqid, uint8_t flid, + uint32_t pidx, uint64_t *paddrs, caddr_t *vaddrs, uint16_t count, + uint16_t buf_size); +static void bnxt_isc_rxd_flush(void *sc, uint16_t rxqid, uint8_t flid, + uint32_t pidx); +static int bnxt_isc_rxd_available(void *sc, uint16_t rxqid, uint32_t idx, + int budget); +static int bnxt_isc_rxd_pkt_get(void *sc, if_rxd_info_t ri); + +static int bnxt_intr(void *sc); + +struct if_txrx bnxt_txrx = { + bnxt_isc_txd_encap, + bnxt_isc_txd_flush, + bnxt_isc_txd_credits_update, + bnxt_isc_rxd_available, + bnxt_isc_rxd_pkt_get, + bnxt_isc_rxd_refill, + bnxt_isc_rxd_flush, + bnxt_intr +}; + +/* + * Device Dependent Packet Transmit and Receive Functions + */ + +static const uint16_t bnxt_tx_lhint[] = { + TX_BD_SHORT_FLAGS_LHINT_LT512, + TX_BD_SHORT_FLAGS_LHINT_LT1K, + TX_BD_SHORT_FLAGS_LHINT_LT2K, + TX_BD_SHORT_FLAGS_LHINT_LT2K, + TX_BD_SHORT_FLAGS_LHINT_GTE2K, +}; + +static int +bnxt_isc_txd_encap(void *sc, if_pkt_info_t pi) +{ + struct bnxt_softc *softc = (struct bnxt_softc *)sc; + struct bnxt_ring *txr = &softc->tx_rings[pi->ipi_qsidx]; + struct tx_bd_long *tbd; + struct tx_bd_long_hi *tbdh; + bool need_hi = false; + uint16_t flags_type; + uint16_t lflags; + uint32_t cfa_meta; + int seg = 0; + + /* If we have offloads enabled, we need to use two BDs. */ + if ((pi->ipi_csum_flags & (CSUM_OFFLOAD | CSUM_TSO | CSUM_IP)) || + pi->ipi_mflags & M_VLANTAG) + need_hi = true; + + /* TODO: Devices before Cu+B1 need to not mix long and short BDs */ + need_hi = true; + + pi->ipi_new_pidx = pi->ipi_pidx; + tbd = &((struct tx_bd_long *)txr->vaddr)[pi->ipi_new_pidx]; + pi->ipi_ndescs = 0; + /* No need to byte-swap the opaque value */ + tbd->opaque = ((pi->ipi_nsegs + need_hi) << 24) | pi->ipi_new_pidx; + tbd->len = htole16(pi->ipi_segs[seg].ds_len); + tbd->addr = htole64(pi->ipi_segs[seg++].ds_addr); + flags_type = ((pi->ipi_nsegs + need_hi) << + TX_BD_SHORT_FLAGS_BD_CNT_SFT) & TX_BD_SHORT_FLAGS_BD_CNT_MASK; + if (pi->ipi_len >= 2048) + flags_type |= TX_BD_SHORT_FLAGS_LHINT_GTE2K; + else + flags_type |= bnxt_tx_lhint[pi->ipi_len >> 9]; + + if (need_hi) { + flags_type |= TX_BD_LONG_TYPE_TX_BD_LONG; + + pi->ipi_new_pidx = RING_NEXT(txr, pi->ipi_new_pidx); + tbdh = &((struct tx_bd_long_hi *)txr->vaddr)[pi->ipi_new_pidx]; + tbdh->mss = htole16(pi->ipi_tso_segsz); + tbdh->hdr_size = htole16((pi->ipi_ehdrlen + pi->ipi_ip_hlen + + pi->ipi_tcp_hlen) >> 1); + tbdh->cfa_action = 0; + lflags = 0; + cfa_meta = 0; + if (pi->ipi_mflags & M_VLANTAG) { + /* TODO: Do we need to byte-swap the vtag here? */ + cfa_meta = TX_BD_LONG_CFA_META_KEY_VLAN_TAG | + pi->ipi_vtag; + cfa_meta |= TX_BD_LONG_CFA_META_VLAN_TPID_TPID8100; + } + tbdh->cfa_meta = htole32(cfa_meta); + if (pi->ipi_csum_flags & CSUM_TSO) { + lflags |= TX_BD_LONG_LFLAGS_LSO | + TX_BD_LONG_LFLAGS_T_IPID; + } + else if(pi->ipi_csum_flags & CSUM_OFFLOAD) { + lflags |= TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM | + TX_BD_LONG_LFLAGS_IP_CHKSUM; + } + else if(pi->ipi_csum_flags & CSUM_IP) { + lflags |= TX_BD_LONG_LFLAGS_IP_CHKSUM; + } + tbdh->lflags = htole16(lflags); + } + else { + flags_type |= TX_BD_SHORT_TYPE_TX_BD_SHORT; + } + + for (; seg < pi->ipi_nsegs; seg++) { + tbd->flags_type = htole16(flags_type); + pi->ipi_new_pidx = RING_NEXT(txr, pi->ipi_new_pidx); + tbd = &((struct tx_bd_long *)txr->vaddr)[pi->ipi_new_pidx]; + tbd->len = htole16(pi->ipi_segs[seg].ds_len); + tbd->addr = htole64(pi->ipi_segs[seg].ds_addr); + flags_type = TX_BD_SHORT_TYPE_TX_BD_SHORT; + } + flags_type |= TX_BD_SHORT_FLAGS_PACKET_END; + tbd->flags_type = htole16(flags_type); + pi->ipi_new_pidx = RING_NEXT(txr, pi->ipi_new_pidx); + + return 0; +} + +static void +bnxt_isc_txd_flush(void *sc, uint16_t txqid, uint32_t pidx) +{ + struct bnxt_softc *softc = (struct bnxt_softc *)sc; + struct bnxt_ring *tx_ring = &softc->tx_rings[txqid]; + + /* pidx is what we last set ipi_new_pidx to */ + BNXT_TX_DB(tx_ring, pidx); + /* TODO: Cumulus+ doesn't need the double doorbell */ + BNXT_TX_DB(tx_ring, pidx); + return; +} + +static int +bnxt_isc_txd_credits_update(void *sc, uint16_t txqid, uint32_t idx, bool clear) +{ + struct bnxt_softc *softc = (struct bnxt_softc *)sc; + struct bnxt_cp_ring *cpr = &softc->tx_cp_rings[txqid]; + struct tx_cmpl *cmpl = (struct tx_cmpl *)cpr->ring.vaddr; + int avail = 0; + uint32_t cons = cpr->cons; + bool v_bit = cpr->v_bit; + bool last_v_bit; + uint32_t last_cons; + uint16_t type; + uint16_t err; + + for (;;) { + last_cons = cons; + last_v_bit = v_bit; + NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); + CMPL_PREFETCH_NEXT(cpr, cons); + + if (!CMP_VALID(&cmpl[cons], v_bit)) + goto done; + + type = cmpl[cons].flags_type & TX_CMPL_TYPE_MASK; + switch (type) { + case TX_CMPL_TYPE_TX_L2: + err = (le16toh(cmpl[cons].errors_v) & + TX_CMPL_ERRORS_BUFFER_ERROR_MASK) >> + TX_CMPL_ERRORS_BUFFER_ERROR_SFT; + if (err) + device_printf(softc->dev, + "TX completion error %u\n", err); + /* No need to byte-swap the opaque value */ + avail += cmpl[cons].opaque >> 24; + /* + * If we're not clearing, iflib only cares if there's + * at least one buffer. Don't scan the whole ring in + * this case. + */ + if (!clear) + goto done; + break; + default: + if (type & 1) { + NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); + if (!CMP_VALID(&cmpl[cons], v_bit)) + goto done; + } + device_printf(softc->dev, + "Unhandled TX completion type %u\n", type); + break; + } + } +done: + + if (clear && avail) { + cpr->cons = last_cons; + cpr->v_bit = last_v_bit; + BNXT_CP_IDX_DISABLE_DB(&cpr->ring, cpr->cons); + } + + return avail; +} + +static void +bnxt_isc_rxd_refill(void *sc, uint16_t rxqid, uint8_t flid, + uint32_t pidx, uint64_t *paddrs, + caddr_t *vaddrs, uint16_t count, uint16_t len) +{ + struct bnxt_softc *softc = (struct bnxt_softc *)sc; + struct bnxt_ring *rx_ring; + struct rx_prod_pkt_bd *rxbd; + uint16_t type; + uint16_t i; + + if (flid == 0) { + rx_ring = &softc->rx_rings[rxqid]; + type = RX_PROD_PKT_BD_TYPE_RX_PROD_PKT; + } + else { + rx_ring = &softc->ag_rings[rxqid]; + type = RX_PROD_AGG_BD_TYPE_RX_PROD_AGG; + } + rxbd = (void *)rx_ring->vaddr; + + for (i=0; iring_size) + pidx = 0; + } + return; +} + +static void +bnxt_isc_rxd_flush(void *sc, uint16_t rxqid, uint8_t flid, + uint32_t pidx) +{ + struct bnxt_softc *softc = (struct bnxt_softc *)sc; + struct bnxt_ring *rx_ring; + + if (flid == 0) + rx_ring = &softc->rx_rings[rxqid]; + else + rx_ring = &softc->ag_rings[rxqid]; + + /* + * We *must* update the completion ring before updating the RX ring + * or we will overrun the completion ring and the device will wedge for + * RX. + */ + if (softc->rx_cp_rings[rxqid].cons != UINT32_MAX) + BNXT_CP_IDX_DISABLE_DB(&softc->rx_cp_rings[rxqid].ring, + softc->rx_cp_rings[rxqid].cons); + /* We're given the last filled RX buffer here, not the next empty one */ + BNXT_RX_DB(rx_ring, RING_NEXT(rx_ring, pidx)); + /* TODO: Cumulus+ doesn't need the double doorbell */ + BNXT_RX_DB(rx_ring, RING_NEXT(rx_ring, pidx)); + return; +} + +static int +bnxt_isc_rxd_available(void *sc, uint16_t rxqid, uint32_t idx, int budget) +{ + struct bnxt_softc *softc = (struct bnxt_softc *)sc; + struct bnxt_cp_ring *cpr = &softc->rx_cp_rings[rxqid]; + struct rx_pkt_cmpl *rcp; + struct rx_tpa_start_cmpl *rtpa; + struct rx_tpa_end_cmpl *rtpae; + struct cmpl_base *cmp = (struct cmpl_base *)cpr->ring.vaddr; + int avail = 0; + uint32_t cons = cpr->cons; + bool v_bit = cpr->v_bit; + uint8_t ags; + int i; + uint16_t type; + uint8_t agg_id; + + for (;;) { + NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); + CMPL_PREFETCH_NEXT(cpr, cons); + + if (!CMP_VALID(&cmp[cons], v_bit)) + goto cmpl_invalid; + + type = le16toh(cmp[cons].type) & CMPL_BASE_TYPE_MASK; + switch (type) { + case CMPL_BASE_TYPE_RX_L2: + rcp = (void *)&cmp[cons]; + ags = (rcp->agg_bufs_v1 & RX_PKT_CMPL_AGG_BUFS_MASK) >> + RX_PKT_CMPL_AGG_BUFS_SFT; + NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); + CMPL_PREFETCH_NEXT(cpr, cons); + + if (!CMP_VALID(&cmp[cons], v_bit)) + goto cmpl_invalid; + + /* Now account for all the AG completions */ + for (i=0; iring, cons, v_bit); + CMPL_PREFETCH_NEXT(cpr, cons); + if (!CMP_VALID(&cmp[cons], v_bit)) + goto cmpl_invalid; + } + avail++; + break; + case CMPL_BASE_TYPE_RX_TPA_END: + rtpae = (void *)&cmp[cons]; + ags = (rtpae->agg_bufs_v1 & + RX_TPA_END_CMPL_AGG_BUFS_MASK) >> + RX_TPA_END_CMPL_AGG_BUFS_SFT; + NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); + CMPL_PREFETCH_NEXT(cpr, cons); + + if (!CMP_VALID(&cmp[cons], v_bit)) + goto cmpl_invalid; + /* Now account for all the AG completions */ + for (i=0; iring, cons, v_bit); + CMPL_PREFETCH_NEXT(cpr, cons); + if (!CMP_VALID(&cmp[cons], v_bit)) + goto cmpl_invalid; + } + avail++; + break; + case CMPL_BASE_TYPE_RX_TPA_START: + rtpa = (void *)&cmp[cons]; + agg_id = (rtpa->agg_id & + RX_TPA_START_CMPL_AGG_ID_MASK) >> + RX_TPA_START_CMPL_AGG_ID_SFT; + softc->tpa_start[agg_id].low = *rtpa; + NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); + CMPL_PREFETCH_NEXT(cpr, cons); + + if (!CMP_VALID(&cmp[cons], v_bit)) + goto cmpl_invalid; + softc->tpa_start[agg_id].high = + ((struct rx_tpa_start_cmpl_hi *)cmp)[cons]; + break; + case CMPL_BASE_TYPE_RX_AGG: + break; + default: + device_printf(softc->dev, + "Unhandled completion type %d on RXQ %d\n", + type, rxqid); + + /* Odd completion types use two completions */ + if (type & 1) { + NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); + CMPL_PREFETCH_NEXT(cpr, cons); + + if (!CMP_VALID(&cmp[cons], v_bit)) + goto cmpl_invalid; + } + break; + } + if (avail > budget) + break; + } +cmpl_invalid: + + return avail; +} + +static int +bnxt_pkt_get_l2(struct bnxt_softc *softc, if_rxd_info_t ri, + struct bnxt_cp_ring *cpr, uint16_t flags_type) +{ + struct rx_pkt_cmpl *rcp; + struct rx_pkt_cmpl_hi *rcph; + struct rx_abuf_cmpl *acp; + uint32_t flags2; + uint32_t errors; + uint8_t ags; + int i; + + rcp = &((struct rx_pkt_cmpl *)cpr->ring.vaddr)[cpr->cons]; + + /* Extract from the first 16-byte BD */ + if (flags_type & RX_PKT_CMPL_FLAGS_RSS_VALID) { + ri->iri_flowid = le32toh(rcp->rss_hash); + /* + * TODO: Extract something useful from rcp->rss_hash_type + * (undocumented) + * May be documented in the "LSI ES" + * also check the firmware code. + */ + ri->iri_rsstype = M_HASHTYPE_OPAQUE; + } + else { + ri->iri_rsstype = M_HASHTYPE_NONE; + } + ags = (rcp->agg_bufs_v1 & RX_PKT_CMPL_AGG_BUFS_MASK) >> + RX_PKT_CMPL_AGG_BUFS_SFT; + ri->iri_nfrags = ags + 1; + /* No need to byte-swap the opaque value */ + ri->iri_frags[0].irf_flid = (rcp->opaque >> 16) & 0xff; + ri->iri_frags[0].irf_idx = rcp->opaque & 0xffff; + ri->iri_frags[0].irf_len = le16toh(rcp->len); + ri->iri_len = le16toh(rcp->len); + + /* Now the second 16-byte BD */ + NEXT_CP_CONS_V(&cpr->ring, cpr->cons, cpr->v_bit); + ri->iri_cidx = RING_NEXT(&cpr->ring, ri->iri_cidx); + rcph = &((struct rx_pkt_cmpl_hi *)cpr->ring.vaddr)[cpr->cons]; + + flags2 = le32toh(rcph->flags2); + errors = le16toh(rcph->errors_v2); + if ((flags2 & RX_PKT_CMPL_FLAGS2_META_FORMAT_MASK) == + RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN) { + ri->iri_flags |= M_VLANTAG; + /* TODO: Should this be the entire 16-bits? */ + ri->iri_vtag = le32toh(rcph->metadata) & + (RX_PKT_CMPL_METADATA_VID_MASK | RX_PKT_CMPL_METADATA_DE | + RX_PKT_CMPL_METADATA_PRI_MASK); + } + if (flags2 & RX_PKT_CMPL_FLAGS2_IP_CS_CALC) { + ri->iri_csum_flags |= CSUM_IP_CHECKED; + if (!(errors & RX_PKT_CMPL_ERRORS_IP_CS_ERROR)) + ri->iri_csum_flags |= CSUM_IP_VALID; + } + if (flags2 & RX_PKT_CMPL_FLAGS2_L4_CS_CALC) { + ri->iri_csum_flags |= CSUM_L4_CALC; + if (!(errors & RX_PKT_CMPL_ERRORS_L4_CS_ERROR)) { + ri->iri_csum_flags |= CSUM_L4_VALID; + ri->iri_csum_data = 0xffff; + } + } + + /* And finally the ag ring stuff. */ + for (i=1; i < ri->iri_nfrags; i++) { + NEXT_CP_CONS_V(&cpr->ring, cpr->cons, cpr->v_bit); + ri->iri_cidx = RING_NEXT(&cpr->ring, ri->iri_cidx); + acp = &((struct rx_abuf_cmpl *)cpr->ring.vaddr)[cpr->cons]; + + /* No need to byte-swap the opaque value */ + ri->iri_frags[i].irf_flid = (acp->opaque >> 16 & 0xff); + ri->iri_frags[i].irf_idx = acp->opaque & 0xffff; + ri->iri_frags[i].irf_len = le16toh(acp->len); + ri->iri_len += le16toh(acp->len); + } + + return 0; +} + +static int +bnxt_pkt_get_tpa(struct bnxt_softc *softc, if_rxd_info_t ri, + struct bnxt_cp_ring *cpr, uint16_t flags_type) +{ + struct rx_tpa_end_cmpl *agend = + &((struct rx_tpa_end_cmpl *)cpr->ring.vaddr)[cpr->cons]; + struct rx_tpa_end_cmpl_hi *agendh; + struct rx_abuf_cmpl *acp; + struct bnxt_full_tpa_start *tpas; + uint32_t flags2; + uint8_t ags; + uint8_t agg_id; + int i; + + /* Get the agg_id */ + agg_id = (agend->agg_id & RX_TPA_END_CMPL_AGG_ID_MASK) >> + RX_TPA_END_CMPL_AGG_ID_SFT; + tpas = &softc->tpa_start[agg_id]; + + /* Extract from the first 16-byte BD */ + if (le16toh(tpas->low.flags_type) & RX_TPA_START_CMPL_FLAGS_RSS_VALID) { + ri->iri_flowid = le32toh(tpas->low.rss_hash); + /* + * TODO: Extract something useful from tpas->low.rss_hash_type + * (undocumented) + * May be documented in the "LSI ES" + * also check the firmware code. + */ + ri->iri_rsstype = M_HASHTYPE_OPAQUE; + } + else { + ri->iri_rsstype = M_HASHTYPE_NONE; + } + ags = (agend->agg_bufs_v1 & RX_TPA_END_CMPL_AGG_BUFS_MASK) >> + RX_TPA_END_CMPL_AGG_BUFS_SFT; + ri->iri_nfrags = ags + 1; + /* No need to byte-swap the opaque value */ + ri->iri_frags[0].irf_flid = (tpas->low.opaque >> 16) & 0xff; + ri->iri_frags[0].irf_idx = tpas->low.opaque & 0xffff; + ri->iri_frags[0].irf_len = le16toh(tpas->low.len); + ri->iri_len = le16toh(tpas->low.len); + + /* Now the second 16-byte BD */ + NEXT_CP_CONS_V(&cpr->ring, cpr->cons, cpr->v_bit); + ri->iri_cidx = RING_NEXT(&cpr->ring, ri->iri_cidx); + agendh = &((struct rx_tpa_end_cmpl_hi *)cpr->ring.vaddr)[cpr->cons]; + + flags2 = le32toh(tpas->high.flags2); + if ((flags2 & RX_TPA_START_CMPL_FLAGS2_META_FORMAT_MASK) == + RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN) { + ri->iri_flags |= M_VLANTAG; + /* TODO: Should this be the entire 16-bits? */ + ri->iri_vtag = le32toh(tpas->high.metadata) & + (RX_TPA_START_CMPL_METADATA_VID_MASK | + RX_TPA_START_CMPL_METADATA_DE | + RX_TPA_START_CMPL_METADATA_PRI_MASK); + } + if (flags2 & RX_TPA_START_CMPL_FLAGS2_IP_CS_CALC) { + ri->iri_csum_flags |= CSUM_IP_CHECKED; + ri->iri_csum_flags |= CSUM_IP_VALID; + } + if (flags2 & RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC) { + ri->iri_csum_flags |= CSUM_L4_CALC; + ri->iri_csum_flags |= CSUM_L4_VALID; + ri->iri_csum_data = 0xffff; + } + + /* Now the ag ring stuff. */ + for (i=1; i < ri->iri_nfrags; i++) { + NEXT_CP_CONS_V(&cpr->ring, cpr->cons, cpr->v_bit); + ri->iri_cidx = RING_NEXT(&cpr->ring, ri->iri_cidx); + acp = &((struct rx_abuf_cmpl *)cpr->ring.vaddr)[cpr->cons]; + + /* No need to byte-swap the opaque value */ + ri->iri_frags[i].irf_flid = (acp->opaque >> 16) & 0xff; + ri->iri_frags[i].irf_idx = acp->opaque & 0xffff; + ri->iri_frags[i].irf_len = le16toh(acp->len); + ri->iri_len += le16toh(acp->len); + } + + /* And finally, the empty BD at the end... */ + ri->iri_nfrags++; + /* No need to byte-swap the opaque value */ + ri->iri_frags[i].irf_flid = (agend->opaque >> 16) % 0xff; + ri->iri_frags[i].irf_idx = agend->opaque & 0xffff; + ri->iri_frags[i].irf_len = le16toh(agend->len); + ri->iri_len += le16toh(agend->len); + + return 0; +} + +/* If we return anything but zero, iflib will assert... */ +static int +bnxt_isc_rxd_pkt_get(void *sc, if_rxd_info_t ri) +{ + struct bnxt_softc *softc = (struct bnxt_softc *)sc; + struct bnxt_cp_ring *cpr = &softc->rx_cp_rings[ri->iri_qsidx]; + struct cmpl_base *cmp; + uint16_t flags_type; + uint16_t type; + + for (;;) { + NEXT_CP_CONS_V(&cpr->ring, cpr->cons, cpr->v_bit); + ri->iri_cidx = RING_NEXT(&cpr->ring, ri->iri_cidx); + CMPL_PREFETCH_NEXT(cpr, cpr->cons); + cmp = &((struct cmpl_base *)cpr->ring.vaddr)[cpr->cons]; + + flags_type = le16toh(cmp->type); + type = flags_type & CMPL_BASE_TYPE_MASK; + + switch (type) { + case CMPL_BASE_TYPE_RX_L2: + return bnxt_pkt_get_l2(softc, ri, cpr, flags_type); + case CMPL_BASE_TYPE_RX_TPA_END: + return bnxt_pkt_get_tpa(softc, ri, cpr, flags_type); + case CMPL_BASE_TYPE_RX_TPA_START: + NEXT_CP_CONS_V(&cpr->ring, cpr->cons, cpr->v_bit); + ri->iri_cidx = RING_NEXT(&cpr->ring, ri->iri_cidx); + CMPL_PREFETCH_NEXT(cpr, cpr->cons); + break; + default: + device_printf(softc->dev, + "Unhandled completion type %d on RXQ %d get\n", + type, ri->iri_qsidx); + if (type & 1) { + NEXT_CP_CONS_V(&cpr->ring, cpr->cons, + cpr->v_bit); + ri->iri_cidx = RING_NEXT(&cpr->ring, + ri->iri_cidx); + CMPL_PREFETCH_NEXT(cpr, cpr->cons); + } + break; + } + } + + return 0; +} + +static int +bnxt_intr(void *sc) +{ + struct bnxt_softc *softc = (struct bnxt_softc *)sc; + + device_printf(softc->dev, "STUB: %s @ %s:%d\n", __func__, __FILE__, __LINE__); + return ENOSYS; +} diff --git a/sys/dev/bnxt/convert_hsi.pl b/sys/dev/bnxt/convert_hsi.pl new file mode 100755 index 00000000000..b8a9887d720 --- /dev/null +++ b/sys/dev/bnxt/convert_hsi.pl @@ -0,0 +1,356 @@ +#!/usr/bin/env perl + +# This script cleans up the "official" Broadcom hsi_struct_defs.h file as distributed +# to something somewhat more programmer friendly. +# +# $FreeBSD$ + +my $do_decode = 0; + +if (! -f $ARGV[0]) { + print "Input file not specified (should be path to hsi_struct_defs.h)\n"; + exit 1; +} + +if (!open(IN, "<", $ARGV[0])) { + print "Failure to open input file\n"; + exit 1; +} + +if (!open(OUT, ">", "hsi_struct_def.h")) { + print "Failure to open output file\n"; + exit 1; +} + +$/=undef; +my $header = ; +close IN; + +print OUT < +__FBSDID("\$FreeBSD\$"); + +END_OF_NOTICE + +# Convert line endings +$header =~ s/\r\n/\n/gs; + +# Convert arrays of two u32_t to a single uint64_t +$header =~ s/\bu32_t(\s+[a-zA-Z0-9_]+)\[2\]/uint64_t$1/gs; + +# Convert uint32_t *_lo/uint32_t *_hi to a single uint64_t +$header =~ s/\bu32_t(\s+[a-zA-Z0-9_]+)_lo;\s*\r?\n\s*u32_t(\s+[a-zA-Z0-9_]+)_hi/uint64_t$1/gs; + +# Convert types +$header =~ s/\bu([0-9]+)_t\b/uint$1_t/gs; + +# Convert literals +$header =~ s/\b((?:0x)?[0-9a-f]+)UL/UINT32_C($1)/gs; + +# Strip comments +#$header =~ s/^(\s*[^\/\s][^\/]+?)\s*\/\*.*?\*\/\s*?$/$1/gm; +#$header =~ s/[ \t]*\/\*.*?\*\/\s*?\n?//gs; + +# Pack structs +#$header =~ s/}(\s+)([^\s]+_t[,;])/} __attribute__((packed))$1$2/gs; + +# Normalize indent +$header =~ s/( ) +(#define)/$1$2/gs; +$header =~ s/^(}[^\n]*;)\n([^\n])/$1\n\n$2/gsm; +$header =~ s/([^\n])\n(typedef)/$1\n\n$2/gs; +$header =~ s/ /\t/g; +$header =~ s/ /\t/g; +$header =~ s/([^\s]\t+) +/$1/g; + +# Remove typedefs and pack structs +$header =~ s/^typedef struct (.*?)\n{\n(.*?)}[^\n]*;/struct $1 {\n$2} __attribute__((packed));/gsm; + +print OUT $header; +close OUT; + +if ($do_decode) { + if(!open(OUT, ">", "hsi_struct_decode.c")) { + print "Failure to open decoder output file\n"; + exit 1; + } + + print OUT < + __FBSDID("\$FreeBSD\$"); + +END_OF_NOTICE + + if(!open(HDR, ">", "hsi_struct_decode.h")) { + print "Failure to open decoder output header file\n"; + exit 1; + } + + print HDR <\n#include \n#include \n#include \"hsi_struct_def_dpdk.h\"\n#include \"hsi_struct_decode.h\"\n#include \"hsi_struct_decode.h\"\n\n"; + print HDR "#ifdef HSI_DEBUG\n#include \"hsi_struct_def_dpdk.h\"\n\n"; + + my $hdr_defs = ''; + + sub print_single_val + { + my $field=shift; + my $type=shift; + my $max_field_len=shift; + my $name = shift; + my $macroshash = shift; + my %macros = %$macroshash; + $macrosref = shift; + my @macros = @$macrosref; + $macrosref = shift; + my @fields = @$macrosref; + + if ($type eq 'uint32_t') { + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s = 0x%%08\"PRIX32\"\\n\", data->$field);\n",$max_field_len,$field; + } + elsif ($type eq 'uint16_t') { + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s = 0x%%04\"PRIX16\"\\n\", data->$field);\n",$max_field_len,$field; + } + elsif ($type eq 'uint8_t') { + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s = 0x%%02\"PRIX8\"\\n\", data->$field);\n",$max_field_len,$field; + } + elsif ($type eq 'uint64_t') { + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s = 0x%%016\"PRIX64\"\\n\", data->$field);\n",$max_field_len,$field; + } + elsif ($type eq 'char') { + if ($field =~ s/\[([0-9]+)\]//) { + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s = \\\"%%.$1s\\\"\\n\", data->$field);\n",$max_field_len,$field; + } + else { + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s = 0x%%02\"PRIX8\"\\n\", data->$field);\n",$max_field_len,$field; + } + } + else { + print "Unhandled type: '$type'\n"; + } + + my $macro_prefix = uc($name).'_'.uc($field).'_'; + # Special handling for the common flags_type field + $macro_prefix =~ s/FLAGS_TYPE_$/FLAGS_/ if ($field eq 'flags_type'); + # Special handling for _hi types + $macro_prefix =~ s/_HI_/_/ if ($name =~ /_hi$/); + + $macro_prefix =~ s/\[[0-9]+\]//; + my %vmacros; + my $vmacros_have_mask = 0; + my @vmacros; + my %subfields; + my $all_single_bits=1; + MACRO: + foreach my $macro (@macros) { + if ($macro =~ /^$macro_prefix(.*)_MASK$/) { + my $macro = $&; + my $maskdef = $macros{$macro}; + my $subfield = $1; + my $subfield_value = "(data->$field & $macro)"; + if (defined $macros{"$macro_prefix$subfield\_SFT"}) { + $subfield_value = "($subfield_value >> $macro_prefix$subfield\_SFT)"; + } + $maskdef =~ s/[x0 ]//g; + if ($type eq 'uint64_t') { + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s $subfield = %%0*\" PRIX64 \"\\n\", %u, $subfield_value);\n", $max_field_len, '', length($maskdef); + } + else { + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s $subfield = %%0*X\\n\", %u, $subfield_value);\n", $max_field_len, '', length($maskdef); + } + delete $$macroshash{$macro}; + } + elsif ($macro =~ /^$macro_prefix(.*)_SFT$/) { + delete $$macroshash{$macro}; + } + elsif ($macro =~ /^$macro_prefix\MASK$/) { + $vmacros_have_mask = 1; + delete $$macroshash{$macro}; + } + elsif ($macro =~ /^$macro_prefix(.*)$/) { + my $macro = $&; + my $subfield = $1; + + # Check for longer fields with the same base... ie: link and link_speed + foreach my $extra_field (@fields) { + next if ($extra_field eq $field); + if ($extra_field =~ /^$field/) { + my $extra_prefix = uc($name).'_'.uc($extra_field).'_'; + next MACRO if ($macro =~ /^$extra_prefix/); + } + } + + push @vmacros, $macro; + my $macroeval = $macros{$macro}; + $macroeval =~ s/UINT32_C\((.*?)\)/$1/g; + $vmacros{$macro} = eval("$macroeval"); + $subfields{$macro} = $subfield; + + $all_single_bits = 0 if ($vmacros{$macro} & ($vmacros{$macro}-1)); + $all_single_bits = 0 if ($vmacros{$macro} == 0); + } + } + if ($all_single_bits) { + foreach my $macro (@vmacros) { + my $subfield_value = "(data->$field & $macro)"; + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s $subfields{$macro} : %%s\\n\", $subfield_value?\"ON\":\"OFF\");\n", $max_field_len, ''; + delete $$macroshash{$macro}; + } + } + else { + printf OUT "\tRTE_LOG(DEBUG, PMD, \" % *s Value : %%s\\n\",\n", $max_field_len, ''; + foreach my $macro (@vmacros) { + my $subfield_value = "data->$field"; + $subfield_value = "($subfield_value & $macro_prefix\MASK)" if $vmacros_have_mask; + print OUT "\t\t$subfield_value == $macro ? \"$subfields{$macro}\" :\n"; + delete $$macroshash{$macro}; + } + print OUT "\t\t\"Unknown\");\n"; + } + } + + while ($header =~ /^typedef\s+struct\s+(.*?)\s+{(.*?)^}/msg) { + my ($name,$def) = ($1, $2); + my @fields=(); + my %type=(); + my @macros=(); + my %macros=(); + my $max_field_len=0; + + # First, pull out all the fields in order... + while($def =~ /^\s*([^\s#\/]+?)\s+([^;\/\s]+?)\s*;/mg) { + my ($type, $name) = ($1, $2); + push @fields, $name; + $type{$name}=$type; + $max_field_len = length($name) if length($name) > $max_field_len; + } + # Now, pull out the macros... + while($def =~ /^\s*\#define\s+([^\s]+?)\s+(.*?)\s*$/mg) { + push @macros, $1; + $macros{$1}=$2; + } + + # Now, generate code to print the struct... + print OUT "void decode_$name(const char *string __rte_unused, struct $name *data) {\n\tRTE_LOG(DEBUG, PMD, \"$name\\n\");\n"; + print HDR "void decode_$name(const char *string __rte_unused, struct $name *data);\n"; + $hdr_defs .= "#define decode_$name(x, y) {}\n"; + foreach my $field (@fields) { + if ($field =~ /\[([0-9]+)\]/) { + if ($type{$field} eq 'char') { + print_single_val($field, $type{$field}, $max_field_len, $name, \%macros, \@macros, \@fields); + } + else { + foreach my $idx (0..$1-1) { + my $item = $field; + $item =~ s/\[[0-9]+\]/[$idx]/; + print_single_val($item, $type{$field}, $max_field_len, $name, \%macros, \@macros, \@fields); + } + } + } + else { + print_single_val($field, $type{$field}, $max_field_len, $name, \%macros, \@macros, \@fields); + } + } + # print "Unhandled macros:\n",join("\n", keys %macros),"\n" if (keys %macros > 0); + print OUT "}\n\n"; + } + print OUT "#endif\n"; + + print HDR "#else\n"; + print HDR $hdr_defs; + print HDR "#endif\n"; + close OUT; + close HDR; +} diff --git a/sys/dev/bnxt/hsi_struct_def.h b/sys/dev/bnxt/hsi_struct_def.h new file mode 100644 index 00000000000..d55efee3e6c --- /dev/null +++ b/sys/dev/bnxt/hsi_struct_def.h @@ -0,0 +1,17576 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2016 Broadcom, All Rights Reserved. + * The term Broadcom refers to Broadcom Limited and/or its subsidiaries + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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 COPYRIGHT HOLDERS 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 COPYRIGHT + * OWNER 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 +__FBSDID("$FreeBSD$"); + +/**************************************************************************** + * + * Description: Definition of HSI data structures + * + * Date: 07/26/16 21:30:37 + * + * Note: This file is scripted generated by hsi_decode.py. + * DO NOT modify this file manually !!!! + * + ****************************************************************************/ +#ifndef _HSI_STRUCT_DEF_EXTERNAL_H_ +#define _HSI_STRUCT_DEF_EXTERNAL_H_ + +/* + * per-context HW statistics -- chip view + * Reference to stat_ctx_stat_xxx for + */ + +struct ctx_hw_stats { + uint64_t rx_ucast_pkts; + uint64_t rx_mcast_pkts; + uint64_t rx_bcast_pkts; + uint64_t rx_discard_pkts; + uint64_t rx_drop_pkts; + uint64_t rx_ucast_bytes; + uint64_t rx_mcast_bytes; + uint64_t rx_bcast_bytes; + uint64_t tx_ucast_pkts; + uint64_t tx_mcast_pkts; + uint64_t tx_bcast_pkts; + uint64_t tx_discard_pkts; + uint64_t tx_drop_pkts; + uint64_t tx_ucast_bytes; + uint64_t tx_mcast_bytes; + uint64_t tx_bcast_bytes; + uint64_t tpa_pkts; + uint64_t tpa_bytes; + uint64_t tpa_events; + uint64_t tpa_aborts; +} __attribute__((packed)); + +/* BD Ring Structures */ +/* + * Description: This structure is used to inform the NIC of a location for and + * an aggregation buffer that will be used for packet data that is received. An + * aggregation buffer creates a different kind of completion operation for a + * packet where a variable number of BDs may be used to place the packet in the + * host. RX Rings that have aggregation buffers are known as aggregation rings + * and must contain only aggregation buffers. + */ +/* + * Note: BD Ring structures are written by the driver to TX Rings and RX Rings + * to indicate to the chip there is more buffer space in the host that needs to + * be transmitted or is available for receive data. + */ +/* BD Base (8 bytes) */ + +struct bd_base { + uint8_t type; + /* This value identifies the type of buffer descriptor. */ + #define BD_BASE_TYPE_MASK UINT32_C(0x3f) + #define BD_BASE_TYPE_SFT 0 + /* + * Indicates that this BD is 16B long and is used for normal L2 + * packet transmission. + */ + #define BD_BASE_TYPE_TX_BD_SHORT UINT32_C(0x0) + /* + * Indicates that this BD is 1BB long and is an empty TX BD. Not + * valid for use by the driver. + */ + #define BD_BASE_TYPE_TX_BD_EMPTY UINT32_C(0x1) + /* + * Indicates that this BD is 16B long and is an RX Producer (ie. + * empty) buffer descriptor. + */ + #define BD_BASE_TYPE_RX_PROD_PKT UINT32_C(0x4) + /* + * Indicates that this BD is 16B long and is an RX Producer + * Buffer BD. + */ + #define BD_BASE_TYPE_RX_PROD_BFR UINT32_C(0x5) + /* + * Indicates that this BD is 16B long and is an RX Producer + * Assembly Buffer Descriptor. + */ + #define BD_BASE_TYPE_RX_PROD_AGG UINT32_C(0x6) + /* + * Indicates that this BD is 32B long and is used for normal L2 + * packet transmission. + */ + #define BD_BASE_TYPE_TX_BD_LONG UINT32_C(0x10) + uint8_t unused_1[7]; +} __attribute__((packed)); + +/* Short TX BD (16 bytes) */ + +struct tx_bd_short { + uint16_t flags_type; + /* + * All bits in this field must be valid on the first BD of a packet. + * Only the packet_end bit must be valid for the remaining BDs of a + * packet. + */ + /* This value identifies the type of buffer descriptor. */ + #define TX_BD_SHORT_TYPE_MASK UINT32_C(0x3f) + #define TX_BD_SHORT_TYPE_SFT 0 + /* + * Indicates that this BD is 16B long and is used for normal L2 + * packet transmission. + */ + #define TX_BD_SHORT_TYPE_TX_BD_SHORT UINT32_C(0x0) + /* + * If set to 1, the packet ends with the data in the buffer pointed to + * by this descriptor. This flag must be valid on every BD. + */ + #define TX_BD_SHORT_FLAGS_PACKET_END UINT32_C(0x40) + /* + * If set to 1, the device will not generate a completion for this + * transmit packet unless there is an error in it's processing. If this + * bit is set to 0, then the packet will be completed normally. This bit + * must be valid only on the first BD of a packet. + */ + #define TX_BD_SHORT_FLAGS_NO_CMPL UINT32_C(0x80) + /* + * This value indicates how many 16B BD locations are consumed in the + * ring by this packet. A value of 1 indicates that this BD is the only + * BD (and that the it is a short BD). A value of 3 indicates either 3 + * short BDs or 1 long BD and one short BD in the packet. A value of 0 + * indicates that there are 32 BD locations in the packet (the maximum). + * This field is valid only on the first BD of a packet. + */ + #define TX_BD_SHORT_FLAGS_BD_CNT_MASK UINT32_C(0x1f00) + #define TX_BD_SHORT_FLAGS_BD_CNT_SFT 8 + /* + * This value is a hint for the length of the entire packet. It is used + * by the chip to optimize internal processing. The packet will be + * dropped if the hint is too short. This field is valid only on the + * first BD of a packet. + */ + #define TX_BD_SHORT_FLAGS_LHINT_MASK UINT32_C(0x6000) + #define TX_BD_SHORT_FLAGS_LHINT_SFT 13 + /* indicates packet length < 512B */ + #define TX_BD_SHORT_FLAGS_LHINT_LT512 (UINT32_C(0x0) << 13) + /* indicates 512 <= packet length < 1KB */ + #define TX_BD_SHORT_FLAGS_LHINT_LT1K (UINT32_C(0x1) << 13) + /* indicates 1KB <= packet length < 2KB */ + #define TX_BD_SHORT_FLAGS_LHINT_LT2K (UINT32_C(0x2) << 13) + /* indicates packet length >= 2KB */ + #define TX_BD_SHORT_FLAGS_LHINT_GTE2K (UINT32_C(0x3) << 13) + #define TX_BD_SHORT_FLAGS_LHINT_LAST TX_BD_SHORT_FLAGS_LHINT_GTE2K + /* + * If set to 1, the device immediately updates the Send Consumer Index + * after the buffer associated with this descriptor has been transferred + * via DMA to NIC memory from host memory. An interrupt may or may not + * be generated according to the state of the interrupt avoidance + * mechanisms. If this bit is set to 0, then the Consumer Index is only + * updated as soon as one of the host interrupt coalescing conditions + * has been met. This bit must be valid on the first BD of a packet. + */ + #define TX_BD_SHORT_FLAGS_COAL_NOW UINT32_C(0x8000) + /* + * All bits in this field must be valid on the first BD of a packet. + * Only the packet_end bit must be valid for the remaining BDs of a + * packet. + */ + #define TX_BD_SHORT_FLAGS_MASK UINT32_C(0xffc0) + #define TX_BD_SHORT_FLAGS_SFT 6 + uint16_t len; + /* + * This is the length of the host physical buffer this BD describes in + * bytes. This field must be valid on all BDs of a packet. + */ + uint32_t opaque; + /* + * The opaque data field is pass through to the completion and can be + * used for any data that the driver wants to associate with the + * transmit BD. This field must be valid on the first BD of a packet. + */ + uint64_t addr; + /* + * This is the host physical address for the portion of the packet + * described by this TX BD. This value must be valid on all BDs of a + * packet. + */ +} __attribute__((packed)); + +/* Long TX BD (32 bytes split to 2 16-byte struct) */ + +struct tx_bd_long { + uint16_t flags_type; + /* + * All bits in this field must be valid on the first BD of a packet. + * Only the packet_end bit must be valid for the remaining BDs of a + * packet. + */ + /* This value identifies the type of buffer descriptor. */ + #define TX_BD_LONG_TYPE_MASK UINT32_C(0x3f) + #define TX_BD_LONG_TYPE_SFT 0 + /* + * Indicates that this BD is 32B long and is used for normal L2 + * packet transmission. + */ + #define TX_BD_LONG_TYPE_TX_BD_LONG UINT32_C(0x10) + /* + * If set to 1, the packet ends with the data in the buffer pointed to + * by this descriptor. This flag must be valid on every BD. + */ + #define TX_BD_LONG_FLAGS_PACKET_END UINT32_C(0x40) + /* + * If set to 1, the device will not generate a completion for this + * transmit packet unless there is an error in it's processing. If this + * bit is set to 0, then the packet will be completed normally. This bit + * must be valid only on the first BD of a packet. + */ + #define TX_BD_LONG_FLAGS_NO_CMPL UINT32_C(0x80) + /* + * This value indicates how many 16B BD locations are consumed in the + * ring by this packet. A value of 1 indicates that this BD is the only + * BD (and that the it is a short BD). A value of 3 indicates either 3 + * short BDs or 1 long BD and one short BD in the packet. A value of 0 + * indicates that there are 32 BD locations in the packet (the maximum). + * This field is valid only on the first BD of a packet. + */ + #define TX_BD_LONG_FLAGS_BD_CNT_MASK UINT32_C(0x1f00) + #define TX_BD_LONG_FLAGS_BD_CNT_SFT 8 + /* + * This value is a hint for the length of the entire packet. It is used + * by the chip to optimize internal processing. The packet will be + * dropped if the hint is too short. This field is valid only on the + * first BD of a packet. + */ + #define TX_BD_LONG_FLAGS_LHINT_MASK UINT32_C(0x6000) + #define TX_BD_LONG_FLAGS_LHINT_SFT 13 + /* indicates packet length < 512B */ + #define TX_BD_LONG_FLAGS_LHINT_LT512 (UINT32_C(0x0) << 13) + /* indicates 512 <= packet length < 1KB */ + #define TX_BD_LONG_FLAGS_LHINT_LT1K (UINT32_C(0x1) << 13) + /* indicates 1KB <= packet length < 2KB */ + #define TX_BD_LONG_FLAGS_LHINT_LT2K (UINT32_C(0x2) << 13) + /* indicates packet length >= 2KB */ + #define TX_BD_LONG_FLAGS_LHINT_GTE2K (UINT32_C(0x3) << 13) + #define TX_BD_LONG_FLAGS_LHINT_LAST TX_BD_LONG_FLAGS_LHINT_GTE2K + /* + * If set to 1, the device immediately updates the Send Consumer Index + * after the buffer associated with this descriptor has been transferred + * via DMA to NIC memory from host memory. An interrupt may or may not + * be generated according to the state of the interrupt avoidance + * mechanisms. If this bit is set to 0, then the Consumer Index is only + * updated as soon as one of the host interrupt coalescing conditions + * has been met. This bit must be valid on the first BD of a packet. + */ + #define TX_BD_LONG_FLAGS_COAL_NOW UINT32_C(0x8000) + /* + * All bits in this field must be valid on the first BD of a packet. + * Only the packet_end bit must be valid for the remaining BDs of a + * packet. + */ + #define TX_BD_LONG_FLAGS_MASK UINT32_C(0xffc0) + #define TX_BD_LONG_FLAGS_SFT 6 + uint16_t len; + /* + * This is the length of the host physical buffer this BD describes in + * bytes. This field must be valid on all BDs of a packet. + */ + uint32_t opaque; + /* + * The opaque data field is pass through to the completion and can be + * used for any data that the driver wants to associate with the + * transmit BD. This field must be valid on the first BD of a packet. + */ + uint64_t addr; + /* + * This is the host physical address for the portion of the packet + * described by this TX BD. This value must be valid on all BDs of a + * packet. + */ +} __attribute__((packed)); + +/* last 16 bytes of Long TX BD */ + +struct tx_bd_long_hi { + uint16_t lflags; + /* + * All bits in this field must be valid on the first BD of a packet. + * Their value on other BDs of the packet will be ignored. + */ + /* + * If set to 1, the controller replaces the TCP/UPD checksum fields of + * normal TCP/UPD checksum, or the inner TCP/UDP checksum field of the + * encapsulated TCP/UDP packets with the hardware calculated TCP/UDP + * checksum for the packet associated with this descriptor. The flag is + * ignored if the LSO flag is set. This bit must be valid on the first + * BD of a packet. + */ + #define TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM UINT32_C(0x1) + /* + * If set to 1, the controller replaces the IP checksum of the normal + * packets, or the inner IP checksum of the encapsulated packets with + * the hardware calculated IP checksum for the packet associated with + * this descriptor. This bit must be valid on the first BD of a packet. + */ + #define TX_BD_LONG_LFLAGS_IP_CHKSUM UINT32_C(0x2) + /* + * If set to 1, the controller will not append an Ethernet CRC to the + * end of the frame. This bit must be valid on the first BD of a packet. + * Packet must be 64B or longer when this flag is set. It is not useful + * to use this bit with any form of TX offload such as CSO or LSO. The + * intent is that the packet from the host already has a valid Ethernet + * CRC on the packet. + */ + #define TX_BD_LONG_LFLAGS_NOCRC UINT32_C(0x4) + /* + * If set to 1, the device will record the time at which the packet was + * actually transmitted at the TX MAC. This bit must be valid on the + * first BD of a packet. + */ + #define TX_BD_LONG_LFLAGS_STAMP UINT32_C(0x8) + /* + * If set to 1, The controller replaces the tunnel IP checksum field + * with hardware calculated IP checksum for the IP header of the packet + * associated with this descriptor. For outer UDP checksum, global outer + * UDP checksum TE_NIC register needs to be enabled. If the global outer + * UDP checksum TE_NIC register bit is set, outer UDP checksum will be + * calculated for the following cases: 1. Packets with tcp_udp_chksum + * flag set to offload checksum for inner packet AND the inner packet is + * TCP/UDP. If the inner packet is ICMP for example (non-TCP/UDP), even + * if the tcp_udp_chksum is set, the outer UDP checksum will not be + * calculated. 2. Packets with lso flag set which implies inner TCP + * checksum calculation as part of LSO operation. + */ + #define TX_BD_LONG_LFLAGS_T_IP_CHKSUM UINT32_C(0x10) + /* + * If set to 1, the device will treat this packet with LSO(Large Send + * Offload) processing for both normal or encapsulated packets, which is + * a form of TCP segmentation. When this bit is 1, the hdr_size and mss + * fields must be valid. The driver doesn't need to set t_ip_chksum, + * ip_chksum, and tcp_udp_chksum flags since the controller will replace + * the appropriate checksum fields for segmented packets. When this bit + * is 1, the hdr_size and mss fields must be valid. + */ + #define TX_BD_LONG_LFLAGS_LSO UINT32_C(0x20) + /* + * If set to zero when LSO is '1', then the IPID will be treated as a + * 16b number and will be wrapped if it exceeds a value of 0xffff. If + * set to one when LSO is '1', then the IPID will be treated as a 15b + * number and will be wrapped if it exceeds a value 0f 0x7fff. + */ + #define TX_BD_LONG_LFLAGS_IPID_FMT UINT32_C(0x40) + /* + * If set to zero when LSO is '1', then the IPID of the tunnel IP header + * will not be modified during LSO operations. If set to one when LSO is + * '1', then the IPID of the tunnel IP header will be incremented for + * each subsequent segment of an LSO operation. The flag is ignored if + * the LSO packet is a normal (non-tunneled) TCP packet. + */ + #define TX_BD_LONG_LFLAGS_T_IPID UINT32_C(0x80) + /* + * If set to '1', then the RoCE ICRC will be appended to the packet. + * Packet must be a valid RoCE format packet. + */ + #define TX_BD_LONG_LFLAGS_ROCE_CRC UINT32_C(0x100) + /* + * If set to '1', then the FCoE CRC will be appended to the packet. + * Packet must be a valid FCoE format packet. + */ + #define TX_BD_LONG_LFLAGS_FCOE_CRC UINT32_C(0x200) + uint16_t hdr_size; + /* + * When LSO is '1', this field must contain the offset of the TCP + * payload from the beginning of the packet in as 16b words. In case of + * encapsulated/tunneling packet, this field contains the offset of the + * inner TCP payload from beginning of the packet as 16-bit words. This + * value must be valid on the first BD of a packet. + */ + #define TX_BD_LONG_HDR_SIZE_MASK UINT32_C(0x1ff) + #define TX_BD_LONG_HDR_SIZE_SFT 0 + uint32_t mss; + /* + * This is the MSS value that will be used to do the LSO processing. The + * value is the length in bytes of the TCP payload for each segment + * generated by the LSO operation. This value must be valid on the first + * BD of a packet. + */ + #define TX_BD_LONG_MSS_MASK UINT32_C(0x7fff) + #define TX_BD_LONG_MSS_SFT 0 + uint16_t unused_2; + uint16_t cfa_action; + /* + * This value selects a CFA action to perform on the packet. Set this + * value to zero if no CFA action is desired. This value must be valid + * on the first BD of a packet. + */ + uint32_t cfa_meta; + /* + * This value is action meta-data that defines CFA edit operations that + * are done in addition to any action editing. + */ + /* When key=1, This is the VLAN tag VID value. */ + #define TX_BD_LONG_CFA_META_VLAN_VID_MASK UINT32_C(0xfff) + #define TX_BD_LONG_CFA_META_VLAN_VID_SFT 0 + /* When key=1, This is the VLAN tag DE value. */ + #define TX_BD_LONG_CFA_META_VLAN_DE UINT32_C(0x1000) + /* When key=1, This is the VLAN tag PRI value. */ + #define TX_BD_LONG_CFA_META_VLAN_PRI_MASK UINT32_C(0xe000) + #define TX_BD_LONG_CFA_META_VLAN_PRI_SFT 13 + /* When key=1, This is the VLAN tag TPID select value. */ + #define TX_BD_LONG_CFA_META_VLAN_TPID_MASK UINT32_C(0x70000) + #define TX_BD_LONG_CFA_META_VLAN_TPID_SFT 16 + /* 0x88a8 */ + #define TX_BD_LONG_CFA_META_VLAN_TPID_TPID88A8 (UINT32_C(0x0) << 16) + /* 0x8100 */ + #define TX_BD_LONG_CFA_META_VLAN_TPID_TPID8100 (UINT32_C(0x1) << 16) + /* 0x9100 */ + #define TX_BD_LONG_CFA_META_VLAN_TPID_TPID9100 (UINT32_C(0x2) << 16) + /* 0x9200 */ + #define TX_BD_LONG_CFA_META_VLAN_TPID_TPID9200 (UINT32_C(0x3) << 16) + /* 0x9300 */ + #define TX_BD_LONG_CFA_META_VLAN_TPID_TPID9300 (UINT32_C(0x4) << 16) + /* Value programmed in CFA VLANTPID register. */ + #define TX_BD_LONG_CFA_META_VLAN_TPID_TPIDCFG (UINT32_C(0x5) << 16) + #define TX_BD_LONG_CFA_META_VLAN_TPID_LAST TX_BD_LONG_CFA_META_VLAN_TPID_TPIDCFG + /* When key=1, This is the VLAN tag TPID select value. */ + #define TX_BD_LONG_CFA_META_VLAN_RESERVED_MASK UINT32_C(0xff80000) + #define TX_BD_LONG_CFA_META_VLAN_RESERVED_SFT 19 + /* + * This field identifies the type of edit to be performed on the packet. + * This value must be valid on the first BD of a packet. + */ + #define TX_BD_LONG_CFA_META_KEY_MASK UINT32_C(0xf0000000) + #define TX_BD_LONG_CFA_META_KEY_SFT 28 + /* No editing */ + #define TX_BD_LONG_CFA_META_KEY_NONE (UINT32_C(0x0) << 28) + /* + * - meta[17:16] - TPID select value (0 = 0x8100). - meta[15:12] + * - PRI/DE value. - meta[11:0] - VID value. + */ + #define TX_BD_LONG_CFA_META_KEY_VLAN_TAG (UINT32_C(0x1) << 28) + #define TX_BD_LONG_CFA_META_KEY_LAST TX_BD_LONG_CFA_META_KEY_VLAN_TAG +} __attribute__((packed)); + +/* Empty TX BD (16 bytes) */ + +struct tx_bd_empty { + uint8_t type; + /* This value identifies the type of buffer descriptor. */ + #define TX_BD_EMPTY_TYPE_MASK UINT32_C(0x3f) + #define TX_BD_EMPTY_TYPE_SFT 0 + /* + * Indicates that this BD is 1BB long and is an empty TX BD. Not + * valid for use by the driver. + */ + #define TX_BD_EMPTY_TYPE_TX_BD_EMPTY UINT32_C(0x1) + uint8_t unused_1[3]; + uint8_t unused_2; + uint8_t unused_3[3]; + uint64_t unused_4; +} __attribute__((packed)); + +/* RX Producer Packet BD (16 bytes) */ + +struct rx_prod_pkt_bd { + uint16_t flags_type; + /* This value identifies the type of buffer descriptor. */ + #define RX_PROD_PKT_BD_TYPE_MASK UINT32_C(0x3f) + #define RX_PROD_PKT_BD_TYPE_SFT 0 + /* + * Indicates that this BD is 16B long and is an RX Producer (ie. + * empty) buffer descriptor. + */ + #define RX_PROD_PKT_BD_TYPE_RX_PROD_PKT UINT32_C(0x4) + /* + * If set to 1, the packet will be placed at the address plus 2B. The 2 + * Bytes of padding will be written as zero. + */ + /* + * This is intended to be used when the host buffer is cache-line + * aligned to produce packets that are easy to parse in host memory + * while still allowing writes to be cache line aligned. + */ + #define RX_PROD_PKT_BD_FLAGS_SOP_PAD UINT32_C(0x40) + /* + * If set to 1, the packet write will be padded out to the nearest + * cache-line with zero value padding. + */ + /* + * If receive buffers start/end on cache-line boundaries, this feature + * will ensure that all data writes on the PCI bus start/end on cache + * line boundaries. + */ + #define RX_PROD_PKT_BD_FLAGS_EOP_PAD UINT32_C(0x80) + /* + * This value is the number of additional buffers in the ring that + * describe the buffer space to be consumed for the this packet. If the + * value is zero, then the packet must fit within the space described by + * this BD. If this value is 1 or more, it indicates how many additional + * "buffer" BDs are in the ring immediately following this BD to be used + * for the same network packet. Even if the packet to be placed does not + * need all the additional buffers, they will be consumed anyway. + */ + #define RX_PROD_PKT_BD_FLAGS_BUFFERS_MASK UINT32_C(0x300) + #define RX_PROD_PKT_BD_FLAGS_BUFFERS_SFT 8 + #define RX_PROD_PKT_BD_FLAGS_MASK UINT32_C(0xffc0) + #define RX_PROD_PKT_BD_FLAGS_SFT 6 + uint16_t len; + /* + * This is the length in Bytes of the host physical buffer where data + * for the packet may be placed in host memory. + */ + /* + * While this is a Byte resolution value, it is often advantageous to + * ensure that the buffers provided end on a host cache line. + */ + uint32_t opaque; + /* + * The opaque data field is pass through to the completion and can be + * used for any data that the driver wants to associate with this + * receive buffer set. + */ + uint64_t addr; + /* + * This is the host physical address where data for the packet may by + * placed in host memory. + */ + /* + * While this is a Byte resolution value, it is often advantageous to + * ensure that the buffers provide start on a host cache line. + */ +} __attribute__((packed)); + +/* RX Producer Buffer BD (16 bytes) */ + +struct rx_prod_bfr_bd { + uint16_t flags_type; + /* This value identifies the type of buffer descriptor. */ + #define RX_PROD_BFR_BD_TYPE_MASK UINT32_C(0x3f) + #define RX_PROD_BFR_BD_TYPE_SFT 0 + /* + * Indicates that this BD is 16B long and is an RX Producer + * Buffer BD. + */ + #define RX_PROD_BFR_BD_TYPE_RX_PROD_BFR UINT32_C(0x5) + #define RX_PROD_BFR_BD_FLAGS_MASK UINT32_C(0xffc0) + #define RX_PROD_BFR_BD_FLAGS_SFT 6 + uint16_t len; + /* + * This is the length in Bytes of the host physical buffer where data + * for the packet may be placed in host memory. + */ + /* + * While this is a Byte resolution value, it is often advantageous to + * ensure that the buffers provided end on a host cache line. + */ + uint32_t opaque; + /* This field is not used. */ + uint64_t addr; + /* + * This is the host physical address where data for the packet may by + * placed in host memory. + */ + /* + * While this is a Byte resolution value, it is often advantageous to + * ensure that the buffers provide start on a host cache line. + */ +} __attribute__((packed)); + +/* RX Producer Aggregation BD (16 bytes) */ + +struct rx_prod_agg_bd { + uint16_t flags_type; + /* This value identifies the type of buffer descriptor. */ + #define RX_PROD_AGG_BD_TYPE_MASK UINT32_C(0x3f) + #define RX_PROD_AGG_BD_TYPE_SFT 0 + /* + * Indicates that this BD is 16B long and is an RX Producer + * Assembly Buffer Descriptor. + */ + #define RX_PROD_AGG_BD_TYPE_RX_PROD_AGG UINT32_C(0x6) + /* + * If set to 1, the packet write will be padded out to the nearest + * cache-line with zero value padding. + */ + /* + * If receive buffers start/end on cache-line boundaries, this feature + * will ensure that all data writes on the PCI bus end on cache line + * boundaries. + */ + #define RX_PROD_AGG_BD_FLAGS_EOP_PAD UINT32_C(0x40) + #define RX_PROD_AGG_BD_FLAGS_MASK UINT32_C(0xffc0) + #define RX_PROD_AGG_BD_FLAGS_SFT 6 + uint16_t len; + /* + * This is the length in Bytes of the host physical buffer where data + * for the packet may be placed in host memory. + */ + /* + * While this is a Byte resolution value, it is often advantageous to + * ensure that the buffers provided end on a host cache line. + */ + uint32_t opaque; + /* + * The opaque data field is pass through to the completion and can be + * used for any data that the driver wants to associate with this + * receive assembly buffer. + */ + uint64_t addr; + /* + * This is the host physical address where data for the packet may by + * placed in host memory. + */ + /* + * While this is a Byte resolution value, it is often advantageous to + * ensure that the buffers provide start on a host cache line. + */ +} __attribute__((packed)); + +/* Completion Ring Structures */ +/* Note: This structure is used by the HWRM to communicate HWRM Error. */ +/* Base Completion Record (16 bytes) */ + +struct cmpl_base { + uint16_t type; + /* unused is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define CMPL_BASE_TYPE_MASK UINT32_C(0x3f) + #define CMPL_BASE_TYPE_SFT 0 + /* TX L2 completion: Completion of TX packet. Length = 16B */ + #define CMPL_BASE_TYPE_TX_L2 UINT32_C(0x0) + /* RX L2 completion: Completion of and L2 RX packet. Length = 32B */ + #define CMPL_BASE_TYPE_RX_L2 UINT32_C(0x11) + /* + * RX Aggregation Buffer completion : Completion of an L2 + * aggregation buffer in support of TPA, HDS, or Jumbo packet + * completion. Length = 16B + */ + #define CMPL_BASE_TYPE_RX_AGG UINT32_C(0x12) + /* + * RX L2 TPA Start Completion: Completion at the beginning of a + * TPA operation. Length = 32B + */ + #define CMPL_BASE_TYPE_RX_TPA_START UINT32_C(0x13) + /* + * RX L2 TPA End Completion: Completion at the end of a TPA + * operation. Length = 32B + */ + #define CMPL_BASE_TYPE_RX_TPA_END UINT32_C(0x15) + /* + * Statistics Ejection Completion: Completion of statistics data + * ejection buffer. Length = 16B + */ + #define CMPL_BASE_TYPE_STAT_EJECT UINT32_C(0x1a) + /* HWRM Command Completion: Completion of an HWRM command. */ + #define CMPL_BASE_TYPE_HWRM_DONE UINT32_C(0x20) + /* Forwarded HWRM Request */ + #define CMPL_BASE_TYPE_HWRM_FWD_REQ UINT32_C(0x22) + /* Forwarded HWRM Response */ + #define CMPL_BASE_TYPE_HWRM_FWD_RESP UINT32_C(0x24) + /* HWRM Asynchronous Event Information */ + #define CMPL_BASE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* CQ Notification */ + #define CMPL_BASE_TYPE_CQ_NOTIFICATION UINT32_C(0x30) + /* SRQ Threshold Event */ + #define CMPL_BASE_TYPE_SRQ_EVENT UINT32_C(0x32) + /* DBQ Threshold Event */ + #define CMPL_BASE_TYPE_DBQ_EVENT UINT32_C(0x34) + /* QP Async Notification */ + #define CMPL_BASE_TYPE_QP_EVENT UINT32_C(0x38) + /* Function Async Notification */ + #define CMPL_BASE_TYPE_FUNC_EVENT UINT32_C(0x3a) + /* unused is 10 b */ + uint16_t info1; + /* info1 is 16 b */ + uint32_t info2; + /* info2 is 32 b */ + uint32_t info3_v; + /* info3 is 31 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define CMPL_BASE_V UINT32_C(0x1) + /* info3 is 31 b */ + #define CMPL_BASE_INFO3_MASK UINT32_C(0xfffffffe) + #define CMPL_BASE_INFO3_SFT 1 + uint32_t info4; + /* info4 is 32 b */ +} __attribute__((packed)); + +/* TX Completion Record (16 bytes) */ + +struct tx_cmpl { + uint16_t flags_type; + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define TX_CMPL_TYPE_MASK UINT32_C(0x3f) + #define TX_CMPL_TYPE_SFT 0 + /* TX L2 completion: Completion of TX packet. Length = 16B */ + #define TX_CMPL_TYPE_TX_L2 UINT32_C(0x0) + /* + * When this bit is '1', it indicates a packet that has an error of some + * type. Type of error is indicated in error_flags. + */ + #define TX_CMPL_FLAGS_ERROR UINT32_C(0x40) + /* + * When this bit is '1', it indicates that the packet completed was + * transmitted using the push acceleration data provided by the driver. + * When this bit is '0', it indicates that the packet had not push + * acceleration data written or was executed as a normal packet even + * though push data was provided. + */ + #define TX_CMPL_FLAGS_PUSH UINT32_C(0x80) + #define TX_CMPL_FLAGS_MASK UINT32_C(0xffc0) + #define TX_CMPL_FLAGS_SFT 6 + uint16_t unused_0; + /* unused1 is 16 b */ + uint32_t opaque; + /* + * This is a copy of the opaque field from the first TX BD of this + * transmitted packet. + */ + uint16_t errors_v; + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define TX_CMPL_V UINT32_C(0x1) + /* + * This error indicates that there was some sort of problem with the BDs + * for the packet. + */ + #define TX_CMPL_ERRORS_BUFFER_ERROR_MASK UINT32_C(0xe) + #define TX_CMPL_ERRORS_BUFFER_ERROR_SFT 1 + /* No error */ + #define TX_CMPL_ERRORS_BUFFER_ERROR_NO_ERROR (UINT32_C(0x0) << 1) + /* Bad Format: BDs were not formatted correctly. */ + #define TX_CMPL_ERRORS_BUFFER_ERROR_BAD_FMT (UINT32_C(0x2) << 1) + #define TX_CMPL_ERRORS_BUFFER_ERROR_LAST TX_CMPL_ERRORS_BUFFER_ERROR_BAD_FMT + /* + * When this bit is '1', it indicates that the length of the packet was + * zero. No packet was transmitted. + */ + #define TX_CMPL_ERRORS_ZERO_LENGTH_PKT UINT32_C(0x10) + /* + * When this bit is '1', it indicates that the packet was longer than + * the programmed limit in TDI. No packet was transmitted. + */ + #define TX_CMPL_ERRORS_EXCESSIVE_BD_LENGTH UINT32_C(0x20) + /* + * When this bit is '1', it indicates that one or more of the BDs + * associated with this packet generated a PCI error. This probably + * means the address was not valid. + */ + #define TX_CMPL_ERRORS_DMA_ERROR UINT32_C(0x40) + /* + * When this bit is '1', it indicates that the packet was longer than + * indicated by the hint. No packet was transmitted. + */ + #define TX_CMPL_ERRORS_HINT_TOO_SHORT UINT32_C(0x80) + /* + * When this bit is '1', it indicates that the packet was dropped due to + * Poison TLP error on one or more of the TLPs in the PXP completion. + */ + #define TX_CMPL_ERRORS_POISON_TLP_ERROR UINT32_C(0x100) + #define TX_CMPL_ERRORS_MASK UINT32_C(0xfffe) + #define TX_CMPL_ERRORS_SFT 1 + uint16_t unused_1; + /* unused2 is 16 b */ + uint32_t unused_2; + /* unused3 is 32 b */ +} __attribute__((packed)); + +/* RX Packet Completion Record (32 bytes split to 2 16-byte struct) */ + +struct rx_pkt_cmpl { + uint16_t flags_type; + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define RX_PKT_CMPL_TYPE_MASK UINT32_C(0x3f) + #define RX_PKT_CMPL_TYPE_SFT 0 + /* RX L2 completion: Completion of and L2 RX packet. Length = 32B */ + #define RX_PKT_CMPL_TYPE_RX_L2 UINT32_C(0x11) + /* + * When this bit is '1', it indicates a packet that has an error of some + * type. Type of error is indicated in error_flags. + */ + #define RX_PKT_CMPL_FLAGS_ERROR UINT32_C(0x40) + /* This field indicates how the packet was placed in the buffer. */ + #define RX_PKT_CMPL_FLAGS_PLACEMENT_MASK UINT32_C(0x380) + #define RX_PKT_CMPL_FLAGS_PLACEMENT_SFT 7 + /* Normal: Packet was placed using normal algorithm. */ + #define RX_PKT_CMPL_FLAGS_PLACEMENT_NORMAL (UINT32_C(0x0) << 7) + /* Jumbo: Packet was placed using jumbo algorithm. */ + #define RX_PKT_CMPL_FLAGS_PLACEMENT_JUMBO (UINT32_C(0x1) << 7) + /* + * Header/Data Separation: Packet was placed using Header/Data + * separation algorithm. The separation location is indicated by + * the itype field. + */ + #define RX_PKT_CMPL_FLAGS_PLACEMENT_HDS (UINT32_C(0x2) << 7) + #define RX_PKT_CMPL_FLAGS_PLACEMENT_LAST RX_PKT_CMPL_FLAGS_PLACEMENT_HDS + /* This bit is '1' if the RSS field in this completion is valid. */ + #define RX_PKT_CMPL_FLAGS_RSS_VALID UINT32_C(0x400) + /* unused is 1 b */ + /* + * This value indicates what the inner packet determined for the packet + * was. + */ + #define RX_PKT_CMPL_FLAGS_ITYPE_MASK UINT32_C(0xf000) + #define RX_PKT_CMPL_FLAGS_ITYPE_SFT 12 + /* Not Known: Indicates that the packet type was not known. */ + #define RX_PKT_CMPL_FLAGS_ITYPE_NOT_KNOWN (UINT32_C(0x0) << 12) + /* + * IP Packet: Indicates that the packet was an IP packet, but + * further classification was not possible. + */ + #define RX_PKT_CMPL_FLAGS_ITYPE_IP (UINT32_C(0x1) << 12) + /* + * TCP Packet: Indicates that the packet was IP and TCP. This + * indicates that the payload_offset field is valid. + */ + #define RX_PKT_CMPL_FLAGS_ITYPE_TCP (UINT32_C(0x2) << 12) + /* + * UDP Packet: Indicates that the packet was IP and UDP. This + * indicates that the payload_offset field is valid. + */ + #define RX_PKT_CMPL_FLAGS_ITYPE_UDP (UINT32_C(0x3) << 12) + /* + * FCoE Packet: Indicates that the packet was recognized as a + * FCoE. This also indicates that the payload_offset field is + * valid. + */ + #define RX_PKT_CMPL_FLAGS_ITYPE_FCOE (UINT32_C(0x4) << 12) + /* + * RoCE Packet: Indicates that the packet was recognized as a + * RoCE. This also indicates that the payload_offset field is + * valid. + */ + #define RX_PKT_CMPL_FLAGS_ITYPE_ROCE (UINT32_C(0x5) << 12) + /* + * ICMP Packet: Indicates that the packet was recognized as + * ICMP. This indicates that the payload_offset field is valid. + */ + #define RX_PKT_CMPL_FLAGS_ITYPE_ICMP (UINT32_C(0x7) << 12) + /* + * PtP packet wo/timestamp: Indicates that the packet was + * recognized as a PtP packet. + */ + #define RX_PKT_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP (UINT32_C(0x8) << 12) + /* + * PtP packet w/timestamp: Indicates that the packet was + * recognized as a PtP packet and that a timestamp was taken for + * the packet. + */ + #define RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP (UINT32_C(0x9) << 12) + #define RX_PKT_CMPL_FLAGS_ITYPE_LAST RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP + #define RX_PKT_CMPL_FLAGS_MASK UINT32_C(0xffc0) + #define RX_PKT_CMPL_FLAGS_SFT 6 + uint16_t len; + /* + * This is the length of the data for the packet stored in the buffer(s) + * identified by the opaque value. This includes the packet BD and any + * associated buffer BDs. This does not include the the length of any + * data places in aggregation BDs. + */ + uint32_t opaque; + /* + * This is a copy of the opaque field from the RX BD this completion + * corresponds to. + */ + uint8_t agg_bufs_v1; + /* unused1 is 2 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define RX_PKT_CMPL_V1 UINT32_C(0x1) + /* + * This value is the number of aggregation buffers that follow this + * entry in the completion ring that are a part of this packet. If the + * value is zero, then the packet is completely contained in the buffer + * space provided for the packet in the RX ring. + */ + #define RX_PKT_CMPL_AGG_BUFS_MASK UINT32_C(0x3e) + #define RX_PKT_CMPL_AGG_BUFS_SFT 1 + /* unused1 is 2 b */ + uint8_t rss_hash_type; + /* + * This is the RSS hash type for the packet. The value is packed + * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}. + */ + uint8_t payload_offset; + /* + * This value indicates the offset in bytes from the beginning of the + * packet where the inner payload starts. This value is valid for TCP, + * UDP, FCoE, and RoCE packets. A value of zero indicates that header is + * 256B into the packet. + */ + uint8_t unused_1; + /* unused2 is 8 b */ + uint32_t rss_hash; + /* + * This value is the RSS hash value calculated for the packet based on + * the mode bits and key value in the VNIC. + */ +} __attribute__((packed)); + +/* last 16 bytes of RX Packet Completion Record */ + +struct rx_pkt_cmpl_hi { + uint32_t flags2; + /* + * This indicates that the ip checksum was calculated for the inner + * packet and that the ip_cs_error field indicates if there was an + * error. + */ + #define RX_PKT_CMPL_FLAGS2_IP_CS_CALC UINT32_C(0x1) + /* + * This indicates that the TCP, UDP or ICMP checksum was calculated for + * the inner packet and that the l4_cs_error field indicates if there + * was an error. + */ + #define RX_PKT_CMPL_FLAGS2_L4_CS_CALC UINT32_C(0x2) + /* + * This indicates that the ip checksum was calculated for the tunnel + * header and that the t_ip_cs_error field indicates if there was an + * error. + */ + #define RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC UINT32_C(0x4) + /* + * This indicates that the UDP checksum was calculated for the tunnel + * packet and that the t_l4_cs_error field indicates if there was an + * error. + */ + #define RX_PKT_CMPL_FLAGS2_T_L4_CS_CALC UINT32_C(0x8) + /* This value indicates what format the metadata field is. */ + #define RX_PKT_CMPL_FLAGS2_META_FORMAT_MASK UINT32_C(0xf0) + #define RX_PKT_CMPL_FLAGS2_META_FORMAT_SFT 4 + /* No metadata informtaion. Value is zero. */ + #define RX_PKT_CMPL_FLAGS2_META_FORMAT_NONE (UINT32_C(0x0) << 4) + /* + * The metadata field contains the VLAN tag and TPID value. - + * metadata[11:0] contains the vlan VID value. - metadata[12] + * contains the vlan DE value. - metadata[15:13] contains the + * vlan PRI value. - metadata[31:16] contains the vlan TPID + * value. + */ + #define RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN (UINT32_C(0x1) << 4) + #define RX_PKT_CMPL_FLAGS2_META_FORMAT_LAST RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN + /* + * This field indicates the IP type for the inner-most IP header. A + * value of '0' indicates IPv4. A value of '1' indicates IPv6. This + * value is only valid if itype indicates a packet with an IP header. + */ + #define RX_PKT_CMPL_FLAGS2_IP_TYPE UINT32_C(0x100) + uint32_t metadata; + /* + * This is data from the CFA block as indicated by the meta_format + * field. + */ + /* When meta_format=1, this value is the VLAN VID. */ + #define RX_PKT_CMPL_METADATA_VID_MASK UINT32_C(0xfff) + #define RX_PKT_CMPL_METADATA_VID_SFT 0 + /* When meta_format=1, this value is the VLAN DE. */ + #define RX_PKT_CMPL_METADATA_DE UINT32_C(0x1000) + /* When meta_format=1, this value is the VLAN PRI. */ + #define RX_PKT_CMPL_METADATA_PRI_MASK UINT32_C(0xe000) + #define RX_PKT_CMPL_METADATA_PRI_SFT 13 + /* When meta_format=1, this value is the VLAN TPID. */ + #define RX_PKT_CMPL_METADATA_TPID_MASK UINT32_C(0xffff0000) + #define RX_PKT_CMPL_METADATA_TPID_SFT 16 + uint16_t errors_v2; + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define RX_PKT_CMPL_V2 UINT32_C(0x1) + /* + * This error indicates that there was some sort of problem with the BDs + * for the packet that was found after part of the packet was already + * placed. The packet should be treated as invalid. + */ + #define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_MASK UINT32_C(0xe) + #define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_SFT 1 + /* No buffer error */ + #define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER (UINT32_C(0x0) << 1) + /* + * Did Not Fit: Packet did not fit into packet buffer provided. + * For regular placement, this means the packet did not fit in + * the buffer provided. For HDS and jumbo placement, this means + * that the packet could not be placed into 7 physical buffers + * or less. + */ + #define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_DID_NOT_FIT (UINT32_C(0x1) << 1) + /* + * Not On Chip: All BDs needed for the packet were not on-chip + * when the packet arrived. + */ + #define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_NOT_ON_CHIP (UINT32_C(0x2) << 1) + /* Bad Format: BDs were not formatted correctly. */ + #define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT (UINT32_C(0x3) << 1) + #define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_LAST RX_PKT_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT + /* This indicates that there was an error in the IP header checksum. */ + #define RX_PKT_CMPL_ERRORS_IP_CS_ERROR UINT32_C(0x10) + /* + * This indicates that there was an error in the TCP, UDP or ICMP + * checksum. + */ + #define RX_PKT_CMPL_ERRORS_L4_CS_ERROR UINT32_C(0x20) + /* + * This indicates that there was an error in the tunnel IP header + * checksum. + */ + #define RX_PKT_CMPL_ERRORS_T_IP_CS_ERROR UINT32_C(0x40) + /* This indicates that there was an error in the tunnel UDP checksum. */ + #define RX_PKT_CMPL_ERRORS_T_L4_CS_ERROR UINT32_C(0x80) + /* + * This indicates that there was a CRC error on either an FCoE or RoCE + * packet. The itype indicates the packet type. + */ + #define RX_PKT_CMPL_ERRORS_CRC_ERROR UINT32_C(0x100) + /* + * This indicates that there was an error in the tunnel portion of the + * packet when this field is non-zero. + */ + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_MASK UINT32_C(0xe00) + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_SFT 9 + /* + * No additional error occurred on the tunnel portion of the + * packet of the packet does not have a tunnel. + */ + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_NO_ERROR (UINT32_C(0x0) << 9) + /* + * Indicates that IP header version does not match expectation + * from L2 Ethertype for IPv4 and IPv6 in the tunnel header. + */ + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION (UINT32_C(0x1) << 9) + /* + * Indicates that header length is out of range in the tunnel + * header. Valid for IPv4. + */ + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN (UINT32_C(0x2) << 9) + /* + * Indicates that the physical packet is shorter than that + * claimed by the PPPoE header length for a tunnel PPPoE packet. + */ + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_TUNNEL_TOTAL_ERROR (UINT32_C(0x3) << 9) + /* + * Indicates that physical packet is shorter than that claimed + * by the tunnel l3 header length. Valid for IPv4, or IPv6 + * tunnel packet packets. + */ + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR (UINT32_C(0x4) << 9) + /* + * Indicates that the physical packet is shorter than that + * claimed by the tunnel UDP header length for a tunnel UDP + * packet that is not fragmented. + */ + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR (UINT32_C(0x5) << 9) + /* + * indicates that the IPv4 TTL or IPv6 hop limit check have + * failed (e.g. TTL = 0) in the tunnel header. Valid for IPv4, + * and IPv6. + */ + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL (UINT32_C(0x6) << 9) + #define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_LAST RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL + /* + * This indicates that there was an error in the inner portion of the + * packet when this field is non-zero. + */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_MASK UINT32_C(0xf000) + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_SFT 12 + /* + * No additional error occurred on the tunnel portion of the + * packet of the packet does not have a tunnel. + */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_NO_ERROR (UINT32_C(0x0) << 12) + /* + * Indicates that IP header version does not match expectation + * from L2 Ethertype for IPv4 and IPv6 or that option other than + * VFT was parsed on FCoE packet. + */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_L3_BAD_VERSION (UINT32_C(0x1) << 12) + /* + * indicates that header length is out of range. Valid for IPv4 + * and RoCE + */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN (UINT32_C(0x2) << 12) + /* + * indicates that the IPv4 TTL or IPv6 hop limit check have + * failed (e.g. TTL = 0). Valid for IPv4, and IPv6 + */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_L3_BAD_TTL (UINT32_C(0x3) << 12) + /* + * Indicates that physical packet is shorter than that claimed + * by the l3 header length. Valid for IPv4, IPv6 packet or RoCE + * packets. + */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_IP_TOTAL_ERROR (UINT32_C(0x4) << 12) + /* + * Indicates that the physical packet is shorter than that + * claimed by the UDP header length for a UDP packet that is not + * fragmented. + */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR (UINT32_C(0x5) << 12) + /* + * Indicates that TCP header length > IP payload. Valid for TCP + * packets only. + */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN (UINT32_C(0x6) << 12) + /* Indicates that TCP header length < 5. Valid for TCP. */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL (UINT32_C(0x7) << 12) + /* + * Indicates that TCP option headers result in a TCP header size + * that does not match data offset in TCP header. Valid for TCP. + */ + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN (UINT32_C(0x8) << 12) + #define RX_PKT_CMPL_ERRORS_PKT_ERROR_LAST RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN + #define RX_PKT_CMPL_ERRORS_MASK UINT32_C(0xfffe) + #define RX_PKT_CMPL_ERRORS_SFT 1 + uint16_t cfa_code; + /* + * This field identifies the CFA action rule that was used for this + * packet. + */ + uint32_t reorder; + /* + * This value holds the reordering sequence number for the packet. If + * the reordering sequence is not valid, then this value is zero. The + * reordering domain for the packet is in the bottom 8 to 10b of the + * rss_hash value. The bottom 20b of this value contain the ordering + * domain value for the packet. + */ + #define RX_PKT_CMPL_REORDER_MASK UINT32_C(0xffffff) + #define RX_PKT_CMPL_REORDER_SFT 0 +} __attribute__((packed)); + +/* RX L2 TPA Start Completion Record (32 bytes split to 2 16-byte struct) */ + +struct rx_tpa_start_cmpl { + uint16_t flags_type; + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define RX_TPA_START_CMPL_TYPE_MASK UINT32_C(0x3f) + #define RX_TPA_START_CMPL_TYPE_SFT 0 + /* + * RX L2 TPA Start Completion: Completion at the beginning of a + * TPA operation. Length = 32B + */ + #define RX_TPA_START_CMPL_TYPE_RX_TPA_START UINT32_C(0x13) + /* This bit will always be '0' for TPA start completions. */ + #define RX_TPA_START_CMPL_FLAGS_ERROR UINT32_C(0x40) + /* This field indicates how the packet was placed in the buffer. */ + #define RX_TPA_START_CMPL_FLAGS_PLACEMENT_MASK UINT32_C(0x380) + #define RX_TPA_START_CMPL_FLAGS_PLACEMENT_SFT 7 + /* + * Jumbo: TPA Packet was placed using jumbo algorithm. This + * means that the first buffer will be filled with data before + * moving to aggregation buffers. Each aggregation buffer will + * be filled before moving to the next aggregation buffer. + */ + #define RX_TPA_START_CMPL_FLAGS_PLACEMENT_JUMBO (UINT32_C(0x1) << 7) + /* + * Header/Data Separation: Packet was placed using Header/Data + * separation algorithm. The separation location is indicated by + * the itype field. + */ + #define RX_TPA_START_CMPL_FLAGS_PLACEMENT_HDS (UINT32_C(0x2) << 7) + /* + * GRO/Jumbo: Packet will be placed using GRO/Jumbo where the + * first packet is filled with data. Subsequent packets will be + * placed such that any one packet does not span two aggregation + * buffers unless it starts at the beginning of an aggregation + * buffer. + */ + #define RX_TPA_START_CMPL_FLAGS_PLACEMENT_GRO_JUMBO (UINT32_C(0x5) << 7) + /* + * GRO/Header-Data Separation: Packet will be placed using + * GRO/HDS where the header is in the first packet. Payload of + * each packet will be placed such that any one packet does not + * span two aggregation buffers unless it starts at the + * beginning of an aggregation buffer. + */ + #define RX_TPA_START_CMPL_FLAGS_PLACEMENT_GRO_HDS (UINT32_C(0x6) << 7) + #define RX_TPA_START_CMPL_FLAGS_PLACEMENT_LAST RX_TPA_START_CMPL_FLAGS_PLACEMENT_GRO_HDS + /* This bit is '1' if the RSS field in this completion is valid. */ + #define RX_TPA_START_CMPL_FLAGS_RSS_VALID UINT32_C(0x400) + /* unused is 1 b */ + /* + * This value indicates what the inner packet determined for the packet + * was. + */ + #define RX_TPA_START_CMPL_FLAGS_ITYPE_MASK UINT32_C(0xf000) + #define RX_TPA_START_CMPL_FLAGS_ITYPE_SFT 12 + /* TCP Packet: Indicates that the packet was IP and TCP. */ + #define RX_TPA_START_CMPL_FLAGS_ITYPE_TCP (UINT32_C(0x2) << 12) + #define RX_TPA_START_CMPL_FLAGS_ITYPE_LAST RX_TPA_START_CMPL_FLAGS_ITYPE_TCP + #define RX_TPA_START_CMPL_FLAGS_MASK UINT32_C(0xffc0) + #define RX_TPA_START_CMPL_FLAGS_SFT 6 + uint16_t len; + /* + * This value indicates the amount of packet data written to the buffer + * the opaque field in this completion corresponds to. + */ + uint32_t opaque; + /* + * This is a copy of the opaque field from the RX BD this completion + * corresponds to. + */ + uint8_t v1; + /* unused1 is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define RX_TPA_START_CMPL_V1 UINT32_C(0x1) + /* unused1 is 7 b */ + uint8_t rss_hash_type; + /* + * This is the RSS hash type for the packet. The value is packed + * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}. + */ + uint16_t agg_id; + /* + * This is the aggregation ID that the completion is associated with. + * Use this number to correlate the TPA start completion with the TPA + * end completion. + */ + /* unused2 is 9 b */ + /* + * This is the aggregation ID that the completion is associated with. + * Use this number to correlate the TPA start completion with the TPA + * end completion. + */ + #define RX_TPA_START_CMPL_AGG_ID_MASK UINT32_C(0xfe00) + #define RX_TPA_START_CMPL_AGG_ID_SFT 9 + uint32_t rss_hash; + /* + * This value is the RSS hash value calculated for the packet based on + * the mode bits and key value in the VNIC. + */ +} __attribute__((packed)); + +/* last 16 bytes of RX L2 TPA Start Completion Record */ + +struct rx_tpa_start_cmpl_hi { + uint32_t flags2; + /* + * This indicates that the ip checksum was calculated for the inner + * packet and that the sum passed for all segments included in the + * aggregation. + */ + #define RX_TPA_START_CMPL_FLAGS2_IP_CS_CALC UINT32_C(0x1) + /* + * This indicates that the TCP, UDP or ICMP checksum was calculated for + * the inner packet and that the sum passed for all segments included in + * the aggregation. + */ + #define RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC UINT32_C(0x2) + /* + * This indicates that the ip checksum was calculated for the tunnel + * header and that the sum passed for all segments included in the + * aggregation. + */ + #define RX_TPA_START_CMPL_FLAGS2_T_IP_CS_CALC UINT32_C(0x4) + /* + * This indicates that the UDP checksum was calculated for the tunnel + * packet and that the sum passed for all segments included in the + * aggregation. + */ + #define RX_TPA_START_CMPL_FLAGS2_T_L4_CS_CALC UINT32_C(0x8) + /* This value indicates what format the metadata field is. */ + #define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_MASK UINT32_C(0xf0) + #define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_SFT 4 + /* No metadata informtaion. Value is zero. */ + #define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_NONE (UINT32_C(0x0) << 4) + /* + * The metadata field contains the VLAN tag and TPID value. - + * metadata[11:0] contains the vlan VID value. - metadata[12] + * contains the vlan DE value. - metadata[15:13] contains the + * vlan PRI value. - metadata[31:16] contains the vlan TPID + * value. + */ + #define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN (UINT32_C(0x1) << 4) + #define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_LAST RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN + /* + * This field indicates the IP type for the inner-most IP header. A + * value of '0' indicates IPv4. A value of '1' indicates IPv6. + */ + #define RX_TPA_START_CMPL_FLAGS2_IP_TYPE UINT32_C(0x100) + uint32_t metadata; + /* + * This is data from the CFA block as indicated by the meta_format + * field. + */ + /* When meta_format=1, this value is the VLAN VID. */ + #define RX_TPA_START_CMPL_METADATA_VID_MASK UINT32_C(0xfff) + #define RX_TPA_START_CMPL_METADATA_VID_SFT 0 + /* When meta_format=1, this value is the VLAN DE. */ + #define RX_TPA_START_CMPL_METADATA_DE UINT32_C(0x1000) + /* When meta_format=1, this value is the VLAN PRI. */ + #define RX_TPA_START_CMPL_METADATA_PRI_MASK UINT32_C(0xe000) + #define RX_TPA_START_CMPL_METADATA_PRI_SFT 13 + /* When meta_format=1, this value is the VLAN TPID. */ + #define RX_TPA_START_CMPL_METADATA_TPID_MASK UINT32_C(0xffff0000) + #define RX_TPA_START_CMPL_METADATA_TPID_SFT 16 + uint16_t v2; + /* unused4 is 15 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define RX_TPA_START_CMPL_V2 UINT32_C(0x1) + /* unused4 is 15 b */ + uint16_t cfa_code; + /* + * This field identifies the CFA action rule that was used for this + * packet. + */ + uint32_t inner_l4_size_inner_l3_offset_inner_l2_offset_outer_l3_offset; + /* + * This is the size in bytes of the inner most L4 header. This can be + * subtracted from the payload_offset to determine the start of the + * inner most L4 header. + */ + /* + * This is the offset from the beginning of the packet in bytes for the + * outer L3 header. If there is no outer L3 header, then this value is + * zero. + */ + #define RX_TPA_START_CMPL_OUTER_L3_OFFSET_MASK UINT32_C(0x1ff) + #define RX_TPA_START_CMPL_OUTER_L3_OFFSET_SFT 0 + /* + * This is the offset from the beginning of the packet in bytes for the + * inner most L2 header. + */ + #define RX_TPA_START_CMPL_INNER_L2_OFFSET_MASK UINT32_C(0x3fe00) + #define RX_TPA_START_CMPL_INNER_L2_OFFSET_SFT 9 + /* + * This is the offset from the beginning of the packet in bytes for the + * inner most L3 header. + */ + #define RX_TPA_START_CMPL_INNER_L3_OFFSET_MASK UINT32_C(0x7fc0000) + #define RX_TPA_START_CMPL_INNER_L3_OFFSET_SFT 18 + /* + * This is the size in bytes of the inner most L4 header. This can be + * subtracted from the payload_offset to determine the start of the + * inner most L4 header. + */ + #define RX_TPA_START_CMPL_INNER_L4_SIZE_MASK UINT32_C(0xf8000000) + #define RX_TPA_START_CMPL_INNER_L4_SIZE_SFT 27 +} __attribute__((packed)); + +/* RX TPA End Completion Record (32 bytes split to 2 16-byte struct) */ + +struct rx_tpa_end_cmpl { + uint16_t flags_type; + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define RX_TPA_END_CMPL_TYPE_MASK UINT32_C(0x3f) + #define RX_TPA_END_CMPL_TYPE_SFT 0 + /* + * RX L2 TPA End Completion: Completion at the end of a TPA + * operation. Length = 32B + */ + #define RX_TPA_END_CMPL_TYPE_RX_TPA_END UINT32_C(0x15) + /* + * When this bit is '1', it indicates a packet that has an error of some + * type. Type of error is indicated in error_flags. + */ + #define RX_TPA_END_CMPL_FLAGS_ERROR UINT32_C(0x40) + /* This field indicates how the packet was placed in the buffer. */ + #define RX_TPA_END_CMPL_FLAGS_PLACEMENT_MASK UINT32_C(0x380) + #define RX_TPA_END_CMPL_FLAGS_PLACEMENT_SFT 7 + /* + * Jumbo: TPA Packet was placed using jumbo algorithm. This + * means that the first buffer will be filled with data before + * moving to aggregation buffers. Each aggregation buffer will + * be filled before moving to the next aggregation buffer. + */ + #define RX_TPA_END_CMPL_FLAGS_PLACEMENT_JUMBO (UINT32_C(0x1) << 7) + /* + * Header/Data Separation: Packet was placed using Header/Data + * separation algorithm. The separation location is indicated by + * the itype field. + */ + #define RX_TPA_END_CMPL_FLAGS_PLACEMENT_HDS (UINT32_C(0x2) << 7) + /* + * GRO/Jumbo: Packet will be placed using GRO/Jumbo where the + * first packet is filled with data. Subsequent packets will be + * placed such that any one packet does not span two aggregation + * buffers unless it starts at the beginning of an aggregation + * buffer. + */ + #define RX_TPA_END_CMPL_FLAGS_PLACEMENT_GRO_JUMBO (UINT32_C(0x5) << 7) + /* + * GRO/Header-Data Separation: Packet will be placed using + * GRO/HDS where the header is in the first packet. Payload of + * each packet will be placed such that any one packet does not + * span two aggregation buffers unless it starts at the + * beginning of an aggregation buffer. + */ + #define RX_TPA_END_CMPL_FLAGS_PLACEMENT_GRO_HDS (UINT32_C(0x6) << 7) + #define RX_TPA_END_CMPL_FLAGS_PLACEMENT_LAST RX_TPA_END_CMPL_FLAGS_PLACEMENT_GRO_HDS + /* unused is 2 b */ + /* + * This value indicates what the inner packet determined for the packet + * was. - 2 TCP Packet Indicates that the packet was IP and TCP. This + * indicates that the ip_cs field is valid and that the tcp_udp_cs field + * is valid and contains the TCP checksum. This also indicates that the + * payload_offset field is valid. + */ + #define RX_TPA_END_CMPL_FLAGS_ITYPE_MASK UINT32_C(0xf000) + #define RX_TPA_END_CMPL_FLAGS_ITYPE_SFT 12 + #define RX_TPA_END_CMPL_FLAGS_MASK UINT32_C(0xffc0) + #define RX_TPA_END_CMPL_FLAGS_SFT 6 + uint16_t len; + /* + * This value is zero for TPA End completions. There is no data in the + * buffer that corresponds to the opaque value in this completion. + */ + uint32_t opaque; + /* + * This is a copy of the opaque field from the RX BD this completion + * corresponds to. + */ + uint8_t agg_bufs_v1; + /* unused1 is 1 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define RX_TPA_END_CMPL_V1 UINT32_C(0x1) + /* + * This value is the number of aggregation buffers that follow this + * entry in the completion ring that are a part of this aggregation + * packet. If the value is zero, then the packet is completely contained + * in the buffer space provided in the aggregation start completion. + */ + #define RX_TPA_END_CMPL_AGG_BUFS_MASK UINT32_C(0x7e) + #define RX_TPA_END_CMPL_AGG_BUFS_SFT 1 + /* unused1 is 1 b */ + uint8_t tpa_segs; + /* This value is the number of segments in the TPA operation. */ + uint8_t payload_offset; + /* + * This value indicates the offset in bytes from the beginning of the + * packet where the inner payload starts. This value is valid for TCP, + * UDP, FCoE, and RoCE packets. A value of zero indicates an offset of + * 256 bytes. + */ + uint8_t agg_id; + /* + * This is the aggregation ID that the completion is associated with. + * Use this number to correlate the TPA start completion with the TPA + * end completion. + */ + /* unused2 is 1 b */ + /* + * This is the aggregation ID that the completion is associated with. + * Use this number to correlate the TPA start completion with the TPA + * end completion. + */ + #define RX_TPA_END_CMPL_AGG_ID_MASK UINT32_C(0xfe) + #define RX_TPA_END_CMPL_AGG_ID_SFT 1 + uint32_t tsdelta; + /* + * For non-GRO packets, this value is the timestamp delta between + * earliest and latest timestamp values for TPA packet. If packets were + * not time stamped, then delta will be zero. For GRO packets, this + * field is zero except for the following sub-fields. - tsdelta[31] + * Timestamp present indication. When '0', no Timestamp option is in the + * packet. When '1', then a Timestamp option is present in the packet. + */ +} __attribute__((packed)); + +/* last 16 bytes of RX TPA End Completion Record */ + +struct rx_tpa_end_cmpl_hi { + uint32_t tpa_dup_acks; + /* unused3 is 28 b */ + /* + * This value is the number of duplicate ACKs that have been received as + * part of the TPA operation. + */ + #define RX_TPA_END_CMPL_TPA_DUP_ACKS_MASK UINT32_C(0xf) + #define RX_TPA_END_CMPL_TPA_DUP_ACKS_SFT 0 + /* unused3 is 28 b */ + uint16_t tpa_seg_len; + /* + * This value is the valid when TPA completion is active. It indicates + * the length of the longest segment of the TPA operation for LRO mode + * and the length of the first segment in GRO mode. This value may be + * used by GRO software to re-construct the original packet stream from + * the TPA packet. This is the length of all but the last segment for + * GRO. In LRO mode this value may be used to indicate MSS size to the + * stack. + */ + uint16_t unused_3; + /* unused4 is 16 b */ + uint16_t errors_v2; + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define RX_TPA_END_CMPL_V2 UINT32_C(0x1) + /* + * This error indicates that there was some sort of problem with the BDs + * for the packet that was found after part of the packet was already + * placed. The packet should be treated as invalid. + */ + #define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_MASK UINT32_C(0xe) + #define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_SFT 1 + /* + * This error occurs when there is a fatal HW problem in the + * chip only. It indicates that there were not BDs on chip but + * that there was adequate reservation. provided by the TPA + * block. + */ + #define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_NOT_ON_CHIP (UINT32_C(0x2) << 1) + /* + * This error occurs when TPA block was not configured to + * reserve adequate BDs for TPA operations on this RX ring. All + * data for the TPA operation was not placed. This error can + * also be generated when the number of segments is not + * programmed correctly in TPA and the 33 total aggregation + * buffers allowed for the TPA operation has been exceeded. + */ + #define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_RSV_ERROR (UINT32_C(0x4) << 1) + #define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_LAST RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_RSV_ERROR + #define RX_TPA_END_CMPL_ERRORS_MASK UINT32_C(0xfffe) + #define RX_TPA_END_CMPL_ERRORS_SFT 1 + uint16_t unused_4; + /* unused5 is 16 b */ + uint32_t start_opaque; + /* + * This is the opaque value that was completed for the TPA start + * completion that corresponds to this TPA end completion. + */ +} __attribute__((packed)); + +/* RX Aggregation Buffer Completion Record (16 bytes) */ + +struct rx_abuf_cmpl { + uint16_t type; + /* unused is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define RX_ABUF_CMPL_TYPE_MASK UINT32_C(0x3f) + #define RX_ABUF_CMPL_TYPE_SFT 0 + /* + * RX Aggregation Buffer completion : Completion of an L2 + * aggregation buffer in support of TPA, HDS, or Jumbo packet + * completion. Length = 16B + */ + #define RX_ABUF_CMPL_TYPE_RX_AGG UINT32_C(0x12) + /* unused is 10 b */ + uint16_t len; + /* + * This is the length of the data for the packet stored in this + * aggregation buffer identified by the opaque value. This does not + * include the length of any data placed in other aggregation BDs or in + * the packet or buffer BDs. This length does not include any space + * added due to hdr_offset register during HDS placement mode. + */ + uint32_t opaque; + /* + * This is a copy of the opaque field from the RX BD this aggregation + * buffer corresponds to. + */ + uint32_t v; + /* unused2 is 31 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define RX_ABUF_CMPL_V UINT32_C(0x1) + /* unused2 is 31 b */ + uint32_t unused_2; + /* unused3 is 32 b */ +} __attribute__((packed)); + +/* Statistics Ejection Buffer Completion Record (16 bytes) */ + +struct eject_cmpl { + uint16_t type; + /* unused is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define EJECT_CMPL_TYPE_MASK UINT32_C(0x3f) + #define EJECT_CMPL_TYPE_SFT 0 + /* + * Statistics Ejection Completion: Completion of statistics data + * ejection buffer. Length = 16B + */ + #define EJECT_CMPL_TYPE_STAT_EJECT UINT32_C(0x1a) + /* unused is 10 b */ + uint16_t len; + /* This is the length of the statistics data stored in this buffer. */ + uint32_t opaque; + /* + * This is a copy of the opaque field from the RX BD this ejection + * buffer corresponds to. + */ + uint32_t v; + /* unused2 is 31 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define EJECT_CMPL_V UINT32_C(0x1) + /* unused2 is 31 b */ + uint32_t unused_2; + /* unused3 is 32 b */ +} __attribute__((packed)); + +/* HWRM Completion Record (16 bytes) */ + +struct hwrm_cmpl { + uint16_t type; + /* unused is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_CMPL_TYPE_MASK UINT32_C(0x3f) + #define HWRM_CMPL_TYPE_SFT 0 + /* HWRM Command Completion: Completion of an HWRM command. */ + #define HWRM_CMPL_TYPE_HWRM_DONE UINT32_C(0x20) + /* unused is 10 b */ + uint16_t sequence_id; + /* This is the sequence_id of the HWRM command that has completed. */ + uint32_t unused_1; + /* unused2 is 32 b */ + uint32_t v; + /* unused3 is 31 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_CMPL_V UINT32_C(0x1) + /* unused3 is 31 b */ + uint32_t unused_3; + /* unused4 is 32 b */ +} __attribute__((packed)); + +/* HWRM Forwarded Request (16 bytes) */ + +struct hwrm_fwd_req_cmpl { + uint16_t req_len_type; + /* Length of forwarded request in bytes. */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_FWD_REQ_CMPL_TYPE_MASK UINT32_C(0x3f) + #define HWRM_FWD_REQ_CMPL_TYPE_SFT 0 + /* Forwarded HWRM Request */ + #define HWRM_FWD_REQ_CMPL_TYPE_HWRM_FWD_REQ UINT32_C(0x22) + /* Length of forwarded request in bytes. */ + #define HWRM_FWD_REQ_CMPL_REQ_LEN_MASK UINT32_C(0xffc0) + #define HWRM_FWD_REQ_CMPL_REQ_LEN_SFT 6 + uint16_t source_id; + /* + * Source ID of this request. Typically used in forwarding requests and + * responses. 0x0 - 0xFFF8 - Used for function ids 0xFFF8 - 0xFFFE - + * Reserved for internal processors 0xFFFF - HWRM + */ + uint32_t unused_0; + /* unused1 is 32 b */ + uint64_t req_buf_addr_v; + /* Address of forwarded request. */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_FWD_REQ_CMPL_V UINT32_C(0x1) + /* Address of forwarded request. */ + #define HWRM_FWD_REQ_CMPL_REQ_BUF_ADDR_MASK UINT32_C(0xfffffffe) + #define HWRM_FWD_REQ_CMPL_REQ_BUF_ADDR_SFT 1 +} __attribute__((packed)); + +/* HWRM Forwarded Response (16 bytes) */ + +struct hwrm_fwd_resp_cmpl { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_FWD_RESP_CMPL_TYPE_MASK UINT32_C(0x3f) + #define HWRM_FWD_RESP_CMPL_TYPE_SFT 0 + /* Forwarded HWRM Response */ + #define HWRM_FWD_RESP_CMPL_TYPE_HWRM_FWD_RESP UINT32_C(0x24) + /* unused1 is 10 b */ + uint16_t source_id; + /* + * Source ID of this response. Typically used in forwarding requests and + * responses. 0x0 - 0xFFF8 - Used for function ids 0xFFF8 - 0xFFFE - + * Reserved for internal processors 0xFFFF - HWRM + */ + uint16_t resp_len; + /* Length of forwarded response in bytes. */ + uint16_t unused_1; + /* unused2 is 16 b */ + uint64_t resp_buf_addr_v; + /* Address of forwarded response. */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_FWD_RESP_CMPL_V UINT32_C(0x1) + /* Address of forwarded response. */ + #define HWRM_FWD_RESP_CMPL_RESP_BUF_ADDR_MASK UINT32_C(0xfffffffe) + #define HWRM_FWD_RESP_CMPL_RESP_BUF_ADDR_SFT 1 +} __attribute__((packed)); + +#define GET_EVENT_ID(x) \ + ((x) == 0x30 ? "VF_FLR": \ + ((x) == 0x20 ? "PF_DRVR_UNLOAD": \ + ((x) == 0x10 ? "FUNC_DRVR_UNLOAD": \ + ((x) == 0xff ? "HWRM_ERROR": \ + ((x) == 0x32 ? "PF_VF_COMM_STATUS_CHANGE": \ + ((x) == 0x33 ? "VF_CFG_CHANGE": \ + ((x) == 0x11 ? "FUNC_DRVR_LOAD": \ + ((x) == 0x31 ? "VF_MAC_ADDR_CHANGE": \ + ((x) == 0x4 ? "PORT_CONN_NOT_ALLOWED": \ + ((x) == 0x5 ? "LINK_SPEED_CFG_NOT_ALLOWED": \ + ((x) == 0x6 ? "LINK_SPEED_CFG_CHANGE": \ + ((x) == 0x7 ? "PORT_PHY_CFG_CHANGE": \ + ((x) == 0x0 ? "LINK_STATUS_CHANGE": \ + ((x) == 0x1 ? "LINK_MTU_CHANGE": \ + ((x) == 0x2 ? "LINK_SPEED_CHANGE": \ + ((x) == 0x3 ? "DCB_CONFIG_CHANGE": \ + ((x) == 0x12 ? "FUNC_FLR_PROC_CMPLT": \ + ((x) == 0x21 ? "PF_DRVR_LOAD": \ + "Unknown event_id")))))))))))))))))) + +/* HWRM Asynchronous Event Completion Record (16 bytes) */ + +struct hwrm_async_event_cmpl { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Link status changed */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE UINT32_C(0x0) + /* Link MTU changed */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_MTU_CHANGE UINT32_C(0x1) + /* Link speed changed */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE UINT32_C(0x2) + /* DCB Configuration changed */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DCB_CONFIG_CHANGE UINT32_C(0x3) + /* Port connection not allowed */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED UINT32_C(0x4) + /* Link speed configuration was not allowed */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED UINT32_C(0x5) + /* Link speed configuration change */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE UINT32_C(0x6) + /* Port PHY configuration change */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_PHY_CFG_CHANGE UINT32_C(0x7) + /* Function driver unloaded */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_UNLOAD UINT32_C(0x10) + /* Function driver loaded */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_LOAD UINT32_C(0x11) + /* Function FLR related processing has completed */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_FLR_PROC_CMPLT UINT32_C(0x12) + /* PF driver unloaded */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD UINT32_C(0x20) + /* PF driver loaded */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_LOAD UINT32_C(0x21) + /* VF Function Level Reset (FLR) */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_FLR UINT32_C(0x30) + /* VF MAC Address Change */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_MAC_ADDR_CHANGE UINT32_C(0x31) + /* PF-VF communication channel status change. */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_VF_COMM_STATUS_CHANGE UINT32_C(0x32) + /* VF Configuration Change */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE UINT32_C(0x33) + /* HWRM Error */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR UINT32_C(0xff) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for link status change (16 bytes) */ + +struct hwrm_async_event_cmpl_link_status_change { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Link status changed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LINK_STATUS_CHANGE UINT32_C(0x0) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* Indicates link status change */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE UINT32_C(0x1) + /* + * If this bit set to 0, then it indicates that the link was up + * and it went down. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_DOWN (UINT32_C(0x0) << 0) + /* + * If this bit is set to 1, then it indicates that the link was + * down and it went up. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP (UINT32_C(0x1) << 0) + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_LAST HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP + /* Indicates the physical port this link status change occur */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_MASK UINT32_C(0xe) + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_SFT 1 + /* PORT ID */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_MASK UINT32_C(0xffff0) + #define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_SFT 4 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for link MTU change (16 bytes) */ + +struct hwrm_async_event_cmpl_link_mtu_change { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Link MTU changed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_ID_LINK_MTU_CHANGE UINT32_C(0x1) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* The new MTU of the link in bytes. */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_DATA1_NEW_MTU_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_DATA1_NEW_MTU_SFT 0 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for link speed change (16 bytes) */ + +struct hwrm_async_event_cmpl_link_speed_change { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Link speed changed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_ID_LINK_SPEED_CHANGE UINT32_C(0x2) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* + * When this bit is '1', the link was forced to the force_link_speed + * value. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_FORCE UINT32_C(0x1) + /* The new link speed in 100 Mbps units. */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_MASK UINT32_C(0xfffe) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_SFT 1 + /* 100Mb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100MB (UINT32_C(0x1) << 1) + /* 1Gb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_1GB (UINT32_C(0xa) << 1) + /* 2Gb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_2GB (UINT32_C(0x14) << 1) + /* 2.5Gb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_2_5GB (UINT32_C(0x19) << 1) + /* 10Gb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_10GB (UINT32_C(0x64) << 1) + /* 20Mb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_20GB (UINT32_C(0xc8) << 1) + /* 25Gb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_25GB (UINT32_C(0xfa) << 1) + /* 40Gb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_40GB (UINT32_C(0x190) << 1) + /* 50Gb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_50GB (UINT32_C(0x1f4) << 1) + /* 100Gb link speed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100GB (UINT32_C(0x3e8) << 1) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_LAST HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100GB + /* PORT ID */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_PORT_ID_MASK UINT32_C(0xffff0000) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_PORT_ID_SFT 16 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for DCB Config change (16 bytes) */ + +struct hwrm_async_event_cmpl_dcb_config_change { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* DCB Configuration changed */ + #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_ID_DCB_CONFIG_CHANGE UINT32_C(0x3) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* PORT ID */ + #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_PORT_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_PORT_ID_SFT 0 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for port connection not allowed (16 bytes) */ + +struct hwrm_async_event_cmpl_port_conn_not_allowed { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Port connection not allowed */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_PORT_CONN_NOT_ALLOWED UINT32_C(0x4) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* PORT ID */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_SFT 0 + /* + * This value indicates the current port level enforcement policy for + * the optics module when there is an optical module mismatch and port + * is not connected. + */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_MASK UINT32_C(0xff0000) + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_SFT 16 + /* No enforcement */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_NONE (UINT32_C(0x0) << 16) + /* Disable Transmit side Laser. */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_DISABLETX (UINT32_C(0x1) << 16) + /* Raise a warning message. */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_WARNINGMSG (UINT32_C(0x2) << 16) + /* Power down the module. */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN (UINT32_C(0x3) << 16) + #define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_LAST HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for link speed config not allowed (16 bytes) */ + +struct hwrm_async_event_cmpl_link_speed_cfg_not_allowed { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Link speed configuration was not allowed */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED UINT32_C(0x5) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* PORT ID */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_DATA1_PORT_ID_SFT 0 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for link speed configuration change (16 bytes) */ + +struct hwrm_async_event_cmpl_link_speed_cfg_change { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Link speed configuration change */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LINK_SPEED_CFG_CHANGE UINT32_C(0x6) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* PORT ID */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT 0 + /* + * If set to 1, it indicates that the supported link speeds + * configuration on the port has changed. If set to 0, then there is no + * change in supported link speeds configuration. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_SUPPORTED_LINK_SPEEDS_CHANGE UINT32_C(0x10000) + /* + * If set to 1, it indicates that the link speed configuration on the + * port has become illegal or invalid. If set to 0, then the link speed + * configuration on the port is legal or valid. + */ + #define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_ILLEGAL_LINK_SPEED_CFG UINT32_C(0x20000) +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for port PHY configuration change (16 bytes) */ + +struct hwrm_async_event_cmpl_port_phy_cfg_change { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Port PHY configuration change */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_ID_PORT_PHY_CFG_CHANGE UINT32_C(0x7) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* PORT ID */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT 0 + /* + * If set to 1, it indicates that the FEC configuration on the port has + * changed. If set to 0, then there is no change in FEC configuration. + */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_FEC_CFG_CHANGE UINT32_C(0x10000) + /* + * If set to 1, it indicates that the EEE configuration on the port has + * changed. If set to 0, then there is no change in EEE configuration on + * the port. + */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_EEE_CFG_CHANGE UINT32_C(0x20000) + /* + * If set to 1, it indicates that the pause configuration on the PHY has + * changed. If set to 0, then there is no change in the pause + * configuration on the PHY. + */ + #define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_PAUSE_CFG_CHANGE UINT32_C(0x40000) +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for Function Driver Unload (16 bytes) */ + +struct hwrm_async_event_cmpl_func_drvr_unload { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Function driver unloaded */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_ID_FUNC_DRVR_UNLOAD UINT32_C(0x10) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* Function ID */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_SFT 0 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for Function Driver load (16 bytes) */ + +struct hwrm_async_event_cmpl_func_drvr_load { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Function driver loaded */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_ID_FUNC_DRVR_LOAD UINT32_C(0x11) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* Function ID */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_DATA1_FUNC_ID_SFT 0 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record to indicate completion of FLR related processing (16 bytes) */ + +struct hwrm_async_event_cmpl_func_flr_proc_cmplt { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* Function FLR related processing has completed */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_ID_FUNC_FLR_PROC_CMPLT UINT32_C(0x12) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* Function ID */ + #define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_DATA1_FUNC_ID_SFT 0 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for PF Driver Unload (16 bytes) */ + +struct hwrm_async_event_cmpl_pf_drvr_unload { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* PF driver unloaded */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_ID_PF_DRVR_UNLOAD UINT32_C(0x20) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* PF ID */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_SFT 0 + /* Indicates the physical port this pf belongs to */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_PORT_MASK UINT32_C(0x70000) + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_PORT_SFT 16 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for PF Driver load (16 bytes) */ + +struct hwrm_async_event_cmpl_pf_drvr_load { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* PF driver loaded */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_ID_PF_DRVR_LOAD UINT32_C(0x21) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* PF ID */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_FUNC_ID_SFT 0 + /* Indicates the physical port this pf belongs to */ + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_PORT_MASK UINT32_C(0x70000) + #define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_PORT_SFT 16 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for VF FLR (16 bytes) */ + +struct hwrm_async_event_cmpl_vf_flr { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* VF Function Level Reset (FLR) */ + #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_ID_VF_FLR UINT32_C(0x30) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* VF ID */ + #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_SFT 0 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for VF MAC Addr change (16 bytes) */ + +struct hwrm_async_event_cmpl_vf_mac_addr_change { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* VF MAC Address Change */ + #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_ID_VF_MAC_ADDR_CHANGE UINT32_C(0x31) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* VF ID */ + #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_DATA1_VF_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_DATA1_VF_ID_SFT 0 +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for PF-VF communication status change (16 bytes) */ + +struct hwrm_async_event_cmpl_pf_vf_comm_status_change { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* PF-VF communication channel status change. */ + #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_ID_PF_VF_COMM_STATUS_CHANGE UINT32_C(0x32) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* + * If this bit is set to 1, then it indicates that the PF-VF + * communication was lost and it is established. If this bit set to 0, + * then it indicates that the PF-VF communication was established and it + * is lost. + */ + #define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_DATA1_COMM_ESTABLISHED UINT32_C(0x1) +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for VF configuration change (16 bytes) */ + +struct hwrm_async_event_cmpl_vf_cfg_change { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* VF Configuration Change */ + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_VF_CFG_CHANGE UINT32_C(0x33) + uint32_t event_data2; + /* Event specific data */ + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* + * Each flag provided in this field indicates a specific VF + * configuration change. At least one of these flags shall be set to 1 + * when an asynchronous event completion of this type is provided by the + * HWRM. + */ + /* + * If this bit is set to 1, then the value of MTU was changed on this + * VF. If set to 0, then this bit should be ignored. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MTU_CHANGE UINT32_C(0x1) + /* + * If this bit is set to 1, then the value of MRU was changed on this + * VF. If set to 0, then this bit should be ignored. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MRU_CHANGE UINT32_C(0x2) + /* + * If this bit is set to 1, then the value of default MAC address was + * changed on this VF. If set to 0, then this bit should be ignored. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_MAC_ADDR_CHANGE UINT32_C(0x4) + /* + * If this bit is set to 1, then the value of default VLAN was changed + * on this VF. If set to 0, then this bit should be ignored. + */ + #define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_VLAN_CHANGE UINT32_C(0x8) +} __attribute__((packed)); + +/* HWRM Asynchronous Event Completion Record for HWRM Error (16 bytes) */ + +struct hwrm_async_event_cmpl_hwrm_error { + uint16_t type; + /* unused1 is 10 b */ + /* + * This field indicates the exact type of the completion. By convention, + * the LSB identifies the length of the record in 16B units. Even values + * indicate 16B records. Odd values indicate 32B records. + */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + /* unused1 is 10 b */ + uint16_t event_id; + /* Identifiers of events. */ + /* HWRM Error */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_ID_HWRM_ERROR UINT32_C(0xff) + uint32_t event_data2; + /* Event specific data */ + /* Severity of HWRM Error */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_MASK UINT32_C(0xff) + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_SFT 0 + /* Warning */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_WARNING UINT32_C(0x0) + /* Non-fatal Error */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_NONFATAL UINT32_C(0x1) + /* Fatal Error */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_FATAL UINT32_C(0x2) + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_LAST HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_FATAL + uint8_t opaque_v; + /* opaque is 7 b */ + /* + * This value is written by the NIC such that it will be different for + * each pass through the completion queue. The even passes will write 1. + * The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_OPAQUE_SFT 1 + uint8_t timestamp_lo; + /* 8-lsb timestamp from POR (100-msec resolution) */ + uint16_t timestamp_hi; + /* 16-lsb timestamp from POR (100-msec resolution) */ + uint32_t event_data1; + /* Event specific data */ + /* Time stamp for error event */ + #define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA1_TIMESTAMP UINT32_C(0x1) +} __attribute__((packed)); + +/* Door Bell Formats */ +/* + * Description: The backup version of the packet must be valid in the TX ring + * before the push doorbell is written to the chip. The first 32b and the BD + * portion of the push doorbell must be written in multiples of 32b units on the + * PCI interface. The data portion of the push doorbell may be written in + * multiples of 8b units on the PCI interface. A push update must contain + * exactly one push packet. The backup version of the packet must start with a + * long (32B) BD and the BDs must be less than or equal to 16x16B units long. + */ +/* + * Note: This door bell format is used by the driver when it wants to push a + * packet into the chip for super-fast transmission. This pushes a partial BD + * and the packet data into the chip. If the chip has room, it will transmit the + * packet. If the chip dosn't have room, it will read the BD and packet data + * from host memory as a normal packet. + */ +/* TX Door Bell Format (4 bytes) */ + +struct tx_doorbell { + uint32_t key_idx; + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is '0' for TX door bell operations. + */ + /* + * BD Index of next BD that will be used to transmit data on the TX ring + * mapped to this door bell. NIC may read and process all BDs up to, but + * not including this index. + */ + #define TX_DOORBELL_IDX_MASK UINT32_C(0xffffff) + #define TX_DOORBELL_IDX_SFT 0 + /* reserved is 4 b */ + #define TX_DOORBELL_RESERVED_MASK UINT32_C(0xf000000) + #define TX_DOORBELL_RESERVED_SFT 24 + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is '0' for TX door bell operations. + */ + #define TX_DOORBELL_KEY_MASK UINT32_C(0xf0000000) + #define TX_DOORBELL_KEY_SFT 28 + /* TX Operation */ + #define TX_DOORBELL_KEY_TX (UINT32_C(0x0) << 28) +} __attribute__((packed)); + +/* RX Door Bell Format (4 bytes) */ + +struct rx_doorbell { + uint32_t key_idx; + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is '1' for RX door bell operations. + */ + /* + * BD Index of next BD that will be used for an empty receive buffer on + * the RX ring mapped to this door bell. NIC may read and process all + * BDs up to, but not including this index. + */ + #define RX_DOORBELL_IDX_MASK UINT32_C(0xffffff) + #define RX_DOORBELL_IDX_SFT 0 + /* reserved is 4 b */ + #define RX_DOORBELL_RESERVED_MASK UINT32_C(0xf000000) + #define RX_DOORBELL_RESERVED_SFT 24 + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is '1' for RX door bell operations. + */ + #define RX_DOORBELL_KEY_MASK UINT32_C(0xf0000000) + #define RX_DOORBELL_KEY_SFT 28 + /* RX Operation */ + #define RX_DOORBELL_KEY_RX (UINT32_C(0x1) << 28) +} __attribute__((packed)); + +/* CMP Door Bell Format (4 bytes) */ + +struct cmpl_doorbell { + uint32_t key_mask_valid_idx; + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is '2' for CMP door bell operations. + */ + /* + * BD Index of the most recently handed completion record on the + * completion ring mapped to this door bell. NIC may write this location + * again with a new completion. + */ + #define CMPL_DOORBELL_IDX_MASK UINT32_C(0xffffff) + #define CMPL_DOORBELL_IDX_SFT 0 + /* reserved is 2 b */ + #define CMPL_DOORBELL_RESERVED_MASK UINT32_C(0x3000000) + #define CMPL_DOORBELL_RESERVED_SFT 24 + /* + * This indicates if the BDIDX value is valid for this update when it is + * '1'. When it is '0', the BDIDX value should be ignored. + */ + #define CMPL_DOORBELL_IDX_VALID UINT32_C(0x4000000) + /* + * This bit indicates the new interrupt mask state for the interrupt + * associated with the BDIDX. A '1', means the interrupt is to be + * masked. A '0' indicates the interrupt is to be unmasked. + */ + #define CMPL_DOORBELL_MASK UINT32_C(0x8000000) + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is '2' for CMP door bell operations. + */ + #define CMPL_DOORBELL_KEY_MASK UINT32_C(0xf0000000) + #define CMPL_DOORBELL_KEY_SFT 28 + /* Completion Operation */ + #define CMPL_DOORBELL_KEY_CMPL (UINT32_C(0x2) << 28) +} __attribute__((packed)); + +/* Status Door Bell Format (4 bytes) */ + +struct status_doorbell { + uint32_t key_idx; + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is '3' for Status door bell operations. + */ + /* + * BD Index of the status record for which space is now available to the + * NIC. + */ + /* + * While there is no actual BD associated with the index, the similar + * scheme is being used to communicate to the NIC that space is + * available for status completions. + */ + #define STATUS_DOORBELL_IDX_MASK UINT32_C(0xffffff) + #define STATUS_DOORBELL_IDX_SFT 0 + /* reserved is 4 b */ + #define STATUS_DOORBELL_RESERVED_MASK UINT32_C(0xf000000) + #define STATUS_DOORBELL_RESERVED_SFT 24 + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is '3' for Status door bell operations. + */ + #define STATUS_DOORBELL_KEY_MASK UINT32_C(0xf0000000) + #define STATUS_DOORBELL_KEY_SFT 28 + /* Status Operation */ + #define STATUS_DOORBELL_KEY_STAT (UINT32_C(0x3) << 28) +} __attribute__((packed)); + +/* Push w/32B BD Door Bell Format (32 bytes) */ + +struct push32_doorbell { + uint32_t key_sz_idx; + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is 4 for push door bell operations. + */ + /* + * This is the BD Index of last BD of the push packet that will be used + * to transmit data on the TX ring mapped to this door bell. + */ + #define PUSH32_DOORBELL_IDX_MASK UINT32_C(0xffffff) + #define PUSH32_DOORBELL_IDX_SFT 0 + /* + * This is the number of 16B BDs spaces consumed in the TX Ring by the + * "backup" version of the packet being pushed. A value of 1 is invalid + * since backup must start with a long 32B BE. A value of 2 indicates + * just the first 32B BE. A value of 3 indicates 32B+16B BD. etc. A + * value of 0 indicates 16x16B BD spaces are consumed. + */ + #define PUSH32_DOORBELL_SZ_MASK UINT32_C(0xf000000) + #define PUSH32_DOORBELL_SZ_SFT 24 + /* + * This value indicates the type of door bell operation that is begin + * requested. This value is 4 for push door bell operations. + */ + #define PUSH32_DOORBELL_KEY_MASK UINT32_C(0xf0000000) + #define PUSH32_DOORBELL_KEY_SFT 28 + /* Push Operation */ + #define PUSH32_DOORBELL_KEY_PUSH (UINT32_C(0x4) << 28) + uint16_t flags_type; + /* + * All bits in this field must be valid on the first BD of a packet. + * Only the packet_end bit must be valid for the remaining BDs of a + * packet. + */ + /* This value identifies the type of buffer descriptor. */ + #define PUSH32_DOORBELL_TYPE_MASK UINT32_C(0x3f) + #define PUSH32_DOORBELL_TYPE_SFT 0 + /* + * Indicates that this BD is 32B long and is used for normal L2 + * packet transmission. + */ + #define PUSH32_DOORBELL_TYPE_TX_BD_LONG UINT32_C(0x10) + /* + * If set to 1, the packet ends with the data in the buffer pointed to + * by this descriptor. This flag must be valid on every BD. This bit + * must be set on all push doorbells. + */ + #define PUSH32_DOORBELL_FLAGS_PACKET_END UINT32_C(0x40) + /* + * If set to 1, the device will not generate a completion for this + * transmit packet unless there is an error in it's processing. If this + * bit is set to 0, then the packet will be completed normally. This bit + * must be valid only on the first BD of a packet. + */ + #define PUSH32_DOORBELL_FLAGS_NO_CMPL UINT32_C(0x80) + /* + * This value must match the sz field in the first 32b of the push + * operation except that if 16x16B BD locations are consumed in the ring + * by this packet, then this value must be 16 (not zero). + */ + #define PUSH32_DOORBELL_FLAGS_BD_CNT_MASK UINT32_C(0x1f00) + #define PUSH32_DOORBELL_FLAGS_BD_CNT_SFT 8 + /* + * This value is a hint for the length of the entire packet. It is used + * by the chip to optimize internal processing. The packet will be + * dropped if the hint is too short. This field is valid only on the + * first BD of a packet. + */ + #define PUSH32_DOORBELL_FLAGS_LHINT_MASK UINT32_C(0x6000) + #define PUSH32_DOORBELL_FLAGS_LHINT_SFT 13 + /* indicates packet length < 512B */ + #define PUSH32_DOORBELL_FLAGS_LHINT_LT512 (UINT32_C(0x0) << 13) + /* indicates 512 <= packet length < 1KB */ + #define PUSH32_DOORBELL_FLAGS_LHINT_LT1K (UINT32_C(0x1) << 13) + /* indicates 1KB <= packet length < 2KB */ + #define PUSH32_DOORBELL_FLAGS_LHINT_LT2K (UINT32_C(0x2) << 13) + /* indicates packet length >= 2KB */ + #define PUSH32_DOORBELL_FLAGS_LHINT_GTE2K (UINT32_C(0x3) << 13) + #define PUSH32_DOORBELL_FLAGS_LHINT_LAST PUSH32_DOORBELL_FLAGS_LHINT_GTE2K + /* + * If set to 1, the device immediately updates the Send Consumer Index + * after the buffer associated with this descriptor has been transferred + * via DMA to NIC memory from host memory. An interrupt may or may not + * be generated according to the state of the interrupt avoidance + * mechanisms. If this bit is set to 0, then the Consumer Index is only + * updated as soon as one of the host interrupt coalescing conditions + * has been met. This bit must be valid on the first BD of a packet. + */ + #define PUSH32_DOORBELL_FLAGS_COAL_NOW UINT32_C(0x8000) + /* + * All bits in this field must be valid on the first BD of a packet. + * Only the packet_end bit must be valid for the remaining BDs of a + * packet. + */ + #define PUSH32_DOORBELL_FLAGS_MASK UINT32_C(0xffc0) + #define PUSH32_DOORBELL_FLAGS_SFT 6 + uint16_t len; + /* + * This is the length of the host physical buffer this BD describes in + * bytes. This field must be valid on all BDs of a packet. + */ + uint32_t opaque; + /* + * The opaque data field is pass through to the completion and can be + * used for any data that the driver wants to associate with the + * transmit BD. This field must be valid on the first BD of a packet. + */ + uint16_t lflags; + /* + * All bits in this field must be valid on the first BD of a packet. + * Their value on other BDs of the packet will be ignored. + */ + /* + * If set to 1, the controller replaces the TCP/UPD checksum fields of + * normal TCP/UPD checksum, or the inner TCP/UDP checksum field of the + * encapsulated TCP/UDP packets with the hardware calculated TCP/UDP + * checksum for the packet associated with this descriptor. The flag is + * ignored if the LSO flag is set. This bit must be valid on the first + * BD of a packet. + */ + #define PUSH32_DOORBELL_LFLAGS_TCP_UDP_CHKSUM UINT32_C(0x1) + /* + * If set to 1, the controller replaces the IP checksum of the normal + * packets, or the inner IP checksum of the encapsulated packets with + * the hardware calculated IP checksum for the packet associated with + * this descriptor. This bit must be valid on the first BD of a packet. + */ + #define PUSH32_DOORBELL_LFLAGS_IP_CHKSUM UINT32_C(0x2) + /* + * If set to 1, the controller will not append an Ethernet CRC to the + * end of the frame. This bit must be valid on the first BD of a packet. + * Packet must be 64B or longer when this flag is set. It is not useful + * to use this bit with any form of TX offload such as CSO or LSO. The + * intent is that the packet from the host already has a valid Ethernet + * CRC on the packet. + */ + #define PUSH32_DOORBELL_LFLAGS_NOCRC UINT32_C(0x4) + /* + * If set to 1, the device will record the time at which the packet was + * actually transmitted at the TX MAC. This bit must be valid on the + * first BD of a packet. + */ + #define PUSH32_DOORBELL_LFLAGS_STAMP UINT32_C(0x8) + /* + * If set to 1, The controller replaces the tunnel IP checksum field + * with hardware calculated IP checksum for the IP header of the packet + * associated with this descriptor. For outer UDP checksum, global outer + * UDP checksum TE_NIC register needs to be enabled. If the global outer + * UDP checksum TE_NIC register bit is set, outer UDP checksum will be + * calculated for the following cases: 1. Packets with tcp_udp_chksum + * flag set to offload checksum for inner packet AND the inner packet is + * TCP/UDP. If the inner packet is ICMP for example (non-TCP/UDP), even + * if the tcp_udp_chksum is set, the outer UDP checksum will not be + * calculated. 2. Packets with lso flag set which implies inner TCP + * checksum calculation as part of LSO operation. + */ + #define PUSH32_DOORBELL_LFLAGS_T_IP_CHKSUM UINT32_C(0x10) + /* + * If set to 1, the device will treat this packet with LSO(Large Send + * Offload) processing for both normal or encapsulated packets, which is + * a form of TCP segmentation. When this bit is 1, the hdr_size and mss + * fields must be valid. The driver doesn't need to set t_ip_chksum, + * ip_chksum, and tcp_udp_chksum flags since the controller will replace + * the appropriate checksum fields for segmented packets. When this bit + * is 1, the hdr_size and mss fields must be valid. + */ + #define PUSH32_DOORBELL_LFLAGS_LSO UINT32_C(0x20) + /* + * If set to zero when LSO is '1', then the IPID will be treated as a + * 16b number and will be wrapped if it exceeds a value of 0xffff. If + * set to one when LSO is '1', then the IPID will be treated as a 15b + * number and will be wrapped if it exceeds a value 0f 0x7fff. + */ + #define PUSH32_DOORBELL_LFLAGS_IPID_FMT UINT32_C(0x40) + /* + * If set to zero when LSO is '1', then the IPID of the tunnel IP header + * will not be modified during LSO operations. If set to one when LSO is + * '1', then the IPID of the tunnel IP header will be incremented for + * each subsequent segment of an LSO operation. The flag is ignored if + * the LSO packet is a normal (non-tunneled) TCP packet. + */ + #define PUSH32_DOORBELL_LFLAGS_T_IPID UINT32_C(0x80) + /* + * If set to '1', then the RoCE ICRC will be appended to the packet. + * Packet must be a valid RoCE format packet. + */ + #define PUSH32_DOORBELL_LFLAGS_ROCE_CRC UINT32_C(0x100) + /* + * If set to '1', then the FCoE CRC will be appended to the packet. + * Packet must be a valid FCoE format packet. + */ + #define PUSH32_DOORBELL_LFLAGS_FCOE_CRC UINT32_C(0x200) + uint16_t hdr_size; + /* + * When LSO is '1', this field must contain the offset of the TCP + * payload from the beginning of the packet in as 16b words. In case of + * encapsulated/tunneling packet, this field contains the offset of the + * inner TCP payload from beginning of the packet as 16-bit words. This + * value must be valid on the first BD of a packet. + */ + #define PUSH32_DOORBELL_HDR_SIZE_MASK UINT32_C(0x1ff) + #define PUSH32_DOORBELL_HDR_SIZE_SFT 0 + uint32_t mss; + /* + * This is the MSS value that will be used to do the LSO processing. The + * value is the length in bytes of the TCP payload for each segment + * generated by the LSO operation. This value must be valid on the first + * BD of a packet. + */ + #define PUSH32_DOORBELL_MSS_MASK UINT32_C(0x7fff) + #define PUSH32_DOORBELL_MSS_SFT 0 + uint16_t unused_2; + uint16_t cfa_action; + /* + * This value selects a CFA action to perform on the packet. Set this + * value to zero if no CFA action is desired. This value must be valid + * on the first BD of a packet. + */ + uint32_t cfa_meta; + /* + * This value is action meta-data that defines CFA edit operations that + * are done in addition to any action editing. + */ + /* When key=1, This is the VLAN tag VID value. */ + #define PUSH32_DOORBELL_CFA_META_VLAN_VID_MASK UINT32_C(0xfff) + #define PUSH32_DOORBELL_CFA_META_VLAN_VID_SFT 0 + /* When key=1, This is the VLAN tag DE value. */ + #define PUSH32_DOORBELL_CFA_META_VLAN_DE UINT32_C(0x1000) + /* When key=1, This is the VLAN tag PRI value. */ + #define PUSH32_DOORBELL_CFA_META_VLAN_PRI_MASK UINT32_C(0xe000) + #define PUSH32_DOORBELL_CFA_META_VLAN_PRI_SFT 13 + /* When key=1, This is the VLAN tag TPID select value. */ + #define PUSH32_DOORBELL_CFA_META_VLAN_TPID_MASK UINT32_C(0x70000) + #define PUSH32_DOORBELL_CFA_META_VLAN_TPID_SFT 16 + /* 0x88a8 */ + #define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID88A8 (UINT32_C(0x0) << 16) + /* 0x8100 */ + #define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID8100 (UINT32_C(0x1) << 16) + /* 0x9100 */ + #define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID9100 (UINT32_C(0x2) << 16) + /* 0x9200 */ + #define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID9200 (UINT32_C(0x3) << 16) + /* 0x9300 */ + #define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID9300 (UINT32_C(0x4) << 16) + /* Value programmed in CFA VLANTPID register. */ + #define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPIDCFG (UINT32_C(0x5) << 16) + #define PUSH32_DOORBELL_CFA_META_VLAN_TPID_LAST PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPIDCFG + /* When key=1, This is the VLAN tag TPID select value. */ + #define PUSH32_DOORBELL_CFA_META_VLAN_RESERVED_MASK UINT32_C(0xff80000) + #define PUSH32_DOORBELL_CFA_META_VLAN_RESERVED_SFT 19 + /* + * This field identifies the type of edit to be performed on the packet. + * This value must be valid on the first BD of a packet. + */ + #define PUSH32_DOORBELL_CFA_META_KEY_MASK UINT32_C(0xf0000000) + #define PUSH32_DOORBELL_CFA_META_KEY_SFT 28 + /* No editing */ + #define PUSH32_DOORBELL_CFA_META_KEY_NONE (UINT32_C(0x0) << 28) + /* + * - meta[17:16] - TPID select value (0 = 0x8100). - meta[15:12] + * - PRI/DE value. - meta[11:0] - VID value. + */ + #define PUSH32_DOORBELL_CFA_META_KEY_VLAN_TAG (UINT32_C(0x1) << 28) + #define PUSH32_DOORBELL_CFA_META_KEY_LAST PUSH32_DOORBELL_CFA_META_KEY_VLAN_TAG + uint32_t data[25]; + /* + * This is the data for the push packet. If the packet data does not fit + * in the first pass, data writing can continue at offset 4 of the + * doorbell for up to 4 additional passes for a total data size of 512B + * maximum. + */ +} __attribute__((packed)); + +/* HW Resource Manager Specification 1.4.0 */ +#define HWRM_VERSION_MAJOR 1 +#define HWRM_VERSION_MINOR 4 +#define HWRM_VERSION_UPDATE 0 + +#define HWRM_VERSION_STR "1.4.0" +/* + * Following is the signature for HWRM message field that indicates not + * applicable (All F's). Need to cast it the size of the field if needed. + */ +#define HWRM_NA_SIGNATURE ((uint32_t)(-1)) +#define HWRM_MAX_REQ_LEN (128) /* hwrm_func_buf_rgtr */ +#define HWRM_MAX_RESP_LEN (176) /* hwrm_func_qstats */ +#define HW_HASH_INDEX_SIZE 0x80 /* 7 bit indirection table index. */ +#define HW_HASH_KEY_SIZE 40 +#define HWRM_RESP_VALID_KEY 1 /* valid key for HWRM response */ +/* + * Description: Port Rx Statistics Formats. The HWRM shall return any + * unsupported counter with a value of 0xFFFFFFFF for 32-bit counters and + * 0xFFFFFFFFFFFFFFFF for 64-bit counters. + */ +/* + * Note: The Hardware Resource Manager (HWRM) manages various hardware resources + * inside the chip. The HWRM is implemented in firmware, and runs on embedded + * processors inside the chip. This firmware service is vital part of the chip. + * The chip can not be used by a driver or HWRM client without the HWRM. + */ +/* Input (16 bytes) */ + +struct input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ +} __attribute__((packed)); + +/* Output (8 bytes) */ + +struct output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ +} __attribute__((packed)); + +#define GET_HWRM_REQ_TYPE(x) \ + ((x) == 0x98 ? "HWRM_CFA_ENCAP_RECORD_FREE": \ + ((x) == 0x99 ? "HWRM_CFA_NTUPLE_FILTER_ALLOC": \ + ((x) == 0x90 ? "HWRM_CFA_L2_FILTER_ALLOC": \ + ((x) == 0x91 ? "HWRM_CFA_L2_FILTER_FREE": \ + ((x) == 0x92 ? "HWRM_CFA_L2_FILTER_CFG": \ + ((x) == 0x93 ? "HWRM_CFA_L2_SET_RX_MASK": \ + ((x) == 0x94 ? "RESERVED3": \ + ((x) == 0x95 ? "HWRM_CFA_TUNNEL_FILTER_ALLOC": \ + ((x) == 0x96 ? "HWRM_CFA_TUNNEL_FILTER_FREE": \ + ((x) == 0x97 ? "HWRM_CFA_ENCAP_RECORD_ALLOC": \ + ((x) == 0x10 ? "RESERVED1": \ + ((x) == 0x11 ? "HWRM_FUNC_RESET": \ + ((x) == 0x12 ? "HWRM_FUNC_GETFID": \ + ((x) == 0x13 ? "HWRM_FUNC_VF_ALLOC": \ + ((x) == 0x14 ? "HWRM_FUNC_VF_FREE": \ + ((x) == 0x15 ? "HWRM_FUNC_QCAPS": \ + ((x) == 0x16 ? "HWRM_FUNC_QCFG": \ + ((x) == 0x17 ? "HWRM_FUNC_CFG": \ + ((x) == 0x18 ? "HWRM_FUNC_QSTATS": \ + ((x) == 0x19 ? "HWRM_FUNC_CLR_STATS": \ + ((x) == 0xe0 ? "HWRM_TEMP_MONITOR_QUERY": \ + ((x) == 0xd3 ? "HWRM_FWD_ASYNC_EVENT_CMPL": \ + ((x) == 0xd2 ? "HWRM_FWD_RESP": \ + ((x) == 0x1a ? "HWRM_FUNC_DRV_UNRGTR": \ + ((x) == 0x1b ? "HWRM_FUNC_VF_RESC_FREE": \ + ((x) == 0x1c ? "HWRM_FUNC_VF_VNIC_IDS_QUERY": \ + ((x) == 0x1d ? "HWRM_FUNC_DRV_RGTR": \ + ((x) == 0x1e ? "HWRM_FUNC_DRV_QVER": \ + ((x) == 0x1f ? "HWRM_FUNC_BUF_RGTR": \ + ((x) == 0x9a ? "HWRM_CFA_NTUPLE_FILTER_FREE": \ + ((x) == 0x9b ? "HWRM_CFA_NTUPLE_FILTER_CFG": \ + ((x) == 0x9c ? "HWRM_CFA_EM_FLOW_ALLOC": \ + ((x) == 0x9d ? "HWRM_CFA_EM_FLOW_FREE": \ + ((x) == 0x9e ? "HWRM_CFA_EM_FLOW_CFG": \ + ((x) == 0xd1 ? "HWRM_REJECT_FWD_RESP": \ + ((x) == 0xd0 ? "HWRM_EXEC_FWD_RESP": \ + ((x) == 0xc8 ? "HWRM_FW_SET_TIME": \ + ((x) == 0xc9 ? "HWRM_FW_GET_TIME": \ + ((x) == 0xc0 ? "HWRM_FW_RESET": \ + ((x) == 0xc1 ? "HWRM_FW_QSTATUS": \ + ((x) == 0x70 ? "HWRM_VNIC_RSS_COS_LB_CTX_ALLOC": \ + ((x) == 0x71 ? "HWRM_VNIC_RSS_COS_LB_CTX_FREE": \ + ((x) == 0xb1 ? "HWRM_STAT_CTX_FREE": \ + ((x) == 0xb0 ? "HWRM_STAT_CTX_ALLOC": \ + ((x) == 0xb3 ? "HWRM_STAT_CTX_CLR_STATS": \ + ((x) == 0xb2 ? "HWRM_STAT_CTX_QUERY": \ + ((x) == 0xfff6 ? "HWRM_NVM_GET_DEV_INFO": \ + ((x) == 0x61 ? "HWRM_RING_GRP_FREE": \ + ((x) == 0x60 ? "HWRM_RING_GRP_ALLOC": \ + ((x) == 0xf1 ? "HWRM_WOL_FILTER_FREE": \ + ((x) == 0xf0 ? "HWRM_WOL_FILTER_ALLOC": \ + ((x) == 0xf3 ? "HWRM_WOL_REASON_QCFG": \ + ((x) == 0xf2 ? "HWRM_WOL_FILTER_QCFG": \ + ((x) == 0xa0 ? "HWRM_TUNNEL_DST_PORT_QUERY": \ + ((x) == 0xa1 ? "HWRM_TUNNEL_DST_PORT_ALLOC": \ + ((x) == 0xa2 ? "HWRM_TUNNEL_DST_PORT_FREE": \ + ((x) == 0xfffc ? "HWRM_NVM_RAW_DUMP": \ + ((x) == 0xfffb ? "HWRM_NVM_GET_DIR_INFO": \ + ((x) == 0xfffa ? "HWRM_NVM_GET_DIR_ENTRIES": \ + ((x) == 0xe ? "HWRM_FUNC_BUF_UNRGTR": \ + ((x) == 0xf ? "HWRM_FUNC_VF_CFG": \ + ((x) == 0xffff ? "HWRM_NVM_RAW_WRITE_BLK": \ + ((x) == 0xfffe ? "HWRM_NVM_WRITE": \ + ((x) == 0xfffd ? "HWRM_NVM_READ": \ + ((x) == 0x50 ? "HWRM_RING_ALLOC": \ + ((x) == 0x51 ? "HWRM_RING_FREE": \ + ((x) == 0x52 ? "HWRM_RING_CMPL_RING_QAGGINT_PARAMS": \ + ((x) == 0x53 ? "HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS": \ + ((x) == 0x4a ? "HWRM_VNIC_QCAPS": \ + ((x) == 0x49 ? "HWRM_VNIC_PLCMODES_QCFG": \ + ((x) == 0x48 ? "HWRM_VNIC_PLCMODES_CFG": \ + ((x) == 0x47 ? "HWRM_VNIC_RSS_QCFG": \ + ((x) == 0x46 ? "HWRM_VNIC_RSS_CFG": \ + ((x) == 0x45 ? "HWRM_VNIC_TPA_QCFG": \ + ((x) == 0x44 ? "HWRM_VNIC_TPA_CFG": \ + ((x) == 0x43 ? "HWRM_VNIC_QCFG": \ + ((x) == 0x42 ? "HWRM_VNIC_CFG": \ + ((x) == 0x41 ? "HWRM_VNIC_FREE": \ + ((x) == 0x40 ? "HWRM_VNIC_ALLOC": \ + ((x) == 0x0 ? "HWRM_VER_GET": \ + ((x) == 0xfff9 ? "HWRM_NVM_FIND_DIR_ENTRY": \ + ((x) == 0xfff8 ? "HWRM_NVM_MOD_DIR_ENTRY": \ + ((x) == 0xfff7 ? "HWRM_NVM_ERASE_DIR_ENTRY": \ + ((x) == 0x5e ? "HWRM_RING_RESET": \ + ((x) == 0xfff5 ? "HWRM_NVM_VERIFY_UPDATE": \ + ((x) == 0xfff4 ? "HWRM_NVM_MODIFY": \ + ((x) == 0xfff3 ? "HWRM_NVM_INSTALL_UPDATE": \ + ((x) == 0x2a ? "HWRM_PORT_PHY_QCAPS": \ + ((x) == 0x2c ? "HWRM_PORT_PHY_I2C_READ": \ + ((x) == 0x2b ? "HWRM_PORT_PHY_I2C_WRITE": \ + ((x) == 0x38 ? "HWRM_QUEUE_PRI2COS_CFG": \ + ((x) == 0x39 ? "HWRM_QUEUE_COS2BW_QCFG": \ + ((x) == 0x32 ? "HWRM_QUEUE_CFG": \ + ((x) == 0x33 ? "HWRM_QUEUE_BUFFERS_QCFG": \ + ((x) == 0x30 ? "HWRM_QUEUE_QPORTCFG": \ + ((x) == 0x31 ? "HWRM_QUEUE_QCFG": \ + ((x) == 0x36 ? "HWRM_QUEUE_PFCENABLE_CFG": \ + ((x) == 0x37 ? "HWRM_QUEUE_PRI2COS_QCFG": \ + ((x) == 0x34 ? "HWRM_QUEUE_BUFFERS_CFG": \ + ((x) == 0x35 ? "HWRM_QUEUE_PFCENABLE_QCFG": \ + ((x) == 0xff14 ? "HWRM_DBG_DUMP": \ + ((x) == 0xff12 ? "HWRM_DBG_WRITE_DIRECT": \ + ((x) == 0xff13 ? "HWRM_DBG_WRITE_INDIRECT": \ + ((x) == 0xff10 ? "HWRM_DBG_READ_DIRECT": \ + ((x) == 0xff11 ? "HWRM_DBG_READ_INDIRECT": \ + ((x) == 0x25 ? "HWRM_PORT_CLR_STATS": \ + ((x) == 0x24 ? "HWRM_PORT_LPBK_QSTATS": \ + ((x) == 0x27 ? "HWRM_PORT_PHY_QCFG": \ + ((x) == 0x26 ? "HWRM_PORT_LPBK_CLR_STATS": \ + ((x) == 0x21 ? "HWRM_PORT_MAC_CFG": \ + ((x) == 0x20 ? "HWRM_PORT_PHY_CFG": \ + ((x) == 0x23 ? "HWRM_PORT_QSTATS": \ + ((x) == 0x22 ? "HWRM_PORT_TS_QUERY": \ + ((x) == 0x29 ? "HWRM_PORT_BLINK_LED": \ + ((x) == 0x28 ? "HWRM_PORT_MAC_QCFG": \ + ((x) == 0x3a ? "HWRM_QUEUE_COS2BW_CFG": \ + "Unknown req_type")))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) + +/* Command numbering (8 bytes) */ + +struct cmd_nums { + uint16_t req_type; + /* + * This version of the specification defines the commands listed in the + * table below. The following are general implementation requirements + * for these commands: # All commands listed below that are marked + * neither reserved nor experimental shall be implemented by the HWRM. # + * A HWRM client compliant to this specification should not use commands + * outside of the list below. # A HWRM client compliant to this + * specification should not use command numbers marked reserved below. # + * A command marked experimental below may not be implemented by the + * HWRM. # A command marked experimental may change in the future + * version of the HWRM specification. # A command not listed below may + * be implemented by the HWRM. The behavior of commands that are not + * listed below is outside the scope of this specification. + */ + #define HWRM_VER_GET (UINT32_C(0x0)) + #define HWRM_FUNC_BUF_UNRGTR (UINT32_C(0xe)) + /* Experimental */ + #define HWRM_FUNC_VF_CFG (UINT32_C(0xf)) + /* Reserved for future use */ + #define RESERVED1 (UINT32_C(0x10)) + #define HWRM_FUNC_RESET (UINT32_C(0x11)) + #define HWRM_FUNC_GETFID (UINT32_C(0x12)) + #define HWRM_FUNC_VF_ALLOC (UINT32_C(0x13)) + #define HWRM_FUNC_VF_FREE (UINT32_C(0x14)) + #define HWRM_FUNC_QCAPS (UINT32_C(0x15)) + #define HWRM_FUNC_QCFG (UINT32_C(0x16)) + #define HWRM_FUNC_CFG (UINT32_C(0x17)) + #define HWRM_FUNC_QSTATS (UINT32_C(0x18)) + #define HWRM_FUNC_CLR_STATS (UINT32_C(0x19)) + #define HWRM_FUNC_DRV_UNRGTR (UINT32_C(0x1a)) + #define HWRM_FUNC_VF_RESC_FREE (UINT32_C(0x1b)) + #define HWRM_FUNC_VF_VNIC_IDS_QUERY (UINT32_C(0x1c)) + #define HWRM_FUNC_DRV_RGTR (UINT32_C(0x1d)) + #define HWRM_FUNC_DRV_QVER (UINT32_C(0x1e)) + #define HWRM_FUNC_BUF_RGTR (UINT32_C(0x1f)) + #define HWRM_PORT_PHY_CFG (UINT32_C(0x20)) + #define HWRM_PORT_MAC_CFG (UINT32_C(0x21)) + /* Experimental */ + #define HWRM_PORT_TS_QUERY (UINT32_C(0x22)) + #define HWRM_PORT_QSTATS (UINT32_C(0x23)) + #define HWRM_PORT_LPBK_QSTATS (UINT32_C(0x24)) + /* Experimental */ + #define HWRM_PORT_CLR_STATS (UINT32_C(0x25)) + /* Experimental */ + #define HWRM_PORT_LPBK_CLR_STATS (UINT32_C(0x26)) + #define HWRM_PORT_PHY_QCFG (UINT32_C(0x27)) + /* Experimental */ + #define HWRM_PORT_MAC_QCFG (UINT32_C(0x28)) + /* Experimental */ + #define HWRM_PORT_BLINK_LED (UINT32_C(0x29)) + /* Experimental */ + #define HWRM_PORT_PHY_QCAPS (UINT32_C(0x2a)) + /* Experimental */ + #define HWRM_PORT_PHY_I2C_WRITE (UINT32_C(0x2b)) + /* Experimental */ + #define HWRM_PORT_PHY_I2C_READ (UINT32_C(0x2c)) + #define HWRM_QUEUE_QPORTCFG (UINT32_C(0x30)) + #define HWRM_QUEUE_QCFG (UINT32_C(0x31)) + #define HWRM_QUEUE_CFG (UINT32_C(0x32)) + #define HWRM_QUEUE_BUFFERS_QCFG (UINT32_C(0x33)) + #define HWRM_QUEUE_BUFFERS_CFG (UINT32_C(0x34)) + /* Experimental */ + #define HWRM_QUEUE_PFCENABLE_QCFG (UINT32_C(0x35)) + /* Experimental */ + #define HWRM_QUEUE_PFCENABLE_CFG (UINT32_C(0x36)) + /* Experimental */ + #define HWRM_QUEUE_PRI2COS_QCFG (UINT32_C(0x37)) + /* Experimental */ + #define HWRM_QUEUE_PRI2COS_CFG (UINT32_C(0x38)) + /* Experimental */ + #define HWRM_QUEUE_COS2BW_QCFG (UINT32_C(0x39)) + /* Experimental */ + #define HWRM_QUEUE_COS2BW_CFG (UINT32_C(0x3a)) + #define HWRM_VNIC_ALLOC (UINT32_C(0x40)) + #define HWRM_VNIC_FREE (UINT32_C(0x41)) + #define HWRM_VNIC_CFG (UINT32_C(0x42)) + /* Experimental */ + #define HWRM_VNIC_QCFG (UINT32_C(0x43)) + #define HWRM_VNIC_TPA_CFG (UINT32_C(0x44)) + /* Experimental */ + #define HWRM_VNIC_TPA_QCFG (UINT32_C(0x45)) + #define HWRM_VNIC_RSS_CFG (UINT32_C(0x46)) + #define HWRM_VNIC_RSS_QCFG (UINT32_C(0x47)) + #define HWRM_VNIC_PLCMODES_CFG (UINT32_C(0x48)) + #define HWRM_VNIC_PLCMODES_QCFG (UINT32_C(0x49)) + /* Experimental */ + #define HWRM_VNIC_QCAPS (UINT32_C(0x4a)) + #define HWRM_RING_ALLOC (UINT32_C(0x50)) + #define HWRM_RING_FREE (UINT32_C(0x51)) + #define HWRM_RING_CMPL_RING_QAGGINT_PARAMS (UINT32_C(0x52)) + #define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS (UINT32_C(0x53)) + #define HWRM_RING_RESET (UINT32_C(0x5e)) + #define HWRM_RING_GRP_ALLOC (UINT32_C(0x60)) + #define HWRM_RING_GRP_FREE (UINT32_C(0x61)) + #define HWRM_VNIC_RSS_COS_LB_CTX_ALLOC (UINT32_C(0x70)) + #define HWRM_VNIC_RSS_COS_LB_CTX_FREE (UINT32_C(0x71)) + #define HWRM_CFA_L2_FILTER_ALLOC (UINT32_C(0x90)) + #define HWRM_CFA_L2_FILTER_FREE (UINT32_C(0x91)) + #define HWRM_CFA_L2_FILTER_CFG (UINT32_C(0x92)) + #define HWRM_CFA_L2_SET_RX_MASK (UINT32_C(0x93)) + /* Reserved for future use */ + #define RESERVED3 (UINT32_C(0x94)) + #define HWRM_CFA_TUNNEL_FILTER_ALLOC (UINT32_C(0x95)) + #define HWRM_CFA_TUNNEL_FILTER_FREE (UINT32_C(0x96)) + /* Experimental */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC (UINT32_C(0x97)) + /* Experimental */ + #define HWRM_CFA_ENCAP_RECORD_FREE (UINT32_C(0x98)) + #define HWRM_CFA_NTUPLE_FILTER_ALLOC (UINT32_C(0x99)) + #define HWRM_CFA_NTUPLE_FILTER_FREE (UINT32_C(0x9a)) + #define HWRM_CFA_NTUPLE_FILTER_CFG (UINT32_C(0x9b)) + /* Experimental */ + #define HWRM_CFA_EM_FLOW_ALLOC (UINT32_C(0x9c)) + /* Experimental */ + #define HWRM_CFA_EM_FLOW_FREE (UINT32_C(0x9d)) + /* Experimental */ + #define HWRM_CFA_EM_FLOW_CFG (UINT32_C(0x9e)) + #define HWRM_TUNNEL_DST_PORT_QUERY (UINT32_C(0xa0)) + #define HWRM_TUNNEL_DST_PORT_ALLOC (UINT32_C(0xa1)) + #define HWRM_TUNNEL_DST_PORT_FREE (UINT32_C(0xa2)) + #define HWRM_STAT_CTX_ALLOC (UINT32_C(0xb0)) + #define HWRM_STAT_CTX_FREE (UINT32_C(0xb1)) + #define HWRM_STAT_CTX_QUERY (UINT32_C(0xb2)) + #define HWRM_STAT_CTX_CLR_STATS (UINT32_C(0xb3)) + #define HWRM_FW_RESET (UINT32_C(0xc0)) + #define HWRM_FW_QSTATUS (UINT32_C(0xc1)) + /* Experimental */ + #define HWRM_FW_SET_TIME (UINT32_C(0xc8)) + /* Experimental */ + #define HWRM_FW_GET_TIME (UINT32_C(0xc9)) + #define HWRM_EXEC_FWD_RESP (UINT32_C(0xd0)) + #define HWRM_REJECT_FWD_RESP (UINT32_C(0xd1)) + #define HWRM_FWD_RESP (UINT32_C(0xd2)) + #define HWRM_FWD_ASYNC_EVENT_CMPL (UINT32_C(0xd3)) + #define HWRM_TEMP_MONITOR_QUERY (UINT32_C(0xe0)) + /* Experimental */ + #define HWRM_WOL_FILTER_ALLOC (UINT32_C(0xf0)) + /* Experimental */ + #define HWRM_WOL_FILTER_FREE (UINT32_C(0xf1)) + /* Experimental */ + #define HWRM_WOL_FILTER_QCFG (UINT32_C(0xf2)) + /* Experimental */ + #define HWRM_WOL_REASON_QCFG (UINT32_C(0xf3)) + /* Experimental */ + #define HWRM_DBG_READ_DIRECT (UINT32_C(0xff10)) + /* Experimental */ + #define HWRM_DBG_READ_INDIRECT (UINT32_C(0xff11)) + /* Experimental */ + #define HWRM_DBG_WRITE_DIRECT (UINT32_C(0xff12)) + /* Experimental */ + #define HWRM_DBG_WRITE_INDIRECT (UINT32_C(0xff13)) + #define HWRM_DBG_DUMP (UINT32_C(0xff14)) + #define HWRM_NVM_INSTALL_UPDATE (UINT32_C(0xfff3)) + #define HWRM_NVM_MODIFY (UINT32_C(0xfff4)) + #define HWRM_NVM_VERIFY_UPDATE (UINT32_C(0xfff5)) + #define HWRM_NVM_GET_DEV_INFO (UINT32_C(0xfff6)) + #define HWRM_NVM_ERASE_DIR_ENTRY (UINT32_C(0xfff7)) + #define HWRM_NVM_MOD_DIR_ENTRY (UINT32_C(0xfff8)) + #define HWRM_NVM_FIND_DIR_ENTRY (UINT32_C(0xfff9)) + #define HWRM_NVM_GET_DIR_ENTRIES (UINT32_C(0xfffa)) + #define HWRM_NVM_GET_DIR_INFO (UINT32_C(0xfffb)) + #define HWRM_NVM_RAW_DUMP (UINT32_C(0xfffc)) + #define HWRM_NVM_READ (UINT32_C(0xfffd)) + #define HWRM_NVM_WRITE (UINT32_C(0xfffe)) + #define HWRM_NVM_RAW_WRITE_BLK (UINT32_C(0xffff)) + uint16_t unused_0[3]; +} __attribute__((packed)); + +#define GET_HWRM_ERROR_CODE(x) \ + ((x) == 0xf ? "HWRM_ERROR": \ + ((x) == 0xffff ? "CMD_NOT_SUPPORTED": \ + ((x) == 0xfffe ? "UNKNOWN_ERR": \ + ((x) == 0x4 ? "RESOURCE_ALLOC_ERROR": \ + ((x) == 0x5 ? "INVALID_FLAGS": \ + ((x) == 0x6 ? "INVALID_ENABLES": \ + ((x) == 0x0 ? "SUCCESS": \ + ((x) == 0x1 ? "FAIL": \ + ((x) == 0x2 ? "INVALID_PARAMS": \ + ((x) == 0x3 ? "RESOURCE_ACCESS_DENIED": \ + "Unknown error_code")))))))))) + +/* Return Codes (8 bytes) */ + +struct ret_codes { + uint16_t error_code; + /* These are numbers assigned to return/error codes. */ + /* Request was successfully executed by the HWRM. */ + #define HWRM_ERR_CODE_SUCCESS (UINT32_C(0x0)) + /* THe HWRM failed to execute the request. */ + #define HWRM_ERR_CODE_FAIL (UINT32_C(0x1)) + /* The request contains invalid argument(s) or input parameters. */ + #define HWRM_ERR_CODE_INVALID_PARAMS (UINT32_C(0x2)) + /* + * The requester is not allowed to access the requested + * resource. This error code shall be provided in a response to + * a request to query or modify an existing resource that is not + * accessible by the requester. + */ + #define HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED (UINT32_C(0x3)) + /* + * The HWRM is unable to allocate the requested resource. This + * code only applies to requests for HWRM resource allocations. + */ + #define HWRM_ERR_CODE_RESOURCE_ALLOC_ERROR (UINT32_C(0x4)) + /* Invalid combination of flags is specified in the request. */ + #define HWRM_ERR_CODE_INVALID_FLAGS (UINT32_C(0x5)) + /* + * Invalid combination of enables fields is specified in the + * request. + */ + #define HWRM_ERR_CODE_INVALID_ENABLES (UINT32_C(0x6)) + /* Generic HWRM execution error that represents an internal error. */ + #define HWRM_ERR_CODE_HWRM_ERROR (UINT32_C(0xf)) + /* Unknown error */ + #define HWRM_ERR_CODE_UNKNOWN_ERR (UINT32_C(0xfffe)) + /* Unsupported or invalid command */ + #define HWRM_ERR_CODE_CMD_NOT_SUPPORTED (UINT32_C(0xffff)) + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_err_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t opaque_0; + /* debug info for this error response. */ + uint16_t opaque_1; + /* debug info for this error response. */ + uint8_t cmd_err; + /* + * In the case of an error response, command specific error code is + * returned in this field. + */ + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* Port Tx Statistics Formats (408 bytes) */ + +struct tx_port_stats { + uint64_t tx_64b_frames; + /* Total Number of 64 Bytes frames transmitted */ + uint64_t tx_65b_127b_frames; + /* Total Number of 65-127 Bytes frames transmitted */ + uint64_t tx_128b_255b_frames; + /* Total Number of 128-255 Bytes frames transmitted */ + uint64_t tx_256b_511b_frames; + /* Total Number of 256-511 Bytes frames transmitted */ + uint64_t tx_512b_1023b_frames; + /* Total Number of 512-1023 Bytes frames transmitted */ + uint64_t tx_1024b_1518_frames; + /* Total Number of 1024-1518 Bytes frames transmitted */ + uint64_t tx_good_vlan_frames; + /* + * Total Number of each good VLAN (exludes FCS errors) frame transmitted + * which is 1519 to 1522 bytes in length inclusive (excluding framing + * bits but including FCS bytes). + */ + uint64_t tx_1519b_2047_frames; + /* Total Number of 1519-2047 Bytes frames transmitted */ + uint64_t tx_2048b_4095b_frames; + /* Total Number of 2048-4095 Bytes frames transmitted */ + uint64_t tx_4096b_9216b_frames; + /* Total Number of 4096-9216 Bytes frames transmitted */ + uint64_t tx_9217b_16383b_frames; + /* Total Number of 9217-16383 Bytes frames transmitted */ + uint64_t tx_good_frames; + /* Total Number of good frames transmitted */ + uint64_t tx_total_frames; + /* Total Number of frames transmitted */ + uint64_t tx_ucast_frames; + /* Total number of unicast frames transmitted */ + uint64_t tx_mcast_frames; + /* Total number of multicast frames transmitted */ + uint64_t tx_bcast_frames; + /* Total number of broadcast frames transmitted */ + uint64_t tx_pause_frames; + /* Total number of PAUSE control frames transmitted */ + uint64_t tx_pfc_frames; + /* Total number of PFC/per-priority PAUSE control frames transmitted */ + uint64_t tx_jabber_frames; + /* Total number of jabber frames transmitted */ + uint64_t tx_fcs_err_frames; + /* Total number of frames transmitted with FCS error */ + uint64_t tx_control_frames; + /* Total number of control frames transmitted */ + uint64_t tx_oversz_frames; + /* Total number of over-sized frames transmitted */ + uint64_t tx_single_dfrl_frames; + /* Total number of frames with single deferral */ + uint64_t tx_multi_dfrl_frames; + /* Total number of frames with multiple deferrals */ + uint64_t tx_single_coll_frames; + /* Total number of frames with single collision */ + uint64_t tx_multi_coll_frames; + /* Total number of frames with multiple collisions */ + uint64_t tx_late_coll_frames; + /* Total number of frames with late collisions */ + uint64_t tx_excessive_coll_frames; + /* Total number of frames with excessive collisions */ + uint64_t tx_frag_frames; + /* Total number of fragmented frames transmitted */ + uint64_t tx_err; + /* Total number of transmit errors */ + uint64_t tx_tagged_frames; + /* Total number of single VLAN tagged frames transmitted */ + uint64_t tx_dbl_tagged_frames; + /* Total number of double VLAN tagged frames transmitted */ + uint64_t tx_runt_frames; + /* Total number of runt frames transmitted */ + uint64_t tx_fifo_underruns; + /* Total number of TX FIFO under runs */ + uint64_t tx_pfc_ena_frames_pri0; + /* Total number of PFC frames with PFC enabled bit for Pri 0 transmitted */ + uint64_t tx_pfc_ena_frames_pri1; + /* Total number of PFC frames with PFC enabled bit for Pri 1 transmitted */ + uint64_t tx_pfc_ena_frames_pri2; + /* Total number of PFC frames with PFC enabled bit for Pri 2 transmitted */ + uint64_t tx_pfc_ena_frames_pri3; + /* Total number of PFC frames with PFC enabled bit for Pri 3 transmitted */ + uint64_t tx_pfc_ena_frames_pri4; + /* Total number of PFC frames with PFC enabled bit for Pri 4 transmitted */ + uint64_t tx_pfc_ena_frames_pri5; + /* Total number of PFC frames with PFC enabled bit for Pri 5 transmitted */ + uint64_t tx_pfc_ena_frames_pri6; + /* Total number of PFC frames with PFC enabled bit for Pri 6 transmitted */ + uint64_t tx_pfc_ena_frames_pri7; + /* Total number of PFC frames with PFC enabled bit for Pri 7 transmitted */ + uint64_t tx_eee_lpi_events; + /* Total number of EEE LPI Events on TX */ + uint64_t tx_eee_lpi_duration; + /* EEE LPI Duration Counter on TX */ + uint64_t tx_llfc_logical_msgs; + /* Total number of Link Level Flow Control (LLFC) messages transmitted */ + uint64_t tx_hcfc_msgs; + /* Total number of HCFC messages transmitted */ + uint64_t tx_total_collisions; + /* Total number of TX collisions */ + uint64_t tx_bytes; + /* Total number of transmitted bytes */ + uint64_t tx_xthol_frames; + /* Total number of end-to-end HOL frames */ + uint64_t tx_stat_discard; + /* Total Tx Drops per Port reported by STATS block */ + uint64_t tx_stat_error; + /* Total Tx Error Drops per Port reported by STATS block */ +} __attribute__((packed)); + +/* Port Rx Statistics Formats (528 bytes) */ + +struct rx_port_stats { + uint64_t rx_64b_frames; + /* Total Number of 64 Bytes frames received */ + uint64_t rx_65b_127b_frames; + /* Total Number of 65-127 Bytes frames received */ + uint64_t rx_128b_255b_frames; + /* Total Number of 128-255 Bytes frames received */ + uint64_t rx_256b_511b_frames; + /* Total Number of 256-511 Bytes frames received */ + uint64_t rx_512b_1023b_frames; + /* Total Number of 512-1023 Bytes frames received */ + uint64_t rx_1024b_1518_frames; + /* Total Number of 1024-1518 Bytes frames received */ + uint64_t rx_good_vlan_frames; + /* + * Total Number of each good VLAN (exludes FCS errors) frame received + * which is 1519 to 1522 bytes in length inclusive (excluding framing + * bits but including FCS bytes). + */ + uint64_t rx_1519b_2047b_frames; + /* Total Number of 1519-2047 Bytes frames received */ + uint64_t rx_2048b_4095b_frames; + /* Total Number of 2048-4095 Bytes frames received */ + uint64_t rx_4096b_9216b_frames; + /* Total Number of 4096-9216 Bytes frames received */ + uint64_t rx_9217b_16383b_frames; + /* Total Number of 9217-16383 Bytes frames received */ + uint64_t rx_total_frames; + /* Total number of frames received */ + uint64_t rx_ucast_frames; + /* Total number of unicast frames received */ + uint64_t rx_mcast_frames; + /* Total number of multicast frames received */ + uint64_t rx_bcast_frames; + /* Total number of broadcast frames received */ + uint64_t rx_fcs_err_frames; + /* Total number of received frames with FCS error */ + uint64_t rx_ctrl_frames; + /* Total number of control frames received */ + uint64_t rx_pause_frames; + /* Total number of PAUSE frames received */ + uint64_t rx_pfc_frames; + /* Total number of PFC frames received */ + uint64_t rx_unsupported_opcode_frames; + /* Total number of frames received with an unsupported opcode */ + uint64_t rx_unsupported_da_pausepfc_frames; + /* + * Total number of frames received with an unsupported DA for pause and + * PFC + */ + uint64_t rx_wrong_sa_frames; + /* Total number of frames received with an unsupported SA */ + uint64_t rx_align_err_frames; + /* Total number of received packets with alignment error */ + uint64_t rx_oor_len_frames; + /* Total number of received frames with out-of-range length */ + uint64_t rx_code_err_frames; + /* Total number of received frames with error termination */ + uint64_t rx_false_carrier_frames; + /* + * Total number of received frames with a false carrier is detected + * during idle, as defined by RX_ER samples active and RXD is 0xE. The + * event is reported along with the statistics generated on the next + * received frame. Only one false carrier condition can be detected and + * logged between frames. Carrier event, valid for 10M/100M speed modes + * only. + */ + uint64_t rx_ovrsz_frames; + /* Total number of over-sized frames received */ + uint64_t rx_jbr_frames; + /* Total number of jabber packets received */ + uint64_t rx_mtu_err_frames; + /* Total number of received frames with MTU error */ + uint64_t rx_match_crc_frames; + /* Total number of received frames with CRC match */ + uint64_t rx_promiscuous_frames; + /* Total number of frames received promiscuously */ + uint64_t rx_tagged_frames; + /* Total number of received frames with one or two VLAN tags */ + uint64_t rx_double_tagged_frames; + /* Total number of received frames with two VLAN tags */ + uint64_t rx_trunc_frames; + /* Total number of truncated frames received */ + uint64_t rx_good_frames; + /* Total number of good frames (without errors) received */ + uint64_t rx_pfc_xon2xoff_frames_pri0; + /* + * Total number of received PFC frames with transition from XON to XOFF + * on Pri 0 + */ + uint64_t rx_pfc_xon2xoff_frames_pri1; + /* + * Total number of received PFC frames with transition from XON to XOFF + * on Pri 1 + */ + uint64_t rx_pfc_xon2xoff_frames_pri2; + /* + * Total number of received PFC frames with transition from XON to XOFF + * on Pri 2 + */ + uint64_t rx_pfc_xon2xoff_frames_pri3; + /* + * Total number of received PFC frames with transition from XON to XOFF + * on Pri 3 + */ + uint64_t rx_pfc_xon2xoff_frames_pri4; + /* + * Total number of received PFC frames with transition from XON to XOFF + * on Pri 4 + */ + uint64_t rx_pfc_xon2xoff_frames_pri5; + /* + * Total number of received PFC frames with transition from XON to XOFF + * on Pri 5 + */ + uint64_t rx_pfc_xon2xoff_frames_pri6; + /* + * Total number of received PFC frames with transition from XON to XOFF + * on Pri 6 + */ + uint64_t rx_pfc_xon2xoff_frames_pri7; + /* + * Total number of received PFC frames with transition from XON to XOFF + * on Pri 7 + */ + uint64_t rx_pfc_ena_frames_pri0; + /* Total number of received PFC frames with PFC enabled bit for Pri 0 */ + uint64_t rx_pfc_ena_frames_pri1; + /* Total number of received PFC frames with PFC enabled bit for Pri 1 */ + uint64_t rx_pfc_ena_frames_pri2; + /* Total number of received PFC frames with PFC enabled bit for Pri 2 */ + uint64_t rx_pfc_ena_frames_pri3; + /* Total number of received PFC frames with PFC enabled bit for Pri 3 */ + uint64_t rx_pfc_ena_frames_pri4; + /* Total number of received PFC frames with PFC enabled bit for Pri 4 */ + uint64_t rx_pfc_ena_frames_pri5; + /* Total number of received PFC frames with PFC enabled bit for Pri 5 */ + uint64_t rx_pfc_ena_frames_pri6; + /* Total number of received PFC frames with PFC enabled bit for Pri 6 */ + uint64_t rx_pfc_ena_frames_pri7; + /* Total number of received PFC frames with PFC enabled bit for Pri 7 */ + uint64_t rx_sch_crc_err_frames; + /* Total Number of frames received with SCH CRC error */ + uint64_t rx_undrsz_frames; + /* Total Number of under-sized frames received */ + uint64_t rx_frag_frames; + /* Total Number of fragmented frames received */ + uint64_t rx_eee_lpi_events; + /* Total number of RX EEE LPI Events */ + uint64_t rx_eee_lpi_duration; + /* EEE LPI Duration Counter on RX */ + uint64_t rx_llfc_physical_msgs; + /* + * Total number of physical type Link Level Flow Control (LLFC) messages + * received + */ + uint64_t rx_llfc_logical_msgs; + /* + * Total number of logical type Link Level Flow Control (LLFC) messages + * received + */ + uint64_t rx_llfc_msgs_with_crc_err; + /* + * Total number of logical type Link Level Flow Control (LLFC) messages + * received with CRC error + */ + uint64_t rx_hcfc_msgs; + /* Total number of HCFC messages received */ + uint64_t rx_hcfc_msgs_with_crc_err; + /* Total number of HCFC messages received with CRC error */ + uint64_t rx_bytes; + /* Total number of received bytes */ + uint64_t rx_runt_bytes; + /* Total number of bytes received in runt frames */ + uint64_t rx_runt_frames; + /* Total number of runt frames received */ + uint64_t rx_stat_discard; + /* Total Rx Discards per Port reported by STATS block */ + uint64_t rx_stat_err; + /* Total Rx Error Drops per Port reported by STATS block */ +} __attribute__((packed)); + +/* hwrm_ver_get */ +/* + * Description: This function is called by a driver to determine the HWRM + * interface version supported by the HWRM firmware, the version of HWRM + * firmware implementation, the name of HWRM firmware, the versions of other + * embedded firmwares, and the names of other embedded firmwares, etc. Any + * interface or firmware version with major = 0, minor = 0, and update = 0 shall + * be considered an invalid version. + */ +/* Input (24 bytes) */ + +struct hwrm_ver_get_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint8_t hwrm_intf_maj; + /* + * This field represents the major version of HWRM interface + * specification supported by the driver HWRM implementation. The + * interface major version is intended to change only when non backward + * compatible changes are made to the HWRM interface specification. + */ + uint8_t hwrm_intf_min; + /* + * This field represents the minor version of HWRM interface + * specification supported by the driver HWRM implementation. A change + * in interface minor version is used to reflect significant backward + * compatible modification to HWRM interface specification. This can be + * due to addition or removal of functionality. HWRM interface + * specifications with the same major version but different minor + * versions are compatible. + */ + uint8_t hwrm_intf_upd; + /* + * This field represents the update version of HWRM interface + * specification supported by the driver HWRM implementation. The + * interface update version is used to reflect minor changes or bug + * fixes to a released HWRM interface specification. + */ + uint8_t unused_0[5]; +} __attribute__((packed)); + +/* Output (128 bytes) */ + +struct hwrm_ver_get_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t hwrm_intf_maj; + /* + * This field represents the major version of HWRM interface + * specification supported by the HWRM implementation. The interface + * major version is intended to change only when non backward compatible + * changes are made to the HWRM interface specification. A HWRM + * implementation that is compliant with this specification shall + * provide value of 1 in this field. + */ + uint8_t hwrm_intf_min; + /* + * This field represents the minor version of HWRM interface + * specification supported by the HWRM implementation. A change in + * interface minor version is used to reflect significant backward + * compatible modification to HWRM interface specification. This can be + * due to addition or removal of functionality. HWRM interface + * specifications with the same major version but different minor + * versions are compatible. A HWRM implementation that is compliant with + * this specification shall provide value of 2 in this field. + */ + uint8_t hwrm_intf_upd; + /* + * This field represents the update version of HWRM interface + * specification supported by the HWRM implementation. The interface + * update version is used to reflect minor changes or bug fixes to a + * released HWRM interface specification. A HWRM implementation that is + * compliant with this specification shall provide value of 2 in this + * field. + */ + uint8_t hwrm_intf_rsvd; + uint8_t hwrm_fw_maj; + /* + * This field represents the major version of HWRM firmware. A change in + * firmware major version represents a major firmware release. + */ + uint8_t hwrm_fw_min; + /* + * This field represents the minor version of HWRM firmware. A change in + * firmware minor version represents significant firmware functionality + * changes. + */ + uint8_t hwrm_fw_bld; + /* + * This field represents the build version of HWRM firmware. A change in + * firmware build version represents bug fixes to a released firmware. + */ + uint8_t hwrm_fw_rsvd; + /* + * This field is a reserved field. This field can be used to represent + * firmware branches or customer specific releases tied to a specific + * (major,minor,update) version of the HWRM firmware. + */ + uint8_t mgmt_fw_maj; + /* + * This field represents the major version of mgmt firmware. A change in + * major version represents a major release. + */ + uint8_t mgmt_fw_min; + /* + * This field represents the minor version of mgmt firmware. A change in + * minor version represents significant functionality changes. + */ + uint8_t mgmt_fw_bld; + /* + * This field represents the build version of mgmt firmware. A change in + * update version represents bug fixes. + */ + uint8_t mgmt_fw_rsvd; + /* + * This field is a reserved field. This field can be used to represent + * firmware branches or customer specific releases tied to a specific + * (major,minor,update) version + */ + uint8_t netctrl_fw_maj; + /* + * This field represents the major version of network control firmware. + * A change in major version represents a major release. + */ + uint8_t netctrl_fw_min; + /* + * This field represents the minor version of network control firmware. + * A change in minor version represents significant functionality + * changes. + */ + uint8_t netctrl_fw_bld; + /* + * This field represents the build version of network control firmware. + * A change in update version represents bug fixes. + */ + uint8_t netctrl_fw_rsvd; + /* + * This field is a reserved field. This field can be used to represent + * firmware branches or customer specific releases tied to a specific + * (major,minor,update) version + */ + uint32_t reserved1; + /* + * This field is reserved for future use. The responder should set it to + * 0. The requester should ignore this field. + */ + uint8_t roce_fw_maj; + /* + * This field represents the major version of RoCE firmware. A change in + * major version represents a major release. + */ + uint8_t roce_fw_min; + /* + * This field represents the minor version of RoCE firmware. A change in + * minor version represents significant functionality changes. + */ + uint8_t roce_fw_bld; + /* + * This field represents the build version of RoCE firmware. A change in + * update version represents bug fixes. + */ + uint8_t roce_fw_rsvd; + /* + * This field is a reserved field. This field can be used to represent + * firmware branches or customer specific releases tied to a specific + * (major,minor,update) version + */ + char hwrm_fw_name[16]; + /* + * This field represents the name of HWRM FW (ASCII chars with NULL at + * the end). + */ + char mgmt_fw_name[16]; + /* + * This field represents the name of mgmt FW (ASCII chars with NULL at + * the end). + */ + char netctrl_fw_name[16]; + /* + * This field represents the name of network control firmware (ASCII + * chars with NULL at the end). + */ + uint32_t reserved2[4]; + /* + * This field is reserved for future use. The responder should set it to + * 0. The requester should ignore this field. + */ + char roce_fw_name[16]; + /* + * This field represents the name of RoCE FW (ASCII chars with NULL at + * the end). + */ + uint16_t chip_num; + /* This field returns the chip number. */ + uint8_t chip_rev; + /* This field returns the revision of chip. */ + uint8_t chip_metal; + /* This field returns the chip metal number. */ + uint8_t chip_bond_id; + /* This field returns the bond id of the chip. */ + uint8_t chip_platform_type; + /* + * This value indicates the type of platform used for chip + * implementation. + */ + /* ASIC */ + #define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_ASIC UINT32_C(0x0) + /* FPGA platform of the chip. */ + #define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_FPGA UINT32_C(0x1) + /* Palladium platform of the chip. */ + #define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_PALLADIUM UINT32_C(0x2) + uint16_t max_req_win_len; + /* + * This field returns the maximum value of request window that is + * supported by the HWRM. The request window is mapped into device + * address space using MMIO. + */ + uint16_t max_resp_len; + /* This field returns the maximum value of response buffer in bytes. */ + uint16_t def_req_timeout; + /* This field returns the default request timeout value in milliseconds. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_reset */ +/* + * Description: This command resets a hardware function (PCIe function) and + * frees any resources used by the function. This command shall be initiated by + * the driver after an FLR has occurred to prepare the function for re-use. This + * command may also be initiated by a driver prior to doing it's own + * configuration. This command puts the function into the reset state. In the + * reset state, global and port related features of the chip are not available. + */ +/* + * Note: This command will reset a function that has already been disabled or + * idled. The command returns all the resources owned by the function so a new + * driver may allocate and configure resources normally. + */ +/* Input (24 bytes) */ + +struct hwrm_func_reset_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the vf_id_valid field to be configured. */ + #define HWRM_FUNC_RESET_INPUT_ENABLES_VF_ID_VALID UINT32_C(0x1) + uint16_t vf_id; + /* + * The ID of the VF that this PF is trying to reset. Only the parent PF + * shall be allowed to reset a child VF. A parent PF driver shall use + * this field only when a specific child VF is requested to be reset. + */ + uint8_t func_reset_level; + /* This value indicates the level of a function reset. */ + /* + * Reset the caller function and its children VFs (if any). If + * no children functions exist, then reset the caller function + * only. + */ + #define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETALL UINT32_C(0x0) + /* Reset the caller function only */ + #define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETME UINT32_C(0x1) + /* + * Reset all children VFs of the caller function driver if the + * caller is a PF driver. It is an error to specify this level + * by a VF driver. It is an error to specify this level by a PF + * driver with no children VFs. + */ + #define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETCHILDREN UINT32_C(0x2) + /* + * Reset a specific VF of the caller function driver if the + * caller is the parent PF driver. It is an error to specify + * this level by a VF driver. It is an error to specify this + * level by a PF driver that is not the parent of the VF that is + * being requested to reset. + */ + #define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETVF UINT32_C(0x3) + uint8_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_reset_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_getfid */ +/* + * Description: This command returns the FID value for the function. If a valid + * pci_id is provided, then this function returns fid for that PCI function. + * Otherwise, it returns FID of the requesting function. This value is needed to + * configure Rings and MSI-X vectors so their DMA operations appear correctly on + * the PCI bus. For PF-HWRM commands, there is no need for FID. Similarly there + * is no need for FID for VF-HWRM commands. In the PF-VF communication, only PF + * needs to know FIDs. + */ +/* Input (24 bytes) */ + +struct hwrm_func_getfid_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the pci_id field to be configured. */ + #define HWRM_FUNC_GETFID_INPUT_ENABLES_PCI_ID UINT32_C(0x1) + uint16_t pci_id; + /* + * This value is the PCI ID of the queried function. If ARI is enabled, + * then it is Bus Number (8b):Function Number(8b). Otherwise, it is Bus + * Number (8b):Device Number (4b):Function Number(4b). + */ + uint16_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_getfid_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t fid; + /* + * FID value. This value is used to identify operations on the PCI bus + * as belonging to a particular PCI function. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_vf_alloc */ +/* + * Description: This command is used to allocate requested number of virtual + * functions on a physical function. It will return the FID value of the first + * virtual function. The FIDs of the remaining virtual functions can be derived + * by sequentially incrementing the FID value of the first VF. This command + * supports the following models for VF allocation: # Allocation of one or more + * VFs from a PF without specifying the first VF ID # Allocation of multiple VFs + * from a PF starting with a specific VF # Allocation of a specific VF from a PF + * If this command is called on a virtual function or a physical function that + * is not enabled for SR-IOV, the HWRM shall return an error. The VF IDs + * returned by this function remain valid after the VF is disabled or reset. + */ +/* Input (24 bytes) */ + +struct hwrm_func_vf_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the first_vf_id field to be configured. */ + #define HWRM_FUNC_VF_ALLOC_INPUT_ENABLES_FIRST_VF_ID UINT32_C(0x1) + uint16_t first_vf_id; + /* + * This value is used to identify a Virtual Function (VF). The scope of + * VF ID is local within a PF. + */ + uint16_t num_vfs; + /* The number of virtual functions requested. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_vf_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t first_vf_id; + /* The ID of the first VF allocated. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_vf_free */ +/* + * Description: This command will free allocated virtual functions on a physical + * function. If this command is called on a virtual function or a physical + * function that is not enabled for SR-IOV, the HWRM shall return an error. + * After the successful completion of this command, the VF IDs of the VFs that + * are freed on the PF are invalid. + */ +/* Input (24 bytes) */ + +struct hwrm_func_vf_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the first_vf_id field to be configured. */ + #define HWRM_FUNC_VF_FREE_INPUT_ENABLES_FIRST_VF_ID UINT32_C(0x1) + uint16_t first_vf_id; + /* + * This value is used to identify a Virtual Function (VF). The scope of + * VF ID is local within a PF. + */ + uint16_t num_vfs; + /* + * The number of virtual functions requested. 0xFFFF - Cleanup all + * children of this PF. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_vf_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_vf_cfg */ +/* + * Description: This command allows configuration of a VF by its driver. If this + * function is called by a PF driver, then the HWRM shall fail this command. If + * guest VLAN and/or MAC address are provided in this command, then the HWRM + * shall set up appropriate MAC/VLAN filters for the VF that is being + * configured. A VF driver should set VF MTU/MRU using this command prior to + * allocating RX VNICs or TX rings for the corresponding VF. + */ +/* Input (32 bytes) */ + +struct hwrm_func_vf_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the mtu field to be configured. */ + #define HWRM_FUNC_VF_CFG_INPUT_ENABLES_MTU UINT32_C(0x1) + /* This bit must be '1' for the guest_vlan field to be configured. */ + #define HWRM_FUNC_VF_CFG_INPUT_ENABLES_GUEST_VLAN UINT32_C(0x2) + /* This bit must be '1' for the async_event_cr field to be configured. */ + #define HWRM_FUNC_VF_CFG_INPUT_ENABLES_ASYNC_EVENT_CR UINT32_C(0x4) + /* This bit must be '1' for the dflt_mac_addr field to be configured. */ + #define HWRM_FUNC_VF_CFG_INPUT_ENABLES_DFLT_MAC_ADDR UINT32_C(0x8) + uint16_t mtu; + /* + * The maximum transmission unit requested on the function. The HWRM + * should make sure that the mtu of the function does not exceed the mtu + * of the physical port that this function is associated with. In + * addition to requesting mtu per function, it is possible to configure + * mtu per transmit ring. By default, the mtu of each transmit ring + * associated with a function is equal to the mtu of the function. The + * HWRM should make sure that the mtu of each transmit ring that is + * assigned to a function has a valid mtu. + */ + uint16_t guest_vlan; + /* + * The guest VLAN for the function being configured. This field's format + * is same as 802.1Q Tag's Tag Control Information (TCI) format that + * includes both Priority Code Point (PCP) and VLAN Identifier (VID). + */ + uint16_t async_event_cr; + /* + * ID of the target completion ring for receiving asynchronous event + * completions. If this field is not valid, then the HWRM shall use the + * default completion ring of the function that is being configured as + * the target completion ring for providing any asynchronous event + * completions for that function. If this field is valid, then the HWRM + * shall use the completion ring identified by this ID as the target + * completion ring for providing any asynchronous event completions for + * the function that is being configured. + */ + uint8_t dflt_mac_addr[6]; + /* + * This value is the current MAC address requested by the VF driver to + * be configured on this VF. A value of 00-00-00-00-00-00 indicates no + * MAC address configuration is requested by the VF driver. The parent + * PF driver may reject or overwrite this MAC address. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_vf_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_qcaps */ +/* + * Description: This command returns capabilities of a function. The input FID + * value is used to indicate what function is being queried. This allows a + * physical function driver to query virtual functions that are children of the + * physical function. The output FID value is needed to configure Rings and + * MSI-X vectors so their DMA operations appear correctly on the PCI bus. + */ +/* Input (24 bytes) */ + +struct hwrm_func_qcaps_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t fid; + /* + * Function ID of the function that is being queried. 0xFF... (All Fs) + * if the query is for the requesting function. + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (80 bytes) */ + +struct hwrm_func_qcaps_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t fid; + /* + * FID value. This value is used to identify operations on the PCI bus + * as belonging to a particular PCI function. + */ + uint16_t port_id; + /* + * Port ID of port that this function is associated with. Valid only for + * the PF. 0xFF... (All Fs) if this function is not associated with any + * port. 0xFF... (All Fs) if this function is called from a VF. + */ + uint32_t flags; + /* If 1, then Push mode is supported on this function. */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PUSH_MODE_SUPPORTED UINT32_C(0x1) + /* If 1, then the global MSI-X auto-masking is enabled for the device. */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_GLOBAL_MSIX_AUTOMASKING UINT32_C(0x2) + /* + * If 1, then the Precision Time Protocol (PTP) processing is supported + * on this function. The HWRM should enable PTP on only a single + * Physical Function (PF) per port. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED UINT32_C(0x4) + /* + * If 1, then RDMA over Converged Ethernet (RoCE) v1 is supported on + * this function. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ROCE_V1_SUPPORTED UINT32_C(0x8) + /* + * If 1, then RDMA over Converged Ethernet (RoCE) v2 is supported on + * this function. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ROCE_V2_SUPPORTED UINT32_C(0x10) + /* + * If 1, then control and configuration of WoL magic packet is supported + * on this function. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_WOL_MAGICPKT_SUPPORTED UINT32_C(0x20) + /* + * If 1, then control and configuration of bitmap pattern packet is + * supported on this function. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_WOL_BMP_SUPPORTED UINT32_C(0x40) + uint8_t mac_address[6]; + /* + * This value is current MAC address configured for this function. A + * value of 00-00-00-00-00-00 indicates no MAC address is currently + * configured. + */ + uint16_t max_rsscos_ctx; + /* + * The maximum number of RSS/COS contexts that can be allocated to the + * function. + */ + uint16_t max_cmpl_rings; + /* + * The maximum number of completion rings that can be allocated to the + * function. + */ + uint16_t max_tx_rings; + /* + * The maximum number of transmit rings that can be allocated to the + * function. + */ + uint16_t max_rx_rings; + /* + * The maximum number of receive rings that can be allocated to the + * function. + */ + uint16_t max_l2_ctxs; + /* + * The maximum number of L2 contexts that can be allocated to the + * function. + */ + uint16_t max_vnics; + /* The maximum number of VNICs that can be allocated to the function. */ + uint16_t first_vf_id; + /* + * The identifier for the first VF enabled on a PF. This is valid only + * on the PF with SR-IOV enabled. 0xFF... (All Fs) if this command is + * called on a PF with SR-IOV disabled or on a VF. + */ + uint16_t max_vfs; + /* + * The maximum number of VFs that can be allocated to the function. This + * is valid only on the PF with SR-IOV enabled. 0xFF... (All Fs) if this + * command is called on a PF with SR-IOV disabled or on a VF. + */ + uint16_t max_stat_ctx; + /* + * The maximum number of statistic contexts that can be allocated to the + * function. + */ + uint32_t max_encap_records; + /* + * The maximum number of Encapsulation records that can be offloaded by + * this function. + */ + uint32_t max_decap_records; + /* + * The maximum number of decapsulation records that can be offloaded by + * this function. + */ + uint32_t max_tx_em_flows; + /* + * The maximum number of Exact Match (EM) flows that can be offloaded by + * this function on the TX side. + */ + uint32_t max_tx_wm_flows; + /* + * The maximum number of Wildcard Match (WM) flows that can be offloaded + * by this function on the TX side. + */ + uint32_t max_rx_em_flows; + /* + * The maximum number of Exact Match (EM) flows that can be offloaded by + * this function on the RX side. + */ + uint32_t max_rx_wm_flows; + /* + * The maximum number of Wildcard Match (WM) flows that can be offloaded + * by this function on the RX side. + */ + uint32_t max_mcast_filters; + /* + * The maximum number of multicast filters that can be supported by this + * function on the RX side. + */ + uint32_t max_flow_id; + /* + * The maximum value of flow_id that can be supported in completion + * records. + */ + uint32_t max_hw_ring_grps; + /* + * The maximum number of HW ring groups that can be supported on this + * function. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_qcfg */ +/* + * Description: This command returns the current configuration of a function. + * The input FID value is used to indicate what function is being queried. This + * allows a physical function driver to query virtual functions that are + * children of the physical function. The output FID value is needed to + * configure Rings and MSI-X vectors so their DMA operations appear correctly on + * the PCI bus. + */ +/* Input (24 bytes) */ + +struct hwrm_func_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t fid; + /* + * Function ID of the function that is being queried. 0xFF... (All Fs) + * if the query is for the requesting function. + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (72 bytes) */ + +struct hwrm_func_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t fid; + /* + * FID value. This value is used to identify operations on the PCI bus + * as belonging to a particular PCI function. + */ + uint16_t port_id; + /* + * Port ID of port that this function is associated with. 0xFF... (All + * Fs) if this function is not associated with any port. + */ + uint16_t vlan; + /* + * This value is the current VLAN setting for this function. The value + * of 0 for this field indicates no priority tagging or VLAN is used. + * This field's format is same as 802.1Q Tag's Tag Control Information + * (TCI) format that includes both Priority Code Point (PCP) and VLAN + * Identifier (VID). + */ + uint16_t flags; + /* + * If 1, then magic packet based Out-Of-Box WoL is enabled on the port + * associated with this function. + */ + #define HWRM_FUNC_QCFG_OUTPUT_FLAGS_OOB_WOL_MAGICPKT_ENABLED UINT32_C(0x1) + /* + * If 1, then bitmap pattern based Out-Of-Box WoL packet is enabled on + * the port associated with this function. + */ + #define HWRM_FUNC_QCFG_OUTPUT_FLAGS_OOB_WOL_BMP_ENABLED UINT32_C(0x2) + uint8_t mac_address[6]; + /* + * This value is current MAC address configured for this function. A + * value of 00-00-00-00-00-00 indicates no MAC address is currently + * configured. + */ + uint16_t pci_id; + /* + * This value is current PCI ID of this function. If ARI is enabled, + * then it is Bus Number (8b):Function Number(8b). Otherwise, it is Bus + * Number (8b):Device Number (4b):Function Number(4b). + */ + uint16_t alloc_rsscos_ctx; + /* The number of RSS/COS contexts currently allocated to the function. */ + uint16_t alloc_cmpl_rings; + /* + * The number of completion rings currently allocated to the function. + * This does not include the rings allocated to any children functions + * if any. + */ + uint16_t alloc_tx_rings; + /* + * The number of transmit rings currently allocated to the function. + * This does not include the rings allocated to any children functions + * if any. + */ + uint16_t alloc_rx_rings; + /* + * The number of receive rings currently allocated to the function. This + * does not include the rings allocated to any children functions if + * any. + */ + uint16_t alloc_l2_ctx; + /* The allocated number of L2 contexts to the function. */ + uint16_t alloc_vnics; + /* The allocated number of vnics to the function. */ + uint16_t mtu; + /* + * The maximum transmission unit of the function. For rings allocated on + * this function, this default value is used if ring MTU is not + * specified. + */ + uint16_t mru; + /* + * The maximum receive unit of the function. For vnics allocated on this + * function, this default value is used if vnic MRU is not specified. + */ + uint16_t stat_ctx_id; + /* The statistics context assigned to a function. */ + uint8_t port_partition_type; + /* + * The HWRM shall return Unknown value for this field when this command + * is used to query VF's configuration. + */ + /* Single physical function */ + #define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_SPF UINT32_C(0x0) + /* Multiple physical functions */ + #define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_MPFS UINT32_C(0x1) + /* Network Partitioning 1.0 */ + #define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_0 UINT32_C(0x2) + /* Network Partitioning 1.5 */ + #define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5 UINT32_C(0x3) + /* Network Partitioning 2.0 */ + #define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0 UINT32_C(0x4) + /* Unknown */ + #define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_UNKNOWN UINT32_C(0xff) + uint8_t unused_0; + uint16_t dflt_vnic_id; + /* The default VNIC ID assigned to a function that is being queried. */ + uint8_t unused_1; + uint8_t unused_2; + uint32_t min_bw; + /* + * Minimum BW allocated for this function in Mbps. The HWRM will + * translate this value into byte counter and time interval used for the + * scheduler inside the device. A value of 0 indicates the minimum + * bandwidth is not configured. + */ + uint32_t max_bw; + /* + * Maximum BW allocated for this function in Mbps. The HWRM will + * translate this value into byte counter and time interval used for the + * scheduler inside the device. A value of 0 indicates that the maximum + * bandwidth is not configured. + */ + uint8_t evb_mode; + /* + * This value indicates the Edge virtual bridge mode for the domain that + * this function belongs to. + */ + /* No Edge Virtual Bridging (EVB) */ + #define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_NO_EVB UINT32_C(0x0) + /* Virtual Ethernet Bridge (VEB) */ + #define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_VEB UINT32_C(0x1) + /* Virtual Ethernet Port Aggregator (VEPA) */ + #define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_VEPA UINT32_C(0x2) + uint8_t unused_3; + uint16_t unused_4; + uint32_t alloc_mcast_filters; + /* + * The number of allocated multicast filters for this function on the RX + * side. + */ + uint32_t alloc_hw_ring_grps; + /* The number of allocated HW ring groups for this function. */ + uint8_t unused_5; + uint8_t unused_6; + uint8_t unused_7; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_cfg */ +/* + * Description: This command allows configuration of a PF by the corresponding + * PF driver. This command also allows configuration of a child VF by its parent + * PF driver. The input FID value is used to indicate what function is being + * configured. This allows a PF driver to configure the PF owned by itself or a + * virtual function that is a child of the PF. This command allows to reserve + * resources for a VF by its parent PF. To reverse the process, the command + * should be called with all enables flags cleared for resources. This will free + * allocated resources for the VF and return them to the resource pool. If this + * command is requested by a VF driver to configure or reserve resources, then + * the HWRM shall fail this command. If default MAC address and/or VLAN are + * provided in this command, then the HWRM shall set up appropriate MAC/VLAN + * filters for the function that is being configured. If source properties + * checks are enabled and default MAC address and/or IP address are provided in + * this command, then the HWRM shall set appropriate source property checks + * based on provided MAC and/or IP addresses. The parent PF driver should not + * set MTU/MRU for a VF using this command. This is to allow MTU/MRU setting by + * the VF driver. If the MTU or MRU for a VF is set by the PF driver, then the + * HWRM should ignore it. A function's MTU/MRU should be set prior to allocating + * RX VNICs or TX rings. + */ +/* Input (88 bytes) */ + +struct hwrm_func_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t fid; + /* + * Function ID of the function that is being configured. If set to + * 0xFF... (All Fs), then the the configuration is for the requesting + * function. + */ + uint8_t unused_0; + uint8_t unused_1; + uint32_t flags; + /* + * When this bit is '1', the function is requested to be put in the + * promiscuous mode. + */ + #define HWRM_FUNC_CFG_INPUT_FLAGS_PROM_MODE UINT32_C(0x1) + /* + * When this bit is '1', the function is enabled with source MAC address + * check. This is an anti-spoofing check. If this flag is set, then the + * function shall be configured to allow transmission of frames with the + * source MAC address that is configured for this function. + */ + #define HWRM_FUNC_CFG_INPUT_FLAGS_SRC_MAC_ADDR_CHECK UINT32_C(0x2) + /* + * When this bit is '1', the function is enabled with source IP address + * check. This is an anti-spoofing check. If this flag is set, then the + * function shall be configured to allow transmission of frames with the + * source IP address that is configured for this function. + */ + #define HWRM_FUNC_CFG_INPUT_FLAGS_SRC_IP_ADDR_CHECK UINT32_C(0x4) + /* + * When this bit is set to '1', the function shall be configured with + * VLAN priority match. If the VLAN PRI of a packet originated from this + * function does not match, then the packet shall be discarded. + */ + #define HWRM_FUNC_CFG_INPUT_FLAGS_VLAN_PRI_MATCH UINT32_C(0x8) + /* + * When this bit is set to '1', the function shall be configured to + * check for VLAN priority match. If the VLAN PRI of a packet originated + * from this function does not match, then the default VLAN PRI shall be + * used. + */ + #define HWRM_FUNC_CFG_INPUT_FLAGS_DFLT_PRI_NOMATCH UINT32_C(0x10) + /* + * When this bit is set to '1', the function shall be configured to not + * allow the transmission of pause frames. PAUSE frames use 48-bit + * destination multicast MAC address 01-80-C2-00-00-01. + */ + #define HWRM_FUNC_CFG_INPUT_FLAGS_DISABLE_PAUSE UINT32_C(0x20) + /* + * When this bit is set to '1', the function shall be configured to not + * allow the transmission of Spanning Tree Protocol (STP) frames. STP + * frames use Ethertype 0x0802 and 48-bit destination multicast MAC + * address 01-80-C2-00-00-00 and 01-80-C2-00-00-08 for 802.1D and + * 802.1ad respectively. + */ + #define HWRM_FUNC_CFG_INPUT_FLAGS_DISABLE_STP UINT32_C(0x40) + /* + * When this bit is set to '1', the function shall be configured to not + * allow the transmission of Link Layer Discovery Protocol (LLDP) + * frames. LLDP frames use Ethertype 0x88CC and 48-bit destination + * multicast MAC address 01-80-C2-00-00-00 or 01-80-C2-00-00-03 or + * 01-80-C2-00-00-0E. + */ + #define HWRM_FUNC_CFG_INPUT_FLAGS_DISABLE_LLDP UINT32_C(0x80) + /* + * When this bit is set to '1', the function shall be configured to not + * allow the transmission of Precision Time Protocol (PTP) v2 frames. + * PTP frames use Ethertype 0x88F7 and 48-bit destination multicast MAC + * address 01-80-C2-00-00-0E or 01-1B-19-00-00-00. + */ + #define HWRM_FUNC_CFG_INPUT_FLAGS_DISABLE_PTPV2 UINT32_C(0x100) + uint32_t enables; + /* This bit must be '1' for the mtu field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_MTU UINT32_C(0x1) + /* This bit must be '1' for the mru field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_MRU UINT32_C(0x2) + /* This bit must be '1' for the num_rsscos_ctxs field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS UINT32_C(0x4) + /* This bit must be '1' for the num_cmpl_rings field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_CMPL_RINGS UINT32_C(0x8) + /* This bit must be '1' for the num_tx_rings field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_TX_RINGS UINT32_C(0x10) + /* This bit must be '1' for the num_rx_rings field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_RX_RINGS UINT32_C(0x20) + /* This bit must be '1' for the num_l2_ctxs field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_L2_CTXS UINT32_C(0x40) + /* This bit must be '1' for the num_vnics field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_VNICS UINT32_C(0x80) + /* This bit must be '1' for the num_stat_ctxs field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_STAT_CTXS UINT32_C(0x100) + /* This bit must be '1' for the dflt_mac_addr field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_MAC_ADDR UINT32_C(0x200) + /* This bit must be '1' for the dflt_vlan field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_VLAN UINT32_C(0x400) + /* This bit must be '1' for the dflt_ip_addr field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_IP_ADDR UINT32_C(0x800) + /* This bit must be '1' for the min_bw field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_MIN_BW UINT32_C(0x1000) + /* This bit must be '1' for the max_bw field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_MAX_BW UINT32_C(0x2000) + /* This bit must be '1' for the async_event_cr field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR UINT32_C(0x4000) + /* + * This bit must be '1' for the vlan_antispoof_mode field to be + * configured. + */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_VLAN_ANTISPOOF_MODE UINT32_C(0x8000) + /* + * This bit must be '1' for the allowed_vlan_pris field to be + * configured. + */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_ALLOWED_VLAN_PRIS UINT32_C(0x10000) + /* This bit must be '1' for the evb_mode field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_EVB_MODE UINT32_C(0x20000) + /* + * This bit must be '1' for the num_mcast_filters field to be + * configured. + */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_MCAST_FILTERS UINT32_C(0x40000) + /* This bit must be '1' for the num_hw_ring_grps field to be configured. */ + #define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_HW_RING_GRPS UINT32_C(0x80000) + uint16_t mtu; + /* + * The maximum transmission unit of the function. The HWRM should make + * sure that the mtu of the function does not exceed the mtu of the + * physical port that this function is associated with. In addition to + * configuring mtu per function, it is possible to configure mtu per + * transmit ring. By default, the mtu of each transmit ring associated + * with a function is equal to the mtu of the function. The HWRM should + * make sure that the mtu of each transmit ring that is assigned to a + * function has a valid mtu. + */ + uint16_t mru; + /* + * The maximum receive unit of the function. The HWRM should make sure + * that the mru of the function does not exceed the mru of the physical + * port that this function is associated with. In addition to + * configuring mru per function, it is possible to configure mru per + * vnic. By default, the mru of each vnic associated with a function is + * equal to the mru of the function. The HWRM should make sure that the + * mru of each vnic that is assigned to a function has a valid mru. + */ + uint16_t num_rsscos_ctxs; + /* The number of RSS/COS contexts requested for the function. */ + uint16_t num_cmpl_rings; + /* + * The number of completion rings requested for the function. This does + * not include the rings allocated to any children functions if any. + */ + uint16_t num_tx_rings; + /* + * The number of transmit rings requested for the function. This does + * not include the rings allocated to any children functions if any. + */ + uint16_t num_rx_rings; + /* + * The number of receive rings requested for the function. This does not + * include the rings allocated to any children functions if any. + */ + uint16_t num_l2_ctxs; + /* The requested number of L2 contexts for the function. */ + uint16_t num_vnics; + /* The requested number of vnics for the function. */ + uint16_t num_stat_ctxs; + /* The requested number of statistic contexts for the function. */ + uint16_t num_hw_ring_grps; + /* + * The number of HW ring groups that should be reserved for this + * function. + */ + uint8_t dflt_mac_addr[6]; + /* The default MAC address for the function being configured. */ + uint16_t dflt_vlan; + /* + * The default VLAN for the function being configured. This field's + * format is same as 802.1Q Tag's Tag Control Information (TCI) format + * that includes both Priority Code Point (PCP) and VLAN Identifier + * (VID). + */ + uint32_t dflt_ip_addr[4]; /* big endian */ + /* + * The default IP address for the function being configured. This + * address is only used in enabling source property check. + */ + uint32_t min_bw; + /* + * Minimum BW allocated for this function in Mbps. The HWRM will + * translate this value into byte counter and time interval used for the + * scheduler inside the device. + */ + uint32_t max_bw; + /* + * Maximum BW allocated for this function in Mbps. The HWRM will + * translate this value into byte counter and time interval used for the + * scheduler inside the device. + */ + uint16_t async_event_cr; + /* + * ID of the target completion ring for receiving asynchronous event + * completions. If this field is not valid, then the HWRM shall use the + * default completion ring of the function that is being configured as + * the target completion ring for providing any asynchronous event + * completions for that function. If this field is valid, then the HWRM + * shall use the completion ring identified by this ID as the target + * completion ring for providing any asynchronous event completions for + * the function that is being configured. + */ + uint8_t vlan_antispoof_mode; + /* VLAN Anti-spoofing mode. */ + /* No VLAN anti-spoofing checks are enabled */ + #define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_NOCHECK UINT32_C(0x0) + /* Validate VLAN against the configured VLAN(s) */ + #define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_VALIDATE_VLAN UINT32_C(0x1) + /* Insert VLAN if it does not exist, otherwise discard */ + #define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_INSERT_IF_VLANDNE UINT32_C(0x2) + /* Insert VLAN if it does not exist, override VLAN if it exists */ + #define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_INSERT_OR_OVERRIDE_VLAN UINT32_C(0x3) + uint8_t allowed_vlan_pris; + /* + * This bit field defines VLAN PRIs that are allowed on this function. + * If nth bit is set, then VLAN PRI n is allowed on this function. + */ + uint8_t evb_mode; + /* + * The HWRM shall allow a PF driver to change EVB mode for the partition + * it belongs to. The HWRM shall not allow a VF driver to change the EVB + * mode. The HWRM shall take into account the switching of EVB mode from + * one to another and reconfigure hardware resources as appropriately. + * The switching from VEB to VEPA mode requires the disabling of the + * loopback traffic. Additionally, source knock outs are handled + * differently in VEB and VEPA modes. + */ + /* No Edge Virtual Bridging (EVB) */ + #define HWRM_FUNC_CFG_INPUT_EVB_MODE_NO_EVB UINT32_C(0x0) + /* Virtual Ethernet Bridge (VEB) */ + #define HWRM_FUNC_CFG_INPUT_EVB_MODE_VEB UINT32_C(0x1) + /* Virtual Ethernet Port Aggregator (VEPA) */ + #define HWRM_FUNC_CFG_INPUT_EVB_MODE_VEPA UINT32_C(0x2) + uint8_t unused_2; + uint16_t num_mcast_filters; + /* + * The number of multicast filters that should be reserved for this + * function on the RX side. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_qstats */ +/* + * Description: This command returns statistics of a function. The input FID + * value is used to indicate what function is being queried. This allows a + * physical function driver to query virtual functions that are children of the + * physical function. The HWRM shall return any unsupported counter with a value + * of 0xFFFFFFFF for 32-bit counters and 0xFFFFFFFFFFFFFFFF for 64-bit counters. + */ +/* Input (24 bytes) */ + +struct hwrm_func_qstats_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t fid; + /* + * Function ID of the function that is being queried. 0xFF... (All Fs) + * if the query is for the requesting function. + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (176 bytes) */ + +struct hwrm_func_qstats_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint64_t tx_ucast_pkts; + /* Number of transmitted unicast packets on the function. */ + uint64_t tx_mcast_pkts; + /* Number of transmitted multicast packets on the function. */ + uint64_t tx_bcast_pkts; + /* Number of transmitted broadcast packets on the function. */ + uint64_t tx_err_pkts; + /* + * Number of transmitted packets that were dropped due to internal NIC + * resource problems. For transmit, this can only happen if TMP is + * configured to allow dropping in HOL blocking conditions, which is not + * a normal configuration. + */ + uint64_t tx_drop_pkts; + /* + * Number of dropped packets on transmit path on the function. These are + * packets that have been marked for drop by the TE CFA block or are + * packets that exceeded the transmit MTU limit for the function. + */ + uint64_t tx_ucast_bytes; + /* Number of transmitted bytes for unicast traffic on the function. */ + uint64_t tx_mcast_bytes; + /* Number of transmitted bytes for multicast traffic on the function. */ + uint64_t tx_bcast_bytes; + /* Number of transmitted bytes for broadcast traffic on the function. */ + uint64_t rx_ucast_pkts; + /* Number of received unicast packets on the function. */ + uint64_t rx_mcast_pkts; + /* Number of received multicast packets on the function. */ + uint64_t rx_bcast_pkts; + /* Number of received broadcast packets on the function. */ + uint64_t rx_err_pkts; + /* + * Number of received packets that were dropped on the function due to + * resource limitations. This can happen for 3 reasons. # The BD used + * for the packet has a bad format. # There were no BDs available in the + * ring for the packet. # There were no BDs available on-chip for the + * packet. + */ + uint64_t rx_drop_pkts; + /* + * Number of dropped packets on received path on the function. These are + * packets that have been marked for drop by the RE CFA. + */ + uint64_t rx_ucast_bytes; + /* Number of received bytes for unicast traffic on the function. */ + uint64_t rx_mcast_bytes; + /* Number of received bytes for multicast traffic on the function. */ + uint64_t rx_bcast_bytes; + /* Number of received bytes for broadcast traffic on the function. */ + uint64_t rx_agg_pkts; + /* Number of aggregated unicast packets on the function. */ + uint64_t rx_agg_bytes; + /* Number of aggregated unicast bytes on the function. */ + uint64_t rx_agg_events; + /* Number of aggregation events on the function. */ + uint64_t rx_agg_aborts; + /* Number of aborted aggregations on the function. */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_clr_stats */ +/* + * Description: This command clears statistics of a function. The input FID + * value is used to indicate what function's statistics is being cleared. This + * allows a physical function driver to clear statistics of virtual functions + * that are children of the physical function. + */ +/* Input (24 bytes) */ + +struct hwrm_func_clr_stats_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t fid; + /* + * Function ID of the function. 0xFF... (All Fs) if the query is for the + * requesting function. + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_clr_stats_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_vf_resc_free */ +/* Description: This command frees resources of a vf. */ +/* Input (24 bytes) */ + +struct hwrm_func_vf_resc_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t vf_id; + /* + * This value is used to identify a Virtual Function (VF). The scope of + * VF ID is local within a PF. + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_vf_resc_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_vf_vnic_ids_query */ +/* Description: This command is used to query vf vnic ids. */ +/* Input (32 bytes) */ + +struct hwrm_func_vf_vnic_ids_query_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t vf_id; + /* + * This value is used to identify a Virtual Function (VF). The scope of + * VF ID is local within a PF. + */ + uint8_t unused_0; + uint8_t unused_1; + uint32_t max_vnic_id_cnt; + /* Max number of vnic ids in vnic id table */ + uint64_t vnic_id_tbl_addr; + /* This is the address for VF VNIC ID table */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_vf_vnic_ids_query_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t vnic_id_cnt; + /* Actual number of vnic ids Each VNIC ID is written as a 32-bit number. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_drv_rgtr */ +/* + * Description: This command is used by the function driver to register its + * information with the HWRM. A function driver shall implement this command. A + * function driver shall use this command during the driver initialization right + * after the HWRM version discovery and default ring resources allocation. + */ +/* Input (80 bytes) */ + +struct hwrm_func_drv_rgtr_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * When this bit is '1', the function driver is requesting all requests + * from its children VF drivers to be forwarded to itself. This flag can + * only be set by the PF driver. If a VF driver sets this flag, it + * should be ignored by the HWRM. + */ + #define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FWD_ALL_MODE UINT32_C(0x1) + /* + * When this bit is '1', the function is requesting none of the requests + * from its children VF drivers to be forwarded to itself. This flag can + * only be set by the PF driver. If a VF driver sets this flag, it + * should be ignored by the HWRM. + */ + #define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FWD_NONE_MODE UINT32_C(0x2) + uint32_t enables; + /* This bit must be '1' for the os_type field to be configured. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_OS_TYPE UINT32_C(0x1) + /* This bit must be '1' for the ver field to be configured. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VER UINT32_C(0x2) + /* This bit must be '1' for the timestamp field to be configured. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_TIMESTAMP UINT32_C(0x4) + /* This bit must be '1' for the vf_req_fwd field to be configured. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VF_REQ_FWD UINT32_C(0x8) + /* This bit must be '1' for the async_event_fwd field to be configured. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_ASYNC_EVENT_FWD UINT32_C(0x10) + uint16_t os_type; + /* This value indicates the type of OS. */ + /* Unknown */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_UNKNOWN UINT32_C(0x0) + /* Other OS not listed below. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_OTHER UINT32_C(0x1) + /* MSDOS OS. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_MSDOS UINT32_C(0xe) + /* Windows OS. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_WINDOWS UINT32_C(0x12) + /* Solaris OS. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_SOLARIS UINT32_C(0x1d) + /* Linux OS. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_LINUX UINT32_C(0x24) + /* FreeBSD OS. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_FREEBSD UINT32_C(0x2a) + /* VMware ESXi OS. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_ESXI UINT32_C(0x68) + /* Microsoft Windows 8 64-bit OS. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_WIN864 UINT32_C(0x73) + /* Microsoft Windows Server 2012 R2 OS. */ + #define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_WIN2012R2 UINT32_C(0x74) + uint8_t ver_maj; + /* This is the major version of the driver. */ + uint8_t ver_min; + /* This is the minor version of the driver. */ + uint8_t ver_upd; + /* This is the update version of the driver. */ + uint8_t unused_0; + uint16_t unused_1; + uint32_t timestamp; + /* + * This is a 32-bit timestamp provided by the driver for keep alive. The + * timestamp is in multiples of 1ms. + */ + uint32_t unused_2; + uint32_t vf_req_fwd[8]; + /* + * This is a 256-bit bit mask provided by the PF driver for letting the + * HWRM know what commands issued by the VF driver to the HWRM should be + * forwarded to the PF driver. Nth bit refers to the Nth req_type. + * Setting Nth bit to 1 indicates that requests from the VF driver with + * req_type equal to N shall be forwarded to the parent PF driver. This + * field is not valid for the VF driver. + */ + uint32_t async_event_fwd[8]; + /* + * This is a 256-bit bit mask provided by the function driver (PF or VF + * driver) to indicate the list of asynchronous event completions to be + * forwarded. Nth bit refers to the Nth event_id. Setting Nth bit to 1 + * by the function driver shall result in the HWRM forwarding + * asynchronous event completion with event_id equal to N. If all bits + * are set to 0 (value of 0), then the HWRM shall not forward any + * asynchronous event completion to this function driver. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_drv_rgtr_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_drv_unrgtr */ +/* + * Description: This command is used by the function driver to un register with + * the HWRM. A function driver shall implement this command. A function driver + * shall use this command during the driver unloading. + */ +/* Input (24 bytes) */ + +struct hwrm_func_drv_unrgtr_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * When this bit is '1', the function driver is notifying the HWRM to + * prepare for the shutdown. + */ + #define HWRM_FUNC_DRV_UNRGTR_INPUT_FLAGS_PREPARE_FOR_SHUTDOWN UINT32_C(0x1) + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_drv_unrgtr_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_buf_rgtr */ +/* + * Description: This command is used by the PF driver to register buffers used + * in the PF-VF communication with the HWRM. The PF driver uses this command to + * register buffers for each PF-VF channel. A parent PF may issue this command + * per child VF. If VF ID is not valid, then this command is used to register + * buffers for all children VFs of the PF. + */ +/* Input (128 bytes) */ + +struct hwrm_func_buf_rgtr_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the vf_id field to be configured. */ + #define HWRM_FUNC_BUF_RGTR_INPUT_ENABLES_VF_ID UINT32_C(0x1) + /* This bit must be '1' for the err_buf_addr field to be configured. */ + #define HWRM_FUNC_BUF_RGTR_INPUT_ENABLES_ERR_BUF_ADDR UINT32_C(0x2) + uint16_t vf_id; + /* + * This value is used to identify a Virtual Function (VF). The scope of + * VF ID is local within a PF. + */ + uint16_t req_buf_num_pages; + /* This field represents the number of pages used for request buffer(s). */ + uint16_t req_buf_page_size; + /* This field represents the page size used for request buffer(s). */ + /* 16 bytes */ + #define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_16B UINT32_C(0x4) + /* 4 Kbytes */ + #define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_4K UINT32_C(0xc) + /* 8 Kbytes */ + #define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_8K UINT32_C(0xd) + /* 64 Kbytes */ + #define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_64K UINT32_C(0x10) + /* 2 Mbytes */ + #define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_2M UINT32_C(0x15) + /* 4 Mbytes */ + #define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_4M UINT32_C(0x16) + /* 1 Gbytes */ + #define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_1G UINT32_C(0x1e) + uint16_t req_buf_len; + /* The length of the request buffer per VF in bytes. */ + uint16_t resp_buf_len; + /* The length of the response buffer in bytes. */ + uint8_t unused_0; + uint8_t unused_1; + uint64_t req_buf_page_addr0; + /* This field represents the page address of page #0. */ + uint64_t req_buf_page_addr1; + /* This field represents the page address of page #1. */ + uint64_t req_buf_page_addr2; + /* This field represents the page address of page #2. */ + uint64_t req_buf_page_addr3; + /* This field represents the page address of page #3. */ + uint64_t req_buf_page_addr4; + /* This field represents the page address of page #4. */ + uint64_t req_buf_page_addr5; + /* This field represents the page address of page #5. */ + uint64_t req_buf_page_addr6; + /* This field represents the page address of page #6. */ + uint64_t req_buf_page_addr7; + /* This field represents the page address of page #7. */ + uint64_t req_buf_page_addr8; + /* This field represents the page address of page #8. */ + uint64_t req_buf_page_addr9; + /* This field represents the page address of page #9. */ + uint64_t error_buf_addr; + /* + * This field is used to receive the error reporting from the chipset. + * Only applicable for PFs. + */ + uint64_t resp_buf_addr; + /* This field is used to receive the response forwarded by the HWRM. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_buf_rgtr_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_buf_unrgtr */ +/* + * Description: This command is used by the PF driver to unregister buffers used + * in the PF-VF communication with the HWRM. The PF driver uses this command to + * unregister buffers for PF-VF communication. A parent PF may issue this + * command to unregister buffers for communication between the PF and a specific + * VF. If the VF ID is not valid, then this command is used to unregister + * buffers used for communications with all children VFs of the PF. + */ +/* Input (24 bytes) */ + +struct hwrm_func_buf_unrgtr_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the vf_id field to be configured. */ + #define HWRM_FUNC_BUF_UNRGTR_INPUT_ENABLES_VF_ID UINT32_C(0x1) + uint16_t vf_id; + /* + * This value is used to identify a Virtual Function (VF). The scope of + * VF ID is local within a PF. + */ + uint16_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_buf_unrgtr_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_func_drv_qver */ +/* + * Description: This command is used to query the version of the driver. Any + * driver version with major = 0, minor = 0, and update = 0 shall be considered + * an invalid or unknown version. + */ +/* Input (24 bytes) */ + +struct hwrm_func_drv_qver_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t reserved; + /* Reserved for future use */ + uint16_t fid; + /* + * Function ID of the function that is being queried. 0xFF... (All Fs) + * if the query is for the requesting function. + */ + uint16_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_func_drv_qver_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t os_type; + /* This value indicates the type of OS. */ + /* Unknown */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_UNKNOWN UINT32_C(0x0) + /* Other OS not listed below. */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_OTHER UINT32_C(0x1) + /* MSDOS OS. */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_MSDOS UINT32_C(0xe) + /* Windows OS. */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_WINDOWS UINT32_C(0x12) + /* Solaris OS. */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_SOLARIS UINT32_C(0x1d) + /* Linux OS. */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_LINUX UINT32_C(0x24) + /* FreeBSD OS. */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_FREEBSD UINT32_C(0x2a) + /* VMware ESXi OS. */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_ESXI UINT32_C(0x68) + /* Microsoft Windows 8 64-bit OS. */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_WIN864 UINT32_C(0x73) + /* Microsoft Windows Server 2012 R2 OS. */ + #define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_WIN2012R2 UINT32_C(0x74) + uint8_t ver_maj; + /* This is the major version of the driver. */ + uint8_t ver_min; + /* This is the minor version of the driver. */ + uint8_t ver_upd; + /* This is the update version of the driver. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_phy_cfg */ +/* + * Description: This command configures the PHY device for the port. It allows + * setting of the most generic settings for the PHY. The HWRM shall complete + * this command as soon as PHY settings are configured. They may not be applied + * when the command response is provided. A VF driver shall not be allowed to + * configure PHY using this command. In a network partition mode, a PF driver + * shall not be allowed to configure PHY using this command. + */ +/* Input (56 bytes) */ + +struct hwrm_port_phy_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * When this bit is set to '1', the PHY for the port shall be reset. # + * If this bit is set to 1, then the HWRM shall reset the PHY after + * applying PHY configuration changes specified in this command. # In + * order to guarantee that PHY configuration changes specified in this + * command take effect, the HWRM client should set this flag to 1. # If + * this bit is not set to 1, then the HWRM may reset the PHY depending + * on the current PHY configuration and settings specified in this + * command. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY UINT32_C(0x1) + /* + * When this bit is set to '1', the link shall be forced to be taken + * down. # When this bit is set to '1", all other command input settings + * related to the link speed shall be ignored. Once the link state is + * forced down, it can be explicitly cleared from that state by setting + * this flag to '0'. # If this flag is set to '0', then the link shall + * be cleared from forced down state if the link is in forced down + * state. There may be conditions (e.g. out-of-band or sideband + * configuration changes for the link) outside the scope of the HWRM + * implementation that may clear forced down link state. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE_LINK_DOWN UINT32_C(0x2) + /* + * When this bit is set to '1', the link shall be forced to the + * force_link_speed value. When this bit is set to '1', the HWRM client + * should not enable any of the auto negotiation related fields + * represented by auto_XXX fields in this command. When this bit is set + * to '1' and the HWRM client has enabled a auto_XXX field in this + * command, then the HWRM shall ignore the enabled auto_XXX field. When + * this bit is set to zero, the link shall be allowed to autoneg. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE UINT32_C(0x4) + /* + * When this bit is set to '1', the auto-negotiation process shall be + * restarted on the link. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG UINT32_C(0x8) + /* + * When this bit is set to '1', Energy Efficient Ethernet (EEE) is + * requested to be enabled on this link. If EEE is not supported on this + * port, then this flag shall be ignored by the HWRM. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_ENABLE UINT32_C(0x10) + /* + * When this bit is set to '1', Energy Efficient Ethernet (EEE) is + * requested to be disabled on this link. If EEE is not supported on + * this port, then this flag shall be ignored by the HWRM. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_DISABLE UINT32_C(0x20) + /* + * When this bit is set to '1' and EEE is enabled on this link, then TX + * LPI is requested to be enabled on the link. If EEE is not supported + * on this port, then this flag shall be ignored by the HWRM. If EEE is + * disabled on this port, then this flag shall be ignored by the HWRM. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_TX_LPI_ENABLE UINT32_C(0x40) + /* + * When this bit is set to '1' and EEE is enabled on this link, then TX + * LPI is requested to be disabled on the link. If EEE is not supported + * on this port, then this flag shall be ignored by the HWRM. If EEE is + * disabled on this port, then this flag shall be ignored by the HWRM. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_TX_LPI_DISABLE UINT32_C(0x80) + /* + * When set to 1, then the HWRM shall enable FEC autonegotitation on + * this port if supported. When set to 0, then this flag shall be + * ignored. If FEC autonegotiation is not supported, then the HWRM shall + * ignore this flag. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_AUTONEG_ENABLE UINT32_C(0x100) + /* + * When set to 1, then the HWRM shall disable FEC autonegotiation on + * this port if supported. When set to 0, then this flag shall be + * ignored. If FEC autonegotiation is not supported, then the HWRM shall + * ignore this flag. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_AUTONEG_DISABLE UINT32_C(0x200) + /* + * When set to 1, then the HWRM shall enable FEC CLAUSE 74 (Fire Code) + * on this port if supported. When set to 0, then this flag shall be + * ignored. If FEC CLAUSE 74 is not supported, then the HWRM shall + * ignore this flag. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE74_ENABLE UINT32_C(0x400) + /* + * When set to 1, then the HWRM shall disable FEC CLAUSE 74 (Fire Code) + * on this port if supported. When set to 0, then this flag shall be + * ignored. If FEC CLAUSE 74 is not supported, then the HWRM shall + * ignore this flag. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE74_DISABLE UINT32_C(0x800) + /* + * When set to 1, then the HWRM shall enable FEC CLAUSE 91 (Reed + * Solomon) on this port if supported. When set to 0, then this flag + * shall be ignored. If FEC CLAUSE 91 is not supported, then the HWRM + * shall ignore this flag. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE91_ENABLE UINT32_C(0x1000) + /* + * When set to 1, then the HWRM shall disable FEC CLAUSE 91 (Reed + * Solomon) on this port if supported. When set to 0, then this flag + * shall be ignored. If FEC CLAUSE 91 is not supported, then the HWRM + * shall ignore this flag. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE91_DISABLE UINT32_C(0x2000) + uint32_t enables; + /* This bit must be '1' for the auto_mode field to be configured. */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_MODE UINT32_C(0x1) + /* This bit must be '1' for the auto_duplex field to be configured. */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_DUPLEX UINT32_C(0x2) + /* This bit must be '1' for the auto_pause field to be configured. */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_PAUSE UINT32_C(0x4) + /* This bit must be '1' for the auto_link_speed field to be configured. */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED UINT32_C(0x8) + /* + * This bit must be '1' for the auto_link_speed_mask field to be + * configured. + */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED_MASK UINT32_C(0x10) + /* This bit must be '1' for the wirespeed field to be configured. */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_WIRESPEED UINT32_C(0x20) + /* This bit must be '1' for the lpbk field to be configured. */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_LPBK UINT32_C(0x40) + /* This bit must be '1' for the preemphasis field to be configured. */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_PREEMPHASIS UINT32_C(0x80) + /* This bit must be '1' for the force_pause field to be configured. */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_FORCE_PAUSE UINT32_C(0x100) + /* + * This bit must be '1' for the eee_link_speed_mask field to be + * configured. + */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_EEE_LINK_SPEED_MASK UINT32_C(0x200) + /* This bit must be '1' for the tx_lpi_timer field to be configured. */ + #define HWRM_PORT_PHY_CFG_INPUT_ENABLES_TX_LPI_TIMER UINT32_C(0x400) + uint16_t port_id; + /* Port ID of port that is to be configured. */ + uint16_t force_link_speed; + /* + * This is the speed that will be used if the force bit is '1'. If + * unsupported speed is selected, an error will be generated. + */ + /* 100Mb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100MB UINT32_C(0x1) + /* 1Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_1GB UINT32_C(0xa) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_2GB UINT32_C(0x14) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_2_5GB UINT32_C(0x19) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_10GB UINT32_C(0x64) + /* 20Mb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_20GB UINT32_C(0xc8) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_25GB UINT32_C(0xfa) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_40GB UINT32_C(0x190) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB UINT32_C(0x1f4) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB UINT32_C(0x3e8) + /* 10Mb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_10MB UINT32_C(0xffff) + uint8_t auto_mode; + /* + * This value is used to identify what autoneg mode is used when the + * link speed is not being forced. + */ + /* Disable autoneg or autoneg disabled. No speeds are selected. */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_NONE UINT32_C(0x0) + /* Select all possible speeds for autoneg mode. */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ALL_SPEEDS UINT32_C(0x1) + /* + * Select only the auto_link_speed speed for autoneg mode. This + * mode has been DEPRECATED. An HWRM client should not use this + * mode. + */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ONE_SPEED UINT32_C(0x2) + /* + * Select the auto_link_speed or any speed below that speed for + * autoneg. This mode has been DEPRECATED. An HWRM client should + * not use this mode. + */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ONE_OR_BELOW UINT32_C(0x3) + /* + * Select the speeds based on the corresponding link speed mask + * value that is provided. + */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK UINT32_C(0x4) + uint8_t auto_duplex; + /* + * This is the duplex setting that will be used if the autoneg_mode is + * "one_speed" or "one_or_below". + */ + /* Half Duplex will be requested. */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF UINT32_C(0x0) + /* Full duplex will be requested. */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_FULL UINT32_C(0x1) + /* Both Half and Full dupex will be requested. */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_BOTH UINT32_C(0x2) + uint8_t auto_pause; + /* + * This value is used to configure the pause that will be used for + * autonegotiation. Add text on the usage of auto_pause and force_pause. + */ + /* + * When this bit is '1', Generation of tx pause messages has been + * requested. Disabled otherwise. + */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_TX UINT32_C(0x1) + /* + * When this bit is '1', Reception of rx pause messages has been + * requested. Disabled otherwise. + */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_RX UINT32_C(0x2) + /* + * When set to 1, the advertisement of pause is enabled. # When the + * auto_mode is not set to none and this flag is set to 1, then the + * auto_pause bits on this port are being advertised and autoneg pause + * results are being interpreted. # When the auto_mode is not set to + * none and this flag is set to 0, the pause is forced as indicated in + * force_pause, and also advertised as auto_pause bits, but the autoneg + * results are not interpreted since the pause configuration is being + * forced. # When the auto_mode is set to none and this flag is set to + * 1, auto_pause bits should be ignored and should be set to 0. + */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_AUTONEG_PAUSE UINT32_C(0x4) + uint8_t unused_0; + uint16_t auto_link_speed; + /* + * This is the speed that will be used if the autoneg_mode is + * "one_speed" or "one_or_below". If an unsupported speed is selected, + * an error will be generated. + */ + /* 100Mb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100MB UINT32_C(0x1) + /* 1Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_1GB UINT32_C(0xa) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_2GB UINT32_C(0x14) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_2_5GB UINT32_C(0x19) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_10GB UINT32_C(0x64) + /* 20Mb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_20GB UINT32_C(0xc8) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_25GB UINT32_C(0xfa) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_40GB UINT32_C(0x190) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_50GB UINT32_C(0x1f4) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100GB UINT32_C(0x3e8) + /* 10Mb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_10MB UINT32_C(0xffff) + uint16_t auto_link_speed_mask; + /* + * This is a mask of link speeds that will be used if autoneg_mode is + * "mask". If unsupported speed is enabled an error will be generated. + */ + /* 100Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100MBHD UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100MB UINT32_C(0x2) + /* 1Gb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_1GBHD UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_1GB UINT32_C(0x8) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_2GB UINT32_C(0x10) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_2_5GB UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_10GB UINT32_C(0x40) + /* 20Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_20GB UINT32_C(0x80) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_25GB UINT32_C(0x100) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_40GB UINT32_C(0x200) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_50GB UINT32_C(0x400) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100GB UINT32_C(0x800) + /* 10Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_10MBHD UINT32_C(0x1000) + /* 10Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_10MB UINT32_C(0x2000) + uint8_t wirespeed; + /* This value controls the wirespeed feature. */ + /* Wirespeed feature is disabled. */ + #define HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_OFF UINT32_C(0x0) + /* Wirespeed feature is enabled. */ + #define HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_ON UINT32_C(0x1) + uint8_t lpbk; + /* This value controls the loopback setting for the PHY. */ + /* No loopback is selected. Normal operation. */ + #define HWRM_PORT_PHY_CFG_INPUT_LPBK_NONE UINT32_C(0x0) + /* + * The HW will be configured with local loopback such that host + * data is sent back to the host without modification. + */ + #define HWRM_PORT_PHY_CFG_INPUT_LPBK_LOCAL UINT32_C(0x1) + /* + * The HW will be configured with remote loopback such that port + * logic will send packets back out the transmitter that are + * received. + */ + #define HWRM_PORT_PHY_CFG_INPUT_LPBK_REMOTE UINT32_C(0x2) + uint8_t force_pause; + /* + * This value is used to configure the pause that will be used for force + * mode. + */ + /* + * When this bit is '1', Generation of tx pause messages is supported. + * Disabled otherwise. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAUSE_TX UINT32_C(0x1) + /* + * When this bit is '1', Reception of rx pause messages is supported. + * Disabled otherwise. + */ + #define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAUSE_RX UINT32_C(0x2) + uint8_t unused_1; + uint32_t preemphasis; + /* + * This value controls the pre-emphasis to be used for the link. Driver + * should not set this value (use enable.preemphasis = 0) unless driver + * is sure of setting. Normally HWRM FW will determine proper pre- + * emphasis. + */ + uint16_t eee_link_speed_mask; + /* + * Setting for link speed mask that is used to advertise speeds during + * autonegotiation when EEE is enabled. This field is valid only when + * EEE is enabled. The speeds specified in this field shall be a subset + * of speeds specified in auto_link_speed_mask. If EEE is enabled,then + * at least one speed shall be provided in this mask. + */ + /* Reserved */ + #define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD1 UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_100MB UINT32_C(0x2) + /* Reserved */ + #define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD2 UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_1GB UINT32_C(0x8) + /* Reserved */ + #define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD3 UINT32_C(0x10) + /* Reserved */ + #define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD4 UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_10GB UINT32_C(0x40) + uint8_t unused_2; + uint8_t unused_3; + uint32_t tx_lpi_timer; + uint32_t unused_4; + /* + * Reuested setting of TX LPI timer in microseconds. This field is valid + * only when EEE is enabled and TX LPI is enabled. + */ + #define HWRM_PORT_PHY_CFG_INPUT_TX_LPI_TIMER_MASK UINT32_C(0xffffff) + #define HWRM_PORT_PHY_CFG_INPUT_TX_LPI_TIMER_SFT 0 +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_port_phy_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_phy_qcfg */ +/* Description: This command queries the PHY configuration for the port. */ +/* Input (24 bytes) */ + +struct hwrm_port_phy_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t port_id; + /* Port ID of port that is to be queried. */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (96 bytes) */ + +struct hwrm_port_phy_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t link; + /* This value indicates the current link status. */ + /* There is no link or cable detected. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_NO_LINK UINT32_C(0x0) + /* There is no link, but a cable has been detected. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SIGNAL UINT32_C(0x1) + /* There is a link. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK UINT32_C(0x2) + uint8_t unused_0; + uint16_t link_speed; + /* This value indicates the current link speed of the connection. */ + /* 100Mb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB UINT32_C(0x1) + /* 1Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_1GB UINT32_C(0xa) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2GB UINT32_C(0x14) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2_5GB UINT32_C(0x19) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10GB UINT32_C(0x64) + /* 20Mb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_20GB UINT32_C(0xc8) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_25GB UINT32_C(0xfa) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_40GB UINT32_C(0x190) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_50GB UINT32_C(0x1f4) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100GB UINT32_C(0x3e8) + /* 10Mb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10MB UINT32_C(0xffff) + uint8_t duplex; + /* This value is indicates the duplex of the current connection. */ + /* Half Duplex connection. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_HALF UINT32_C(0x0) + /* Full duplex connection. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_FULL UINT32_C(0x1) + uint8_t pause; + /* + * This value is used to indicate the current pause configuration. When + * autoneg is enabled, this value represents the autoneg results of + * pause configuration. + */ + /* + * When this bit is '1', Generation of tx pause messages is supported. + * Disabled otherwise. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX UINT32_C(0x1) + /* + * When this bit is '1', Reception of rx pause messages is supported. + * Disabled otherwise. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX UINT32_C(0x2) + uint16_t support_speeds; + /* + * The supported speeds for the port. This is a bit mask. For each speed + * that is supported, the corrresponding bit will be set to '1'. + */ + /* 100Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MBHD UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MB UINT32_C(0x2) + /* 1Gb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GBHD UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB UINT32_C(0x8) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2GB UINT32_C(0x10) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB UINT32_C(0x40) + /* 20Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB UINT32_C(0x80) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB UINT32_C(0x100) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB UINT32_C(0x200) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB UINT32_C(0x400) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB UINT32_C(0x800) + /* 10Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10MBHD UINT32_C(0x1000) + /* 10Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10MB UINT32_C(0x2000) + uint16_t force_link_speed; + /* + * Current setting of forced link speed. When the link speed is not + * being forced, this value shall be set to 0. + */ + /* 100Mb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_100MB UINT32_C(0x1) + /* 1Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_1GB UINT32_C(0xa) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_2GB UINT32_C(0x14) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_2_5GB UINT32_C(0x19) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_10GB UINT32_C(0x64) + /* 20Mb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_20GB UINT32_C(0xc8) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_25GB UINT32_C(0xfa) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_40GB UINT32_C(0x190) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_50GB UINT32_C(0x1f4) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_100GB UINT32_C(0x3e8) + /* 10Mb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_10MB UINT32_C(0xffff) + uint8_t auto_mode; + /* Current setting of auto negotiation mode. */ + /* Disable autoneg or autoneg disabled. No speeds are selected. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE UINT32_C(0x0) + /* Select all possible speeds for autoneg mode. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_ALL_SPEEDS UINT32_C(0x1) + /* + * Select only the auto_link_speed speed for autoneg mode. This + * mode has been DEPRECATED. An HWRM client should not use this + * mode. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_ONE_SPEED UINT32_C(0x2) + /* + * Select the auto_link_speed or any speed below that speed for + * autoneg. This mode has been DEPRECATED. An HWRM client should + * not use this mode. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_ONE_OR_BELOW UINT32_C(0x3) + /* + * Select the speeds based on the corresponding link speed mask + * value that is provided. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_SPEED_MASK UINT32_C(0x4) + uint8_t auto_pause; + /* + * Current setting of pause autonegotiation. Move autoneg_pause flag + * here. + */ + /* + * When this bit is '1', Generation of tx pause messages has been + * requested. Disabled otherwise. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAUSE_TX UINT32_C(0x1) + /* + * When this bit is '1', Reception of rx pause messages has been + * requested. Disabled otherwise. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAUSE_RX UINT32_C(0x2) + /* + * When set to 1, the advertisement of pause is enabled. # When the + * auto_mode is not set to none and this flag is set to 1, then the + * auto_pause bits on this port are being advertised and autoneg pause + * results are being interpreted. # When the auto_mode is not set to + * none and this flag is set to 0, the pause is forced as indicated in + * force_pause, and also advertised as auto_pause bits, but the autoneg + * results are not interpreted since the pause configuration is being + * forced. # When the auto_mode is set to none and this flag is set to + * 1, auto_pause bits should be ignored and should be set to 0. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAUSE_AUTONEG_PAUSE UINT32_C(0x4) + uint16_t auto_link_speed; + /* + * Current setting for auto_link_speed. This field is only valid when + * auto_mode is set to "one_speed" or "one_or_below". + */ + /* 100Mb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_100MB UINT32_C(0x1) + /* 1Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_1GB UINT32_C(0xa) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_2GB UINT32_C(0x14) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_2_5GB UINT32_C(0x19) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_10GB UINT32_C(0x64) + /* 20Mb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_20GB UINT32_C(0xc8) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_25GB UINT32_C(0xfa) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_40GB UINT32_C(0x190) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_50GB UINT32_C(0x1f4) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_100GB UINT32_C(0x3e8) + /* 10Mb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_10MB UINT32_C(0xffff) + uint16_t auto_link_speed_mask; + /* + * Current setting for auto_link_speed_mask that is used to advertise + * speeds during autonegotiation. This field is only valid when + * auto_mode is set to "mask". The speeds specified in this field shall + * be a subset of supported speeds on this port. + */ + /* 100Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_100MBHD UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_100MB UINT32_C(0x2) + /* 1Gb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_1GBHD UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_1GB UINT32_C(0x8) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_2GB UINT32_C(0x10) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_2_5GB UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_10GB UINT32_C(0x40) + /* 20Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_20GB UINT32_C(0x80) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_25GB UINT32_C(0x100) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_40GB UINT32_C(0x200) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_50GB UINT32_C(0x400) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_100GB UINT32_C(0x800) + /* 10Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_10MBHD UINT32_C(0x1000) + /* 10Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_10MB UINT32_C(0x2000) + uint8_t wirespeed; + /* Current setting for wirespeed. */ + /* Wirespeed feature is disabled. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_OFF UINT32_C(0x0) + /* Wirespeed feature is enabled. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_ON UINT32_C(0x1) + uint8_t lpbk; + /* Current setting for loopback. */ + /* No loopback is selected. Normal operation. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_NONE UINT32_C(0x0) + /* + * The HW will be configured with local loopback such that host + * data is sent back to the host without modification. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_LOCAL UINT32_C(0x1) + /* + * The HW will be configured with remote loopback such that port + * logic will send packets back out the transmitter that are + * received. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_REMOTE UINT32_C(0x2) + uint8_t force_pause; + /* + * Current setting of forced pause. When the pause configuration is not + * being forced, then this value shall be set to 0. + */ + /* + * When this bit is '1', Generation of tx pause messages is supported. + * Disabled otherwise. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAUSE_TX UINT32_C(0x1) + /* + * When this bit is '1', Reception of rx pause messages is supported. + * Disabled otherwise. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAUSE_RX UINT32_C(0x2) + uint8_t module_status; + /* + * This value indicates the current status of the optics module on this + * port. + */ + /* Module is inserted and accepted */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NONE UINT32_C(0x0) + /* Module is rejected and transmit side Laser is disabled. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_DISABLETX UINT32_C(0x1) + /* Module mismatch warning. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_WARNINGMSG UINT32_C(0x2) + /* Module is rejected and powered down. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_PWRDOWN UINT32_C(0x3) + /* Module is not inserted. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NOTINSERTED UINT32_C(0x4) + /* Module status is not applicable. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NOTAPPLICABLE UINT32_C(0xff) + uint32_t preemphasis; + /* Current setting for preemphasis. */ + uint8_t phy_maj; + /* This field represents the major version of the PHY. */ + uint8_t phy_min; + /* This field represents the minor version of the PHY. */ + uint8_t phy_bld; + /* This field represents the build version of the PHY. */ + uint8_t phy_type; + /* This value represents a PHY type. */ + /* Unknown */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN UINT32_C(0x0) + /* BASE-CR */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR UINT32_C(0x1) + /* BASE-KR4 (Deprecated) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4 UINT32_C(0x2) + /* BASE-LR */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR UINT32_C(0x3) + /* BASE-SR */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASESR UINT32_C(0x4) + /* BASE-KR2 (Deprecated) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2 UINT32_C(0x5) + /* BASE-KX */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX UINT32_C(0x6) + /* BASE-KR */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR UINT32_C(0x7) + /* BASE-T */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET UINT32_C(0x8) + /* EEE capable BASE-T */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE UINT32_C(0x9) + /* SGMII connected external PHY */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_SGMIIEXTPHY UINT32_C(0xa) + uint8_t media_type; + /* This value represents a media type. */ + /* Unknown */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_UNKNOWN UINT32_C(0x0) + /* Twisted Pair */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_TP UINT32_C(0x1) + /* Direct Attached Copper */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_DAC UINT32_C(0x2) + /* Fiber */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_FIBRE UINT32_C(0x3) + uint8_t xcvr_pkg_type; + /* This value represents a transceiver type. */ + /* PHY and MAC are in the same package */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_XCVR_INTERNAL UINT32_C(0x1) + /* PHY and MAC are in different packages */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_XCVR_EXTERNAL UINT32_C(0x2) + uint8_t eee_config_phy_addr; + /* + * This field represents flags related to EEE configuration. These EEE + * configuration flags are valid only when the auto_mode is not set to + * none (in other words autonegotiation is enabled). + */ + /* This field represents PHY address. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_ADDR_MASK UINT32_C(0x1f) + #define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_ADDR_SFT 0 + /* + * When set to 1, Energy Efficient Ethernet (EEE) mode is enabled. + * Speeds for autoneg with EEE mode enabled are based on + * eee_link_speed_mask. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_EEE_ENABLED UINT32_C(0x20) + /* + * This flag is valid only when eee_enabled is set to 1. # If + * eee_enabled is set to 0, then EEE mode is disabled and this flag + * shall be ignored. # If eee_enabled is set to 1 and this flag is set + * to 1, then Energy Efficient Ethernet (EEE) mode is enabled and in + * use. # If eee_enabled is set to 1 and this flag is set to 0, then + * Energy Efficient Ethernet (EEE) mode is enabled but is currently not + * in use. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_EEE_ACTIVE UINT32_C(0x40) + /* + * This flag is valid only when eee_enabled is set to 1. # If + * eee_enabled is set to 0, then EEE mode is disabled and this flag + * shall be ignored. # If eee_enabled is set to 1 and this flag is set + * to 1, then Energy Efficient Ethernet (EEE) mode is enabled and TX LPI + * is enabled. # If eee_enabled is set to 1 and this flag is set to 0, + * then Energy Efficient Ethernet (EEE) mode is enabled but TX LPI is + * disabled. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_EEE_TX_LPI UINT32_C(0x80) + /* + * This field represents flags related to EEE configuration. These EEE + * configuration flags are valid only when the auto_mode is not set to + * none (in other words autonegotiation is enabled). + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_MASK UINT32_C(0xe0) + #define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_SFT 5 + uint8_t parallel_detect; + /* Reserved field, set to 0 */ + /* + * When set to 1, the parallel detection is used to determine the speed + * of the link partner. Parallel detection is used when a + * autonegotiation capable device is connected to a link parter that is + * not capable of autonegotiation. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_PARALLEL_DETECT UINT32_C(0x1) + /* Reserved field, set to 0 */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_RESERVED_MASK UINT32_C(0xfe) + #define HWRM_PORT_PHY_QCFG_OUTPUT_RESERVED_SFT 1 + uint16_t link_partner_adv_speeds; + /* + * The advertised speeds for the port by the link partner. Each + * advertised speed will be set to '1'. + */ + /* 100Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_100MBHD UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_100MB UINT32_C(0x2) + /* 1Gb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_1GBHD UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_1GB UINT32_C(0x8) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_2GB UINT32_C(0x10) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_2_5GB UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_10GB UINT32_C(0x40) + /* 20Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_20GB UINT32_C(0x80) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_25GB UINT32_C(0x100) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_40GB UINT32_C(0x200) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_50GB UINT32_C(0x400) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_100GB UINT32_C(0x800) + /* 10Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_10MBHD UINT32_C(0x1000) + /* 10Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_10MB UINT32_C(0x2000) + uint8_t link_partner_adv_auto_mode; + /* + * The advertised autoneg for the port by the link partner. This field + * is deprecated and should be set to 0. + */ + /* Disable autoneg or autoneg disabled. No speeds are selected. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_NONE UINT32_C(0x0) + /* Select all possible speeds for autoneg mode. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_ALL_SPEEDS UINT32_C(0x1) + /* + * Select only the auto_link_speed speed for autoneg mode. This + * mode has been DEPRECATED. An HWRM client should not use this + * mode. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_ONE_SPEED UINT32_C(0x2) + /* + * Select the auto_link_speed or any speed below that speed for + * autoneg. This mode has been DEPRECATED. An HWRM client should + * not use this mode. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_ONE_OR_BELOW UINT32_C(0x3) + /* + * Select the speeds based on the corresponding link speed mask + * value that is provided. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_SPEED_MASK UINT32_C(0x4) + uint8_t link_partner_adv_pause; + /* The advertised pause settings on the port by the link partner. */ + /* + * When this bit is '1', Generation of tx pause messages is supported. + * Disabled otherwise. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_PAUSE_TX UINT32_C(0x1) + /* + * When this bit is '1', Reception of rx pause messages is supported. + * Disabled otherwise. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_PAUSE_RX UINT32_C(0x2) + uint16_t adv_eee_link_speed_mask; + /* + * Current setting for link speed mask that is used to advertise speeds + * during autonegotiation when EEE is enabled. This field is valid only + * when eee_enabled flags is set to 1. The speeds specified in this + * field shall be a subset of speeds specified in auto_link_speed_mask. + */ + /* Reserved */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD1 UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_100MB UINT32_C(0x2) + /* Reserved */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD2 UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_1GB UINT32_C(0x8) + /* Reserved */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD3 UINT32_C(0x10) + /* Reserved */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD4 UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_10GB UINT32_C(0x40) + uint16_t link_partner_adv_eee_link_speed_mask; + /* + * Current setting for link speed mask that is advertised by the link + * partner when EEE is enabled. This field is valid only when + * eee_enabled flags is set to 1. + */ + /* Reserved */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD1 UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_100MB UINT32_C(0x2) + /* Reserved */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD2 UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_1GB UINT32_C(0x8) + /* Reserved */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD3 UINT32_C(0x10) + /* Reserved */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD4 UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_10GB UINT32_C(0x40) + uint32_t xcvr_identifier_type_tx_lpi_timer; + /* This value represents transceiver identifier type. */ + /* + * Current setting of TX LPI timer in microseconds. This field is valid + * only when_eee_enabled flag is set to 1 and tx_lpi_enabled is set to + * 1. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_TX_LPI_TIMER_MASK UINT32_C(0xffffff) + #define HWRM_PORT_PHY_QCFG_OUTPUT_TX_LPI_TIMER_SFT 0 + /* This value represents transceiver identifier type. */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_MASK UINT32_C(0xff000000) + #define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_SFT 24 + /* Unknown */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_UNKNOWN (UINT32_C(0x0) << 24) + /* SFP/SFP+/SFP28 */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_SFP (UINT32_C(0x3) << 24) + /* QSFP */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP (UINT32_C(0xc) << 24) + /* QSFP+ */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFPPLUS (UINT32_C(0xd) << 24) + /* QSFP28 */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP28 (UINT32_C(0x11) << 24) + uint16_t fec_cfg; + /* + * This value represents the current configuration of Forward Error + * Correction (FEC) on the port. + */ + /* + * When set to 1, then FEC is not supported on this port. If this flag + * is set to 1, then all other FEC configuration flags shall be ignored. + * When set to 0, then FEC is supported as indicated by other + * configuration flags. If no cable is attached and the HWRM does not + * yet know the FEC capability, then the HWRM shall set this flag to 1 + * when reporting FEC capability. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_NONE_SUPPORTED UINT32_C(0x1) + /* + * When set to 1, then FEC autonegotiation is supported on this port. + * When set to 0, then FEC autonegotiation is not supported on this + * port. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_AUTONEG_SUPPORTED UINT32_C(0x2) + /* + * When set to 1, then FEC autonegotiation is enabled on this port. When + * set to 0, then FEC autonegotiation is disabled if supported. This + * flag should be ignored if FEC autonegotiation is not supported on + * this port. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_AUTONEG_ENABLED UINT32_C(0x4) + /* + * When set to 1, then FEC CLAUSE 74 (Fire Code) is supported on this + * port. When set to 0, then FEC CLAUSE 74 (Fire Code) is not supported + * on this port. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_SUPPORTED UINT32_C(0x8) + /* + * When set to 1, then FEC CLAUSE 74 (Fire Code) is enabled on this + * port. When set to 0, then FEC CLAUSE 74 (Fire Code) is disabled if + * supported. This flag should be ignored if FEC CLAUSE 74 is not + * supported on this port. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_ENABLED UINT32_C(0x10) + /* + * When set to 1, then FEC CLAUSE 91 (Reed Solomon) is supported on this + * port. When set to 0, then FEC CLAUSE 91 (Reed Solomon) is not + * supported on this port. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_SUPPORTED UINT32_C(0x20) + /* + * When set to 1, then FEC CLAUSE 91 (Reed Solomon) is enabled on this + * port. When set to 0, then FEC CLAUSE 91 (Reed Solomon) is disabled if + * supported. This flag should be ignored if FEC CLAUSE 91 is not + * supported on this port. + */ + #define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_ENABLED UINT32_C(0x40) + uint8_t unused_1; + uint8_t unused_2; + char phy_vendor_name[16]; + /* + * Up to 16 bytes of null padded ASCII string representing PHY vendor. + * If the string is set to null, then the vendor name is not available. + */ + char phy_vendor_partnumber[16]; + /* + * Up to 16 bytes of null padded ASCII string that identifies vendor + * specific part number of the PHY. If the string is set to null, then + * the vendor specific part number is not available. + */ + uint32_t unused_3; + uint8_t unused_4; + uint8_t unused_5; + uint8_t unused_6; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_mac_cfg */ +/* Description: This command configures the MAC block for the port. */ +/* Input (40 bytes) */ + +struct hwrm_port_mac_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * When this bit is '1', this command will configure the MAC to match + * the current link state of the PHY. If the link is not established on + * the PHY, then this bit has no effect. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_MATCH_LINK UINT32_C(0x1) + /* + * When this bit is '1', the CoS assignment logic is enabled. When this + * logic is enabled, then inner VLAN PRI to CoS mapping is enabled. If + * this bit is '0', then the default CoS is used. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_COS_ASSIGNMENT_ENABLE UINT32_C(0x2) + /* + * When this bit is '1', tunnel or outer VLAN PRI field to CoS mapping + * is enabled. If this bit is '0', then outer VLAN PRI bits are not used + * in determining CoS. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_TUNNEL_PRI2COS_ENABLE UINT32_C(0x4) + /* + * When this bit is '1', the IP DSCP to CoS mapping is enabled. If this + * bit is '0', then IP DSCP bits are not used in determining CoS. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_IP_DSCP2COS_ENABLE UINT32_C(0x8) + /* + * When this bit is '1', the HWRM is requested to enable timestamp + * capture capability on the receive side of this port. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_RX_TS_CAPTURE_ENABLE UINT32_C(0x10) + /* + * When this bit is '1', the HWRM is requested to disable timestamp + * capture capability on the receive side of this port. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_RX_TS_CAPTURE_DISABLE UINT32_C(0x20) + /* + * When this bit is '1', the HWRM is requested to enable timestamp + * capture capability on the transmit side of this port. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_TX_TS_CAPTURE_ENABLE UINT32_C(0x40) + /* + * When this bit is '1', the HWRM is requested to disable timestamp + * capture capability on the transmit side of this port. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_TX_TS_CAPTURE_DISABLE UINT32_C(0x80) + /* + * When this bit is '1', the Out-Of-Box WoL is requested to be enabled + * on this port. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_OOB_WOL_ENABLE UINT32_C(0x100) + /* + * When this bit is '1', the the Out-Of-Box WoL is requested to be + * disabled on this port. + */ + #define HWRM_PORT_MAC_CFG_INPUT_FLAGS_OOB_WOL_DISABLE UINT32_C(0x200) + uint32_t enables; + /* This bit must be '1' for the ipg field to be configured. */ + #define HWRM_PORT_MAC_CFG_INPUT_ENABLES_IPG UINT32_C(0x1) + /* This bit must be '1' for the lpbk field to be configured. */ + #define HWRM_PORT_MAC_CFG_INPUT_ENABLES_LPBK UINT32_C(0x2) + /* + * This bit must be '1' for the ivlan_pri2cos_map_pri field to be + * configured. + */ + #define HWRM_PORT_MAC_CFG_INPUT_ENABLES_IVLAN_PRI2COS_MAP_PRI UINT32_C(0x4) + /* This bit must be '1' for the lcos_map_pri field to be configured. */ + #define HWRM_PORT_MAC_CFG_INPUT_ENABLES_LCOS_MAP_PRI UINT32_C(0x8) + /* + * This bit must be '1' for the tunnel_pri2cos_map_pri field to be + * configured. + */ + #define HWRM_PORT_MAC_CFG_INPUT_ENABLES_TUNNEL_PRI2COS_MAP_PRI UINT32_C(0x10) + /* This bit must be '1' for the dscp2cos_map_pri field to be configured. */ + #define HWRM_PORT_MAC_CFG_INPUT_ENABLES_DSCP2COS_MAP_PRI UINT32_C(0x20) + /* + * This bit must be '1' for the rx_ts_capture_ptp_msg_type field to be + * configured. + */ + #define HWRM_PORT_MAC_CFG_INPUT_ENABLES_RX_TS_CAPTURE_PTP_MSG_TYPE UINT32_C(0x40) + /* + * This bit must be '1' for the tx_ts_capture_ptp_msg_type field to be + * configured. + */ + #define HWRM_PORT_MAC_CFG_INPUT_ENABLES_TX_TS_CAPTURE_PTP_MSG_TYPE UINT32_C(0x80) + uint16_t port_id; + /* Port ID of port that is to be configured. */ + uint8_t ipg; + /* + * This value is used to configure the minimum IPG that will be sent + * between packets by this port. + */ + uint8_t lpbk; + /* This value controls the loopback setting for the MAC. */ + /* No loopback is selected. Normal operation. */ + #define HWRM_PORT_MAC_CFG_INPUT_LPBK_NONE UINT32_C(0x0) + /* + * The HW will be configured with local loopback such that host + * data is sent back to the host without modification. + */ + #define HWRM_PORT_MAC_CFG_INPUT_LPBK_LOCAL UINT32_C(0x1) + /* + * The HW will be configured with remote loopback such that port + * logic will send packets back out the transmitter that are + * received. + */ + #define HWRM_PORT_MAC_CFG_INPUT_LPBK_REMOTE UINT32_C(0x2) + uint8_t ivlan_pri2cos_map_pri; + /* + * This value controls the priority of mapping. Valid values: 1-4 Higher + * the number, higher the priority + */ + uint8_t lcos_map_pri; + /* + * This value controls the priority of mapping. Valid values: 1-4 Higher + * the number, higher the priority + */ + uint8_t tunnel_pri2cos_map_pri; + /* + * This value controls the priority of mapping. Valid values: 1-4 Higher + * the number, higher the priority + */ + uint8_t dscp2pri_map_pri; + /* + * This value controls the priority of mapping. Valid values: 1-4 Higher + * the number, higher the priority + */ + uint16_t rx_ts_capture_ptp_msg_type; + /* + * This is a 16-bit bit mask that is used to request a specific + * configuration of time stamp capture of PTP messages on the receive + * side of this port. This field shall be ignored if the + * ptp_rx_ts_capture_enable flag is not set in this command. Otherwise, + * if bit 'i' is set, then the HWRM is being requested to configure the + * receive side of the port to capture the time stamp of every received + * PTP message with messageType field value set to i. + */ + uint16_t tx_ts_capture_ptp_msg_type; + /* + * This is a 16-bit bit mask that is used to request a specific + * configuration of time stamp capture of PTP messages on the transmit + * side of this port. This field shall be ignored if the + * ptp_tx_ts_capture_enable flag is not set in this command. Otherwise, + * if bit 'i' is set, then the HWRM is being requested to configure the + * transmit sied of the port to capture the time stamp of every + * transmitted PTP message with messageType field value set to i. + */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_port_mac_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t mru; + /* + * This is the configured maximum length of Ethernet packet payload that + * is allowed to be received on the port. This value does not include + * the number of bytes used by Ethernet header and trailer (CRC). + */ + uint16_t mtu; + /* + * This is the configured maximum length of Ethernet packet payload that + * is allowed to be transmitted on the port. This value does not include + * the number of bytes used by Ethernet header and trailer (CRC). + */ + uint8_t ipg; + /* Current configuration of the IPG value. */ + uint8_t lpbk; + /* Current value of the loopback value. */ + /* No loopback is selected. Normal operation. */ + #define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_NONE UINT32_C(0x0) + /* + * The HW will be configured with local loopback such that host + * data is sent back to the host without modification. + */ + #define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_LOCAL UINT32_C(0x1) + /* + * The HW will be configured with remote loopback such that port + * logic will send packets back out the transmitter that are + * received. + */ + #define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_REMOTE UINT32_C(0x2) + uint8_t unused_0; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_mac_qcfg */ +/* Description: This command queries the MAC block for the port. */ +/* Input (24 bytes) */ + +struct hwrm_port_mac_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t port_id; + /* Port ID of port that is to be configured. */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_port_mac_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t mru; + /* + * This is the configured maximum length of Ethernet packet payload that + * is allowed to be received on the port. This value does not include + * the number of bytes used by the Ethernet header and trailer (CRC). + */ + uint16_t mtu; + /* + * This is the configured maximum length of Ethernet packet payload that + * is allowed to be transmitted on the port. This value does not include + * the number of bytes used by the Ethernet header and trailer (CRC). + */ + uint8_t ipg; + /* The minimum IPG that will be sent between packets by this port. */ + uint8_t lpbk; + /* The loopback setting for the MAC. */ + /* No loopback is selected. Normal operation. */ + #define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_NONE UINT32_C(0x0) + /* + * The HW will be configured with local loopback such that host + * data is sent back to the host without modification. + */ + #define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_LOCAL UINT32_C(0x1) + /* + * The HW will be configured with remote loopback such that port + * logic will send packets back out the transmitter that are + * received. + */ + #define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_REMOTE UINT32_C(0x2) + uint8_t ivlan_pri2cos_map_pri; + /* + * Priority of pri to CoS mapping. Valid values: 1-4 Higher the number, + * higher the priority Value 0 indicates that this mapping is not used. + */ + uint8_t lcos_map_pri; + /* + * Priority of local CoS to PRI mapping. Valid values: 1-4 Higher the + * number, higher the priority Value 0 indicates that this mapping is + * not used. + */ + uint8_t tunnel_pri2cos_map_pri; + /* + * Priority of tunnel PRI to CoS mapping. Valid values: 1-4 Higher the + * number, higher the priority Value 0 indicates that this mapping is + * not used. + */ + uint8_t dscp2pri_map_pri; + /* + * Priority of DSCP to PRI mapping. Valid values: 1-4 Higher the number, + * higher the priority Value 0 indicates that this mapping is not used. + */ + uint16_t rx_ts_capture_ptp_msg_type; + /* + * This is a 16-bit bit mask that represents the current configuration + * of time stamp capture of PTP messages on the receive side of this + * port. If bit 'i' is set, then the receive side of the port is + * configured to capture the time stamp of every received PTP message + * with messageType field value set to i. If all bits are set to 0 (i.e. + * field value set 0), then the receive side of the port is not + * configured to capture timestamp for PTP messages. If all bits are set + * to 1, then the receive side of the port is configured to capture + * timestamp for all PTP messages. + */ + uint16_t tx_ts_capture_ptp_msg_type; + /* + * This is a 16-bit bit mask that represents the current configuration + * of time stamp capture of PTP messages on the transmit side of this + * port. If bit 'i' is set, then the transmit side of the port is + * configured to capture the time stamp of every received PTP message + * with messageType field value set to i. If all bits are set to 0 (i.e. + * field value set 0), then the transmit side of the port is not + * configured to capture timestamp for PTP messages. If all bits are set + * to 1, then the transmit side of the port is configured to capture + * timestamp for all PTP messages. + */ + uint8_t unused_0; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_qstats */ +/* Description: This function returns per port Ethernet statistics. */ +/* Input (40 bytes) */ + +struct hwrm_port_qstats_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t port_id; + /* Port ID of port that is being queried. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2[3]; + uint8_t unused_3; + uint64_t tx_stat_host_addr; + /* This is the host address where Tx port statistics will be stored */ + uint64_t rx_stat_host_addr; + /* This is the host address where Rx port statistics will be stored */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_port_qstats_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t tx_stat_size; + /* The size of TX port statistics block in bytes. */ + uint16_t rx_stat_size; + /* The size of RX port statistics block in bytes. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_lpbk_qstats */ +/* Description: This function returns loopback statistics. */ +/* Input (16 bytes) */ + +struct hwrm_port_lpbk_qstats_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ +} __attribute__((packed)); + +/* Output (96 bytes) */ + +struct hwrm_port_lpbk_qstats_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint64_t lpbk_ucast_frames; + /* Number of transmitted unicast frames */ + uint64_t lpbk_mcast_frames; + /* Number of transmitted multicast frames */ + uint64_t lpbk_bcast_frames; + /* Number of transmitted broadcast frames */ + uint64_t lpbk_ucast_bytes; + /* Number of transmitted bytes for unicast traffic */ + uint64_t lpbk_mcast_bytes; + /* Number of transmitted bytes for multicast traffic */ + uint64_t lpbk_bcast_bytes; + /* Number of transmitted bytes for broadcast traffic */ + uint64_t tx_stat_discard; + /* Total Tx Drops for loopback traffic reported by STATS block */ + uint64_t tx_stat_error; + /* Total Tx Error Drops for loopback traffic reported by STATS block */ + uint64_t rx_stat_discard; + /* Total Rx Drops for loopback traffic reported by STATS block */ + uint64_t rx_stat_error; + /* Total Rx Error Drops for loopback traffic reported by STATS block */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_clr_stats */ +/* + * Description: This function clears per port statistics. The HWRM shall not + * allow a VF driver to clear port statistics. The HWRM shall not allow a PF + * driver to clear port statistics in a partitioning mode. The HWRM may allow a + * PF driver to clear port statistics in the non-partitioning mode. + */ +/* Input (24 bytes) */ + +struct hwrm_port_clr_stats_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t port_id; + /* Port ID of port that is being queried. */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_port_clr_stats_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_lpbk_clr_stats */ +/* + * Description: This function clears loopback statistics. The HWRM shall not + * allow a VF driver to clear loopback statistics. The HWRM shall not allow a PF + * driver to clear loopback statistics in a partitioning mode. The HWRM may + * allow a PF driver to clear loopback statistics in the non-partitioning mode. + */ +/* Input (16 bytes) */ + +struct hwrm_port_lpbk_clr_stats_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_port_lpbk_clr_stats_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_blink_led */ +/* + * Description: This function blinks the port LED for the specified number of + * times. + */ +/* Input (24 bytes) */ + +struct hwrm_port_blink_led_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t num_blinks; + /* Number of blinks. */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_port_blink_led_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_ts_query */ +/* + * Description: This function is used to read timestamp information captured for + * PTP messages on this port. + */ +/* Input (24 bytes) */ + +struct hwrm_port_ts_query_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_TX UINT32_C(0x0) + /* rx path */ + #define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_RX UINT32_C(0x1) + #define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_LAST HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_RX + uint16_t port_id; + /* Port ID of port that is being queried. */ + uint16_t unused_0; +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_port_ts_query_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint64_t ptp_msg_ts; + /* Timestamp value of PTP message captured. */ + uint16_t ptp_msg_seqid; + /* Sequence ID of the PTP message captured. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_port_phy_qcaps */ +/* + * Description: This function is used to query the current capabilities of PHY + * on this link. + */ +/* Input (24 bytes) */ + +struct hwrm_port_phy_qcaps_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t port_id; + /* Port ID of port that is being queried. */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_port_phy_qcaps_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t eee_supported; + /* + * Reserved field. The HWRM shall set this field to 0. An HWRM client + * shall ignore this field. + */ + /* + * If set to 1, then this field indicates that the link is capable of + * supporting EEE. + */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_EEE_SUPPORTED UINT32_C(0x1) + /* + * Reserved field. The HWRM shall set this field to 0. An HWRM client + * shall ignore this field. + */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD1_MASK UINT32_C(0xfe) + #define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD1_SFT 1 + uint8_t unused_0; + uint16_t supported_speeds_force_mode; + /* + * This is a bit mask to indicate what speeds are supported as forced + * speeds on this link. For each speed that can be forced on this link, + * the corresponding mask bit shall be set to '1'. + */ + /* 100Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_100MBHD UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_100MB UINT32_C(0x2) + /* 1Gb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_1GBHD UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_1GB UINT32_C(0x8) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_2GB UINT32_C(0x10) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_2_5GB UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_10GB UINT32_C(0x40) + /* 20Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_20GB UINT32_C(0x80) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_25GB UINT32_C(0x100) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_40GB UINT32_C(0x200) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_50GB UINT32_C(0x400) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_100GB UINT32_C(0x800) + /* 10Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_10MBHD UINT32_C(0x1000) + /* 10Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_10MB UINT32_C(0x2000) + uint16_t supported_speeds_auto_mode; + /* + * This is a bit mask to indicate what speeds are supported for + * autonegotiation on this link. For each speed that can be + * autonegotiated on this link, the corresponding mask bit shall be set + * to '1'. + */ + /* 100Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_100MBHD UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_100MB UINT32_C(0x2) + /* 1Gb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_1GBHD UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_1GB UINT32_C(0x8) + /* 2Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_2GB UINT32_C(0x10) + /* 2.5Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_2_5GB UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_10GB UINT32_C(0x40) + /* 20Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_20GB UINT32_C(0x80) + /* 25Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_25GB UINT32_C(0x100) + /* 40Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_40GB UINT32_C(0x200) + /* 50Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_50GB UINT32_C(0x400) + /* 100Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_100GB UINT32_C(0x800) + /* 10Mb link speed (Half-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_10MBHD UINT32_C(0x1000) + /* 10Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_10MB UINT32_C(0x2000) + uint16_t supported_speeds_eee_mode; + /* + * This is a bit mask to indicate what speeds are supported for EEE on + * this link. For each speed that can be autonegotiated when EEE is + * enabled on this link, the corresponding mask bit shall be set to '1'. + * This field is only valid when the eee_suppotred is set to '1'. + */ + /* Reserved */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD1 UINT32_C(0x1) + /* 100Mb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_100MB UINT32_C(0x2) + /* Reserved */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD2 UINT32_C(0x4) + /* 1Gb link speed (Full-duplex) */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_1GB UINT32_C(0x8) + /* Reserved */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD3 UINT32_C(0x10) + /* Reserved */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD4 UINT32_C(0x20) + /* 10Gb link speed */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_10GB UINT32_C(0x40) + uint32_t tx_lpi_timer_low; + /* + * Reserved field. The HWRM shall set this field to 0. An HWRM client + * shall ignore this field. + */ + /* + * The lowest value of TX LPI timer that can be set on this link when + * EEE is enabled. This value is in microseconds. This field is valid + * only when_eee_supported is set to '1'. + */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_LOW_MASK UINT32_C(0xffffff) + #define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_LOW_SFT 0 + /* + * Reserved field. The HWRM shall set this field to 0. An HWRM client + * shall ignore this field. + */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD2_MASK UINT32_C(0xff000000) + #define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD2_SFT 24 + uint32_t valid_tx_lpi_timer_high; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ + /* + * The highest value of TX LPI timer that can be set on this link when + * EEE is enabled. This value is in microseconds. This field is valid + * only when_eee_supported is set to '1'. + */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_HIGH_MASK UINT32_C(0xffffff) + #define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_HIGH_SFT 0 + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ + #define HWRM_PORT_PHY_QCAPS_OUTPUT_VALID_MASK UINT32_C(0xff000000) + #define HWRM_PORT_PHY_QCAPS_OUTPUT_VALID_SFT 24 +} __attribute__((packed)); + +/* hwrm_queue_qportcfg */ +/* + * Description: This function is called by a driver to query queue configuration + * of a port. # The HWRM shall at least advertise one queue with lossy service + * profile. # The driver shall use this command to query queue ids before + * configuring or using any queues. # If a service profile is not set for a + * queue, then the driver shall not use that queue without configuring a service + * profile for it. # If the driver is not allowed to configure service profiles, + * then the driver shall only use queues for which service profiles are pre- + * configured. + */ +/* Input (24 bytes) */ + +struct hwrm_queue_qportcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_TX UINT32_C(0x0) + /* rx path */ + #define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_RX UINT32_C(0x1) + #define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_LAST HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_RX + uint16_t port_id; + /* + * Port ID of port for which the queue configuration is being queried. + * This field is only required when sent by IPC. + */ + uint16_t unused_0; +} __attribute__((packed)); + +/* Output (32 bytes) */ + +struct hwrm_queue_qportcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t max_configurable_queues; + /* The maximum number of queues that can be configured. */ + uint8_t max_configurable_lossless_queues; + /* The maximum number of lossless queues that can be configured. */ + uint8_t queue_cfg_allowed; + /* + * 0 - Not allowed. Non-zero - Allowed. If this value is non-zero, then + * the HWRM shall allow the host SW driver to configure queues using + * hwrm_queue_cfg. + */ + uint8_t queue_buffers_cfg_allowed; + /* + * 0 - Not allowed. Non-zero - Allowed If this value is non-zero, then + * the HWRM shall allow the host SW driver to configure queue buffers + * using hwrm_queue_buffers_cfg. + */ + uint8_t queue_pfcenable_cfg_allowed; + /* + * 0 - Not allowed. Non-zero - Allowed If this value is non-zero, then + * the HWRM shall allow the host SW driver to configure PFC using + * hwrm_queue_pfcenable_cfg. + */ + uint8_t queue_pri2cos_cfg_allowed; + /* + * 0 - Not allowed. Non-zero - Allowed If this value is non-zero, then + * the HWRM shall allow the host SW driver to configure Priority to CoS + * mapping using hwrm_queue_pri2cos_cfg. + */ + uint8_t queue_cos2bw_cfg_allowed; + /* + * 0 - Not allowed. Non-zero - Allowed If this value is non-zero, then + * the HWRM shall allow the host SW driver to configure CoS Bandwidth + * configuration using hwrm_queue_cos2bw_cfg. + */ + uint8_t queue_id0; + /* ID of CoS Queue 0. FF - Invalid id */ + uint8_t queue_id0_service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t queue_id1; + /* ID of CoS Queue 1. FF - Invalid id */ + uint8_t queue_id1_service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t queue_id2; + /* ID of CoS Queue 2. FF - Invalid id */ + uint8_t queue_id2_service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t queue_id3; + /* ID of CoS Queue 3. FF - Invalid id */ + uint8_t queue_id3_service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t queue_id4; + /* ID of CoS Queue 4. FF - Invalid id */ + uint8_t queue_id4_service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t queue_id5; + /* ID of CoS Queue 5. FF - Invalid id */ + uint8_t queue_id5_service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t queue_id6; + /* ID of CoS Queue 6. FF - Invalid id */ + uint8_t queue_id6_service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t queue_id7; + /* ID of CoS Queue 7. FF - Invalid id */ + uint8_t queue_id7_service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_qcfg */ +/* + * Description: This function is called by a driver to query a queue + * configuration. + */ +/* Input (24 bytes) */ + +struct hwrm_queue_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_TX UINT32_C(0x0) + /* rx path */ + #define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_RX UINT32_C(0x1) + #define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_LAST HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_RX + uint32_t queue_id; + /* Queue ID of the queue. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_queue_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t queue_len; + /* This value is a the estimate packet length used in the TX arbiter. */ + uint8_t service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t unused_0; + uint8_t unused_1; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_cfg */ +/* Description: This function is called by a driver to configure a queue. */ +/* Input (40 bytes) */ + +struct hwrm_queue_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_TX UINT32_C(0x0) + /* rx path */ + #define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_RX UINT32_C(0x1) + #define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_LAST HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_RX + uint32_t enables; + /* This bit must be '1' for the dflt_len field to be configured. */ + #define HWRM_QUEUE_CFG_INPUT_ENABLES_DFLT_LEN UINT32_C(0x1) + /* This bit must be '1' for the service_profile field to be configured. */ + #define HWRM_QUEUE_CFG_INPUT_ENABLES_SERVICE_PROFILE UINT32_C(0x2) + uint32_t queue_id; + /* Queue ID of queue that is to be configured by this function. */ + uint32_t dflt_len; + /* + * This value is a the estimate packet length used in the TX arbiter. + * Set to 0xFF... (All Fs) to not adjust this value. + */ + uint8_t service_profile; + /* This value is applicable to CoS queues only. */ + /* Lossy (best-effort) */ + #define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_LOSSY UINT32_C(0x0) + /* Lossless */ + #define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1) + /* Set to 0xFF... (All Fs) if there is no service profile specified */ + #define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_UNKNOWN UINT32_C(0xff) + uint8_t unused_0[7]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_queue_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_buffers_qcfg */ +/* + * Description: This function is called by a driver to query configuration of + * the buffers assigned to a queue. + */ +/* Input (24 bytes) */ + +struct hwrm_queue_buffers_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_QUEUE_BUFFERS_QCFG_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_QUEUE_BUFFERS_QCFG_INPUT_FLAGS_PATH_TX UINT32_C(0x0) + /* rx path */ + #define HWRM_QUEUE_BUFFERS_QCFG_INPUT_FLAGS_PATH_RX UINT32_C(0x1) + #define HWRM_QUEUE_BUFFERS_QCFG_INPUT_FLAGS_PATH_LAST HWRM_QUEUE_BUFFERS_QCFG_INPUT_FLAGS_PATH_RX + uint32_t queue_id; + /* Queue ID of queue that is to be configured by this function. */ +} __attribute__((packed)); + +/* Output (40 bytes) */ + +struct hwrm_queue_buffers_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t reserved; + /* Number of bytes allocated as reserved space for this queue. */ + uint32_t shared; + /* + * Number of bytes of shared buffer space for this queue. The changing + * of shared buffer size for one CoS may create an adverse effect on + * other CoSs sharing the same buffer. It is recommended that the driver + * does not modify the shared mbuf size without understanding the + * consequence of it. + */ + uint32_t xoff; + /* + * XOFF threshold of the queue. This is a high threshold value used to + * trigger XOFF. + */ + uint32_t xon; + /* + * XON threshold of the queue. This is the low threshold value used to + * trigger XON. + */ + uint32_t full; + /* + * FULL threshold of the queue. At this threshold, buffers allocated for + * this queue are full. Once this condition is asserted, packets on that + * queue are dropped. + */ + uint32_t notfull; + /* + * NOTFULL threshold of the queue. This threshold is used for the de- + * assertion of buffers full condition. + */ + uint32_t max; + /* + * The maximum number of bytes that will be allowed to be consumed by + * the queue. This value is the sum of both the number of bytes reserved + * for this queue and the maximum number of bytes of shared buffers + * allowed to be consumed by this queue. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_buffers_cfg */ +/* + * Description: This function is called by a driver to configure the buffering + * for a queue. + */ +/* Input (56 bytes) */ + +struct hwrm_queue_buffers_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_FLAGS_PATH_TX UINT32_C(0x0) + /* rx path */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_FLAGS_PATH_RX UINT32_C(0x1) + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_FLAGS_PATH_LAST HWRM_QUEUE_BUFFERS_CFG_INPUT_FLAGS_PATH_RX + uint32_t enables; + /* This bit must be '1' for the reserved field to be configured. */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_ENABLES_RESERVED UINT32_C(0x1) + /* This bit must be '1' for the shared field to be configured. */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_ENABLES_SHARED UINT32_C(0x2) + /* This bit must be '1' for the xoff field to be configured. */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_ENABLES_XOFF UINT32_C(0x4) + /* This bit must be '1' for the xon field to be configured. */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_ENABLES_XON UINT32_C(0x8) + /* This bit must be '1' for the full field to be configured. */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_ENABLES_FULL UINT32_C(0x10) + /* This bit must be '1' for the notfull field to be configured. */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_ENABLES_NOTFULL UINT32_C(0x20) + /* This bit must be '1' for the max field to be configured. */ + #define HWRM_QUEUE_BUFFERS_CFG_INPUT_ENABLES_MAX UINT32_C(0x40) + uint32_t queue_id; + /* Queue ID of queue that is to be configured by this function. */ + uint32_t reserved; + /* Number of bytes to be allocated as reserved space for this queue. */ + uint32_t shared; + /* + * Number of bytes of shared buffer space for this queue. The changing + * of shared buffer size for one CoS may create an adverse effect on + * other CoSs sharing the same buffer. It is recommended that the driver + * does not modify the shared mbuf size without understanding the + * consequence of it. + */ + uint32_t xoff; + /* + * XOFF threshold of the queue. This is a high threshold value used to + * trigger XOFF. + */ + uint32_t xon; + /* + * XON threshold of the queue. This is the low threshold value used to + * trigger XON. + */ + uint32_t full; + /* + * FULL threshold of the queue. At this threshold, buffers allocated for + * this queue are full. Once this condition is asserted, packets on that + * queue are dropped. + */ + uint32_t notfull; + /* + * NOTFULL threshold of the queue. This threshold is used for the de- + * assertion of buffers full condition. + */ + uint32_t max; + /* + * The maximum number of bytes that will be allowed to be consumed by + * the queue. This value is the sum of both the number of bytes reserved + * for this queue and the maximum number of bytes of shared buffers + * allowed to be consumed by this queue. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_queue_buffers_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_pfcenable_qcfg */ +/* + * Description: This function is called by a driver to query PFC configuration + * for different priorities on that port. This mapping can be different on + * different ports. + */ +/* Input (24 bytes) */ + +struct hwrm_queue_pfcenable_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t port_id; + /* + * Port ID of port for which the table is being configured. The HWRM + * needs to check whether this function is allowed to configure pri2cos + * mapping on this port. + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_queue_pfcenable_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t flags; + /* If set to 1, then PFC is enabled on PRI 0. */ + #define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI0_PFC_ENABLED UINT32_C(0x1) + /* If set to 1, then PFC is enabled on PRI 1. */ + #define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI1_PFC_ENABLED UINT32_C(0x2) + /* If set to 1, then PFC is enabled on PRI 2. */ + #define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI2_PFC_ENABLED UINT32_C(0x4) + /* If set to 1, then PFC is enabled on PRI 3. */ + #define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI3_PFC_ENABLED UINT32_C(0x8) + /* If set to 1, then PFC is enabled on PRI 4. */ + #define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI4_PFC_ENABLED UINT32_C(0x10) + /* If set to 1, then PFC is enabled on PRI 5. */ + #define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI5_PFC_ENABLED UINT32_C(0x20) + /* If set to 1, then PFC is enabled on PRI 6. */ + #define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI6_PFC_ENABLED UINT32_C(0x40) + /* If set to 1, then PFC is enabled on PRI 7. */ + #define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI7_PFC_ENABLED UINT32_C(0x80) + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_pfcenable_cfg */ +/* + * Description: This function is called by a driver to configure the PFC enabled + * for different priorities on that port. This mapping can be different on + * different ports. + */ +/* Input (24 bytes) */ + +struct hwrm_queue_pfcenable_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* If set to 1, then PFC is requested to be enabled on PRI 0. */ + #define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI0_PFC_ENABLED UINT32_C(0x1) + /* If set to 1, then PFC is requested to be enabled on PRI 1. */ + #define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI1_PFC_ENABLED UINT32_C(0x2) + /* If set to 1, then PFC is requested to be enabled on PRI 2. */ + #define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI2_PFC_ENABLED UINT32_C(0x4) + /* If set to 1, then PFC is requested to be enabled on PRI 3. */ + #define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI3_PFC_ENABLED UINT32_C(0x8) + /* If set to 1, then PFC is requested to be enabled on PRI 4. */ + #define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI4_PFC_ENABLED UINT32_C(0x10) + /* If set to 1, then PFC is requested to be enabled on PRI 5. */ + #define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI5_PFC_ENABLED UINT32_C(0x20) + /* If set to 1, then PFC is requested to be enabled on PRI 6. */ + #define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI6_PFC_ENABLED UINT32_C(0x40) + /* If set to 1, then PFC is requested to be enabled on PRI 7. */ + #define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI7_PFC_ENABLED UINT32_C(0x80) + uint16_t port_id; + /* + * Port ID of port for which the table is being configured. The HWRM + * needs to check whether this function is allowed to configure pri2cos + * mapping on this port. + */ + uint16_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_queue_pfcenable_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_pri2cos_qcfg */ +/* + * Description: This function is called by a driver to query configuration of + * the priority to CoS queue mapping on the transmit side and receive side. This + * mapping can be different in each direction (TX or RX). This mapping can be + * different on different ports. Each CoS queue represents a Traffic Class (TC) + * on that port. + */ +/* Input (24 bytes) */ + +struct hwrm_queue_pri2cos_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_TX (UINT32_C(0x0) << 0) + /* rx path */ + #define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_RX (UINT32_C(0x1) << 0) + #define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_LAST HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_RX + /* + * When this bit is set to '1', the mapping is requested for inner VLAN + * PRI. + */ + #define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_IVLAN UINT32_C(0x2) + uint8_t port_id; + /* + * Port ID of port for which the table is being configured. The HWRM + * needs to check whether this function is allowed to configure pri2cos + * mapping on this port. + */ + uint8_t unused_0[3]; +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_queue_pri2cos_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t pri0_cos_queue_id; + /* + * CoS Queue assigned to priority 0. This value can only be changed + * before traffic has started. + */ + uint8_t pri1_cos_queue_id; + /* + * CoS Queue assigned to priority 1. This value can only be changed + * before traffic has started. + */ + uint8_t pri2_cos_queue_id; + /* + * CoS Queue assigned to priority 2 This value can only be changed + * before traffic has started. + */ + uint8_t pri3_cos_queue_id; + /* + * CoS Queue assigned to priority 3. This value can only be changed + * before traffic has started. + */ + uint8_t pri4_cos_queue_id; + /* + * CoS Queue assigned to priority 4. This value can only be changed + * before traffic has started. + */ + uint8_t pri5_cos_queue_id; + /* + * CoS Queue assigned to priority 5. This value can only be changed + * before traffic has started. + */ + uint8_t pri6_cos_queue_id; + /* + * CoS Queue assigned to priority 6. This value can only be changed + * before traffic has started. + */ + uint8_t pri7_cos_queue_id; + /* + * CoS Queue assigned to priority 7. This value can only be changed + * before traffic has started. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_pri2cos_cfg */ +/* + * Description: This function is called by a driver to configure the priority to + * CoS queue mapping on the transmit side and receive side. This mapping can be + * different in each direction (TX or RX). This mapping can be different on + * different ports. Each CoS queue represents a Traffic Class (TC) on that port. + * This command configures the VLAN PRI-to-TC mapping for a specific port in + * specific direction. + */ +/* Input (40 bytes) */ + +struct hwrm_queue_pri2cos_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_TX (UINT32_C(0x0) << 0) + /* rx path */ + #define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_RX (UINT32_C(0x1) << 0) + #define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_LAST HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_RX + /* When this bit is '1', the mapping is for inner VLAN PRI. */ + #define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_IVLAN UINT32_C(0x2) + uint32_t enables; + uint8_t port_id; + /* + * Port ID of port for which the table is being configured. The HWRM + * needs to check whether this function is allowed to configure pri2cos + * mapping on this port. + */ + uint8_t pri0_cos_queue_id; + /* + * CoS Queue assigned to priority 0. This value can only be changed + * before traffic has started. + */ + uint8_t pri1_cos_queue_id; + /* + * CoS Queue assigned to priority 1. This value can only be changed + * before traffic has started. + */ + uint8_t pri2_cos_queue_id; + /* + * CoS Queue assigned to priority 2 This value can only be changed + * before traffic has started. + */ + uint8_t pri3_cos_queue_id; + /* + * CoS Queue assigned to priority 3. This value can only be changed + * before traffic has started. + */ + uint8_t pri4_cos_queue_id; + /* + * CoS Queue assigned to priority 4. This value can only be changed + * before traffic has started. + */ + uint8_t pri5_cos_queue_id; + /* + * CoS Queue assigned to priority 5. This value can only be changed + * before traffic has started. + */ + uint8_t pri6_cos_queue_id; + /* + * CoS Queue assigned to priority 6. This value can only be changed + * before traffic has started. + */ + uint8_t pri7_cos_queue_id; + /* + * CoS Queue assigned to priority 7. This value can only be changed + * before traffic has started. + */ + uint8_t unused_0[7]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_queue_pri2cos_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_cos2bw_qcfg */ +/* + * Description: This function is called by a driver to query the BW to CoS queue + * mapping on the transmit side of a specific port. This mapping can be + * different on different ports. Each CoS queue represents a Traffic Class (TC) + * on that port. Each traffic class can be assigned a valid combination of the + * following: - Minimum bandwidth - Maximum bandwidth - Transmission selection + * algorithm (TSA) - Priority Level (only applies to strict priority COS) - + * Bandwidth weight # A CoS can be SP or non-SP: A SP CoS always gets the strict + * priority. Is an COS min BW is set to 0x0 then it is considered to be non-SP; + * this is a valid configuration. Note: SP provides lower latency in addition to + * reserved bandwidth # For both SP CoS and non-SP CoS, min BW can be specified + * to reserve specific amount of the port BW. # The min BW specified for a CoS + * shall not exceed max port bandwidth. # The total of min BWs specified for all + * CoS shall not exceed max port bandwidth. # For any non-SP CoS, the minimum + * bandwidth guarantees are subject to round-robin scheduling. This allows BW + * reservation with anti-starvation; one CoS will not block another CoS using + * RR. Note: The bandwidth guarantees for any non-SP CoS are met after servicing + * all SP CoS. # An SP CoS can potentially starve other lower priority SP CoS + * and non-SP CoS queues. This can occur to the extent the SP min exceeds the + * available port BW. # For any CoS, max BW can be specified to limit the BW + * consumed by the CoS. # The max BW specified for a CoS shall not exceed the + * max port bandwidth. # The WFQ provides a mechanism for sharing available + * bandwidth beyond the reserved minimums configured for each CoS. The WFQ + * scheduler is used to provide the percentages of remaining bandwidth after: * + * first servicing the reserved bandwidth for all SP CoS, * followed by the + * reserved bandwidth for all non-SP CoS * All CoS may participate in the WFQ # + * If a CoS does not have a configured max BW it may use all available bandwidth + * up to the max port bandwidth Minimum Bandwidth (min BW): # This is the + * guaranteed bandwidth for the COS. # A value of 0x0 is valid and it means that + * this COS is not guaranteed any bandwidth. A value of 0xFF.. (all Fs) means + * min BW is not specified. When the min BW is not specified, the HWRM can set + * it to any value it considers appropriate. Note: For a non-SP COS, the HWRM + * should set min BW to 0 when the min BW is not specified. For an SP COS, the + * HWRM should set min BW to some small value when the min BW is not specified. + * Maximum Bandwidth: # This is the bandwidth limit of the COS. # Values 0x0 and + * 0xFF.. (all Fs) are considered unspecified and the HWRM will set the maximum + * bandwidth to maximum port bandwidth. Priority Level: # It applies only to SP. + * # This parameter is ignored for non-SP. # 0-7 are valid values (higher value + * means higher priority) # A priority level can be assigned to at most one SP. + * # Invalid priority levels assignment for SPs shall result in failure. + * Additional notes: # The HWRM may have to use min and (max - min) to set + * appropriate counters of hardware rate limiters. # The bandwidth percentage as + * specified in the DCB TC BW assignment should be used by the driver to specify + * maximum bandwidth and bandwidth weight for a COS. For example, the driver + * should set max BW to 20 Gbps and weight to 50 for two COSs when these two + * COSs are assigned 50% share of 40 Gbps max port bandwidth. + */ +/* Input (24 bytes) */ + +struct hwrm_queue_cos2bw_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t port_id; + /* + * Port ID of port for which the table is being configured. The HWRM + * needs to check whether this function is allowed to configure TC BW + * assignment on this port. + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (112 bytes) */ + +struct hwrm_queue_cos2bw_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t queue_id0; + /* ID of CoS Queue 0. */ + uint8_t unused_0; + uint16_t unused_1; + uint32_t queue_id0_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id0_max_bw; + /* + * Maximum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id0_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id0_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id0_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id1; + /* ID of CoS Queue 1. */ + uint32_t queue_id1_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id1_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id1_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id1_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id1_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id2; + /* ID of CoS Queue 2. */ + uint32_t queue_id2_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id2_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id2_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id2_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id2_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id3; + /* ID of CoS Queue 3. */ + uint32_t queue_id3_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id3_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id3_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id3_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id3_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id4; + /* ID of CoS Queue 4. */ + uint32_t queue_id4_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id4_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id4_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id4_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id4_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id5; + /* ID of CoS Queue 5. */ + uint32_t queue_id5_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id5_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id5_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id5_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id5_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id6; + /* ID of CoS Queue 6. */ + uint32_t queue_id6_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id6_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id6_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id6_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id6_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id7; + /* ID of CoS Queue 7. */ + uint32_t queue_id7_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id7_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id7_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id7_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id7_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t unused_5; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_queue_cos2bw_cfg */ +/* + * Description: This function is called by a driver to configure the BW to CoS + * queue mapping on the transmit side of a specific port. This mapping can be + * different on different ports. Each CoS queue represents a Traffic Class (TC) + * on that port. Each traffic class can be assigned a valid combination of the + * following: - Minimum bandwidth - Maximum bandwidth - Transmission selection + * algorithm (TSA) - Priority Level (only applies to strict priority COS) - + * Bandwidth weight # A CoS can be SP or non-SP: A SP CoS always gets the strict + * priority. Is an COS min BW is set to 0x0 then it is considered to be non-SP; + * this is a valid configuration. Note: SP provides lower latency in addition to + * reserved bandwidth # For both SP CoS and non-SP CoS, min BW can be specified + * to reserve specific amount of the port BW. # The min BW specified for a CoS + * shall not exceed max port bandwidth. # The total of min BWs specified for all + * CoS shall not exceed max port bandwidth. # For any non-SP CoS, the minimum + * bandwidth guarantees are subject to round-robin scheduling. This allows BW + * reservation with anti-starvation; one CoS will not block another CoS using + * RR. Note: The bandwidth guarantees for any non-SP CoS are met after servicing + * all SP CoS. # An SP CoS can potentially starve other lower priority SP CoS + * and non-SP CoS queues. This can occur to the extent the SP min exceeds the + * available port BW. # For any CoS, max BW can be specified to limit the BW + * consumed by the CoS. # The max BW specified for a CoS shall not exceed the + * max port bandwidth. # The WFQ provides a mechanism for sharing available + * bandwidth beyond the reserved minimums configured for each CoS. The WFQ + * scheduler is used to provide the percentages of remaining bandwidth after: - + * first servicing the reserved bandwidth for all SP CoS, - followed by the + * reserved bandwidth for all non-SP CoS - All CoS may participate in the WFQ # + * If a CoS does not have a configured max BW it may use all available bandwidth + * up to the max port bandwidth Minimum Bandwidth (min BW): # This is the + * guaranteed bandwidth for the COS. # A value of 0x0 is valid and it means that + * this COS is not guaranteed any bandwidth. A value of 0xFF.. (all Fs) means + * min BW is not specified. When the min BW is not specified, the HWRM can set + * it to any value it considers appropriate. Note: For a non-SP COS, the HWRM + * should set min BW to 0 when the min BW is not specified. For an SP COS, the + * HWRM should set min BW to some small value when the min BW is not specified. + * Maximum Bandwidth: # This is the bandwidth limit of the COS. # Values 0x0 and + * 0xFF.. (all Fs) are considered unspecified and the HWRM will set the maximum + * bandwidth to maximum port bandwidth. Priority Level: # It applies only to SP. + * # This parameter is ignored for non-SP. # 0-7 are valid values (higher value + * means higher priority) # A priority level can be assigned to at most one SP. + * # Invalid priority levels assignment for SPs shall result in failure. + * Additional notes: # The HWRM may have to use min and (max - min) to set + * appropriate counters of hardware rate limiters. # The bandwidth percentage as + * specified in the DCB TC BW assignment should be used by the driver to specify + * maximum bandwidth and bandwidth weight for a COS. For example, the driver + * should set max BW to 20 Gbps and weight to 50 for two COSs when these two + * COSs are assigned 50% share of 40 Gbps max port bandwidth. + */ +/* Input (128 bytes) */ + +struct hwrm_queue_cos2bw_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + uint32_t enables; + /* + * This bit must be '1' for the cos_queue_id0_valid field to be + * configured. + */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID0_VALID UINT32_C(0x1) + /* + * This bit must be '1' for the cos_queue_id1_valid field to be + * configured. + */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID1_VALID UINT32_C(0x2) + /* + * This bit must be '1' for the cos_queue_id2_valid field to be + * configured. + */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID2_VALID UINT32_C(0x4) + /* + * This bit must be '1' for the cos_queue_id3_valid field to be + * configured. + */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID3_VALID UINT32_C(0x8) + /* + * This bit must be '1' for the cos_queue_id4_valid field to be + * configured. + */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID4_VALID UINT32_C(0x10) + /* + * This bit must be '1' for the cos_queue_id5_valid field to be + * configured. + */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID5_VALID UINT32_C(0x20) + /* + * This bit must be '1' for the cos_queue_id6_valid field to be + * configured. + */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID6_VALID UINT32_C(0x40) + /* + * This bit must be '1' for the cos_queue_id7_valid field to be + * configured. + */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID7_VALID UINT32_C(0x80) + uint16_t port_id; + /* + * Port ID of port for which the table is being configured. The HWRM + * needs to check whether this function is allowed to configure TC BW + * assignment on this port. + */ + uint8_t queue_id0; + /* ID of CoS Queue 0. */ + uint8_t unused_0; + uint32_t queue_id0_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id0_max_bw; + /* + * Maximum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id0_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id0_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id0_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id1; + /* ID of CoS Queue 1. */ + uint32_t queue_id1_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id1_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id1_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id1_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id1_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id2; + /* ID of CoS Queue 2. */ + uint32_t queue_id2_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id2_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id2_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id2_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id2_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id3; + /* ID of CoS Queue 3. */ + uint32_t queue_id3_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id3_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id3_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id3_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id3_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id4; + /* ID of CoS Queue 4. */ + uint32_t queue_id4_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id4_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id4_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id4_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id4_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id5; + /* ID of CoS Queue 5. */ + uint32_t queue_id5_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id5_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id5_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id5_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id5_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id6; + /* ID of CoS Queue 6. */ + uint32_t queue_id6_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id6_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id6_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id6_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id6_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t queue_id7; + /* ID of CoS Queue 7. */ + uint32_t queue_id7_min_bw; + /* + * Minimum BW allocated to CoS Queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint32_t queue_id7_max_bw; + /* + * Maximum BW allocated to CoS queue in Mbps. The HWRM will translate + * this value into byte counter and time interval used for this COS + * inside the device. + */ + uint8_t queue_id7_tsa_assign; + /* Transmission Selection Algorithm (TSA) for CoS Queue. */ + /* Strict Priority */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_SP UINT32_C(0x0) + /* Enhanced Transmission Selection */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_ETS UINT32_C(0x1) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2) + /* reserved */ + #define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_LAST UINT32_C(0xff) + uint8_t queue_id7_pri_lvl; + /* + * Priority level for strict priority. Valid only when the tsa_assign is + * 0 - Strict Priority (SP) 0..7 - Valid values. 8..255 - Reserved. + */ + uint8_t queue_id7_bw_weight; + /* + * Weight used to allocate remaining BW for this COS after servicing + * guaranteed bandwidths for all COS. + */ + uint8_t unused_1[5]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_queue_cos2bw_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_alloc */ +/* + * Description: This VNIC is a resource in the RX side of the chip that is used + * to represent a virtual host "interface". # At the time of VNIC allocation or + * configuration, the function can specify whether it wants the requested VNIC + * to be the default VNIC for the function or not. # If a function requests + * allocation of a VNIC for the first time and a VNIC is successfully allocated + * by the HWRM, then the HWRM shall make the allocated VNIC as the default VNIC + * for that function. # The default VNIC shall be used for the default action + * for a partition or function. # For each VNIC allocated on a function, a + * mapping on the RX side to map the allocated VNIC to source virtual interface + * shall be performed by the HWRM. This should be hidden to the function driver + * requesting the VNIC allocation. This enables broadcast/multicast replication + * with source knockout. # If multicast replication with source knockout is + * enabled, then the internal VNIC to SVIF mapping data structures shall be + * programmed at the time of VNIC allocation. + */ +/* Input (24 bytes) */ + +struct hwrm_vnic_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * When this bit is '1', this VNIC is requested to be the default VNIC + * for this function. + */ + #define HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT UINT32_C(0x1) + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_vnic_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t vnic_id; + /* Logical vnic ID */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_free */ +/* + * Description: Free a VNIC resource. Idle any resources associated with the + * VNIC as well as the VNIC. Reset and release all resources associated with the + * VNIC. + */ +/* Input (24 bytes) */ + +struct hwrm_vnic_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t vnic_id; + /* Logical vnic ID */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_vnic_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_cfg */ +/* Description: Configure the RX VNIC structure. */ +/* Input (40 bytes) */ + +struct hwrm_vnic_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * When this bit is '1', the VNIC is requested to be the default VNIC + * for the function. + */ + #define HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT UINT32_C(0x1) + /* + * When this bit is '1', the VNIC is being configured to strip VLAN in + * the RX path. If set to '0', then VLAN stripping is disabled on this + * VNIC. + */ + #define HWRM_VNIC_CFG_INPUT_FLAGS_VLAN_STRIP_MODE UINT32_C(0x2) + /* + * When this bit is '1', the VNIC is being configured to buffer receive + * packets in the hardware until the host posts new receive buffers. If + * set to '0', then bd_stall is being configured to be disabled on this + * VNIC. + */ + #define HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE UINT32_C(0x4) + /* + * When this bit is '1', the VNIC is being configured to receive both + * RoCE and non-RoCE traffic. If set to '0', then this VNIC is not + * configured to be operating in dual VNIC mode. + */ + #define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_DUAL_VNIC_MODE UINT32_C(0x8) + /* + * When this flag is set to '1', the VNIC is requested to be configured + * to receive only RoCE traffic. If this flag is set to '0', then this + * flag shall be ignored by the HWRM. If roce_dual_vnic_mode flag is set + * to '1', then the HWRM client shall not set this flag to '1'. + */ + #define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_ONLY_VNIC_MODE UINT32_C(0x10) + /* + * When a VNIC uses one destination ring group for certain application + * (e.g. Receive Flow Steering) where exact match is used to direct + * packets to a VNIC with one destination ring group only, there is no + * need to configure RSS indirection table for that VNIC as only one + * destination ring group is used. This flag is used to enable a mode + * where RSS is enabled in the VNIC using a RSS context for computing + * RSS hash but the RSS indirection table is not configured using + * hwrm_vnic_rss_cfg. If this mode is enabled, then the driver should + * not program RSS indirection table for the RSS context that is used + * for computing RSS hash only. + */ + #define HWRM_VNIC_CFG_INPUT_FLAGS_RSS_DFLT_CR_MODE UINT32_C(0x20) + uint32_t enables; + /* This bit must be '1' for the dflt_ring_grp field to be configured. */ + #define HWRM_VNIC_CFG_INPUT_ENABLES_DFLT_RING_GRP UINT32_C(0x1) + /* This bit must be '1' for the rss_rule field to be configured. */ + #define HWRM_VNIC_CFG_INPUT_ENABLES_RSS_RULE UINT32_C(0x2) + /* This bit must be '1' for the cos_rule field to be configured. */ + #define HWRM_VNIC_CFG_INPUT_ENABLES_COS_RULE UINT32_C(0x4) + /* This bit must be '1' for the lb_rule field to be configured. */ + #define HWRM_VNIC_CFG_INPUT_ENABLES_LB_RULE UINT32_C(0x8) + /* This bit must be '1' for the mru field to be configured. */ + #define HWRM_VNIC_CFG_INPUT_ENABLES_MRU UINT32_C(0x10) + uint16_t vnic_id; + /* Logical vnic ID */ + uint16_t dflt_ring_grp; + /* + * Default Completion ring for the VNIC. This ring will be chosen if + * packet does not match any RSS rules and if there is no COS rule. + */ + uint16_t rss_rule; + /* + * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if there is no + * RSS rule. + */ + uint16_t cos_rule; + /* + * RSS ID for COS rule/table structure. 0xFF... (All Fs) if there is no + * COS rule. + */ + uint16_t lb_rule; + /* + * RSS ID for load balancing rule/table structure. 0xFF... (All Fs) if + * there is no LB rule. + */ + uint16_t mru; + /* + * The maximum receive unit of the vnic. Each vnic is associated with a + * function. The vnic mru value overwrites the mru setting of the + * associated function. The HWRM shall make sure that vnic mru does not + * exceed the mru of the port the function is associated with. + */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_vnic_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_qcfg */ +/* + * Description: Query the RX VNIC structure. This function can be used by a PF + * driver to query its own VNIC resource or VNIC resource of its child VF. This + * function can also be used by a VF driver to query its own VNIC resource. + */ +/* Input (32 bytes) */ + +struct hwrm_vnic_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the vf_id_valid field to be configured. */ + #define HWRM_VNIC_QCFG_INPUT_ENABLES_VF_ID_VALID UINT32_C(0x1) + uint32_t vnic_id; + /* Logical vnic ID */ + uint16_t vf_id; + /* ID of Virtual Function whose VNIC resource is being queried. */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (32 bytes) */ + +struct hwrm_vnic_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t dflt_ring_grp; + /* Default Completion ring for the VNIC. */ + uint16_t rss_rule; + /* + * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if there is no + * RSS rule. + */ + uint16_t cos_rule; + /* + * RSS ID for COS rule/table structure. 0xFF... (All Fs) if there is no + * COS rule. + */ + uint16_t lb_rule; + /* + * RSS ID for load balancing rule/table structure. 0xFF... (All Fs) if + * there is no LB rule. + */ + uint16_t mru; + /* The maximum receive unit of the vnic. */ + uint8_t unused_0; + uint8_t unused_1; + uint32_t flags; + /* When this bit is '1', the VNIC is the default VNIC for the function. */ + #define HWRM_VNIC_QCFG_OUTPUT_FLAGS_DEFAULT UINT32_C(0x1) + /* + * When this bit is '1', the VNIC is configured to strip VLAN in the RX + * path. If set to '0', then VLAN stripping is disabled on this VNIC. + */ + #define HWRM_VNIC_QCFG_OUTPUT_FLAGS_VLAN_STRIP_MODE UINT32_C(0x2) + /* + * When this bit is '1', the VNIC is configured to buffer receive + * packets in the hardware until the host posts new receive buffers. If + * set to '0', then bd_stall is disabled on this VNIC. + */ + #define HWRM_VNIC_QCFG_OUTPUT_FLAGS_BD_STALL_MODE UINT32_C(0x4) + /* + * When this bit is '1', the VNIC is configured to receive both RoCE and + * non-RoCE traffic. If set to '0', then this VNIC is not configured to + * operate in dual VNIC mode. + */ + #define HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_DUAL_VNIC_MODE UINT32_C(0x8) + /* + * When this flag is set to '1', the VNIC is configured to receive only + * RoCE traffic. When this flag is set to '0', the VNIC is not + * configured to receive only RoCE traffic. If roce_dual_vnic_mode flag + * and this flag both are set to '1', then it is an invalid + * configuration of the VNIC. The HWRM should not allow that type of + * mis-configuration by HWRM clients. + */ + #define HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_ONLY_VNIC_MODE UINT32_C(0x10) + /* + * When a VNIC uses one destination ring group for certain application + * (e.g. Receive Flow Steering) where exact match is used to direct + * packets to a VNIC with one destination ring group only, there is no + * need to configure RSS indirection table for that VNIC as only one + * destination ring group is used. When this bit is set to '1', then the + * VNIC is enabled in a mode where RSS is enabled in the VNIC using a + * RSS context for computing RSS hash but the RSS indirection table is + * not configured. + */ + #define HWRM_VNIC_QCFG_OUTPUT_FLAGS_RSS_DFLT_CR_MODE UINT32_C(0x20) + uint32_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t unused_5; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_qcaps */ +/* + * Description: This function is used to query the capabilities of VNIC + * resources. + */ +/* Input (24 bytes) */ + +struct hwrm_vnic_qcaps_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_vnic_qcaps_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t mru; + /* The maximum receive unit that is settable on a vnic. */ + uint8_t unused_0; + uint8_t unused_1; + uint32_t flags; + /* Unused. */ + /* + * When this bit is '1', the capability of stripping VLAN in the RX path + * is supported on VNIC(s). If set to '0', then VLAN stripping + * capability is not supported on VNIC(s). + */ + #define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VLAN_STRIP_CAP UINT32_C(0x2) + /* + * When this bit is '1', the capability to buffer receive packets in the + * hardware until the host posts new receive buffers is supported on + * VNIC(s). If set to '0', then bd_stall capability is not supported on + * VNIC(s). + */ + #define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_BD_STALL_CAP UINT32_C(0x4) + /* + * When this bit is '1', the capability to receive both RoCE and non- + * RoCE traffic on VNIC(s) is supported. If set to '0', then the + * capability to receive both RoCE and non-RoCE traffic on VNIC(s) is + * not supported. + */ + #define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_ROCE_DUAL_VNIC_CAP UINT32_C(0x8) + /* + * When this bit is set to '1', the capability to configure a VNIC to + * receive only RoCE traffic is supported. When this flag is set to '0', + * the VNIC capability to configure to receive only RoCE traffic is not + * supported. + */ + #define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_ROCE_ONLY_VNIC_CAP UINT32_C(0x10) + /* + * When this bit is set to '1', then the capability to enable a VNIC in + * a mode where RSS context without configuring RSS indirection table is + * supported (for RSS hash computation). When this bit is set to '0', + * then a VNIC can not be configured with a mode to enable RSS context + * without configuring RSS indirection table. + */ + #define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_DFLT_CR_CAP UINT32_C(0x20) + uint32_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t unused_5; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_tpa_cfg */ +/* Description: This function is used to enable/configure TPA on the VNIC. */ +/* Input (40 bytes) */ + +struct hwrm_vnic_tpa_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * When this bit is '1', the VNIC shall be configured to perform + * transparent packet aggregation (TPA) of non-tunneled TCP packets. + */ + #define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA UINT32_C(0x1) + /* + * When this bit is '1', the VNIC shall be configured to perform + * transparent packet aggregation (TPA) of tunneled TCP packets. + */ + #define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_ENCAP_TPA UINT32_C(0x2) + /* + * When this bit is '1', the VNIC shall be configured to perform + * transparent packet aggregation (TPA) according to Windows Receive + * Segment Coalescing (RSC) rules. + */ + #define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_RSC_WND_UPDATE UINT32_C(0x4) + /* + * When this bit is '1', the VNIC shall be configured to perform + * transparent packet aggregation (TPA) according to Linux Generic + * Receive Offload (GRO) rules. + */ + #define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO UINT32_C(0x8) + /* + * When this bit is '1', the VNIC shall be configured to perform + * transparent packet aggregation (TPA) for TCP packets with IP ECN set + * to non-zero. + */ + #define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN UINT32_C(0x10) + /* + * When this bit is '1', the VNIC shall be configured to perform + * transparent packet aggregation (TPA) for GRE tunneled TCP packets + * only if all packets have the same GRE sequence. + */ + #define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ UINT32_C(0x20) + /* + * When this bit is '1' and the GRO mode is enabled, the VNIC shall be + * configured to perform transparent packet aggregation (TPA) for + * TCP/IPv4 packets with consecutively increasing IPIDs. In other words, + * the last packet that is being aggregated to an already existing + * aggregation context shall have IPID 1 more than the IPID of the last + * packet that was aggregated in that aggregation context. + */ + #define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO_IPID_CHECK UINT32_C(0x40) + /* + * When this bit is '1' and the GRO mode is enabled, the VNIC shall be + * configured to perform transparent packet aggregation (TPA) for TCP + * packets with the same TTL (IPv4) or Hop limit (IPv6) value. + */ + #define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO_TTL_CHECK UINT32_C(0x80) + uint32_t enables; + /* This bit must be '1' for the max_agg_segs field to be configured. */ + #define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS UINT32_C(0x1) + /* This bit must be '1' for the max_aggs field to be configured. */ + #define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS UINT32_C(0x2) + /* This bit must be '1' for the max_agg_timer field to be configured. */ + #define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_TIMER UINT32_C(0x4) + /* This bit must be '1' for the min_agg_len field to be configured. */ + #define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN UINT32_C(0x8) + uint16_t vnic_id; + /* Logical vnic ID */ + uint16_t max_agg_segs; + /* + * This is the maximum number of TCP segments that can be aggregated + * (unit is Log2). Max value is 31. + */ + /* 1 segment */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_1 UINT32_C(0x0) + /* 2 segments */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_2 UINT32_C(0x1) + /* 4 segments */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_4 UINT32_C(0x2) + /* 8 segments */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_8 UINT32_C(0x3) + /* Any segment size larger than this is not valid */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_MAX UINT32_C(0x1f) + uint16_t max_aggs; + /* + * This is the maximum number of aggregations this VNIC is allowed (unit + * is Log2). Max value is 7 + */ + /* 1 aggregation */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_1 UINT32_C(0x0) + /* 2 aggregations */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_2 UINT32_C(0x1) + /* 4 aggregations */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_4 UINT32_C(0x2) + /* 8 aggregations */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_8 UINT32_C(0x3) + /* 16 aggregations */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_16 UINT32_C(0x4) + /* Any aggregation size larger than this is not valid */ + #define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX UINT32_C(0x7) + uint8_t unused_0; + uint8_t unused_1; + uint32_t max_agg_timer; + /* + * This is the maximum amount of time allowed for an aggregation context + * to complete after it was initiated. + */ + uint32_t min_agg_len; + /* + * This is the minimum amount of payload length required to start an + * aggregation context. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_vnic_tpa_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_tpa_qcfg */ +/* + * Description: This function can be used to query TPA configuration on the + * VNIC. + */ +/* Input (24 bytes) */ + +struct hwrm_vnic_tpa_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t vnic_id; + /* Logical vnic ID */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (32 bytes) */ + +struct hwrm_vnic_tpa_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t flags; + /* + * When this bit is '1', the VNIC is configured to perform transparent + * packet aggregation (TPA) of non-tunneled TCP packets. + */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_TPA UINT32_C(0x1) + /* + * When this bit is '1', the VNIC is configured to perform transparent + * packet aggregation (TPA) of tunneled TCP packets. + */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_ENCAP_TPA UINT32_C(0x2) + /* + * When this bit is '1', the VNIC is configured to perform transparent + * packet aggregation (TPA) according to Windows Receive Segment + * Coalescing (RSC) rules. + */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_RSC_WND_UPDATE UINT32_C(0x4) + /* + * When this bit is '1', the VNIC is configured to perform transparent + * packet aggregation (TPA) according to Linux Generic Receive Offload + * (GRO) rules. + */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_GRO UINT32_C(0x8) + /* + * When this bit is '1', the VNIC is configured to perform transparent + * packet aggregation (TPA) for TCP packets with IP ECN set to non-zero. + */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_AGG_WITH_ECN UINT32_C(0x10) + /* + * When this bit is '1', the VNIC is configured to perform transparent + * packet aggregation (TPA) for GRE tunneled TCP packets only if all + * packets have the same GRE sequence. + */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ UINT32_C(0x20) + /* + * When this bit is '1' and the GRO mode is enabled, the VNIC is + * configured to perform transparent packet aggregation (TPA) for + * TCP/IPv4 packets with consecutively increasing IPIDs. In other words, + * the last packet that is being aggregated to an already existing + * aggregation context shall have IPID 1 more than the IPID of the last + * packet that was aggregated in that aggregation context. + */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_GRO_IPID_CHECK UINT32_C(0x40) + /* + * When this bit is '1' and the GRO mode is enabled, the VNIC is + * configured to perform transparent packet aggregation (TPA) for TCP + * packets with the same TTL (IPv4) or Hop limit (IPv6) value. + */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_GRO_TTL_CHECK UINT32_C(0x80) + uint16_t max_agg_segs; + /* + * This is the maximum number of TCP segments that can be aggregated + * (unit is Log2). Max value is 31. + */ + /* 1 segment */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_1 UINT32_C(0x0) + /* 2 segments */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_2 UINT32_C(0x1) + /* 4 segments */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_4 UINT32_C(0x2) + /* 8 segments */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_8 UINT32_C(0x3) + /* Any segment size larger than this is not valid */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_MAX UINT32_C(0x1f) + uint16_t max_aggs; + /* + * This is the maximum number of aggregations this VNIC is allowed (unit + * is Log2). Max value is 7 + */ + /* 1 aggregation */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_1 UINT32_C(0x0) + /* 2 aggregations */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_2 UINT32_C(0x1) + /* 4 aggregations */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_4 UINT32_C(0x2) + /* 8 aggregations */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_8 UINT32_C(0x3) + /* 16 aggregations */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_16 UINT32_C(0x4) + /* Any aggregation size larger than this is not valid */ + #define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_MAX UINT32_C(0x7) + uint32_t max_agg_timer; + /* + * This is the maximum amount of time allowed for an aggregation context + * to complete after it was initiated. + */ + uint32_t min_agg_len; + /* + * This is the minimum amount of payload length required to start an + * aggregation context. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_rss_cfg */ +/* Description: This function is used to enable RSS configuration. */ +/* Input (48 bytes) */ + +struct hwrm_vnic_rss_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t hash_type; + /* + * When this bit is '1', the RSS hash shall be computed over source and + * destination IPv4 addresses of IPv4 packets. + */ + #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4 UINT32_C(0x1) + /* + * When this bit is '1', the RSS hash shall be computed over + * source/destination IPv4 addresses and source/destination ports of + * TCP/IPv4 packets. + */ + #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4 UINT32_C(0x2) + /* + * When this bit is '1', the RSS hash shall be computed over + * source/destination IPv4 addresses and source/destination ports of + * UDP/IPv4 packets. + */ + #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV4 UINT32_C(0x4) + /* + * When this bit is '1', the RSS hash shall be computed over source and + * destination IPv4 addresses of IPv6 packets. + */ + #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6 UINT32_C(0x8) + /* + * When this bit is '1', the RSS hash shall be computed over + * source/destination IPv6 addresses and source/destination ports of + * TCP/IPv6 packets. + */ + #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6 UINT32_C(0x10) + /* + * When this bit is '1', the RSS hash shall be computed over + * source/destination IPv6 addresses and source/destination ports of + * UDP/IPv6 packets. + */ + #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6 UINT32_C(0x20) + uint32_t unused_0; + uint64_t ring_grp_tbl_addr; + /* This is the address for rss ring group table */ + uint64_t hash_key_tbl_addr; + /* This is the address for rss hash key table */ + uint16_t rss_ctx_idx; + /* Index to the rss indirection table. */ + uint16_t unused_1[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_vnic_rss_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_rss_qcfg */ +/* Description: This function is used to query RSS context configuration. */ +/* Input (24 bytes) */ + +struct hwrm_vnic_rss_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t rss_ctx_idx; + /* Index to the rss indirection table. */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (64 bytes) */ + +struct hwrm_vnic_rss_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t hash_type; + /* + * When this bit is '1', the RSS hash shall be computed over source and + * destination IPv4 addresses of IPv4 packets. + */ + #define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_IPV4 UINT32_C(0x1) + /* + * When this bit is '1', the RSS hash shall be computed over + * source/destination IPv4 addresses and source/destination ports of + * TCP/IPv4 packets. + */ + #define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_TCP_IPV4 UINT32_C(0x2) + /* + * When this bit is '1', the RSS hash shall be computed over + * source/destination IPv4 addresses and source/destination ports of + * UDP/IPv4 packets. + */ + #define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_UDP_IPV4 UINT32_C(0x4) + /* + * When this bit is '1', the RSS hash shall be computed over source and + * destination IPv4 addresses of IPv6 packets. + */ + #define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_IPV6 UINT32_C(0x8) + /* + * When this bit is '1', the RSS hash shall be computed over + * source/destination IPv6 addresses and source/destination ports of + * TCP/IPv6 packets. + */ + #define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_TCP_IPV6 UINT32_C(0x10) + /* + * When this bit is '1', the RSS hash shall be computed over + * source/destination IPv6 addresses and source/destination ports of + * UDP/IPv6 packets. + */ + #define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_UDP_IPV6 UINT32_C(0x20) + uint32_t unused_0; + uint32_t hash_key[10]; + /* This is the value of rss hash key */ + uint32_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_plcmodes_cfg */ +/* + * Description: This function can be used to set placement mode configuration of + * the VNIC. + */ +/* Input (40 bytes) */ + +struct hwrm_vnic_plcmodes_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * When this bit is '1', the VNIC shall be configured to use regular + * placement algorithm. By default, the regular placement algorithm + * shall be enabled on the VNIC. + */ + #define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_REGULAR_PLACEMENT UINT32_C(0x1) + /* + * When this bit is '1', the VNIC shall be configured use the jumbo + * placement algorithm. + */ + #define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_JUMBO_PLACEMENT UINT32_C(0x2) + /* + * When this bit is '1', the VNIC shall be configured to enable Header- + * Data split for IPv4 packets according to the following rules: # If + * the packet is identified as TCP/IPv4, then the packet is split at the + * beginning of the TCP payload. # If the packet is identified as + * UDP/IPv4, then the packet is split at the beginning of UDP payload. # + * If the packet is identified as non-TCP and non-UDP IPv4 packet, then + * the packet is split at the beginning of the upper layer protocol + * header carried in the IPv4 packet. + */ + #define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_IPV4 UINT32_C(0x4) + /* + * When this bit is '1', the VNIC shall be configured to enable Header- + * Data split for IPv6 packets according to the following rules: # If + * the packet is identified as TCP/IPv6, then the packet is split at the + * beginning of the TCP payload. # If the packet is identified as + * UDP/IPv6, then the packet is split at the beginning of UDP payload. # + * If the packet is identified as non-TCP and non-UDP IPv6 packet, then + * the packet is split at the beginning of the upper layer protocol + * header carried in the IPv6 packet. + */ + #define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_IPV6 UINT32_C(0x8) + /* + * When this bit is '1', the VNIC shall be configured to enable Header- + * Data split for FCoE packets at the beginning of FC payload. + */ + #define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_FCOE UINT32_C(0x10) + /* + * When this bit is '1', the VNIC shall be configured to enable Header- + * Data split for RoCE packets at the beginning of RoCE payload (after + * BTH/GRH headers). + */ + #define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_ROCE UINT32_C(0x20) + uint32_t enables; + /* + * This bit must be '1' for the jumbo_thresh_valid field to be + * configured. + */ + #define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_JUMBO_THRESH_VALID UINT32_C(0x1) + /* This bit must be '1' for the hds_offset_valid field to be configured. */ + #define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_HDS_OFFSET_VALID UINT32_C(0x2) + /* + * This bit must be '1' for the hds_threshold_valid field to be + * configured. + */ + #define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_HDS_THRESHOLD_VALID UINT32_C(0x4) + uint32_t vnic_id; + /* Logical vnic ID */ + uint16_t jumbo_thresh; + /* + * When jumbo placement algorithm is enabled, this value is used to + * determine the threshold for jumbo placement. Packets with length + * larger than this value will be placed according to the jumbo + * placement algorithm. + */ + uint16_t hds_offset; + /* + * This value is used to determine the offset into packet buffer where + * the split data (payload) will be placed according to one of of HDS + * placement algorithm. The lengths of packet buffers provided for split + * data shall be larger than this value. + */ + uint16_t hds_threshold; + /* + * When one of the HDS placement algorithm is enabled, this value is + * used to determine the threshold for HDS placement. Packets with + * length larger than this value will be placed according to the HDS + * placement algorithm. This value shall be in multiple of 4 bytes. + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_vnic_plcmodes_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_plcmodes_qcfg */ +/* + * Description: This function can be used to query placement mode configuration + * of the VNIC. + */ +/* Input (24 bytes) */ + +struct hwrm_vnic_plcmodes_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t vnic_id; + /* Logical vnic ID */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_vnic_plcmodes_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t flags; + /* + * When this bit is '1', the VNIC is configured to use regular placement + * algorithm. + */ + #define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_REGULAR_PLACEMENT UINT32_C(0x1) + /* + * When this bit is '1', the VNIC is configured to use the jumbo + * placement algorithm. + */ + #define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_JUMBO_PLACEMENT UINT32_C(0x2) + /* + * When this bit is '1', the VNIC is configured to enable Header-Data + * split for IPv4 packets. + */ + #define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_IPV4 UINT32_C(0x4) + /* + * When this bit is '1', the VNIC is configured to enable Header-Data + * split for IPv6 packets. + */ + #define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_IPV6 UINT32_C(0x8) + /* + * When this bit is '1', the VNIC is configured to enable Header-Data + * split for FCoE packets. + */ + #define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_FCOE UINT32_C(0x10) + /* + * When this bit is '1', the VNIC is configured to enable Header-Data + * split for RoCE packets. + */ + #define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_ROCE UINT32_C(0x20) + /* + * When this bit is '1', the VNIC is configured to be the default VNIC + * of the requesting function. + */ + #define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_DFLT_VNIC UINT32_C(0x40) + uint16_t jumbo_thresh; + /* + * When jumbo placement algorithm is enabled, this value is used to + * determine the threshold for jumbo placement. Packets with length + * larger than this value will be placed according to the jumbo + * placement algorithm. + */ + uint16_t hds_offset; + /* + * This value is used to determine the offset into packet buffer where + * the split data (payload) will be placed according to one of of HDS + * placement algorithm. The lengths of packet buffers provided for split + * data shall be larger than this value. + */ + uint16_t hds_threshold; + /* + * When one of the HDS placement algorithm is enabled, this value is + * used to determine the threshold for HDS placement. Packets with + * length larger than this value will be placed according to the HDS + * placement algorithm. This value shall be in multiple of 4 bytes. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_rss_cos_lb_ctx_alloc */ +/* Description: This function is used to allocate COS/Load Balance context. */ +/* Input (16 bytes) */ + +struct hwrm_vnic_rss_cos_lb_ctx_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_vnic_rss_cos_lb_ctx_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t rss_cos_lb_ctx_id; + /* rss_cos_lb_ctx_id is 16 b */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_vnic_rss_cos_lb_ctx_free */ +/* Description: This function can be used to free COS/Load Balance context. */ +/* Input (24 bytes) */ + +struct hwrm_vnic_rss_cos_lb_ctx_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t rss_cos_lb_ctx_id; + /* rss_cos_lb_ctx_id is 16 b */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_vnic_rss_cos_lb_ctx_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_ring_alloc */ +/* + * Description: This command allocates and does basic preparation for a ring. + */ +/* Input (80 bytes) */ + +struct hwrm_ring_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the Reserved1 field to be configured. */ + #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED1 UINT32_C(0x1) + /* This bit must be '1' for the Reserved2 field to be configured. */ + #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED2 UINT32_C(0x2) + /* This bit must be '1' for the Reserved3 field to be configured. */ + #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED3 UINT32_C(0x4) + /* + * This bit must be '1' for the stat_ctx_id_valid field to be + * configured. + */ + #define HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID UINT32_C(0x8) + /* This bit must be '1' for the Reserved4 field to be configured. */ + #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED4 UINT32_C(0x10) + /* This bit must be '1' for the max_bw_valid field to be configured. */ + #define HWRM_RING_ALLOC_INPUT_ENABLES_MAX_BW_VALID UINT32_C(0x20) + uint8_t ring_type; + /* Ring Type. */ + /* Completion Ring (CR) */ + #define HWRM_RING_ALLOC_INPUT_RING_TYPE_CMPL UINT32_C(0x0) + /* TX Ring (TR) */ + #define HWRM_RING_ALLOC_INPUT_RING_TYPE_TX UINT32_C(0x1) + /* RX Ring (RR) */ + #define HWRM_RING_ALLOC_INPUT_RING_TYPE_RX UINT32_C(0x2) + uint8_t unused_0; + uint16_t unused_1; + uint64_t page_tbl_addr; + /* This value is a pointer to the page table for the Ring. */ + uint32_t fbo; + /* First Byte Offset of the first entry in the first page. */ + uint8_t page_size; + /* + * Actual page size in 2^page_size. The supported range is increments in + * powers of 2 from 16 bytes to 1GB. - 4 = 16 B Page size is 16 B. - 12 + * = 4 KB Page size is 4 KB. - 13 = 8 KB Page size is 8 KB. - 16 = 64 KB + * Page size is 64 KB. - 21 = 2 MB Page size is 2 MB. - 22 = 4 MB Page + * size is 4 MB. - 30 = 1 GB Page size is 1 GB. + */ + uint8_t page_tbl_depth; + /* + * This value indicates the depth of page table. For this version of the + * specification, value other than 0 or 1 shall be considered as an + * invalid value. When the page_tbl_depth = 0, then it is treated as a + * special case with the following. 1. FBO and page size fields are not + * valid. 2. page_tbl_addr is the physical address of the first element + * of the ring. + */ + uint8_t unused_2; + uint8_t unused_3; + uint32_t length; + /* + * Number of 16B units in the ring. Minimum size for a ring is 16 16B + * entries. + */ + uint16_t logical_id; + /* + * Logical ring number for the ring to be allocated. This value + * determines the position in the doorbell area where the update to the + * ring will be made. For completion rings, this value is also the MSI-X + * vector number for the function the completion ring is associated + * with. + */ + uint16_t cmpl_ring_id; + /* + * This field is used only when ring_type is a TX ring. This value + * indicates what completion ring the TX ring is associated with. + */ + uint16_t queue_id; + /* + * This field is used only when ring_type is a TX ring. This value + * indicates what CoS queue the TX ring is associated with. + */ + uint8_t unused_4; + uint8_t unused_5; + uint32_t reserved1; + /* This field is reserved for the future use. It shall be set to 0. */ + uint16_t reserved2; + /* This field is reserved for the future use. It shall be set to 0. */ + uint8_t unused_6; + uint8_t unused_7; + uint32_t reserved3; + /* This field is reserved for the future use. It shall be set to 0. */ + uint32_t stat_ctx_id; + /* + * This field is used only when ring_type is a TX ring. This input + * indicates what statistics context this ring should be associated + * with. + */ + uint32_t reserved4; + /* This field is reserved for the future use. It shall be set to 0. */ + uint32_t max_bw; + /* + * This field is used only when ring_type is a TX ring. Maximum BW + * allocated to this TX ring in Mbps. The HWRM will translate this value + * into byte counter and time interval used for this ring inside the + * device. + */ + uint8_t int_mode; + /* + * This field is used only when ring_type is a Completion ring. This + * value indicates what interrupt mode should be used on this completion + * ring. Note: In the legacy interrupt mode, no more than 16 completion + * rings are allowed. + */ + /* Legacy INTA */ + #define HWRM_RING_ALLOC_INPUT_INT_MODE_LEGACY UINT32_C(0x0) + /* Reserved */ + #define HWRM_RING_ALLOC_INPUT_INT_MODE_RSVD UINT32_C(0x1) + /* MSI-X */ + #define HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX UINT32_C(0x2) + /* No Interrupt - Polled mode */ + #define HWRM_RING_ALLOC_INPUT_INT_MODE_POLL UINT32_C(0x3) + uint8_t unused_8[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_ring_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t ring_id; + /* Physical number of ring allocated. */ + uint16_t logical_ring_id; + /* Logical number of ring allocated. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_ring_free */ +/* + * Description: This command is used to free a ring and associated resources. + */ +/* Input (24 bytes) */ + +struct hwrm_ring_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint8_t ring_type; + /* Ring Type. */ + /* Completion Ring (CR) */ + #define HWRM_RING_FREE_INPUT_RING_TYPE_CMPL UINT32_C(0x0) + /* TX Ring (TR) */ + #define HWRM_RING_FREE_INPUT_RING_TYPE_TX UINT32_C(0x1) + /* RX Ring (RR) */ + #define HWRM_RING_FREE_INPUT_RING_TYPE_RX UINT32_C(0x2) + uint8_t unused_0; + uint16_t ring_id; + /* Physical number of ring allocated. */ + uint32_t unused_1; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_ring_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_ring_cmpl_ring_qaggint_params */ +/* + * Description: This command is used to query aggregation and interrupt related + * parameters specified on a given completion ring. + */ +/* Input (24 bytes) */ + +struct hwrm_ring_cmpl_ring_qaggint_params_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t ring_id; + /* Physical number of completion ring. */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (32 bytes) */ + +struct hwrm_ring_cmpl_ring_qaggint_params_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t flags; + /* + * When this bit is set to '1', interrupt max timer is reset whenever a + * completion is received. + */ + #define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_OUTPUT_FLAGS_TIMER_RESET UINT32_C(0x1) + /* + * When this bit is set to '1', ring idle mode aggregation will be + * enabled. + */ + #define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_OUTPUT_FLAGS_RING_IDLE UINT32_C(0x2) + uint16_t num_cmpl_dma_aggr; + /* Number of completions to aggregate before DMA during the normal mode. */ + uint16_t num_cmpl_dma_aggr_during_int; + /* + * Number of completions to aggregate before DMA during the interrupt + * mode. + */ + uint16_t cmpl_aggr_dma_tmr; + /* + * Timer in unit of 80-nsec used to aggregate completions before DMA + * during the normal mode (not in interrupt mode). + */ + uint16_t cmpl_aggr_dma_tmr_during_int; + /* + * Timer in unit of 80-nsec used to aggregate completions before DMA + * during the interrupt mode. + */ + uint16_t int_lat_tmr_min; + /* Minimum time (in unit of 80-nsec) between two interrupts. */ + uint16_t int_lat_tmr_max; + /* + * Maximum wait time (in unit of 80-nsec) spent aggregating completions + * before signaling the interrupt after the interrupt is enabled. + */ + uint16_t num_cmpl_aggr_int; + /* + * Minimum number of completions aggregated before signaling an + * interrupt. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_ring_cmpl_ring_cfg_aggint_params */ +/* + * Description: This command is used to configure aggregation and interrupt + * related parameters specified on a given completion ring. + */ +/* Input (40 bytes) */ + +struct hwrm_ring_cmpl_ring_cfg_aggint_params_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t ring_id; + /* Physical number of completion ring. */ + uint16_t flags; + /* + * When this bit is set to '1', interrupt latency max timer is reset + * whenever a completion is received. + */ + #define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_FLAGS_TIMER_RESET UINT32_C(0x1) + /* + * When this bit is set to '1', ring idle mode aggregation will be + * enabled. + */ + #define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_FLAGS_RING_IDLE UINT32_C(0x2) + uint16_t num_cmpl_dma_aggr; + /* Number of completions to aggregate before DMA during the normal mode. */ + uint16_t num_cmpl_dma_aggr_during_int; + /* + * Number of completions to aggregate before DMA during the interrupt + * mode. + */ + uint16_t cmpl_aggr_dma_tmr; + /* + * Timer in unit of 80-nsec used to aggregate completions before DMA + * during the normal mode (not in interrupt mode). + */ + uint16_t cmpl_aggr_dma_tmr_during_int; + /* + * Timer in unit of 80-nsec used to aggregate completions before DMA + * during the interrupt mode. + */ + uint16_t int_lat_tmr_min; + /* Minimum time (in unit of 80-nsec) between two interrupts. */ + uint16_t int_lat_tmr_max; + /* + * Maximum wait time (in unit of 80-nsec) spent aggregating cmpls before + * signaling the interrupt after the interrupt is enabled. + */ + uint16_t num_cmpl_aggr_int; + /* + * Minimum number of completions aggregated before signaling an + * interrupt. + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_ring_cmpl_ring_cfg_aggint_params_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_ring_reset */ +/* + * Description: This command is used to reset a given ring. When an RX ring is + * being reset, the HWRM shall perform TPA flush on all VNICs associated with + * the RX ring that is being reset. + */ +/* Input (24 bytes) */ + +struct hwrm_ring_reset_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint8_t ring_type; + /* Ring Type. */ + /* Completion Ring (CR) */ + #define HWRM_RING_RESET_INPUT_RING_TYPE_CMPL UINT32_C(0x0) + /* TX Ring (TR) */ + #define HWRM_RING_RESET_INPUT_RING_TYPE_TX UINT32_C(0x1) + /* RX Ring (RR) */ + #define HWRM_RING_RESET_INPUT_RING_TYPE_RX UINT32_C(0x2) + uint8_t unused_0; + uint16_t ring_id; + /* Physical number of the ring. */ + uint32_t unused_1; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_ring_reset_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_ring_grp_alloc */ +/* + * Description: This API allocates and does basic preparation for a ring group. + */ +/* Input (24 bytes) */ + +struct hwrm_ring_grp_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t cr; + /* This value identifies the CR associated with the ring group. */ + uint16_t rr; + /* This value identifies the main RR associated with the ring group. */ + uint16_t ar; + /* + * This value identifies the aggregation RR associated with the ring + * group. If this value is 0xFF... (All Fs), then no Aggregation ring + * will be set. + */ + uint16_t sc; + /* + * This value identifies the statistics context associated with the ring + * group. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_ring_grp_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t ring_group_id; + /* + * This is the ring group ID value. Use this value to program the + * default ring group for the VNIC or as table entries in an RSS/COS + * context. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_ring_grp_free */ +/* + * Description: This API frees a ring group and associated resources. # If a + * ring in the ring group is reset or free, then the associated rings in the + * ring group shall also be reset/free using hwrm_ring_free. # A function driver + * shall always use hwrm_ring_grp_free after freeing all rings in a group. # As + * a part of executing this command, the HWRM shall reset all associated ring + * group resources. + */ +/* Input (24 bytes) */ + +struct hwrm_ring_grp_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t ring_group_id; + /* This is the ring group ID value. */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_ring_grp_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_l2_filter_alloc */ +/* + * Description: An L2 filter is a filter resource that is used to identify a + * vnic or ring for a packet based on layer 2 fields. Layer 2 fields for + * encapsulated packets include both outer L2 header and/or inner l2 header of + * encapsulated packet. The L2 filter resource covers the following OS specific + * L2 filters. Linux/FreeBSD (per function): # Broadcast enable/disable # List + * of individual multicast filters # All multicast enable/disable filter # + * Unicast filters # Promiscuous mode VMware: # Broadcast enable/disable (per + * physical function) # All multicast enable/disable (per function) # Unicast + * filters per ring or vnic # Promiscuous mode per PF Windows: # Broadcast + * enable/disable (per physical function) # List of individual multicast filters + * (Driver needs to advertise the maximum number of filters supported) # All + * multicast enable/disable per physical function # Unicast filters per vnic # + * Promiscuous mode per PF Implementation notes on the use of VNIC in this + * command: # By default, these filters belong to default vnic for the function. + * # Once these filters are set up, only destination VNIC can be modified. # If + * the destination VNIC is not specified in this command, then the HWRM shall + * only create an l2 context id. HWRM Implementation notes for multicast + * filters: # The hwrm_filter_alloc command can be used to set up multicast + * filters (perfect match or partial match). Each individual function driver can + * set up multicast filters independently. # The HWRM needs to keep track of + * multicast filters set up by function drivers and maintain multicast group + * replication records to enable a subset of functions to receive traffic for a + * specific multicast address. # When a specific multicast filter cannot be set, + * the HWRM shall return an error. In this error case, the driver should fall + * back to using one general filter (rather than specific) for all multicast + * traffic. # When the SR-IOV is enabled, the HWRM needs to additionally track + * source knockout per multicast group record. Examples of setting unicast + * filters: For a unicast MAC based filter, one can use a combination of the + * fields and masks provided in this command to set up the filter. Below are + * some examples: # MAC + no VLAN filter: This filter is used to identify + * traffic that does not contain any VLAN tags and matches destination (or + * source) MAC address. This filter can be set up by setting only l2_addr field + * to be a valid field. All other fields are not valid. The following value is + * set for l2_addr. l2_addr = MAC # MAC + Any VLAN filter: This filter is used + * to identify traffic that carries single VLAN tag and matches (destination or + * source) MAC address. This filter can be set up by setting only l2_addr and + * l2_ovlan_mask fields to be valid fields. All other fields are not valid. The + * following values are set for those two valid fields. l2_addr = MAC, + * l2_ovlan_mask = 0xFFFF # MAC + no VLAN or VLAN ID=0: This filter is used to + * identify untagged traffic that does not contain any VLAN tags or a VLAN tag + * with VLAN ID = 0 and matches destination (or source) MAC address. This filter + * can be set up by setting only l2_addr and l2_ovlan fields to be valid fields. + * All other fields are not valid. The following value are set for l2_addr and + * l2_ovlan. l2_addr = MAC, l2_ovlan = 0x0 # MAC + no VLAN or any VLAN: This + * filter is used to identify traffic that contains zero or 1 VLAN tag and + * matches destination (or source) MAC address. This filter can be set up by + * setting only l2_addr, l2_ovlan, and l2_mask fields to be valid fields. All + * other fields are not valid. The following value are set for l2_addr, + * l2_ovlan, and l2_mask fields. l2_addr = MAC, l2_ovlan = 0x0, l2_ovlan_mask = + * 0xFFFF # MAC + VLAN ID filter: This filter can be set up by setting only + * l2_addr, l2_ovlan, and l2_ovlan_mask fields to be valid fields. All other + * fields are not valid. The following values are set for those three valid + * fields. l2_addr = MAC, l2_ovlan = VLAN ID, l2_ovlan_mask = 0xF000 + */ +/* Input (96 bytes) */ + +struct hwrm_cfa_l2_filter_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_TX (UINT32_C(0x0) << 0) + /* rx path */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX (UINT32_C(0x1) << 0) + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_LAST HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX + /* + * Setting of this flag indicates the applicability to the loopback + * path. + */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK UINT32_C(0x2) + /* + * Setting of this flag indicates drop action. If this flag is not set, + * then it should be considered accept action. + */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_DROP UINT32_C(0x4) + /* + * If this flag is set, all t_l2_* fields are invalid and they should + * not be specified. If this flag is set, then l2_* fields refer to + * fields of outermost L2 header. + */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST UINT32_C(0x8) + uint32_t enables; + /* This bit must be '1' for the l2_addr field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR UINT32_C(0x1) + /* This bit must be '1' for the l2_addr_mask field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK UINT32_C(0x2) + /* This bit must be '1' for the l2_ovlan field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN UINT32_C(0x4) + /* This bit must be '1' for the l2_ovlan_mask field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK UINT32_C(0x8) + /* This bit must be '1' for the l2_ivlan field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN UINT32_C(0x10) + /* This bit must be '1' for the l2_ivlan_mask field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK UINT32_C(0x20) + /* This bit must be '1' for the t_l2_addr field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR UINT32_C(0x40) + /* This bit must be '1' for the t_l2_addr_mask field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR_MASK UINT32_C(0x80) + /* This bit must be '1' for the t_l2_ovlan field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN UINT32_C(0x100) + /* This bit must be '1' for the t_l2_ovlan_mask field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN_MASK UINT32_C(0x200) + /* This bit must be '1' for the t_l2_ivlan field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN UINT32_C(0x400) + /* This bit must be '1' for the t_l2_ivlan_mask field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN_MASK UINT32_C(0x800) + /* This bit must be '1' for the src_type field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE UINT32_C(0x1000) + /* This bit must be '1' for the src_id field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID UINT32_C(0x2000) + /* This bit must be '1' for the tunnel_type field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE UINT32_C(0x4000) + /* This bit must be '1' for the dst_id field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID UINT32_C(0x8000) + /* This bit must be '1' for the mirror_vnic_id field to be configured. */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID UINT32_C(0x10000) + uint8_t l2_addr[6]; + /* + * This value sets the match value for the L2 MAC address. Destination + * MAC address for RX path. Source MAC address for TX path. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t l2_addr_mask[6]; + /* + * This value sets the mask value for the L2 address. A value of 0 will + * mask the corresponding bit from compare. + */ + uint16_t l2_ovlan; + /* This value sets VLAN ID value for outer VLAN. */ + uint16_t l2_ovlan_mask; + /* + * This value sets the mask value for the ovlan id. A value of 0 will + * mask the corresponding bit from compare. + */ + uint16_t l2_ivlan; + /* This value sets VLAN ID value for inner VLAN. */ + uint16_t l2_ivlan_mask; + /* + * This value sets the mask value for the ivlan id. A value of 0 will + * mask the corresponding bit from compare. + */ + uint8_t unused_2; + uint8_t unused_3; + uint8_t t_l2_addr[6]; + /* + * This value sets the match value for the tunnel L2 MAC address. + * Destination MAC address for RX path. Source MAC address for TX path. + */ + uint8_t unused_4; + uint8_t unused_5; + uint8_t t_l2_addr_mask[6]; + /* + * This value sets the mask value for the tunnel L2 address. A value of + * 0 will mask the corresponding bit from compare. + */ + uint16_t t_l2_ovlan; + /* This value sets VLAN ID value for tunnel outer VLAN. */ + uint16_t t_l2_ovlan_mask; + /* + * This value sets the mask value for the tunnel ovlan id. A value of 0 + * will mask the corresponding bit from compare. + */ + uint16_t t_l2_ivlan; + /* This value sets VLAN ID value for tunnel inner VLAN. */ + uint16_t t_l2_ivlan_mask; + /* + * This value sets the mask value for the tunnel ivlan id. A value of 0 + * will mask the corresponding bit from compare. + */ + uint8_t src_type; + /* This value identifies the type of source of the packet. */ + /* Network port */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_NPORT UINT32_C(0x0) + /* Physical function */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_PF UINT32_C(0x1) + /* Virtual function */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VF UINT32_C(0x2) + /* Virtual NIC of a function */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VNIC UINT32_C(0x3) + /* Embedded processor for CFA management */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_KONG UINT32_C(0x4) + /* Embedded processor for OOB management */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_APE UINT32_C(0x5) + /* Embedded processor for RoCE */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_BONO UINT32_C(0x6) + /* Embedded processor for network proxy functions */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_TANG UINT32_C(0x7) + uint8_t unused_6; + uint32_t src_id; + /* + * This value is the id of the source. For a network port, it represents + * port_id. For a physical function, it represents fid. For a virtual + * function, it represents vf_id. For a vnic, it represents vnic_id. For + * embedded processors, this id is not valid. Notes: 1. The function ID + * is implied if it src_id is not provided for a src_type that is either + */ + uint8_t tunnel_type; + /* Tunnel Type. */ + /* Non-tunnel */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL UINT32_C(0x0) + /* Virtual eXtensible Local Area Network (VXLAN) */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN UINT32_C(0x1) + /* Network Virtualization Generic Routing Encapsulation (NVGRE) */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE UINT32_C(0x2) + /* Generic Routing Encapsulation (GRE) inside Ethernet payload */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE UINT32_C(0x3) + /* IP in IP */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP UINT32_C(0x4) + /* Generic Network Virtualization Encapsulation (Geneve) */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE UINT32_C(0x5) + /* Multi-Protocol Lable Switching (MPLS) */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS UINT32_C(0x6) + /* Stateless Transport Tunnel (STT) */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT UINT32_C(0x7) + /* Generic Routing Encapsulation (GRE) inside IP datagram payload */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE UINT32_C(0x8) + /* Any tunneled traffic */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL UINT32_C(0xff) + uint8_t unused_7; + uint16_t dst_id; + /* + * If set, this value shall represent the Logical VNIC ID of the + * destination VNIC for the RX path and network port id of the + * destination port for the TX path. + */ + uint16_t mirror_vnic_id; + /* Logical VNIC ID of the VNIC where traffic is mirrored. */ + uint8_t pri_hint; + /* + * This hint is provided to help in placing the filter in the filter + * table. + */ + /* No preference */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER UINT32_C(0x0) + /* Above the given filter */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE_FILTER UINT32_C(0x1) + /* Below the given filter */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_BELOW_FILTER UINT32_C(0x2) + /* As high as possible */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MAX UINT32_C(0x3) + /* As low as possible */ + #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MIN UINT32_C(0x4) + uint8_t unused_8; + uint32_t unused_9; + uint64_t l2_filter_id_hint; + /* + * This is the ID of the filter that goes along with the pri_hint. This + * field is valid only for the following values. 1 - Above the given + * filter 2 - Below the given filter + */ +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_cfa_l2_filter_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint64_t l2_filter_id; + /* + * This value identifies a set of CFA data structures used for an L2 + * context. + */ + uint32_t flow_id; + /* + * This is the ID of the flow associated with this filter. This value + * shall be used to match and associate the flow identifier returned in + * completion records. A value of 0xFFFFFFFF shall indicate no flow id. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_l2_filter_free */ +/* + * Description: Free a L2 filter. The HWRM shall free all associated filter + * resources with the L2 filter. + */ +/* Input (24 bytes) */ + +struct hwrm_cfa_l2_filter_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t l2_filter_id; + /* + * This value identifies a set of CFA data structures used for an L2 + * context. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_l2_filter_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_l2_filter_cfg */ +/* Description: Change the configuration of an existing L2 filter */ +/* Input (40 bytes) */ + +struct hwrm_cfa_l2_filter_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_TX (UINT32_C(0x0) << 0) + /* rx path */ + #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_RX (UINT32_C(0x1) << 0) + #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_LAST HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_RX + /* + * Setting of this flag indicates drop action. If this flag is not set, + * then it should be considered accept action. + */ + #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_DROP UINT32_C(0x2) + uint32_t enables; + /* This bit must be '1' for the dst_id field to be configured. */ + #define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_DST_ID UINT32_C(0x1) + /* + * This bit must be '1' for the new_mirror_vnic_id field to be + * configured. + */ + #define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID UINT32_C(0x2) + uint64_t l2_filter_id; + /* + * This value identifies a set of CFA data structures used for an L2 + * context. + */ + uint32_t dst_id; + /* + * If set, this value shall represent the Logical VNIC ID of the + * destination VNIC for the RX path and network port id of the + * destination port for the TX path. + */ + uint32_t new_mirror_vnic_id; + /* New Logical VNIC ID of the VNIC where traffic is mirrored. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_l2_filter_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_l2_set_rx_mask */ +/* Description: This command will set rx mask of the function. */ +/* Input (56 bytes) */ + +struct hwrm_cfa_l2_set_rx_mask_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t vnic_id; + /* VNIC ID */ + uint32_t mask; + /* Reserved for future use. */ + #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_RESERVED UINT32_C(0x1) + /* + * When this bit is '1', the function is requested to accept multi-cast + * packets specified by the multicast addr table. + */ + #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST UINT32_C(0x2) + /* + * When this bit is '1', the function is requested to accept all multi- + * cast packets. + */ + #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST UINT32_C(0x4) + /* + * When this bit is '1', the function is requested to accept broadcast + * packets. + */ + #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST UINT32_C(0x8) + /* + * When this bit is '1', the function is requested to be put in the + * promiscuous mode. The HWRM should accept any function to set up + * promiscuous mode. The HWRM shall follow the semantics below for the + * promiscuous mode support. # When partitioning is not enabled on a + * port (i.e. single PF on the port), then the PF shall be allowed to be + * in the promiscuous mode. When the PF is in the promiscuous mode, then + * it shall receive all host bound traffic on that port. # When + * partitioning is enabled on a port (i.e. multiple PFs per port) and a + * PF on that port is in the promiscuous mode, then the PF receives all + * traffic within that partition as identified by a unique identifier + * for the PF (e.g. S-Tag). If a unique outer VLAN for the PF is + * specified, then the setting of promiscuous mode on that PF shall + * result in the PF receiving all host bound traffic with matching outer + * VLAN. # A VF shall can be set in the promiscuous mode. In the + * promiscuous mode, the VF does not receive any traffic unless a unique + * outer VLAN for the VF is specified. If a unique outer VLAN for the VF + * is specified, then the setting of promiscuous mode on that VF shall + * result in the VF receiving all host bound traffic with the matching + * outer VLAN. # The HWRM shall allow the setting of promiscuous mode on + * a function independently from the promiscuous mode settings on other + * functions. + */ + #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS UINT32_C(0x10) + /* + * If this flag is set, the corresponding RX filters shall be set up to + * cover multicast/broadcast filters for the outermost Layer 2 + * destination MAC address field. + */ + #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_OUTERMOST UINT32_C(0x20) + /* + * If this flag is set, the corresponding RX filters shall be set up to + * cover multicast/broadcast filters for the VLAN-tagged packets that + * match the TPID and VID fields of VLAN tags in the VLAN tag table + * specified in this command. + */ + #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY UINT32_C(0x40) + /* + * If this flag is set, the corresponding RX filters shall be set up to + * cover multicast/broadcast filters for non-VLAN tagged packets and + * VLAN-tagged packets that match the TPID and VID fields of VLAN tags + * in the VLAN tag table specified in this command. + */ + #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN UINT32_C(0x80) + /* + * If this flag is set, the corresponding RX filters shall be set up to + * cover multicast/broadcast filters for non-VLAN tagged packets and + * VLAN-tagged packets matching any VLAN tag. If this flag is set, then + * the HWRM shall ignore VLAN tags specified in vlan_tag_tbl. If none of + * vlanonly, vlan_nonvlan, and anyvlan_nonvlan flags is set, then the + * HWRM shall ignore VLAN tags specified in vlan_tag_tbl. The HWRM + * client shall set at most one flag out of vlanonly, vlan_nonvlan, and + * anyvlan_nonvlan. + */ + #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN UINT32_C(0x100) + uint64_t mc_tbl_addr; + /* This is the address for mcast address tbl. */ + uint32_t num_mc_entries; + /* + * This value indicates how many entries in mc_tbl are valid. Each entry + * is 6 bytes. + */ + uint32_t unused_0; + uint64_t vlan_tag_tbl_addr; + /* + * This is the address for VLAN tag table. Each VLAN entry in the table + * is 4 bytes of a VLAN tag including TPID, PCP, DEI, and VID fields in + * network byte order. + */ + uint32_t num_vlan_tags; + /* + * This value indicates how many entries in vlan_tag_tbl are valid. Each + * entry is 4 bytes. + */ + uint32_t unused_1; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_l2_set_rx_mask_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_tunnel_filter_alloc */ +/* + * Description: This is a tunnel filter that uses fields from tunnel header in + * addition to l2 context. The tunnel filter applies to receive side only. The + * l2_* fields in this command represent fields of inner L2 header. They are + * optional to be specified. It allows l2_filter_id to be created with outer L2 + * header fields that can be shared with multiple tunnel filters specified as + * combinations of inner L2 header fields, tunnel type, and VNI. + */ +/* Input (88 bytes) */ + +struct hwrm_cfa_tunnel_filter_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Setting of this flag indicates the applicability to the loopback + * path. + */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK UINT32_C(0x1) + uint32_t enables; + /* This bit must be '1' for the l2_filter_id field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID UINT32_C(0x1) + /* This bit must be '1' for the l2_addr field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR UINT32_C(0x2) + /* This bit must be '1' for the l2_ivlan field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN UINT32_C(0x4) + /* This bit must be '1' for the l3_addr field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L3_ADDR UINT32_C(0x8) + /* This bit must be '1' for the l3_addr_type field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L3_ADDR_TYPE UINT32_C(0x10) + /* This bit must be '1' for the t_l3_addr_type field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_T_L3_ADDR_TYPE UINT32_C(0x20) + /* This bit must be '1' for the t_l3_addr field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_T_L3_ADDR UINT32_C(0x40) + /* This bit must be '1' for the tunnel_type field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE UINT32_C(0x80) + /* This bit must be '1' for the vni field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_VNI UINT32_C(0x100) + /* This bit must be '1' for the dst_vnic_id field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_DST_VNIC_ID UINT32_C(0x200) + /* This bit must be '1' for the mirror_vnic_id field to be configured. */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID UINT32_C(0x400) + uint64_t l2_filter_id; + /* + * This value identifies a set of CFA data structures used for an L2 + * context. + */ + uint8_t l2_addr[6]; + /* + * This value sets the match value for the inner L2 MAC address. + * Destination MAC address for RX path. Source MAC address for TX path. + */ + uint16_t l2_ivlan; + /* + * This value sets VLAN ID value for inner VLAN. Only 12-bits of VLAN ID + * are used in setting the filter. + */ + uint32_t l3_addr[4]; + /* + * The value of inner destination IP address to be used in filtering. + * For IPv4, first four bytes represent the IP address. + */ + uint32_t t_l3_addr[4]; + /* + * The value of tunnel destination IP address to be used in filtering. + * For IPv4, first four bytes represent the IP address. + */ + uint8_t l3_addr_type; + /* + * This value indicates the type of inner IP address. 4 - IPv4 6 - IPv6 + * All others are invalid. + */ + uint8_t t_l3_addr_type; + /* + * This value indicates the type of tunnel IP address. 4 - IPv4 6 - IPv6 + * All others are invalid. + */ + uint8_t tunnel_type; + /* Tunnel Type. */ + /* Non-tunnel */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL UINT32_C(0x0) + /* Virtual eXtensible Local Area Network (VXLAN) */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN UINT32_C(0x1) + /* Network Virtualization Generic Routing Encapsulation (NVGRE) */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE UINT32_C(0x2) + /* Generic Routing Encapsulation (GRE) inside Ethernet payload */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE UINT32_C(0x3) + /* IP in IP */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP UINT32_C(0x4) + /* Generic Network Virtualization Encapsulation (Geneve) */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE UINT32_C(0x5) + /* Multi-Protocol Lable Switching (MPLS) */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS UINT32_C(0x6) + /* Stateless Transport Tunnel (STT) */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT UINT32_C(0x7) + /* Generic Routing Encapsulation (GRE) inside IP datagram payload */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE UINT32_C(0x8) + /* Any tunneled traffic */ + #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL UINT32_C(0xff) + uint8_t unused_0; + uint32_t vni; + /* + * Virtual Network Identifier (VNI). Only valid with tunnel_types VXLAN, + * NVGRE, and Geneve. Only lower 24-bits of VNI field are used in + * setting up the filter. + */ + uint32_t dst_vnic_id; + /* Logical VNIC ID of the destination VNIC. */ + uint32_t mirror_vnic_id; + /* Logical VNIC ID of the VNIC where traffic is mirrored. */ +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_cfa_tunnel_filter_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint64_t tunnel_filter_id; + /* This value is an opaque id into CFA data structures. */ + uint32_t flow_id; + /* + * This is the ID of the flow associated with this filter. This value + * shall be used to match and associate the flow identifier returned in + * completion records. A value of 0xFFFFFFFF shall indicate no flow id. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_tunnel_filter_free */ +/* Description: Free a tunnel filter */ +/* Input (24 bytes) */ + +struct hwrm_cfa_tunnel_filter_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t tunnel_filter_id; + /* This value is an opaque id into CFA data structures. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_tunnel_filter_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_encap_record_alloc */ +/* + * Description: This command is used to create an encapsulation record. The + * source MAC address and source IP address specified for the source property + * checks shall be used in the encapsulation where applicable. + */ +/* Input (32 bytes) */ + +struct hwrm_cfa_encap_record_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Setting of this flag indicates the applicability to the loopback + * path. + */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_FLAGS_LOOPBACK UINT32_C(0x1) + uint8_t encap_type; + /* Encapsulation Type. */ + /* Virtual eXtensible Local Area Network (VXLAN) */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN UINT32_C(0x1) + /* Network Virtualization Generic Routing Encapsulation (NVGRE) */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_NVGRE UINT32_C(0x2) + /* Generic Routing Encapsulation (GRE) after inside Ethernet payload */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_L2GRE UINT32_C(0x3) + /* IP in IP */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPIP UINT32_C(0x4) + /* Generic Network Virtualization Encapsulation (Geneve) */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_GENEVE UINT32_C(0x5) + /* Multi-Protocol Lable Switching (MPLS) */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_MPLS UINT32_C(0x6) + /* VLAN */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VLAN UINT32_C(0x7) + /* Generic Routing Encapsulation (GRE) inside IP datagram payload */ + #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPGRE UINT32_C(0x8) + uint8_t unused_0; + uint16_t unused_1; + uint32_t encap_data[16]; + /* This value is encap data used for the given encap type. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_encap_record_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t encap_record_id; + /* This value is an opaque id into CFA data structures. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_encap_record_free */ +/* Description: Free an encap record */ +/* Input (24 bytes) */ + +struct hwrm_cfa_encap_record_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t encap_record_id; + /* This value is an opaque id into CFA data structures. */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_encap_record_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_ntuple_filter_alloc */ +/* + * Description: This is a ntuple filter that uses fields from L4/L3 header and + * optionally fields from L2. The ntuple filters apply to receive traffic only. + * All L2/L3/L4 header fields are specified in network byte order. These filters + * can be used for Receive Flow Steering (RFS). # For ethertype value, only + * 0x0800 (IPv4) and 0x86dd (IPv6) shall be supported for ntuple filters. # If a + * field specified in this command is not enabled as a valid field, then that + * field shall not be used in matching packet header fields against this filter. + */ +/* Input (128 bytes) */ + +struct hwrm_cfa_ntuple_filter_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Setting of this flag indicates the applicability to the loopback + * path. + */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK UINT32_C(0x1) + /* + * Setting of this flag indicates drop action. If this flag is not set, + * then it should be considered accept action. + */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DROP UINT32_C(0x2) + uint32_t enables; + /* This bit must be '1' for the l2_filter_id field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID UINT32_C(0x1) + /* This bit must be '1' for the ethertype field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE UINT32_C(0x2) + /* This bit must be '1' for the tunnel_type field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE UINT32_C(0x4) + /* This bit must be '1' for the src_macaddr field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR UINT32_C(0x8) + /* This bit must be '1' for the ipaddr_type field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE UINT32_C(0x10) + /* This bit must be '1' for the src_ipaddr field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR UINT32_C(0x20) + /* This bit must be '1' for the src_ipaddr_mask field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR_MASK UINT32_C(0x40) + /* This bit must be '1' for the dst_ipaddr field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR UINT32_C(0x80) + /* This bit must be '1' for the dst_ipaddr_mask field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR_MASK UINT32_C(0x100) + /* This bit must be '1' for the ip_protocol field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL UINT32_C(0x200) + /* This bit must be '1' for the src_port field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT UINT32_C(0x400) + /* This bit must be '1' for the src_port_mask field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT_MASK UINT32_C(0x800) + /* This bit must be '1' for the dst_port field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT UINT32_C(0x1000) + /* This bit must be '1' for the dst_port_mask field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT_MASK UINT32_C(0x2000) + /* This bit must be '1' for the pri_hint field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_PRI_HINT UINT32_C(0x4000) + /* This bit must be '1' for the ntuple_filter_id field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_NTUPLE_FILTER_ID UINT32_C(0x8000) + /* This bit must be '1' for the dst_id field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_ID UINT32_C(0x10000) + /* This bit must be '1' for the mirror_vnic_id field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID UINT32_C(0x20000) + /* This bit must be '1' for the dst_macaddr field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR UINT32_C(0x40000) + uint64_t l2_filter_id; + /* + * This value identifies a set of CFA data structures used for an L2 + * context. + */ + uint8_t src_macaddr[6]; + /* This value indicates the source MAC address in the Ethernet header. */ + uint16_t ethertype; /* big endian */ + /* This value indicates the ethertype in the Ethernet header. */ + uint8_t ip_addr_type; + /* + * This value indicates the type of IP address. 4 - IPv4 6 - IPv6 All + * others are invalid. + */ + /* invalid */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN UINT32_C(0x0) + /* IPv4 */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 UINT32_C(0x4) + /* IPv6 */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6 UINT32_C(0x6) + uint8_t ip_protocol; + /* + * The value of protocol filed in IP header. Applies to UDP and TCP + * traffic. 6 - UDP 17 - TCP + */ + /* invalid */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN UINT32_C(0x0) + /* UDP */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP UINT32_C(0x6) + /* TCP */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP UINT32_C(0x11) + uint16_t dst_id; + /* + * If set, this value shall represent the Logical VNIC ID of the + * destination VNIC for the RX path and network port id of the + * destination port for the TX path. + */ + uint16_t mirror_vnic_id; + /* Logical VNIC ID of the VNIC where traffic is mirrored. */ + uint8_t tunnel_type; + /* + * This value indicates the tunnel type for this filter. If this field + * is not specified, then the filter shall apply to both non-tunneled + * and tunneled packets. If this field conflicts with the tunnel_type + * specified in the l2_filter_id, then the HWRM shall return an error + * for this command. + */ + /* Non-tunnel */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL UINT32_C(0x0) + /* Virtual eXtensible Local Area Network (VXLAN) */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN UINT32_C(0x1) + /* Network Virtualization Generic Routing Encapsulation (NVGRE) */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE UINT32_C(0x2) + /* Generic Routing Encapsulation (GRE) inside Ethernet payload */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE UINT32_C(0x3) + /* IP in IP */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP UINT32_C(0x4) + /* Generic Network Virtualization Encapsulation (Geneve) */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE UINT32_C(0x5) + /* Multi-Protocol Lable Switching (MPLS) */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS UINT32_C(0x6) + /* Stateless Transport Tunnel (STT) */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT UINT32_C(0x7) + /* Generic Routing Encapsulation (GRE) inside IP datagram payload */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE UINT32_C(0x8) + /* Any tunneled traffic */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL UINT32_C(0xff) + uint8_t pri_hint; + /* + * This hint is provided to help in placing the filter in the filter + * table. + */ + /* No preference */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER UINT32_C(0x0) + /* Above the given filter */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE UINT32_C(0x1) + /* Below the given filter */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_BELOW UINT32_C(0x2) + /* As high as possible */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_HIGHEST UINT32_C(0x3) + /* As low as possible */ + #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LOWEST UINT32_C(0x4) + uint32_t src_ipaddr[4]; /* big endian */ + /* + * The value of source IP address to be used in filtering. For IPv4, + * first four bytes represent the IP address. + */ + uint32_t src_ipaddr_mask[4]; /* big endian */ + /* + * The value of source IP address mask to be used in filtering. For + * IPv4, first four bytes represent the IP address mask. + */ + uint32_t dst_ipaddr[4]; /* big endian */ + /* + * The value of destination IP address to be used in filtering. For + * IPv4, first four bytes represent the IP address. + */ + uint32_t dst_ipaddr_mask[4]; /* big endian */ + /* + * The value of destination IP address mask to be used in filtering. For + * IPv4, first four bytes represent the IP address mask. + */ + uint16_t src_port; /* big endian */ + /* + * The value of source port to be used in filtering. Applies to UDP and + * TCP traffic. + */ + uint16_t src_port_mask; /* big endian */ + /* + * The value of source port mask to be used in filtering. Applies to UDP + * and TCP traffic. + */ + uint16_t dst_port; /* big endian */ + /* + * The value of destination port to be used in filtering. Applies to UDP + * and TCP traffic. + */ + uint16_t dst_port_mask; /* big endian */ + /* + * The value of destination port mask to be used in filtering. Applies + * to UDP and TCP traffic. + */ + uint64_t ntuple_filter_id_hint; + /* This is the ID of the filter that goes along with the pri_hint. */ +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_cfa_ntuple_filter_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint64_t ntuple_filter_id; + /* This value is an opaque id into CFA data structures. */ + uint32_t flow_id; + /* + * This is the ID of the flow associated with this filter. This value + * shall be used to match and associate the flow identifier returned in + * completion records. A value of 0xFFFFFFFF shall indicate no flow id. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_ntuple_filter_free */ +/* Description: Free an ntuple filter */ +/* Input (24 bytes) */ + +struct hwrm_cfa_ntuple_filter_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t ntuple_filter_id; + /* This value is an opaque id into CFA data structures. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_ntuple_filter_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_ntuple_filter_cfg */ +/* Description: Configure an ntuple filter with new destination VNIC */ +/* Input (40 bytes) */ + +struct hwrm_cfa_ntuple_filter_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the new_dst_id field to be configured. */ + #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_DST_ID UINT32_C(0x1) + /* + * This bit must be '1' for the new_mirror_vnic_id field to be + * configured. + */ + #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID UINT32_C(0x2) + uint32_t unused_0; + uint64_t ntuple_filter_id; + /* This value is an opaque id into CFA data structures. */ + uint32_t new_dst_id; + /* + * If set, this value shall represent the new Logical VNIC ID of the + * destination VNIC for the RX path and new network port id of the + * destination port for the TX path. + */ + uint32_t new_mirror_vnic_id; + /* New Logical VNIC ID of the VNIC where traffic is mirrored. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_ntuple_filter_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_em_flow_alloc */ +/* + * Description: This is a generic Exact Match (EM) flow that uses fields from + * L4/L3/L2 headers. The EM flows apply to transmit and receive traffic. All + * L2/L3/L4 header fields are specified in network byte order. For each EM flow, + * there is an associated set of actions specified. For tunneled packets, all + * L2/L3/L4 fields specified are fields of inner headers unless otherwise + * specified. # If a field specified in this command is not enabled as a valid + * field, then that field shall not be used in matching packet header fields + * against this EM flow entry. + */ +/* Input (112 bytes) */ + +struct hwrm_cfa_em_flow_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * Enumeration denoting the RX, TX type of the resource. This + * enumeration is used for resources that are similar for both TX and RX + * paths of the chip. + */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH UINT32_C(0x1) + /* tx path */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_TX (UINT32_C(0x0) << 0) + /* rx path */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX (UINT32_C(0x1) << 0) + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_LAST HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX + /* + * Setting of this flag indicates enabling of a byte counter for a given + * flow. + */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_BYTE_CTR UINT32_C(0x2) + /* + * Setting of this flag indicates enabling of a packet counter for a + * given flow. + */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PKT_CTR UINT32_C(0x4) + /* + * Setting of this flag indicates de-capsulation action for the given + * flow. + */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DECAP UINT32_C(0x8) + /* + * Setting of this flag indicates encapsulation action for the given + * flow. + */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_ENCAP UINT32_C(0x10) + /* + * Setting of this flag indicates drop action. If this flag is not set, + * then it should be considered accept action. + */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DROP UINT32_C(0x20) + uint32_t enables; + /* This bit must be '1' for the l2_filter_id field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_L2_FILTER_ID UINT32_C(0x1) + /* This bit must be '1' for the tunnel_type field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_TYPE UINT32_C(0x2) + /* This bit must be '1' for the tunnel_id field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_ID UINT32_C(0x4) + /* This bit must be '1' for the src_macaddr field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_MACADDR UINT32_C(0x8) + /* This bit must be '1' for the dst_macaddr field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_MACADDR UINT32_C(0x10) + /* This bit must be '1' for the ovlan_vid field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_OVLAN_VID UINT32_C(0x20) + /* This bit must be '1' for the ivlan_vid field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IVLAN_VID UINT32_C(0x40) + /* This bit must be '1' for the ethertype field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ETHERTYPE UINT32_C(0x80) + /* This bit must be '1' for the src_ipaddr field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_IPADDR UINT32_C(0x100) + /* This bit must be '1' for the dst_ipaddr field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_IPADDR UINT32_C(0x200) + /* This bit must be '1' for the ipaddr_type field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IPADDR_TYPE UINT32_C(0x400) + /* This bit must be '1' for the ip_protocol field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IP_PROTOCOL UINT32_C(0x800) + /* This bit must be '1' for the src_port field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_PORT UINT32_C(0x1000) + /* This bit must be '1' for the dst_port field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_PORT UINT32_C(0x2000) + /* This bit must be '1' for the dst_id field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_ID UINT32_C(0x4000) + /* This bit must be '1' for the mirror_vnic_id field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID UINT32_C(0x8000) + /* This bit must be '1' for the encap_record_id field to be configured. */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ENCAP_RECORD_ID UINT32_C(0x10000) + uint64_t l2_filter_id; + /* + * This value identifies a set of CFA data structures used for an L2 + * context. + */ + uint8_t tunnel_type; + /* Tunnel Type. */ + /* Non-tunnel */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL UINT32_C(0x0) + /* Virtual eXtensible Local Area Network (VXLAN) */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN UINT32_C(0x1) + /* Network Virtualization Generic Routing Encapsulation (NVGRE) */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NVGRE UINT32_C(0x2) + /* Generic Routing Encapsulation (GRE) inside Ethernet payload */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2GRE UINT32_C(0x3) + /* IP in IP */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPIP UINT32_C(0x4) + /* Generic Network Virtualization Encapsulation (Geneve) */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_GENEVE UINT32_C(0x5) + /* Multi-Protocol Lable Switching (MPLS) */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_MPLS UINT32_C(0x6) + /* Stateless Transport Tunnel (STT) */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_STT UINT32_C(0x7) + /* Generic Routing Encapsulation (GRE) inside IP datagram payload */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE UINT32_C(0x8) + /* Any tunneled traffic */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL UINT32_C(0xff) + uint8_t unused_0; + uint16_t unused_1; + uint32_t tunnel_id; + /* + * Tunnel identifier. Virtual Network Identifier (VNI). Only valid with + * tunnel_types VXLAN, NVGRE, and Geneve. Only lower 24-bits of VNI + * field are used in setting up the filter. + */ + uint8_t src_macaddr[6]; + /* This value indicates the source MAC address in the Ethernet header. */ + uint8_t unused_2; + uint8_t unused_3; + uint8_t dst_macaddr[6]; + /* + * This value indicates the destination MAC address in the Ethernet + * header. + */ + uint16_t ovlan_vid; + /* + * This value indicates the VLAN ID of the outer VLAN tag in the + * Ethernet header. + */ + uint16_t ivlan_vid; + /* + * This value indicates the VLAN ID of the inner VLAN tag in the + * Ethernet header. + */ + uint16_t ethertype; /* big endian */ + /* This value indicates the ethertype in the Ethernet header. */ + uint8_t ip_addr_type; + /* + * This value indicates the type of IP address. 4 - IPv4 6 - IPv6 All + * others are invalid. + */ + /* invalid */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN UINT32_C(0x0) + /* IPv4 */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 UINT32_C(0x4) + /* IPv6 */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV6 UINT32_C(0x6) + uint8_t ip_protocol; + /* + * The value of protocol filed in IP header. Applies to UDP and TCP + * traffic. 6 - UDP 17 - TCP + */ + /* invalid */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN UINT32_C(0x0) + /* UDP */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UDP UINT32_C(0x6) + /* TCP */ + #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_TCP UINT32_C(0x11) + uint8_t unused_4; + uint8_t unused_5; + uint32_t src_ipaddr[4]; /* big endian */ + /* + * The value of source IP address to be used in filtering. For IPv4, + * first four bytes represent the IP address. + */ + uint32_t dst_ipaddr[4]; /* big endian */ + /* + * The value of destination IP address to be used in filtering. For + * IPv4, first four bytes represent the IP address. + */ + uint16_t src_port; /* big endian */ + /* + * The value of source port to be used in filtering. Applies to UDP and + * TCP traffic. + */ + uint16_t dst_port; /* big endian */ + /* + * The value of destination port to be used in filtering. Applies to UDP + * and TCP traffic. + */ + uint16_t dst_id; + /* + * If set, this value shall represent the Logical VNIC ID of the + * destination VNIC for the RX path and network port id of the + * destination port for the TX path. + */ + uint16_t mirror_vnic_id; + /* Logical VNIC ID of the VNIC where traffic is mirrored. */ + uint32_t encap_record_id; + /* Logical ID of the encapsulation record. */ + uint32_t unused_6; +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_cfa_em_flow_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint64_t em_filter_id; + /* This value is an opaque id into CFA data structures. */ + uint32_t flow_id; + /* + * This is the ID of the flow associated with this filter. This value + * shall be used to match and associate the flow identifier returned in + * completion records. A value of 0xFFFFFFFF shall indicate no flow id. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_em_flow_free */ +/* Description: Free an EM flow table entry */ +/* Input (24 bytes) */ + +struct hwrm_cfa_em_flow_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t em_filter_id; + /* This value is an opaque id into CFA data structures. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_em_flow_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_cfa_em_flow_cfg */ +/* Description: Configure an EM flow with new destination VNIC */ +/* Input (40 bytes) */ + +struct hwrm_cfa_em_flow_cfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the new_dst_id field to be configured. */ + #define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_DST_ID UINT32_C(0x1) + /* + * This bit must be '1' for the new_mirror_vnic_id field to be + * configured. + */ + #define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID UINT32_C(0x2) + uint32_t unused_0; + uint64_t em_filter_id; + /* This value is an opaque id into CFA data structures. */ + uint32_t new_dst_id; + /* + * If set, this value shall represent the new Logical VNIC ID of the + * destination VNIC for the RX path and network port id of the + * destination port for the TX path. + */ + uint32_t new_mirror_vnic_id; + /* New Logical VNIC ID of the VNIC where traffic is mirrored. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_cfa_em_flow_cfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_tunnel_dst_port_query */ +/* + * Description: This function is called by a driver to query tunnel type + * specific destination port configuration. + */ +/* Input (24 bytes) */ + +struct hwrm_tunnel_dst_port_query_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint8_t tunnel_type; + /* Tunnel Type. */ + /* Virtual eXtensible Local Area Network (VXLAN) */ + #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN UINT32_C(0x1) + /* Generic Network Virtualization Encapsulation (Geneve) */ + #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_GENEVE UINT32_C(0x5) + uint8_t unused_0[7]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_tunnel_dst_port_query_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t tunnel_dst_port_id; + /* + * This field represents the identifier of L4 destination port used for + * the given tunnel type. This field is valid for specific tunnel types + * that use layer 4 (e.g. UDP) transports for tunneling. + */ + uint16_t tunnel_dst_port_val; /* big endian */ + /* + * This field represents the value of L4 destination port identified by + * tunnel_dst_port_id. This field is valid for specific tunnel types + * that use layer 4 (e.g. UDP) transports for tunneling. This field is + * in network byte order. A value of 0 means that the destination port + * is not configured. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_tunnel_dst_port_alloc */ +/* + * Description: This function is called by a driver to allocate l4 destination + * port for a specific tunnel type. The destination port value is provided in + * the input. If the HWRM supports only one global destination port for a tunnel + * type, then the HWRM shall keep track of its usage as described below. # The + * first caller that allocates a destination port shall always succeed and the + * HWRM shall save the destination port configuration for that tunnel type and + * increment the usage count to 1. # Subsequent callers allocating the same + * destination port for that tunnel type shall succeed and the HWRM shall + * increment the usage count for that port for each subsequent caller that + * succeeds. # Any subsequent caller trying to allocate a different destination + * port for that tunnel type shall fail until the usage count for the original + * destination port goes to zero. # A caller that frees a port will cause the + * usage count for that port to decrement. + */ +/* Input (24 bytes) */ + +struct hwrm_tunnel_dst_port_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint8_t tunnel_type; + /* Tunnel Type. */ + /* Virtual eXtensible Local Area Network (VXLAN) */ + #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN UINT32_C(0x1) + /* Generic Network Virtualization Encapsulation (Geneve) */ + #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE UINT32_C(0x5) + uint8_t unused_0; + uint16_t tunnel_dst_port_val; /* big endian */ + /* + * This field represents the value of L4 destination port used for the + * given tunnel type. This field is valid for specific tunnel types that + * use layer 4 (e.g. UDP) transports for tunneling. This field is in + * network byte order. A value of 0 shall fail the command. + */ + uint32_t unused_1; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_tunnel_dst_port_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t tunnel_dst_port_id; + /* + * Identifier of a tunnel L4 destination port value. Only applies to + * tunnel types that has l4 destination port parameters. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_tunnel_dst_port_free */ +/* + * Description: This function is called by a driver to free l4 destination port + * for a specific tunnel type. + */ +/* Input (24 bytes) */ + +struct hwrm_tunnel_dst_port_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint8_t tunnel_type; + /* Tunnel Type. */ + /* Virtual eXtensible Local Area Network (VXLAN) */ + #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN UINT32_C(0x1) + /* Generic Network Virtualization Encapsulation (Geneve) */ + #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GENEVE UINT32_C(0x5) + uint8_t unused_0; + uint16_t tunnel_dst_port_id; + /* + * Identifier of a tunnel L4 destination port value. Only applies to + * tunnel types that has l4 destination port parameters. + */ + uint32_t unused_1; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_tunnel_dst_port_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_stat_ctx_alloc */ +/* + * Description: This command allocates and does basic preparation for a stat + * context. + */ +/* Input (32 bytes) */ + +struct hwrm_stat_ctx_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t stats_dma_addr; + /* This is the address for statistic block. */ + uint32_t update_period_ms; + /* + * The statistic block update period in ms. e.g. 250ms, 500ms, 750ms, + * 1000ms. + */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_stat_ctx_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t stat_ctx_id; + /* This is the statistics context ID value. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_stat_ctx_free */ +/* Description: This command is used to free a stat context. */ +/* Input (24 bytes) */ + +struct hwrm_stat_ctx_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t stat_ctx_id; + /* ID of the statistics context that is being queried. */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_stat_ctx_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t stat_ctx_id; + /* This is the statistics context ID value. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_stat_ctx_query */ +/* Description: This command returns statistics of a context. */ +/* Input (24 bytes) */ + +struct hwrm_stat_ctx_query_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t stat_ctx_id; + /* ID of the statistics context that is being queried. */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (176 bytes) */ + +struct hwrm_stat_ctx_query_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint64_t tx_ucast_pkts; + /* Number of transmitted unicast packets */ + uint64_t tx_mcast_pkts; + /* Number of transmitted multicast packets */ + uint64_t tx_bcast_pkts; + /* Number of transmitted broadcast packets */ + uint64_t tx_err_pkts; + /* Number of transmitted packets with error */ + uint64_t tx_drop_pkts; + /* Number of dropped packets on transmit path */ + uint64_t tx_ucast_bytes; + /* Number of transmitted bytes for unicast traffic */ + uint64_t tx_mcast_bytes; + /* Number of transmitted bytes for multicast traffic */ + uint64_t tx_bcast_bytes; + /* Number of transmitted bytes for broadcast traffic */ + uint64_t rx_ucast_pkts; + /* Number of received unicast packets */ + uint64_t rx_mcast_pkts; + /* Number of received multicast packets */ + uint64_t rx_bcast_pkts; + /* Number of received broadcast packets */ + uint64_t rx_err_pkts; + /* Number of received packets with error */ + uint64_t rx_drop_pkts; + /* Number of dropped packets on received path */ + uint64_t rx_ucast_bytes; + /* Number of received bytes for unicast traffic */ + uint64_t rx_mcast_bytes; + /* Number of received bytes for multicast traffic */ + uint64_t rx_bcast_bytes; + /* Number of received bytes for broadcast traffic */ + uint64_t rx_agg_pkts; + /* Number of aggregated unicast packets */ + uint64_t rx_agg_bytes; + /* Number of aggregated unicast bytes */ + uint64_t rx_agg_events; + /* Number of aggregation events */ + uint64_t rx_agg_aborts; + /* Number of aborted aggregations */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_stat_ctx_clr_stats */ +/* Description: This command clears statistics of a context. */ +/* Input (24 bytes) */ + +struct hwrm_stat_ctx_clr_stats_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t stat_ctx_id; + /* ID of the statistics context that is being queried. */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_stat_ctx_clr_stats_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_fw_reset */ +/* + * Description: This function is called by a driver to self reset the firmware + * running on the processor indicated by the embedded_proc_type. + */ +/* Input (24 bytes) */ + +struct hwrm_fw_reset_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint8_t embedded_proc_type; + /* Type of embedded processor. */ + /* Boot Processor */ + #define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_BOOT UINT32_C(0x0) + /* Management Processor */ + #define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_MGMT UINT32_C(0x1) + /* Network control processor */ + #define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_NETCTRL UINT32_C(0x2) + /* RoCE control processor */ + #define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_ROCE UINT32_C(0x3) + /* Reserved */ + #define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_RSVD UINT32_C(0x4) + uint8_t selfrst_status; + /* Type of self reset. */ + /* No Self Reset */ + #define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTNONE UINT32_C(0x0) + /* Self Reset as soon as possible to do so safely */ + #define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTASAP UINT32_C(0x1) + /* Self Reset on PCIe Reset */ + #define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTPCIERST UINT32_C(0x2) + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_fw_reset_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t selfrst_status; + /* Type of self reset. */ + /* No Self Reset */ + #define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTNONE UINT32_C(0x0) + /* Self Reset as soon as possible to do so safely */ + #define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTASAP UINT32_C(0x1) + /* Self Reset on PCIe Reset */ + #define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTPCIERST UINT32_C(0x2) + uint8_t unused_0; + uint16_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_fw_qstatus */ +/* + * Description: This function is called by a driver to query the status of the + * firmware running on the processor indicated by the embedded_proc_type. + */ +/* Input (24 bytes) */ + +struct hwrm_fw_qstatus_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint8_t embedded_proc_type; + /* Type of embedded processor. */ + /* Boot Processor */ + #define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_BOOT UINT32_C(0x0) + /* Management Processor */ + #define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_MGMT UINT32_C(0x1) + /* Network control processor */ + #define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_NETCTRL UINT32_C(0x2) + /* RoCE control processor */ + #define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_ROCE UINT32_C(0x3) + /* Reserved */ + #define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_RSVD UINT32_C(0x4) + uint8_t unused_0[7]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_fw_qstatus_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t selfrst_status; + /* Type of self reset. */ + /* No Self Reset */ + #define HWRM_FW_QSTATUS_OUTPUT_SELFRST_STATUS_SELFRSTNONE UINT32_C(0x0) + /* Self Reset as soon as possible to do so safely */ + #define HWRM_FW_QSTATUS_OUTPUT_SELFRST_STATUS_SELFRSTASAP UINT32_C(0x1) + /* Self Reset on PCIe Reset */ + #define HWRM_FW_QSTATUS_OUTPUT_SELFRST_STATUS_SELFRSTPCIERST UINT32_C(0x2) + uint8_t unused_0; + uint16_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_fw_set_time */ +/* + * Description: Inform the HWRM firmware of the current date/time. Ideally, the + * date/time will be current time in GMT/UTC and the zone value will be 0 + * (indicating UTC). If the time zone is not known, the zone value shall be + * 0xffff. Other values for zone are discouraged, but if specified, they + * indicate the number of minutes east of UTC, while zones west of UTC are + * represented with a 2's complement negative value (e.g. PST would be -480 + * while PDT would be -420). + */ +/* Input (32 bytes) */ + +struct hwrm_fw_set_time_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t year; + /* Current year */ + /* Date/time is not known */ + #define HWRM_FW_SET_TIME_INPUT_YEAR_UNKNOWN UINT32_C(0x0) + uint8_t month; + /* Current month of year (1-12) */ + uint8_t day; + /* Current day of month (1-31) */ + uint8_t hour; + /* Current hour (0-23) */ + uint8_t minute; + /* Current minute (0-59) */ + uint8_t second; + /* Current second (0-59) */ + uint8_t unused_0; + uint16_t millisecond; + /* Current millisecond (0-999) */ + uint16_t zone; + /* Minutes east of UTC, 0xffff if TZ is not known */ + /* Time zone is Coordinated Universal Time (UTC) */ + #define HWRM_FW_SET_TIME_INPUT_ZONE_UTC UINT32_C(0x0) + /* Time zone is not known */ + #define HWRM_FW_SET_TIME_INPUT_ZONE_UNKNOWN UINT32_C(0xffff) + uint32_t unused_1; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_fw_set_time_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_fw_get_time */ +/* Description: Query the HWRM firmware's notion of the current date/time. */ +/* Input (16 bytes) */ + +struct hwrm_fw_get_time_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_fw_get_time_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t year; + /* Current year */ + /* Date/time is not known */ + #define HWRM_FW_GET_TIME_OUTPUT_YEAR_UNKNOWN UINT32_C(0x0) + uint8_t month; + /* Current month of year (1-12) */ + uint8_t day; + /* Current day of month (1-31) */ + uint8_t hour; + /* Current hour (0-23) */ + uint8_t minute; + /* Current minute (0-59) */ + uint8_t second; + /* Current second (0-59) */ + uint8_t unused_0; + uint16_t millisecond; + /* Current millisecond (0-999) */ + uint16_t zone; + /* Minutes east of UTC, 0xffff if TZ is not known */ + /* Time zone is Coordinated Universal Time (UTC) */ + #define HWRM_FW_GET_TIME_OUTPUT_ZONE_UTC UINT32_C(0x0) + /* Time zone is not known */ + #define HWRM_FW_GET_TIME_OUTPUT_ZONE_UNKNOWN UINT32_C(0xffff) + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_exec_fwd_resp */ +/* + * Description: This command is used to send an encapsulated request to the + * HWRM. This command instructs the HWRM to execute the request and forward the + * response of the encapsulated request to the location specified in the + * original request that is encapsulated. The target id of this command shall be + * set to 0xFFFF (HWRM). The response location in this command shall be used to + * acknowledge the receipt of the encapsulated request and forwarding of the + * response. + */ +/* Input (128 bytes) */ + +struct hwrm_exec_fwd_resp_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t encap_request[26]; + /* + * This is an encapsulated request. This request should be executed by + * the HWRM and the response should be provided in the response buffer + * inside the encapsulated request. + */ + uint16_t encap_resp_target_id; + /* + * This value indicates the target id of the response to the + * encapsulated request. 0x0 - 0xFFF8 - Used for function ids 0xFFF8 - + * 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_exec_fwd_resp_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_reject_fwd_resp */ +/* + * Description: This command is used to send an encapsulated request to the + * HWRM. This command instructs the HWRM to reject the request and forward the + * error response of the encapsulated request to the location specified in the + * original request that is encapsulated. The target id of this command shall be + * set to 0xFFFF (HWRM). The response location in this command shall be used to + * acknowledge the receipt of the encapsulated request and forwarding of the + * response. + */ +/* Input (128 bytes) */ + +struct hwrm_reject_fwd_resp_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t encap_request[26]; + /* + * This is an encapsulated request. This request should be rejected by + * the HWRM and the error response should be provided in the response + * buffer inside the encapsulated request. + */ + uint16_t encap_resp_target_id; + /* + * This value indicates the target id of the response to the + * encapsulated request. 0x0 - 0xFFF8 - Used for function ids 0xFFF8 - + * 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_reject_fwd_resp_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_fwd_resp */ +/* + * Description: This command is used to send an encapsulated response to the + * HWRM. The HWRM shall forward this response based on the target id. The + * response address provided in this command shall be used to acknowledge the + * receipt of the encapsulated response. The encapsulated response address + * provided in this command shall be used to provide the encapsulated response. + */ +/* Input (40 bytes) */ + +struct hwrm_fwd_resp_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t encap_resp_target_id; + /* + * This value indicates the target id of the encapsulated response. 0x0 + * - 0xFFF8 - Used for function ids 0xFFF8 - 0xFFFE - Reserved for + * internal processors 0xFFFF - HWRM + */ + uint16_t encap_resp_cmpl_ring; + /* + * This value indicates the completion ring the encapsulated response + * will be optionally completed on. If the value is -1, then no CR + * completion shall be generated for the encapsulated response. Any + * other value must be a valid CR ring_id value. If a valid + * encap_resp_cmpl_ring is provided, then a CR completion shall be + * generated for the encapsulated response. + */ + uint16_t encap_resp_len; + /* This field indicates the length of encapsulated response. */ + uint8_t unused_0; + uint8_t unused_1; + uint64_t encap_resp_addr; + /* + * This is the host address where the encapsulated response will be + * written. This area must be 16B aligned and must be cleared to zero + * before the original request is made. + */ + uint32_t encap_resp[24]; + /* This is an encapsulated response. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_fwd_resp_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_fwd_async_event_cmpl */ +/* + * Description: This command is used to send an encapsulated asynchronous event + * completion to the HWRM. The HWRM shall forward this asynchronous event + * completion to target(s) specified in the command. The HWRM shall complete + * this command only after forwarding asynchronous event completion to specified + * targets. + */ +/* Input (32 bytes) */ + +struct hwrm_fwd_async_event_cmpl_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t encap_async_event_target_id; + /* + * This value indicates the target id of the encapsulated asynchronous + * event. 0x0 - 0xFFF8 - Used for function ids 0xFFF8 - 0xFFFE - + * Reserved for internal processors 0xFFFF - Broadcast to all children + * VFs (only applicable when a PF is the requester) + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2[3]; + uint8_t unused_3; + uint32_t encap_async_event_cmpl[4]; + /* This is an encapsulated asynchronous event completion. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_fwd_async_event_cmpl_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_temp_monitor_query */ +/* + * Description: A temperature monitor is used to query the device temperature. + */ +/* Input (16 bytes) */ + +struct hwrm_temp_monitor_query_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_temp_monitor_query_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t temp; + /* The HWRM shall provide the current temperature of device in Celsius. */ + uint8_t unused_0; + uint16_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_wol_filter_alloc */ +/* + * Description: A Wake-On-LAN (WoL) filter is a filter resource that is used to + * identify a WoL packet. # Among all function drivers, the HWRM shall only + * allow PF drivers to allocate WoL filters. # The HWRM shall not allow VF + * drivers to allocate any WoL filters. # When partitioning is enabled and WoL + * is supported, the HWRM shall support at least one WoL filter per partition. # + * The HWRM shall retain a WoL filter setting until the filter is freed. # If + * the HWRM client is a function driver, then the HWRM shall not allow the HWRM + * client to set up WoL filters on the port that the function is not associated + * with. # If the HWRM client is one of the trusted embedded services (e.g. + * management service), the the HWRM shall allow the HWRM client to set up WoL + * filters on any port of the device. + */ +/* Input (64 bytes) */ + +struct hwrm_wol_filter_alloc_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + uint32_t enables; + /* This bit must be '1' for the mac_address field to be configured. */ + #define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_MAC_ADDRESS UINT32_C(0x1) + /* This bit must be '1' for the pattern_offset field to be configured. */ + #define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_OFFSET UINT32_C(0x2) + /* This bit must be '1' for the pattern_buf_size field to be configured. */ + #define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_BUF_SIZE UINT32_C(0x4) + /* This bit must be '1' for the pattern_buf_addr field to be configured. */ + #define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_BUF_ADDR UINT32_C(0x8) + /* + * This bit must be '1' for the pattern_mask_addr field to be + * configured. + */ + #define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_MASK_ADDR UINT32_C(0x10) + /* + * This bit must be '1' for the pattern_mask_size field to be + * configured. + */ + #define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_MASK_SIZE UINT32_C(0x20) + uint16_t port_id; + /* Port ID of port on which WoL filter is configured. */ + uint8_t wol_type; + /* This value represents a Wake-on-LAN type. */ + /* Magic Paket */ + #define HWRM_WOL_FILTER_ALLOC_INPUT_WOL_TYPE_MAGICPKT UINT32_C(0x0) + /* Bitmap */ + #define HWRM_WOL_FILTER_ALLOC_INPUT_WOL_TYPE_BMP UINT32_C(0x1) + /* Invalid */ + #define HWRM_WOL_FILTER_ALLOC_INPUT_WOL_TYPE_INVALID UINT32_C(0xff) + uint8_t unused_0; + uint32_t unused_1; + uint8_t mac_address[6]; + /* + * # If this field is enabled and magic packet WoL filter type is + * specified in this command, the value set in this field shall be used + * in setting the magic packet based WoL filter. # If this field is not + * enabled and magic packet WoL filter type is specified and port id is + * specified to 0xFF in this command, then the HWRM shall use default + * MAC address configured on the function associated with the HWRM + * client. # If this field is not enabled and magic packet WoL filter + * type is specified and port id is not specified to 0xFF in this + * command, then the HWRM shall use default MAC address configured on + * the port. + */ + uint16_t pattern_offset; + /* + * The offset from the beginning of MAC header where pattern should be + * matched. Applies to bitmap WoL. + */ + uint16_t pattern_buf_size; + /* The size of the pattern that is being matched. Applies to bitmap WoL. */ + uint16_t pattern_mask_size; + /* The size of the pattern mask. Applies to bitmap WoL. */ + uint32_t unused_2; + uint64_t pattern_buf_addr; + /* Physical address of the pattern buffer. Applies to bitmap WoL. */ + uint64_t pattern_mask_addr; + /* Physical address of the pattern mask. Applies to bitmap WoL. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_wol_filter_alloc_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t wol_filter_id; + /* This value identifies a Wake-on-LAN (WoL) filter. */ + uint8_t unused_0; + uint16_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_wol_filter_free */ +/* + * Description: Free a WoL filter. # Among all function drivers, the HWRM shall + * only allow PF drivers to free WoL filters. # The HWRM shall not allow VF + * drivers to free any WoL filters. # The HWRM shall not allow a function driver + * to free an Out-Of-Box WoL filter. # The HWRM shall not allow a function + * driver to free a WoL filter on a port that the corresponding function is not + * associated with. # The HWRM shall not allow a function driver to free a WoL + * filter on a function that the function driver is not associated with. + */ +/* Input (32 bytes) */ + +struct hwrm_wol_filter_free_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t flags; + /* + * # When this bit is set to '1', then all active WoL filters on the + * port are requested to be freed. # If the a function driver sets this + * flag to '1', then the HWRM shall free all active WoL filters that are + * not set by other function drivers on that port. + */ + #define HWRM_WOL_FILTER_FREE_INPUT_FLAGS_FREE_ALL_WOL_FILTERS UINT32_C(0x1) + uint32_t enables; + /* This bit must be '1' for the wol_filter_id field to be configured. */ + #define HWRM_WOL_FILTER_FREE_INPUT_ENABLES_WOL_FILTER_ID UINT32_C(0x1) + uint16_t port_id; + /* Port ID of the port on which WoL filter(s) is (are) being freed. */ + uint8_t wol_filter_id; + /* The HWRM shall ignore this field if free_all_wol_filters flag is set. */ + uint8_t unused_0[5]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_wol_filter_free_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_wol_filter_qcfg */ +/* + * Description: Query WoL filter configuration. # Among all function drivers, + * the HWRM shall only allow PF drivers to query WoL filters. # The HWRM shall + * not allow VF drivers to query any WoL filters. # The HWRM shall return WoL + * filters that are active on the associated port for which this query is being + * performed. # If the HWRM client is a function driver, then the HWRM shall not + * allow the HWRM client to query WoL filters that are set up by other function + * drivers. # If the HWRM client is a function driver, then the HWRM shall not + * allow the HWRM client to query WoL filters on the port that the function is + * not associated with. # If the HWRM client is one of the trusted embedded + * service (e.g. management service), the the HWRM shall allow the HWRM client + * to query WoL filters on any port of the device. + */ +/* Input (56 bytes) */ + +struct hwrm_wol_filter_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t port_id; + /* Port ID of port on which WoL filter that is being queried. */ + uint16_t handle; + /* + * This is an opaque handle used to access filters. # The HWRM client + * shall set this field to 0x0000 to begin the query. # After the first + * query, the HWRM client shall retrieve next filters (if they exist) + * using the HWRM provided handle in the response. + */ + uint32_t unused_0; + uint64_t pattern_buf_addr; + /* + * Physical address of the pattern buffer. Applies to bitmap WoL filter + * only. # Value of 0 indicates an invalid buffer address. If this field + * is set to 0, then HWRM shall ignore pattern_buf_size. # If the HWRM + * client provides an invalid buffer address for the pattern, then the + * HWRM is not required to provide pattern when the response contains a + * bitmap WoL filter. + */ + uint64_t pattern_buf_size; + /* The sixe of the pattern buffer. Applies to bitmap WoL filter only. */ + uint64_t pattern_mask_addr; + /* + * Physical address of the pattern mask. Applies to bitmap WoL filter + * only. # Value of 0 indicates an invalid pattern mask address. If this + * field is set to 0, then HWRM shall ignore pattern_mask_size. # If the + * HWRM client provides an invalid mask address for the pattern, then + * the HWRM is not required to provide mask when the response contains a + * bitmap WoL filter. + */ + uint64_t pattern_mask_size; + /* + * The size of the buffer for pattern mask. Applies to bitmap WoL filter + * only. + */ +} __attribute__((packed)); + +/* Output (32 bytes) */ + +struct hwrm_wol_filter_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t next_handle; + /* + * This is the next handle that is used to access filters. # If this + * field is set to 0x0000, then no WoL filters are currently configured + * on this port and all other fields in the output shall be ignored by + * the HWRM client. # If this field is set to neither 0x0000 nor 0xFFFF, + * then the wol_filter_id is valid and the parameters provided in the + * response are based on the wol_type. # If this field is set to 0xFFFF, + * then there are no remaining configured WoL filters to be queried for + * the queried function after this response, wol_filter_id is valid and + * the parameters provided in the response are based on the wol_type. + */ + uint8_t wol_filter_id; + /* This value identifies the filter returned in this response. */ + uint8_t wol_type; + /* + * This value identifies the type of WoL filter returned in this + * response. + */ + /* Magic Paket */ + #define HWRM_WOL_FILTER_QCFG_OUTPUT_WOL_TYPE_MAGICPKT UINT32_C(0x0) + /* Bitmap */ + #define HWRM_WOL_FILTER_QCFG_OUTPUT_WOL_TYPE_BMP UINT32_C(0x1) + /* Invalid */ + #define HWRM_WOL_FILTER_QCFG_OUTPUT_WOL_TYPE_INVALID UINT32_C(0xff) + uint32_t unused_0; + uint8_t mac_address[6]; + /* + * The MAC address value used by the WoL filter. Applies to magic packet + * based WoL. + */ + uint16_t pattern_offset; + /* + * The offset from the beginning of MAC header where pattern should be + * matched. Applies to bitmap WoL. + */ + uint16_t pattern_size; + /* + * The actual size of the pattern that is being returned. Applies to + * bitmap WoL. + */ + uint16_t pattern_mask_size; + /* + * The actual size of the pattern mask that is being returned. Applies + * to bitmap WoL. + */ + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_wol_reason_qcfg */ +/* Description: Query WoL reason for the last system wake up. */ +/* Input (40 bytes) */ + +struct hwrm_wol_reason_qcfg_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t port_id; + /* Port ID of port for which this query is for. */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2[3]; + uint8_t unused_3; + uint64_t wol_pkt_buf_addr; + /* Physical address of the packet buffer for querying WoL packet. */ + uint64_t wol_pkt_buf_size; + /* The size of the buffer for the WoL packet. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_wol_reason_qcfg_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint8_t wol_filter_id; + /* + * This value identifies the filter that matched the last WoL packet. + * This id is only valid with valid WoL reason. + */ + uint8_t wol_reason; + /* + * This value identifies the type of WoL reason returned in this + * response. When the wol_type is set to invalid, then there is no WoL + * event that happened during last system wake-up. + */ + /* Magic Paket */ + #define HWRM_WOL_REASON_QCFG_OUTPUT_WOL_REASON_MAGICPKT UINT32_C(0x0) + /* Bitmap */ + #define HWRM_WOL_REASON_QCFG_OUTPUT_WOL_REASON_BMP UINT32_C(0x1) + /* Invalid */ + #define HWRM_WOL_REASON_QCFG_OUTPUT_WOL_REASON_INVALID UINT32_C(0xff) + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t unused_4; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_dbg_dump */ +/* + * Description: This command is used by to initiate the dump of debug + * information to a driver specified address. + */ +/* Input (40 bytes) */ + +struct hwrm_dbg_dump_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t handle; + /* + * Handle used to dump debug data. handle = 0 indicates the beginning of + * the dump. handle != 0 indicates the request to dump the next part. + */ + uint32_t unused_0; + uint64_t host_dbg_dump_addr; + /* + * Address of the host buffer where the debug data is requested to be + * dumped. + */ + uint64_t host_dbg_dump_addr_len; + /* Length of host buffer used for transferring debug data. */ +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_dbg_dump_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t nexthandle; + /* + * Handle used to indicate availability of additional debug data. + * nexthandle = 0 indicates that there is no more debug data available. + * nexthandle != 0 indicates the handle value that should be used to + * request the next part of debug data. + */ + uint32_t dbg_data_len; + /* The number of bytes of debug data written to debug dump buffer. */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_raw_write_blk */ +/* + * Note: Write an unmanaged block of data at any physical offset within the + * NVRAM. Used for initial provisioning/manufacturing purposes only. Implemented + * in the ChiMP boot-strap firmware (fwutil.bin) only. + */ +/* Input (32 bytes) */ + +struct hwrm_nvm_raw_write_blk_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t host_src_addr; + /* + * 64-bit Host Source Address. This is the loation of the source data to + * be written. + */ + uint32_t dest_addr; + /* + * 32-bit Destination Address. This is the NVRAM byte-offset where the + * source data will be written to. + */ + uint32_t len; + /* Length of data to be written, in bytes. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_nvm_raw_write_blk_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_read */ +/* + * Note: Read the contents of an NVRAM item as referenced (indexed) by an + * existing directory entry. + */ +/* Input (40 bytes) */ + +struct hwrm_nvm_read_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t host_dest_addr; + /* + * 64-bit Host Destination Address. This is the host address where the + * data will be written to. + */ + uint16_t dir_idx; + /* The 0-based index of the directory entry. */ + uint8_t unused_0; + uint8_t unused_1; + uint32_t offset; + /* The NVRAM byte-offset to read from. */ + uint32_t len; + /* The length of the data to be read, in bytes. */ + uint32_t unused_2; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_nvm_read_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_raw_dump */ +/* Note: Dump a raw block of data from NVRAM. */ +/* Input (32 bytes) */ + +struct hwrm_nvm_raw_dump_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t host_dest_addr; + /* + * 64-bit Host Destination Address. This is the host address where the + * data will be written to. + */ + uint32_t offset; + /* 32-bit NVRAM byte-offset to read from. */ + uint32_t len; + /* Total length of NVRAM contents to be read, in bytes. */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_nvm_raw_dump_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_get_dir_entries */ +/* + * Description: Read the NVRAM directory. Each directory entry is at least 24 + * bytes in length and contains the: - 16-bit directory entry type + * (BNX_DIR_TYPE_* value) - 16-bit ordinal (instance of this directory entry + * type) - 16-bit extension flags (identifies inactive entries and entries for + * firmware update) - 16-bit attribute flags (identifies entries with a + * purposely invalid chksum value) - 32-bit byte-offset into NVRAM where this + * item data is located - 32-bit length of allocated NVRAM for item, in bytes + * (multiple of block size) - 32-bit length of data (excluding padding), in + * bytes (may be 0) - 32-bit data checksum (CRC-32) See the + * bnxnvm_directory_entry_t definition in the file bnxnvm_defs.h. + */ +/* Input (24 bytes) */ + +struct hwrm_nvm_get_dir_entries_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t host_dest_addr; + /* + * 64-bit Host Destination Address. This is the host address where the + * directory will be written. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_nvm_get_dir_entries_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_get_dir_info */ +/* Note: Get Directory Header info. */ +/* Input (16 bytes) */ + +struct hwrm_nvm_get_dir_info_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_nvm_get_dir_info_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t entries; + /* Number of directory entries in the directory. */ + uint32_t entry_length; + /* Size of each directory entry, in bytes. */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_write */ +/* + * Note: Write to the allocated NVRAM of an item referenced by an existing + * directory entry. + */ +/* Input (48 bytes) */ + +struct hwrm_nvm_write_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t host_src_addr; + /* 64-bit Host Source Address. This is where the source data is. */ + uint16_t dir_type; + /* + * The Directory Entry Type (valid values are defined in the + * bnxnvm_directory_type enum defined in the file bnxnvm_defs.h). + */ + uint16_t dir_ordinal; + /* + * Directory ordinal. The 0-based instance of the combined Directory + * Entry Type and Extension. + */ + uint16_t dir_ext; + /* + * The Directory Entry Extension flags (see BNX_DIR_EXT_* in the file + * bnxnvm_defs.h). + */ + uint16_t dir_attr; + /* + * Directory Entry Attribute flags (see BNX_DIR_ATTR_* in the file + * bnxnvm_defs.h). + */ + uint32_t dir_data_length; + /* + * Length of data to write, in bytes. May be less than or equal to the + * allocated size for the directory entry. The data length stored in the + * directory entry will be updated to reflect this value once the write + * is complete. + */ + uint16_t option; + /* Option. */ + uint16_t flags; + /* + * When this bit is '1', the original active image will not be removed. + * TBD: what purpose is this? + */ + #define HWRM_NVM_WRITE_INPUT_FLAGS_KEEP_ORIG_ACTIVE_IMG UINT32_C(0x1) + uint32_t dir_item_length; + /* + * The requested length of the allocated NVM for the item, in bytes. + * This value may be greater than or equal to the specified data length + * (dir_data_length). If this value is less than the specified data + * length, it will be ignored. The response will contain the actual + * allocated item length, which may be greater than the requested item + * length. The purpose for allocating more than the required number of + * bytes for an item's data is to pre-allocate extra storage (padding) + * to accommodate the potential future growth of an item (e.g. upgraded + * firmware with a size increase, log growth, expanded configuration + * data). + */ + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_nvm_write_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t dir_item_length; + /* + * Length of the allocated NVM for the item, in bytes. The value may be + * greater than or equal to the specified data length or the requested + * item length. The actual item length used when creating a new + * directory entry will be a multiple of an NVM block size. + */ + uint16_t dir_idx; + /* The directory index of the created or modified item. */ + uint8_t unused_0; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_modify */ +/* + * Note: Modify the contents of an NVRAM item as referenced (indexed) by an + * existing directory entry. + */ +/* Input (40 bytes) */ + +struct hwrm_nvm_modify_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint64_t host_src_addr; + /* 64-bit Host Source Address. This is where the modified data is. */ + uint16_t dir_idx; + /* 16-bit directory entry index. */ + uint8_t unused_0; + uint8_t unused_1; + uint32_t offset; + /* 32-bit NVRAM byte-offset to modify content from. */ + uint32_t len; + /* + * Length of data to be modified, in bytes. The length shall be non- + * zero. + */ + uint32_t unused_2; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_nvm_modify_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_find_dir_entry */ +/* + * Note: Search a directory entry in the directory by either directory entry + * index or directory entry parameters. + */ +/* Input (32 bytes) */ + +struct hwrm_nvm_find_dir_entry_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the dir_idx_valid field to be configured. */ + #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_ENABLES_DIR_IDX_VALID UINT32_C(0x1) + uint16_t dir_idx; + /* Directory Entry Index */ + uint16_t dir_type; + /* Directory Entry (Image) Type */ + uint16_t dir_ordinal; + /* Directory ordinal. The instance of this Directory Type */ + uint16_t dir_ext; + /* The Directory Entry Extension flags. */ + uint8_t opt_ordinal; + /* This value indicates the search option using dir_ordinal. */ + #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_MASK UINT32_C(0x3) + #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_SFT 0 + /* Equal to specified ordinal value. */ + #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_EQ UINT32_C(0x0) + /* Greater than or equal to specified ordinal value */ + #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GE UINT32_C(0x1) + /* Greater than specified ordinal value */ + #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GT UINT32_C(0x2) + uint8_t unused_1[3]; +} __attribute__((packed)); + +/* Output (32 bytes) */ + +struct hwrm_nvm_find_dir_entry_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t dir_item_length; + /* Allocated NVRAM for this directory entry, in bytes. */ + uint32_t dir_data_length; + /* Size of the stored data for this directory entry, in bytes. */ + uint32_t fw_ver; + /* + * Firmware version. Only valid if the directory entry is for embedded + * firmware stored in APE_BIN Format. + */ + uint16_t dir_ordinal; + /* Directory ordinal. */ + uint16_t dir_idx; + /* Directory Entry Index */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_erase_dir_entry */ +/* + * Note: Remove a directory entry specified by the directory entry index from + * the directory. + */ +/* Input (24 bytes) */ + +struct hwrm_nvm_erase_dir_entry_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t dir_idx; + /* Directory Entry Index */ + uint16_t unused_0[3]; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_nvm_erase_dir_entry_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_get_dev_info */ +/* + * Note: Get device info. Return Manufacturer_ID, Device_ID, block_size, + * nvram_size, reserved_size and available_size. + */ +/* Input (16 bytes) */ + +struct hwrm_nvm_get_dev_info_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ +} __attribute__((packed)); + +/* Output (32 bytes) */ + +struct hwrm_nvm_get_dev_info_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint16_t manufacturer_id; + /* Manufacturer ID. */ + uint16_t device_id; + /* Device ID. */ + uint32_t sector_size; + /* Sector size of the NVRAM device. */ + uint32_t nvram_size; + /* Total size, in bytes of the NVRAM device. */ + uint32_t reserved_size; + uint32_t available_size; + /* + * Available size that can be used, in bytes. Available size is the + * NVRAM size take away the used size and reserved size. + */ + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_mod_dir_entry */ +/* Note: Modify a directory entry parameters in the directory. */ +/* Input (32 bytes) */ + +struct hwrm_nvm_mod_dir_entry_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t enables; + /* This bit must be '1' for the checksum field to be configured. */ + #define HWRM_NVM_MOD_DIR_ENTRY_INPUT_ENABLES_CHECKSUM UINT32_C(0x1) + uint16_t dir_idx; + /* Directory Entry Index */ + uint16_t dir_ordinal; + /* Directory ordinal. The (0-based) instance of this Directory Type. */ + uint16_t dir_ext; + /* + * The Directory Entry Extension flags (see BNX_DIR_EXT_* for extension + * flag definitions). + */ + uint16_t dir_attr; + /* + * Directory Entry Attribute flags (see BNX_DIR_ATTR_* for attribute + * flag definitions). + */ + uint32_t checksum; + /* + * If valid, then this field updates the checksum value of the content + * in the directory entry. + */ +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_nvm_mod_dir_entry_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_verify_update */ +/* + * Description: Verify updated content of a directory entry. Before this + * verification, there should be two valid directory entries of the given + * directory type (one with "UPDATE" directory extension flag and the current + * one "ACTIVE"). Below are steps the HWRM performs for executing this command: + * # The HWRM finds the directory entry with "UDPATE" extension flag based on + * input parameters. The new directory entry should already have updated + * contents. # The HWRM performs signature verification of the updated content. + * # If the signature verification is successful, the two directory entries are + * switched (the verified updated entry is made active and the current "ACTIVE" + * entry is marked with "UPDATE" extension flag). Implementation notes: # The + * HWRM shall allow this command to be requested against any dir_type value (and + * not limit it to a subset). # In the case of an updated HWRM firmware, the new + * firmware version shall not automatically take effect (i.e. be executed). + */ +/* Input (24 bytes) */ + +struct hwrm_nvm_verify_update_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint16_t dir_type; + /* Directory Entry Type, to be verified. */ + uint16_t dir_ordinal; + /* Directory ordinal. The instance of the Directory Type to be verified. */ + uint16_t dir_ext; + /* + * The Directory Entry Extension flags. The "UPDATE" extension flag must + * be set in this value. A corresponding directory entry with the same + * type and ordinal values but *without* the "UPDATE" extension flag + * must also exist. The other flags of the extension must be identical + * between the active and update entries. + */ + uint16_t unused_0; +} __attribute__((packed)); + +/* Output (16 bytes) */ + +struct hwrm_nvm_verify_update_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint32_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +/* hwrm_nvm_install_update */ +/* + * Description: Install a staged NVM package. A package file must first be + * staged into the "UPDATE" NVM item. This staging is accomplished using the + * nvm_write and/or nvm_modify HWRM commands. + */ +/* Input (24 bytes) */ + +struct hwrm_nvm_install_update_input { + uint16_t req_type; + /* + * This value indicates what type of request this is. The format for the + * rest of the command is determined by this field. + */ + uint16_t cmpl_ring; + /* + * This value indicates the what completion ring the request will be + * optionally completed on. If the value is -1, then no CR completion + * will be generated. Any other value must be a valid CR ring_id value + * for this function. + */ + uint16_t seq_id; + /* This value indicates the command sequence number. */ + uint16_t target_id; + /* + * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids + * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM + */ + uint64_t resp_addr; + /* + * This is the host address where the response will be written when the + * request is complete. This area must be 16B aligned and must be + * cleared to zero before the request is made. + */ + uint32_t install_type; + /* + * Installation type. If the value 3 through 0xffff is used, only + * packaged items with that type value will be installed and conditional + * installation directives for those packaged items will be over-ridden + * (i.e. 'create' or 'replace' will be treated as 'install'). + */ + /* + * Perform a normal package installation. Conditional + * installation directives (e.g. 'create' and 'replace') of + * packaged items will be followed. + */ + #define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_NORMAL UINT32_C(0x0) + /* + * Install all packaged items regardless of installation + * directive (i.e. treat all packaged items as though they have + * an installation directive of 'install'). + */ + #define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_ALL UINT32_C(0xffffffff) + uint32_t unused_0; +} __attribute__((packed)); + +/* Output (24 bytes) */ + +struct hwrm_nvm_install_update_output { + uint16_t error_code; + /* + * Pass/Fail or error type Note: receiver to verify the in parameters, + * and fail the call with an error when appropriate + */ + uint16_t req_type; + /* This field returns the type of original request. */ + uint16_t seq_id; + /* This field provides original sequence number of the command. */ + uint16_t resp_len; + /* + * This field is the length of the response in bytes. The last byte of + * the response is a valid flag that will read as '1' when the command + * has been completely written to memory. + */ + uint64_t installed_items; + /* + * Bit-mask of successfully installed items. Bit-0 corresponding to the + * first packaged item, Bit-1 for the second item, etc. A value of 0 + * indicates that no items were successfully installed. + */ + uint8_t result; + /* result is 8 b */ + /* There was no problem with the package installation. */ + #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_SUCCESS UINT32_C(0x0) + uint8_t problem_item; + /* problem_item is 8 b */ + /* There was no problem with any packaged items. */ + #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_NONE UINT32_C(0x0) + /* There was a problem with the NVM package itself. */ + #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_PACKAGE UINT32_C(0xff) + uint8_t reset_required; + /* reset_required is 8 b */ + /* + * No reset is required for installed/updated firmware or + * microcode to take effect. + */ + #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_NONE UINT32_C(0x0) + /* + * A PCIe reset (e.g. system reboot) is required for newly + * installed/updated firmware or microcode to take effect. + */ + #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_PCI UINT32_C(0x1) + /* + * A controller power reset (e.g. system power-cycle) is + * required for newly installed/updated firmware or microcode to + * take effect. Some newly installed/updated firmware or + * microcode may still take effect upon the next PCIe reset. + */ + #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_POWER UINT32_C(0x2) + uint8_t unused_0; + uint8_t unused_1; + uint8_t unused_2; + uint8_t unused_3; + uint8_t valid; + /* + * This field is used in Output records to indicate that the output is + * completely written to RAM. This field should be read as '1' to + * indicate that the output has been completely written. When writing a + * command completion or response to an internal processor, the order of + * writes has to be such that this field is written last. + */ +} __attribute__((packed)); + +#endif /* _HSI_STRUCT_DEF_EXTERNAL_H_ */ diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c new file mode 100644 index 00000000000..71818e77a0a --- /dev/null +++ b/sys/dev/bnxt/if_bnxt.c @@ -0,0 +1,2358 @@ +/*- + * Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2016 Broadcom, All Rights Reserved. + * The term Broadcom refers to Broadcom Limited and/or its subsidiaries + * + * 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include "opt_inet.h" +#include "opt_inet6.h" +#include "opt_rss.h" + +#include "ifdi_if.h" + +#include "bnxt.h" +#include "bnxt_hwrm.h" +#include "bnxt_ioctl.h" +#include "bnxt_sysctl.h" +#include "hsi_struct_def.h" + +/* + * PCI Device ID Table + */ + +static pci_vendor_info_t bnxt_vendor_info_array[] = +{ + PVID(BROADCOM_VENDOR_ID, BCM57301, + "Broadcom BCM57301 NetXtreme-C 10Gb Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57302, + "Broadcom BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57304, + "Broadcom BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57402, + "Broadcom BCM57402 NetXtreme-E 10Gb Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57404, + "Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57406, + "Broadcom BCM57406 NetXtreme-E 10GBase-T Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57402_NPAR, + "Broadcom BCM57402 NetXtreme-E Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57407, + "Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57404_NPAR, + "Broadcom BCM57404 NetXtreme-E Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57406_NPAR, + "Broadcom BCM57406 NetXtreme-E Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57407_SFP, + "Broadcom BCM57407 NetXtreme-E 25Gb Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57304_VF, + "Broadcom BCM57304 NetXtreme-C Virtual Function"), + PVID(BROADCOM_VENDOR_ID, BCM57404_VF, + "Broadcom BCM57404 NetXtreme-E Virtual Function"), + /* required last entry */ + + PVID_END +}; + +/* + * Function prototypes + */ + +static void *bnxt_register(device_t dev); + +/* Soft queue setup and teardown */ +static int bnxt_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, + uint64_t *paddrs, int ntxqs, int ntxqsets); +static int bnxt_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, + uint64_t *paddrs, int nrxqs, int nrxqsets); +static void bnxt_queues_free(if_ctx_t ctx); + +/* Device setup and teardown */ +static int bnxt_attach_pre(if_ctx_t ctx); +static int bnxt_attach_post(if_ctx_t ctx); +static int bnxt_detach(if_ctx_t ctx); + +/* Device configuration */ +static void bnxt_init(if_ctx_t ctx); +static void bnxt_stop(if_ctx_t ctx); +static void bnxt_multi_set(if_ctx_t ctx); +static int bnxt_mtu_set(if_ctx_t ctx, uint32_t mtu); +static void bnxt_media_status(if_ctx_t ctx, struct ifmediareq * ifmr); +static int bnxt_media_change(if_ctx_t ctx); +static int bnxt_promisc_set(if_ctx_t ctx, int flags); +static uint64_t bnxt_get_counter(if_ctx_t, ift_counter); +static void bnxt_update_admin_status(if_ctx_t ctx); + +/* Interrupt enable / disable */ +static void bnxt_intr_enable(if_ctx_t ctx); +static int bnxt_queue_intr_enable(if_ctx_t ctx, uint16_t qid); +static void bnxt_disable_intr(if_ctx_t ctx); +static int bnxt_msix_intr_assign(if_ctx_t ctx, int msix); + +/* vlan support */ +static void bnxt_vlan_register(if_ctx_t ctx, uint16_t vtag); +static void bnxt_vlan_unregister(if_ctx_t ctx, uint16_t vtag); + +/* ioctl */ +static int bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data); + +/* Internal support functions */ +static int bnxt_probe_phy(struct bnxt_softc *softc); +static void bnxt_add_media_types(struct bnxt_softc *softc); +static int bnxt_pci_mapping(struct bnxt_softc *softc); +static void bnxt_pci_mapping_free(struct bnxt_softc *softc); +static int bnxt_update_link(struct bnxt_softc *softc, bool chng_link_state); +static int bnxt_handle_def_cp(void *arg); +static int bnxt_handle_rx_cp(void *arg); +static void bnxt_clear_ids(struct bnxt_softc *softc); +static void inline bnxt_do_enable_intr(struct bnxt_cp_ring *cpr); +static void inline bnxt_do_disable_intr(struct bnxt_cp_ring *cpr); +static void bnxt_mark_cpr_invalid(struct bnxt_cp_ring *cpr); +static void bnxt_def_cp_task(void *context); +static void bnxt_handle_async_event(struct bnxt_softc *softc, + struct cmpl_base *cmpl); +static uint8_t get_phy_type(struct bnxt_softc *softc); +static uint64_t bnxt_get_baudrate(struct bnxt_link_info *link); + +/* + * Device Interface Declaration + */ + +static device_method_t bnxt_methods[] = { + /* Device interface */ + DEVMETHOD(device_register, bnxt_register), + DEVMETHOD(device_probe, iflib_device_probe), + DEVMETHOD(device_attach, iflib_device_attach), + DEVMETHOD(device_detach, iflib_device_detach), + DEVMETHOD(device_shutdown, iflib_device_shutdown), + DEVMETHOD(device_suspend, iflib_device_suspend), + DEVMETHOD(device_resume, iflib_device_resume), + DEVMETHOD_END +}; + +static driver_t bnxt_driver = { + "bnxt", bnxt_methods, sizeof(struct bnxt_softc), +}; + +devclass_t bnxt_devclass; +DRIVER_MODULE(bnxt, pci, bnxt_driver, bnxt_devclass, 0, 0); + +MODULE_DEPEND(bnxt, pci, 1, 1, 1); +MODULE_DEPEND(bnxt, ether, 1, 1, 1); +MODULE_DEPEND(bnxt, iflib, 1, 1, 1); + +static device_method_t bnxt_iflib_methods[] = { + DEVMETHOD(ifdi_tx_queues_alloc, bnxt_tx_queues_alloc), + DEVMETHOD(ifdi_rx_queues_alloc, bnxt_rx_queues_alloc), + DEVMETHOD(ifdi_queues_free, bnxt_queues_free), + + DEVMETHOD(ifdi_attach_pre, bnxt_attach_pre), + DEVMETHOD(ifdi_attach_post, bnxt_attach_post), + DEVMETHOD(ifdi_detach, bnxt_detach), + + DEVMETHOD(ifdi_init, bnxt_init), + DEVMETHOD(ifdi_stop, bnxt_stop), + DEVMETHOD(ifdi_multi_set, bnxt_multi_set), + DEVMETHOD(ifdi_mtu_set, bnxt_mtu_set), + DEVMETHOD(ifdi_media_status, bnxt_media_status), + DEVMETHOD(ifdi_media_change, bnxt_media_change), + DEVMETHOD(ifdi_promisc_set, bnxt_promisc_set), + DEVMETHOD(ifdi_get_counter, bnxt_get_counter), + DEVMETHOD(ifdi_update_admin_status, bnxt_update_admin_status), + + DEVMETHOD(ifdi_intr_enable, bnxt_intr_enable), + DEVMETHOD(ifdi_queue_intr_enable, bnxt_queue_intr_enable), + DEVMETHOD(ifdi_intr_disable, bnxt_disable_intr), + DEVMETHOD(ifdi_msix_intr_assign, bnxt_msix_intr_assign), + + DEVMETHOD(ifdi_vlan_register, bnxt_vlan_register), + DEVMETHOD(ifdi_vlan_unregister, bnxt_vlan_unregister), + + DEVMETHOD(ifdi_priv_ioctl, bnxt_priv_ioctl), + + DEVMETHOD_END +}; + +static driver_t bnxt_iflib_driver = { + "bnxt", bnxt_iflib_methods, sizeof(struct bnxt_softc) +}; + +/* + * iflib shared context + */ + +char bnxt_driver_version[] = "https://github.com/Broadcom/freebsd-nxt/commits/bnxt-dev"; +extern struct if_txrx bnxt_txrx; +static struct if_shared_ctx bnxt_sctx_init = { + .isc_magic = IFLIB_MAGIC, + .isc_txrx = &bnxt_txrx, + .isc_driver = &bnxt_iflib_driver, + .isc_nfl = 2, // Number of Free Lists + .isc_flags = IFLIB_HAS_RXCQ | IFLIB_HAS_TXCQ, + .isc_q_align = PAGE_SIZE, + .isc_tx_maxsize = BNXT_TSO_SIZE, + .isc_tx_maxsegsize = BNXT_TSO_SIZE, + .isc_rx_maxsize = BNXT_TSO_SIZE, + .isc_rx_maxsegsize = BNXT_TSO_SIZE, + + // Only use a single segment to avoid page size constraints + .isc_rx_nsegments = 1, + .isc_ntxqs = 2, + .isc_nrxqs = 3, + .isc_nrxd_min = {16, 16, 16}, + .isc_nrxd_default = {PAGE_SIZE / sizeof(struct cmpl_base) * 8, + PAGE_SIZE / sizeof(struct rx_prod_pkt_bd), + PAGE_SIZE / sizeof(struct rx_prod_pkt_bd)}, + .isc_nrxd_max = {INT32_MAX, INT32_MAX, INT32_MAX}, + .isc_ntxd_min = {16, 16, 16}, + .isc_ntxd_default = {PAGE_SIZE / sizeof(struct cmpl_base) * 2, + PAGE_SIZE / sizeof(struct tx_bd_short)}, + .isc_ntxd_max = {INT32_MAX, INT32_MAX, INT32_MAX}, + + .isc_admin_intrcnt = 1, + .isc_vendor_info = bnxt_vendor_info_array, + .isc_driver_version = bnxt_driver_version, +}; + +if_shared_ctx_t bnxt_sctx = &bnxt_sctx_init; + +/* + * Device Methods + */ + +static void * +bnxt_register(device_t dev) +{ + return bnxt_sctx; +} + +/* + * Device Dependent Configuration Functions +*/ + +/* Soft queue setup and teardown */ +static int +bnxt_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, + uint64_t *paddrs, int ntxqs, int ntxqsets) +{ + struct bnxt_softc *softc; + int i; + int rc; + + softc = iflib_get_softc(ctx); + + softc->tx_cp_rings = malloc(sizeof(struct bnxt_cp_ring) * ntxqsets, + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!softc->tx_cp_rings) { + device_printf(iflib_get_dev(ctx), + "unable to allocate TX completion rings\n"); + rc = ENOMEM; + goto cp_alloc_fail; + } + softc->tx_rings = malloc(sizeof(struct bnxt_ring) * ntxqsets, + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!softc->tx_rings) { + device_printf(iflib_get_dev(ctx), + "unable to allocate TX rings\n"); + rc = ENOMEM; + goto ring_alloc_fail; + } + rc = iflib_dma_alloc(ctx, sizeof(struct ctx_hw_stats) * ntxqsets, + &softc->tx_stats, 0); + if (rc) + goto dma_alloc_fail; + bus_dmamap_sync(softc->tx_stats.idi_tag, softc->tx_stats.idi_map, + BUS_DMASYNC_PREREAD); + + for (i = 0; i < ntxqsets; i++) { + /* Set up the completion ring */ + softc->tx_cp_rings[i].stats_ctx_id = HWRM_NA_SIGNATURE; + softc->tx_cp_rings[i].ring.phys_id = + (uint16_t)HWRM_NA_SIGNATURE; + softc->tx_cp_rings[i].ring.softc = softc; + softc->tx_cp_rings[i].ring.id = + (softc->scctx->isc_nrxqsets * 2) + 1 + i; + softc->tx_cp_rings[i].ring.doorbell = + softc->tx_cp_rings[i].ring.id * 0x80; + softc->tx_cp_rings[i].ring.ring_size = + softc->scctx->isc_ntxd[0]; + softc->tx_cp_rings[i].ring.vaddr = vaddrs[i * ntxqs]; + softc->tx_cp_rings[i].ring.paddr = paddrs[i * ntxqs]; + + /* Set up the TX ring */ + softc->tx_rings[i].phys_id = (uint16_t)HWRM_NA_SIGNATURE; + softc->tx_rings[i].softc = softc; + softc->tx_rings[i].id = + (softc->scctx->isc_nrxqsets * 2) + 1 + i; + softc->tx_rings[i].doorbell = softc->tx_rings[i].id * 0x80; + softc->tx_rings[i].ring_size = softc->scctx->isc_ntxd[1]; + softc->tx_rings[i].vaddr = vaddrs[i * ntxqs + 1]; + softc->tx_rings[i].paddr = paddrs[i * ntxqs + 1]; + + bnxt_create_tx_sysctls(softc, i); + } + + softc->ntxqsets = ntxqsets; + return rc; + +dma_alloc_fail: + free(softc->tx_rings, M_DEVBUF); +ring_alloc_fail: + free(softc->tx_cp_rings, M_DEVBUF); +cp_alloc_fail: + return rc; +} + +static void +bnxt_queues_free(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + + // Free TX queues + iflib_dma_free(&softc->tx_stats); + free(softc->tx_rings, M_DEVBUF); + softc->tx_rings = NULL; + free(softc->tx_cp_rings, M_DEVBUF); + softc->tx_cp_rings = NULL; + softc->ntxqsets = 0; + + // Free RX queues + iflib_dma_free(&softc->rx_stats); + free(softc->grp_info, M_DEVBUF); + free(softc->ag_rings, M_DEVBUF); + free(softc->rx_rings, M_DEVBUF); + free(softc->rx_cp_rings, M_DEVBUF); +} + +static int +bnxt_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, + uint64_t *paddrs, int nrxqs, int nrxqsets) +{ + struct bnxt_softc *softc; + int i; + int rc; + + softc = iflib_get_softc(ctx); + + softc->rx_cp_rings = malloc(sizeof(struct bnxt_cp_ring) * nrxqsets, + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!softc->rx_cp_rings) { + device_printf(iflib_get_dev(ctx), + "unable to allocate RX completion rings\n"); + rc = ENOMEM; + goto cp_alloc_fail; + } + softc->rx_rings = malloc(sizeof(struct bnxt_ring) * nrxqsets, + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!softc->rx_rings) { + device_printf(iflib_get_dev(ctx), + "unable to allocate RX rings\n"); + rc = ENOMEM; + goto ring_alloc_fail; + } + softc->ag_rings = malloc(sizeof(struct bnxt_ring) * nrxqsets, + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!softc->ag_rings) { + device_printf(iflib_get_dev(ctx), + "unable to allocate aggregation rings\n"); + rc = ENOMEM; + goto ag_alloc_fail; + } + softc->grp_info = malloc(sizeof(struct bnxt_grp_info) * nrxqsets, + M_DEVBUF, M_NOWAIT | M_ZERO); + if (!softc->grp_info) { + device_printf(iflib_get_dev(ctx), + "unable to allocate ring groups\n"); + rc = ENOMEM; + goto grp_alloc_fail; + } + + rc = iflib_dma_alloc(ctx, sizeof(struct ctx_hw_stats) * nrxqsets, + &softc->rx_stats, 0); + if (rc) + goto hw_stats_alloc_fail; + bus_dmamap_sync(softc->rx_stats.idi_tag, softc->rx_stats.idi_map, + BUS_DMASYNC_PREREAD); + + for (i = 0; i < nrxqsets; i++) { + /* Allocation the completion ring */ + softc->rx_cp_rings[i].stats_ctx_id = HWRM_NA_SIGNATURE; + softc->rx_cp_rings[i].ring.phys_id = + (uint16_t)HWRM_NA_SIGNATURE; + softc->rx_cp_rings[i].ring.softc = softc; + softc->rx_cp_rings[i].ring.id = i + 1; + softc->rx_cp_rings[i].ring.doorbell = + softc->rx_cp_rings[i].ring.id * 0x80; + /* + * If this ring overflows, RX stops working. + */ + softc->rx_cp_rings[i].ring.ring_size = + softc->scctx->isc_nrxd[0]; + softc->rx_cp_rings[i].ring.vaddr = vaddrs[i * nrxqs]; + softc->rx_cp_rings[i].ring.paddr = paddrs[i * nrxqs]; + + /* Allocate the RX ring */ + softc->rx_rings[i].phys_id = (uint16_t)HWRM_NA_SIGNATURE; + softc->rx_rings[i].softc = softc; + softc->rx_rings[i].id = i + 1; + softc->rx_rings[i].doorbell = softc->rx_rings[i].id * 0x80; + softc->rx_rings[i].ring_size = softc->scctx->isc_nrxd[1]; + softc->rx_rings[i].vaddr = vaddrs[i * nrxqs + 1]; + softc->rx_rings[i].paddr = paddrs[i * nrxqs + 1]; + + /* Allocate the AG ring */ + softc->ag_rings[i].phys_id = (uint16_t)HWRM_NA_SIGNATURE; + softc->ag_rings[i].softc = softc; + softc->ag_rings[i].id = nrxqsets + i + 1; + softc->ag_rings[i].doorbell = softc->ag_rings[i].id * 0x80; + softc->ag_rings[i].ring_size = softc->scctx->isc_nrxd[2]; + softc->ag_rings[i].vaddr = vaddrs[i * nrxqs + 2]; + softc->ag_rings[i].paddr = paddrs[i * nrxqs + 2]; + + /* Allocate the ring group */ + softc->grp_info[i].grp_id = (uint16_t)HWRM_NA_SIGNATURE; + softc->grp_info[i].stats_ctx = + softc->rx_cp_rings[i].stats_ctx_id; + softc->grp_info[i].rx_ring_id = softc->rx_rings[i].phys_id; + softc->grp_info[i].ag_ring_id = softc->ag_rings[i].phys_id; + softc->grp_info[i].cp_ring_id = + softc->rx_cp_rings[i].ring.phys_id; + + bnxt_create_rx_sysctls(softc, i); + } + + /* And finally, the VNIC */ + softc->vnic_info.id = (uint16_t)HWRM_NA_SIGNATURE; + softc->vnic_info.flow_id = (uint16_t)HWRM_NA_SIGNATURE; + softc->vnic_info.filter_id = -1; + softc->vnic_info.def_ring_grp = (uint16_t)HWRM_NA_SIGNATURE; + softc->vnic_info.cos_rule = (uint16_t)HWRM_NA_SIGNATURE; + softc->vnic_info.lb_rule = (uint16_t)HWRM_NA_SIGNATURE; + softc->vnic_info.rx_mask = HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST; + softc->vnic_info.mc_list_count = 0; + softc->vnic_info.flags = BNXT_VNIC_FLAG_DEFAULT; + rc = iflib_dma_alloc(ctx, BNXT_MAX_MC_ADDRS * ETHER_ADDR_LEN, + &softc->vnic_info.mc_list, 0); + if (rc) + goto mc_list_alloc_fail; + + /* The VNIC RSS Hash Key */ + rc = iflib_dma_alloc(ctx, HW_HASH_KEY_SIZE, + &softc->vnic_info.rss_hash_key_tbl, 0); + if (rc) + goto rss_hash_alloc_fail; + bus_dmamap_sync(softc->vnic_info.rss_hash_key_tbl.idi_tag, + softc->vnic_info.rss_hash_key_tbl.idi_map, + BUS_DMASYNC_PREWRITE); + memcpy(softc->vnic_info.rss_hash_key_tbl.idi_vaddr, + softc->vnic_info.rss_hash_key, HW_HASH_KEY_SIZE); + + /* Allocate the RSS tables */ + rc = iflib_dma_alloc(ctx, HW_HASH_INDEX_SIZE * sizeof(uint16_t), + &softc->vnic_info.rss_grp_tbl, 0); + if (rc) + goto rss_grp_alloc_fail; + bus_dmamap_sync(softc->vnic_info.rss_grp_tbl.idi_tag, + softc->vnic_info.rss_grp_tbl.idi_map, + BUS_DMASYNC_PREWRITE); + memset(softc->vnic_info.rss_grp_tbl.idi_vaddr, 0xff, + softc->vnic_info.rss_grp_tbl.idi_size); + + softc->nrxqsets = nrxqsets; + return rc; + +rss_grp_alloc_fail: + iflib_dma_free(&softc->vnic_info.rss_hash_key_tbl); +rss_hash_alloc_fail: + iflib_dma_free(&softc->vnic_info.mc_list); +mc_list_alloc_fail: + iflib_dma_free(&softc->rx_stats); +hw_stats_alloc_fail: + free(softc->grp_info, M_DEVBUF); +grp_alloc_fail: + free(softc->ag_rings, M_DEVBUF); +ag_alloc_fail: + free(softc->rx_rings, M_DEVBUF); +ring_alloc_fail: + free(softc->rx_cp_rings, M_DEVBUF); +cp_alloc_fail: + return rc; +} + +/* Device setup and teardown */ +static int +bnxt_attach_pre(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + if_softc_ctx_t scctx; + int rc = 0; + + softc->ctx = ctx; + softc->dev = iflib_get_dev(ctx); + softc->media = iflib_get_media(ctx); + softc->scctx = iflib_get_softc_ctx(ctx); + softc->sctx = iflib_get_sctx(ctx); + scctx = softc->scctx; + + switch (softc->sctx->isc_vendor_info->pvi_device_id) { + case BCM57402_NPAR: + case BCM57404_NPAR: + case BCM57406_NPAR: + softc->flags |= BNXT_FLAG_NPAR; + break; + case BCM57304_VF: + case BCM57404_VF: + softc->flags |= BNXT_FLAG_VF; + break; + } + + pci_enable_busmaster(softc->dev); + + if (bnxt_pci_mapping(softc)) + return (ENXIO); + + /* HWRM setup/init */ + BNXT_HWRM_LOCK_INIT(softc, device_get_nameunit(softc->dev)); + rc = bnxt_alloc_hwrm_dma_mem(softc); + if (rc) + goto dma_fail; + + /* Allocate the TPA start buffer */ + softc->tpa_start = malloc(sizeof(struct bnxt_full_tpa_start) * + (RX_TPA_START_CMPL_AGG_ID_MASK >> RX_TPA_START_CMPL_AGG_ID_SFT), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (softc->tpa_start == NULL) { + rc = ENOMEM; + device_printf(softc->dev, + "Unable to allocate space for TPA\n"); + goto tpa_failed; + } + + /* Get firmware version and compare with driver */ + softc->ver_info = malloc(sizeof(struct bnxt_ver_info), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (softc->ver_info == NULL) { + rc = ENOMEM; + device_printf(softc->dev, + "Unable to allocate space for version info\n"); + goto ver_alloc_fail; + } + /* Default minimum required HWRM version */ + softc->ver_info->hwrm_min_major = 1; + softc->ver_info->hwrm_min_minor = 2; + softc->ver_info->hwrm_min_update = 2; + + rc = bnxt_hwrm_ver_get(softc); + if (rc) { + device_printf(softc->dev, "attach: hwrm ver get failed\n"); + goto ver_fail; + } + + /* Get NVRAM info */ + softc->nvm_info = malloc(sizeof(struct bnxt_nvram_info), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (softc->nvm_info == NULL) { + rc = ENOMEM; + device_printf(softc->dev, + "Unable to allocate space for NVRAM info\n"); + goto nvm_alloc_fail; + } + rc = bnxt_hwrm_nvm_get_dev_info(softc, &softc->nvm_info->mfg_id, + &softc->nvm_info->device_id, &softc->nvm_info->sector_size, + &softc->nvm_info->size, &softc->nvm_info->reserved_size, + &softc->nvm_info->available_size); + + /* Register the driver with the FW */ + rc = bnxt_hwrm_func_drv_rgtr(softc); + if (rc) { + device_printf(softc->dev, "attach: hwrm drv rgtr failed\n"); + goto drv_rgtr_fail; + } + + /* Get the HW capabilities */ + rc = bnxt_hwrm_func_qcaps(softc); + if (rc) + goto failed; + iflib_set_mac(ctx, softc->func.mac_addr); + + /* Get the queue config */ + rc = bnxt_hwrm_queue_qportcfg(softc); + if (rc) { + device_printf(softc->dev, "attach: hwrm qportcfg failed\n"); + goto failed; + } + + /* Now perform a function reset */ + rc = bnxt_hwrm_func_reset(softc); + bnxt_clear_ids(softc); + if (rc) + goto failed; + + /* Now set up iflib sc */ + scctx->isc_tx_nsegments = 31, + scctx->isc_tx_tso_segments_max = 31; + scctx->isc_tx_tso_size_max = BNXT_TSO_SIZE; + scctx->isc_tx_tso_segsize_max = BNXT_TSO_SIZE; + scctx->isc_vectors = softc->func.max_cp_rings; + if (scctx->isc_nrxd[0] < + ((scctx->isc_nrxd[1] * 4) + scctx->isc_nrxd[2])) + device_printf(softc->dev, + "WARNING: nrxd0 (%d) should be at least 4 * nrxd1 (%d) + nrxd2 (%d). Driver may be unstable\n", + scctx->isc_nrxd[0], scctx->isc_nrxd[1], scctx->isc_nrxd[2]); + if (scctx->isc_ntxd[0] < scctx->isc_ntxd[1] * 2) + device_printf(softc->dev, + "WARNING: ntxd0 (%d) should be at least 2 * ntxd1 (%d). Driver may be unstable\n", + scctx->isc_ntxd[0], scctx->isc_ntxd[1]); + scctx->isc_txqsizes[0] = sizeof(struct cmpl_base) * scctx->isc_ntxd[0]; + scctx->isc_txqsizes[1] = sizeof(struct tx_bd_short) * + scctx->isc_ntxd[1]; + scctx->isc_rxqsizes[0] = sizeof(struct cmpl_base) * scctx->isc_nrxd[0]; + scctx->isc_rxqsizes[1] = sizeof(struct rx_prod_pkt_bd) * + scctx->isc_nrxd[1]; + scctx->isc_rxqsizes[2] = sizeof(struct rx_prod_pkt_bd) * + scctx->isc_nrxd[2]; + scctx->isc_max_rxqsets = min(pci_msix_count(softc->dev)-1, + softc->func.max_cp_rings - 1); + scctx->isc_max_rxqsets = min(scctx->isc_max_rxqsets, + softc->func.max_rx_rings); + scctx->isc_max_txqsets = min(softc->func.max_rx_rings, + softc->func.max_cp_rings - scctx->isc_max_rxqsets - 1); + scctx->isc_rss_table_size = HW_HASH_INDEX_SIZE; + scctx->isc_rss_table_mask = scctx->isc_rss_table_size - 1; + + /* iflib will map and release this bar */ + scctx->isc_msix_bar = pci_msix_table_bar(softc->dev); + + /* Allocate the default completion ring */ + softc->def_cp_ring.stats_ctx_id = HWRM_NA_SIGNATURE; + softc->def_cp_ring.ring.phys_id = (uint16_t)HWRM_NA_SIGNATURE; + softc->def_cp_ring.ring.softc = softc; + softc->def_cp_ring.ring.id = 0; + softc->def_cp_ring.ring.doorbell = softc->def_cp_ring.ring.id * 0x80; + softc->def_cp_ring.ring.ring_size = PAGE_SIZE / + sizeof(struct cmpl_base); + rc = iflib_dma_alloc(ctx, + sizeof(struct cmpl_base) * softc->def_cp_ring.ring.ring_size, + &softc->def_cp_ring_mem, 0); + softc->def_cp_ring.ring.vaddr = softc->def_cp_ring_mem.idi_vaddr; + softc->def_cp_ring.ring.paddr = softc->def_cp_ring_mem.idi_paddr; + iflib_config_gtask_init(ctx, &softc->def_cp_task, bnxt_def_cp_task, + "dflt_cp"); + + rc = bnxt_init_sysctl_ctx(softc); + if (rc) + goto init_sysctl_failed; + rc = bnxt_create_nvram_sysctls(softc->nvm_info); + if (rc) + goto failed; + + arc4rand(softc->vnic_info.rss_hash_key, HW_HASH_KEY_SIZE, 0); + softc->vnic_info.rss_hash_type = + HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4 | + HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4 | + HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV4 | + HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6 | + HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6 | + HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6; + rc = bnxt_create_config_sysctls_pre(softc); + if (rc) + goto failed; + + /* Initialize the vlan list */ + SLIST_INIT(&softc->vnic_info.vlan_tags); + softc->vnic_info.vlan_tag_list.idi_vaddr = NULL; + + return (rc); + +failed: + bnxt_free_sysctl_ctx(softc); +init_sysctl_failed: + bnxt_hwrm_func_drv_unrgtr(softc, false); +drv_rgtr_fail: + free(softc->nvm_info, M_DEVBUF); +nvm_alloc_fail: +ver_fail: + free(softc->ver_info, M_DEVBUF); +ver_alloc_fail: + free(softc->tpa_start, M_DEVBUF); +tpa_failed: + bnxt_free_hwrm_dma_mem(softc); +dma_fail: + BNXT_HWRM_LOCK_DESTROY(softc); + bnxt_pci_mapping_free(softc); + pci_disable_busmaster(softc->dev); + return (rc); +} + +static int +bnxt_attach_post(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + if_t ifp = iflib_get_ifp(ctx); + int capabilities, enabling; + int rc; + + bnxt_create_config_sysctls_post(softc); + + /* Update link state etc... */ + rc = bnxt_probe_phy(softc); + if (rc) + goto failed; + + /* Needs to be done after probing the phy */ + bnxt_create_ver_sysctls(softc); + bnxt_add_media_types(softc); + ifmedia_set(softc->media, IFM_ETHER | IFM_AUTO); + + if_sethwassist(ifp, (CSUM_TCP | CSUM_UDP | CSUM_TCP_IPV6 | + CSUM_UDP_IPV6 | CSUM_TSO)); + + capabilities = + /* These are translated to hwassit bits */ + IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | IFCAP_TSO4 | IFCAP_TSO6 | + /* These are checked by iflib */ + IFCAP_LRO | IFCAP_VLAN_HWFILTER | + /* These are part of the iflib mask */ + IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_VLAN_MTU | + IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | + /* These likely get lost... */ + IFCAP_VLAN_HWCSUM | IFCAP_JUMBO_MTU; + + if_setcapabilities(ifp, capabilities); + + enabling = capabilities; + + if_setcapenable(ifp, enabling); + + softc->scctx->isc_max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + + ETHER_CRC_LEN; + +failed: + return rc; +} + +static int +bnxt_detach(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + struct bnxt_vlan_tag *tag; + struct bnxt_vlan_tag *tmp; + int i; + + bnxt_do_disable_intr(&softc->def_cp_ring); + bnxt_free_sysctl_ctx(softc); + bnxt_hwrm_func_reset(softc); + bnxt_clear_ids(softc); + iflib_irq_free(ctx, &softc->def_cp_ring.irq); + iflib_config_gtask_deinit(&softc->def_cp_task); + /* We need to free() these here... */ + for (i = softc->nrxqsets-1; i>=0; i--) { + iflib_irq_free(ctx, &softc->rx_cp_rings[i].irq); + } + iflib_dma_free(&softc->vnic_info.mc_list); + iflib_dma_free(&softc->vnic_info.rss_hash_key_tbl); + iflib_dma_free(&softc->vnic_info.rss_grp_tbl); + if (softc->vnic_info.vlan_tag_list.idi_vaddr) + iflib_dma_free(&softc->vnic_info.vlan_tag_list); + SLIST_FOREACH_SAFE(tag, &softc->vnic_info.vlan_tags, next, tmp) + free(tag, M_DEVBUF); + iflib_dma_free(&softc->def_cp_ring_mem); + free(softc->tpa_start, M_DEVBUF); + free(softc->ver_info, M_DEVBUF); + free(softc->nvm_info, M_DEVBUF); + + bnxt_hwrm_func_drv_unrgtr(softc, false); + bnxt_free_hwrm_dma_mem(softc); + BNXT_HWRM_LOCK_DESTROY(softc); + + pci_disable_busmaster(softc->dev); + bnxt_pci_mapping_free(softc); + + return 0; +} + +/* Device configuration */ +static void +bnxt_init(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + int i, j; + int rc; + + rc = bnxt_hwrm_func_reset(softc); + if (rc) + return; + bnxt_clear_ids(softc); + + /* Allocate the default completion ring */ + softc->def_cp_ring.cons = UINT32_MAX; + softc->def_cp_ring.v_bit = 1; + bnxt_mark_cpr_invalid(&softc->def_cp_ring); + rc = bnxt_hwrm_ring_alloc(softc, + HWRM_RING_ALLOC_INPUT_RING_TYPE_CMPL, + &softc->def_cp_ring.ring, + (uint16_t)HWRM_NA_SIGNATURE, + HWRM_NA_SIGNATURE, true); + if (rc) + goto fail; + + /* And now set the default CP ring as the async CP ring */ + rc = bnxt_hwrm_func_cfg(softc); + if (rc) + goto fail; + + for (i = 0; i < softc->nrxqsets; i++) { + /* Allocate the statistics context */ + rc = bnxt_hwrm_stat_ctx_alloc(softc, &softc->rx_cp_rings[i], + softc->rx_stats.idi_paddr + + (sizeof(struct ctx_hw_stats) * i)); + if (rc) + goto fail; + + /* Allocate the completion ring */ + softc->rx_cp_rings[i].cons = UINT32_MAX; + softc->rx_cp_rings[i].v_bit = 1; + softc->rx_cp_rings[i].last_idx = UINT32_MAX; + bnxt_mark_cpr_invalid(&softc->rx_cp_rings[i]); + rc = bnxt_hwrm_ring_alloc(softc, + HWRM_RING_ALLOC_INPUT_RING_TYPE_CMPL, + &softc->rx_cp_rings[i].ring, (uint16_t)HWRM_NA_SIGNATURE, + HWRM_NA_SIGNATURE, true); + if (rc) + goto fail; + + /* Allocate the RX ring */ + rc = bnxt_hwrm_ring_alloc(softc, + HWRM_RING_ALLOC_INPUT_RING_TYPE_RX, + &softc->rx_rings[i], (uint16_t)HWRM_NA_SIGNATURE, + HWRM_NA_SIGNATURE, false); + if (rc) + goto fail; + BNXT_RX_DB(&softc->rx_rings[i], 0); + /* TODO: Cumulus+ doesn't need the double doorbell */ + BNXT_RX_DB(&softc->rx_rings[i], 0); + + /* Allocate the AG ring */ + rc = bnxt_hwrm_ring_alloc(softc, + HWRM_RING_ALLOC_INPUT_RING_TYPE_RX, + &softc->ag_rings[i], (uint16_t)HWRM_NA_SIGNATURE, + HWRM_NA_SIGNATURE, false); + if (rc) + goto fail; + BNXT_RX_DB(&softc->rx_rings[i], 0); + /* TODO: Cumulus+ doesn't need the double doorbell */ + BNXT_RX_DB(&softc->ag_rings[i], 0); + + /* Allocate the ring group */ + softc->grp_info[i].stats_ctx = + softc->rx_cp_rings[i].stats_ctx_id; + softc->grp_info[i].rx_ring_id = softc->rx_rings[i].phys_id; + softc->grp_info[i].ag_ring_id = softc->ag_rings[i].phys_id; + softc->grp_info[i].cp_ring_id = + softc->rx_cp_rings[i].ring.phys_id; + rc = bnxt_hwrm_ring_grp_alloc(softc, &softc->grp_info[i]); + if (rc) + goto fail; + + } + + /* Allocate the VNIC RSS context */ + rc = bnxt_hwrm_vnic_ctx_alloc(softc, &softc->vnic_info.rss_id); + if (rc) + goto fail; + + /* Allocate the vnic */ + softc->vnic_info.def_ring_grp = softc->grp_info[0].grp_id; + softc->vnic_info.mru = softc->scctx->isc_max_frame_size; + rc = bnxt_hwrm_vnic_alloc(softc, &softc->vnic_info); + if (rc) + goto fail; + rc = bnxt_hwrm_vnic_cfg(softc, &softc->vnic_info); + if (rc) + goto fail; + rc = bnxt_hwrm_set_filter(softc, &softc->vnic_info); + if (rc) + goto fail; + + /* Enable RSS on the VNICs */ + for (i = 0, j = 0; i < HW_HASH_INDEX_SIZE; i++) { + ((uint16_t *) + softc->vnic_info.rss_grp_tbl.idi_vaddr)[i] = + htole16(softc->grp_info[j].grp_id); + if (++j == softc->nrxqsets) + j = 0; + } + + rc = bnxt_hwrm_rss_cfg(softc, &softc->vnic_info, + softc->vnic_info.rss_hash_type); + if (rc) + goto fail; + +#ifdef notyet + /* Enable LRO/TPA/GRO */ + rc = bnxt_hwrm_vnic_tpa_cfg(softc, &softc->vnic_info, + (if_getcapenable(iflib_get_ifp(ctx)) & IFCAP_LRO) ? + HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA : 0); + if (rc) + goto fail; +#endif + + for (i = 0; i < softc->ntxqsets; i++) { + /* Allocate the statistics context */ + rc = bnxt_hwrm_stat_ctx_alloc(softc, &softc->tx_cp_rings[i], + softc->tx_stats.idi_paddr + + (sizeof(struct ctx_hw_stats) * i)); + if (rc) + goto fail; + + /* Allocate the completion ring */ + softc->tx_cp_rings[i].cons = UINT32_MAX; + softc->tx_cp_rings[i].v_bit = 1; + bnxt_mark_cpr_invalid(&softc->tx_cp_rings[i]); + rc = bnxt_hwrm_ring_alloc(softc, + HWRM_RING_ALLOC_INPUT_RING_TYPE_CMPL, + &softc->tx_cp_rings[i].ring, (uint16_t)HWRM_NA_SIGNATURE, + HWRM_NA_SIGNATURE, false); + if (rc) + goto fail; + + /* Allocate the TX ring */ + rc = bnxt_hwrm_ring_alloc(softc, + HWRM_RING_ALLOC_INPUT_RING_TYPE_TX, + &softc->tx_rings[i], softc->tx_cp_rings[i].ring.phys_id, + softc->tx_cp_rings[i].stats_ctx_id, false); + if (rc) + goto fail; + BNXT_TX_DB(&softc->tx_rings[i], 0); + /* TODO: Cumulus+ doesn't need the double doorbell */ + BNXT_TX_DB(&softc->tx_rings[i], 0); + } + + bnxt_do_enable_intr(&softc->def_cp_ring); + return; + +fail: + bnxt_hwrm_func_reset(softc); + bnxt_clear_ids(softc); + return; +} + +static void +bnxt_stop(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + + bnxt_do_disable_intr(&softc->def_cp_ring); + bnxt_hwrm_func_reset(softc); + bnxt_clear_ids(softc); + return; +} + +static void +bnxt_multi_set(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + if_t ifp = iflib_get_ifp(ctx); + uint8_t *mta; + int cnt, mcnt; + + mcnt = if_multiaddr_count(ifp, -1); + + if (mcnt > BNXT_MAX_MC_ADDRS) { + softc->vnic_info.rx_mask |= + HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST; + bnxt_hwrm_cfa_l2_set_rx_mask(softc, &softc->vnic_info); + } + else { + softc->vnic_info.rx_mask &= + ~HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST; + mta = softc->vnic_info.mc_list.idi_vaddr; + bzero(mta, softc->vnic_info.mc_list.idi_size); + if_multiaddr_array(ifp, mta, &cnt, mcnt); + bus_dmamap_sync(softc->vnic_info.mc_list.idi_tag, + softc->vnic_info.mc_list.idi_map, BUS_DMASYNC_PREWRITE); + softc->vnic_info.mc_list_count = cnt; + softc->vnic_info.rx_mask |= + HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST; + if (bnxt_hwrm_cfa_l2_set_rx_mask(softc, &softc->vnic_info)) + device_printf(softc->dev, + "set_multi: rx_mask set failed\n"); + } +} + +static int +bnxt_mtu_set(if_ctx_t ctx, uint32_t mtu) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + + if (mtu > BNXT_MAX_MTU) + return EINVAL; + + softc->scctx->isc_max_frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + return 0; +} + +static void +bnxt_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + struct bnxt_link_info *link_info = &softc->link_info; + uint8_t phy_type = get_phy_type(softc); + + bnxt_update_link(softc, true); + + ifmr->ifm_status = IFM_AVALID; + ifmr->ifm_active = IFM_ETHER; + + if (link_info->link_up) + ifmr->ifm_status |= IFM_ACTIVE; + else + ifmr->ifm_status &= ~IFM_ACTIVE; + + if (link_info->duplex == HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_FULL) + ifmr->ifm_active |= IFM_FDX; + else + ifmr->ifm_active |= IFM_HDX; + + switch (link_info->link_speed) { + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB: + ifmr->ifm_active |= IFM_100_T; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_1GB: + switch (phy_type) { + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX: + ifmr->ifm_active |= IFM_1000_KX; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET: + ifmr->ifm_active |= IFM_1000_T; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_SGMIIEXTPHY: + ifmr->ifm_active |= IFM_1000_SGMII; + break; + default: + ifmr->ifm_active |= IFM_UNKNOWN; + break; + } + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2_5GB: + switch (phy_type) { + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX: + ifmr->ifm_active |= IFM_2500_KX; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET: + ifmr->ifm_active |= IFM_2500_T; + break; + default: + ifmr->ifm_active |= IFM_UNKNOWN; + break; + } + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10GB: + switch (phy_type) { + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR: + ifmr->ifm_active |= IFM_10G_CR1; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR: + ifmr->ifm_active |= IFM_10G_KR; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR: + ifmr->ifm_active |= IFM_10G_LR; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASESR: + ifmr->ifm_active |= IFM_10G_SR; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX: + ifmr->ifm_active |= IFM_10G_KX4; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET: + ifmr->ifm_active |= IFM_10G_T; + break; + default: + ifmr->ifm_active |= IFM_UNKNOWN; + break; + } + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_20GB: + ifmr->ifm_active |= IFM_20G_KR2; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_25GB: + switch (phy_type) { + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR: + ifmr->ifm_active |= IFM_25G_CR; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR: + ifmr->ifm_active |= IFM_25G_KR; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASESR: + ifmr->ifm_active |= IFM_25G_SR; + break; + default: + ifmr->ifm_active |= IFM_UNKNOWN; + break; + } + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_40GB: + switch (phy_type) { + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR: + ifmr->ifm_active |= IFM_40G_CR4; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR: + ifmr->ifm_active |= IFM_40G_KR4; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR: + ifmr->ifm_active |= IFM_40G_LR4; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASESR: + ifmr->ifm_active |= IFM_40G_SR4; + break; + default: + ifmr->ifm_active |= IFM_UNKNOWN; + break; + } + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_50GB: + switch (phy_type) { + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR: + ifmr->ifm_active |= IFM_50G_CR2; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR: + ifmr->ifm_active |= IFM_50G_KR2; + break; + default: + ifmr->ifm_active |= IFM_UNKNOWN; + break; + } + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100GB: + switch (phy_type) { + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR: + ifmr->ifm_active |= IFM_100G_CR4; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR: + ifmr->ifm_active |= IFM_100G_KR4; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR: + ifmr->ifm_active |= IFM_100G_LR4; + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASESR: + ifmr->ifm_active |= IFM_100G_SR4; + break; + default: + ifmr->ifm_active |= IFM_UNKNOWN; + break; + } + default: + return; + } + + if (link_info->pause == (HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX | + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX)) + ifmr->ifm_active |= (IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE); + else if (link_info->pause == HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX) + ifmr->ifm_active |= IFM_ETH_TXPAUSE; + else if (link_info->pause == HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX) + ifmr->ifm_active |= IFM_ETH_RXPAUSE; + + bnxt_report_link(softc); + return; +} + +static int +bnxt_media_change(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + struct ifmedia *ifm = iflib_get_media(ctx); + struct ifmediareq ifmr; + int rc; + + if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) + return EINVAL; + + switch (IFM_SUBTYPE(ifm->ifm_media)) { + case IFM_100_T: + softc->link_info.autoneg &= ~BNXT_AUTONEG_SPEED; + softc->link_info.req_link_speed = + HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100MB; + break; + case IFM_1000_KX: + case IFM_1000_T: + case IFM_1000_SGMII: + softc->link_info.autoneg &= ~BNXT_AUTONEG_SPEED; + softc->link_info.req_link_speed = + HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_1GB; + break; + case IFM_2500_KX: + case IFM_2500_T: + softc->link_info.autoneg &= ~BNXT_AUTONEG_SPEED; + softc->link_info.req_link_speed = + HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_2_5GB; + break; + case IFM_10G_CR1: + case IFM_10G_KR: + case IFM_10G_LR: + case IFM_10G_SR: + case IFM_10G_T: + softc->link_info.autoneg &= ~BNXT_AUTONEG_SPEED; + softc->link_info.req_link_speed = + HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_10GB; + break; + case IFM_20G_KR2: + softc->link_info.autoneg &= ~BNXT_AUTONEG_SPEED; + softc->link_info.req_link_speed = + HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_20GB; + break; + case IFM_25G_CR: + case IFM_25G_KR: + case IFM_25G_SR: + softc->link_info.autoneg &= ~BNXT_AUTONEG_SPEED; + softc->link_info.req_link_speed = + HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_25GB; + break; + case IFM_40G_CR4: + case IFM_40G_KR4: + case IFM_40G_LR4: + case IFM_40G_SR4: + softc->link_info.autoneg &= ~BNXT_AUTONEG_SPEED; + softc->link_info.req_link_speed = + HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_40GB; + break; + case IFM_50G_CR2: + case IFM_50G_KR2: + softc->link_info.autoneg &= ~BNXT_AUTONEG_SPEED; + softc->link_info.req_link_speed = + HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB; + break; + case IFM_100G_CR4: + case IFM_100G_KR4: + case IFM_100G_LR4: + case IFM_100G_SR4: + softc->link_info.autoneg &= ~BNXT_AUTONEG_SPEED; + softc->link_info.req_link_speed = + HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB; + break; + default: + device_printf(softc->dev, + "Unsupported media type! Using auto\n"); + /* Fall-through */ + case IFM_AUTO: + // Auto + softc->link_info.autoneg |= BNXT_AUTONEG_SPEED; + break; + } + rc = bnxt_hwrm_set_link_setting(softc, true, true); + bnxt_media_status(softc->ctx, &ifmr); + return rc; +} + +static int +bnxt_promisc_set(if_ctx_t ctx, int flags) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + if_t ifp = iflib_get_ifp(ctx); + int rc; + + if (ifp->if_flags & IFF_ALLMULTI || + if_multiaddr_count(ifp, -1) > BNXT_MAX_MC_ADDRS) + softc->vnic_info.rx_mask |= + HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST; + else + softc->vnic_info.rx_mask &= + ~HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST; + + if (ifp->if_flags & IFF_PROMISC) + softc->vnic_info.rx_mask |= + HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS | + HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN; + else + softc->vnic_info.rx_mask &= + ~(HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS | + HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN); + + rc = bnxt_hwrm_cfa_l2_set_rx_mask(softc, &softc->vnic_info); + + return rc; +} + +static uint64_t +bnxt_get_counter(if_ctx_t ctx, ift_counter cnt) +{ + if_t ifp = iflib_get_ifp(ctx); + + if (cnt < IFCOUNTERS) + return if_get_counter_default(ifp, cnt); + + return 0; +} + +static void +bnxt_update_admin_status(if_ctx_t ctx) +{ + /* TODO: do we need to do anything here? */ + return; +} + +static void inline +bnxt_do_enable_intr(struct bnxt_cp_ring *cpr) +{ + if (cpr->ring.phys_id != (uint16_t)HWRM_NA_SIGNATURE) { + /* First time enabling, do not set index */ + if (cpr->cons == UINT32_MAX) + BNXT_CP_ENABLE_DB(&cpr->ring); + else + BNXT_CP_IDX_ENABLE_DB(&cpr->ring, cpr->cons); + } +} + +static void inline +bnxt_do_disable_intr(struct bnxt_cp_ring *cpr) +{ + if (cpr->ring.phys_id != (uint16_t)HWRM_NA_SIGNATURE) + BNXT_CP_DISABLE_DB(&cpr->ring); +} + +/* Enable all interrupts */ +static void +bnxt_intr_enable(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + int i; + + bnxt_do_enable_intr(&softc->def_cp_ring); + for (i = 0; i < softc->nrxqsets; i++) + bnxt_do_enable_intr(&softc->rx_cp_rings[i]); + + return; +} + +/* Enable interrupt for a single queue */ +static int +bnxt_queue_intr_enable(if_ctx_t ctx, uint16_t qid) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + + bnxt_do_enable_intr(&softc->rx_cp_rings[qid]); + return 0; +} + +/* Disable all interrupts */ +static void +bnxt_disable_intr(if_ctx_t ctx) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + int i; + + /* + * NOTE: These TX interrupts should never get enabled, so don't + * update the index + */ + for (i = 0; i < softc->ntxqsets; i++) + bnxt_do_disable_intr(&softc->tx_cp_rings[i]); + for (i = 0; i < softc->nrxqsets; i++) + bnxt_do_disable_intr(&softc->rx_cp_rings[i]); + + return; +} + +static int +bnxt_msix_intr_assign(if_ctx_t ctx, int msix) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + int rc; + int i; + + rc = iflib_irq_alloc_generic(ctx, &softc->def_cp_ring.irq, + softc->def_cp_ring.ring.id + 1, IFLIB_INTR_ADMIN, + bnxt_handle_def_cp, softc, 0, "def_cp"); + if (rc) { + device_printf(iflib_get_dev(ctx), + "Failed to register default completion ring handler\n"); + return rc; + } + + for (i=0; iscctx->isc_nrxqsets; i++) { + rc = iflib_irq_alloc_generic(ctx, &softc->rx_cp_rings[i].irq, + softc->rx_cp_rings[i].ring.id + 1, IFLIB_INTR_RX, + bnxt_handle_rx_cp, &softc->rx_cp_rings[i], i, "rx_cp"); + if (rc) { + device_printf(iflib_get_dev(ctx), + "Failed to register RX completion ring handler\n"); + i--; + goto fail; + } + } + + for (i=0; iscctx->isc_ntxqsets; i++) + iflib_softirq_alloc_generic(ctx, i + 1, IFLIB_INTR_TX, NULL, i, + "tx_cp"); + + return rc; + +fail: + for (; i>=0; i--) + iflib_irq_free(ctx, &softc->rx_cp_rings[i].irq); + iflib_irq_free(ctx, &softc->def_cp_ring.irq); + return rc; +} + +/* + * We're explicitly allowing duplicates here. They will need to be + * removed as many times as they are added. + */ +static void +bnxt_vlan_register(if_ctx_t ctx, uint16_t vtag) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + struct bnxt_vlan_tag *new_tag; + + new_tag = malloc(sizeof(struct bnxt_vlan_tag), M_DEVBUF, M_NOWAIT); + if (new_tag == NULL) + return; + new_tag->tag = vtag; + new_tag->tpid = 8100; + SLIST_INSERT_HEAD(&softc->vnic_info.vlan_tags, new_tag, next); +}; + +static void +bnxt_vlan_unregister(if_ctx_t ctx, uint16_t vtag) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + struct bnxt_vlan_tag *vlan_tag; + + SLIST_FOREACH(vlan_tag, &softc->vnic_info.vlan_tags, next) { + if (vlan_tag->tag == vtag) { + SLIST_REMOVE(&softc->vnic_info.vlan_tags, vlan_tag, + bnxt_vlan_tag, next); + free(vlan_tag, M_DEVBUF); + break; + } + } +} + +static int +bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data) +{ + struct bnxt_softc *softc = iflib_get_softc(ctx); + struct ifreq *ifr = (struct ifreq *)data; + struct ifreq_buffer *ifbuf = &ifr->ifr_ifru.ifru_buffer; + struct bnxt_ioctl_header *ioh = + (struct bnxt_ioctl_header *)(ifbuf->buffer); + int rc = ENOTSUP; + struct bnxt_ioctl_data *iod = NULL; + + switch (command) { + case SIOCGPRIVATE_0: + if ((rc = priv_check(curthread, PRIV_DRIVER)) != 0) + goto exit; + + iod = malloc(ifbuf->length, M_DEVBUF, M_NOWAIT | M_ZERO); + if (!iod) { + rc = ENOMEM; + goto exit; + } + copyin(ioh, iod, ifbuf->length); + + switch (ioh->type) { + case BNXT_HWRM_NVM_FIND_DIR_ENTRY: + { + struct bnxt_ioctl_hwrm_nvm_find_dir_entry *find = + &iod->find; + + rc = bnxt_hwrm_nvm_find_dir_entry(softc, find->type, + &find->ordinal, find->ext, &find->index, + find->use_index, find->search_opt, + &find->data_length, &find->item_length, + &find->fw_ver); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_NVM_READ: + { + struct bnxt_ioctl_hwrm_nvm_read *rd = &iod->read; + struct iflib_dma_info dma_data; + size_t offset; + size_t remain; + size_t csize; + + /* + * Some HWRM versions can't read more than 0x8000 bytes + */ + rc = iflib_dma_alloc(softc->ctx, + min(rd->length, 0x8000), &dma_data, BUS_DMA_NOWAIT); + if (rc) + break; + for (remain = rd->length, offset = 0; + remain && offset < rd->length; offset += 0x8000) { + csize = min(remain, 0x8000); + rc = bnxt_hwrm_nvm_read(softc, rd->index, + rd->offset + offset, csize, &dma_data); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + break; + } + else { + copyout(dma_data.idi_vaddr, + rd->data + offset, csize); + iod->hdr.rc = 0; + } + remain -= csize; + } + if (iod->hdr.rc == 0) + copyout(iod, ioh, ifbuf->length); + + iflib_dma_free(&dma_data); + rc = 0; + goto exit; + } + case BNXT_HWRM_FW_RESET: + { + struct bnxt_ioctl_hwrm_fw_reset *rst = + &iod->reset; + + rc = bnxt_hwrm_fw_reset(softc, rst->processor, + &rst->selfreset); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_FW_QSTATUS: + { + struct bnxt_ioctl_hwrm_fw_qstatus *qstat = + &iod->status; + + rc = bnxt_hwrm_fw_qstatus(softc, qstat->processor, + &qstat->selfreset); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_NVM_WRITE: + { + struct bnxt_ioctl_hwrm_nvm_write *wr = + &iod->write; + + rc = bnxt_hwrm_nvm_write(softc, wr->data, true, + wr->type, wr->ordinal, wr->ext, wr->attr, + wr->option, wr->data_length, wr->keep, + &wr->item_length, &wr->index); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_NVM_ERASE_DIR_ENTRY: + { + struct bnxt_ioctl_hwrm_nvm_erase_dir_entry *erase = + &iod->erase; + + rc = bnxt_hwrm_nvm_erase_dir_entry(softc, erase->index); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_NVM_GET_DIR_INFO: + { + struct bnxt_ioctl_hwrm_nvm_get_dir_info *info = + &iod->dir_info; + + rc = bnxt_hwrm_nvm_get_dir_info(softc, &info->entries, + &info->entry_length); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_NVM_GET_DIR_ENTRIES: + { + struct bnxt_ioctl_hwrm_nvm_get_dir_entries *get = + &iod->dir_entries; + struct iflib_dma_info dma_data; + + rc = iflib_dma_alloc(softc->ctx, get->max_size, + &dma_data, BUS_DMA_NOWAIT); + if (rc) + break; + rc = bnxt_hwrm_nvm_get_dir_entries(softc, &get->entries, + &get->entry_length, &dma_data); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + copyout(dma_data.idi_vaddr, get->data, + get->entry_length * get->entries); + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + iflib_dma_free(&dma_data); + + rc = 0; + goto exit; + } + case BNXT_HWRM_NVM_VERIFY_UPDATE: + { + struct bnxt_ioctl_hwrm_nvm_verify_update *vrfy = + &iod->verify; + + rc = bnxt_hwrm_nvm_verify_update(softc, vrfy->type, + vrfy->ordinal, vrfy->ext); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_NVM_INSTALL_UPDATE: + { + struct bnxt_ioctl_hwrm_nvm_install_update *inst = + &iod->install; + + rc = bnxt_hwrm_nvm_install_update(softc, + inst->install_type, &inst->installed_items, + &inst->result, &inst->problem_item, + &inst->reset_required); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_NVM_MODIFY: + { + struct bnxt_ioctl_hwrm_nvm_modify *mod = &iod->modify; + + rc = bnxt_hwrm_nvm_modify(softc, mod->index, + mod->offset, mod->data, true, mod->length); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_FW_GET_TIME: + { + struct bnxt_ioctl_hwrm_fw_get_time *gtm = + &iod->get_time; + + rc = bnxt_hwrm_fw_get_time(softc, >m->year, + >m->month, >m->day, >m->hour, >m->minute, + >m->second, >m->millisecond, >m->zone); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + case BNXT_HWRM_FW_SET_TIME: + { + struct bnxt_ioctl_hwrm_fw_set_time *stm = + &iod->set_time; + + rc = bnxt_hwrm_fw_set_time(softc, stm->year, + stm->month, stm->day, stm->hour, stm->minute, + stm->second, stm->millisecond, stm->zone); + if (rc) { + iod->hdr.rc = rc; + copyout(&iod->hdr.rc, &ioh->rc, + sizeof(ioh->rc)); + } + else { + iod->hdr.rc = 0; + copyout(iod, ioh, ifbuf->length); + } + + rc = 0; + goto exit; + } + } + break; + } + +exit: + if (iod) + free(iod, M_DEVBUF); + return rc; +} + +/* + * Support functions + */ +static int +bnxt_probe_phy(struct bnxt_softc *softc) +{ + struct bnxt_link_info *link_info = &softc->link_info; + int rc = 0; + + rc = bnxt_update_link(softc, false); + if (rc) { + device_printf(softc->dev, + "Probe phy can't update link (rc: %x)\n", rc); + return (rc); + } + + /*initialize the ethool setting copy with NVM settings */ + if (link_info->auto_mode != HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE) + link_info->autoneg |= BNXT_AUTONEG_SPEED; + + if (link_info->auto_pause & (HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX | + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX)) { + if (link_info->auto_pause == ( + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX | + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX)) + link_info->autoneg |= BNXT_AUTONEG_FLOW_CTRL; + link_info->req_flow_ctrl = link_info->auto_pause; + } else if (link_info->force_pause & ( + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX | + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX)) { + link_info->req_flow_ctrl = link_info->force_pause; + } + link_info->req_duplex = link_info->duplex_setting; + if (link_info->autoneg & BNXT_AUTONEG_SPEED) + link_info->req_link_speed = link_info->auto_link_speed; + else + link_info->req_link_speed = link_info->force_link_speed; + return (rc); +} + +static void +bnxt_add_media_types(struct bnxt_softc *softc) +{ + struct bnxt_link_info *link_info = &softc->link_info; + uint16_t supported; + uint8_t phy_type = get_phy_type(softc); + + supported = link_info->support_speeds; + + /* Auto is always supported */ + ifmedia_add(softc->media, IFM_ETHER | IFM_AUTO, 0, NULL); + + if (softc->flags & BNXT_FLAG_NPAR) + return; + + switch (phy_type) { + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR: + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_100G_CR4, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_50G_CR2, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_40G_CR4, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_25G_CR, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_10G_CR1, 0, + NULL); + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN: + /* Auto only */ + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR: + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_100G_KR4, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_50G_KR2, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_40G_KR4, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_25G_KR, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_20G_KR2, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_10G_KR, 0, + NULL); + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR: + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_100G_LR4, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_40G_LR4, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_10G_LR, 0, + NULL); + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASESR: + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_100G_SR4, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_40G_SR4, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_25G_SR, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_10G_SR, 0, + NULL); + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX: + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_10G_KX4, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_2500_KX, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_1000_KX, 0, + NULL); + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET: + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE: + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10MB) + ifmedia_add(softc->media, IFM_ETHER | IFM_10_T, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MB) + ifmedia_add(softc->media, IFM_ETHER | IFM_100_T, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_1000_T, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_2500_T, 0, + NULL); + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_10G_T, 0, + NULL); + break; + case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_SGMIIEXTPHY: + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB) + ifmedia_add(softc->media, IFM_ETHER | IFM_1000_SGMII, 0, + NULL); + break; + } + + return; +} + +static int +bnxt_map_bar(struct bnxt_softc *softc, struct bnxt_bar_info *bar, int bar_num, bool shareable) +{ + uint32_t flag; + + if (bar->res != NULL) { + device_printf(softc->dev, "Bar %d already mapped\n", bar_num); + return EDOOFUS; + } + + bar->rid = PCIR_BAR(bar_num); + flag = RF_ACTIVE; + if (shareable) + flag |= RF_SHAREABLE; + + if ((bar->res = + bus_alloc_resource_any(softc->dev, + SYS_RES_MEMORY, + &bar->rid, + flag)) == NULL) { + device_printf(softc->dev, + "PCI BAR%d mapping failure\n", bar_num); + return (ENXIO); + } + bar->tag = rman_get_bustag(bar->res); + bar->handle = rman_get_bushandle(bar->res); + bar->size = rman_get_size(bar->res); + + return 0; +} + +static int +bnxt_pci_mapping(struct bnxt_softc *softc) +{ + int rc; + + rc = bnxt_map_bar(softc, &softc->hwrm_bar, 0, true); + if (rc) + return rc; + + rc = bnxt_map_bar(softc, &softc->doorbell_bar, 2, false); + + return rc; +} + +static void +bnxt_pci_mapping_free(struct bnxt_softc *softc) +{ + if (softc->hwrm_bar.res != NULL) + bus_release_resource(softc->dev, SYS_RES_MEMORY, + softc->hwrm_bar.rid, softc->hwrm_bar.res); + softc->hwrm_bar.res = NULL; + + if (softc->doorbell_bar.res != NULL) + bus_release_resource(softc->dev, SYS_RES_MEMORY, + softc->doorbell_bar.rid, softc->doorbell_bar.res); + softc->doorbell_bar.res = NULL; +} + +static int +bnxt_update_link(struct bnxt_softc *softc, bool chng_link_state) +{ + struct bnxt_link_info *link_info = &softc->link_info; + uint8_t link_up = link_info->link_up; + int rc = 0; + + rc = bnxt_hwrm_port_phy_qcfg(softc); + if (rc) + goto exit; + + /* TODO: need to add more logic to report VF link */ + if (chng_link_state) { + if (link_info->phy_link_status == + HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK) + link_info->link_up = 1; + else + link_info->link_up = 0; + if (link_up != link_info->link_up) + bnxt_report_link(softc); + } else { + /* always link down if not require to update link state */ + link_info->link_up = 0; + } + +exit: + return rc; +} + +void +bnxt_report_link(struct bnxt_softc *softc) +{ + const char *duplex = NULL, *flow_ctrl = NULL; + + if (softc->link_info.link_up == softc->link_info.last_link_up) { + if (!softc->link_info.link_up) + return; + if (softc->link_info.pause == softc->link_info.last_pause && + softc->link_info.duplex == softc->link_info.last_duplex) + return; + } + + if (softc->link_info.link_up) { + if (softc->link_info.duplex == + HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_FULL) + duplex = "full duplex"; + else + duplex = "half duplex"; + if (softc->link_info.pause == ( + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX | + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX)) + flow_ctrl = "FC - receive & transmit"; + else if (softc->link_info.pause == + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX) + flow_ctrl = "FC - transmit"; + else if (softc->link_info.pause == + HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX) + flow_ctrl = "FC - receive"; + else + flow_ctrl = "none"; + iflib_link_state_change(softc->ctx, LINK_STATE_UP, + IF_Gbps(100)); + device_printf(softc->dev, "Link is UP %s, %s\n", duplex, + flow_ctrl); + } else { + iflib_link_state_change(softc->ctx, LINK_STATE_DOWN, + bnxt_get_baudrate(&softc->link_info)); + device_printf(softc->dev, "Link is Down\n"); + } + + softc->link_info.last_link_up = softc->link_info.link_up; + softc->link_info.last_pause = softc->link_info.pause; + softc->link_info.last_duplex = softc->link_info.duplex; +} + +static int +bnxt_handle_rx_cp(void *arg) +{ + struct bnxt_cp_ring *cpr = arg; + + /* Disable further interrupts for this queue */ + BNXT_CP_DISABLE_DB(&cpr->ring); + return FILTER_SCHEDULE_THREAD; +} + +static int +bnxt_handle_def_cp(void *arg) +{ + struct bnxt_softc *softc = arg; + + BNXT_CP_DISABLE_DB(&softc->def_cp_ring.ring); + GROUPTASK_ENQUEUE(&softc->def_cp_task); + return FILTER_HANDLED; +} + +static void +bnxt_clear_ids(struct bnxt_softc *softc) +{ + int i; + + softc->def_cp_ring.stats_ctx_id = HWRM_NA_SIGNATURE; + softc->def_cp_ring.ring.phys_id = (uint16_t)HWRM_NA_SIGNATURE; + for (i = 0; i < softc->ntxqsets; i++) { + softc->tx_cp_rings[i].stats_ctx_id = HWRM_NA_SIGNATURE; + softc->tx_cp_rings[i].ring.phys_id = + (uint16_t)HWRM_NA_SIGNATURE; + softc->tx_rings[i].phys_id = (uint16_t)HWRM_NA_SIGNATURE; + } + for (i = 0; i < softc->nrxqsets; i++) { + softc->rx_cp_rings[i].stats_ctx_id = HWRM_NA_SIGNATURE; + softc->rx_cp_rings[i].ring.phys_id = + (uint16_t)HWRM_NA_SIGNATURE; + softc->rx_rings[i].phys_id = (uint16_t)HWRM_NA_SIGNATURE; + softc->ag_rings[i].phys_id = (uint16_t)HWRM_NA_SIGNATURE; + softc->grp_info[i].grp_id = (uint16_t)HWRM_NA_SIGNATURE; + } + softc->vnic_info.filter_id = -1; + softc->vnic_info.id = (uint16_t)HWRM_NA_SIGNATURE; + softc->vnic_info.rss_id = (uint16_t)HWRM_NA_SIGNATURE; + memset(softc->vnic_info.rss_grp_tbl.idi_vaddr, 0xff, + softc->vnic_info.rss_grp_tbl.idi_size); +} + +static void +bnxt_mark_cpr_invalid(struct bnxt_cp_ring *cpr) +{ + struct cmpl_base *cmp = (void *)cpr->ring.vaddr; + int i; + + for (i = 0; i < cpr->ring.ring_size; i++) + cmp[i].info3_v = !cpr->v_bit; +} + +static void +bnxt_handle_async_event(struct bnxt_softc *softc, struct cmpl_base *cmpl) +{ + struct hwrm_async_event_cmpl *ae = (void *)cmpl; + uint16_t async_id = le16toh(ae->event_id); + struct ifmediareq ifmr; + + switch (async_id) { + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE: + bnxt_media_status(softc->ctx, &ifmr); + break; + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_MTU_CHANGE: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DCB_CONFIG_CHANGE: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_UNLOAD: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_LOAD: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_LOAD: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_FLR: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_MAC_ADDR_CHANGE: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_VF_COMM_STATUS_CHANGE: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE: + case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR: + device_printf(softc->dev, + "Unhandled async completion type %u\n", async_id); + break; + default: + device_printf(softc->dev, + "Unknown async completion type %u\n", async_id); + break; + } +} + +static void +bnxt_def_cp_task(void *context) +{ + if_ctx_t ctx = context; + struct bnxt_softc *softc = iflib_get_softc(ctx); + struct bnxt_cp_ring *cpr = &softc->def_cp_ring; + + /* Handle completions on the default completion ring */ + struct cmpl_base *cmpl; + uint32_t cons = cpr->cons; + bool v_bit = cpr->v_bit; + bool last_v_bit; + uint32_t last_cons; + uint16_t type; + + for (;;) { + last_cons = cons; + last_v_bit = v_bit; + NEXT_CP_CONS_V(&cpr->ring, cons, v_bit); + cmpl = &((struct cmpl_base *)cpr->ring.vaddr)[cons]; + + if (!CMP_VALID(cmpl, v_bit)) + break; + + type = le16toh(cmpl->type) & CMPL_BASE_TYPE_MASK; + switch (type) { + case CMPL_BASE_TYPE_HWRM_ASYNC_EVENT: + bnxt_handle_async_event(softc, cmpl); + break; + case CMPL_BASE_TYPE_TX_L2: + case CMPL_BASE_TYPE_RX_L2: + case CMPL_BASE_TYPE_RX_AGG: + case CMPL_BASE_TYPE_RX_TPA_START: + case CMPL_BASE_TYPE_RX_TPA_END: + case CMPL_BASE_TYPE_STAT_EJECT: + case CMPL_BASE_TYPE_HWRM_DONE: + case CMPL_BASE_TYPE_HWRM_FWD_REQ: + case CMPL_BASE_TYPE_HWRM_FWD_RESP: + case CMPL_BASE_TYPE_CQ_NOTIFICATION: + case CMPL_BASE_TYPE_SRQ_EVENT: + case CMPL_BASE_TYPE_DBQ_EVENT: + case CMPL_BASE_TYPE_QP_EVENT: + case CMPL_BASE_TYPE_FUNC_EVENT: + device_printf(softc->dev, + "Unhandled completion type %u\n", type); + break; + default: + device_printf(softc->dev, + "Unknown completion type %u\n", type); + break; + } + } + + cpr->cons = last_cons; + cpr->v_bit = last_v_bit; + BNXT_CP_IDX_ENABLE_DB(&cpr->ring, cpr->cons); +} + +static uint8_t +get_phy_type(struct bnxt_softc *softc) +{ + struct bnxt_link_info *link_info = &softc->link_info; + uint8_t phy_type = link_info->phy_type; + uint16_t supported; + + if (phy_type != HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN) + return phy_type; + + /* Deduce the phy type from the media type and supported speeds */ + supported = link_info->support_speeds; + + if (link_info->media_type == + HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_TP) + return HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET; + if (link_info->media_type == + HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_DAC) { + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB) + return HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX; + if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB) + return HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR; + return HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR; + } + if (link_info->media_type == + HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_FIBRE) + return HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASESR; + + return phy_type; +} + +bool +bnxt_check_hwrm_version(struct bnxt_softc *softc) +{ + char buf[16]; + + sprintf(buf, "%hhu.%hhu.%hhu", softc->ver_info->hwrm_min_major, + softc->ver_info->hwrm_min_minor, softc->ver_info->hwrm_min_update); + if (softc->ver_info->hwrm_min_major > softc->ver_info->hwrm_if_major) { + device_printf(softc->dev, + "WARNING: HWRM version %s is too old (older than %s)\n", + softc->ver_info->hwrm_if_ver, buf); + return false; + } + else if(softc->ver_info->hwrm_min_major == + softc->ver_info->hwrm_if_major) { + if (softc->ver_info->hwrm_min_minor > + softc->ver_info->hwrm_if_minor) { + device_printf(softc->dev, + "WARNING: HWRM version %s is too old (older than %s)\n", + softc->ver_info->hwrm_if_ver, buf); + return false; + } + else if (softc->ver_info->hwrm_min_minor == + softc->ver_info->hwrm_if_minor) { + if (softc->ver_info->hwrm_min_update > + softc->ver_info->hwrm_if_update) { + device_printf(softc->dev, + "WARNING: HWRM version %s is too old (older than %s)\n", + softc->ver_info->hwrm_if_ver, buf); + return false; + } + } + } + return true; +} + +static uint64_t +bnxt_get_baudrate(struct bnxt_link_info *link) +{ + switch (link->link_speed) { + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB: + return IF_Mbps(100); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_1GB: + return IF_Gbps(1); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2GB: + return IF_Gbps(2); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2_5GB: + return IF_Mbps(2500); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10GB: + return IF_Gbps(10); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_20GB: + return IF_Gbps(20); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_25GB: + return IF_Gbps(25); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_40GB: + return IF_Gbps(40); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_50GB: + return IF_Gbps(50); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100GB: + return IF_Gbps(100); + case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10MB: + return IF_Mbps(10); + } + return IF_Gbps(100); +} diff --git a/sys/modules/Makefile b/sys/modules/Makefile index b5ac84dbabb..602f3da52b3 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -57,6 +57,7 @@ SUBDIR= \ ${_bios} \ ${_bktr} \ ${_bm} \ + bnxt \ bridgestp \ bwi \ bwn \ diff --git a/sys/modules/bnxt/Makefile b/sys/modules/bnxt/Makefile new file mode 100644 index 00000000000..1d478d16671 --- /dev/null +++ b/sys/modules/bnxt/Makefile @@ -0,0 +1,14 @@ +#$FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/bnxt + +KMOD = if_bnxt +SRCS = device_if.h bus_if.h pci_if.h pci_iov_if.h ifdi_if.h +SRCS += opt_inet.h opt_inet6.h opt_rss.h +SRCS += bnxt_txrx.c if_bnxt.c +SRCS += bnxt_hwrm.c bnxt_hwrm.h +SRCS += bnxt_sysctl.c bnxt_sysctl.h + +CFLAGS+= -DIFLIB + +.include From 4dfc28b7e8eb3b5dd97f0e86181c3a16c6e0d769 Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Tue, 15 Nov 2016 20:44:19 +0000 Subject: [PATCH 101/204] [MIPS] Fix Config3[ULRI] printing Bit identifier of printf %b is octal integer, but not decimal. ULRI bit is 13-th bit (starting with 0) according to MIPS Architecture Volume III v.6. In this case the bit identifier (starts with 1) should be \16. Reviewed by: gonzo Approved by: adrian(mentor) Differential Revision: https://reviews.freebsd.org/D8516 --- sys/mips/mips/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/mips/mips/cpu.c b/sys/mips/mips/cpu.c index 0bdac90002c..dd118462add 100644 --- a/sys/mips/mips/cpu.c +++ b/sys/mips/mips/cpu.c @@ -481,7 +481,7 @@ cpu_identify(void) /* Print Config3 if it contains any useful info */ if (cfg3 & ~(0x80000000)) - printf(" Config3=0x%b\n", cfg3, "\20\14ULRI\2SmartMIPS\1TraceLogic"); + printf(" Config3=0x%b\n", cfg3, "\20\16ULRI\2SmartMIPS\1TraceLogic"); #if defined(CPU_MIPS1004K) || defined (CPU_MIPS74K) || defined (CPU_MIPS24K) cfg7 = mips_rd_config7(); From b7f9d71cf4895d83608321823c4ba4a862404ef6 Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Tue, 15 Nov 2016 21:18:55 +0000 Subject: [PATCH 102/204] After r308533, the platform compatible string must be an exact match. Use "ti,am33xx" instead of "ti,am335x", which gives an exact match in every DTS we support. This fixes the boot on TI SoCs after r308533. Suggested by: gonzo Sponsored by: Rubicon Communications, LLC (Netgate) --- sys/arm/ti/ti_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/ti/ti_machdep.c b/sys/arm/ti/ti_machdep.c index f9d83890ba8..1d4e20053bb 100644 --- a/sys/arm/ti/ti_machdep.c +++ b/sys/arm/ti/ti_machdep.c @@ -124,5 +124,5 @@ static platform_method_t am335x_methods[] = { PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x", 200); +FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am33xx", 200); #endif From 4677ca5bf108b621ceb5544434ccbc5415918997 Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Tue, 15 Nov 2016 21:49:01 +0000 Subject: [PATCH 103/204] [etherswitch] add Marvell 88e6060 switch support Add 88e6060 basic support: only port-based VLAN is supported. No vlan(4) support. Submitted by: Hiroki Mori Reviewed by: mizhka, adrian Approved by: adrian(mentor) Differential Revision: https://reviews.freebsd.org/D8344 --- sys/dev/etherswitch/e6000sw/e6060sw.c | 703 ++++++++++++++++++++++++++ 1 file changed, 703 insertions(+) create mode 100644 sys/dev/etherswitch/e6000sw/e6060sw.c diff --git a/sys/dev/etherswitch/e6000sw/e6060sw.c b/sys/dev/etherswitch/e6000sw/e6060sw.c new file mode 100644 index 00000000000..9e3d93b66d2 --- /dev/null +++ b/sys/dev/etherswitch/e6000sw/e6060sw.c @@ -0,0 +1,703 @@ +/*- + * Copyright (c) 2016 Hiroki Mori + * Copyright (c) 2013 Luiz Otavio O Souza. + * Copyright (c) 2011-2012 Stefan Bethke. + * Copyright (c) 2012 Adrian Chadd. + * 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$ + */ + +/* + * This code is Marvell 88E6060 ethernet switch support code on etherswitch + * framework. + * Current code is only support port base vlan. Not support ingress/egress + * trailer. This switch chip can't work vlan(4) support. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "mdio_if.h" +#include "miibus_if.h" +#include "etherswitch_if.h" + +#define SMI_OFFSET 0x10 +#define CORE_REGISTER (SMI_OFFSET + 8) + +#define SWITCH_ID 3 +#define PORT_VLAN_MAP 6 + +MALLOC_DECLARE(M_E6060SW); +MALLOC_DEFINE(M_E6060SW, "e6060sw", "e6060sw data structures"); + +struct e6060sw_softc { + struct mtx sc_mtx; /* serialize access to softc */ + device_t sc_dev; + int vlan_mode; + int media; /* cpu port media */ + int cpuport; /* which PHY is connected to the CPU */ + int phymask; /* PHYs we manage */ + int numports; /* number of ports */ + int ifpport[MII_NPHY]; + int *portphy; + char **ifname; + device_t **miibus; + struct ifnet **ifp; + struct callout callout_tick; + etherswitch_info_t info; +}; + +#define E6060SW_LOCK(_sc) \ + mtx_lock(&(_sc)->sc_mtx) +#define E6060SW_UNLOCK(_sc) \ + mtx_unlock(&(_sc)->sc_mtx) +#define E6060SW_LOCK_ASSERT(_sc, _what) \ + mtx_assert(&(_sc)->sc_mtx, (_what)) +#define E6060SW_TRYLOCK(_sc) \ + mtx_trylock(&(_sc)->sc_mtx) + +#if defined(DEBUG) +#define DPRINTF(dev, args...) device_printf(dev, args) +#else +#define DPRINTF(dev, args...) +#endif + +static inline int e6060sw_portforphy(struct e6060sw_softc *, int); +static void e6060sw_tick(void *); +static int e6060sw_ifmedia_upd(struct ifnet *); +static void e6060sw_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static int +e6060sw_probe(device_t dev) +{ + int data; + struct e6060sw_softc *sc; + + sc = device_get_softc(dev); + bzero(sc, sizeof(*sc)); + + data = MDIO_READREG(device_get_parent(dev), CORE_REGISTER, SWITCH_ID); + if (bootverbose) + device_printf(dev,"Switch Identifier Register %x\n", data); + + if ((data >> 4) != 0x060) { + return (ENXIO); + } + + device_set_desc_copy(dev, "Marvell 88E6060 MDIO switch driver"); + return (BUS_PROBE_DEFAULT); +} + +static int +e6060sw_attach_phys(struct e6060sw_softc *sc) +{ + int phy, port, err; + char name[IFNAMSIZ]; + + port = 0; + err = 0; + /* PHYs need an interface, so we generate a dummy one */ + snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->sc_dev)); + for (phy = 0; phy < sc->numports; phy++) { + if (((1 << phy) & sc->phymask) == 0) + continue; + sc->ifpport[phy] = port; + sc->portphy[port] = phy; + sc->ifp[port] = if_alloc(IFT_ETHER); + sc->ifp[port]->if_softc = sc; + sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX; + if_initname(sc->ifp[port], name, port); + sc->miibus[port] = malloc(sizeof(device_t), M_E6060SW, + M_WAITOK | M_ZERO); + err = mii_attach(sc->sc_dev, sc->miibus[port], sc->ifp[port], + e6060sw_ifmedia_upd, e6060sw_ifmedia_sts, \ + BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", + device_get_nameunit(*sc->miibus[port]), + sc->ifp[port]->if_xname); + if (err != 0) { + device_printf(sc->sc_dev, + "attaching PHY %d failed\n", + phy); + break; + } + ++port; + } + sc->info.es_nports = port; + if (sc->cpuport != -1) { + /* assume cpuport is last one */ + sc->ifpport[sc->cpuport] = port; + sc->portphy[port] = sc->cpuport; + ++sc->info.es_nports; + } + return (err); +} + +static int +e6060sw_attach(device_t dev) +{ + struct e6060sw_softc *sc; + int err; + + sc = device_get_softc(dev); + err = 0; + + sc->sc_dev = dev; + mtx_init(&sc->sc_mtx, "e6060sw", NULL, MTX_DEF); + strlcpy(sc->info.es_name, device_get_desc(dev), + sizeof(sc->info.es_name)); + + /* XXX Defaults */ + sc->numports = 6; + sc->phymask = 0x1f; + sc->cpuport = 5; + sc->media = 100; + + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "numports", &sc->numports); + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "phymask", &sc->phymask); + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "cpuport", &sc->cpuport); + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "media", &sc->media); + + sc->info.es_nvlangroups = sc->numports; + sc->info.es_vlan_caps = ETHERSWITCH_VLAN_PORT; + + sc->ifp = malloc(sizeof(struct ifnet *) * sc->numports, M_E6060SW, + M_WAITOK | M_ZERO); + sc->ifname = malloc(sizeof(char *) * sc->numports, M_E6060SW, + M_WAITOK | M_ZERO); + sc->miibus = malloc(sizeof(device_t *) * sc->numports, M_E6060SW, + M_WAITOK | M_ZERO); + sc->portphy = malloc(sizeof(int) * sc->numports, M_E6060SW, + M_WAITOK | M_ZERO); + + /* + * Attach the PHYs and complete the bus enumeration. + */ + err = e6060sw_attach_phys(sc); + if (err != 0) + return (err); + + bus_generic_probe(dev); + bus_enumerate_hinted_children(dev); + err = bus_generic_attach(dev); + if (err != 0) + return (err); + + callout_init(&sc->callout_tick, 0); + + e6060sw_tick(sc); + + return (err); +} + +static int +e6060sw_detach(device_t dev) +{ + struct e6060sw_softc *sc; + int i, port; + + sc = device_get_softc(dev); + + callout_drain(&sc->callout_tick); + + for (i = 0; i < MII_NPHY; i++) { + if (((1 << i) & sc->phymask) == 0) + continue; + port = e6060sw_portforphy(sc, i); + if (sc->miibus[port] != NULL) + device_delete_child(dev, (*sc->miibus[port])); + if (sc->ifp[port] != NULL) + if_free(sc->ifp[port]); + free(sc->ifname[port], M_E6060SW); + free(sc->miibus[port], M_E6060SW); + } + + free(sc->portphy, M_E6060SW); + free(sc->miibus, M_E6060SW); + free(sc->ifname, M_E6060SW); + free(sc->ifp, M_E6060SW); + + bus_generic_detach(dev); + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +/* + * Convert PHY number to port number. + */ +static inline int +e6060sw_portforphy(struct e6060sw_softc *sc, int phy) +{ + + return (sc->ifpport[phy]); +} + +static inline struct mii_data * +e6060sw_miiforport(struct e6060sw_softc *sc, int port) +{ + + if (port < 0 || port > sc->numports) + return (NULL); + if (port == sc->cpuport) + return (NULL); + return (device_get_softc(*sc->miibus[port])); +} + +static inline struct ifnet * +e6060sw_ifpforport(struct e6060sw_softc *sc, int port) +{ + + if (port < 0 || port > sc->numports) + return (NULL); + return (sc->ifp[port]); +} + +/* + * Poll the status for all PHYs. + */ +static void +e6060sw_miipollstat(struct e6060sw_softc *sc) +{ + int i, port; + struct mii_data *mii; + struct mii_softc *miisc; + + E6060SW_LOCK_ASSERT(sc, MA_NOTOWNED); + + for (i = 0; i < MII_NPHY; i++) { + if (((1 << i) & sc->phymask) == 0) + continue; + port = e6060sw_portforphy(sc, i); + if ((*sc->miibus[port]) == NULL) + continue; + mii = device_get_softc(*sc->miibus[port]); + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) { + if (IFM_INST(mii->mii_media.ifm_cur->ifm_media) != + miisc->mii_inst) + continue; + ukphy_status(miisc); + mii_phy_update(miisc, MII_POLLSTAT); + } + } +} + +static void +e6060sw_tick(void *arg) +{ + struct e6060sw_softc *sc; + + sc = arg; + + e6060sw_miipollstat(sc); + callout_reset(&sc->callout_tick, hz, e6060sw_tick, sc); +} + +static void +e6060sw_lock(device_t dev) +{ + struct e6060sw_softc *sc; + + sc = device_get_softc(dev); + + E6060SW_LOCK_ASSERT(sc, MA_NOTOWNED); + E6060SW_LOCK(sc); +} + +static void +e6060sw_unlock(device_t dev) +{ + struct e6060sw_softc *sc; + + sc = device_get_softc(dev); + + E6060SW_LOCK_ASSERT(sc, MA_OWNED); + E6060SW_UNLOCK(sc); +} + +static etherswitch_info_t * +e6060sw_getinfo(device_t dev) +{ + struct e6060sw_softc *sc; + + sc = device_get_softc(dev); + + return (&sc->info); +} + +static int +e6060sw_getport(device_t dev, etherswitch_port_t *p) +{ + struct e6060sw_softc *sc; + struct mii_data *mii; + struct ifmediareq *ifmr; + int err, phy; + + sc = device_get_softc(dev); + ifmr = &p->es_ifmr; + + if (p->es_port < 0 || p->es_port >= sc->numports) + return (ENXIO); + p->es_pvid = 0; + + phy = sc->portphy[p->es_port]; + mii = e6060sw_miiforport(sc, p->es_port); + if (sc->cpuport != -1 && phy == sc->cpuport) { + /* fill in fixed values for CPU port */ + p->es_flags |= ETHERSWITCH_PORT_CPU; + ifmr->ifm_count = 0; + if (sc->media == 100) + ifmr->ifm_current = ifmr->ifm_active = + IFM_ETHER | IFM_100_TX | IFM_FDX; + else + ifmr->ifm_current = ifmr->ifm_active = + IFM_ETHER | IFM_1000_T | IFM_FDX; + ifmr->ifm_mask = 0; + ifmr->ifm_status = IFM_ACTIVE | IFM_AVALID; + } else if (mii != NULL) { + err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, + &mii->mii_media, SIOCGIFMEDIA); + if (err) + return (err); + } else { + return (ENXIO); + } + return (0); +} + +static int +e6060sw_setport(device_t dev, etherswitch_port_t *p) +{ + struct e6060sw_softc *sc; + struct ifmedia *ifm; + struct mii_data *mii; + struct ifnet *ifp; + int err; + + sc = device_get_softc(dev); + + if (p->es_port < 0 || p->es_port >= sc->numports) + return (ENXIO); + + if (sc->portphy[p->es_port] == sc->cpuport) + return (ENXIO); + + mii = e6060sw_miiforport(sc, p->es_port); + if (mii == NULL) + return (ENXIO); + + ifp = e6060sw_ifpforport(sc, p->es_port); + + ifm = &mii->mii_media; + err = ifmedia_ioctl(ifp, &p->es_ifr, ifm, SIOCSIFMEDIA); + return (err); +} + +static int +e6060sw_getvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + struct e6060sw_softc *sc; + int data; + + sc = device_get_softc(dev); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_PORT) { + vg->es_vid = ETHERSWITCH_VID_VALID; + vg->es_vid |= vg->es_vlangroup; + data = MDIO_READREG(device_get_parent(dev), CORE_REGISTER + vg->es_vlangroup, PORT_VLAN_MAP); + vg->es_member_ports = data & 0x3f; + vg->es_untagged_ports = vg->es_member_ports; + vg->es_fid = 0; + } else { + vg->es_vid = 0; + } + return (0); +} + +static int +e6060sw_setvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + struct e6060sw_softc *sc; + int data; + + sc = device_get_softc(dev); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_PORT) { + data = MDIO_READREG(device_get_parent(dev), CORE_REGISTER + vg->es_vlangroup, PORT_VLAN_MAP); + data &= ~0x3f; + data |= vg->es_member_ports; + MDIO_WRITEREG(device_get_parent(dev), CORE_REGISTER + vg->es_vlangroup, PORT_VLAN_MAP, data); + } + + return (0); +} + +static void +e6060sw_reset_vlans(device_t dev) +{ + struct e6060sw_softc *sc; + uint32_t ports; + int i; + int data; + + sc = device_get_softc(dev); + + for (i = 0; i <= sc->numports; i++) { + ports = (1 << (sc->numports + 1)) - 1; + ports &= ~(1 << i); + if (sc->vlan_mode == ETHERSWITCH_VLAN_PORT) { + data = i << 12; + } else { + data = 0; + } + data |= ports; + MDIO_WRITEREG(device_get_parent(dev), CORE_REGISTER + i, PORT_VLAN_MAP, data); + } +} + +static int +e6060sw_getconf(device_t dev, etherswitch_conf_t *conf) +{ + struct e6060sw_softc *sc; + + sc = device_get_softc(dev); + + /* Return the VLAN mode. */ + conf->cmd = ETHERSWITCH_CONF_VLAN_MODE; + conf->vlan_mode = sc->vlan_mode; + + return (0); +} + +static int +e6060sw_setconf(device_t dev, etherswitch_conf_t *conf) +{ + struct e6060sw_softc *sc; + + sc = device_get_softc(dev); + + /* Set the VLAN mode. */ + if (conf->cmd & ETHERSWITCH_CONF_VLAN_MODE) { + if (conf->vlan_mode == ETHERSWITCH_VLAN_PORT) { + sc->vlan_mode = ETHERSWITCH_VLAN_PORT; + } else { + sc->vlan_mode = 0; + } + + /* Reset VLANs. */ + e6060sw_reset_vlans(dev); + } + + return (0); +} + +static void +e6060sw_statchg(device_t dev) +{ + + DPRINTF(dev, "%s\n", __func__); +} + +static int +e6060sw_ifmedia_upd(struct ifnet *ifp) +{ + struct e6060sw_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = e6060sw_miiforport(sc, ifp->if_dunit); + + DPRINTF(sc->sc_dev, "%s\n", __func__); + if (mii == NULL) + return (ENXIO); + mii_mediachg(mii); + return (0); +} + +static void +e6060sw_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + struct e6060sw_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = e6060sw_miiforport(sc, ifp->if_dunit); + + DPRINTF(sc->sc_dev, "%s\n", __func__); + + if (mii == NULL) + return; + mii_pollstat(mii); + ifmr->ifm_active = mii->mii_media_active; + ifmr->ifm_status = mii->mii_media_status; +} + +static int +e6060sw_readphy(device_t dev, int phy, int reg) +{ + struct e6060sw_softc *sc; + int data; + + phy += SMI_OFFSET; + + sc = device_get_softc(dev); + E6060SW_LOCK_ASSERT(sc, MA_NOTOWNED); + + if (phy < 0 || phy >= 32) + return (ENXIO); + if (reg < 0 || reg >= 32) + return (ENXIO); + + E6060SW_LOCK(sc); + data = MDIO_READREG(device_get_parent(dev), phy, reg); + E6060SW_UNLOCK(sc); + + return (data); +} + +static int +e6060sw_writephy(device_t dev, int phy, int reg, int data) +{ + struct e6060sw_softc *sc; + int err; + + phy += SMI_OFFSET; + + sc = device_get_softc(dev); + E6060SW_LOCK_ASSERT(sc, MA_NOTOWNED); + + if (phy < 0 || phy >= 32) + return (ENXIO); + if (reg < 0 || reg >= 32) + return (ENXIO); + + E6060SW_LOCK(sc); + err = MDIO_WRITEREG(device_get_parent(dev), phy, reg, data); + E6060SW_UNLOCK(sc); + + return (err); +} + +/* addr is 5-8 bit is SMI Device Addres, 0-4 bit is SMI Register Address */ + +static int +e6060sw_readreg(device_t dev, int addr) +{ + int devaddr, regaddr; + + devaddr = (addr >> 5) & 0xf; + regaddr = addr & 0x1f; + + return MDIO_READREG(device_get_parent(dev), devaddr+SMI_OFFSET, regaddr); +} + +/* addr is 5-8 bit is SMI Device Addres, 0-4 bit is SMI Register Address */ + +static int +e6060sw_writereg(device_t dev, int addr, int value) +{ + int devaddr, regaddr; + + devaddr = (addr >> 5) & 0xf; + regaddr = addr & 0x1f; + + return (MDIO_WRITEREG(device_get_parent(dev), devaddr+SMI_OFFSET, regaddr, value)); +} + +static device_method_t e6060sw_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, e6060sw_probe), + DEVMETHOD(device_attach, e6060sw_attach), + DEVMETHOD(device_detach, e6060sw_detach), + + /* bus interface */ + DEVMETHOD(bus_add_child, device_add_child_ordered), + + /* MII interface */ + DEVMETHOD(miibus_readreg, e6060sw_readphy), + DEVMETHOD(miibus_writereg, e6060sw_writephy), + DEVMETHOD(miibus_statchg, e6060sw_statchg), + + /* MDIO interface */ + DEVMETHOD(mdio_readreg, e6060sw_readphy), + DEVMETHOD(mdio_writereg, e6060sw_writephy), + + /* etherswitch interface */ + DEVMETHOD(etherswitch_lock, e6060sw_lock), + DEVMETHOD(etherswitch_unlock, e6060sw_unlock), + DEVMETHOD(etherswitch_getinfo, e6060sw_getinfo), + DEVMETHOD(etherswitch_readreg, e6060sw_readreg), + DEVMETHOD(etherswitch_writereg, e6060sw_writereg), + DEVMETHOD(etherswitch_readphyreg, e6060sw_readphy), + DEVMETHOD(etherswitch_writephyreg, e6060sw_writephy), + DEVMETHOD(etherswitch_getport, e6060sw_getport), + DEVMETHOD(etherswitch_setport, e6060sw_setport), + DEVMETHOD(etherswitch_getvgroup, e6060sw_getvgroup), + DEVMETHOD(etherswitch_setvgroup, e6060sw_setvgroup), + DEVMETHOD(etherswitch_setconf, e6060sw_setconf), + DEVMETHOD(etherswitch_getconf, e6060sw_getconf), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(e6060sw, e6060sw_driver, e6060sw_methods, + sizeof(struct e6060sw_softc)); +static devclass_t e6060sw_devclass; + +DRIVER_MODULE(e6060sw, mdio, e6060sw_driver, e6060sw_devclass, 0, 0); +DRIVER_MODULE(miibus, e6060sw, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE(mdio, e6060sw, mdio_driver, mdio_devclass, 0, 0); +DRIVER_MODULE(etherswitch, e6060sw, etherswitch_driver, etherswitch_devclass, 0, 0); +MODULE_VERSION(e6060sw, 1); +MODULE_DEPEND(e6060sw, miibus, 1, 1, 1); /* XXX which versions? */ +MODULE_DEPEND(e6060sw, etherswitch, 1, 1, 1); /* XXX which versions? */ From 477e3eff7ea0b599ad90a8a40a6b858a29fed6ca Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Tue, 15 Nov 2016 21:58:04 +0000 Subject: [PATCH 104/204] [etherswitch] add RTL8366SR support Add RTL8366SR support at etherswitch driver. Tested on RTL8366RB and RTL8366SR. Submitted by: Hiroki Mori Reviewed by: adrian, mizhka Approved by: adrian(mentor) Differential Revision: https://reviews.freebsd.org/D6796 --- sys/conf/options | 3 + sys/dev/etherswitch/rtl8366/rtl8366rb.c | 364 +++++++++++++-------- sys/dev/etherswitch/rtl8366/rtl8366rbvar.h | 189 +++++------ 3 files changed, 336 insertions(+), 220 deletions(-) diff --git a/sys/conf/options b/sys/conf/options index c3d0a7255aa..da04567fa48 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -993,6 +993,9 @@ BHND_LOGLEVEL opt_global.h # GPIO and child devices GPIO_SPI_DEBUG opt_gpio.h +# etherswitch(4) driver +RTL8366_SOFT_RESET opt_etherswitch.h + # evdev protocol support EVDEV_SUPPORT opt_evdev.h EVDEV_DEBUG opt_evdev.h diff --git a/sys/dev/etherswitch/rtl8366/rtl8366rb.c b/sys/dev/etherswitch/rtl8366/rtl8366rb.c index d14f4660130..6e990d97996 100644 --- a/sys/dev/etherswitch/rtl8366/rtl8366rb.c +++ b/sys/dev/etherswitch/rtl8366/rtl8366rb.c @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2015-2016 Hiroki Mori. * Copyright (c) 2011-2012 Stefan Bethke. * All rights reserved. * @@ -26,6 +27,8 @@ * $FreeBSD$ */ +#include "opt_etherswitch.h" + #include #include #include @@ -65,18 +68,13 @@ struct rtl8366rb_softc { int smi_acquired; /* serialize access to SMI/I2C bus */ struct mtx callout_mtx; /* serialize callout */ device_t dev; - int vid[RTL8366RB_NUM_VLANS]; - char *ifname[RTL8366RB_NUM_PHYS]; - device_t miibus[RTL8366RB_NUM_PHYS]; - struct ifnet *ifp[RTL8366RB_NUM_PHYS]; + int vid[RTL8366_NUM_VLANS]; + char *ifname[RTL8366_NUM_PHYS]; + device_t miibus[RTL8366_NUM_PHYS]; + struct ifnet *ifp[RTL8366_NUM_PHYS]; struct callout callout_tick; -}; - -static etherswitch_info_t etherswitch_info = { - .es_nports = RTL8366RB_NUM_PORTS, - .es_nvlangroups = RTL8366RB_NUM_VLANS, - .es_name = "Realtek RTL8366RB", - .es_vlan_caps = ETHERSWITCH_VLAN_DOT1Q, + etherswitch_info_t info; + int chip_type; /* 0 = RTL8366RB, 1 = RTL8366SR */ }; #define RTL_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) @@ -133,77 +131,101 @@ rtl8366rb_identify(driver_t *driver, device_t parent) if (device_find_child(parent, "rtl8366rb", -1) == NULL) { child = BUS_ADD_CHILD(parent, 0, "rtl8366rb", -1); devi = IICBUS_IVAR(child); - devi->addr = RTL8366RB_IIC_ADDR; + devi->addr = RTL8366_IIC_ADDR; } } static int rtl8366rb_probe(device_t dev) { + struct rtl8366rb_softc *sc; + + sc = device_get_softc(dev); + + bzero(sc, sizeof(*sc)); if (smi_probe(dev) != 0) return (ENXIO); - device_set_desc(dev, "RTL8366RB Ethernet Switch Controller"); + if(sc->chip_type == 0) + device_set_desc(dev, "RTL8366RB Ethernet Switch Controller"); + else + device_set_desc(dev, "RTL8366SR Ethernet Switch Controller"); return (BUS_PROBE_DEFAULT); } static void rtl8366rb_init(device_t dev) { - int i; struct rtl8366rb_softc *sc; + int i; + + sc = device_get_softc(dev); /* Initialisation for TL-WR1043ND */ - smi_rmw(dev, RTL8366RB_RCR, - RTL8366RB_RCR_HARD_RESET, - RTL8366RB_RCR_HARD_RESET, RTL_WAITOK); +#ifdef RTL8366_SOFT_RESET + smi_rmw(dev, RTL8366_RCR, + RTL8366_RCR_SOFT_RESET, + RTL8366_RCR_SOFT_RESET, RTL_WAITOK); +#else + smi_rmw(dev, RTL8366_RCR, + RTL8366_RCR_HARD_RESET, + RTL8366_RCR_HARD_RESET, RTL_WAITOK); +#endif + /* hard reset not return ack */ DELAY(100000); /* Enable 16 VLAN mode */ - smi_rmw(dev, RTL8366RB_SGCR, - RTL8366RB_SGCR_EN_VLAN | RTL8366RB_SGCR_EN_VLAN_4KTB, - RTL8366RB_SGCR_EN_VLAN, RTL_WAITOK); + smi_rmw(dev, RTL8366_SGCR, + RTL8366_SGCR_EN_VLAN | RTL8366_SGCR_EN_VLAN_4KTB, + RTL8366_SGCR_EN_VLAN, RTL_WAITOK); /* Initialize our vlan table. */ - sc = device_get_softc(dev); for (i = 0; i <= 1; i++) sc->vid[i] = (i + 1) | ETHERSWITCH_VID_VALID; /* Remove port 0 from VLAN 1. */ - smi_rmw(dev, RTL8366RB_VMCR(RTL8366RB_VMCR_MU_REG, 0), + smi_rmw(dev, RTL8366_VMCR(RTL8366_VMCR_MU_REG, 0), (1 << 0), 0, RTL_WAITOK); /* Add port 0 untagged and port 5 tagged to VLAN 2. */ - smi_rmw(dev, RTL8366RB_VMCR(RTL8366RB_VMCR_MU_REG, 1), - ((1 << 5 | 1 << 0) << RTL8366RB_VMCR_MU_MEMBER_SHIFT) - | ((1 << 5 | 1 << 0) << RTL8366RB_VMCR_MU_UNTAG_SHIFT), - ((1 << 5 | 1 << 0) << RTL8366RB_VMCR_MU_MEMBER_SHIFT - | ((1 << 0) << RTL8366RB_VMCR_MU_UNTAG_SHIFT)), + smi_rmw(dev, RTL8366_VMCR(RTL8366_VMCR_MU_REG, 1), + ((1 << 5 | 1 << 0) << RTL8366_VMCR_MU_MEMBER_SHIFT) + | ((1 << 5 | 1 << 0) << RTL8366_VMCR_MU_UNTAG_SHIFT), + ((1 << 5 | 1 << 0) << RTL8366_VMCR_MU_MEMBER_SHIFT + | ((1 << 0) << RTL8366_VMCR_MU_UNTAG_SHIFT)), RTL_WAITOK); /* Set PVID 2 for port 0. */ - smi_rmw(dev, RTL8366RB_PVCR_REG(0), - RTL8366RB_PVCR_VAL(0, RTL8366RB_PVCR_PORT_MASK), - RTL8366RB_PVCR_VAL(0, 1), RTL_WAITOK); + smi_rmw(dev, RTL8366_PVCR_REG(0), + RTL8366_PVCR_VAL(0, RTL8366_PVCR_PORT_MASK), + RTL8366_PVCR_VAL(0, 1), RTL_WAITOK); } static int rtl8366rb_attach(device_t dev) { - uint16_t rev = 0; struct rtl8366rb_softc *sc; + uint16_t rev = 0; char name[IFNAMSIZ]; int err = 0; int i; sc = device_get_softc(dev); - bzero(sc, sizeof(*sc)); + sc->dev = dev; mtx_init(&sc->sc_mtx, "rtl8366rb", NULL, MTX_DEF); sc->smi_acquired = 0; mtx_init(&sc->callout_mtx, "rtl8366rbcallout", NULL, MTX_DEF); rtl8366rb_init(dev); - smi_read(dev, RTL8366RB_CVCR, &rev, RTL_WAITOK); + smi_read(dev, RTL8366_CVCR, &rev, RTL_WAITOK); device_printf(dev, "rev. %d\n", rev & 0x000f); + sc->info.es_nports = RTL8366_NUM_PORTS; + sc->info.es_nvlangroups = RTL8366_NUM_VLANS; + sc->info.es_vlan_caps = ETHERSWITCH_VLAN_DOT1Q; + if(sc->chip_type == 0) + sprintf(sc->info.es_name, "Realtek RTL8366RB"); + else + sprintf(sc->info.es_name, "Realtek RTL8366SR"); + /* attach miibus and phys */ /* PHYs need an interface, so we generate a dummy one */ - for (i = 0; i < RTL8366RB_NUM_PHYS; i++) { + for (i = 0; i < RTL8366_NUM_PHYS; i++) { sc->ifp[i] = if_alloc(IFT_ETHER); sc->ifp[i]->if_softc = sc; sc->ifp[i]->if_flags |= IFF_UP | IFF_BROADCAST | IFF_DRV_RUNNING @@ -236,10 +258,12 @@ rtl8366rb_attach(device_t dev) static int rtl8366rb_detach(device_t dev) { - struct rtl8366rb_softc *sc = device_get_softc(dev); + struct rtl8366rb_softc *sc; int i; - for (i=0; i < RTL8366RB_NUM_PHYS; i++) { + sc = device_get_softc(dev); + + for (i=0; i < RTL8366_NUM_PHYS; i++) { if (sc->miibus[i]) device_delete_child(dev, sc->miibus[i]); if (sc->ifp[i] != NULL) @@ -259,30 +283,30 @@ rtl8366rb_update_ifmedia(int portstatus, u_int *media_status, u_int *media_activ { *media_active = IFM_ETHER; *media_status = IFM_AVALID; - if ((portstatus & RTL8366RB_PLSR_LINK) != 0) + if ((portstatus & RTL8366_PLSR_LINK) != 0) *media_status |= IFM_ACTIVE; else { *media_active |= IFM_NONE; return; } - switch (portstatus & RTL8366RB_PLSR_SPEED_MASK) { - case RTL8366RB_PLSR_SPEED_10: + switch (portstatus & RTL8366_PLSR_SPEED_MASK) { + case RTL8366_PLSR_SPEED_10: *media_active |= IFM_10_T; break; - case RTL8366RB_PLSR_SPEED_100: + case RTL8366_PLSR_SPEED_100: *media_active |= IFM_100_TX; break; - case RTL8366RB_PLSR_SPEED_1000: + case RTL8366_PLSR_SPEED_1000: *media_active |= IFM_1000_T; break; } - if ((portstatus & RTL8366RB_PLSR_FULLDUPLEX) != 0) + if ((portstatus & RTL8366_PLSR_FULLDUPLEX) != 0) *media_active |= IFM_FDX; else *media_active |= IFM_HDX; - if ((portstatus & RTL8366RB_PLSR_TXPAUSE) != 0) + if ((portstatus & RTL8366_PLSR_TXPAUSE) != 0) *media_active |= IFM_ETH_TXPAUSE; - if ((portstatus & RTL8366RB_PLSR_RXPAUSE) != 0) + if ((portstatus & RTL8366_PLSR_RXPAUSE) != 0) *media_active |= IFM_ETH_RXPAUSE; } @@ -295,10 +319,10 @@ rtl833rb_miipollstat(struct rtl8366rb_softc *sc) uint16_t value; int portstatus; - for (i = 0; i < RTL8366RB_NUM_PHYS; i++) { + for (i = 0; i < RTL8366_NUM_PHYS; i++) { mii = device_get_softc(sc->miibus[i]); if ((i % 2) == 0) { - if (smi_read(sc->dev, RTL8366RB_PLSR_BASE + i/2, &value, RTL_NOWAIT) != 0) { + if (smi_read(sc->dev, RTL8366_PLSR_BASE + i/2, &value, RTL_NOWAIT) != 0) { DEBUG_INCRVAR(callout_blocked); return; } @@ -318,7 +342,9 @@ rtl833rb_miipollstat(struct rtl8366rb_softc *sc) static void rtl8366rb_tick(void *arg) { - struct rtl8366rb_softc *sc = arg; + struct rtl8366rb_softc *sc; + + sc = arg; rtl833rb_miipollstat(sc); callout_reset(&sc->callout_tick, hz, rtl8366rb_tick, sc); @@ -327,39 +353,65 @@ rtl8366rb_tick(void *arg) static int smi_probe(device_t dev) { + struct rtl8366rb_softc *sc; device_t iicbus, iicha; - int err, i; + int err, i, j; uint16_t chipid; char bytes[2]; int xferd; - bytes[0] = RTL8366RB_CIR & 0xff; - bytes[1] = (RTL8366RB_CIR >> 8) & 0xff; + sc = device_get_softc(dev); + iicbus = device_get_parent(dev); iicha = device_get_parent(iicbus); - iicbus_reset(iicbus, IIC_FASTEST, RTL8366RB_IIC_ADDR, NULL); - for (i=3; i--; ) { - IICBUS_STOP(iicha); - /* - * we go directly to the host adapter because iicbus.c - * only issues a stop on a bus that was successfully started. - */ + + for(i = 0; i < 2; ++i) { + iicbus_reset(iicbus, IIC_FASTEST, RTL8366_IIC_ADDR, NULL); + for (j=3; j--; ) { + IICBUS_STOP(iicha); + /* + * we go directly to the host adapter because iicbus.c + * only issues a stop on a bus that was successfully started. + */ + } + err = iicbus_request_bus(iicbus, dev, IIC_WAIT); + if (err != 0) + goto out; + err = iicbus_start(iicbus, RTL8366_IIC_ADDR | RTL_IICBUS_READ, RTL_IICBUS_TIMEOUT); + if (err != 0) + goto out; + if(i == 0) { + bytes[0] = RTL8366RB_CIR & 0xff; + bytes[1] = (RTL8366RB_CIR >> 8) & 0xff; + } else { + bytes[0] = RTL8366SR_CIR & 0xff; + bytes[1] = (RTL8366SR_CIR >> 8) & 0xff; + } + err = iicbus_write(iicbus, bytes, 2, &xferd, RTL_IICBUS_TIMEOUT); + if (err != 0) + goto out; + err = iicbus_read(iicbus, bytes, 2, &xferd, IIC_LAST_READ, 0); + if (err != 0) + goto out; + chipid = ((bytes[1] & 0xff) << 8) | (bytes[0] & 0xff); + if (i == 0 && chipid == RTL8366RB_CIR_ID8366RB) { + DPRINTF(dev, "chip id 0x%04x\n", chipid); + sc->chip_type = 0; + err = 0; + break; + } + if (i == 1 && chipid == RTL8366SR_CIR_ID8366SR) { + DPRINTF(dev, "chip id 0x%04x\n", chipid); + sc->chip_type = 1; + err = 0; + break; + } + if(i == 0) { + iicbus_stop(iicbus); + iicbus_release_bus(iicbus, dev); + } } - err = iicbus_request_bus(iicbus, dev, IIC_WAIT); - if (err != 0) - goto out; - err = iicbus_start(iicbus, RTL8366RB_IIC_ADDR | RTL_IICBUS_READ, RTL_IICBUS_TIMEOUT); - if (err != 0) - goto out; - err = iicbus_write(iicbus, bytes, 2, &xferd, RTL_IICBUS_TIMEOUT); - if (err != 0) - goto out; - err = iicbus_read(iicbus, bytes, 2, &xferd, IIC_LAST_READ, 0); - if (err != 0) - goto out; - chipid = ((bytes[1] & 0xff) << 8) | (bytes[0] & 0xff); - DPRINTF(dev, "chip id 0x%04x\n", chipid); - if (chipid != RTL8366RB_CIR_ID8366RB) + if(i == 2) err = ENXIO; out: iicbus_stop(iicbus); @@ -406,12 +458,25 @@ smi_release(struct rtl8366rb_softc *sc, int sleep) static int smi_select(device_t dev, int op, int sleep) { + struct rtl8366rb_softc *sc; int err, i; - device_t iicbus = device_get_parent(dev); - struct iicbus_ivar *devi = IICBUS_IVAR(dev); - int slave = devi->addr; + device_t iicbus; + struct iicbus_ivar *devi; + int slave; + + sc = device_get_softc(dev); + + iicbus = device_get_parent(dev); + devi = IICBUS_IVAR(dev); + slave = devi->addr; RTL_SMI_ACQUIRED_ASSERT((struct rtl8366rb_softc *)device_get_softc(dev)); + + if(sc->chip_type == 1) { // RTL8366SR work around + // this is same work around at probe + for (int i=3; i--; ) + IICBUS_STOP(device_get_parent(device_get_parent(dev))); + } /* * The chip does not use clock stretching when it is busy, * instead ignoring the command. Retry a few times. @@ -433,10 +498,12 @@ static int smi_read_locked(struct rtl8366rb_softc *sc, uint16_t addr, uint16_t *data, int sleep) { int err; - device_t iicbus = device_get_parent(sc->dev); + device_t iicbus; char bytes[2]; int xferd; + iicbus = device_get_parent(sc->dev); + RTL_SMI_ACQUIRED_ASSERT(sc); bytes[0] = addr & 0xff; bytes[1] = (addr >> 8) & 0xff; @@ -460,10 +527,12 @@ static int smi_write_locked(struct rtl8366rb_softc *sc, uint16_t addr, uint16_t data, int sleep) { int err; - device_t iicbus = device_get_parent(sc->dev); + device_t iicbus; char bytes[4]; int xferd; + iicbus = device_get_parent(sc->dev); + RTL_SMI_ACQUIRED_ASSERT(sc); bytes[0] = addr & 0xff; bytes[1] = (addr >> 8) & 0xff; @@ -481,9 +550,11 @@ smi_write_locked(struct rtl8366rb_softc *sc, uint16_t addr, uint16_t data, int s static int smi_read(device_t dev, uint16_t addr, uint16_t *data, int sleep) { - struct rtl8366rb_softc *sc = device_get_softc(dev); + struct rtl8366rb_softc *sc; int err; + sc = device_get_softc(dev); + err = smi_acquire(sc, sleep); if (err != 0) return (EBUSY); @@ -496,9 +567,11 @@ smi_read(device_t dev, uint16_t addr, uint16_t *data, int sleep) static int smi_write(device_t dev, uint16_t addr, uint16_t data, int sleep) { - struct rtl8366rb_softc *sc = device_get_softc(dev); + struct rtl8366rb_softc *sc; int err; + sc = device_get_softc(dev); + err = smi_acquire(sc, sleep); if (err != 0) return (EBUSY); @@ -511,10 +584,12 @@ smi_write(device_t dev, uint16_t addr, uint16_t data, int sleep) static int smi_rmw(device_t dev, uint16_t addr, uint16_t mask, uint16_t data, int sleep) { - struct rtl8366rb_softc *sc = device_get_softc(dev); + struct rtl8366rb_softc *sc; int err; uint16_t oldv, newv; + sc = device_get_softc(dev); + err = smi_acquire(sc, sleep); if (err != 0) return (EBUSY); @@ -535,13 +610,19 @@ smi_rmw(device_t dev, uint16_t addr, uint16_t mask, uint16_t data, int sleep) static etherswitch_info_t * rtl_getinfo(device_t dev) { - return (ðerswitch_info); + struct rtl8366rb_softc *sc; + + sc = device_get_softc(dev); + + return (&sc->info); } static int rtl_readreg(device_t dev, int reg) { - uint16_t data = 0; + uint16_t data; + + data = 0; smi_read(dev, reg, &data, RTL_WAITOK); return (data); @@ -559,18 +640,21 @@ rtl_getport(device_t dev, etherswitch_port_t *p) struct rtl8366rb_softc *sc; struct ifmedia *ifm; struct mii_data *mii; - struct ifmediareq *ifmr = &p->es_ifmr; + struct ifmediareq *ifmr; uint16_t v; int err, vlangroup; - if (p->es_port < 0 || p->es_port >= RTL8366RB_NUM_PORTS) - return (ENXIO); sc = device_get_softc(dev); - vlangroup = RTL8366RB_PVCR_GET(p->es_port, - rtl_readreg(dev, RTL8366RB_PVCR_REG(p->es_port))); + + ifmr = &p->es_ifmr; + + if (p->es_port < 0 || p->es_port >= RTL8366_NUM_PORTS) + return (ENXIO); + vlangroup = RTL8366_PVCR_GET(p->es_port, + rtl_readreg(dev, RTL8366_PVCR_REG(p->es_port))); p->es_pvid = sc->vid[vlangroup] & ETHERSWITCH_VID_MASK; - if (p->es_port < RTL8366RB_NUM_PHYS) { + if (p->es_port < RTL8366_NUM_PHYS) { mii = device_get_softc(sc->miibus[p->es_port]); ifm = &mii->mii_media; err = ifmedia_ioctl(sc->ifp[p->es_port], &p->es_ifr, ifm, SIOCGIFMEDIA); @@ -579,8 +663,8 @@ rtl_getport(device_t dev, etherswitch_port_t *p) } else { /* fill in fixed values for CPU port */ p->es_flags |= ETHERSWITCH_PORT_CPU; - smi_read(dev, RTL8366RB_PLSR_BASE + (RTL8366RB_NUM_PHYS)/2, &v, RTL_WAITOK); - v = v >> (8 * ((RTL8366RB_NUM_PHYS) % 2)); + smi_read(dev, RTL8366_PLSR_BASE + (RTL8366_NUM_PHYS)/2, &v, RTL_WAITOK); + v = v >> (8 * ((RTL8366_NUM_PHYS) % 2)); rtl8366rb_update_ifmedia(v, &ifmr->ifm_status, &ifmr->ifm_active); ifmr->ifm_current = ifmr->ifm_active; ifmr->ifm_mask = 0; @@ -599,16 +683,17 @@ rtl_getport(device_t dev, etherswitch_port_t *p) static int rtl_setport(device_t dev, etherswitch_port_t *p) { - int i, err, vlangroup; struct rtl8366rb_softc *sc; + int i, err, vlangroup; struct ifmedia *ifm; struct mii_data *mii; - if (p->es_port < 0 || p->es_port >= RTL8366RB_NUM_PORTS) - return (ENXIO); sc = device_get_softc(dev); + + if (p->es_port < 0 || p->es_port >= RTL8366_NUM_PORTS) + return (ENXIO); vlangroup = -1; - for (i = 0; i < RTL8366RB_NUM_VLANS; i++) { + for (i = 0; i < RTL8366_NUM_VLANS; i++) { if ((sc->vid[i] & ETHERSWITCH_VID_MASK) == p->es_pvid) { vlangroup = i; break; @@ -616,12 +701,12 @@ rtl_setport(device_t dev, etherswitch_port_t *p) } if (vlangroup == -1) return (ENXIO); - err = smi_rmw(dev, RTL8366RB_PVCR_REG(p->es_port), - RTL8366RB_PVCR_VAL(p->es_port, RTL8366RB_PVCR_PORT_MASK), - RTL8366RB_PVCR_VAL(p->es_port, vlangroup), RTL_WAITOK); + err = smi_rmw(dev, RTL8366_PVCR_REG(p->es_port), + RTL8366_PVCR_VAL(p->es_port, RTL8366_PVCR_PORT_MASK), + RTL8366_PVCR_VAL(p->es_port, vlangroup), RTL_WAITOK); if (err) return (err); - if (p->es_port == RTL8366RB_CPU_PORT) + if (p->es_port == RTL8366_CPU_PORT) return (0); mii = device_get_softc(sc->miibus[p->es_port]); ifm = &mii->mii_media; @@ -636,14 +721,15 @@ rtl_getvgroup(device_t dev, etherswitch_vlangroup_t *vg) uint16_t vmcr[3]; int i; - for (i=0; i<3; i++) - vmcr[i] = rtl_readreg(dev, RTL8366RB_VMCR(i, vg->es_vlangroup)); - sc = device_get_softc(dev); + + for (i=0; ies_vlangroup)); + vg->es_vid = sc->vid[vg->es_vlangroup]; - vg->es_member_ports = RTL8366RB_VMCR_MEMBER(vmcr); - vg->es_untagged_ports = RTL8366RB_VMCR_UNTAG(vmcr); - vg->es_fid = RTL8366RB_VMCR_FID(vmcr); + vg->es_member_ports = RTL8366_VMCR_MEMBER(vmcr); + vg->es_untagged_ports = RTL8366_VMCR_UNTAG(vmcr); + vg->es_fid = RTL8366_VMCR_FID(vmcr); return (0); } @@ -651,21 +737,31 @@ static int rtl_setvgroup(device_t dev, etherswitch_vlangroup_t *vg) { struct rtl8366rb_softc *sc; - int g = vg->es_vlangroup; + int g; sc = device_get_softc(dev); + + g = vg->es_vlangroup; + sc->vid[g] = vg->es_vid; /* VLAN group disabled ? */ if (vg->es_member_ports == 0 && vg->es_untagged_ports == 0 && vg->es_vid == 0) return (0); sc->vid[g] |= ETHERSWITCH_VID_VALID; - rtl_writereg(dev, RTL8366RB_VMCR(RTL8366RB_VMCR_DOT1Q_REG, g), - (vg->es_vid << RTL8366RB_VMCR_DOT1Q_VID_SHIFT) & RTL8366RB_VMCR_DOT1Q_VID_MASK); - rtl_writereg(dev, RTL8366RB_VMCR(RTL8366RB_VMCR_MU_REG, g), - ((vg->es_member_ports << RTL8366RB_VMCR_MU_MEMBER_SHIFT) & RTL8366RB_VMCR_MU_MEMBER_MASK) | - ((vg->es_untagged_ports << RTL8366RB_VMCR_MU_UNTAG_SHIFT) & RTL8366RB_VMCR_MU_UNTAG_MASK)); - rtl_writereg(dev, RTL8366RB_VMCR(RTL8366RB_VMCR_FID_REG, g), - vg->es_fid); + rtl_writereg(dev, RTL8366_VMCR(RTL8366_VMCR_DOT1Q_REG, g), + (vg->es_vid << RTL8366_VMCR_DOT1Q_VID_SHIFT) & RTL8366_VMCR_DOT1Q_VID_MASK); + if(sc->chip_type == 0) { + rtl_writereg(dev, RTL8366_VMCR(RTL8366_VMCR_MU_REG, g), + ((vg->es_member_ports << RTL8366_VMCR_MU_MEMBER_SHIFT) & RTL8366_VMCR_MU_MEMBER_MASK) | + ((vg->es_untagged_ports << RTL8366_VMCR_MU_UNTAG_SHIFT) & RTL8366_VMCR_MU_UNTAG_MASK)); + rtl_writereg(dev, RTL8366_VMCR(RTL8366_VMCR_FID_REG, g), + vg->es_fid); + } else { + rtl_writereg(dev, RTL8366_VMCR(RTL8366_VMCR_MU_REG, g), + ((vg->es_member_ports << RTL8366_VMCR_MU_MEMBER_SHIFT) & RTL8366_VMCR_MU_MEMBER_MASK) | + ((vg->es_untagged_ports << RTL8366_VMCR_MU_UNTAG_SHIFT) & RTL8366_VMCR_MU_UNTAG_MASK) | + ((vg->es_fid << RTL8366_VMCR_FID_FID_SHIFT) & RTL8366_VMCR_FID_FID_MASK)); + } return (0); } @@ -683,24 +779,28 @@ rtl_getconf(device_t dev, etherswitch_conf_t *conf) static int rtl_readphy(device_t dev, int phy, int reg) { - struct rtl8366rb_softc *sc = device_get_softc(dev); - uint16_t data = 0; + struct rtl8366rb_softc *sc; + uint16_t data; int err, i, sleep; - if (phy < 0 || phy >= RTL8366RB_NUM_PHYS) + sc = device_get_softc(dev); + + data = 0; + + if (phy < 0 || phy >= RTL8366_NUM_PHYS) return (ENXIO); - if (reg < 0 || reg >= RTL8366RB_NUM_PHY_REG) + if (reg < 0 || reg >= RTL8366_NUM_PHY_REG) return (ENXIO); sleep = RTL_WAITOK; err = smi_acquire(sc, sleep); if (err != 0) return (EBUSY); for (i = RTL_IICBUS_RETRIES; i--; ) { - err = smi_write_locked(sc, RTL8366RB_PACR, RTL8366RB_PACR_READ, sleep); + err = smi_write_locked(sc, RTL8366_PACR, RTL8366_PACR_READ, sleep); if (err == 0) - err = smi_write_locked(sc, RTL8366RB_PHYREG(phy, 0, reg), 0, sleep); + err = smi_write_locked(sc, RTL8366_PHYREG(phy, 0, reg), 0, sleep); if (err == 0) { - err = smi_read_locked(sc, RTL8366RB_PADR, &data, sleep); + err = smi_read_locked(sc, RTL8366_PADR, &data, sleep); break; } DEBUG_INCRVAR(phy_access_retries); @@ -715,21 +815,23 @@ rtl_readphy(device_t dev, int phy, int reg) static int rtl_writephy(device_t dev, int phy, int reg, int data) { - struct rtl8366rb_softc *sc = device_get_softc(dev); + struct rtl8366rb_softc *sc; int err, i, sleep; - if (phy < 0 || phy >= RTL8366RB_NUM_PHYS) + sc = device_get_softc(dev); + + if (phy < 0 || phy >= RTL8366_NUM_PHYS) return (ENXIO); - if (reg < 0 || reg >= RTL8366RB_NUM_PHY_REG) + if (reg < 0 || reg >= RTL8366_NUM_PHY_REG) return (ENXIO); sleep = RTL_WAITOK; err = smi_acquire(sc, sleep); if (err != 0) return (EBUSY); for (i = RTL_IICBUS_RETRIES; i--; ) { - err = smi_write_locked(sc, RTL8366RB_PACR, RTL8366RB_PACR_WRITE, sleep); + err = smi_write_locked(sc, RTL8366_PACR, RTL8366_PACR_WRITE, sleep); if (err == 0) - err = smi_write_locked(sc, RTL8366RB_PHYREG(phy, 0, reg), data, sleep); + err = smi_write_locked(sc, RTL8366_PHYREG(phy, 0, reg), data, sleep); if (err == 0) { break; } @@ -745,8 +847,11 @@ rtl_writephy(device_t dev, int phy, int reg, int data) static int rtl8366rb_ifmedia_upd(struct ifnet *ifp) { - struct rtl8366rb_softc *sc = ifp->if_softc; - struct mii_data *mii = device_get_softc(sc->miibus[ifp->if_dunit]); + struct rtl8366rb_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = device_get_softc(sc->miibus[ifp->if_dunit]); mii_mediachg(mii); return (0); @@ -755,8 +860,11 @@ rtl8366rb_ifmedia_upd(struct ifnet *ifp) static void rtl8366rb_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { - struct rtl8366rb_softc *sc = ifp->if_softc; - struct mii_data *mii = device_get_softc(sc->miibus[ifp->if_dunit]); + struct rtl8366rb_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = device_get_softc(sc->miibus[ifp->if_dunit]); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; diff --git a/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h b/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h index 09037059264..66ca0ad245e 100644 --- a/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h +++ b/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2015-2016 Hiroki Mori. * Copyright (c) 2011-2012 Stefan Bethke. * All rights reserved. * @@ -29,7 +30,7 @@ #ifndef _DEV_ETHERSWITCH_RTL8366RBVAR_H_ #define _DEV_ETHERSWITCH_RTL8366RBVAR_H_ -#define RTL8366RB_IIC_ADDR 0xa8 +#define RTL8366_IIC_ADDR 0xa8 #define RTL_IICBUS_TIMEOUT 100 /* us */ #define RTL_IICBUS_READ 1 #define RTL_IICBUS_WRITE 0 @@ -40,138 +41,142 @@ /* Register definitions */ /* Switch Global Configuration */ -#define RTL8366RB_SGCR 0x0000 -#define RTL8366RB_SGCR_EN_BC_STORM_CTRL 0x0001 -#define RTL8366RB_SGCR_MAX_LENGTH_MASK 0x0030 -#define RTL8366RB_SGCR_MAX_LENGTH_1522 0x0000 -#define RTL8366RB_SGCR_MAX_LENGTH_1536 0x0010 -#define RTL8366RB_SGCR_MAX_LENGTH_1552 0x0020 -#define RTL8366RB_SGCR_MAX_LENGTH_9216 0x0030 -#define RTL8366RB_SGCR_EN_VLAN 0x2000 -#define RTL8366RB_SGCR_EN_VLAN_4KTB 0x4000 -#define RTL8366RB_SGCR_EN_QOS 0x8000 +#define RTL8366_SGCR 0x0000 +#define RTL8366_SGCR_EN_BC_STORM_CTRL 0x0001 +#define RTL8366_SGCR_MAX_LENGTH_MASK 0x0030 +#define RTL8366_SGCR_MAX_LENGTH_1522 0x0000 +#define RTL8366_SGCR_MAX_LENGTH_1536 0x0010 +#define RTL8366_SGCR_MAX_LENGTH_1552 0x0020 +#define RTL8366_SGCR_MAX_LENGTH_9216 0x0030 +#define RTL8366_SGCR_EN_VLAN 0x2000 +#define RTL8366_SGCR_EN_VLAN_4KTB 0x4000 +#define RTL8366_SGCR_EN_QOS 0x8000 /* Port Enable Control: DISABLE_PORT[5:0] */ -#define RTL8366RB_PECR 0x0001 +#define RTL8366_PECR 0x0001 /* Switch Security Control 0: DIS_LEARN[5:0] */ -#define RTL8366RB_SSCR0 0x0002 +#define RTL8366_SSCR0 0x0002 /* Switch Security Control 1: DIS_AGE[5:0] */ -#define RTL8366RB_SSCR1 0x0003 +#define RTL8366_SSCR1 0x0003 /* Switch Security Control 2 */ -#define RTL8366RB_SSCR2 0x0004 -#define RTL8366RB_SSCR2_DROP_UNKNOWN_DA 0x0001 +#define RTL8366_SSCR2 0x0004 +#define RTL8366_SSCR2_DROP_UNKNOWN_DA 0x0001 /* Port Link Status: two ports per register */ -#define RTL8366RB_PLSR_BASE 0x0014 -#define RTL8366RB_PLSR_SPEED_MASK 0x03 -#define RTL8366RB_PLSR_SPEED_10 0x00 -#define RTL8366RB_PLSR_SPEED_100 0x01 -#define RTL8366RB_PLSR_SPEED_1000 0x02 -#define RTL8366RB_PLSR_FULLDUPLEX 0x04 -#define RTL8366RB_PLSR_LINK 0x10 -#define RTL8366RB_PLSR_TXPAUSE 0x20 -#define RTL8366RB_PLSR_RXPAUSE 0x40 -#define RTL8366RB_PLSR_NO_AUTO 0x80 +#define RTL8366_PLSR_BASE (sc->chip_type == 0 ? 0x0014 : 0x0060) +#define RTL8366_PLSR_SPEED_MASK 0x03 +#define RTL8366_PLSR_SPEED_10 0x00 +#define RTL8366_PLSR_SPEED_100 0x01 +#define RTL8366_PLSR_SPEED_1000 0x02 +#define RTL8366_PLSR_FULLDUPLEX 0x04 +#define RTL8366_PLSR_LINK 0x10 +#define RTL8366_PLSR_TXPAUSE 0x20 +#define RTL8366_PLSR_RXPAUSE 0x40 +#define RTL8366_PLSR_NO_AUTO 0x80 -/* VLAN Member Configuration, 3 registers per VLAN */ -#define RTL8366RB_VMCR_BASE 0x0020 -#define RTL8366RB_VMCR_MULT 3 -#define RTL8366RB_VMCR_DOT1Q_REG 0 -#define RTL8366RB_VMCR_DOT1Q_VID_SHIFT 0 -#define RTL8366RB_VMCR_DOT1Q_VID_MASK 0x0fff -#define RTL8366RB_VMCR_DOT1Q_PCP_SHIFT 12 -#define RTL8366RB_VMCR_DOT1Q_PCP_MASK 0x7000 -#define RTL8366RB_VMCR_MU_REG 1 -#define RTL8366RB_VMCR_MU_MEMBER_SHIFT 0 -#define RTL8366RB_VMCR_MU_MEMBER_MASK 0x00ff -#define RTL8366RB_VMCR_MU_UNTAG_SHIFT 8 -#define RTL8366RB_VMCR_MU_UNTAG_MASK 0xff00 -#define RTL8366RB_VMCR_FID_REG 2 -#define RTL8366RB_VMCR_FID_FID_SHIFT 0 -#define RTL8366RB_VMCR_FID_FID_MASK 0x0007 -#define RTL8366RB_VMCR(_reg, _vlan) \ - (RTL8366RB_VMCR_BASE + _reg + _vlan * RTL8366RB_VMCR_MULT) +/* VLAN Member Configuration, 3 or 2 registers per VLAN */ +#define RTL8366_VMCR_BASE (sc->chip_type == 0 ? 0x0020 : 0x0016) +#define RTL8366_VMCR_MULT (sc->chip_type == 0 ? 3 : 2) +#define RTL8366_VMCR_DOT1Q_REG 0 +#define RTL8366_VMCR_DOT1Q_VID_SHIFT 0 +#define RTL8366_VMCR_DOT1Q_VID_MASK 0x0fff +#define RTL8366_VMCR_DOT1Q_PCP_SHIFT 12 +#define RTL8366_VMCR_DOT1Q_PCP_MASK 0x7000 +#define RTL8366_VMCR_MU_REG 1 +#define RTL8366_VMCR_MU_MEMBER_SHIFT 0 +#define RTL8366_VMCR_MU_MEMBER_MASK (sc->chip_type == 0 ? 0x00ff : 0x003f) +#define RTL8366_VMCR_MU_UNTAG_SHIFT (sc->chip_type == 0 ? 8 : 6) +#define RTL8366_VMCR_MU_UNTAG_MASK (sc->chip_type == 0 ? 0xff00 : 0x0fc0) +#define RTL8366_VMCR_FID_REG (sc->chip_type == 0 ? 2 : 1) +#define RTL8366_VMCR_FID_FID_SHIFT (sc->chip_type == 0 ? 0 : 12) +#define RTL8366_VMCR_FID_FID_MASK (sc->chip_type == 0 ? 0x0007 : 0x7000) +#define RTL8366_VMCR(_reg, _vlan) \ + (RTL8366_VMCR_BASE + _reg + _vlan * RTL8366_VMCR_MULT) /* VLAN Identifier */ -#define RTL8366RB_VMCR_VID(_r) \ - (_r[RTL8366RB_VMCR_DOT1Q_REG] & RTL8366RB_VMCR_DOT1Q_VID_MASK) +#define RTL8366_VMCR_VID(_r) \ + (_r[RTL8366_VMCR_DOT1Q_REG] & RTL8366_VMCR_DOT1Q_VID_MASK) /* Priority Code Point */ -#define RTL8366RB_VMCR_PCP(_r) \ - ((_r[RTL8366RB_VMCR_DOT1Q_REG] & RTL8366RB_VMCR_DOT1Q_PCP_MASK) \ - >> RTL8366RB_VMCR_DOT1Q_PCP_SHIFT) +#define RTL8366_VMCR_PCP(_r) \ + ((_r[RTL8366_VMCR_DOT1Q_REG] & RTL8366_VMCR_DOT1Q_PCP_MASK) \ + >> RTL8366_VMCR_DOT1Q_PCP_SHIFT) /* Member ports */ -#define RTL8366RB_VMCR_MEMBER(_r) \ - (_r[RTL8366RB_VMCR_MU_REG] & RTL8366RB_VMCR_MU_MEMBER_MASK) +#define RTL8366_VMCR_MEMBER(_r) \ + (_r[RTL8366_VMCR_MU_REG] & RTL8366_VMCR_MU_MEMBER_MASK) /* Untagged ports */ -#define RTL8366RB_VMCR_UNTAG(_r) \ - ((_r[RTL8366RB_VMCR_MU_REG] & RTL8366RB_VMCR_MU_UNTAG_MASK) \ - >> RTL8366RB_VMCR_MU_UNTAG_SHIFT) +#define RTL8366_VMCR_UNTAG(_r) \ + ((_r[RTL8366_VMCR_MU_REG] & RTL8366_VMCR_MU_UNTAG_MASK) \ + >> RTL8366_VMCR_MU_UNTAG_SHIFT) /* Forwarding ID */ -#define RTL8366RB_VMCR_FID(_r) \ - (_r[RTL8366RB_VMCR_FID_REG] & RTL8366RB_VMCR_FID_FID_MASK) +#define RTL8366_VMCR_FID(_r) \ + (sc->chip_type == 0 ? (_r[RTL8366_VMCR_FID_REG] & RTL8366_VMCR_FID_FID_MASK) : \ + ((_r[RTL8366_VMCR_FID_REG] & RTL8366_VMCR_FID_FID_MASK) \ + >> RTL8366_VMCR_FID_FID_SHIFT)) /* * Port VLAN Control, 4 ports per register * Determines the VID for untagged ingress frames through * index into VMC. */ -#define RTL8366RB_PVCR_BASE 0x0063 -#define RTL8366RB_PVCR_PORT_SHIFT 4 -#define RTL8366RB_PVCR_PORT_PERREG (16 / RTL8366RB_PVCR_PORT_SHIFT) -#define RTL8366RB_PVCR_PORT_MASK 0x000f -#define RTL8366RB_PVCR_REG(_port) \ - (RTL8366RB_PVCR_BASE + _port / (RTL8366RB_PVCR_PORT_PERREG)) -#define RTL8366RB_PVCR_VAL(_port, _pvlan) \ - ((_pvlan & RTL8366RB_PVCR_PORT_MASK) << \ - ((_port % RTL8366RB_PVCR_PORT_PERREG) * RTL8366RB_PVCR_PORT_SHIFT)) -#define RTL8366RB_PVCR_GET(_port, _val) \ - (((_val) >> ((_port % RTL8366RB_PVCR_PORT_PERREG) * RTL8366RB_PVCR_PORT_SHIFT)) & RTL8366RB_PVCR_PORT_MASK) +#define RTL8366_PVCR_BASE (sc->chip_type == 0 ? 0x0063 : 0x0058) +#define RTL8366_PVCR_PORT_SHIFT 4 +#define RTL8366_PVCR_PORT_PERREG (16 / RTL8366_PVCR_PORT_SHIFT) +#define RTL8366_PVCR_PORT_MASK 0x000f +#define RTL8366_PVCR_REG(_port) \ + (RTL8366_PVCR_BASE + _port / (RTL8366_PVCR_PORT_PERREG)) +#define RTL8366_PVCR_VAL(_port, _pvlan) \ + ((_pvlan & RTL8366_PVCR_PORT_MASK) << \ + ((_port % RTL8366_PVCR_PORT_PERREG) * RTL8366_PVCR_PORT_SHIFT)) +#define RTL8366_PVCR_GET(_port, _val) \ + (((_val) >> ((_port % RTL8366_PVCR_PORT_PERREG) * RTL8366_PVCR_PORT_SHIFT)) & RTL8366_PVCR_PORT_MASK) /* Reset Control */ -#define RTL8366RB_RCR 0x0100 -#define RTL8366RB_RCR_HARD_RESET 0x0001 -#define RTL8366RB_RCR_SOFT_RESET 0x0002 +#define RTL8366_RCR 0x0100 +#define RTL8366_RCR_HARD_RESET 0x0001 +#define RTL8366_RCR_SOFT_RESET 0x0002 /* Chip Version Control: CHIP_VER[3:0] */ -#define RTL8366RB_CVCR 0x050A +#define RTL8366_CVCR (sc->chip_type == 0 ? 0x050A : 0x0104) /* Chip Identifier */ #define RTL8366RB_CIR 0x0509 #define RTL8366RB_CIR_ID8366RB 0x5937 +#define RTL8366SR_CIR 0x0105 +#define RTL8366SR_CIR_ID8366SR 0x8366 /* VLAN Ingress Control 2: [5:0] */ -#define RTL8366RB_VIC2R 0x037f +#define RTL8366_VIC2R 0x037f /* MIB registers */ -#define RTL8366RB_MCNT_BASE 0x1000 -#define RTL8366RB_MCTLR 0x13f0 -#define RTL8366RB_MCTLR_BUSY 0x0001 -#define RTL8366RB_MCTLR_RESET 0x0002 -#define RTL8366RB_MCTLR_RESET_PORT_MASK 0x00fc -#define RTL8366RB_MCTLR_RESET_ALL 0x0800 +#define RTL8366_MCNT_BASE 0x1000 +#define RTL8366_MCTLR (sc->chip_type == 0 ? 0x13f0 : 0x11F0) +#define RTL8366_MCTLR_BUSY 0x0001 +#define RTL8366_MCTLR_RESET 0x0002 +#define RTL8366_MCTLR_RESET_PORT_MASK 0x00fc +#define RTL8366_MCTLR_RESET_ALL 0x0800 -#define RTL8366RB_MCNT(_port, _r) \ - (RTL8366RB_MCNT_BASE + 0x50 * (_port) + (_r)) -#define RTL8366RB_MCTLR_RESET_PORT(_p) \ +#define RTL8366_MCNT(_port, _r) \ + (RTL8366_MCNT_BASE + 0x50 * (_port) + (_r)) +#define RTL8366_MCTLR_RESET_PORT(_p) \ (1 << ((_p) + 2)) /* PHY Access Control */ -#define RTL8366RB_PACR 0x8000 -#define RTL8366RB_PACR_WRITE 0x0000 -#define RTL8366RB_PACR_READ 0x0001 +#define RTL8366_PACR (sc->chip_type == 0 ? 0x8000 : 0x8028) +#define RTL8366_PACR_WRITE 0x0000 +#define RTL8366_PACR_READ 0x0001 /* PHY Access Data */ -#define RTL8366RB_PADR 0x8002 +#define RTL8366_PADR (sc->chip_type == 0 ? 0x8002 : 0x8029) -#define RTL8366RB_PHYREG(phy, page, reg) \ - (RTL8366RB_PACR | (1 << (((phy) & 0x1f) + 9)) | (((page) & 0xf) << 5) | ((reg) & 0x1f)) +#define RTL8366_PHYREG(phy, page, reg) \ + (0x8000 | (1 << (((phy) & 0x1f) + 9)) | (((page) & (sc->chip_type == 0 ? 0xf : 0x7)) << 5) | ((reg) & 0x1f)) /* general characteristics of the chip */ -#define RTL8366RB_CPU_PORT 5 -#define RTL8366RB_NUM_PORTS 6 -#define RTL8366RB_NUM_PHYS (RTL8366RB_NUM_PORTS-1) -#define RTL8366RB_NUM_VLANS 16 -#define RTL8366RB_NUM_PHY_REG 32 +#define RTL8366_CPU_PORT 5 +#define RTL8366_NUM_PORTS 6 +#define RTL8366_NUM_PHYS (RTL8366_NUM_PORTS-1) +#define RTL8366_NUM_VLANS 16 +#define RTL8366_NUM_PHY_REG 32 #endif From 2567d71370eda7dea7031f5eb074b86e133a039c Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Tue, 15 Nov 2016 22:30:25 +0000 Subject: [PATCH 105/204] [etherswitch] enable phy4/mac4 of ip175c If MII1 interface is disabled, then enable phy4/mac4. Submitted by: Hiroki Mori Reviewed by: mizhka, adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D6832 --- sys/dev/etherswitch/ip17x/ip175c.c | 7 +++++++ sys/dev/etherswitch/ip17x/ip175c.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/sys/dev/etherswitch/ip17x/ip175c.c b/sys/dev/etherswitch/ip17x/ip175c.c index 30614a42417..c87543bc5b1 100644 --- a/sys/dev/etherswitch/ip17x/ip175c.c +++ b/sys/dev/etherswitch/ip17x/ip175c.c @@ -234,6 +234,13 @@ ip175c_get_vlan_mode(struct ip17x_softc *sc) void ip175c_attach(struct ip17x_softc *sc) { + uint32_t data; + + data = ip17x_readphy(sc->sc_dev, IP175C_MII_PHY, IP175C_MII_CTL_REG); + device_printf(sc->sc_dev, "MII: %x\n", data); + /* check mii1 interface if disabled then phy4 and mac4 hold on switch */ + if((data & (1 << IP175C_MII_MII1_RMII_EN)) == 0) + sc->phymask |= 0x10; sc->hal.ip17x_reset = ip175c_reset; sc->hal.ip17x_hw_setup = ip175c_hw_setup; diff --git a/sys/dev/etherswitch/ip17x/ip175c.h b/sys/dev/etherswitch/ip17x/ip175c.h index 8abb4b69619..2b9e05665d2 100644 --- a/sys/dev/etherswitch/ip17x/ip175c.h +++ b/sys/dev/etherswitch/ip17x/ip175c.h @@ -35,6 +35,9 @@ #define IP175C_MODE_REG 31 #define IP175C_RESET_PHY 30 #define IP175C_RESET_REG 0 +#define IP175C_MII_PHY 31 +#define IP175C_MII_CTL_REG 5 +#define IP175C_MII_MII1_RMII_EN 8 #define IP175C_LAST_VLAN 15 From 02b2e3c5fb706764e27e6fd1d39ced101df22b1d Mon Sep 17 00:00:00 2001 From: Jared McNeill Date: Tue, 15 Nov 2016 23:46:01 +0000 Subject: [PATCH 106/204] Allow the MMC frequency to be set up to 52MHz for MMC high speed timings. --- sys/arm/allwinner/clk/aw_mmcclk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/allwinner/clk/aw_mmcclk.c b/sys/arm/allwinner/clk/aw_mmcclk.c index 52ed231a952..44377a8ced7 100644 --- a/sys/arm/allwinner/clk/aw_mmcclk.c +++ b/sys/arm/allwinner/clk/aw_mmcclk.c @@ -185,7 +185,7 @@ aw_mmcclk_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout, ophase = 0; phase = 5; n = 2; - } else if (*fout <= 50000000) { + } else if (*fout <= 52000000) { parent_idx = CLK_SRC_SEL_PLL6; ophase = 3; phase = 5; From ce4e4d612baf13d50dbcf2e49535f42a07ecb7aa Mon Sep 17 00:00:00 2001 From: Jared McNeill Date: Tue, 15 Nov 2016 23:48:30 +0000 Subject: [PATCH 107/204] On command error, reset only DMA and FIFO engines instead of the entire controller. Fixes eMMC device detection on OrangePi Plus 2e (and likely others). --- sys/arm/allwinner/a10_mmc.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/sys/arm/allwinner/a10_mmc.c b/sys/arm/allwinner/a10_mmc.c index a5eecb80de1..3c94bba9f12 100644 --- a/sys/arm/allwinner/a10_mmc.c +++ b/sys/arm/allwinner/a10_mmc.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #define A10_MMC_DMA_SEGS ((MAXPHYS / PAGE_SIZE) + 1) #define A10_MMC_DMA_MAX_SIZE 0x2000 #define A10_MMC_DMA_FTRGLEVEL 0x20070008 +#define A10_MMC_RESET_RETRY 1000 #define CARD_ID_FREQUENCY 400000 @@ -229,7 +230,7 @@ a10_mmc_attach(device_t dev) bus_width = 4; sc->a10_host.f_min = 400000; - sc->a10_host.f_max = 50000000; + sc->a10_host.f_max = 52000000; sc->a10_host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; sc->a10_host.mode = mode_sd; sc->a10_host.caps = MMC_CAP_HSPEED; @@ -449,11 +450,27 @@ a10_mmc_req_done(struct a10_mmc_softc *sc) { struct mmc_command *cmd; struct mmc_request *req; + uint32_t val, mask; + int retry; cmd = sc->a10_req->cmd; if (cmd->error != MMC_ERR_NONE) { - /* Reset the controller. */ - a10_mmc_reset(sc); + /* Reset the FIFO and DMA engines. */ + mask = A10_MMC_CTRL_FIFO_RST | A10_MMC_CTRL_DMA_RST; + val = A10_MMC_READ_4(sc, A10_MMC_GCTL); + A10_MMC_WRITE_4(sc, A10_MMC_GCTL, val | mask); + + retry = A10_MMC_RESET_RETRY; + while (--retry > 0) { + val = A10_MMC_READ_4(sc, A10_MMC_GCTL); + if ((val & mask) == 0) + break; + DELAY(10); + } + if (retry == 0) + device_printf(sc->a10_dev, + "timeout resetting DMA/FIFO\n"); + a10_mmc_update_clock(sc, 1); } req = sc->a10_req; From 320ab9c026c1a896f78658a24fd2a6170a0fcfc8 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 16 Nov 2016 00:21:18 +0000 Subject: [PATCH 108/204] Remove a lingering reference to cache pages from vmstat(8). Reported by: alc --- usr.bin/vmstat/vmstat.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 14fad8ca392..40c6f54451b 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1085,8 +1085,6 @@ dosum(void) sum.v_vforkpages); xo_emit("{:pages-rfork/%9u} {N:pages affected by rfork}()\n", sum.v_rforkpages); - xo_emit("{:pages-total-cached/%9u} {N:pages cached}\n", - sum.v_tcached); xo_emit("{:pages-freed/%9u} {N:pages freed}\n", sum.v_tfree); xo_emit("{:pages-freed-by-daemon/%9u} {N:pages freed by daemon}\n", From 63659ba6dfe6228dd4f21ad1ddbcf53c00636274 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Wed, 16 Nov 2016 01:11:49 +0000 Subject: [PATCH 109/204] Reduce NFS "NFSv4( mounted on)? fileid > 32bits" log spam. Rather than printing a warning for every time we receive a fileid > 2^32 from the NFS server, count warnings and print at most one of each warning type per minute, e.g., Nov 15 05:17:34 ip-172-30-1-221 kernel: NFSv4 fileid > 32bits (24730 occurrences) Nov 15 05:17:56 ip-172-30-1-221 kernel: NFSv4 mounted on fileid > 32bits (178 occurrences) Nov 15 05:18:53 ip-172-30-1-221 kernel: NFSv4 fileid > 32bits (7582 occurrences) Nov 15 05:18:58 ip-172-30-1-221 kernel: NFSv4 mounted on fileid > 32bits (23 occurrences) A buildworld with an NFS mounted /usr/obj can otherwise result in hundreds of thousands of lines being printed, which seems unnecessarily verbose. When ino_t becomes a 64-bit type, these printfs will no longer be needed (and the problems associated with truncating 64-bit fileids to generate 32-bit inode numbers will also go away). Reviewed by: rmacklem MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8523 --- sys/fs/nfs/nfs_commonsubs.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 02b85e7e733..7b65a606129 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -827,6 +827,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, struct dqblk dqb; uid_t savuid; #endif + static struct timeval last64fileid; + static size_t count64fileid; + static struct timeval last64mountfileid; + static size_t count64mountfileid; + static struct timeval warninterval = { 60, 0 }; + if (compare) { retnotsup = 0; error = nfsrv_getattrbits(nd, &attrbits, NULL, &retnotsup); @@ -1202,8 +1208,14 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, *retcmpp = NFSERR_NOTSAME; } } else if (nap != NULL) { - if (*tl++) - printf("NFSv4 fileid > 32bits\n"); + if (*tl++) { + count64fileid++; + if (ratecheck(&last64fileid, &warninterval)) { + printf("NFSv4 fileid > 32bits (%zu occurrences)\n", + count64fileid); + count64fileid = 0; + } + } nap->na_fileid = thyp; } attrsum += NFSX_HYPER; @@ -1740,8 +1752,14 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, } } } else if (nap != NULL) { - if (*tl++) - printf("NFSv4 mounted on fileid > 32bits\n"); + if (*tl++) { + count64mountfileid++; + if (ratecheck(&last64mountfileid, &warninterval)) { + printf("NFSv4 mounted on fileid > 32bits (%zu occurrences)\n", + count64mountfileid); + count64mountfileid = 0; + } + } nap->na_mntonfileno = thyp; } attrsum += NFSX_HYPER; From 099a0e1beab62be66320de088b287ebf3fc3bc84 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Wed, 16 Nov 2016 02:14:07 +0000 Subject: [PATCH 110/204] Add a GPIO poweroff and reset driver. Summary: This implements part of the gpio-poweroff and gpio-restart device tree bindings. Optional properties are not handled currently. It also currently only supports level-triggered reset. Reviewed By: gonzo Differential Revision: https://reviews.freebsd.org/D8521 --- sys/conf/files | 1 + sys/dev/gpio/gpiopower.c | 137 ++++++++++++++++++++++++++++++++++++ sys/powerpc/conf/MPC85XX | 1 + sys/powerpc/conf/MPC85XXSPE | 1 + 4 files changed, 140 insertions(+) create mode 100644 sys/dev/gpio/gpiopower.c diff --git a/sys/conf/files b/sys/conf/files index c21463ab7a1..07864e8ede9 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1661,6 +1661,7 @@ dev/gpio/gpioc.c optional gpio \ dev/gpio/gpioiic.c optional gpioiic dev/gpio/gpioled.c optional gpioled !fdt dev/gpio/gpioled_fdt.c optional gpioled fdt +dev/gpio/gpiopower.c optional gpiopower fdt dev/gpio/gpioregulator.c optional gpioregulator fdt ext_resources dev/gpio/gpiospi.c optional gpiospi dev/gpio/gpio_if.m optional gpio diff --git a/sys/dev/gpio/gpiopower.c b/sys/dev/gpio/gpiopower.c new file mode 100644 index 00000000000..98b635e3fd2 --- /dev/null +++ b/sys/dev/gpio/gpiopower.c @@ -0,0 +1,137 @@ +/*- + * Copyright (c) 2016 Justin Hibbits + * 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 + +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +struct gpiopower_softc { + gpio_pin_t sc_pin; + int sc_rbmask; +}; + +static void gpiopower_assert(device_t dev, int howto); + +static int +gpiopower_probe(device_t dev) +{ + + if (ofw_bus_is_compatible(dev, "gpio-poweroff")) { + device_set_desc(dev, "GPIO poweroff control"); + return (0); + } else if (ofw_bus_is_compatible(dev, "gpio-restart")) { + device_set_desc(dev, "GPIO restart control"); + return (0); + } + + return (ENXIO); +} + +static int +gpiopower_attach(device_t dev) +{ + struct gpiopower_softc *sc; + phandle_t node; + + sc = device_get_softc(dev); + + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + + ofw_gpiobus_parse_gpios(dev, "gpios", &sc->sc_pin); + if (sc->sc_pin == NULL) { + device_printf(dev, "failed to map GPIO pin\n"); + return (ENXIO); + } + + if (ofw_bus_is_compatible(dev, "gpio-poweroff")) + sc->sc_rbmask = RB_HALT | RB_POWEROFF; + else + sc->sc_rbmask = 0; + EVENTHANDLER_REGISTER(shutdown_final, gpiopower_assert, dev, + SHUTDOWN_PRI_LAST); + gpio_pin_setflags(sc->sc_pin, GPIO_PIN_OUTPUT); + + return (0); +} + +static void +gpiopower_assert(device_t dev, int howto) +{ + struct gpiopower_softc *sc; + int do_assert; + + sc = device_get_softc(dev); + do_assert = sc->sc_rbmask ? (sc->sc_rbmask & howto) : + ((howto & RB_HALT) == 0); + + if (!do_assert) + return; + + if (howto & RB_POWEROFF) + device_printf(dev, "powering system off\n"); + else if ((howto & RB_HALT) == 0) + device_printf(dev, "resetting system\n"); + else + return; + + gpio_pin_set_active(sc->sc_pin, true); + + /* Wait a second for it to trip */ + DELAY(10000000); +} + +static devclass_t gpiopower_devclass; + +static device_method_t gpiopower_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, gpiopower_probe), + DEVMETHOD(device_attach, gpiopower_attach), + + DEVMETHOD_END +}; + +static driver_t gpiopower_driver = { + "gpiopower", + gpiopower_methods, + sizeof(struct gpiopower_softc) +}; + +DRIVER_MODULE(gpiopower, simplebus, gpiopower_driver, gpiopower_devclass, 0, 0); +MODULE_DEPEND(gpiopower, gpiobus, 1, 1, 1); diff --git a/sys/powerpc/conf/MPC85XX b/sys/powerpc/conf/MPC85XX index 86e13862e67..f3ae67d6a8f 100644 --- a/sys/powerpc/conf/MPC85XX +++ b/sys/powerpc/conf/MPC85XX @@ -75,6 +75,7 @@ device alc device ether device fxp device gpio +device gpiopower device iic device iicbus #device isa diff --git a/sys/powerpc/conf/MPC85XXSPE b/sys/powerpc/conf/MPC85XXSPE index 94da34fc129..f9a0bc982ab 100644 --- a/sys/powerpc/conf/MPC85XXSPE +++ b/sys/powerpc/conf/MPC85XXSPE @@ -75,6 +75,7 @@ device alc device ether device fxp device gpio +device gpiopower device iic device iicbus #device isa From 4fab83fffcea115d387aed8d93ca90cea54db07e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 16 Nov 2016 02:51:24 +0000 Subject: [PATCH 111/204] Update to reflect the demise of PG_CACHED pages. Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8530 --- share/man/man9/vm_page_alloc.9 | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/share/man/man9/vm_page_alloc.9 b/share/man/man9/vm_page_alloc.9 index 082574f4d15..aa3854b47ae 100644 --- a/share/man/man9/vm_page_alloc.9 +++ b/share/man/man9/vm_page_alloc.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2012 +.Dd November 16, 2016 .Dt VM_PAGE_ALLOC 9 .Os .Sh NAME @@ -52,8 +52,6 @@ The page returned is inserted into the object, unless .Dv VM_ALLOC_NOOBJ is specified in the .Fa req . -The page may exist in the vm object cache, in which case it will -be reactivated instead, moving from the cache into the object page list. .Pp .Fn vm_page_alloc will not sleep. @@ -89,7 +87,7 @@ than zero. .El .Pp The optional flags are: -.Bl -tag -width ".Dv VM_ALLOC_IFNOTCACHED" +.Bl -tag -width ".Dv VM_ALLOC_NOBUSY" .It Dv VM_ALLOC_NOBUSY The returned page will not be exclusive busy. .It Dv VM_ALLOC_NODUMP @@ -100,16 +98,6 @@ Do not associate the allocated page with a vm object. The .Fa object argument is ignored. -.It Dv VM_ALLOC_IFCACHED -Allocate the page only if it is cached. -Otherwise, return -.Dv NULL . -.It Dv VM_ALLOC_IFNOTCACHED -Only allocate the page if it is not cached in the -.Fa object . -If the page at the specified -.Fa pindex -is cached, NULL is returned instead. .It Dv VM_ALLOC_SBUSY The returned page will be shared busy. .It Dv VM_ALLOC_WIRED From d037279cc07245b925f99b2dd6dafd91945b7e53 Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Wed, 16 Nov 2016 03:19:36 +0000 Subject: [PATCH 112/204] Set endianness and floating point flags explicitly for MIPS targets The tree can be build with an external toolchain that will not necessarily default to desired settings, so we have to specify the required flags explicitly to force the required compilation mode. Reviewed by: adrian, br Sponsored by: https://reviews.freebsd.org/D8505 --- share/mk/bsd.cpu.mk | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index ae29f14aebe..874beed525a 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -303,9 +303,22 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3 .if ${MACHINE_CPUARCH} == "mips" CFLAGS += -G0 -.if ${MACHINE_ARCH:Mmips*hf} +. if ${MACHINE_ARCH:Mmips*el*} != "" +ACFLAGS += -EL +AFLAGS += -EL +CFLAGS += -EL +LDFLAGS += -EL +. else +ACFLAGS += -EB +AFLAGS += -EB +CFLAGS += -EB +LDFLAGS += -EB +. endif +. if ${MACHINE_ARCH:Mmips*hf} CFLAGS += -mhard-float -.endif +. else +CFLAGS += -msoft-float +. endif .endif ########## arm From 20d197f46344337eacb3b79b7414f19ae920cd4d Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Wed, 16 Nov 2016 03:21:49 +0000 Subject: [PATCH 113/204] Make MIPS startup assembly files use neutral float ABI. This allows these files to be used with hard and softfloat targets with no special flags passed to the compiler. Reviewed by: adrian, br, imp Differential Revision: https://reviews.freebsd.org/D8506 --- lib/csu/mips/crti.S | 1 + lib/csu/mips/crtn.S | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/csu/mips/crti.S b/lib/csu/mips/crti.S index cada08d7d46..1553f9e13b9 100644 --- a/lib/csu/mips/crti.S +++ b/lib/csu/mips/crti.S @@ -1,6 +1,7 @@ #include __FBSDID("$FreeBSD$"); + .gnu_attribute 4, 0 .section .init,"ax",%progbits .align 4 .globl _init diff --git a/lib/csu/mips/crtn.S b/lib/csu/mips/crtn.S index 8d190f811e2..8cef67ffec0 100644 --- a/lib/csu/mips/crtn.S +++ b/lib/csu/mips/crtn.S @@ -1,6 +1,7 @@ #include __FBSDID("$FreeBSD$"); + .gnu_attribute 4, 0 .section .init,"ax",%progbits .align 4 .set noreorder From 5d76308275fe5e0542c563483c21d452e11d53f4 Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Wed, 16 Nov 2016 03:24:20 +0000 Subject: [PATCH 114/204] Compile trampoline with soft-float on MIPS, to match the rest of the kernel Core kernel is always compiled with -msoft-float on all of our platforms, make sure we follow the suit with trampoline as well. Reviewed by: adrian, br, imp Differential Revision: https://reviews.freebsd.org/D8507 --- sys/conf/Makefile.mips | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/conf/Makefile.mips b/sys/conf/Makefile.mips index d1e69239080..de006c018e6 100644 --- a/sys/conf/Makefile.mips +++ b/sys/conf/Makefile.mips @@ -52,6 +52,8 @@ CFLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS) HACK_EXTRA_FLAGS+=${EXTRA_FLAGS} $(ARCH_FLAGS) TRAMP_ARCH_FLAGS?=$(ARCH_FLAGS) TRAMP_EXTRA_FLAGS=${EXTRA_FLAGS} ${TRAMP_ARCH_FLAGS} +# Kernel code is always compiled with soft-float on MIPS +TRAMP_EXTRA_FLAGS+=-msoft-float .if ${MACHINE_ARCH:Mmips64*} != "" TRAMP_ELFSIZE=64 .else From b2f831c009880656999df62b1258d98494634783 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Wed, 16 Nov 2016 05:24:42 +0000 Subject: [PATCH 115/204] Simplify the page tracking for VA<->PA translations. Drop the tracking down to the pmap layer, with optimizations to only track necessary pages. This should give a (slight) performance improvement, as well as a stability improvement, as the tracking is already mostly handled by the pmap layer. --- sys/contrib/ncsw/inc/xx_ext.h | 5 -- sys/contrib/ncsw/user/env/xx.c | 114 +++++-------------------- sys/dev/dpaa/fman.c | 2 - sys/dev/dpaa/if_dtsec.c | 2 - sys/dev/dpaa/if_dtsec_rm.c | 1 - sys/powerpc/booke/pmap.c | 41 ++++++++- sys/powerpc/include/pmap.h | 2 + sys/powerpc/mpc85xx/mpc85xx.h | 2 + sys/powerpc/mpc85xx/platform_mpc85xx.c | 4 + 9 files changed, 68 insertions(+), 105 deletions(-) diff --git a/sys/contrib/ncsw/inc/xx_ext.h b/sys/contrib/ncsw/inc/xx_ext.h index ce8cae31005..f011b58b65a 100644 --- a/sys/contrib/ncsw/inc/xx_ext.h +++ b/sys/contrib/ncsw/inc/xx_ext.h @@ -930,9 +930,4 @@ t_Error XX_IpcSendMessage(t_Handle h_Session, /** @} */ /* end of xx_ipc group */ /** @} */ /* end of xx_id group */ -/** FreeBSD Specific additions. */ -void XX_TrackInit(void); -physAddress_t XX_TrackAddress(void *addr); -void XX_UntrackAddress(void *addr); - #endif /* __XX_EXT_H */ diff --git a/sys/contrib/ncsw/user/env/xx.c b/sys/contrib/ncsw/user/env/xx.c index 621c2025e16..c153c69dcef 100644 --- a/sys/contrib/ncsw/user/env/xx.c +++ b/sys/contrib/ncsw/user/env/xx.c @@ -51,6 +51,7 @@ #include #include +#include #include "error_ext.h" #include "std_ext.h" #include "list_ext.h" @@ -124,19 +125,6 @@ struct XX_PortalInfo { static struct XX_PortalInfo XX_PInfo; -/* The lower 9 bits, through emprical testing, tend to be 0. */ -#define XX_MALLOC_TRACK_SHIFT 9 - -typedef struct XX_MallocTrackStruct { - LIST_ENTRY(XX_MallocTrackStruct) entries; - physAddress_t pa; - void *va; -} XX_MallocTrackStruct; - -LIST_HEAD(XX_MallocTrackerList, XX_MallocTrackStruct) *XX_MallocTracker; -u_long XX_MallocHashMask; -static XX_MallocTrackStruct * XX_FindTracker(physAddress_t pa); - void XX_Exit(int status) { @@ -266,7 +254,6 @@ XX_FreeSmart(void *p) KASSERT(XX_MallocSmartMap[start] > 0, ("XX_FreeSmart: Double or mid-block free!\n")); - XX_UntrackAddress(p); /* Free region */ slices = XX_MallocSmartMap[start]; XX_MallocSmartMapClear(start, slices); @@ -279,8 +266,6 @@ void XX_Free(void *p) { - if (p != NULL) - XX_UntrackAddress(p); free(p, M_NETCOMMSW); } @@ -758,6 +743,11 @@ XX_VirtToPhys(void *addr) if (addr == NULL) return (-1); + /* Check CCSR */ + if ((vm_offset_t)addr >= ccsrbar_va && + (vm_offset_t)addr < ccsrbar_va + ccsrbar_size) + return (((vm_offset_t)addr - ccsrbar_va) + ccsrbar_pa); + /* Handle BMAN mappings */ if (((vm_offset_t)addr >= XX_PInfo.portal_ce_va[BM_PORTAL]) && ((vm_offset_t)addr < XX_PInfo.portal_ce_va[BM_PORTAL] + @@ -784,10 +774,12 @@ XX_VirtToPhys(void *addr) return (XX_PInfo.portal_ci_pa[QM_PORTAL][cpu] + (vm_offset_t)addr - XX_PInfo.portal_ci_va[QM_PORTAL]); - paddr = XX_TrackAddress(addr); - if (paddr == -1) + paddr = pmap_kextract((vm_offset_t)addr); + if (paddr == 0) printf("NetCommSW: " "Unable to translate virtual address 0x%08X!\n", addr); + else + pmap_track_page(kernel_pmap, (vm_offset_t)addr); return (paddr); } @@ -795,9 +787,15 @@ XX_VirtToPhys(void *addr) void * XX_PhysToVirt(physAddress_t addr) { - XX_MallocTrackStruct *ts; + struct pv_entry *pv; + vm_page_t page; int cpu; + /* Check CCSR */ + if (addr >= ccsrbar_pa && addr < ccsrbar_pa + ccsrbar_size) + return ((void *)((vm_offset_t)(addr - ccsrbar_pa) + + ccsrbar_va)); + cpu = PCPU_GET(cpuid); /* Handle BMAN mappings */ @@ -826,12 +824,11 @@ XX_PhysToVirt(physAddress_t addr) return ((void *)(XX_PInfo.portal_ci_va[QM_PORTAL] + (vm_offset_t)(addr - XX_PInfo.portal_ci_pa[QM_PORTAL][cpu]))); - mtx_lock(&XX_MallocTrackLock); - ts = XX_FindTracker(addr); - mtx_unlock(&XX_MallocTrackLock); + page = PHYS_TO_VM_PAGE(addr); + pv = TAILQ_FIRST(&page->md.pv_list); - if (ts != NULL) - return ts->va; + if (pv != NULL) + return ((void *)(pv->pv_va + ((vm_offset_t)addr & PAGE_MASK))); printf("NetCommSW: " "Unable to translate physical address 0x%08llX!\n", addr); @@ -877,72 +874,3 @@ XX_PortalSetInfo(device_t dev) end: free(dev_name, M_TEMP); } - -static inline XX_MallocTrackStruct * -XX_FindTracker(physAddress_t pa) -{ - struct XX_MallocTrackerList *l; - XX_MallocTrackStruct *tp; - - l = &XX_MallocTracker[(pa >> XX_MALLOC_TRACK_SHIFT) & XX_MallocHashMask]; - - LIST_FOREACH(tp, l, entries) { - if (tp->pa == pa) - return tp; - } - - return NULL; -} - -void -XX_TrackInit(void) -{ - if (XX_MallocTracker == NULL) { - XX_MallocTracker = hashinit(64, M_NETCOMMSW_MT, - &XX_MallocHashMask); - } -} - -physAddress_t -XX_TrackAddress(void *addr) -{ - physAddress_t pa; - struct XX_MallocTrackerList *l; - XX_MallocTrackStruct *ts; - - pa = pmap_kextract((vm_offset_t)addr); - - l = &XX_MallocTracker[(pa >> XX_MALLOC_TRACK_SHIFT) & XX_MallocHashMask]; - - mtx_lock(&XX_MallocTrackLock); - if (XX_FindTracker(pa) == NULL) { - ts = malloc(sizeof(*ts), M_NETCOMMSW_MT, M_NOWAIT); - if (ts == NULL) - return (-1); - ts->va = addr; - ts->pa = pa; - LIST_INSERT_HEAD(l, ts, entries); - } - mtx_unlock(&XX_MallocTrackLock); - - return (pa); -} - -void -XX_UntrackAddress(void *addr) -{ - physAddress_t pa; - XX_MallocTrackStruct *ts; - - pa = pmap_kextract((vm_offset_t)addr); - - KASSERT(XX_MallocTracker != NULL, - ("Untracking an address before it's even initialized!\n")); - - mtx_lock(&XX_MallocTrackLock); - ts = XX_FindTracker(pa); - if (ts != NULL) - LIST_REMOVE(ts, entries); - mtx_unlock(&XX_MallocTrackLock); - free(ts, M_NETCOMMSW_MT); -} diff --git a/sys/dev/dpaa/fman.c b/sys/dev/dpaa/fman.c index fca65f33429..4a90c10514a 100644 --- a/sys/dev/dpaa/fman.c +++ b/sys/dev/dpaa/fman.c @@ -273,8 +273,6 @@ fman_attach(device_t dev) return (ENXIO); } - XX_TrackInit(); - node = ofw_bus_get_node(dev); if (OF_getencprop(node, "fsl,qman-channel-range", qchan_range, sizeof(qchan_range)) <= 0) { diff --git a/sys/dev/dpaa/if_dtsec.c b/sys/dev/dpaa/if_dtsec.c index e29d89adb62..38f27fc847c 100644 --- a/sys/dev/dpaa/if_dtsec.c +++ b/sys/dev/dpaa/if_dtsec.c @@ -582,8 +582,6 @@ dtsec_attach(device_t dev) if (XX_MallocSmartInit() != E_OK) return (ENXIO); - XX_TrackInit(); - /* Init locks */ mtx_init(&sc->sc_lock, device_get_nameunit(dev), "DTSEC Global Lock", MTX_DEF); diff --git a/sys/dev/dpaa/if_dtsec_rm.c b/sys/dev/dpaa/if_dtsec_rm.c index 50ef2be1ac6..66c20e3175a 100644 --- a/sys/dev/dpaa/if_dtsec_rm.c +++ b/sys/dev/dpaa/if_dtsec_rm.c @@ -136,7 +136,6 @@ static void dtsec_rm_fi_free(struct dtsec_softc *sc, struct dtsec_rm_frame_info *fi) { - XX_UntrackAddress(fi); uma_zfree(sc->sc_fi_zone, fi); } /** @} */ diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index a04aba89841..5faf8a8937c 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -872,10 +872,11 @@ pte_remove(mmu_t mmu, pmap_t pmap, vm_offset_t va, uint8_t flags) if (PTE_ISWIRED(pte)) pmap->pm_stats.wired_count--; + /* Get vm_page_t for mapped pte. */ + m = PHYS_TO_VM_PAGE(PTE_PA(pte)); + /* Handle managed entry. */ if (PTE_ISMANAGED(pte)) { - /* Get vm_page_t for mapped pte. */ - m = PHYS_TO_VM_PAGE(PTE_PA(pte)); if (PTE_ISMODIFIED(pte)) vm_page_dirty(m); @@ -884,6 +885,15 @@ pte_remove(mmu_t mmu, pmap_t pmap, vm_offset_t va, uint8_t flags) vm_page_aflag_set(m, PGA_REFERENCED); pv_remove(pmap, va, m); + } else if (m->md.pv_tracked) { + /* + * Always pv_insert()/pv_remove() on MPC85XX, in case DPAA is + * used. This is needed by the NCSW support code for fast + * VA<->PA translation. + */ + pv_remove(pmap, va, m); + if (TAILQ_EMPTY(&m->md.pv_list)) + m->md.pv_tracked = false; } mtx_lock_spin(&tlbivax_mutex); @@ -3466,6 +3476,33 @@ pmap_early_io_map(vm_paddr_t pa, vm_size_t size) return (va); } +void +pmap_track_page(pmap_t pmap, vm_offset_t va) +{ + vm_paddr_t pa; + vm_page_t page; + struct pv_entry *pve; + + va &= ~PAGE_MASK; + pa = pmap_kextract(va); + + rw_wlock(&pvh_global_lock); + PMAP_LOCK(pmap); + page = PHYS_TO_VM_PAGE(pa); + + TAILQ_FOREACH(pve, &page->md.pv_list, pv_link) { + if ((pmap == pve->pv_pmap) && (va == pve->pv_va)) { + goto out; + } + } + page->md.pv_tracked = true; + pv_insert(pmap, va, page); +out: + PMAP_UNLOCK(pmap); + rw_wunlock(&pvh_global_lock); +} + + /* * Setup MAS4 defaults. * These values are loaded to MAS0-2 on a TLB miss. diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h index c6b819804b3..8c758f4a6e0 100644 --- a/sys/powerpc/include/pmap.h +++ b/sys/powerpc/include/pmap.h @@ -204,6 +204,7 @@ typedef struct pv_entry *pv_entry_t; struct md_page { TAILQ_HEAD(, pv_entry) pv_list; + bool pv_tracked; }; #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT @@ -261,6 +262,7 @@ extern int pmap_bootstrapped; vm_offset_t pmap_early_io_map(vm_paddr_t pa, vm_size_t size); void pmap_early_io_unmap(vm_offset_t va, vm_size_t size); +void pmap_track_page(pmap_t pmap, vm_offset_t va); #endif diff --git a/sys/powerpc/mpc85xx/mpc85xx.h b/sys/powerpc/mpc85xx/mpc85xx.h index 697533b40af..dd1f9b52ddb 100644 --- a/sys/powerpc/mpc85xx/mpc85xx.h +++ b/sys/powerpc/mpc85xx/mpc85xx.h @@ -36,6 +36,8 @@ * Configuration control and status registers */ extern vm_offset_t ccsrbar_va; +extern vm_paddr_t ccsrbar_pa; +extern vm_size_t ccsrbar_size; #define CCSRBAR_VA ccsrbar_va #define OCP85XX_CCSRBAR (CCSRBAR_VA + 0x0) #define OCP85XX_BPTR (CCSRBAR_VA + 0x20) diff --git a/sys/powerpc/mpc85xx/platform_mpc85xx.c b/sys/powerpc/mpc85xx/platform_mpc85xx.c index 592fe961efd..39309f5271f 100644 --- a/sys/powerpc/mpc85xx/platform_mpc85xx.c +++ b/sys/powerpc/mpc85xx/platform_mpc85xx.c @@ -78,7 +78,9 @@ struct cpu_release { #endif extern uint32_t *bootinfo; +vm_paddr_t ccsrbar_pa; vm_offset_t ccsrbar_va; +vm_size_t ccsrbar_size; static int cpu, maxcpu; @@ -194,6 +196,8 @@ mpc85xx_attach(platform_t plat) ccsrsize |= ranges[i]; } ccsrbar_va = pmap_early_io_map(ccsrbar, ccsrsize); + ccsrbar_pa = ccsrbar; + ccsrbar_size = ccsrsize; #if 0 mpc85xx_fix_errata(ccsrbar_va); From c8b32f717de072ba5ba3e7386eafe9ff2efca5a1 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Wed, 16 Nov 2016 09:02:17 +0000 Subject: [PATCH 116/204] hyperv/vmbus: add a new method to get vcpu_id vcpu_id is host's representation of guest CPU. We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus driver is loaded. Later, when a driver, like the coming pcib driver, talks to the host and needs to refer to a guest CPU, the driver must use the vcpu_id. Reviewed by: jhb, sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8410 --- sys/dev/hyperv/vmbus/vmbus.c | 11 +++++++++++ sys/dev/hyperv/vmbus/vmbus_if.m | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index 11be35ba4d7..e79f023cae4 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -77,6 +77,8 @@ static int vmbus_child_pnpinfo_str(device_t, device_t, static uint32_t vmbus_get_version_method(device_t, device_t); static int vmbus_probe_guid_method(device_t, device_t, const struct hyperv_guid *); +static uint32_t vmbus_get_vcpu_id_method(device_t bus, + device_t dev, int cpu); static int vmbus_init(struct vmbus_softc *); static int vmbus_connect(struct vmbus_softc *, uint32_t); @@ -135,6 +137,7 @@ static device_method_t vmbus_methods[] = { /* Vmbus interface */ DEVMETHOD(vmbus_get_version, vmbus_get_version_method), DEVMETHOD(vmbus_probe_guid, vmbus_probe_guid_method), + DEVMETHOD(vmbus_get_vcpu_id, vmbus_get_vcpu_id_method), DEVMETHOD_END }; @@ -991,6 +994,14 @@ vmbus_probe_guid_method(device_t bus, device_t dev, return ENXIO; } +static uint32_t +vmbus_get_vcpu_id_method(device_t bus, device_t dev, int cpu) +{ + const struct vmbus_softc *sc = device_get_softc(bus); + + return (VMBUS_PCPU_GET(sc, vcpuid, cpu)); +} + static int vmbus_probe(device_t dev) { diff --git a/sys/dev/hyperv/vmbus/vmbus_if.m b/sys/dev/hyperv/vmbus/vmbus_if.m index 592f45f5d88..65de846eb6b 100644 --- a/sys/dev/hyperv/vmbus/vmbus_if.m +++ b/sys/dev/hyperv/vmbus/vmbus_if.m @@ -45,3 +45,9 @@ METHOD int probe_guid { device_t dev; const struct hyperv_guid *guid; }; + +METHOD uint32_t get_vcpu_id { + device_t bus; + device_t dev; + int cpu; +}; From 522c192d38d8ead2d016a8d892cdc0d77d8ad7ba Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Wed, 16 Nov 2016 09:08:32 +0000 Subject: [PATCH 117/204] hyperv/vmbus: add new vmbus methods to support PCIe pass-through The new methods will be used by the coming pcib driver. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8409 --- sys/dev/hyperv/vmbus/vmbus.c | 234 +++++++++++++++++++++++++++++++ sys/dev/hyperv/vmbus/vmbus_var.h | 10 ++ 2 files changed, 244 insertions(+) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index e79f023cae4..87182401dd0 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -44,10 +44,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include +#include #include #include @@ -58,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include "acpi_if.h" +#include "pcib_if.h" #include "vmbus_if.h" #define VMBUS_GPADL_START 0xe1e10 @@ -74,6 +78,20 @@ static int vmbus_read_ivar(device_t, device_t, int, uintptr_t *); static int vmbus_child_pnpinfo_str(device_t, device_t, char *, size_t); +static struct resource *vmbus_alloc_resource(device_t dev, + device_t child, int type, int *rid, + rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); +static int vmbus_alloc_msi(device_t bus, device_t dev, + int count, int maxcount, int *irqs); +static int vmbus_release_msi(device_t bus, device_t dev, + int count, int *irqs); +static int vmbus_alloc_msix(device_t bus, device_t dev, + int *irq); +static int vmbus_release_msix(device_t bus, device_t dev, + int irq); +static int vmbus_map_msi(device_t bus, device_t dev, + int irq, uint64_t *addr, uint32_t *data); static uint32_t vmbus_get_version_method(device_t, device_t); static int vmbus_probe_guid_method(device_t, device_t, const struct hyperv_guid *); @@ -133,6 +151,22 @@ static device_method_t vmbus_methods[] = { DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, vmbus_read_ivar), DEVMETHOD(bus_child_pnpinfo_str, vmbus_child_pnpinfo_str), + DEVMETHOD(bus_alloc_resource, vmbus_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), +#if __FreeBSD_version >= 1100000 + DEVMETHOD(bus_get_cpus, bus_generic_get_cpus), +#endif + + /* pcib interface */ + DEVMETHOD(pcib_alloc_msi, vmbus_alloc_msi), + DEVMETHOD(pcib_release_msi, vmbus_release_msi), + DEVMETHOD(pcib_alloc_msix, vmbus_alloc_msix), + DEVMETHOD(pcib_release_msix, vmbus_release_msix), + DEVMETHOD(pcib_map_msi, vmbus_map_msi), /* Vmbus interface */ DEVMETHOD(vmbus_get_version, vmbus_get_version_method), @@ -975,6 +1009,69 @@ vmbus_sysctl_version(SYSCTL_HANDLER_ARGS) return sysctl_handle_string(oidp, verstr, sizeof(verstr), req); } +/* + * We need the function to make sure the MMIO resource is allocated from the + * ranges found in _CRS. + * + * For the release function, we can use bus_generic_release_resource(). + */ +static struct resource * +vmbus_alloc_resource(device_t dev, device_t child, int type, int *rid, + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + struct vmbus_softc *sc = device_get_softc(dev); + device_t parent = device_get_parent(dev); + struct resource *res; + + if (type != SYS_RES_MEMORY) + res = BUS_ALLOC_RESOURCE(parent, child, type, rid, start, + end, count, flags); + else + res = pcib_host_res_alloc(&sc->vmbus_mmio_res, child, type, + rid, start, end, count, flags); + + return (res); +} + +static device_t +get_nexus(device_t vmbus) +{ + device_t acpi = device_get_parent(vmbus); + device_t nexus = device_get_parent(acpi); + return (nexus); +} + +static int +vmbus_alloc_msi(device_t bus, device_t dev, int count, int maxcount, int *irqs) +{ + return (PCIB_ALLOC_MSI(get_nexus(bus), dev, count, maxcount, irqs)); +} + +static int +vmbus_release_msi(device_t bus, device_t dev, int count, int *irqs) +{ + return (PCIB_RELEASE_MSI(get_nexus(bus), dev, count, irqs)); +} + +static int +vmbus_alloc_msix(device_t bus, device_t dev, int *irq) +{ + return (PCIB_ALLOC_MSIX(get_nexus(bus), dev, irq)); +} + +static int +vmbus_release_msix(device_t bus, device_t dev, int irq) +{ + return (PCIB_RELEASE_MSIX(get_nexus(bus), dev, irq)); +} + +static int +vmbus_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr, + uint32_t *data) +{ + return (PCIB_MAP_MSI(get_nexus(bus), dev, irq, addr, data)); +} + static uint32_t vmbus_get_version_method(device_t bus, device_t dev) { @@ -1002,6 +1099,138 @@ vmbus_get_vcpu_id_method(device_t bus, device_t dev, int cpu) return (VMBUS_PCPU_GET(sc, vcpuid, cpu)); } +#define VTPM_BASE_ADDR 0xfed40000 +#define FOUR_GB (1ULL << 32) + +enum parse_pass { parse_64, parse_32 }; + +struct parse_context { + device_t vmbus_dev; + enum parse_pass pass; +}; + +static ACPI_STATUS +parse_crs(ACPI_RESOURCE *res, void *ctx) +{ + const struct parse_context *pc = ctx; + device_t vmbus_dev = pc->vmbus_dev; + + struct vmbus_softc *sc = device_get_softc(vmbus_dev); + UINT64 start, end; + + switch (res->Type) { + case ACPI_RESOURCE_TYPE_ADDRESS32: + start = res->Data.Address32.Address.Minimum; + end = res->Data.Address32.Address.Maximum; + break; + + case ACPI_RESOURCE_TYPE_ADDRESS64: + start = res->Data.Address64.Address.Minimum; + end = res->Data.Address64.Address.Maximum; + break; + + default: + /* Unused types. */ + return (AE_OK); + } + + /* + * We don't use <1MB addresses. + */ + if (end < 0x100000) + return (AE_OK); + + /* Don't conflict with vTPM. */ + if (end >= VTPM_BASE_ADDR && start < VTPM_BASE_ADDR) + end = VTPM_BASE_ADDR - 1; + + if ((pc->pass == parse_32 && start < FOUR_GB) || + (pc->pass == parse_64 && start >= FOUR_GB)) + pcib_host_res_decodes(&sc->vmbus_mmio_res, SYS_RES_MEMORY, + start, end, 0); + + return (AE_OK); +} + +static void +vmbus_get_crs(device_t dev, device_t vmbus_dev, enum parse_pass pass) +{ + struct parse_context pc; + ACPI_STATUS status; + + if (bootverbose) + device_printf(dev, "walking _CRS, pass=%d\n", pass); + + pc.vmbus_dev = vmbus_dev; + pc.pass = pass; + status = AcpiWalkResources(acpi_get_handle(dev), "_CRS", + parse_crs, &pc); + + if (bootverbose && ACPI_FAILURE(status)) + device_printf(dev, "_CRS: not found, pass=%d\n", pass); +} + +static void +vmbus_get_mmio_res_pass(device_t dev, enum parse_pass pass) +{ + device_t acpi0, pcib0 = NULL; + device_t *children; + int i, count; + + /* Try to find _CRS on VMBus device */ + vmbus_get_crs(dev, dev, pass); + + /* Try to find _CRS on VMBus device's parent */ + acpi0 = device_get_parent(dev); + vmbus_get_crs(acpi0, dev, pass); + + /* Try to locate pcib0 and find _CRS on it */ + if (device_get_children(acpi0, &children, &count) != 0) + return; + + for (i = 0; i < count; i++) { + if (!device_is_attached(children[i])) + continue; + + if (strcmp("pcib0", device_get_nameunit(children[i]))) + continue; + + pcib0 = children[i]; + break; + } + + if (pcib0) + vmbus_get_crs(pcib0, dev, pass); + + free(children, M_TEMP); +} + +static void +vmbus_get_mmio_res(device_t dev) +{ + struct vmbus_softc *sc = device_get_softc(dev); + /* + * We walk the resources twice to make sure that: in the resource + * list, the 32-bit resources appear behind the 64-bit resources. + * NB: resource_list_add() uses INSERT_TAIL. This way, when we + * iterate through the list to find a range for a 64-bit BAR in + * vmbus_alloc_resource(), we can make sure we try to use >4GB + * ranges first. + */ + pcib_host_res_init(dev, &sc->vmbus_mmio_res); + + vmbus_get_mmio_res_pass(dev, parse_64); + vmbus_get_mmio_res_pass(dev, parse_32); +} + +static void +vmbus_free_mmio_res(device_t dev) +{ + struct vmbus_softc *sc = device_get_softc(dev); + + pcib_host_res_free(dev, &sc->vmbus_mmio_res); +} + static int vmbus_probe(device_t dev) { @@ -1038,6 +1267,9 @@ vmbus_doattach(struct vmbus_softc *sc) if (sc->vmbus_flags & VMBUS_FLAG_ATTACHED) return (0); + + vmbus_get_mmio_res(sc->vmbus_dev); + sc->vmbus_flags |= VMBUS_FLAG_ATTACHED; sc->vmbus_gpadl = VMBUS_GPADL_START; @@ -1184,6 +1416,8 @@ vmbus_detach(device_t dev) mtx_destroy(&sc->vmbus_prichan_lock); mtx_destroy(&sc->vmbus_chan_lock); + vmbus_free_mmio_res(dev); + return (0); } diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index df4553a9e40..7aa035f94d8 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -31,8 +31,11 @@ #include #include +#include #include +#include +#include /* * NOTE: DO NOT CHANGE THIS. @@ -77,6 +80,10 @@ struct vmbus_pcpu_data { struct task message_task; /* message task */ } __aligned(CACHE_LINE_SIZE); +#if __FreeBSD_version < 1100000 +typedef u_long rman_res_t; +#endif + struct vmbus_softc { void (*vmbus_event_proc)(struct vmbus_softc *, int); u_long *vmbus_tx_evtflags; @@ -120,6 +127,9 @@ struct vmbus_softc { /* Complete channel list */ struct mtx vmbus_chan_lock; TAILQ_HEAD(, vmbus_channel) vmbus_chans; + + /* The list of usable MMIO ranges for PCIe pass-through */ + struct pcib_host_resources vmbus_mmio_res; }; #define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */ From 871c968b3ae6904d1ce7bd08388e5c4c1498fdc9 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Wed, 16 Nov 2016 09:25:00 +0000 Subject: [PATCH 118/204] hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment) The feature enables us to pass through physical PCIe devices to FreeBSD VM running on Hyper-V (Windows Server 2016) to get near-native performance with low CPU utilization. The patch implements a PCI bridge driver to support the feature: 1) The pcib driver talks to the host to discover device(s) and presents the device(s) to FreeBSD's pci driver via PCI configuration space (note: to access the configuration space, we don't use the standard I/O port 0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V, which is very similar to the 0xCF8/CFC method). 2) The pcib driver allocates resources for the device(s) and initialize the related BARs, when the device driver's attach method is invoked; 3) The pcib driver talks to the host to create MSI/MSI-X interrupt remapping between the guest and the host; 4) The pcib driver supports device hot add/remove. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8332 --- sys/conf/files.amd64 | 1 + sys/conf/files.i386 | 1 + sys/dev/hyperv/pcib/pcib.c | 1790 ++++++++++++++++++++++++++++++ sys/modules/hyperv/pcib/Makefile | 12 + 4 files changed, 1804 insertions(+) create mode 100644 sys/dev/hyperv/pcib/pcib.c create mode 100644 sys/modules/hyperv/pcib/Makefile diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 80f6a9b022d..c01798852b6 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -292,6 +292,7 @@ dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc +dev/hyperv/pcib/pcib.c optional hyperv dev/hyperv/netvsc/hn_nvs.c optional hyperv dev/hyperv/netvsc/hn_rndis.c optional hyperv dev/hyperv/netvsc/if_hn.c optional hyperv diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 34fd8c974ad..0c21402b855 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -249,6 +249,7 @@ dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc +dev/hyperv/pcib/pcib.c optional hyperv dev/hyperv/netvsc/hn_nvs.c optional hyperv dev/hyperv/netvsc/hn_rndis.c optional hyperv dev/hyperv/netvsc/if_hn.c optional hyperv diff --git a/sys/dev/hyperv/pcib/pcib.c b/sys/dev/hyperv/pcib/pcib.c new file mode 100644 index 00000000000..6c86fc1ec9a --- /dev/null +++ b/sys/dev/hyperv/pcib/pcib.c @@ -0,0 +1,1790 @@ +/*- + * Copyright (c) 2016 Microsoft Corp. + * 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include "pcib_if.h" + +#include +#include + +#include +#include +#include +#include +#include + +#include "vmbus_if.h" + +#if __FreeBSD_version < 1100000 +typedef u_long rman_res_t; +#define RM_MAX_END (~(rman_res_t)0) +#endif + +struct completion { + unsigned int done; + struct mtx lock; +}; + +static void +init_completion(struct completion *c) +{ + memset(c, 0, sizeof(*c)); + mtx_init(&c->lock, "hvcmpl", NULL, MTX_DEF); + c->done = 0; +} + +static void +free_completion(struct completion *c) +{ + mtx_destroy(&c->lock); +} + +static void +complete(struct completion *c) +{ + mtx_lock(&c->lock); + c->done++; + mtx_unlock(&c->lock); + wakeup(c); +} + +static void +wait_for_completion(struct completion *c) +{ + mtx_lock(&c->lock); + while (c->done == 0) + mtx_sleep(c, &c->lock, 0, "hvwfc", 0); + c->done--; + mtx_unlock(&c->lock); +} + +#define PCI_MAKE_VERSION(major, minor) ((uint32_t)(((major) << 16) | (major))) + +enum { + PCI_PROTOCOL_VERSION_1_1 = PCI_MAKE_VERSION(1, 1), + PCI_PROTOCOL_VERSION_CURRENT = PCI_PROTOCOL_VERSION_1_1 +}; + +#define PCI_CONFIG_MMIO_LENGTH 0x2000 +#define CFG_PAGE_OFFSET 0x1000 +#define CFG_PAGE_SIZE (PCI_CONFIG_MMIO_LENGTH - CFG_PAGE_OFFSET) + +/* + * Message Types + */ + +enum pci_message_type { + /* + * Version 1.1 + */ + PCI_MESSAGE_BASE = 0x42490000, + PCI_BUS_RELATIONS = PCI_MESSAGE_BASE + 0, + PCI_QUERY_BUS_RELATIONS = PCI_MESSAGE_BASE + 1, + PCI_POWER_STATE_CHANGE = PCI_MESSAGE_BASE + 4, + PCI_QUERY_RESOURCE_REQUIREMENTS = PCI_MESSAGE_BASE + 5, + PCI_QUERY_RESOURCE_RESOURCES = PCI_MESSAGE_BASE + 6, + PCI_BUS_D0ENTRY = PCI_MESSAGE_BASE + 7, + PCI_BUS_D0EXIT = PCI_MESSAGE_BASE + 8, + PCI_READ_BLOCK = PCI_MESSAGE_BASE + 9, + PCI_WRITE_BLOCK = PCI_MESSAGE_BASE + 0xA, + PCI_EJECT = PCI_MESSAGE_BASE + 0xB, + PCI_QUERY_STOP = PCI_MESSAGE_BASE + 0xC, + PCI_REENABLE = PCI_MESSAGE_BASE + 0xD, + PCI_QUERY_STOP_FAILED = PCI_MESSAGE_BASE + 0xE, + PCI_EJECTION_COMPLETE = PCI_MESSAGE_BASE + 0xF, + PCI_RESOURCES_ASSIGNED = PCI_MESSAGE_BASE + 0x10, + PCI_RESOURCES_RELEASED = PCI_MESSAGE_BASE + 0x11, + PCI_INVALIDATE_BLOCK = PCI_MESSAGE_BASE + 0x12, + PCI_QUERY_PROTOCOL_VERSION = PCI_MESSAGE_BASE + 0x13, + PCI_CREATE_INTERRUPT_MESSAGE = PCI_MESSAGE_BASE + 0x14, + PCI_DELETE_INTERRUPT_MESSAGE = PCI_MESSAGE_BASE + 0x15, + PCI_MESSAGE_MAXIMUM +}; + +/* + * Structures defining the virtual PCI Express protocol. + */ + +union pci_version { + struct { + uint16_t minor_version; + uint16_t major_version; + } parts; + uint32_t version; +} __packed; + +/* + * This representation is the one used in Windows, which is + * what is expected when sending this back and forth with + * the Hyper-V parent partition. + */ +union win_slot_encoding { + struct { + uint32_t slot:5; + uint32_t func:3; + uint32_t reserved:24; + } bits; + uint32_t val; +} __packed; + +struct pci_func_desc { + uint16_t v_id; /* vendor ID */ + uint16_t d_id; /* device ID */ + uint8_t rev; + uint8_t prog_intf; + uint8_t subclass; + uint8_t base_class; + uint32_t subsystem_id; + union win_slot_encoding wslot; + uint32_t ser; /* serial number */ +} __packed; + +struct hv_msi_desc { + uint8_t vector; + uint8_t delivery_mode; + uint16_t vector_count; + uint32_t reserved; + uint64_t cpu_mask; +} __packed; + +struct tran_int_desc { + uint16_t reserved; + uint16_t vector_count; + uint32_t data; + uint64_t address; +} __packed; + +struct pci_message { + uint32_t type; +} __packed; + +struct pci_child_message { + struct pci_message message_type; + union win_slot_encoding wslot; +} __packed; + +struct pci_incoming_message { + struct vmbus_chanpkt_hdr hdr; + struct pci_message message_type; +} __packed; + +struct pci_response { + struct vmbus_chanpkt_hdr hdr; + int32_t status; /* negative values are failures */ +} __packed; + +struct pci_packet { + void (*completion_func)(void *context, struct pci_response *resp, + int resp_packet_size); + void *compl_ctxt; + + struct pci_message message[0]; +}; + +/* + * Specific message types supporting the PCI protocol. + */ + +struct pci_version_request { + struct pci_message message_type; + uint32_t protocol_version; + uint32_t is_last_attempt:1; + uint32_t reservedz:31; +} __packed; + +struct pci_bus_d0_entry { + struct pci_message message_type; + uint32_t reserved; + uint64_t mmio_base; +} __packed; + +struct pci_bus_relations { + struct pci_incoming_message incoming; + uint32_t device_count; + struct pci_func_desc func[0]; +} __packed; + +#define MAX_NUM_BARS (PCIR_MAX_BAR_0 + 1) +struct pci_q_res_req_response { + struct vmbus_chanpkt_hdr hdr; + int32_t status; /* negative values are failures */ + uint32_t probed_bar[MAX_NUM_BARS]; +} __packed; + +struct pci_resources_assigned { + struct pci_message message_type; + union win_slot_encoding wslot; + uint8_t memory_range[0x14][MAX_NUM_BARS]; /* unused here */ + uint32_t msi_descriptors; + uint32_t reserved[4]; +} __packed; + +struct pci_create_interrupt { + struct pci_message message_type; + union win_slot_encoding wslot; + struct hv_msi_desc int_desc; +} __packed; + +struct pci_create_int_response { + struct pci_response response; + uint32_t reserved; + struct tran_int_desc int_desc; +} __packed; + +struct pci_delete_interrupt { + struct pci_message message_type; + union win_slot_encoding wslot; + struct tran_int_desc int_desc; +} __packed; + +struct pci_dev_incoming { + struct pci_incoming_message incoming; + union win_slot_encoding wslot; +} __packed; + +struct pci_eject_response { + struct pci_message message_type; + union win_slot_encoding wslot; + uint32_t status; +} __packed; + +/* + * Driver specific state. + */ + +enum hv_pcibus_state { + hv_pcibus_init = 0, + hv_pcibus_installed, +}; + +struct hv_pcibus { + device_t pcib; + device_t pci_bus; + struct vmbus_pcib_softc *sc; + + uint16_t pci_domain; + + enum hv_pcibus_state state; + + struct resource *cfg_res; + + struct completion query_completion, *query_comp; + + struct mtx config_lock; /* Avoid two threads writing index page */ + struct mtx device_list_lock; /* Protect lists below */ + TAILQ_HEAD(, hv_pci_dev) children; + TAILQ_HEAD(, hv_dr_state) dr_list; + + volatile int detaching; +}; + +struct hv_pci_dev { + TAILQ_ENTRY(hv_pci_dev) link; + + struct pci_func_desc desc; + + bool reported_missing; + + struct hv_pcibus *hbus; + struct task eject_task; + + TAILQ_HEAD(, hv_irq_desc) irq_desc_list; + + /* + * What would be observed if one wrote 0xFFFFFFFF to a BAR and then + * read it back, for each of the BAR offsets within config space. + */ + uint32_t probed_bar[MAX_NUM_BARS]; +}; + +/* + * Tracks "Device Relations" messages from the host, which must be both + * processed in order. + */ +struct hv_dr_work { + struct task task; + struct hv_pcibus *bus; +}; + +struct hv_dr_state { + TAILQ_ENTRY(hv_dr_state) link; + uint32_t device_count; + struct pci_func_desc func[0]; +}; + +struct hv_irq_desc { + TAILQ_ENTRY(hv_irq_desc) link; + struct tran_int_desc desc; + int irq; +}; + +#define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) +#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) +#define PCI_FUNC(devfn) ((devfn) & 0x07) + +static uint32_t +devfn_to_wslot(unsigned int devfn) +{ + union win_slot_encoding wslot; + + wslot.val = 0; + wslot.bits.slot = PCI_SLOT(devfn); + wslot.bits.func = PCI_FUNC(devfn); + + return (wslot.val); +} + +static unsigned int +wslot_to_devfn(uint32_t wslot) +{ + union win_slot_encoding encoding; + unsigned int slot; + unsigned int func; + + encoding.val = wslot; + + slot = encoding.bits.slot; + func = encoding.bits.func; + + return (PCI_DEVFN(slot, func)); +} + +struct vmbus_pcib_softc { + struct vmbus_channel *chan; + void *rx_buf; + + struct taskqueue *taskq; + + struct hv_pcibus *hbus; +}; + +/* {44C4F61D-4444-4400-9D52-802E27EDE19F} */ +static const struct hyperv_guid g_pass_through_dev_type = { + .hv_guid = {0x1D, 0xF6, 0xC4, 0x44, 0x44, 0x44, 0x00, 0x44, + 0x9D, 0x52, 0x80, 0x2E, 0x27, 0xED, 0xE1, 0x9F} +}; + +struct hv_pci_compl { + struct completion host_event; + int32_t completion_status; +}; + +struct q_res_req_compl { + struct completion host_event; + struct hv_pci_dev *hpdev; +}; + +struct compose_comp_ctxt { + struct hv_pci_compl comp_pkt; + struct tran_int_desc int_desc; +}; + +static void +hv_pci_generic_compl(void *context, struct pci_response *resp, + int resp_packet_size) +{ + struct hv_pci_compl *comp_pkt = context; + + if (resp_packet_size >= sizeof(struct pci_response)) + comp_pkt->completion_status = resp->status; + else + comp_pkt->completion_status = -1; + + complete(&comp_pkt->host_event); +} + +static void +q_resource_requirements(void *context, struct pci_response *resp, + int resp_packet_size) +{ + struct q_res_req_compl *completion = context; + struct pci_q_res_req_response *q_res_req = + (struct pci_q_res_req_response *)resp; + int i; + + if (resp->status < 0) { + printf("vmbus_pcib: failed to query resource requirements\n"); + } else { + for (i = 0; i < MAX_NUM_BARS; i++) + completion->hpdev->probed_bar[i] = + q_res_req->probed_bar[i]; + } + + complete(&completion->host_event); +} + +static void +hv_pci_compose_compl(void *context, struct pci_response *resp, + int resp_packet_size) +{ + struct compose_comp_ctxt *comp_pkt = context; + struct pci_create_int_response *int_resp = + (struct pci_create_int_response *)resp; + + comp_pkt->comp_pkt.completion_status = resp->status; + comp_pkt->int_desc = int_resp->int_desc; + complete(&comp_pkt->comp_pkt.host_event); +} + +static void +hv_int_desc_free(struct hv_pci_dev *hpdev, struct hv_irq_desc *hid) +{ + struct pci_delete_interrupt *int_pkt; + struct { + struct pci_packet pkt; + uint8_t buffer[sizeof(struct pci_delete_interrupt)]; + } ctxt; + + memset(&ctxt, 0, sizeof(ctxt)); + int_pkt = (struct pci_delete_interrupt *)&ctxt.pkt.message; + int_pkt->message_type.type = PCI_DELETE_INTERRUPT_MESSAGE; + int_pkt->wslot.val = hpdev->desc.wslot.val; + int_pkt->int_desc = hid->desc; + + vmbus_chan_send(hpdev->hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, 0, + int_pkt, sizeof(*int_pkt), 0); + + free(hid, M_DEVBUF); +} + +static void +hv_pci_delete_device(struct hv_pci_dev *hpdev) +{ + struct hv_pcibus *hbus = hpdev->hbus; + struct hv_irq_desc *hid, *tmp_hid; + device_t pci_dev; + int devfn; + + devfn = wslot_to_devfn(hpdev->desc.wslot.val); + + mtx_lock(&Giant); + + pci_dev = pci_find_dbsf(hbus->pci_domain, + 0, PCI_SLOT(devfn), PCI_FUNC(devfn)); + if (pci_dev) + device_delete_child(hbus->pci_bus, pci_dev); + + mtx_unlock(&Giant); + + mtx_lock(&hbus->device_list_lock); + TAILQ_REMOVE(&hbus->children, hpdev, link); + mtx_unlock(&hbus->device_list_lock); + + TAILQ_FOREACH_SAFE(hid, &hpdev->irq_desc_list, link, tmp_hid) + hv_int_desc_free(hpdev, hid); + + free(hpdev, M_DEVBUF); +} + +static struct hv_pci_dev * +new_pcichild_device(struct hv_pcibus *hbus, struct pci_func_desc *desc) +{ + struct hv_pci_dev *hpdev; + struct pci_child_message *res_req; + struct q_res_req_compl comp_pkt; + struct { + struct pci_packet pkt; + uint8_t buffer[sizeof(struct pci_child_message)]; + } ctxt; + int ret; + + hpdev = malloc(sizeof(*hpdev), M_DEVBUF, M_WAITOK | M_ZERO); + hpdev->hbus = hbus; + + TAILQ_INIT(&hpdev->irq_desc_list); + + init_completion(&comp_pkt.host_event); + comp_pkt.hpdev = hpdev; + + ctxt.pkt.compl_ctxt = &comp_pkt; + ctxt.pkt.completion_func = q_resource_requirements; + + res_req = (struct pci_child_message *)&ctxt.pkt.message; + res_req->message_type.type = PCI_QUERY_RESOURCE_REQUIREMENTS; + res_req->wslot.val = desc->wslot.val; + + ret = vmbus_chan_send(hbus->sc->chan, + VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, + res_req, sizeof(*res_req), (uint64_t)&ctxt.pkt); + if (ret) + goto err; + + wait_for_completion(&comp_pkt.host_event); + free_completion(&comp_pkt.host_event); + + hpdev->desc = *desc; + + mtx_lock(&hbus->device_list_lock); + TAILQ_INSERT_TAIL(&hbus->children, hpdev, link); + mtx_unlock(&hbus->device_list_lock); + return (hpdev); +err: + free_completion(&comp_pkt.host_event); + free(hpdev, M_DEVBUF); + return (NULL); +} + +#if __FreeBSD_version < 1100000 + +/* Old versions don't have BUS_RESCAN(). Let's copy it from FreeBSD 11. */ + +static struct pci_devinfo * +pci_identify_function(device_t pcib, device_t dev, int domain, int busno, + int slot, int func, size_t dinfo_size) +{ + struct pci_devinfo *dinfo; + + dinfo = pci_read_device(pcib, domain, busno, slot, func, dinfo_size); + if (dinfo != NULL) + pci_add_child(dev, dinfo); + + return (dinfo); +} + +static int +pci_rescan(device_t dev) +{ +#define REG(n, w) PCIB_READ_CONFIG(pcib, busno, s, f, n, w) + device_t pcib = device_get_parent(dev); + struct pci_softc *sc; + device_t child, *devlist, *unchanged; + int devcount, error, i, j, maxslots, oldcount; + int busno, domain, s, f, pcifunchigh; + uint8_t hdrtype; + + /* No need to check for ARI on a rescan. */ + error = device_get_children(dev, &devlist, &devcount); + if (error) + return (error); + if (devcount != 0) { + unchanged = malloc(devcount * sizeof(device_t), M_TEMP, + M_NOWAIT | M_ZERO); + if (unchanged == NULL) { + free(devlist, M_TEMP); + return (ENOMEM); + } + } else + unchanged = NULL; + + sc = device_get_softc(dev); + domain = pcib_get_domain(dev); + busno = pcib_get_bus(dev); + maxslots = PCIB_MAXSLOTS(pcib); + for (s = 0; s <= maxslots; s++) { + /* If function 0 is not present, skip to the next slot. */ + f = 0; + if (REG(PCIR_VENDOR, 2) == 0xffff) + continue; + pcifunchigh = 0; + hdrtype = REG(PCIR_HDRTYPE, 1); + if ((hdrtype & PCIM_HDRTYPE) > PCI_MAXHDRTYPE) + continue; + if (hdrtype & PCIM_MFDEV) + pcifunchigh = PCIB_MAXFUNCS(pcib); + for (f = 0; f <= pcifunchigh; f++) { + if (REG(PCIR_VENDOR, 2) == 0xffff) + continue; + + /* + * Found a valid function. Check if a + * device_t for this device already exists. + */ + for (i = 0; i < devcount; i++) { + child = devlist[i]; + if (child == NULL) + continue; + if (pci_get_slot(child) == s && + pci_get_function(child) == f) { + unchanged[i] = child; + goto next_func; + } + } + + pci_identify_function(pcib, dev, domain, busno, s, f, + sizeof(struct pci_devinfo)); + next_func:; + } + } + + /* Remove devices that are no longer present. */ + for (i = 0; i < devcount; i++) { + if (unchanged[i] != NULL) + continue; + device_delete_child(dev, devlist[i]); + } + + free(devlist, M_TEMP); + oldcount = devcount; + + /* Try to attach the devices just added. */ + error = device_get_children(dev, &devlist, &devcount); + if (error) { + free(unchanged, M_TEMP); + return (error); + } + + for (i = 0; i < devcount; i++) { + for (j = 0; j < oldcount; j++) { + if (devlist[i] == unchanged[j]) + goto next_device; + } + + device_probe_and_attach(devlist[i]); + next_device:; + } + + free(unchanged, M_TEMP); + free(devlist, M_TEMP); + return (0); +#undef REG +} + +#else + +static int +pci_rescan(device_t dev) +{ + return (BUS_RESCAN(dev)); +} + +#endif + +static void +pci_devices_present_work(void *arg, int pending __unused) +{ + struct hv_dr_work *dr_wrk = arg; + struct hv_dr_state *dr = NULL; + struct hv_pcibus *hbus; + uint32_t child_no; + bool found; + struct pci_func_desc *new_desc; + struct hv_pci_dev *hpdev, *tmp_hpdev; + struct completion *query_comp; + bool need_rescan = false; + + hbus = dr_wrk->bus; + free(dr_wrk, M_DEVBUF); + + /* Pull this off the queue and process it if it was the last one. */ + mtx_lock(&hbus->device_list_lock); + while (!TAILQ_EMPTY(&hbus->dr_list)) { + dr = TAILQ_FIRST(&hbus->dr_list); + TAILQ_REMOVE(&hbus->dr_list, dr, link); + + /* Throw this away if the list still has stuff in it. */ + if (!TAILQ_EMPTY(&hbus->dr_list)) { + free(dr, M_DEVBUF); + continue; + } + } + mtx_unlock(&hbus->device_list_lock); + + if (!dr) + return; + + /* First, mark all existing children as reported missing. */ + mtx_lock(&hbus->device_list_lock); + TAILQ_FOREACH(hpdev, &hbus->children, link) + hpdev->reported_missing = true; + mtx_unlock(&hbus->device_list_lock); + + /* Next, add back any reported devices. */ + for (child_no = 0; child_no < dr->device_count; child_no++) { + found = false; + new_desc = &dr->func[child_no]; + + mtx_lock(&hbus->device_list_lock); + TAILQ_FOREACH(hpdev, &hbus->children, link) { + if ((hpdev->desc.wslot.val == + new_desc->wslot.val) && + (hpdev->desc.v_id == new_desc->v_id) && + (hpdev->desc.d_id == new_desc->d_id) && + (hpdev->desc.ser == new_desc->ser)) { + hpdev->reported_missing = false; + found = true; + break; + } + } + mtx_unlock(&hbus->device_list_lock); + + if (!found) { + if (!need_rescan) + need_rescan = true; + + hpdev = new_pcichild_device(hbus, new_desc); + if (!hpdev) + printf("vmbus_pcib: failed to add a child\n"); + } + } + + /* Remove missing device(s), if any */ + TAILQ_FOREACH_SAFE(hpdev, &hbus->children, link, tmp_hpdev) { + if (hpdev->reported_missing) + hv_pci_delete_device(hpdev); + } + + /* Rescan the bus to find any new device, if necessary. */ + if (hbus->state == hv_pcibus_installed && need_rescan) + pci_rescan(hbus->pci_bus); + + /* Wake up hv_pci_query_relations(), if it's waiting. */ + query_comp = hbus->query_comp; + if (query_comp) { + hbus->query_comp = NULL; + complete(query_comp); + } + + free(dr, M_DEVBUF); +} + +static struct hv_pci_dev * +get_pcichild_wslot(struct hv_pcibus *hbus, uint32_t wslot) +{ + struct hv_pci_dev *hpdev, *ret = NULL; + + mtx_lock(&hbus->device_list_lock); + TAILQ_FOREACH(hpdev, &hbus->children, link) { + if (hpdev->desc.wslot.val == wslot) { + ret = hpdev; + break; + } + } + mtx_unlock(&hbus->device_list_lock); + + return (ret); +} + +static void +hv_pci_devices_present(struct hv_pcibus *hbus, + struct pci_bus_relations *relations) +{ + struct hv_dr_state *dr; + struct hv_dr_work *dr_wrk; + unsigned long dr_size; + + if (hbus->detaching && relations->device_count > 0) + return; + + dr_size = offsetof(struct hv_dr_state, func) + + (sizeof(struct pci_func_desc) * relations->device_count); + dr = malloc(dr_size, M_DEVBUF, M_WAITOK | M_ZERO); + + dr->device_count = relations->device_count; + if (dr->device_count != 0) + memcpy(dr->func, relations->func, + sizeof(struct pci_func_desc) * dr->device_count); + + mtx_lock(&hbus->device_list_lock); + TAILQ_INSERT_TAIL(&hbus->dr_list, dr, link); + mtx_unlock(&hbus->device_list_lock); + + dr_wrk = malloc(sizeof(*dr_wrk), M_DEVBUF, M_WAITOK | M_ZERO); + dr_wrk->bus = hbus; + TASK_INIT(&dr_wrk->task, 0, pci_devices_present_work, dr_wrk); + taskqueue_enqueue(hbus->sc->taskq, &dr_wrk->task); +} + +static void +hv_eject_device_work(void *arg, int pending __unused) +{ + struct hv_pci_dev *hpdev = arg; + union win_slot_encoding wslot = hpdev->desc.wslot; + struct hv_pcibus *hbus = hpdev->hbus; + struct pci_eject_response *eject_pkt; + struct { + struct pci_packet pkt; + uint8_t buffer[sizeof(struct pci_eject_response)]; + } ctxt; + + hv_pci_delete_device(hpdev); + + memset(&ctxt, 0, sizeof(ctxt)); + eject_pkt = (struct pci_eject_response *)&ctxt.pkt.message; + eject_pkt->message_type.type = PCI_EJECTION_COMPLETE; + eject_pkt->wslot.val = wslot.val; + vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, 0, + eject_pkt, sizeof(*eject_pkt), 0); +} + +static void +hv_pci_eject_device(struct hv_pci_dev *hpdev) +{ + struct hv_pcibus *hbus = hpdev->hbus; + struct taskqueue *taskq; + + if (hbus->detaching) + return; + + /* + * Push this task into the same taskqueue on which + * vmbus_pcib_attach() runs, so we're sure this task can't run + * concurrently with vmbus_pcib_attach(). + */ + TASK_INIT(&hpdev->eject_task, 0, hv_eject_device_work, hpdev); + taskq = vmbus_chan_mgmt_tq(hbus->sc->chan); + taskqueue_enqueue(taskq, &hpdev->eject_task); +} + +#define PCIB_PACKET_SIZE 0x100 + +static void +vmbus_pcib_on_channel_callback(struct vmbus_channel *chan, void *arg) +{ + struct vmbus_pcib_softc *sc = arg; + struct hv_pcibus *hbus = sc->hbus; + + void *buffer; + int bufferlen = PCIB_PACKET_SIZE; + + struct pci_packet *comp_packet; + struct pci_response *response; + struct pci_incoming_message *new_msg; + struct pci_bus_relations *bus_rel; + struct pci_dev_incoming *dev_msg; + struct hv_pci_dev *hpdev; + + buffer = sc->rx_buf; + do { + struct vmbus_chanpkt_hdr *pkt = buffer; + uint32_t bytes_rxed; + int ret; + + bytes_rxed = bufferlen; + ret = vmbus_chan_recv_pkt(chan, pkt, &bytes_rxed); + + if (ret == ENOBUFS) { + /* Handle large packet */ + if (bufferlen > PCIB_PACKET_SIZE) { + free(buffer, M_DEVBUF); + buffer = NULL; + } + + /* alloc new buffer */ + buffer = malloc(bytes_rxed, M_DEVBUF, M_WAITOK | M_ZERO); + bufferlen = bytes_rxed; + + continue; + } + + if (ret != 0) { + /* ignore EIO or EAGAIN */ + break; + } + + if (bytes_rxed <= sizeof(struct pci_response)) + continue; + + switch (pkt->cph_type) { + case VMBUS_CHANPKT_TYPE_COMP: + comp_packet = (struct pci_packet *)pkt->cph_xactid; + response = (struct pci_response *)pkt; + comp_packet->completion_func(comp_packet->compl_ctxt, + response, bytes_rxed); + break; + case VMBUS_CHANPKT_TYPE_INBAND: + new_msg = (struct pci_incoming_message *)buffer; + + switch (new_msg->message_type.type) { + case PCI_BUS_RELATIONS: + bus_rel = (struct pci_bus_relations *)buffer; + + if (bus_rel->device_count == 0) + break; + + if (bytes_rxed < + offsetof(struct pci_bus_relations, func) + + (sizeof(struct pci_func_desc) * + (bus_rel->device_count))) + break; + + hv_pci_devices_present(hbus, bus_rel); + break; + + case PCI_EJECT: + dev_msg = (struct pci_dev_incoming *)buffer; + hpdev = get_pcichild_wslot(hbus, + dev_msg->wslot.val); + + if (hpdev) + hv_pci_eject_device(hpdev); + + break; + default: + printf("vmbus_pcib: Unknown msg type 0x%x\n", + new_msg->message_type.type); + break; + } + break; + default: + printf("vmbus_pcib: Unknown VMBus msg type %hd\n", + pkt->cph_type); + break; + } + } while (1); + + if (bufferlen > PCIB_PACKET_SIZE) + free(buffer, M_DEVBUF); +} + +static int +hv_pci_protocol_negotiation(struct hv_pcibus *hbus) +{ + struct pci_version_request *version_req; + struct hv_pci_compl comp_pkt; + struct { + struct pci_packet pkt; + uint8_t buffer[sizeof(struct pci_version_request)]; + } ctxt; + int ret; + + init_completion(&comp_pkt.host_event); + + ctxt.pkt.completion_func = hv_pci_generic_compl; + ctxt.pkt.compl_ctxt = &comp_pkt; + version_req = (struct pci_version_request *)&ctxt.pkt.message; + version_req->message_type.type = PCI_QUERY_PROTOCOL_VERSION; + version_req->protocol_version = PCI_PROTOCOL_VERSION_CURRENT; + version_req->is_last_attempt = 1; + + ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, + VMBUS_CHANPKT_FLAG_RC, version_req, sizeof(*version_req), + (uint64_t)&ctxt.pkt); + if (ret) + goto out; + + wait_for_completion(&comp_pkt.host_event); + + if (comp_pkt.completion_status < 0) { + device_printf(hbus->pcib, + "vmbus_pcib version negotiation failed: %x\n", + comp_pkt.completion_status); + ret = EPROTO; + } else { + ret = 0; + } +out: + free_completion(&comp_pkt.host_event); + return (ret); +} + +/* Ask the host to send along the list of child devices */ +static int +hv_pci_query_relations(struct hv_pcibus *hbus) +{ + struct pci_message message; + int ret; + + message.type = PCI_QUERY_BUS_RELATIONS; + ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, 0, + &message, sizeof(message), 0); + return (ret); +} + +static int +hv_pci_enter_d0(struct hv_pcibus *hbus) +{ + struct pci_bus_d0_entry *d0_entry; + struct hv_pci_compl comp_pkt; + struct { + struct pci_packet pkt; + uint8_t buffer[sizeof(struct pci_bus_d0_entry)]; + } ctxt; + int ret; + + /* + * Tell the host that the bus is ready to use, and moved into the + * powered-on state. This includes telling the host which region + * of memory-mapped I/O space has been chosen for configuration space + * access. + */ + init_completion(&comp_pkt.host_event); + + ctxt.pkt.completion_func = hv_pci_generic_compl; + ctxt.pkt.compl_ctxt = &comp_pkt; + + d0_entry = (struct pci_bus_d0_entry *)&ctxt.pkt.message; + memset(d0_entry, 0, sizeof(*d0_entry)); + d0_entry->message_type.type = PCI_BUS_D0ENTRY; + d0_entry->mmio_base = rman_get_start(hbus->cfg_res); + + ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, + VMBUS_CHANPKT_FLAG_RC, d0_entry, sizeof(*d0_entry), + (uint64_t)&ctxt.pkt); + if (ret) + goto out; + + wait_for_completion(&comp_pkt.host_event); + + if (comp_pkt.completion_status < 0) { + device_printf(hbus->pcib, "vmbus_pcib failed to enable D0\n"); + ret = EPROTO; + } else { + ret = 0; + } + +out: + free_completion(&comp_pkt.host_event); + return (ret); +} + +/* + * It looks this is only needed by Windows VM, but let's send the message too + * just to make the host happy. + */ +static int +hv_send_resources_allocated(struct hv_pcibus *hbus) +{ + struct pci_resources_assigned *res_assigned; + struct hv_pci_compl comp_pkt; + struct hv_pci_dev *hpdev; + struct pci_packet *pkt; + uint32_t wslot; + int ret = 0; + + pkt = malloc(sizeof(*pkt) + sizeof(*res_assigned), + M_DEVBUF, M_WAITOK | M_ZERO); + + for (wslot = 0; wslot < 256; wslot++) { + hpdev = get_pcichild_wslot(hbus, wslot); + if (!hpdev) + continue; + + init_completion(&comp_pkt.host_event); + + memset(pkt, 0, sizeof(*pkt) + sizeof(*res_assigned)); + pkt->completion_func = hv_pci_generic_compl; + pkt->compl_ctxt = &comp_pkt; + + res_assigned = (struct pci_resources_assigned *)&pkt->message; + res_assigned->message_type.type = PCI_RESOURCES_ASSIGNED; + res_assigned->wslot.val = hpdev->desc.wslot.val; + + ret = vmbus_chan_send(hbus->sc->chan, + VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, + &pkt->message, sizeof(*res_assigned), (uint64_t)pkt); + if (ret) { + free_completion(&comp_pkt.host_event); + break; + } + + wait_for_completion(&comp_pkt.host_event); + free_completion(&comp_pkt.host_event); + + if (comp_pkt.completion_status < 0) { + ret = EPROTO; + device_printf(hbus->pcib, + "failed to send PCI_RESOURCES_ASSIGNED\n"); + break; + } + } + + free(pkt, M_DEVBUF); + return (ret); +} + +static int +hv_send_resources_released(struct hv_pcibus *hbus) +{ + struct pci_child_message pkt; + struct hv_pci_dev *hpdev; + uint32_t wslot; + int ret; + + for (wslot = 0; wslot < 256; wslot++) { + hpdev = get_pcichild_wslot(hbus, wslot); + if (!hpdev) + continue; + + pkt.message_type.type = PCI_RESOURCES_RELEASED; + pkt.wslot.val = hpdev->desc.wslot.val; + + ret = vmbus_chan_send(hbus->sc->chan, + VMBUS_CHANPKT_TYPE_INBAND, 0, &pkt, sizeof(pkt), 0); + if (ret) + return (ret); + } + + return (0); +} + +#define hv_cfg_read(x, s) \ +static inline uint##x##_t hv_cfg_read_##s(struct hv_pcibus *bus, \ + bus_size_t offset) \ +{ \ + return (bus_read_##s(bus->cfg_res, offset)); \ +} + +#define hv_cfg_write(x, s) \ +static inline void hv_cfg_write_##s(struct hv_pcibus *bus, \ + bus_size_t offset, uint##x##_t val) \ +{ \ + return (bus_write_##s(bus->cfg_res, offset, val)); \ +} + +hv_cfg_read(8, 1) +hv_cfg_read(16, 2) +hv_cfg_read(32, 4) + +hv_cfg_write(8, 1) +hv_cfg_write(16, 2) +hv_cfg_write(32, 4) + +static void +_hv_pcifront_read_config(struct hv_pci_dev *hpdev, int where, int size, + uint32_t *val) +{ + struct hv_pcibus *hbus = hpdev->hbus; + bus_size_t addr = CFG_PAGE_OFFSET + where; + + /* + * If the attempt is to read the IDs or the ROM BAR, simulate that. + */ + if (where + size <= PCIR_COMMAND) { + memcpy(val, ((uint8_t *)&hpdev->desc.v_id) + where, size); + } else if (where >= PCIR_REVID && where + size <= + PCIR_CACHELNSZ) { + memcpy(val, ((uint8_t *)&hpdev->desc.rev) + where - + PCIR_REVID, size); + } else if (where >= PCIR_SUBVEND_0 && where + size <= + PCIR_BIOS) { + memcpy(val, (uint8_t *)&hpdev->desc.subsystem_id + where - + PCIR_SUBVEND_0, size); + } else if (where >= PCIR_BIOS && where + size <= + PCIR_CAP_PTR) { + /* ROM BARs are unimplemented */ + *val = 0; + } else if ((where >= PCIR_INTLINE && where + size <= + PCIR_INTPIN) ||(where == PCIR_INTPIN && size == 1)) { + /* + * Interrupt Line and Interrupt PIN are hard-wired to zero + * because this front-end only supports message-signaled + * interrupts. + */ + *val = 0; + } else if (where + size <= CFG_PAGE_SIZE) { + mtx_lock(&hbus->config_lock); + + /* Choose the function to be read. */ + hv_cfg_write_4(hbus, 0, hpdev->desc.wslot.val); + + /* Make sure the function was chosen before we start reading.*/ + mb(); + + /* Read from that function's config space. */ + switch (size) { + case 1: + *((uint8_t *)val) = hv_cfg_read_1(hbus, addr); + break; + case 2: + *((uint16_t *)val) = hv_cfg_read_2(hbus, addr); + break; + default: + *((uint32_t *)val) = hv_cfg_read_4(hbus, addr); + break; + } + /* + * Make sure the write was done before we release the lock, + * allowing consecutive reads/writes. + */ + mb(); + + mtx_unlock(&hbus->config_lock); + } else { + /* Invalid config read: it's unlikely to reach here. */ + memset(val, 0, size); + } +} + +static void +_hv_pcifront_write_config(struct hv_pci_dev *hpdev, int where, int size, + uint32_t val) +{ + struct hv_pcibus *hbus = hpdev->hbus; + bus_size_t addr = CFG_PAGE_OFFSET + where; + + /* SSIDs and ROM BARs are read-only */ + if (where >= PCIR_SUBVEND_0 && where + size <= PCIR_CAP_PTR) + return; + + if (where >= PCIR_COMMAND && where + size <= CFG_PAGE_SIZE) { + mtx_lock(&hbus->config_lock); + + /* Choose the function to be written. */ + hv_cfg_write_4(hbus, 0, hpdev->desc.wslot.val); + + /* Make sure the function was chosen before we start writing.*/ + wmb(); + + /* Write to that function's config space. */ + switch (size) { + case 1: + hv_cfg_write_1(hbus, addr, (uint8_t)val); + break; + case 2: + hv_cfg_write_2(hbus, addr, (uint16_t)val); + break; + default: + hv_cfg_write_4(hbus, addr, (uint32_t)val); + break; + } + + /* + * Make sure the write was done before we release the lock, + * allowing consecutive reads/writes. + */ + mb(); + + mtx_unlock(&hbus->config_lock); + } else { + /* Invalid config write: it's unlikely to reach here. */ + return; + } +} + +static void +vmbus_pcib_set_detaching(void *arg, int pending __unused) +{ + struct hv_pcibus *hbus = arg; + + atomic_set_int(&hbus->detaching, 1); +} + +static void +vmbus_pcib_pre_detach(struct hv_pcibus *hbus) +{ + struct task task; + + TASK_INIT(&task, 0, vmbus_pcib_set_detaching, hbus); + + /* + * Make sure the channel callback won't push any possible new + * PCI_BUS_RELATIONS and PCI_EJECT tasks to sc->taskq. + */ + vmbus_chan_run_task(hbus->sc->chan, &task); + + taskqueue_drain_all(hbus->sc->taskq); +} + + +/* + * Standard probe entry point. + * + */ +static int +vmbus_pcib_probe(device_t dev) +{ + if (VMBUS_PROBE_GUID(device_get_parent(dev), dev, + &g_pass_through_dev_type) == 0) { + device_set_desc(dev, "Hyper-V PCI Express Pass Through"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +/* + * Standard attach entry point. + * + */ +static int +vmbus_pcib_attach(device_t dev) +{ + const int pci_ring_size = (4 * PAGE_SIZE); + const struct hyperv_guid *inst_guid; + struct vmbus_channel *channel; + struct vmbus_pcib_softc *sc; + struct hv_pcibus *hbus; + int rid = 0; + int ret; + + hbus = malloc(sizeof(*hbus), M_DEVBUF, M_WAITOK | M_ZERO); + hbus->pcib = dev; + + channel = vmbus_get_channel(dev); + inst_guid = vmbus_chan_guid_inst(channel); + hbus->pci_domain = inst_guid->hv_guid[9] | + (inst_guid->hv_guid[8] << 8); + + mtx_init(&hbus->config_lock, "hbcfg", NULL, MTX_DEF); + mtx_init(&hbus->device_list_lock, "hbdl", NULL, MTX_DEF); + TAILQ_INIT(&hbus->children); + TAILQ_INIT(&hbus->dr_list); + + hbus->cfg_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, + 0, RM_MAX_END, PCI_CONFIG_MMIO_LENGTH, + RF_ACTIVE | rman_make_alignment_flags(PAGE_SIZE)); + + if (!hbus->cfg_res) { + device_printf(dev, "failed to get resource for cfg window\n"); + ret = ENXIO; + goto free_bus; + } + + sc = device_get_softc(dev); + sc->chan = channel; + sc->rx_buf = malloc(PCIB_PACKET_SIZE, M_DEVBUF, M_WAITOK | M_ZERO); + sc->hbus = hbus; + + /* + * The taskq is used to handle PCI_BUS_RELATIONS and PCI_EJECT + * messages. NB: we can't handle the messages in the channel callback + * directly, because the message handlers need to send new messages + * to the host and waits for the host's completion messages, which + * must also be handled by the channel callback. + */ + sc->taskq = taskqueue_create("vmbus_pcib_tq", M_WAITOK, + taskqueue_thread_enqueue, &sc->taskq); + taskqueue_start_threads(&sc->taskq, 1, PI_NET, "vmbus_pcib_tq"); + + hbus->sc = sc; + + init_completion(&hbus->query_completion); + hbus->query_comp = &hbus->query_completion; + + ret = vmbus_chan_open(sc->chan, pci_ring_size, pci_ring_size, + NULL, 0, vmbus_pcib_on_channel_callback, sc); + if (ret) + goto free_res; + + ret = hv_pci_protocol_negotiation(hbus); + if (ret) + goto vmbus_close; + + ret = hv_pci_query_relations(hbus); + if (ret) + goto vmbus_close; + wait_for_completion(hbus->query_comp); + + ret = hv_pci_enter_d0(hbus); + if (ret) + goto vmbus_close; + + ret = hv_send_resources_allocated(hbus); + if (ret) + goto vmbus_close; + + hbus->pci_bus = device_add_child(dev, "pci", -1); + if (!hbus->pci_bus) { + device_printf(dev, "failed to create pci bus\n"); + ret = ENXIO; + goto vmbus_close; + } + + bus_generic_attach(dev); + + hbus->state = hv_pcibus_installed; + + return (0); + +vmbus_close: + vmbus_pcib_pre_detach(hbus); + vmbus_chan_close(sc->chan); +free_res: + taskqueue_free(sc->taskq); + free_completion(&hbus->query_completion); + free(sc->rx_buf, M_DEVBUF); + bus_release_resource(dev, SYS_RES_MEMORY, 0, hbus->cfg_res); +free_bus: + mtx_destroy(&hbus->device_list_lock); + mtx_destroy(&hbus->config_lock); + free(hbus, M_DEVBUF); + return (ret); +} + +/* + * Standard detach entry point + */ +static int +vmbus_pcib_detach(device_t dev) +{ + struct vmbus_pcib_softc *sc = device_get_softc(dev); + struct hv_pcibus *hbus = sc->hbus; + struct pci_message teardown_packet; + struct pci_bus_relations relations; + int ret; + + vmbus_pcib_pre_detach(hbus); + + if (hbus->state == hv_pcibus_installed) + bus_generic_detach(dev); + + /* Delete any children which might still exist. */ + memset(&relations, 0, sizeof(relations)); + hv_pci_devices_present(hbus, &relations); + + ret = hv_send_resources_released(hbus); + if (ret) + device_printf(dev, "failed to send PCI_RESOURCES_RELEASED\n"); + + teardown_packet.type = PCI_BUS_D0EXIT; + ret = vmbus_chan_send(sc->chan, VMBUS_CHANPKT_TYPE_INBAND, 0, + &teardown_packet, sizeof(struct pci_message), 0); + if (ret) + device_printf(dev, "failed to send PCI_BUS_D0EXIT\n"); + + taskqueue_drain_all(hbus->sc->taskq); + vmbus_chan_close(sc->chan); + taskqueue_free(sc->taskq); + + free_completion(&hbus->query_completion); + free(sc->rx_buf, M_DEVBUF); + bus_release_resource(dev, SYS_RES_MEMORY, 0, hbus->cfg_res); + + mtx_destroy(&hbus->device_list_lock); + mtx_destroy(&hbus->config_lock); + free(hbus, M_DEVBUF); + + return (0); +} + +static int +vmbus_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *val) +{ + struct vmbus_pcib_softc *sc = device_get_softc(dev); + + switch (which) { + case PCIB_IVAR_DOMAIN: + *val = sc->hbus->pci_domain; + return (0); + + case PCIB_IVAR_BUS: + /* There is only bus 0. */ + *val = 0; + return (0); + } + return (ENOENT); +} + +static int +vmbus_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t val) +{ + return (ENOENT); +} + +static struct resource * +vmbus_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + unsigned int bar_no; + struct hv_pci_dev *hpdev; + struct vmbus_pcib_softc *sc = device_get_softc(dev); + struct resource *res; + unsigned int devfn; + + if (type == PCI_RES_BUS) + return (pci_domain_alloc_bus(sc->hbus->pci_domain, child, rid, + start, end, count, flags)); + + /* Devices with port I/O BAR are not supported. */ + if (type == SYS_RES_IOPORT) + return (NULL); + + if (type == SYS_RES_MEMORY) { + devfn = PCI_DEVFN(pci_get_slot(child), + pci_get_function(child)); + hpdev = get_pcichild_wslot(sc->hbus, devfn_to_wslot(devfn)); + if (!hpdev) + return (NULL); + + bar_no = PCI_RID2BAR(*rid); + if (bar_no >= MAX_NUM_BARS) + return (NULL); + + /* Make sure a 32-bit BAR gets a 32-bit address */ + if (!(hpdev->probed_bar[bar_no] & PCIM_BAR_MEM_64)) + end = ulmin(end, 0xFFFFFFFF); + } + + res = bus_generic_alloc_resource(dev, child, type, rid, + start, end, count, flags); + /* + * If this is a request for a specific range, assume it is + * correct and pass it up to the parent. + */ + if (res == NULL && start + count - 1 == end) + res = bus_generic_alloc_resource(dev, child, type, rid, + start, end, count, flags); + return (res); +} + +static int +vmbus_pcib_release_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct vmbus_pcib_softc *sc = device_get_softc(dev); + + if (type == PCI_RES_BUS) + return (pci_domain_release_bus(sc->hbus->pci_domain, child, + rid, r)); + + if (type == SYS_RES_IOPORT) + return (EINVAL); + + return (bus_generic_release_resource(dev, child, type, rid, r)); +} + +#if __FreeBSD_version >= 1100000 +static int +vmbus_pcib_get_cpus(device_t pcib, device_t dev, enum cpu_sets op, + size_t setsize, cpuset_t *cpuset) +{ + return (bus_get_cpus(pcib, op, setsize, cpuset)); +} +#endif + +static uint32_t +vmbus_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, int bytes) +{ + struct vmbus_pcib_softc *sc = device_get_softc(dev); + struct hv_pci_dev *hpdev; + unsigned int devfn = PCI_DEVFN(slot, func); + uint32_t data = 0; + + KASSERT(bus == 0, ("bus should be 0, but is %u", bus)); + + hpdev = get_pcichild_wslot(sc->hbus, devfn_to_wslot(devfn)); + if (!hpdev) + return (~0); + + _hv_pcifront_read_config(hpdev, reg, bytes, &data); + + return (data); +} + +static void +vmbus_pcib_write_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, uint32_t data, int bytes) +{ + struct vmbus_pcib_softc *sc = device_get_softc(dev); + struct hv_pci_dev *hpdev; + unsigned int devfn = PCI_DEVFN(slot, func); + + KASSERT(bus == 0, ("bus should be 0, but is %u", bus)); + + hpdev = get_pcichild_wslot(sc->hbus, devfn_to_wslot(devfn)); + if (!hpdev) + return; + + _hv_pcifront_write_config(hpdev, reg, bytes, data); +} + +static int +vmbus_pcib_route_intr(device_t pcib, device_t dev, int pin) +{ + /* We only support MSI/MSI-X and don't support INTx interrupt. */ + return (PCI_INVALID_IRQ); +} + +static int +vmbus_pcib_alloc_msi(device_t pcib, device_t dev, int count, + int maxcount, int *irqs) +{ + return (PCIB_ALLOC_MSI(device_get_parent(pcib), dev, count, maxcount, + irqs)); +} + +static int +vmbus_pcib_release_msi(device_t pcib, device_t dev, int count, int *irqs) +{ + return (PCIB_RELEASE_MSI(device_get_parent(pcib), dev, count, irqs)); +} + +static int +vmbus_pcib_alloc_msix(device_t pcib, device_t dev, int *irq) +{ + return (PCIB_ALLOC_MSIX(device_get_parent(pcib), dev, irq)); +} + +static int +vmbus_pcib_release_msix(device_t pcib, device_t dev, int irq) +{ + return (PCIB_RELEASE_MSIX(device_get_parent(pcib), dev, irq)); +} + +#define MSI_INTEL_ADDR_DEST 0x000ff000 +#define MSI_INTEL_DATA_INTVEC IOART_INTVEC /* Interrupt vector. */ +#define MSI_INTEL_DATA_DELFIXED IOART_DELFIXED + +static int +vmbus_pcib_map_msi(device_t pcib, device_t child, int irq, + uint64_t *addr, uint32_t *data) +{ + unsigned int devfn; + struct hv_pci_dev *hpdev; + + uint64_t v_addr; + uint32_t v_data; + struct hv_irq_desc *hid, *tmp_hid; + unsigned int cpu, vcpu_id; + unsigned int vector; + + struct vmbus_pcib_softc *sc = device_get_softc(pcib); + struct pci_create_interrupt *int_pkt; + struct compose_comp_ctxt comp; + struct { + struct pci_packet pkt; + uint8_t buffer[sizeof(struct pci_create_interrupt)]; + } ctxt; + + int ret; + + devfn = PCI_DEVFN(pci_get_slot(child), pci_get_function(child)); + hpdev = get_pcichild_wslot(sc->hbus, devfn_to_wslot(devfn)); + if (!hpdev) + return (ENOENT); + + ret = PCIB_MAP_MSI(device_get_parent(pcib), child, irq, + &v_addr, &v_data); + if (ret) + return (ret); + + TAILQ_FOREACH_SAFE(hid, &hpdev->irq_desc_list, link, tmp_hid) { + if (hid->irq == irq) { + TAILQ_REMOVE(&hpdev->irq_desc_list, hid, link); + hv_int_desc_free(hpdev, hid); + break; + } + } + + cpu = (v_addr & MSI_INTEL_ADDR_DEST) >> 12; + vcpu_id = VMBUS_GET_VCPU_ID(device_get_parent(pcib), pcib, cpu); + vector = v_data & MSI_INTEL_DATA_INTVEC; + + init_completion(&comp.comp_pkt.host_event); + + memset(&ctxt, 0, sizeof(ctxt)); + ctxt.pkt.completion_func = hv_pci_compose_compl; + ctxt.pkt.compl_ctxt = ∁ + + int_pkt = (struct pci_create_interrupt *)&ctxt.pkt.message; + int_pkt->message_type.type = PCI_CREATE_INTERRUPT_MESSAGE; + int_pkt->wslot.val = hpdev->desc.wslot.val; + int_pkt->int_desc.vector = vector; + int_pkt->int_desc.vector_count = 1; + int_pkt->int_desc.delivery_mode = MSI_INTEL_DATA_DELFIXED; + int_pkt->int_desc.cpu_mask = 1ULL << vcpu_id; + + ret = vmbus_chan_send(sc->chan, VMBUS_CHANPKT_TYPE_INBAND, + VMBUS_CHANPKT_FLAG_RC, int_pkt, sizeof(*int_pkt), + (uint64_t)&ctxt.pkt); + if (ret) { + free_completion(&comp.comp_pkt.host_event); + return (ret); + } + + wait_for_completion(&comp.comp_pkt.host_event); + free_completion(&comp.comp_pkt.host_event); + + if (comp.comp_pkt.completion_status < 0) + return (EPROTO); + + *addr = comp.int_desc.address; + *data = comp.int_desc.data; + + hid = malloc(sizeof(struct hv_irq_desc), M_DEVBUF, M_WAITOK | M_ZERO); + hid->irq = irq; + hid->desc = comp.int_desc; + TAILQ_INSERT_TAIL(&hpdev->irq_desc_list, hid, link); + + return (0); +} + +static device_method_t vmbus_pcib_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, vmbus_pcib_probe), + DEVMETHOD(device_attach, vmbus_pcib_attach), + DEVMETHOD(device_detach, vmbus_pcib_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface */ + DEVMETHOD(bus_read_ivar, vmbus_pcib_read_ivar), + DEVMETHOD(bus_write_ivar, vmbus_pcib_write_ivar), + DEVMETHOD(bus_alloc_resource, vmbus_pcib_alloc_resource), + DEVMETHOD(bus_release_resource, vmbus_pcib_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), +#if __FreeBSD_version >= 1100000 + DEVMETHOD(bus_get_cpus, vmbus_pcib_get_cpus), +#endif + + /* pcib interface */ + DEVMETHOD(pcib_maxslots, pcib_maxslots), + DEVMETHOD(pcib_read_config, vmbus_pcib_read_config), + DEVMETHOD(pcib_write_config, vmbus_pcib_write_config), + DEVMETHOD(pcib_route_interrupt, vmbus_pcib_route_intr), + DEVMETHOD(pcib_alloc_msi, vmbus_pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, vmbus_pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, vmbus_pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, vmbus_pcib_release_msix), + DEVMETHOD(pcib_map_msi, vmbus_pcib_map_msi), + + DEVMETHOD_END +}; + +static devclass_t pcib_devclass; + +DEFINE_CLASS_0(pcib, vmbus_pcib_driver, vmbus_pcib_methods, + sizeof(struct vmbus_pcib_softc)); +DRIVER_MODULE(vmbus_pcib, vmbus, vmbus_pcib_driver, pcib_devclass, 0, 0); +MODULE_DEPEND(vmbus_pcib, vmbus, 1, 1, 1); diff --git a/sys/modules/hyperv/pcib/Makefile b/sys/modules/hyperv/pcib/Makefile new file mode 100644 index 00000000000..0ceeecde658 --- /dev/null +++ b/sys/modules/hyperv/pcib/Makefile @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../dev/hyperv/pcib \ + ${.CURDIR}/../../../dev/hyperv/vmbus + +KMOD= vmbus_pcib +SRCS= pcib.c +SRCS+= bus_if.h device_if.h vmbus_if.h + +CFLAGS+= -I${.CURDIR}/../../../dev/hyperv/pcib + +.include From 04b5b6a984272928f2a5581190f37d4a5ad90d74 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 16 Nov 2016 11:31:53 +0000 Subject: [PATCH 119/204] Use the correct OF_getencprop to get the height. Reported by: jmcneill Sponsored by: ABT Systems Ltd --- sys/arm/broadcom/bcm2835/bcm2835_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_fb.c b/sys/arm/broadcom/bcm2835/bcm2835_fb.c index b8397ac0987..d8c25b5a6e8 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_fb.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_fb.c @@ -479,7 +479,7 @@ bcmfb_configure(int flags) } if (sc->height == 0) { - if ((OF_getprop(display, "broadcom,height", + if ((OF_getencprop(display, "broadcom,height", &cell, sizeof(cell))) > 0) sc->height = cell; } From b1895f72701ee8f71967374acaee706f2da6666f Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 16 Nov 2016 11:37:43 +0000 Subject: [PATCH 120/204] Include the SMSC LAN91C111 driver, this is found in some of the ARM models. --- sys/arm64/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index 4502dc8fb1b..9b1c42e634f 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -121,6 +121,7 @@ device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family device ix # Intel 10Gb Ethernet Family device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet +device smc # SMSC LAN91C111 device vnic # Cavium ThunderX NIC device al_eth # Annapurna Alpine Ethernet NIC From 443788c26716250d8110b6aa6df481634a1a268f Mon Sep 17 00:00:00 2001 From: Christian Brueffer Date: Wed, 16 Nov 2016 13:22:57 +0000 Subject: [PATCH 121/204] Various minor cleanups. --- share/man/man4/bnxt.4 | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/share/man/man4/bnxt.4 b/share/man/man4/bnxt.4 index 00268b14250..4b8f6e3e7f9 100644 --- a/share/man/man4/bnxt.4 +++ b/share/man/man4/bnxt.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 12, 2016 +.Dd November 16, 2016 .Dt BNXT 4 .Os .Sh NAME @@ -89,7 +89,7 @@ Broadcom BCM57304 NetXtreme-C Virtual Function Broadcom BCM57404 NetXtreme-E Virtual Function .El .Sh SYSCTL VARIABLES -These variables must be set before loading the driver, either via +These variables must be set before loading the driver, either via .Xr loader.conf 5 or through the use of .Xr kenv 1 . @@ -165,11 +165,12 @@ variables are read-only: .Bl -tag -width indent .It Va dev.bnxt.X.if_name Current interface name of the device. -This will normally be +This will normally be .Va bnxtX , but this can be changed using .Cm ifconfig name . -This sysctl allows correlating an interface with a child of dev.bnxt. +This sysctl allows correlating an interface with a child of +.Va dev.bnxt . .It Va dev.bnxt.X.nvram.* Information about the NVRAM device which contains the device firmware. .It Va dev.bnxt.X.ver.* @@ -191,10 +192,10 @@ reasons to ignore Ethernet frames. .It "bnxt%d: %s command returned %s error." Device firmware rejected a command from the driver. There might be a driver/firmware HWRM API mismatch. -.It "bnxt%d: Timeout sending %s (timeout: %d) seq %d\n" +.It "bnxt%d: Timeout sending %s (timeout: %d) seq %d" Device firmware unresponsive. A PCI device reset is likely needed. -.It "bnxt%d: Timeout sending %s (timeout: %d) msg {0x%x 0x%x} len:%d v: %d\n" +.It "bnxt%d: Timeout sending %s (timeout: %d) msg {0x%x 0x%x} len:%d v: %d" Partial firmware response. A PCI device reset is likely needed. .Pp @@ -203,20 +204,21 @@ As of this writing, the system must be rebooted to initiate a PCI device reset. .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , +.Xr iflib 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , -.Xr ifconfig 8 , -.Xr iflib 4 +.Xr ifconfig 8 .Sh HISTORY The .Nm device driver first appeared in .Fx 12.0 . .Sh AUTHORS +.An -nosplit The .Nm driver was written by -.An Jack Vogel Aq Mt jfvogel@gmail.com . +.An Jack Vogel Aq Mt jfvogel@gmail.com , and is currently maintained by .An Stephen Hurd Aq Mt stephen.hurd@broadcom.com . From 2a8e73ea33b99b56871ae7ca478d4db0ed2de1aa Mon Sep 17 00:00:00 2001 From: Christian Brueffer Date: Wed, 16 Nov 2016 13:27:39 +0000 Subject: [PATCH 122/204] Add bnxt(4) to the hardware notes. --- release/doc/en_US.ISO8859-1/hardware/article.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/doc/en_US.ISO8859-1/hardware/article.xml b/release/doc/en_US.ISO8859-1/hardware/article.xml index 5d644385866..d70d2408907 100644 --- a/release/doc/en_US.ISO8859-1/hardware/article.xml +++ b/release/doc/en_US.ISO8859-1/hardware/article.xml @@ -800,6 +800,8 @@ &hwlist.bge; + &hwlist.bnxt; + &hwlist.bxe; &hwlist.cas; From 33299e3d96bb998373f69d828c495aa84adff45b Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Wed, 16 Nov 2016 14:39:03 +0000 Subject: [PATCH 123/204] Make sure MAC address is reprogrammed when if_init() callback is invoked. Else promiscious mode must be used to pass traffic. While at it fix a debug print macro. MFC after: 1 week --- sys/dev/usb/net/if_smsc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/net/if_smsc.c b/sys/dev/usb/net/if_smsc.c index 2162224b330..375ab5f2189 100644 --- a/sys/dev/usb/net/if_smsc.c +++ b/sys/dev/usb/net/if_smsc.c @@ -152,7 +152,7 @@ static const struct usb_device_id smsc_devs[] = { device_printf((sc)->sc_ue.ue_dev, "debug: " fmt, ##args); \ } while(0) #else -#define smsc_dbg_printf(sc, fmt, args...) +#define smsc_dbg_printf(sc, fmt, args...) do { } while (0) #endif #define smsc_warn_printf(sc, fmt, args...) \ @@ -822,7 +822,6 @@ static int smsc_sethwcsum(struct smsc_softc *sc) return (0); } - /** * smsc_setmacaddress - Sets the mac address in the device * @sc: driver soft context @@ -905,6 +904,9 @@ smsc_init(struct usb_ether *ue) SMSC_LOCK_ASSERT(sc, MA_OWNED); + if (smsc_setmacaddress(sc, IF_LLADDR(ifp))) + smsc_dbg_printf(sc, "setting MAC address failed\n"); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) return; From 7804dd5212a3874db3328bc94d00263f23f96fa8 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Wed, 16 Nov 2016 15:21:32 +0000 Subject: [PATCH 124/204] Add full softfloat and hardfloat support for RISC-V. Hardfloat is now default (use riscv64sf as TARGET_ARCH for softfloat). Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8529 --- Makefile | 2 +- Makefile.inc1 | 1 + gnu/usr.bin/cc/Makefile.tgt | 2 +- lib/libc/Makefile | 3 +- lib/libc/riscv/Makefile.inc | 4 + lib/libc/riscv/Symbol.map | 18 ++ lib/libc/riscv/gen/_setjmp.S | 64 +++--- lib/libc/riscv/gen/flt_rounds.c | 25 ++- lib/libc/riscv/gen/setjmp.S | 60 +++-- lib/libc/riscv/softfloat/milieu.h | 48 ++++ lib/libc/riscv/softfloat/riscv-gcc.h | 86 ++++++++ lib/libc/riscv/softfloat/softfloat.h | 315 +++++++++++++++++++++++++++ lib/libc/softfloat/Makefile.inc | 3 + lib/libcompiler_rt/Makefile.inc | 7 +- lib/msun/riscv/Makefile.inc | 5 + lib/msun/riscv/Symbol.map | 21 ++ lib/msun/riscv/fenv.c | 11 + lib/msun/riscv/fenv.h | 134 +++++++----- share/mk/bsd.cpu.mk | 4 +- share/mk/local.meta.sys.mk | 2 +- share/mk/src.opts.mk | 6 +- share/mk/sys.mk | 2 +- sys/conf/options.riscv | 2 +- sys/modules/dtrace/dtrace/Makefile | 4 + sys/riscv/conf/GENERIC | 2 +- sys/riscv/include/fpe.h | 38 ++++ sys/riscv/include/pcb.h | 25 ++- sys/riscv/include/reg.h | 5 +- sys/riscv/include/riscvreg.h | 8 +- sys/riscv/riscv/genassym.c | 2 + sys/riscv/riscv/machdep.c | 82 ++++++- sys/riscv/riscv/mp_machdep.c | 7 - sys/riscv/riscv/swtch.S | 167 +++++++++++++- sys/riscv/riscv/trap.c | 13 ++ sys/riscv/riscv/vm_machdep.c | 4 +- 35 files changed, 1000 insertions(+), 182 deletions(-) create mode 100644 lib/libc/riscv/softfloat/milieu.h create mode 100644 lib/libc/riscv/softfloat/riscv-gcc.h create mode 100644 lib/libc/riscv/softfloat/softfloat.h create mode 100644 lib/msun/riscv/Symbol.map create mode 100644 sys/riscv/include/fpe.h diff --git a/Makefile b/Makefile index 5904a3f967e..7e76ac915fc 100644 --- a/Makefile +++ b/Makefile @@ -239,7 +239,7 @@ _MAKE+= MK_META_MODE=no _TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/powerpcspe/powerpc/:C/riscv64/riscv/} +_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/powerpcspe/powerpc/:C/riscv64(sf)?/riscv/} .endif .if defined(TARGET) && !defined(_TARGET) _TARGET=${TARGET} diff --git a/Makefile.inc1 b/Makefile.inc1 index d78cfd26a16..a5b44cb6c8b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -364,6 +364,7 @@ KNOWN_ARCHES?= aarch64/arm64 \ powerpc64/powerpc \ powerpcspe/powerpc \ riscv64/riscv \ + riscv64sf/riscv \ sparc64 .if ${TARGET} == ${TARGET_ARCH} diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt index 3acd4d7c929..eb8ee7b4db8 100644 --- a/gnu/usr.bin/cc/Makefile.tgt +++ b/gnu/usr.bin/cc/Makefile.tgt @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc(64|spe)/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv64/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 99ddfc2e8f7..377a6ee6cd1 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -111,7 +111,8 @@ NOASM= .include "${LIBC_SRCTOP}/xdr/Makefile.inc" .if (${LIBC_ARCH} == "arm" && \ (${MACHINE_ARCH:Marmv6*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \ - (${LIBC_ARCH} == "mips" && ${MACHINE_ARCH:Mmips*hf} == "") + (${LIBC_ARCH} == "mips" && ${MACHINE_ARCH:Mmips*hf} == "") || \ + (${LIBC_ARCH} == "riscv" && ${MACHINE_ARCH:Mriscv*sf} != "") .include "${LIBC_SRCTOP}/softfloat/Makefile.inc" .endif .if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" diff --git a/lib/libc/riscv/Makefile.inc b/lib/libc/riscv/Makefile.inc index b22190353e3..105839021b9 100644 --- a/lib/libc/riscv/Makefile.inc +++ b/lib/libc/riscv/Makefile.inc @@ -3,6 +3,10 @@ # Machine dependent definitions for the RISC-V architecture. # +.if ${MACHINE_ARCH:Mriscv*sf} != "" +CFLAGS+=-DSOFTFLOAT +.endif + # Long double is quad precision GDTOASRCS+=strtorQ.c MDSRCS+=machdep_ldisQ.c diff --git a/lib/libc/riscv/Symbol.map b/lib/libc/riscv/Symbol.map index 669dad37983..b959072e7e0 100644 --- a/lib/libc/riscv/Symbol.map +++ b/lib/libc/riscv/Symbol.map @@ -35,4 +35,22 @@ FBSDprivate_1.0 { _set_tp; _end; __makecontext; + + /* softfloat */ + __addsf3; + __adddf3; + __subsf3; + __subdf3; + __mulsf3; + __muldf3; + __divsf3; + __divdf3; + __floatsisf; + __floatsidf; + __fixsfsi; + __fixdfsi; + __fixunssfsi; + __fixunsdfsi; + __extendsfdf2; + __truncdfsf2; }; diff --git a/lib/libc/riscv/gen/_setjmp.S b/lib/libc/riscv/gen/_setjmp.S index 1fa064d2ecf..4e82ae42085 100644 --- a/lib/libc/riscv/gen/_setjmp.S +++ b/lib/libc/riscv/gen/_setjmp.S @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2015-2016 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -61,24 +61,21 @@ ENTRY(_setjmp) sd ra, (12 * 8)(a0) addi a0, a0, (13 * 8) -#ifndef _STANDALONE -#if 0 - /* RISCVTODO */ - /* Store the vfp registers */ - fsq fs0, (0 * 16)(a0) - fsq fs1, (1 * 16)(a0) - fsq fs2, (2 * 16)(a0) - fsq fs3, (3 * 16)(a0) - fsq fs4, (4 * 16)(a0) - fsq fs5, (5 * 16)(a0) - fsq fs6, (6 * 16)(a0) - fsq fs7, (7 * 16)(a0) - fsq fs8, (8 * 16)(a0) - fsq fs9, (9 * 16)(a0) - fsq fs10, (10 * 16)(a0) - fsq fs11, (11 * 16)(a0) +#if !defined(_STANDALONE) && !defined(SOFTFLOAT) + /* Store the fpe registers */ + fsd fs0, (0 * 16)(a0) + fsd fs1, (1 * 16)(a0) + fsd fs2, (2 * 16)(a0) + fsd fs3, (3 * 16)(a0) + fsd fs4, (4 * 16)(a0) + fsd fs5, (5 * 16)(a0) + fsd fs6, (6 * 16)(a0) + fsd fs7, (7 * 16)(a0) + fsd fs8, (8 * 16)(a0) + fsd fs9, (9 * 16)(a0) + fsd fs10, (10 * 16)(a0) + fsd fs11, (11 * 16)(a0) addi a0, a0, (12 * 16) -#endif #endif /* Return value */ @@ -117,24 +114,21 @@ ENTRY(_longjmp) ld ra, (12 * 8)(a0) addi a0, a0, (13 * 8) -#ifndef _STANDALONE -#if 0 - /* RISCVTODO */ - /* Restore the vfp registers */ - flq fs0, (0 * 16)(a0) - flq fs1, (1 * 16)(a0) - flq fs2, (2 * 16)(a0) - flq fs3, (3 * 16)(a0) - flq fs4, (4 * 16)(a0) - flq fs5, (5 * 16)(a0) - flq fs6, (6 * 16)(a0) - flq fs7, (7 * 16)(a0) - flq fs8, (8 * 16)(a0) - flq fs9, (9 * 16)(a0) - flq fs10, (10 * 16)(a0) - flq fs11, (11 * 16)(a0) +#if !defined(_STANDALONE) && !defined(SOFTFLOAT) + /* Restore the fpe registers */ + fld fs0, (0 * 16)(a0) + fld fs1, (1 * 16)(a0) + fld fs2, (2 * 16)(a0) + fld fs3, (3 * 16)(a0) + fld fs4, (4 * 16)(a0) + fld fs5, (5 * 16)(a0) + fld fs6, (6 * 16)(a0) + fld fs7, (7 * 16)(a0) + fld fs8, (8 * 16)(a0) + fld fs9, (9 * 16)(a0) + fld fs10, (10 * 16)(a0) + fld fs11, (11 * 16)(a0) addi a0, a0, (12 * 16) -#endif #endif /* Load the return value */ diff --git a/lib/libc/riscv/gen/flt_rounds.c b/lib/libc/riscv/gen/flt_rounds.c index 179963cfa29..13bb8b2a179 100644 --- a/lib/libc/riscv/gen/flt_rounds.c +++ b/lib/libc/riscv/gen/flt_rounds.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2015-2016 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -40,23 +40,24 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef SOFTFLOAT +#include "softfloat-for-gcc.h" +#include "milieu.h" +#include "softfloat.h" +#endif + int __flt_rounds(void) { -#if 0 - uint64_t fcsr; -#endif - int mode; + uint64_t mode; -#if 0 - __asm __volatile("csrr %0, fcsr" : "=r" (fcsr)); - mode = (fcsr & _ROUND_MASK); +#ifdef SOFTFLOAT + mode = __softfloat_float_rounding_mode; +#else + __asm __volatile("csrr %0, fcsr" : "=r" (mode)); #endif - /* RISCVTODO */ - mode = FE_TOWARDZERO; /* softfloat rounding mode */ - - switch (mode) { + switch (mode & _ROUND_MASK) { case FE_TOWARDZERO: return (0); case FE_TONEAREST: diff --git a/lib/libc/riscv/gen/setjmp.S b/lib/libc/riscv/gen/setjmp.S index de8d7b5d519..9d97b51de6b 100644 --- a/lib/libc/riscv/gen/setjmp.S +++ b/lib/libc/riscv/gen/setjmp.S @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2015-2016 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -75,21 +75,20 @@ ENTRY(setjmp) sd ra, (12 * 8)(a0) addi a0, a0, (13 * 8) -#if 0 - /* RISCVTODO */ - /* Store the vfp registers */ - fsq fs0, (0 * 16)(a0) - fsq fs1, (1 * 16)(a0) - fsq fs2, (2 * 16)(a0) - fsq fs3, (3 * 16)(a0) - fsq fs4, (4 * 16)(a0) - fsq fs5, (5 * 16)(a0) - fsq fs6, (6 * 16)(a0) - fsq fs7, (7 * 16)(a0) - fsq fs8, (8 * 16)(a0) - fsq fs9, (9 * 16)(a0) - fsq fs10, (10 * 16)(a0) - fsq fs11, (11 * 16)(a0) +#ifndef SOFTFLOAT + /* Store the fpe registers */ + fsd fs0, (0 * 16)(a0) + fsd fs1, (1 * 16)(a0) + fsd fs2, (2 * 16)(a0) + fsd fs3, (3 * 16)(a0) + fsd fs4, (4 * 16)(a0) + fsd fs5, (5 * 16)(a0) + fsd fs6, (6 * 16)(a0) + fsd fs7, (7 * 16)(a0) + fsd fs8, (8 * 16)(a0) + fsd fs9, (9 * 16)(a0) + fsd fs10, (10 * 16)(a0) + fsd fs11, (11 * 16)(a0) addi a0, a0, (12 * 16) #endif @@ -145,21 +144,20 @@ ENTRY(longjmp) ld ra, (12 * 8)(a0) addi a0, a0, (13 * 8) -#if 0 - /* RISCVTODO */ - /* Restore the vfp registers */ - flq fs0, (0 * 16)(a0) - flq fs1, (1 * 16)(a0) - flq fs2, (2 * 16)(a0) - flq fs3, (3 * 16)(a0) - flq fs4, (4 * 16)(a0) - flq fs5, (5 * 16)(a0) - flq fs6, (6 * 16)(a0) - flq fs7, (7 * 16)(a0) - flq fs8, (8 * 16)(a0) - flq fs9, (9 * 16)(a0) - flq fs10, (10 * 16)(a0) - flq fs11, (11 * 16)(a0) +#ifndef SOFTFLOAT + /* Restore the fpe registers */ + fld fs0, (0 * 16)(a0) + fld fs1, (1 * 16)(a0) + fld fs2, (2 * 16)(a0) + fld fs3, (3 * 16)(a0) + fld fs4, (4 * 16)(a0) + fld fs5, (5 * 16)(a0) + fld fs6, (6 * 16)(a0) + fld fs7, (7 * 16)(a0) + fld fs8, (8 * 16)(a0) + fld fs9, (9 * 16)(a0) + fld fs10, (10 * 16)(a0) + fld fs11, (11 * 16)(a0) addi a0, a0, (12 * 16) #endif diff --git a/lib/libc/riscv/softfloat/milieu.h b/lib/libc/riscv/softfloat/milieu.h new file mode 100644 index 00000000000..e97437bdc2d --- /dev/null +++ b/lib/libc/riscv/softfloat/milieu.h @@ -0,0 +1,48 @@ +/* $FreeBSD$ */ + +/* +=============================================================================== + +This C header file is part of the SoftFloat IEC/IEEE Floating-point +Arithmetic Package, Release 2a. + +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ +arithmetic/SoftFloat.html'. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY +AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) they include prominent notice that the work is derivative, and (2) they +include prominent notice akin to these four paragraphs for those parts of +this code that are retained. + +=============================================================================== +*/ + +/* +------------------------------------------------------------------------------- +Include common integer types and flags. +------------------------------------------------------------------------------- +*/ +#include "riscv-gcc.h" + +/* +------------------------------------------------------------------------------- +Symbolic Boolean literals. +------------------------------------------------------------------------------- +*/ +enum { + FALSE = 0, + TRUE = 1 +}; diff --git a/lib/libc/riscv/softfloat/riscv-gcc.h b/lib/libc/riscv/softfloat/riscv-gcc.h new file mode 100644 index 00000000000..3fe1767e63c --- /dev/null +++ b/lib/libc/riscv/softfloat/riscv-gcc.h @@ -0,0 +1,86 @@ +/* $NetBSD: arm-gcc.h,v 1.2 2001/02/21 18:09:25 bjh21 Exp $ */ +/* $FreeBSD$ */ + +/* +------------------------------------------------------------------------------- +One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. +------------------------------------------------------------------------------- +*/ +#define LITTLEENDIAN + +/* +------------------------------------------------------------------------------- +The macro `BITS64' can be defined to indicate that 64-bit integer types are +supported by the compiler. +------------------------------------------------------------------------------- +*/ +#define BITS64 + +/* +------------------------------------------------------------------------------- +Each of the following `typedef's defines the most convenient type that holds +integers of at least as many bits as specified. For example, `uint8' should +be the most convenient type that can hold unsigned integers of as many as +8 bits. The `flag' type must be able to hold either a 0 or 1. For most +implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed +to the same as `int'. +------------------------------------------------------------------------------- +*/ +typedef int flag; +typedef int uint8; +typedef int int8; +typedef int uint16; +typedef int int16; +typedef unsigned int uint32; +typedef signed int int32; +#ifdef BITS64 +typedef unsigned long long int uint64; +typedef signed long long int int64; +#endif + +/* +------------------------------------------------------------------------------- +Each of the following `typedef's defines a type that holds integers +of _exactly_ the number of bits specified. For instance, for most +implementation of C, `bits16' and `sbits16' should be `typedef'ed to +`unsigned short int' and `signed short int' (or `short int'), respectively. +------------------------------------------------------------------------------- +*/ +typedef unsigned char bits8; +typedef signed char sbits8; +typedef unsigned short int bits16; +typedef signed short int sbits16; +typedef unsigned int bits32; +typedef signed int sbits32; +#ifdef BITS64 +typedef unsigned long long int bits64; +typedef signed long long int sbits64; +#endif + +#ifdef BITS64 +/* +------------------------------------------------------------------------------- +The `LIT64' macro takes as its argument a textual integer literal and +if necessary ``marks'' the literal as having a 64-bit integer type. +For example, the GNU C Compiler (`gcc') requires that 64-bit literals be +appended with the letters `LL' standing for `long long', which is `gcc's +name for the 64-bit integer type. Some compilers may allow `LIT64' to be +defined as the identity macro: `#define LIT64( a ) a'. +------------------------------------------------------------------------------- +*/ +#define LIT64( a ) a##LL +#endif + +/* +------------------------------------------------------------------------------- +The macro `INLINE' can be used before functions that should be inlined. If +a compiler does not support explicit inlining, this macro should be defined +to be `static'. +------------------------------------------------------------------------------- +*/ +#define INLINE static __inline + +#if defined(SOFTFLOAT_FOR_GCC) +#define FLOAT64_DEMANGLE(a) (a) +#define FLOAT64_MANGLE(a) (a) +#endif diff --git a/lib/libc/riscv/softfloat/softfloat.h b/lib/libc/riscv/softfloat/softfloat.h new file mode 100644 index 00000000000..6aef49975a3 --- /dev/null +++ b/lib/libc/riscv/softfloat/softfloat.h @@ -0,0 +1,315 @@ +/* $NetBSD: softfloat.h,v 1.6 2002/05/12 13:12:46 bjh21 Exp $ */ +/* $FreeBSD$ */ + +/* This is a derivative work. */ + +/* +=============================================================================== + +This C header file is part of the SoftFloat IEC/IEEE Floating-point +Arithmetic Package, Release 2a. + +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ +arithmetic/SoftFloat.html'. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY +AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) they include prominent notice that the work is derivative, and (2) they +include prominent notice akin to these four paragraphs for those parts of +this code that are retained. + +=============================================================================== +*/ + +/* +------------------------------------------------------------------------------- +The macro `FLOATX80' must be defined to enable the extended double-precision +floating-point format `floatx80'. If this macro is not defined, the +`floatx80' type will not be defined, and none of the functions that either +input or output the `floatx80' type will be defined. The same applies to +the `FLOAT128' macro and the quadruple-precision format `float128'. +------------------------------------------------------------------------------- +*/ +/* #define FLOATX80 */ +/* #define FLOAT128 */ + +#include + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE floating-point types. +------------------------------------------------------------------------------- +*/ +typedef unsigned int float32; +typedef unsigned long long float64; +#ifdef FLOATX80 +typedef struct { + unsigned short high; + unsigned long long low; +} floatx80; +#endif +#ifdef FLOAT128 +typedef struct { + unsigned long long high, low; +} float128; +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE floating-point underflow tininess-detection mode. +------------------------------------------------------------------------------- +*/ +#ifndef SOFTFLOAT_FOR_GCC +extern int float_detect_tininess; +#endif +enum { + float_tininess_after_rounding = 0, + float_tininess_before_rounding = 1 +}; + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE floating-point rounding mode. +------------------------------------------------------------------------------- +*/ +extern int float_rounding_mode; +enum { + float_round_nearest_even = FE_TONEAREST, + float_round_to_zero = FE_TOWARDZERO, + float_round_down = FE_DOWNWARD, + float_round_up = FE_UPWARD +}; + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE floating-point exception flags. +------------------------------------------------------------------------------- +*/ +extern int float_exception_flags; +extern int float_exception_mask; +enum { + float_flag_inexact = FE_INEXACT, + float_flag_underflow = FE_UNDERFLOW, + float_flag_overflow = FE_OVERFLOW, + float_flag_divbyzero = FE_DIVBYZERO, + float_flag_invalid = FE_INVALID +}; + +/* +------------------------------------------------------------------------------- +Routine to raise any or all of the software IEC/IEEE floating-point +exception flags. +------------------------------------------------------------------------------- +*/ +void float_raise( int ); + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE integer-to-floating-point conversion routines. +------------------------------------------------------------------------------- +*/ +float32 int32_to_float32( int ); +float64 int32_to_float64( int ); +#ifdef FLOATX80 +floatx80 int32_to_floatx80( int ); +#endif +#ifdef FLOAT128 +float128 int32_to_float128( int ); +#endif +#ifndef SOFTFLOAT_FOR_GCC /* __floatdi?f is in libgcc2.c */ +float32 int64_to_float32( long long ); +float64 int64_to_float64( long long ); +#ifdef FLOATX80 +floatx80 int64_to_floatx80( long long ); +#endif +#ifdef FLOAT128 +float128 int64_to_float128( long long ); +#endif +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE single-precision conversion routines. +------------------------------------------------------------------------------- +*/ +int float32_to_int32( float32 ); +int float32_to_int32_round_to_zero( float32 ); +#if defined(SOFTFLOAT_FOR_GCC) && defined(SOFTFLOAT_NEED_FIXUNS) +unsigned int float32_to_uint32_round_to_zero( float32 ); +#endif +#ifndef SOFTFLOAT_FOR_GCC /* __fix?fdi provided by libgcc2.c */ +long long float32_to_int64( float32 ); +long long float32_to_int64_round_to_zero( float32 ); +#endif +float64 float32_to_float64( float32 ); +#ifdef FLOATX80 +floatx80 float32_to_floatx80( float32 ); +#endif +#ifdef FLOAT128 +float128 float32_to_float128( float32 ); +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE single-precision operations. +------------------------------------------------------------------------------- +*/ +float32 float32_round_to_int( float32 ); +float32 float32_add( float32, float32 ); +float32 float32_sub( float32, float32 ); +float32 float32_mul( float32, float32 ); +float32 float32_div( float32, float32 ); +float32 float32_rem( float32, float32 ); +float32 float32_sqrt( float32 ); +int float32_eq( float32, float32 ); +int float32_le( float32, float32 ); +int float32_lt( float32, float32 ); +int float32_eq_signaling( float32, float32 ); +int float32_le_quiet( float32, float32 ); +int float32_lt_quiet( float32, float32 ); +#ifndef SOFTFLOAT_FOR_GCC +int float32_is_signaling_nan( float32 ); +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE double-precision conversion routines. +------------------------------------------------------------------------------- +*/ +int float64_to_int32( float64 ); +int float64_to_int32_round_to_zero( float64 ); +#if defined(SOFTFLOAT_FOR_GCC) && defined(SOFTFLOAT_NEED_FIXUNS) +unsigned int float64_to_uint32_round_to_zero( float64 ); +#endif +#ifndef SOFTFLOAT_FOR_GCC /* __fix?fdi provided by libgcc2.c */ +long long float64_to_int64( float64 ); +long long float64_to_int64_round_to_zero( float64 ); +#endif +float32 float64_to_float32( float64 ); +#ifdef FLOATX80 +floatx80 float64_to_floatx80( float64 ); +#endif +#ifdef FLOAT128 +float128 float64_to_float128( float64 ); +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE double-precision operations. +------------------------------------------------------------------------------- +*/ +float64 float64_round_to_int( float64 ); +float64 float64_add( float64, float64 ); +float64 float64_sub( float64, float64 ); +float64 float64_mul( float64, float64 ); +float64 float64_div( float64, float64 ); +float64 float64_rem( float64, float64 ); +float64 float64_sqrt( float64 ); +int float64_eq( float64, float64 ); +int float64_le( float64, float64 ); +int float64_lt( float64, float64 ); +int float64_eq_signaling( float64, float64 ); +int float64_le_quiet( float64, float64 ); +int float64_lt_quiet( float64, float64 ); +#ifndef SOFTFLOAT_FOR_GCC +int float64_is_signaling_nan( float64 ); +#endif + +#ifdef FLOATX80 + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE extended double-precision conversion routines. +------------------------------------------------------------------------------- +*/ +int floatx80_to_int32( floatx80 ); +int floatx80_to_int32_round_to_zero( floatx80 ); +long long floatx80_to_int64( floatx80 ); +long long floatx80_to_int64_round_to_zero( floatx80 ); +float32 floatx80_to_float32( floatx80 ); +float64 floatx80_to_float64( floatx80 ); +#ifdef FLOAT128 +float128 floatx80_to_float128( floatx80 ); +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE extended double-precision rounding precision. Valid +values are 32, 64, and 80. +------------------------------------------------------------------------------- +*/ +extern int floatx80_rounding_precision; + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE extended double-precision operations. +------------------------------------------------------------------------------- +*/ +floatx80 floatx80_round_to_int( floatx80 ); +floatx80 floatx80_add( floatx80, floatx80 ); +floatx80 floatx80_sub( floatx80, floatx80 ); +floatx80 floatx80_mul( floatx80, floatx80 ); +floatx80 floatx80_div( floatx80, floatx80 ); +floatx80 floatx80_rem( floatx80, floatx80 ); +floatx80 floatx80_sqrt( floatx80 ); +int floatx80_eq( floatx80, floatx80 ); +int floatx80_le( floatx80, floatx80 ); +int floatx80_lt( floatx80, floatx80 ); +int floatx80_eq_signaling( floatx80, floatx80 ); +int floatx80_le_quiet( floatx80, floatx80 ); +int floatx80_lt_quiet( floatx80, floatx80 ); +int floatx80_is_signaling_nan( floatx80 ); + +#endif + +#ifdef FLOAT128 + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE quadruple-precision conversion routines. +------------------------------------------------------------------------------- +*/ +int float128_to_int32( float128 ); +int float128_to_int32_round_to_zero( float128 ); +long long float128_to_int64( float128 ); +long long float128_to_int64_round_to_zero( float128 ); +float32 float128_to_float32( float128 ); +float64 float128_to_float64( float128 ); +#ifdef FLOATX80 +floatx80 float128_to_floatx80( float128 ); +#endif + +/* +------------------------------------------------------------------------------- +Software IEC/IEEE quadruple-precision operations. +------------------------------------------------------------------------------- +*/ +float128 float128_round_to_int( float128 ); +float128 float128_add( float128, float128 ); +float128 float128_sub( float128, float128 ); +float128 float128_mul( float128, float128 ); +float128 float128_div( float128, float128 ); +float128 float128_rem( float128, float128 ); +float128 float128_sqrt( float128 ); +int float128_eq( float128, float128 ); +int float128_le( float128, float128 ); +int float128_lt( float128, float128 ); +int float128_eq_signaling( float128, float128 ); +int float128_le_quiet( float128, float128 ); +int float128_lt_quiet( float128, float128 ); +int float128_is_signaling_nan( float128 ); + +#endif + diff --git a/lib/libc/softfloat/Makefile.inc b/lib/libc/softfloat/Makefile.inc index f15e4d2a5a4..fa0ee9d2977 100644 --- a/lib/libc/softfloat/Makefile.inc +++ b/lib/libc/softfloat/Makefile.inc @@ -12,8 +12,11 @@ CFLAGS+= -DSOFTFLOAT_FOR_GCC SRCS+= softfloat.c +# Deprecated FPU control interface +.if ${LIBC_ARCH} != "riscv" SRCS+= fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c \ fpgetsticky.c +.endif SRCS+= eqsf2.c nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \ eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c \ diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 27a5879dd24..5913faab838 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -125,7 +125,7 @@ SRCF+= umodti3 # # 128-bit quad precision long double support, -# only used on arm64 and riscv. +# only used on some architectures. # .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" SRCF+= addtf3 @@ -146,8 +146,9 @@ SRCF+= trunctfdf2 SRCF+= trunctfsf2 .endif -# These are already shipped by libc.a on arm and mips -.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +# These are already shipped by libc.a on some architectures. +.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \ + ${MACHINE_CPUARCH} != "riscv" SRCF+= adddf3 SRCF+= addsf3 SRCF+= divdf3 diff --git a/lib/msun/riscv/Makefile.inc b/lib/msun/riscv/Makefile.inc index 97d3302b96d..cd624918bed 100644 --- a/lib/msun/riscv/Makefile.inc +++ b/lib/msun/riscv/Makefile.inc @@ -1,3 +1,8 @@ # $FreeBSD$ +.if ${MACHINE_ARCH:Mriscv*sf} != "" +CFLAGS+=-DSOFTFLOAT +.endif + LDBL_PREC = 113 +SYM_MAPS += ${.CURDIR}/riscv/Symbol.map diff --git a/lib/msun/riscv/Symbol.map b/lib/msun/riscv/Symbol.map new file mode 100644 index 00000000000..081294cf556 --- /dev/null +++ b/lib/msun/riscv/Symbol.map @@ -0,0 +1,21 @@ +/* + * $FreeBSD$ + */ +FBSD_1.0 { +}; + +FBSD_1.3 { + feclearexcept; + fegetexceptflag; + fesetexceptflag; + feraiseexcept; + fetestexcept; + fegetround; + fesetround; + fegetenv; + feholdexcept; + feupdateenv; + feenableexcept; + fedisableexcept; + fegetexcept; +}; diff --git a/lib/msun/riscv/fenv.c b/lib/msun/riscv/fenv.c index a5a5c03d3a7..9bc0d7e3574 100644 --- a/lib/msun/riscv/fenv.c +++ b/lib/msun/riscv/fenv.c @@ -39,6 +39,14 @@ */ const fenv_t __fe_dfl_env = 0; +#ifdef SOFTFLOAT +#define __set_env(env, flags, mask, rnd) env = ((flags) | (rnd) << 5) +#define __env_flags(env) ((env) & FE_ALL_EXCEPT) +#define __env_mask(env) (0) /* No exception traps. */ +#define __env_round(env) (((env) >> 5) & _ROUND_MASK) +#include "fenv-softfloat.h" +#endif + extern inline int feclearexcept(int __excepts); extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); @@ -50,3 +58,6 @@ extern inline int fegetenv(fenv_t *__envp); extern inline int feholdexcept(fenv_t *__envp); extern inline int fesetenv(const fenv_t *__envp); extern inline int feupdateenv(const fenv_t *__envp); +extern inline int feenableexcept(int __mask); +extern inline int fedisableexcept(int __mask); +extern inline int fegetexcept(void); diff --git a/lib/msun/riscv/fenv.h b/lib/msun/riscv/fenv.h index 3eae6c2ed16..e66aa1c5775 100644 --- a/lib/msun/riscv/fenv.h +++ b/lib/msun/riscv/fenv.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2004-2005 David Schultz - * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2015-2016 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -59,11 +59,11 @@ typedef __uint64_t fexcept_t; /* * RISC-V Rounding modes */ -#define FE_TONEAREST (0x00 << 5) -#define FE_TOWARDZERO (0x01 << 5) -#define FE_DOWNWARD (0x02 << 5) -#define FE_UPWARD (0x03 << 5) #define _ROUND_SHIFT 5 +#define FE_TONEAREST (0x00 << _ROUND_SHIFT) +#define FE_TOWARDZERO (0x01 << _ROUND_SHIFT) +#define FE_DOWNWARD (0x02 << _ROUND_SHIFT) +#define FE_UPWARD (0x03 << _ROUND_SHIFT) #define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \ FE_UPWARD | FE_TOWARDZERO) @@ -73,96 +73,117 @@ __BEGIN_DECLS extern const fenv_t __fe_dfl_env; #define FE_DFL_ENV (&__fe_dfl_env) -/* We need to be able to map status flag positions to mask flag positions */ -#define _FPUSW_SHIFT 0 -#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT) - -#define __rfs(__fpsr) __asm __volatile("csrr %0, fcsr" : "=r" (*(__fpsr))) -#define __wfs(__fpsr) __asm __volatile("csrw fcsr, %0" :: "r" (__fpsr)) +#ifndef SOFTFLOAT +#define __rfs(__fcsr) __asm __volatile("csrr %0, fcsr" : "=r" (__fcsr)) +#define __wfs(__fcsr) __asm __volatile("csrw fcsr, %0" :: "r" (__fcsr)) +#endif +#ifdef SOFTFLOAT +int feclearexcept(int __excepts); +int fegetexceptflag(fexcept_t *__flagp, int __excepts); +int fesetexceptflag(const fexcept_t *__flagp, int __excepts); +int feraiseexcept(int __excepts); +int fetestexcept(int __excepts); +int fegetround(void); +int fesetround(int __round); +int fegetenv(fenv_t *__envp); +int feholdexcept(fenv_t *__envp); +int fesetenv(const fenv_t *__envp); +int feupdateenv(const fenv_t *__envp); +#else __fenv_static inline int feclearexcept(int __excepts) { - fexcept_t __fpsr; - __rfs(&__fpsr); - __fpsr &= ~__excepts; - __wfs(__fpsr); + __asm __volatile("csrc fflags, %0" :: "r"(__excepts)); + return (0); } __fenv_static inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { - fexcept_t __fpsr; + fexcept_t __fcsr; + + __rfs(__fcsr); + *__flagp = __fcsr & __excepts; - __rfs(&__fpsr); - *__flagp = __fpsr & __excepts; return (0); } __fenv_static inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts) { - fexcept_t __fpsr; + fexcept_t __fcsr; + + __fcsr = *__flagp; + __asm __volatile("csrc fflags, %0" :: "r"(__excepts)); + __asm __volatile("csrs fflags, %0" :: "r"(__fcsr & __excepts)); - __rfs(&__fpsr); - __fpsr &= ~__excepts; - __fpsr |= *__flagp & __excepts; - __wfs(__fpsr); return (0); } __fenv_static inline int feraiseexcept(int __excepts) { - fexcept_t __ex = __excepts; - fesetexceptflag(&__ex, __excepts); /* XXX */ + __asm __volatile("csrs fflags, %0" :: "r"(__excepts)); + return (0); } __fenv_static inline int fetestexcept(int __excepts) { - fexcept_t __fpsr; + fexcept_t __fcsr; - __rfs(&__fpsr); - return (__fpsr & __excepts); + __rfs(__fcsr); + + return (__fcsr & __excepts); } __fenv_static inline int fegetround(void) { + fexcept_t __fcsr; - return (-1); + __rfs(__fcsr); + + return (__fcsr & _ROUND_MASK); } __fenv_static inline int fesetround(int __round) { + fexcept_t __fcsr; - return (-1); + if (__round & ~_ROUND_MASK) + return (-1); + + __rfs(__fcsr); + __fcsr &= ~_ROUND_MASK; + __fcsr |= __round; + __wfs(__fcsr); + + return (0); } __fenv_static inline int fegetenv(fenv_t *__envp) { - __rfs(__envp); + __rfs(*__envp); + return (0); } __fenv_static inline int feholdexcept(fenv_t *__envp) { - fenv_t __env; - __rfs(&__env); - *__envp = __env; - __env &= ~(FE_ALL_EXCEPT | _ENABLE_MASK); - __wfs(__env); - return (0); + /* No exception traps. */ + + return (-1); } __fenv_static inline int @@ -170,56 +191,59 @@ fesetenv(const fenv_t *__envp) { __wfs(*__envp); + return (0); } __fenv_static inline int feupdateenv(const fenv_t *__envp) { - fexcept_t __fpsr; + fexcept_t __fcsr; - __rfs(&__fpsr); + __rfs(__fcsr); __wfs(*__envp); - feraiseexcept(__fpsr & FE_ALL_EXCEPT); + feraiseexcept(__fcsr & FE_ALL_EXCEPT); + return (0); } +#endif /* !SOFTFLOAT */ #if __BSD_VISIBLE /* We currently provide no external definitions of the functions below. */ +#ifdef SOFTFLOAT +int feenableexcept(int __mask); +int fedisableexcept(int __mask); +int fegetexcept(void); +#else static inline int feenableexcept(int __mask) { - fenv_t __old_fpsr; - fenv_t __new_fpsr; - __rfs(&__old_fpsr); - __new_fpsr = __old_fpsr | (__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT; - __wfs(__new_fpsr); - return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); + /* No exception traps. */ + + return (-1); } static inline int fedisableexcept(int __mask) { - fenv_t __old_fpsr; - fenv_t __new_fpsr; - __rfs(&__old_fpsr); - __new_fpsr = __old_fpsr & ~((__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT); - __wfs(__new_fpsr); - return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); + /* No exception traps. */ + + return (0); } static inline int fegetexcept(void) { - fenv_t __fpsr; - __rfs(&__fpsr); - return ((__fpsr & _ENABLE_MASK) >> _FPUSW_SHIFT); + /* No exception traps. */ + + return (0); } +#endif /* !SOFTFLOAT */ #endif /* __BSD_VISIBLE */ diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 874beed525a..79c37664849 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -155,8 +155,6 @@ _CPUCFLAGS = -march=${CPUTYPE} # sb1, xlp, xlr _CPUCFLAGS = -march=${CPUTYPE:S/^mips//} . endif -. elif ${MACHINE_CPUARCH} == "riscv" -_CPUCFLAGS = -mno-float -march="IMAFD" . elif ${MACHINE_ARCH} == "sparc64" . if ${CPUTYPE} == "v9" _CPUCFLAGS = -mcpu=v9 @@ -350,9 +348,11 @@ CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double .endif .if ${MACHINE_CPUARCH} == "riscv" +.if ${TARGET_ARCH:Mriscv*sf} CFLAGS += -mno-float ACFLAGS += -mno-float .endif +.endif # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index 49f625ccefa..3a4e8f1352b 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -48,7 +48,7 @@ TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipsn32el TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe TARGET_ARCHES_pc98?= i386 -TARGET_ARCHES_riscv?= riscv64 +TARGET_ARCHES_riscv?= riscv64 riscv64sf # some corner cases BOOT_MACHINE_DIR.amd64 = boot/i386 diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 89125d69513..64ffbe50ded 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -236,16 +236,16 @@ __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .endif # In-tree binutils/gcc are older versions without modern architecture support. -.if ${__T} == "aarch64" || ${__T} == "riscv64" +.if ${__T} == "aarch64" || ${__T:Mriscv*} != "" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB .endif -.if ${__T} == "riscv64" +.if ${__T:Mriscv*} != "" BROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V" BROKEN_OPTIONS+=TESTS # "undefined reference to `_Unwind_Resume'" BROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" .endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ - ${__T} == "riscv64" + ${__T:Mriscv*} != "" __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND .else __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 2c374334201..04c342c134f 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -13,7 +13,7 @@ unix ?= We run FreeBSD, not UNIX. # and/or endian. This is called MACHINE_CPU in NetBSD, but that's used # for something different in FreeBSD. # -MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64/riscv/} +MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/} .endif diff --git a/sys/conf/options.riscv b/sys/conf/options.riscv index c263bd86087..af6a89e80f1 100644 --- a/sys/conf/options.riscv +++ b/sys/conf/options.riscv @@ -1,4 +1,4 @@ # $FreeBSD$ RISCV opt_global.h -VFP opt_global.h +FPE opt_global.h diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile index 543be8c2019..0889646f88c 100644 --- a/sys/modules/dtrace/dtrace/Makefile +++ b/sys/modules/dtrace/dtrace/Makefile @@ -60,7 +60,11 @@ assym.o: assym.s .if ${MACHINE_CPUARCH} == "riscv" assym.o: assym.s +.if ${TARGET_ARCH:Mriscv*sf} ${AS} -mfloat-abi=soft -o assym.o assym.s +.else + ${AS} -mfloat-abi=double -o assym.o assym.s +.endif .endif .include diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index ad23c6647e7..a9c3c6fbdad 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -69,7 +69,7 @@ options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks -# options VFP # Floating-point support +options FPE # Floating-point extension support options RACCT # Resource accounting framework options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options RCTL # Resource limits diff --git a/sys/riscv/include/fpe.h b/sys/riscv/include/fpe.h new file mode 100644 index 00000000000..1294ab0de8f --- /dev/null +++ b/sys/riscv/include/fpe.h @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2016 Ruslan Bukin + * 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. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_FPE_H_ +#define _MACHINE_FPE_H_ + +void fpe_state_save(struct thread *td); + +#endif /* !_MACHINE_FPE_H_ */ diff --git a/sys/riscv/include/pcb.h b/sys/riscv/include/pcb.h index a6cecb73434..27737a4bdf2 100644 --- a/sys/riscv/include/pcb.h +++ b/sys/riscv/include/pcb.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2015-2016 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -42,16 +42,21 @@ struct trapframe; struct pcb { - uint64_t pcb_ra; - uint64_t pcb_sp; - uint64_t pcb_gp; - uint64_t pcb_tp; - uint64_t pcb_t[7]; - uint64_t pcb_s[12]; - uint64_t pcb_a[8]; - uint64_t pcb_sepc; + uint64_t pcb_ra; /* Return address */ + uint64_t pcb_sp; /* Stack pointer */ + uint64_t pcb_gp; /* Global pointer */ + uint64_t pcb_tp; /* Thread pointer */ + uint64_t pcb_t[7]; /* Temporary registers */ + uint64_t pcb_s[12]; /* Saved registers */ + uint64_t pcb_a[8]; /* Argument registers */ + uint64_t pcb_x[32][2]; /* Floating point registers */ + uint64_t pcb_fcsr; /* Floating point control reg */ + uint64_t pcb_fpflags; /* Floating point flags */ +#define PCB_FP_STARTED 0x1 +#define PCB_FP_USERMASK 0x1 + uint64_t pcb_sepc; /* Supervisor exception pc */ vm_offset_t pcb_l1addr; /* L1 page tables base address */ - vm_offset_t pcb_onfault; + vm_offset_t pcb_onfault; /* Copyinout fault handler */ }; #ifdef _KERNEL diff --git a/sys/riscv/include/reg.h b/sys/riscv/include/reg.h index 35d79f10a8f..9e94b4a5768 100644 --- a/sys/riscv/include/reg.h +++ b/sys/riscv/include/reg.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2015-2016 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -50,7 +50,8 @@ struct reg { }; struct fpreg { - int dummy; + uint64_t fp_x[32][2]; /* Floating point registers */ + uint64_t fp_fcsr; /* Floating point control reg */ }; struct dbreg { diff --git a/sys/riscv/include/riscvreg.h b/sys/riscv/include/riscvreg.h index 2e3a4a2e9f5..77f35bfa64b 100644 --- a/sys/riscv/include/riscvreg.h +++ b/sys/riscv/include/riscvreg.h @@ -60,10 +60,14 @@ #define SSTATUS_SPIE_SHIFT 5 #define SSTATUS_SPP (1 << 8) #define SSTATUS_SPP_SHIFT 8 -#define SSTATUS_FS_MASK 0x3 #define SSTATUS_FS_SHIFT 13 -#define SSTATUS_XS_MASK 0x3 +#define SSTATUS_FS_OFF (0x0 << SSTATUS_FS_SHIFT) +#define SSTATUS_FS_INITIAL (0x1 << SSTATUS_FS_SHIFT) +#define SSTATUS_FS_CLEAN (0x2 << SSTATUS_FS_SHIFT) +#define SSTATUS_FS_DIRTY (0x3 << SSTATUS_FS_SHIFT) +#define SSTATUS_FS_MASK (0x3 << SSTATUS_FS_SHIFT) #define SSTATUS_XS_SHIFT 15 +#define SSTATUS_XS_MASK (0x3 << SSTATUS_XS_SHIFT) #define SSTATUS_PUM (1 << 18) #define SSTATUS32_SD (1 << 63) #define SSTATUS64_SD (1 << 31) diff --git a/sys/riscv/riscv/genassym.c b/sys/riscv/riscv/genassym.c index c9e9bc1c991..33f1d41750a 100644 --- a/sys/riscv/riscv/genassym.c +++ b/sys/riscv/riscv/genassym.c @@ -72,6 +72,8 @@ ASSYM(PCB_TP, offsetof(struct pcb, pcb_tp)); ASSYM(PCB_T, offsetof(struct pcb, pcb_t)); ASSYM(PCB_S, offsetof(struct pcb, pcb_s)); ASSYM(PCB_A, offsetof(struct pcb, pcb_a)); +ASSYM(PCB_X, offsetof(struct pcb, pcb_x)); +ASSYM(PCB_FCSR, offsetof(struct pcb, pcb_fcsr)); ASSYM(SF_UC, offsetof(struct sigframe, sf_uc)); diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 7bc4402597d..f08527a7f2f 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -84,8 +84,8 @@ __FBSDID("$FreeBSD$"); #include -#ifdef VFP -#include +#ifdef FPE +#include #endif #ifdef FDT @@ -203,17 +203,39 @@ set_regs(struct thread *td, struct reg *regs) int fill_fpregs(struct thread *td, struct fpreg *regs) { +#ifdef FPE + struct pcb *pcb; + + pcb = td->td_pcb; + + if ((pcb->pcb_fpflags & PCB_FP_STARTED) != 0) { + /* + * If we have just been running FPE instructions we will + * need to save the state to memcpy it below. + */ + fpe_state_save(td); + + memcpy(regs->fp_x, pcb->pcb_x, sizeof(regs->fp_x)); + regs->fp_fcsr = pcb->pcb_fcsr; + } else +#endif + memset(regs->fp_x, 0, sizeof(regs->fp_x)); - /* TODO */ - bzero(regs, sizeof(*regs)); return (0); } int set_fpregs(struct thread *td, struct fpreg *regs) { +#ifdef FPE + struct pcb *pcb; + + pcb = td->td_pcb; + + memcpy(pcb->pcb_x, regs->fp_x, sizeof(regs->fp_x)); + pcb->pcb_fcsr = regs->fp_fcsr; +#endif - /* TODO */ return (0); } @@ -259,8 +281,10 @@ void exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) { struct trapframe *tf; + struct pcb *pcb; tf = td->td_frame; + pcb = td->td_pcb; memset(tf, 0, sizeof(struct trapframe)); @@ -273,6 +297,8 @@ exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) tf->tf_sp = STACKALIGN(stack); tf->tf_ra = imgp->entry_addr; tf->tf_sepc = imgp->entry_addr; + + pcb->pcb_fpflags &= ~PCB_FP_STARTED; } /* Sanity check these are the same size, they will be memcpy'd to and fro */ @@ -337,13 +363,54 @@ set_mcontext(struct thread *td, mcontext_t *mcp) static void get_fpcontext(struct thread *td, mcontext_t *mcp) { - /* TODO */ +#ifdef FPE + struct pcb *curpcb; + + critical_enter(); + + curpcb = curthread->td_pcb; + + KASSERT(td->td_pcb == curpcb, ("Invalid fpe pcb")); + + if ((curpcb->pcb_fpflags & PCB_FP_STARTED) != 0) { + /* + * If we have just been running FPE instructions we will + * need to save the state to memcpy it below. + */ + fpe_state_save(td); + + KASSERT((curpcb->pcb_fpflags & ~PCB_FP_USERMASK) == 0, + ("Non-userspace FPE flags set in get_fpcontext")); + memcpy(mcp->mc_fpregs.fp_x, curpcb->pcb_x, + sizeof(mcp->mc_fpregs)); + mcp->mc_fpregs.fp_fcsr = curpcb->pcb_fcsr; + mcp->mc_fpregs.fp_flags = curpcb->pcb_fpflags; + mcp->mc_flags |= _MC_FP_VALID; + } + + critical_exit(); +#endif } static void set_fpcontext(struct thread *td, mcontext_t *mcp) { - /* TODO */ +#ifdef FPE + struct pcb *curpcb; + + critical_enter(); + + if ((mcp->mc_flags & _MC_FP_VALID) != 0) { + curpcb = curthread->td_pcb; + /* FPE usage is enabled, override registers. */ + memcpy(curpcb->pcb_x, mcp->mc_fpregs.fp_x, + sizeof(mcp->mc_fpregs)); + curpcb->pcb_fcsr = mcp->mc_fpregs.fp_fcsr; + curpcb->pcb_fpflags = mcp->mc_fpregs.fp_flags & PCB_FP_USERMASK; + } + + critical_exit(); +#endif } void @@ -572,6 +639,7 @@ init_proc0(vm_offset_t kstack) proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack; thread0.td_pcb = (struct pcb *)(thread0.td_kstack) - 1; + thread0.td_pcb->pcb_fpflags = 0; thread0.td_frame = &proc0_tf; pcpup->pc_curpcb = thread0.td_pcb; } diff --git a/sys/riscv/riscv/mp_machdep.c b/sys/riscv/riscv/mp_machdep.c index 33353ac2a3c..adad7b4b533 100644 --- a/sys/riscv/riscv/mp_machdep.c +++ b/sys/riscv/riscv/mp_machdep.c @@ -62,9 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef VFP -#include -#endif #ifdef FDT #include @@ -242,10 +239,6 @@ init_secondary(uint64_t cpu) /* Start per-CPU event timers. */ cpu_initclocks_ap(); -#ifdef VFP - /* TODO: init FPU */ -#endif - /* Enable interrupts */ intr_enable(); diff --git a/sys/riscv/riscv/swtch.S b/sys/riscv/riscv/swtch.S index b5cced30d8f..5cc1edd69a0 100644 --- a/sys/riscv/riscv/swtch.S +++ b/sys/riscv/riscv/swtch.S @@ -42,6 +42,117 @@ __FBSDID("$FreeBSD$"); +#ifdef FPE +.macro __fpe_state_save p + /* + * Enable FPE usage in supervisor mode, + * so we can access registers. + */ + li t0, SSTATUS_FS_INITIAL + csrs sstatus, t0 + + /* Store registers */ + frcsr t0 + sd t0, (PCB_FCSR)(\p) + fsd f0, (PCB_X + 0 * 16)(\p) + fsd f1, (PCB_X + 1 * 16)(\p) + fsd f2, (PCB_X + 2 * 16)(\p) + fsd f3, (PCB_X + 3 * 16)(\p) + fsd f4, (PCB_X + 4 * 16)(\p) + fsd f5, (PCB_X + 5 * 16)(\p) + fsd f6, (PCB_X + 6 * 16)(\p) + fsd f7, (PCB_X + 7 * 16)(\p) + fsd f8, (PCB_X + 8 * 16)(\p) + fsd f9, (PCB_X + 9 * 16)(\p) + fsd f10, (PCB_X + 10 * 16)(\p) + fsd f11, (PCB_X + 11 * 16)(\p) + fsd f12, (PCB_X + 12 * 16)(\p) + fsd f13, (PCB_X + 13 * 16)(\p) + fsd f14, (PCB_X + 14 * 16)(\p) + fsd f15, (PCB_X + 15 * 16)(\p) + fsd f16, (PCB_X + 16 * 16)(\p) + fsd f17, (PCB_X + 17 * 16)(\p) + fsd f18, (PCB_X + 18 * 16)(\p) + fsd f19, (PCB_X + 19 * 16)(\p) + fsd f20, (PCB_X + 20 * 16)(\p) + fsd f21, (PCB_X + 21 * 16)(\p) + fsd f22, (PCB_X + 22 * 16)(\p) + fsd f23, (PCB_X + 23 * 16)(\p) + fsd f24, (PCB_X + 24 * 16)(\p) + fsd f25, (PCB_X + 25 * 16)(\p) + fsd f26, (PCB_X + 26 * 16)(\p) + fsd f27, (PCB_X + 27 * 16)(\p) + fsd f28, (PCB_X + 28 * 16)(\p) + fsd f29, (PCB_X + 29 * 16)(\p) + fsd f30, (PCB_X + 30 * 16)(\p) + fsd f31, (PCB_X + 31 * 16)(\p) + + /* Disable FPE usage in supervisor mode. */ + li t0, SSTATUS_FS_MASK + csrc sstatus, t0 +.endm + +.macro __fpe_state_load p + /* + * Enable FPE usage in supervisor mode, + * so we can access registers. + */ + li t0, SSTATUS_FS_INITIAL + csrs sstatus, t0 + + /* Restore registers */ + ld t0, (PCB_FCSR)(\p) + fscsr t0 + fld f0, (PCB_X + 0 * 16)(\p) + fld f1, (PCB_X + 1 * 16)(\p) + fld f2, (PCB_X + 2 * 16)(\p) + fld f3, (PCB_X + 3 * 16)(\p) + fld f4, (PCB_X + 4 * 16)(\p) + fld f5, (PCB_X + 5 * 16)(\p) + fld f6, (PCB_X + 6 * 16)(\p) + fld f7, (PCB_X + 7 * 16)(\p) + fld f8, (PCB_X + 8 * 16)(\p) + fld f9, (PCB_X + 9 * 16)(\p) + fld f10, (PCB_X + 10 * 16)(\p) + fld f11, (PCB_X + 11 * 16)(\p) + fld f12, (PCB_X + 12 * 16)(\p) + fld f13, (PCB_X + 13 * 16)(\p) + fld f14, (PCB_X + 14 * 16)(\p) + fld f15, (PCB_X + 15 * 16)(\p) + fld f16, (PCB_X + 16 * 16)(\p) + fld f17, (PCB_X + 17 * 16)(\p) + fld f18, (PCB_X + 18 * 16)(\p) + fld f19, (PCB_X + 19 * 16)(\p) + fld f20, (PCB_X + 20 * 16)(\p) + fld f21, (PCB_X + 21 * 16)(\p) + fld f22, (PCB_X + 22 * 16)(\p) + fld f23, (PCB_X + 23 * 16)(\p) + fld f24, (PCB_X + 24 * 16)(\p) + fld f25, (PCB_X + 25 * 16)(\p) + fld f26, (PCB_X + 26 * 16)(\p) + fld f27, (PCB_X + 27 * 16)(\p) + fld f28, (PCB_X + 28 * 16)(\p) + fld f29, (PCB_X + 29 * 16)(\p) + fld f30, (PCB_X + 30 * 16)(\p) + fld f31, (PCB_X + 31 * 16)(\p) + + /* Disable FPE usage in supervisor mode. */ + li t0, SSTATUS_FS_MASK + csrc sstatus, t0 +.endm + +/* + * void + * fpe_state_save(struct thread *td) + */ +ENTRY(fpe_state_save) + /* Get pointer to PCB */ + ld a0, TD_PCB(a0) + __fpe_state_save a0 + ret +END(fpe_state_save) +#endif /* FPE */ + /* * void cpu_throw(struct thread *old, struct thread *new) */ @@ -81,8 +192,20 @@ ENTRY(cpu_throw) ld s10, (PCB_S + 10 * 8)(x13) ld s11, (PCB_S + 11 * 8)(x13) - ret +#ifdef FPE + /* Is FPE enabled for new thread? */ + ld t0, TD_FRAME(a1) + ld t1, (TF_SSTATUS)(t0) + li t2, SSTATUS_FS_MASK + and t3, t1, t2 + beqz t3, 1f /* No, skip. */ + /* Restore registers. */ + __fpe_state_load x13 +1: +#endif + + ret .Lcpu_throw_panic_str: .asciz "cpu_throw: %p\0" END(cpu_throw) @@ -123,6 +246,29 @@ ENTRY(cpu_switch) sd s10, (PCB_S + 10 * 8)(x13) sd s11, (PCB_S + 11 * 8)(x13) +#ifdef FPE + /* + * Is FPE enabled and is it in dirty state + * for the old thread? + */ + ld t0, TD_FRAME(a0) + ld t1, (TF_SSTATUS)(t0) + li t2, SSTATUS_FS_MASK + and t3, t1, t2 + li t2, SSTATUS_FS_DIRTY + bne t3, t2, 1f /* No, skip. */ + + /* Yes, mark FPE state clean and save registers. */ + li t2, ~SSTATUS_FS_MASK + and t3, t1, t2 + li t2, SSTATUS_FS_CLEAN + or t3, t3, t2 + sd t3, (TF_SSTATUS)(t0) + + __fpe_state_save x13 +1: +#endif + /* * Restore the saved context. */ @@ -171,6 +317,20 @@ ENTRY(cpu_switch) ld s9, (PCB_S + 9 * 8)(x13) ld s10, (PCB_S + 10 * 8)(x13) ld s11, (PCB_S + 11 * 8)(x13) + +#ifdef FPE + /* Is FPE enabled for new thread? */ + ld t0, TD_FRAME(a1) + ld t1, (TF_SSTATUS)(t0) + li t2, SSTATUS_FS_MASK + and t3, t1, t2 + beqz t3, 1f /* No, skip. */ + + /* Restore registers. */ + __fpe_state_load x13 +1: +#endif + ret .Lcpu_switch_panic_str: .asciz "cpu_switch: %p\0" @@ -269,9 +429,8 @@ ENTRY(savectx) sd s10, (PCB_S + 10 * 8)(a0) sd s11, (PCB_S + 11 * 8)(a0) - /* Store the VFP registers */ -#ifdef VFP - /* TODO */ +#ifdef FPE + __fpe_state_save a0 #endif ret END(savectx) diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index 97d9a2c1efd..cd2b7c4bfb7 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -328,9 +328,11 @@ do_trap_user(struct trapframe *frame) uint64_t exception; struct thread *td; uint64_t sstatus; + struct pcb *pcb; td = curthread; td->td_frame = frame; + pcb = td->td_pcb; /* Ensure we came from usermode, interrupts disabled */ __asm __volatile("csrr %0, sstatus" : "=&r" (sstatus)); @@ -358,6 +360,17 @@ do_trap_user(struct trapframe *frame) svc_handler(frame); break; case EXCP_ILLEGAL_INSTRUCTION: +#ifdef FPE + if ((pcb->pcb_fpflags & PCB_FP_STARTED) == 0) { + /* + * May be a FPE trap. Enable FPE usage + * for this thread and try again. + */ + frame->tf_sstatus |= SSTATUS_FS_INITIAL; + pcb->pcb_fpflags |= PCB_FP_STARTED; + break; + } +#endif call_trapsignal(td, SIGILL, ILL_ILLTRP, (void *)frame->tf_sepc); userret(td, frame); break; diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index d2d4c6e3d3e..c5c62fe24db 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -87,8 +87,8 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) /* Arguments for child */ tf->tf_a[0] = 0; tf->tf_a[1] = 0; - tf->tf_sstatus = (SSTATUS_SPIE); - tf->tf_sstatus |= (MSTATUS_PRV_U << MSTATUS_SPP_SHIFT); + tf->tf_sstatus |= (SSTATUS_SPIE); /* Enable interrupts. */ + tf->tf_sstatus &= ~(SSTATUS_SPP); /* User mode. */ td2->td_frame = tf; From 41ddec83c128de0aea5838e78320287f619ce84b Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 16 Nov 2016 16:34:17 +0000 Subject: [PATCH 125/204] Move the fast fault path into the separate function. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/vm/vm_fault.c | 80 +++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 60aaa6c4084..41391eb7e2b 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -246,6 +246,48 @@ vm_fault_dirty(vm_map_entry_t entry, vm_page_t m, vm_prot_t prot, vm_pager_page_unswapped(m); } +static void +vm_fault_fill_hold(vm_page_t *m_hold, vm_page_t m) +{ + + if (m_hold != NULL) { + *m_hold = m; + vm_page_lock(m); + vm_page_hold(m); + vm_page_unlock(m); + } +} + +/* + * Unlocks fs.first_object and fs.map on success. + */ +static int +vm_fault_soft_fast(struct faultstate *fs, vm_offset_t vaddr, vm_prot_t prot, + int fault_type, int fault_flags, boolean_t wired, vm_page_t *m_hold) +{ + vm_page_t m; + int rv; + + MPASS(fs->vp == NULL); + m = vm_page_lookup(fs->first_object, fs->first_pindex); + /* A busy page can be mapped for read|execute access. */ + if (m == NULL || ((prot & VM_PROT_WRITE) != 0 && + vm_page_busied(m)) || m->valid != VM_PAGE_BITS_ALL) + return (KERN_FAILURE); + rv = pmap_enter(fs->map->pmap, vaddr, m, prot, fault_type | + PMAP_ENTER_NOSLEEP | (wired ? PMAP_ENTER_WIRED : 0), 0); + if (rv != KERN_SUCCESS) + return (rv); + vm_fault_fill_hold(m_hold, m); + vm_fault_dirty(fs->entry, m, prot, fault_type, fault_flags, false); + VM_OBJECT_RUNLOCK(fs->first_object); + if (!wired) + vm_fault_prefault(fs, vaddr, PFBAK, PFFOR); + vm_map_lookup_done(fs->map, fs->entry); + curthread->td_ru.ru_minflt++; + return (KERN_SUCCESS); +} + /* * vm_fault: * @@ -294,7 +336,6 @@ vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, struct vnode *vp; vm_object_t next_object, retry_object; vm_offset_t e_end, e_start; - vm_page_t m; vm_pindex_t retry_pindex; vm_prot_t prot, retry_prot; int ahead, alloc_req, behind, cluster_offset, error, era, faultcount; @@ -376,36 +417,15 @@ RetryFault:; (fs.first_object->flags & OBJ_TMPFS_NODE) == 0) || (fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0)) { VM_OBJECT_RLOCK(fs.first_object); - if ((prot & VM_PROT_WRITE) != 0 && - (fs.first_object->type == OBJT_VNODE || - (fs.first_object->flags & OBJ_TMPFS_NODE) != 0) && - (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0) - goto fast_failed; - m = vm_page_lookup(fs.first_object, fs.first_pindex); - /* A busy page can be mapped for read|execute access. */ - if (m == NULL || ((prot & VM_PROT_WRITE) != 0 && - vm_page_busied(m)) || m->valid != VM_PAGE_BITS_ALL) - goto fast_failed; - result = pmap_enter(fs.map->pmap, vaddr, m, prot, - fault_type | PMAP_ENTER_NOSLEEP | (wired ? PMAP_ENTER_WIRED : - 0), 0); - if (result != KERN_SUCCESS) - goto fast_failed; - if (m_hold != NULL) { - *m_hold = m; - vm_page_lock(m); - vm_page_hold(m); - vm_page_unlock(m); + if ((prot & VM_PROT_WRITE) == 0 || + (fs.first_object->type != OBJT_VNODE && + (fs.first_object->flags & OBJ_TMPFS_NODE) == 0) || + (fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0) { + rv = vm_fault_soft_fast(&fs, vaddr, prot, fault_type, + fault_flags, wired, m_hold); + if (rv == KERN_SUCCESS) + return (rv); } - vm_fault_dirty(fs.entry, m, prot, fault_type, fault_flags, - false); - VM_OBJECT_RUNLOCK(fs.first_object); - if (!wired) - vm_fault_prefault(&fs, vaddr, PFBAK, PFFOR); - vm_map_lookup_done(fs.map, fs.entry); - curthread->td_ru.ru_minflt++; - return (KERN_SUCCESS); -fast_failed: if (!VM_OBJECT_TRYUPGRADE(fs.first_object)) { VM_OBJECT_RUNLOCK(fs.first_object); VM_OBJECT_WLOCK(fs.first_object); From 69712279cccc820030b38ffd71bd5bc93ac7d5a7 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 16 Nov 2016 16:39:51 +0000 Subject: [PATCH 126/204] crunchide: remove obsolete a.out header and comment crunchide(1) gained ELF support in r39172, and lost the unused a.out and non-functional ECOFF suport in r281655. Sponsored by: The FreeBSD Foundation --- usr.sbin/crunch/crunchide/crunchide.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/crunch/crunchide/crunchide.c b/usr.sbin/crunch/crunchide/crunchide.c index 8665a14a734..b7eba399517 100644 --- a/usr.sbin/crunch/crunchide/crunchide.c +++ b/usr.sbin/crunch/crunchide/crunchide.c @@ -26,7 +26,7 @@ * University of Maryland at College Park */ /* - * crunchide.c - tiptoes through an a.out symbol table, hiding all defined + * crunchide.c - tiptoes through a symbol table, hiding all defined * global symbols. Allows the user to supply a "keep list" of symbols * that are not to be hidden. This program relies on the use of the * linker's -dc flag to actually put global bss data into the file's @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "extern.h" From 29481b994e5787c1896700a12ff1e8b709688391 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 16 Nov 2016 16:49:21 +0000 Subject: [PATCH 127/204] Start to move the old interface into a legacy file. --- tools/tools/nanobsd/defaults.sh | 171 ------------------ tools/tools/nanobsd/legacy.sh | 203 ++++++++++++++++++++++ tools/tools/nanobsd/nanobsd.sh | 12 ++ tools/tools/nanobsd/pcengines/common.conf | 2 +- 4 files changed, 216 insertions(+), 172 deletions(-) create mode 100644 tools/tools/nanobsd/legacy.sh diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index a5984b784f5..362e5aa8d34 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -132,10 +132,6 @@ NANO_RAM_ETCSIZE=10240 # Size of the /tmp+/var ramdisk in 512 bytes sectors NANO_RAM_TMPVARSIZE=10240 -# Media geometry, only relevant if bios doesn't understand LBA. -NANO_SECTS=63 -NANO_HEADS=16 - # boot0 flags/options and configuration NANO_BOOT0CFG="-o packet -s 1 -m 3" NANO_BOOTLOADER="boot/boot0sio" @@ -652,173 +648,6 @@ populate_data_slice ( ) ( populate_slice "$1" "$2" "$3" "$4" ) -create_diskimage ( ) ( - pprint 2 "build diskimage" - pprint 3 "log: ${NANO_LOG}/_.di" - - ( - echo $NANO_MEDIASIZE $NANO_IMAGES \ - $NANO_SECTS $NANO_HEADS \ - $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | - awk ' - { - printf "# %s\n", $0 - - # size of cylinder in sectors - cs = $3 * $4 - - # number of full cylinders on media - cyl = int ($1 / cs) - - # output fdisk geometry spec, truncate cyls to 1023 - if (cyl <= 1023) - print "g c" cyl " h" $4 " s" $3 - else - print "g c" 1023 " h" $4 " s" $3 - - if ($7 > 0) { - # size of data partition in full cylinders - dsl = int (($7 + cs - 1) / cs) - } else { - dsl = 0; - } - - # size of config partition in full cylinders - csl = int (($6 + cs - 1) / cs) - - if ($5 == 0) { - # size of image partition(s) in full cylinders - isl = int ((cyl - dsl - csl) / $2) - } else { - isl = int (($5 + cs - 1) / cs) - } - - # First image partition start at second track - print "p 1 165 " $3, isl * cs - $3 - c = isl * cs; - - # Second image partition (if any) also starts offset one - # track to keep them identical. - if ($2 > 1) { - print "p 2 165 " $3 + c, isl * cs - $3 - c += isl * cs; - } - - # Config partition starts at cylinder boundary. - print "p 3 165 " c, csl * cs - c += csl * cs - - # Data partition (if any) starts at cylinder boundary. - if ($7 > 0) { - print "p 4 165 " c, dsl * cs - } else if ($7 < 0 && $1 > c) { - print "p 4 165 " c, $1 - c - } else if ($1 < c) { - print "Disk space overcommitted by", \ - c - $1, "sectors" > "/dev/stderr" - exit 2 - } - - # Force slice 1 to be marked active. This is necessary - # for booting the image from a USB device to work. - print "a 1" - } - ' > ${NANO_LOG}/_.fdisk - - IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} - MNT=${NANO_OBJ}/_.mnt - mkdir -p ${MNT} - - if [ "${NANO_MD_BACKING}" = "swap" ] ; then - MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ - -y ${NANO_HEADS}` - else - echo "Creating md backing file..." - rm -f ${IMG} - dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0 - MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ - -y ${NANO_HEADS}` - fi - - trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT - - fdisk -i -f ${NANO_LOG}/_.fdisk ${MD} - fdisk ${MD} - # XXX: params - # XXX: pick up cached boot* files, they may not be in image anymore. - if [ -f ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ]; then - boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} - fi - if [ -f ${NANO_WORLDDIR}/boot/boot ]; then - bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}${NANO_SLICE_ROOT} - else - bsdlabel -w ${MD}${NANO_SLICE_ROOT} - fi - bsdlabel ${MD}${NANO_SLICE_ROOT} - - # Create first image - populate_slice /dev/${MD}${NANO_ROOT} ${NANO_WORLDDIR} ${MNT} "${NANO_ROOT}" - mount /dev/${MD}${NANO_ROOT} ${MNT} - echo "Generating mtree..." - ( cd "${MNT}" && mtree -c ) > ${NANO_LOG}/_.mtree - ( cd "${MNT}" && du -k ) > ${NANO_LOG}/_.du - nano_umount "${MNT}" - - if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then - # Duplicate to second image (if present) - echo "Duplicating to second image..." - dd conv=sparse if=/dev/${MD}${NANO_SLICE_ROOT} of=/dev/${MD}${NANO_SLICE_ALTROOT} bs=64k - mount /dev/${MD}${NANO_ALTROOT} ${MNT} - for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab - do - sed -i "" "s=${NANO_DRIVE}${NANO_SLICE_ROOT}=${NANO_DRIVE}${NANO_SLICE_ALTROOT}=g" $f - done - nano_umount ${MNT} - # Override the label from the first partition so we - # don't confuse glabel with duplicates. - if [ -n "${NANO_LABEL}" ]; then - tunefs -L ${NANO_LABEL}"${NANO_ALTROOT}" /dev/${MD}${NANO_ALTROOT} - fi - fi - - # Create Config slice - populate_cfg_slice /dev/${MD}${NANO_SLICE_CFG} "${NANO_CFGDIR}" ${MNT} "${NANO_SLICE_CFG}" - - # Create Data slice, if any. - if [ -n "$NANO_SLICE_DATA" -a "$NANO_SLICE_CFG" = "$NANO_SLICE_DATA" -a \ - "$NANO_DATASIZE" -ne 0 ]; then - pprint 2 "NANO_SLICE_DATA is the same as NANO_SLICE_CFG, fix." - exit 2 - fi - if [ $NANO_DATASIZE -ne 0 -a -n "$NANO_SLICE_DATA" ] ; then - populate_data_slice /dev/${MD}${NANO_SLICE_DATA} "${NANO_DATADIR}" ${MNT} "${NANO_SLICE_DATA}" - fi - - if [ "${NANO_MD_BACKING}" = "swap" ] ; then - if [ ${NANO_IMAGE_MBRONLY} ]; then - echo "Writing out _.disk.mbr..." - dd if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.mbr bs=512 count=1 - else - echo "Writing out ${NANO_IMGNAME}..." - dd if=/dev/${MD} of=${IMG} bs=64k - fi - - echo "Writing out ${NANO_IMGNAME}..." - dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k - fi - - if ${do_copyout_partition} ; then - echo "Writing out _.disk.image..." - dd conv=sparse if=/dev/${MD}${NANO_SLICE_ROOT} of=${NANO_DISKIMGDIR}/_.disk.image bs=64k - fi - mdconfig -d -u $MD - - trap - 1 2 15 - trap nano_cleanup EXIT - - ) > ${NANO_LOG}/_.di 2>&1 -) - last_orders ( ) ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh new file mode 100644 index 00000000000..f0d79fab2fa --- /dev/null +++ b/tools/tools/nanobsd/legacy.sh @@ -0,0 +1,203 @@ +#!/bin/sh +# +# Copyright (c) 2005 Poul-Henning Kamp. +# Copyright (c) 2016 M. Warner Losh. +# 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$ +# + +# Media geometry, only relevant if bios doesn't understand LBA. +[ -z "$NANO_SECTS" ] || NANO_SECTS=63 +[ -z "$NANO_HEADS" ] || NANO_HEADS=16 + +# Functions and variable definitions used by the legacy nanobsd +# image building system. + +create_diskimage ( ) ( + pprint 2 "build diskimage" + pprint 3 "log: ${NANO_LOG}/_.di" + + ( + echo $NANO_MEDIASIZE $NANO_IMAGES \ + $NANO_SECTS $NANO_HEADS \ + $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | + awk ' + { + printf "# %s\n", $0 + + # size of cylinder in sectors + cs = $3 * $4 + + # number of full cylinders on media + cyl = int ($1 / cs) + + # output fdisk geometry spec, truncate cyls to 1023 + if (cyl <= 1023) + print "g c" cyl " h" $4 " s" $3 + else + print "g c" 1023 " h" $4 " s" $3 + + if ($7 > 0) { + # size of data partition in full cylinders + dsl = int (($7 + cs - 1) / cs) + } else { + dsl = 0; + } + + # size of config partition in full cylinders + csl = int (($6 + cs - 1) / cs) + + if ($5 == 0) { + # size of image partition(s) in full cylinders + isl = int ((cyl - dsl - csl) / $2) + } else { + isl = int (($5 + cs - 1) / cs) + } + + # First image partition start at second track + print "p 1 165 " $3, isl * cs - $3 + c = isl * cs; + + # Second image partition (if any) also starts offset one + # track to keep them identical. + if ($2 > 1) { + print "p 2 165 " $3 + c, isl * cs - $3 + c += isl * cs; + } + + # Config partition starts at cylinder boundary. + print "p 3 165 " c, csl * cs + c += csl * cs + + # Data partition (if any) starts at cylinder boundary. + if ($7 > 0) { + print "p 4 165 " c, dsl * cs + } else if ($7 < 0 && $1 > c) { + print "p 4 165 " c, $1 - c + } else if ($1 < c) { + print "Disk space overcommitted by", \ + c - $1, "sectors" > "/dev/stderr" + exit 2 + } + + # Force slice 1 to be marked active. This is necessary + # for booting the image from a USB device to work. + print "a 1" + } + ' > ${NANO_LOG}/_.fdisk + + IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} + MNT=${NANO_OBJ}/_.mnt + mkdir -p ${MNT} + + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + else + echo "Creating md backing file..." + rm -f ${IMG} + dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0 + MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + fi + + trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT + + fdisk -i -f ${NANO_LOG}/_.fdisk ${MD} + fdisk ${MD} + # XXX: params + # XXX: pick up cached boot* files, they may not be in image anymore. + if [ -f ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ]; then + boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD} + fi + if [ -f ${NANO_WORLDDIR}/boot/boot ]; then + bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}${NANO_SLICE_ROOT} + else + bsdlabel -w ${MD}${NANO_SLICE_ROOT} + fi + bsdlabel ${MD}${NANO_SLICE_ROOT} + + # Create first image + populate_slice /dev/${MD}${NANO_ROOT} ${NANO_WORLDDIR} ${MNT} "${NANO_ROOT}" + mount /dev/${MD}${NANO_ROOT} ${MNT} + echo "Generating mtree..." + ( cd "${MNT}" && mtree -c ) > ${NANO_LOG}/_.mtree + ( cd "${MNT}" && du -k ) > ${NANO_LOG}/_.du + nano_umount "${MNT}" + + if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then + # Duplicate to second image (if present) + echo "Duplicating to second image..." + dd conv=sparse if=/dev/${MD}${NANO_SLICE_ROOT} of=/dev/${MD}${NANO_SLICE_ALTROOT} bs=64k + mount /dev/${MD}${NANO_ALTROOT} ${MNT} + for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab + do + sed -i "" "s=${NANO_DRIVE}${NANO_SLICE_ROOT}=${NANO_DRIVE}${NANO_SLICE_ALTROOT}=g" $f + done + nano_umount ${MNT} + # Override the label from the first partition so we + # don't confuse glabel with duplicates. + if [ -n "${NANO_LABEL}" ]; then + tunefs -L ${NANO_LABEL}"${NANO_ALTROOT}" /dev/${MD}${NANO_ALTROOT} + fi + fi + + # Create Config slice + populate_cfg_slice /dev/${MD}${NANO_SLICE_CFG} "${NANO_CFGDIR}" ${MNT} "${NANO_SLICE_CFG}" + + # Create Data slice, if any. + if [ -n "$NANO_SLICE_DATA" -a "$NANO_SLICE_CFG" = "$NANO_SLICE_DATA" -a \ + "$NANO_DATASIZE" -ne 0 ]; then + pprint 2 "NANO_SLICE_DATA is the same as NANO_SLICE_CFG, fix." + exit 2 + fi + if [ $NANO_DATASIZE -ne 0 -a -n "$NANO_SLICE_DATA" ] ; then + populate_data_slice /dev/${MD}${NANO_SLICE_DATA} "${NANO_DATADIR}" ${MNT} "${NANO_SLICE_DATA}" + fi + + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + if [ ${NANO_IMAGE_MBRONLY} ]; then + echo "Writing out _.disk.mbr..." + dd if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.mbr bs=512 count=1 + else + echo "Writing out ${NANO_IMGNAME}..." + dd if=/dev/${MD} of=${IMG} bs=64k + fi + + echo "Writing out ${NANO_IMGNAME}..." + dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k + fi + + if ${do_copyout_partition} ; then + echo "Writing out _.disk.image..." + dd conv=sparse if=/dev/${MD}${NANO_SLICE_ROOT} of=${NANO_DISKIMGDIR}/_.disk.image bs=64k + fi + mdconfig -d -u $MD + + trap - 1 2 15 + trap nano_cleanup EXIT + + ) > ${NANO_LOG}/_.di 2>&1 +) diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh index 02c84cd1afb..c2bd74b4675 100755 --- a/tools/tools/nanobsd/nanobsd.sh +++ b/tools/tools/nanobsd/nanobsd.sh @@ -43,6 +43,9 @@ do_world=true do_image=true do_copyout_partition=true do_native_xtools=false +# Don't do the legacy build unless we detect 'old' variables being +# set. +do_legacy=false set +e args=`getopt KXbc:fhiknqvw $*` @@ -121,6 +124,15 @@ if [ $# -gt 0 ] ; then usage fi +if [ -n "$NANO_HEADS" -o -n "$NANO_SECTS" ]; then + do_legacy=true +fi + +# If this uses the old, legacy image system, pull that in as well +if $do_legacy ; then + . "${topdir}/legacy.sh" +fi + ####################################################################### # And then it is as simple as that... diff --git a/tools/tools/nanobsd/pcengines/common.conf b/tools/tools/nanobsd/pcengines/common.conf index 687fd74eec9..c23293d8fd8 100644 --- a/tools/tools/nanobsd/pcengines/common.conf +++ b/tools/tools/nanobsd/pcengines/common.conf @@ -21,7 +21,7 @@ NO_CLEAN=YES # Options to put in make.conf during installworld only CONF_INSTALL=' ' -# Options to put in make.conf during both build- & installworld. +# Options to put in make.conf during both build- & installworld. CONF_WORLD=' CFLAGS=-O -pipe WITHOUT_ACPI= From 1ad69dcca993ccd5818bd541f945c7dc2a6ea792 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 16 Nov 2016 17:11:05 +0000 Subject: [PATCH 128/204] Allow installworld to be skipped as well as installkernel with -W. Allow -B to mean -K -W. There are times when fixing non-base elementes of the build that you don't want to wait to get a completely clean world install. This allows that at the cost of a little danger. Submitted by: gallatin@ Sponsored by: Netflix, Inc --- tools/tools/nanobsd/nanobsd.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh index c2bd74b4675..918dd6b5015 100755 --- a/tools/tools/nanobsd/nanobsd.sh +++ b/tools/tools/nanobsd/nanobsd.sh @@ -40,6 +40,7 @@ do_clean=true do_kernel=true do_installkernel=true do_world=true +do_installworld=true do_image=true do_copyout_partition=true do_native_xtools=false @@ -48,7 +49,7 @@ do_native_xtools=false do_legacy=false set +e -args=`getopt KXbc:fhiknqvw $*` +args=`getopt BKXWbc:fhiknqvw $*` if [ $? -ne 0 ] ; then usage exit 2 @@ -60,6 +61,11 @@ for i do case "$i" in + -B) + do_installworld=false + do_installkernel=false + shift + ;; -K) do_installkernel=false shift @@ -68,6 +74,10 @@ do do_native_xtools=true shift ;; + -W) + do_installworld=false + shift + ;; -b) do_world=false do_kernel=false @@ -174,10 +184,15 @@ else pprint 2 "Skipping buildkernel (as instructed)" fi -clean_world -make_conf_install -install_world -install_etc +if $do_installworld ; then + clean_world + make_conf_install + install_world + install_etc +else + pprint 2 "Skipping installworld (as instructed)" +fi + if $do_native_xtools ; then native_xtools fi From ea18fc2f0ced00b3876b8e749665668b8494c40e Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Wed, 16 Nov 2016 18:08:50 +0000 Subject: [PATCH 129/204] Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwise mkimg(1) does not create the second partition after r307008. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 1c6a1936058..eab4a1e956a 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -55,7 +55,7 @@ ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf cw-${_CW:tl}: mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW}_FORMAT} \ From fb9b2ab1901d7e8cacafacee1fbf28c3db021708 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 17 Nov 2016 00:21:55 +0000 Subject: [PATCH 130/204] Fix grammar nit --- UPDATING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index fb869480ebc..3240f5f5c56 100644 --- a/UPDATING +++ b/UPDATING @@ -130,7 +130,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: 20160527: CAM will now strip leading spaces from SCSI disks' serial numbers. - This will effect users who create UFS filesystems on SCSI disks using + This will affect users who create UFS filesystems on SCSI disks using those disk's diskid device nodes. For example, if /etc/fstab previously contained a line like "/dev/diskid/DISK-%20%20%20%20%20%20%20ABCDEFG0123456", you should From bedddda00f794cc0baf6b2928cc61c6f9b10fe3d Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Thu, 17 Nov 2016 03:00:56 +0000 Subject: [PATCH 131/204] hyperv/vss: Nuke unused variables. Submitted by: markj Reported by: markj MFC after: 3 weeks Sponsored by: Microsoft --- contrib/hyperv/tools/hv_vss_daemon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/hyperv/tools/hv_vss_daemon.c b/contrib/hyperv/tools/hv_vss_daemon.c index 8b58bc93a25..a1ba98d4cb4 100644 --- a/contrib/hyperv/tools/hv_vss_daemon.c +++ b/contrib/hyperv/tools/hv_vss_daemon.c @@ -158,10 +158,9 @@ main(int argc, char* argv[]) struct pollfd hv_vss_poll_fd[1]; uint32_t op; - int ch, r, len, error; + int ch, r, error; int hv_vss_dev_fd; - int freeze_thaw = UNDEF_FREEZE_THAW; while ((ch = getopt(argc, argv, "dnh")) != -1) { switch (ch) { case 'n': From f4dc47c87b053e15bb64e470ee25bd078688224f Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Thu, 17 Nov 2016 03:02:35 +0000 Subject: [PATCH 132/204] hyperv/vss: Install the userland daemon to /usr/sbin instead of / Submitted by: markj Reported by: markj MFC after: 3 weeks Sponsored by: Microsoft --- usr.sbin/hyperv/tools/Makefile.inc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 usr.sbin/hyperv/tools/Makefile.inc diff --git a/usr.sbin/hyperv/tools/Makefile.inc b/usr.sbin/hyperv/tools/Makefile.inc new file mode 100644 index 00000000000..7e09f324e3e --- /dev/null +++ b/usr.sbin/hyperv/tools/Makefile.inc @@ -0,0 +1,4 @@ +# $FreeBSD$ + +CFLAGS.gcc+= -Wno-uninitialized +.include "../../Makefile.inc" From c702a80e27130fed0646201d9d4af3f1770950a8 Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Thu, 17 Nov 2016 07:33:37 +0000 Subject: [PATCH 133/204] [etherswitch] add infineon adm6996fc support on etherswitch This is Infineon ADM6996FC/M/MX driver code on etherswitch framework. Support PORT and DOT1Q VLAN. This code suppose ADM6996FC SDC/SDIO connect to SOC network interface MDC/MDIO. This code tested on Netgear WGR614Cv7. Submitted by: Hiroki Mori Reviewed by: adrian, mizhka Approved by: adrian(mentor) Differential Revision: https://reviews.freebsd.org/D8495 --- sys/dev/etherswitch/infineon/adm6996fc.c | 858 +++++++++++++++++++++++ 1 file changed, 858 insertions(+) create mode 100644 sys/dev/etherswitch/infineon/adm6996fc.c diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c new file mode 100644 index 00000000000..da31b7a964d --- /dev/null +++ b/sys/dev/etherswitch/infineon/adm6996fc.c @@ -0,0 +1,858 @@ +/*- + * Copyright (c) 2016 Hiroki Mori + * Copyright (c) 2013 Luiz Otavio O Souza. + * Copyright (c) 2011-2012 Stefan Bethke. + * Copyright (c) 2012 Adrian Chadd. + * 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$ + */ + +/* + * This is Infineon ADM6996FC/M/MX driver code on etherswitch framework. + * Support PORT and DOT1Q VLAN. + * This code suppose ADM6996FC SDC/SDIO connect to SOC network interface + * MDC/MDIO. + * This code development on Netgear WGR614Cv7. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "mdio_if.h" +#include "miibus_if.h" +#include "etherswitch_if.h" + +#define ADM6996FC_PRODUCT_CODE 0x7102 + +#define ADM6996FC_SC3 0x11 +#define ADM6996FC_VF0L 0x40 +#define ADM6996FC_VF0H 0x41 +#define ADM6996FC_CI0 0xa0 +#define ADM6996FC_CI1 0xa1 +#define ADM6996FC_PHY_C0 0x200 + +#define ADM6996FC_PC_SHIFT 4 +#define ADM6996FC_TBV_SHIFT 5 +#define ADM6996FC_PVID_SHIFT 10 +#define ADM6996FC_OPTE_SHIFT 4 +#define ADM6996FC_VV_SHIFT 15 + +#define ADM6996FC_PHY_SIZE 0x20 + +MALLOC_DECLARE(M_ADM6996FC); +MALLOC_DEFINE(M_ADM6996FC, "adm6996fc", "adm6996fc data structures"); + +struct adm6996fc_softc { + struct mtx sc_mtx; /* serialize access to softc */ + device_t sc_dev; + int vlan_mode; + int media; /* cpu port media */ + int cpuport; /* which PHY is connected to the CPU */ + int phymask; /* PHYs we manage */ + int numports; /* number of ports */ + int ifpport[MII_NPHY]; + int *portphy; + char **ifname; + device_t **miibus; + struct ifnet **ifp; + struct callout callout_tick; + etherswitch_info_t info; +}; + +#define ADM6996FC_LOCK(_sc) \ + mtx_lock(&(_sc)->sc_mtx) +#define ADM6996FC_UNLOCK(_sc) \ + mtx_unlock(&(_sc)->sc_mtx) +#define ADM6996FC_LOCK_ASSERT(_sc, _what) \ + mtx_assert(&(_sc)->sc_mtx, (_what)) +#define ADM6996FC_TRYLOCK(_sc) \ + mtx_trylock(&(_sc)->sc_mtx) + +#if defined(DEBUG) +#define DPRINTF(dev, args...) device_printf(dev, args) +#else +#define DPRINTF(dev, args...) +#endif + +static inline int adm6996fc_portforphy(struct adm6996fc_softc *, int); +static void adm6996fc_tick(void *); +static int adm6996fc_ifmedia_upd(struct ifnet *); +static void adm6996fc_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +#define ADM6996FC_READREG(dev, x) \ + MDIO_READREG(dev, ((x) >> 5), ((x) & 0x1f)); +#define ADM6996FC_WRITEREG(dev, x, v) \ + MDIO_WRITEREG(dev, ((x) >> 5), ((x) & 0x1f), v); + +#define ADM6996FC_PVIDBYDATA(data1, data2) \ + ((((data1) >> ADM6996FC_PVID_SHIFT) & 0x0f) | ((data2) << 4)) + +static int +adm6996fc_probe(device_t dev) +{ + int data1, data2; + int pc; + struct adm6996fc_softc *sc; + + sc = device_get_softc(dev); + bzero(sc, sizeof(*sc)); + + data1 = ADM6996FC_READREG(device_get_parent(dev), ADM6996FC_CI0); + data2 = ADM6996FC_READREG(device_get_parent(dev), ADM6996FC_CI1); + pc = ((data2 << 16) | data1) >> ADM6996FC_PC_SHIFT; + if (bootverbose) + device_printf(dev,"Chip Identifier Register %x %x\n", data1, + data2); + + /* check Product Code */ + if (pc != ADM6996FC_PRODUCT_CODE) { + return (ENXIO); + } + + device_set_desc_copy(dev, "Infineon ADM6996FC/M/MX MDIO switch driver"); + return (BUS_PROBE_DEFAULT); +} + +static int +adm6996fc_attach_phys(struct adm6996fc_softc *sc) +{ + int phy, port, err; + char name[IFNAMSIZ]; + + port = 0; + err = 0; + /* PHYs need an interface, so we generate a dummy one */ + snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->sc_dev)); + for (phy = 0; phy < sc->numports; phy++) { + if (((1 << phy) & sc->phymask) == 0) + continue; + sc->ifpport[phy] = port; + sc->portphy[port] = phy; + sc->ifp[port] = if_alloc(IFT_ETHER); + sc->ifp[port]->if_softc = sc; + sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX; + if_initname(sc->ifp[port], name, port); + sc->miibus[port] = malloc(sizeof(device_t), M_ADM6996FC, + M_WAITOK | M_ZERO); + if (sc->miibus[port] == NULL) { + err = ENOMEM; + goto failed; + } + err = mii_attach(sc->sc_dev, sc->miibus[port], sc->ifp[port], + adm6996fc_ifmedia_upd, adm6996fc_ifmedia_sts, \ + BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", + device_get_nameunit(*sc->miibus[port]), + sc->ifp[port]->if_xname); + if (err != 0) { + device_printf(sc->sc_dev, + "attaching PHY %d failed\n", + phy); + goto failed; + } + ++port; + } + sc->info.es_nports = port; + if (sc->cpuport != -1) { + /* assume cpuport is last one */ + sc->ifpport[sc->cpuport] = port; + sc->portphy[port] = sc->cpuport; + ++sc->info.es_nports; + } + return (0); + +failed: + for (phy = 0; phy < sc->numports; phy++) { + if (((1 << phy) & sc->phymask) == 0) + continue; + port = adm6996fc_portforphy(sc, phy); + if (sc->miibus[port] != NULL) + device_delete_child(sc->sc_dev, (*sc->miibus[port])); + if (sc->ifp[port] != NULL) + if_free(sc->ifp[port]); + if (sc->ifname[port] != NULL) + free(sc->ifname[port], M_ADM6996FC); + if (sc->miibus[port] != NULL) + free(sc->miibus[port], M_ADM6996FC); + } + return (err); +} + +static int +adm6996fc_attach(device_t dev) +{ + struct adm6996fc_softc *sc; + int err; + + err = 0; + sc = device_get_softc(dev); + + sc->sc_dev = dev; + mtx_init(&sc->sc_mtx, "adm6996fc", NULL, MTX_DEF); + strlcpy(sc->info.es_name, device_get_desc(dev), + sizeof(sc->info.es_name)); + + /* ADM6996FC Defaults */ + sc->numports = 6; + sc->phymask = 0x1f; + sc->cpuport = 5; + sc->media = 100; + + sc->info.es_nvlangroups = 16; + sc->info.es_vlan_caps = ETHERSWITCH_VLAN_PORT | ETHERSWITCH_VLAN_DOT1Q; + + sc->ifp = malloc(sizeof(struct ifnet *) * sc->numports, M_ADM6996FC, + M_WAITOK | M_ZERO); + sc->ifname = malloc(sizeof(char *) * sc->numports, M_ADM6996FC, + M_WAITOK | M_ZERO); + sc->miibus = malloc(sizeof(device_t *) * sc->numports, M_ADM6996FC, + M_WAITOK | M_ZERO); + sc->portphy = malloc(sizeof(int) * sc->numports, M_ADM6996FC, + M_WAITOK | M_ZERO); + + if (sc->ifp == NULL || sc->ifname == NULL || sc->miibus == NULL || + sc->portphy == NULL) { + err = ENOMEM; + goto failed; + } + + /* + * Attach the PHYs and complete the bus enumeration. + */ + err = adm6996fc_attach_phys(sc); + if (err != 0) + goto failed; + + bus_generic_probe(dev); + bus_enumerate_hinted_children(dev); + err = bus_generic_attach(dev); + if (err != 0) + goto failed; + + callout_init(&sc->callout_tick, 0); + + adm6996fc_tick(sc); + + return (0); + +failed: + if (sc->portphy != NULL) + free(sc->portphy, M_ADM6996FC); + if (sc->miibus != NULL) + free(sc->miibus, M_ADM6996FC); + if (sc->ifname != NULL) + free(sc->ifname, M_ADM6996FC); + if (sc->ifp != NULL) + free(sc->ifp, M_ADM6996FC); + + return (err); +} + +static int +adm6996fc_detach(device_t dev) +{ + struct adm6996fc_softc *sc; + int i, port; + + sc = device_get_softc(dev); + + callout_drain(&sc->callout_tick); + + for (i = 0; i < MII_NPHY; i++) { + if (((1 << i) & sc->phymask) == 0) + continue; + port = adm6996fc_portforphy(sc, i); + if (sc->miibus[port] != NULL) + device_delete_child(dev, (*sc->miibus[port])); + if (sc->ifp[port] != NULL) + if_free(sc->ifp[port]); + free(sc->ifname[port], M_ADM6996FC); + free(sc->miibus[port], M_ADM6996FC); + } + + free(sc->portphy, M_ADM6996FC); + free(sc->miibus, M_ADM6996FC); + free(sc->ifname, M_ADM6996FC); + free(sc->ifp, M_ADM6996FC); + + bus_generic_detach(dev); + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +/* + * Convert PHY number to port number. + */ +static inline int +adm6996fc_portforphy(struct adm6996fc_softc *sc, int phy) +{ + + return (sc->ifpport[phy]); +} + +static inline struct mii_data * +adm6996fc_miiforport(struct adm6996fc_softc *sc, int port) +{ + + if (port < 0 || port > sc->numports) + return (NULL); + if (port == sc->cpuport) + return (NULL); + return (device_get_softc(*sc->miibus[port])); +} + +static inline struct ifnet * +adm6996fc_ifpforport(struct adm6996fc_softc *sc, int port) +{ + + if (port < 0 || port > sc->numports) + return (NULL); + return (sc->ifp[port]); +} + +/* + * Poll the status for all PHYs. + */ +static void +adm6996fc_miipollstat(struct adm6996fc_softc *sc) +{ + int i, port; + struct mii_data *mii; + struct mii_softc *miisc; + + ADM6996FC_LOCK_ASSERT(sc, MA_NOTOWNED); + + for (i = 0; i < MII_NPHY; i++) { + if (((1 << i) & sc->phymask) == 0) + continue; + port = adm6996fc_portforphy(sc, i); + if ((*sc->miibus[port]) == NULL) + continue; + mii = device_get_softc(*sc->miibus[port]); + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) { + if (IFM_INST(mii->mii_media.ifm_cur->ifm_media) != + miisc->mii_inst) + continue; + ukphy_status(miisc); + mii_phy_update(miisc, MII_POLLSTAT); + } + } +} + +static void +adm6996fc_tick(void *arg) +{ + struct adm6996fc_softc *sc; + + sc = arg; + + adm6996fc_miipollstat(sc); + callout_reset(&sc->callout_tick, hz, adm6996fc_tick, sc); +} + +static void +adm6996fc_lock(device_t dev) +{ + struct adm6996fc_softc *sc; + + sc = device_get_softc(dev); + + ADM6996FC_LOCK_ASSERT(sc, MA_NOTOWNED); + ADM6996FC_LOCK(sc); +} + +static void +adm6996fc_unlock(device_t dev) +{ + struct adm6996fc_softc *sc; + + sc = device_get_softc(dev); + + ADM6996FC_LOCK_ASSERT(sc, MA_OWNED); + ADM6996FC_UNLOCK(sc); +} + +static etherswitch_info_t * +adm6996fc_getinfo(device_t dev) +{ + struct adm6996fc_softc *sc; + + sc = device_get_softc(dev); + + return (&sc->info); +} + +static int +adm6996fc_getport(device_t dev, etherswitch_port_t *p) +{ + struct adm6996fc_softc *sc; + struct mii_data *mii; + struct ifmediareq *ifmr; + device_t parent; + int err, phy; + int data1, data2; + + int bcaddr[6] = {0x01, 0x03, 0x05, 0x07, 0x08, 0x09}; + int vidaddr[6] = {0x28, 0x29, 0x2a, 0x2b, 0x2b, 0x2c}; + + sc = device_get_softc(dev); + ifmr = &p->es_ifmr; + + if (p->es_port < 0 || p->es_port >= sc->numports) + return (ENXIO); + + parent = device_get_parent(dev); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + data1 = ADM6996FC_READREG(parent, bcaddr[p->es_port]); + data2 = ADM6996FC_READREG(parent, vidaddr[p->es_port]); + /* only port 4 is hi bit */ + if (p->es_port == 4) + data2 = (data2 >> 8) & 0xff; + else + data2 = data2 & 0xff; + + p->es_pvid = ADM6996FC_PVIDBYDATA(data1, data2); + if (((data1 >> ADM6996FC_OPTE_SHIFT) & 0x01) == 1) + p->es_flags |= ETHERSWITCH_PORT_ADDTAG; + else + p->es_flags |= ETHERSWITCH_PORT_STRIPTAG; + } else { + p->es_pvid = 0; + } + + phy = sc->portphy[p->es_port]; + mii = adm6996fc_miiforport(sc, p->es_port); + if (sc->cpuport != -1 && phy == sc->cpuport) { + /* fill in fixed values for CPU port */ + p->es_flags |= ETHERSWITCH_PORT_CPU; + ifmr->ifm_count = 0; + if (sc->media == 100) + ifmr->ifm_current = ifmr->ifm_active = + IFM_ETHER | IFM_100_TX | IFM_FDX; + else + ifmr->ifm_current = ifmr->ifm_active = + IFM_ETHER | IFM_1000_T | IFM_FDX; + ifmr->ifm_mask = 0; + ifmr->ifm_status = IFM_ACTIVE | IFM_AVALID; + } else if (mii != NULL) { + err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, + &mii->mii_media, SIOCGIFMEDIA); + if (err) + return (err); + } else { + return (ENXIO); + } + return (0); +} + +static int +adm6996fc_setport(device_t dev, etherswitch_port_t *p) +{ + struct adm6996fc_softc *sc; + struct ifmedia *ifm; + struct mii_data *mii; + struct ifnet *ifp; + device_t parent; + int err; + int data; + + int bcaddr[6] = {0x01, 0x03, 0x05, 0x07, 0x08, 0x09}; + int vidaddr[6] = {0x28, 0x29, 0x2a, 0x2b, 0x2b, 0x2c}; + + sc = device_get_softc(dev); + parent = device_get_parent(dev); + + if (p->es_port < 0 || p->es_port >= sc->numports) + return (ENXIO); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + data = ADM6996FC_READREG(parent, bcaddr[p->es_port]); + data &= ~(0xf << 10); + data |= (p->es_pvid & 0xf) << ADM6996FC_PVID_SHIFT; + ADM6996FC_WRITEREG(parent, bcaddr[p->es_port], data); + data = ADM6996FC_READREG(parent, vidaddr[p->es_port]); + /* only port 4 is hi bit */ + if (p->es_port == 4) { + data &= ~(0xff << 8); + data = data | (((p->es_pvid >> 4) & 0xff) << 8); + } else { + data &= ~0xff; + data = data | ((p->es_pvid >> 4) & 0xff); + } + ADM6996FC_WRITEREG(parent, vidaddr[p->es_port], data); + err = 0; + } else { + if (sc->portphy[p->es_port] == sc->cpuport) + return (ENXIO); + } + + if (sc->portphy[p->es_port] != sc->cpuport) { + mii = adm6996fc_miiforport(sc, p->es_port); + if (mii == NULL) + return (ENXIO); + + ifp = adm6996fc_ifpforport(sc, p->es_port); + + ifm = &mii->mii_media; + err = ifmedia_ioctl(ifp, &p->es_ifr, ifm, SIOCSIFMEDIA); + } + return (err); +} + +static int +adm6996fc_getvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + struct adm6996fc_softc *sc; + device_t parent; + int datahi, datalo; + + sc = device_get_softc(dev); + parent = device_get_parent(dev); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_PORT) { + if (vg->es_vlangroup <= 5) { + vg->es_vid = ETHERSWITCH_VID_VALID; + vg->es_vid |= vg->es_vlangroup; + datalo = ADM6996FC_READREG(parent, + ADM6996FC_VF0L + 2 * vg->es_vlangroup); + datahi = ADM6996FC_READREG(parent, + ADM6996FC_VF0H + 2 * vg->es_vlangroup); + + vg->es_member_ports = datalo & 0x3f; + vg->es_untagged_ports = vg->es_member_ports; + vg->es_fid = 0; + } else { + vg->es_vid = 0; + } + } else if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + datalo = ADM6996FC_READREG(parent, + ADM6996FC_VF0L + 2 * vg->es_vlangroup); + datahi = ADM6996FC_READREG(parent, + ADM6996FC_VF0H + 2 * vg->es_vlangroup); + + if (datahi & (1 << ADM6996FC_VV_SHIFT)) { + vg->es_vid = ETHERSWITCH_VID_VALID; + vg->es_vid |= datahi & 0xfff; + vg->es_member_ports = datalo & 0x3f; + vg->es_untagged_ports = (~datalo >> 6) & 0x3f; + vg->es_fid = 0; + } else { + vg->es_fid = 0; + } + } else { + vg->es_fid = 0; + } + + return (0); +} + +static int +adm6996fc_setvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + struct adm6996fc_softc *sc; + device_t parent; + + sc = device_get_softc(dev); + parent = device_get_parent(dev); + + if (sc->vlan_mode == ETHERSWITCH_VLAN_PORT) { + ADM6996FC_WRITEREG(parent, ADM6996FC_VF0L + 2 * vg->es_vlangroup, + vg->es_member_ports); + } else if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + ADM6996FC_WRITEREG(parent, ADM6996FC_VF0L + 2 * vg->es_vlangroup, + vg->es_member_ports | ((~vg->es_untagged_ports & 0x3f)<< 6)); + ADM6996FC_WRITEREG(parent, ADM6996FC_VF0H + 2 * vg->es_vlangroup, + (1 << ADM6996FC_VV_SHIFT) | vg->es_vid); + } + + return (0); +} + +static int +adm6996fc_getconf(device_t dev, etherswitch_conf_t *conf) +{ + struct adm6996fc_softc *sc; + + sc = device_get_softc(dev); + + /* Return the VLAN mode. */ + conf->cmd = ETHERSWITCH_CONF_VLAN_MODE; + conf->vlan_mode = sc->vlan_mode; + + return (0); +} + +static int +adm6996fc_setconf(device_t dev, etherswitch_conf_t *conf) +{ + struct adm6996fc_softc *sc; + device_t parent; + int i; + int data; + int bcaddr[6] = {0x01, 0x03, 0x05, 0x07, 0x08, 0x09}; + + sc = device_get_softc(dev); + parent = device_get_parent(dev); + + if ((conf->cmd & ETHERSWITCH_CONF_VLAN_MODE) == 0) + return (0); + + if (conf->vlan_mode == ETHERSWITCH_VLAN_PORT) { + sc->vlan_mode = ETHERSWITCH_VLAN_PORT; + data = ADM6996FC_READREG(parent, ADM6996FC_SC3); + data &= ~(1 << ADM6996FC_TBV_SHIFT); + ADM6996FC_WRITEREG(parent, ADM6996FC_SC3, data); + for (i = 0;i <= 5; ++i) { + data = ADM6996FC_READREG(parent, bcaddr[i]); + data &= ~(0xf << 10); + data |= (i << 10); + ADM6996FC_WRITEREG(parent, bcaddr[i], data); + ADM6996FC_WRITEREG(parent, ADM6996FC_VF0L + 2 * i, + 0x003f); + ADM6996FC_WRITEREG(parent, ADM6996FC_VF0H + 2 * i, + (1 << ADM6996FC_VV_SHIFT) | 1); + } + } else if (conf->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + sc->vlan_mode = ETHERSWITCH_VLAN_DOT1Q; + data = ADM6996FC_READREG(parent, ADM6996FC_SC3); + data |= (1 << ADM6996FC_TBV_SHIFT); + ADM6996FC_WRITEREG(parent, ADM6996FC_SC3, data); + for (i = 0;i <= 5; ++i) { + data = ADM6996FC_READREG(parent, bcaddr[i]); + /* Private VID set 1 */ + data &= ~(0xf << 10); + data |= (1 << 10); + /* Output Packet Tagging Enable */ + if (i == 5) + data |= (1 << 4); + ADM6996FC_WRITEREG(parent, bcaddr[i], data); + } + for (i = 2;i <= 15; ++i) { + ADM6996FC_WRITEREG(parent, ADM6996FC_VF0H + 2 * i, + 0x0000); + } + } else { + /* + ADM6996FC have no VLAN off. Then set Port base and + add all port to member. Use VLAN Filter 1 is reset + default. + */ + sc->vlan_mode = 0; + data = ADM6996FC_READREG(parent, ADM6996FC_SC3); + data &= ~(1 << ADM6996FC_TBV_SHIFT); + ADM6996FC_WRITEREG(parent, ADM6996FC_SC3, data); + for (i = 0;i <= 5; ++i) { + data = ADM6996FC_READREG(parent, bcaddr[i]); + data &= ~(0xf << 10); + data |= (1 << 10); + if (i == 5) + data &= ~(1 << 4); + ADM6996FC_WRITEREG(parent, bcaddr[i], data); + } + /* default setting */ + ADM6996FC_WRITEREG(parent, ADM6996FC_VF0L + 2, 0x003f); + ADM6996FC_WRITEREG(parent, ADM6996FC_VF0H + 2, + (1 << ADM6996FC_VV_SHIFT) | 1); + } + + + return (0); +} + +static void +adm6996fc_statchg(device_t dev) +{ + + DPRINTF(dev, "%s\n", __func__); +} + +static int +adm6996fc_ifmedia_upd(struct ifnet *ifp) +{ + struct adm6996fc_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = adm6996fc_miiforport(sc, ifp->if_dunit); + + DPRINTF(sc->sc_dev, "%s\n", __func__); + if (mii == NULL) + return (ENXIO); + mii_mediachg(mii); + return (0); +} + +static void +adm6996fc_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + struct adm6996fc_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = adm6996fc_miiforport(sc, ifp->if_dunit); + + DPRINTF(sc->sc_dev, "%s\n", __func__); + + if (mii == NULL) + return; + mii_pollstat(mii); + ifmr->ifm_active = mii->mii_media_active; + ifmr->ifm_status = mii->mii_media_status; +} + +static int +adm6996fc_readphy(device_t dev, int phy, int reg) +{ + struct adm6996fc_softc *sc; + int data; + + sc = device_get_softc(dev); + ADM6996FC_LOCK_ASSERT(sc, MA_NOTOWNED); + + if (phy < 0 || phy >= 32) + return (ENXIO); + if (reg < 0 || reg >= 32) + return (ENXIO); + + ADM6996FC_LOCK(sc); + data = ADM6996FC_READREG(device_get_parent(dev), + (ADM6996FC_PHY_C0 + ADM6996FC_PHY_SIZE * phy) + reg); + ADM6996FC_UNLOCK(sc); + + return (data); +} + +static int +adm6996fc_writephy(device_t dev, int phy, int reg, int data) +{ + struct adm6996fc_softc *sc; + int err; + + sc = device_get_softc(dev); + ADM6996FC_LOCK_ASSERT(sc, MA_NOTOWNED); + + if (phy < 0 || phy >= 32) + return (ENXIO); + if (reg < 0 || reg >= 32) + return (ENXIO); + + ADM6996FC_LOCK(sc); + err = ADM6996FC_WRITEREG(device_get_parent(dev), + (ADM6996FC_PHY_C0 + ADM6996FC_PHY_SIZE * phy) + reg, data); + ADM6996FC_UNLOCK(sc); + + return (err); +} + +static int +adm6996fc_readreg(device_t dev, int addr) +{ + + return ADM6996FC_READREG(device_get_parent(dev), addr); +} + +static int +adm6996fc_writereg(device_t dev, int addr, int value) +{ + int err; + + err = ADM6996FC_WRITEREG(device_get_parent(dev), addr, value); + return (err); +} + +static device_method_t adm6996fc_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, adm6996fc_probe), + DEVMETHOD(device_attach, adm6996fc_attach), + DEVMETHOD(device_detach, adm6996fc_detach), + + /* bus interface */ + DEVMETHOD(bus_add_child, device_add_child_ordered), + + /* MII interface */ + DEVMETHOD(miibus_readreg, adm6996fc_readphy), + DEVMETHOD(miibus_writereg, adm6996fc_writephy), + DEVMETHOD(miibus_statchg, adm6996fc_statchg), + + /* MDIO interface */ + DEVMETHOD(mdio_readreg, adm6996fc_readphy), + DEVMETHOD(mdio_writereg, adm6996fc_writephy), + + /* etherswitch interface */ + DEVMETHOD(etherswitch_lock, adm6996fc_lock), + DEVMETHOD(etherswitch_unlock, adm6996fc_unlock), + DEVMETHOD(etherswitch_getinfo, adm6996fc_getinfo), + DEVMETHOD(etherswitch_readreg, adm6996fc_readreg), + DEVMETHOD(etherswitch_writereg, adm6996fc_writereg), + DEVMETHOD(etherswitch_readphyreg, adm6996fc_readphy), + DEVMETHOD(etherswitch_writephyreg, adm6996fc_writephy), + DEVMETHOD(etherswitch_getport, adm6996fc_getport), + DEVMETHOD(etherswitch_setport, adm6996fc_setport), + DEVMETHOD(etherswitch_getvgroup, adm6996fc_getvgroup), + DEVMETHOD(etherswitch_setvgroup, adm6996fc_setvgroup), + DEVMETHOD(etherswitch_setconf, adm6996fc_setconf), + DEVMETHOD(etherswitch_getconf, adm6996fc_getconf), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(adm6996fc, adm6996fc_driver, adm6996fc_methods, + sizeof(struct adm6996fc_softc)); +static devclass_t adm6996fc_devclass; + +DRIVER_MODULE(adm6996fc, mdio, adm6996fc_driver, adm6996fc_devclass, 0, 0); +DRIVER_MODULE(miibus, adm6996fc, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE(mdio, adm6996fc, mdio_driver, mdio_devclass, 0, 0); +DRIVER_MODULE(etherswitch, adm6996fc, etherswitch_driver, etherswitch_devclass, + 0, 0); +MODULE_VERSION(adm6996fc, 1); +MODULE_DEPEND(adm6996fc, miibus, 1, 1, 1); /* XXX which versions? */ +MODULE_DEPEND(adm6996fc, etherswitch, 1, 1, 1); /* XXX which versions? */ From 6779a1a101494bc11537e7a525bf32a39ca90521 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Thu, 17 Nov 2016 08:15:02 +0000 Subject: [PATCH 134/204] Notify the use via setting errno when a TCP RST segment is received either in the CLOSING or LAST-ACK state. Reviewed by: hiren MFC after: 3 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D8371 --- sys/netinet/tcp_input.c | 2 ++ sys/netinet/tcp_stacks/fastpath.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 63038584274..868fa4ef2f3 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2202,6 +2202,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, case TCPS_FIN_WAIT_1: case TCPS_FIN_WAIT_2: case TCPS_CLOSE_WAIT: + case TCPS_CLOSING: + case TCPS_LAST_ACK: so->so_error = ECONNRESET; close: tcp_state_change(tp, TCPS_CLOSED); diff --git a/sys/netinet/tcp_stacks/fastpath.c b/sys/netinet/tcp_stacks/fastpath.c index 2d7db04fbc1..4ce2ccc0f01 100644 --- a/sys/netinet/tcp_stacks/fastpath.c +++ b/sys/netinet/tcp_stacks/fastpath.c @@ -746,6 +746,8 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, struct socket *so, case TCPS_FIN_WAIT_1: case TCPS_FIN_WAIT_2: case TCPS_CLOSE_WAIT: + case TCPS_CLOSING: + case TCPS_LAST_ACK: so->so_error = ECONNRESET; close: tcp_state_change(tp, TCPS_CLOSED); From 72180f17a75b2ad7e1309b813e71ad9da9811bc1 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Thu, 17 Nov 2016 11:31:13 +0000 Subject: [PATCH 135/204] Import Ingenic CI20 (jz4780) DTS files. Submitted by: kan Sponsored by: DARPA, AFRL --- .../dts/include/dt-bindings/dma/jz4780-dma.h | 49 ++ .../dt-bindings/net/rfkill-regulator.h | 23 + sys/gnu/dts/mips/ingenic/ci20.dts | 395 +++++++++ sys/gnu/dts/mips/ingenic/jz4780.dtsi | 768 ++++++++++++++++++ 4 files changed, 1235 insertions(+) create mode 100644 sys/gnu/dts/include/dt-bindings/dma/jz4780-dma.h create mode 100644 sys/gnu/dts/include/dt-bindings/net/rfkill-regulator.h create mode 100644 sys/gnu/dts/mips/ingenic/ci20.dts create mode 100644 sys/gnu/dts/mips/ingenic/jz4780.dtsi diff --git a/sys/gnu/dts/include/dt-bindings/dma/jz4780-dma.h b/sys/gnu/dts/include/dt-bindings/dma/jz4780-dma.h new file mode 100644 index 00000000000..df017fdfb44 --- /dev/null +++ b/sys/gnu/dts/include/dt-bindings/dma/jz4780-dma.h @@ -0,0 +1,49 @@ +#ifndef __DT_BINDINGS_DMA_JZ4780_DMA_H__ +#define __DT_BINDINGS_DMA_JZ4780_DMA_H__ + +/* + * Request type numbers for the JZ4780 DMA controller (written to the DRTn + * register for the channel). + */ +#define JZ4780_DMA_I2S1_TX 0x4 +#define JZ4780_DMA_I2S1_RX 0x5 +#define JZ4780_DMA_I2S0_TX 0x6 +#define JZ4780_DMA_I2S0_RX 0x7 +#define JZ4780_DMA_AUTO 0x8 +#define JZ4780_DMA_SADC_RX 0x9 +#define JZ4780_DMA_UART4_TX 0xc +#define JZ4780_DMA_UART4_RX 0xd +#define JZ4780_DMA_UART3_TX 0xe +#define JZ4780_DMA_UART3_RX 0xf +#define JZ4780_DMA_UART2_TX 0x10 +#define JZ4780_DMA_UART2_RX 0x11 +#define JZ4780_DMA_UART1_TX 0x12 +#define JZ4780_DMA_UART1_RX 0x13 +#define JZ4780_DMA_UART0_TX 0x14 +#define JZ4780_DMA_UART0_RX 0x15 +#define JZ4780_DMA_SSI0_TX 0x16 +#define JZ4780_DMA_SSI0_RX 0x17 +#define JZ4780_DMA_SSI1_TX 0x18 +#define JZ4780_DMA_SSI1_RX 0x19 +#define JZ4780_DMA_MSC0_TX 0x1a +#define JZ4780_DMA_MSC0_RX 0x1b +#define JZ4780_DMA_MSC1_TX 0x1c +#define JZ4780_DMA_MSC1_RX 0x1d +#define JZ4780_DMA_MSC2_TX 0x1e +#define JZ4780_DMA_MSC2_RX 0x1f +#define JZ4780_DMA_PCM0_TX 0x20 +#define JZ4780_DMA_PCM0_RX 0x21 +#define JZ4780_DMA_SMB0_TX 0x24 +#define JZ4780_DMA_SMB0_RX 0x25 +#define JZ4780_DMA_SMB1_TX 0x26 +#define JZ4780_DMA_SMB1_RX 0x27 +#define JZ4780_DMA_SMB2_TX 0x28 +#define JZ4780_DMA_SMB2_RX 0x29 +#define JZ4780_DMA_SMB3_TX 0x2a +#define JZ4780_DMA_SMB3_RX 0x2b +#define JZ4780_DMA_SMB4_TX 0x2c +#define JZ4780_DMA_SMB4_RX 0x2d +#define JZ4780_DMA_DES_TX 0x2e +#define JZ4780_DMA_DES_RX 0x2f + +#endif /* __DT_BINDINGS_DMA_JZ4780_DMA_H__ */ diff --git a/sys/gnu/dts/include/dt-bindings/net/rfkill-regulator.h b/sys/gnu/dts/include/dt-bindings/net/rfkill-regulator.h new file mode 100644 index 00000000000..ae32273c7ba --- /dev/null +++ b/sys/gnu/dts/include/dt-bindings/net/rfkill-regulator.h @@ -0,0 +1,23 @@ +/* + * This header provides macros for rfkill-regulator bindings. + * + * Copyright (C) 2014 Marek Belisko + * + * GPLv2 only + */ + +#ifndef __DT_BINDINGS_RFKILL_REGULATOR_H__ +#define __DT_BINDINGS_RFKILL_REGULATOR_H__ + + +#define RFKILL_TYPE_ALL (0) +#define RFKILL_TYPE_WLAN (1) +#define RFKILL_TYPE_BLUETOOTH (2) +#define RFKILL_TYPE_UWB (3) +#define RFKILL_TYPE_WIMAX (4) +#define RFKILL_TYPE_WWAN (5) +#define RFKILL_TYPE_GPS (6) +#define RFKILL_TYPE_FM (7) +#define RFKILL_TYPE_NFC (8) + +#endif /* __DT_BINDINGS_RFKILL_REGULATOR_H__ */ diff --git a/sys/gnu/dts/mips/ingenic/ci20.dts b/sys/gnu/dts/mips/ingenic/ci20.dts new file mode 100644 index 00000000000..456c8b83f0d --- /dev/null +++ b/sys/gnu/dts/mips/ingenic/ci20.dts @@ -0,0 +1,395 @@ +/dts-v1/; +#include +#include +#include "jz4780.dtsi" + +/ { + compatible = "imgtec,ci20", "ingenic,jz4780"; + + aliases { + serial0 = &uart0; + serial1 = &uart1; + serial3 = &uart3; + serial4 = &uart4; + }; + + chosen { + stdout-path = &uart4; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x10000000 + 0x30000000 0x30000000>; + }; + + audio: audio-ci20 { + compatible = "ingenic,ci20-audio"; + ingenic,i2s-controller = <&i2s>; + ingenic,codec = <&codec>; + }; + + eth0_power: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "eth0_power"; + gpio = <&gpb 25 GPIO_ACTIVE_LOW>; + enable-active-high; + }; + + hdmi_power: fixedregulator@1 { + compatible = "regulator-fixed"; + regulator-name = "hdmi_power"; + gpio = <&gpa 25 GPIO_ACTIVE_LOW>; + enable-active-high; + regulator-always-on; + }; + + wifi_power: fixedregulator@2 { + compatible = "regulator-fixed"; + regulator-name = "wifi_power_gpio"; + gpio = <&gpb 19 0>; + enable-active-high; + + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + }; + + /* HACK: Keeping wifi reset high. No simple driver fix */ + wifi_reset: fixedregulator@3 { + compatible = "regulator-fixed"; + regulator-name = "wifi_reset_gpio"; + gpio = <&gpf 7 0>; + enable-active-high; + regulator-always-on; + }; + + /* HACK: Keeping BT reset high. No simple driver fix */ + bt_reset: fixedregulator@4 { + compatible = "regulator-fixed"; + regulator-name = "bt_reset_gpio"; + gpio = <&gpf 8 0>; + enable-active-high; + }; + + /* HACK: Keeping BT_reg_on high. No simple driver fix */ + bt_reg_on: fixedregulator@5 { + compatible = "regulator-fixed"; + regulator-name = "bt_reg_on_gpio"; + gpio = <&gpf 4 0>; + enable-active-high; + regulator-always-on; + }; + + /* HACK: Keeping BT wake high. No simple driver fix */ + bt_wake: fixedregulator@6 { + compatible = "regulator-fixed"; + regulator-name = "bt_wake_gpio"; + gpio = <&gpf 5 0>; + enable-active-high; + regulator-always-on; + }; + + ir: ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpe 3 GPIO_ACTIVE_LOW>; + }; + + bt-rfkill { + compatible = "rfkill-regulator"; + label = "bt-reset"; + type = ; + vrfkill-supply = <&bt_reset>; + }; + + leds { + compatible = "gpio-leds"; + led3 { + gpios = <&gpc 0 0>; + linux,default-trigger = "cpu0"; + }; + led2 { + gpios = <&gpc 1 0>; + linux,default-trigger = "cpu1"; + }; + led1 { + gpios = <&gpc 2 0>; + linux,default-trigger = "nand-disk"; + }; + led0 { + gpios = <&gpc 3 0>; + linux,default-trigger = "none"; + }; + }; +}; + +&ext { + clock-frequency = <48000000>; +}; + +&msc0 { + bus-width = <4>; + max-frequency = <50000000>; + cd-gpios = <&gpf 20 GPIO_ACTIVE_LOW>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_msc0_pe>; +}; + +&msc1 { + bus-width = <4>; + max-frequency = <24000000>; + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_msc1_pd>; + vmmc-supply = <&wifi_power>; +}; + +&ehci { + ingenic,vbus-gpio = <&gpf 15 0>; +}; + +&ohci { + ingenic,vbus-gpio = <&gpf 15 0>; +}; + +&nemc { + /* + * Only CLE/ALE are needed for the devices that are connected, rather + * than the full address line set. + */ + pinctrl-names = "default"; + pinctrl-0 = <&pins_nemc_data + &pins_nemc_cle_ale + &pins_nemc_rd_we + &pins_nemc_frd_fwe>; + + nand: nand@1 { + compatible = "ingenic,jz4780-nand"; + reg = <1 0 0x1000000>; + + ingenic,nemc-tAS = <10>; + ingenic,nemc-tAH = <5>; + ingenic,nemc-tBP = <10>; + ingenic,nemc-tAW = <15>; + ingenic,nemc-tSTRV = <100>; + + ingenic,bch-device = <&bch>; + ingenic,ecc-size = <1024>; + ingenic,ecc-strength = <24>; + + ingenic,busy-gpio = <&gpa 20 GPIO_ACTIVE_LOW>; + ingenic,wp-gpio = <&gpf 22 GPIO_ACTIVE_LOW>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_nemc_cs1>; + + #address-cells = <2>; + #size-cells = <2>; + + partition@0 { + label = "u-boot-spl"; + reg = <0x0 0x0 0x0 0x800000>; + }; + + partition@0x800000 { + label = "u-boot"; + reg = <0x0 0x800000 0x0 0x200000>; + }; + + partition@0xa00000 { + label = "u-boot-env"; + reg = <0x0 0xa00000 0x0 0x200000>; + }; + + partition@0xc00000 { + label = "boot"; + reg = <0x0 0xc00000 0x0 0x4000000>; + }; + + partition@0x8c00000 { + label = "system"; + reg = <0x0 0x4c00000 0x1 0xfb400000>; + }; + }; + + dm9000@6 { + compatible = "davicom,dm9000"; + davicom,no-eeprom; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_nemc_cs6>; + + reg = <6 0x0 1 /* addr */ + 6 0x2 1>; /* data */ + + ingenic,nemc-tAS = <15>; + ingenic,nemc-tAH = <10>; + ingenic,nemc-tBP = <20>; + ingenic,nemc-tAW = <50>; + ingenic,nemc-tSTRV = <100>; + + reset-gpios = <&gpf 12 GPIO_ACTIVE_HIGH>; + vcc-supply = <ð0_power>; + + interrupt-parent = <&gpe>; + interrupts = <19 0x4>; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart0_data>; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart1_data>; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart2_dataplusflow>; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart3_data>; +}; + +&uart4 { + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart4_data>; +}; + +&i2c0 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pins_i2c0_data>; + + pmic: act8600@5a { + compatible = "active-semi,act8600"; + reg = <0x5a>; + + regulators { + vcore1v_reg: DCDC_REG1 { + regulator-name = "vcore1v2"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-always-on; + }; + + vddmem1v5_reg: DCDC_REG2 { + regulator-name = "vddmem1v5"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + }; + + vccio3v3_reg: DCDC_REG3 { + regulator-name = "vccio3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vcc2v5_reg: LDO_REG5 { + regulator-name = "vcc2.5"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-always-on; + }; + + vwifi_reg: LDO_REG6 { + regulator-name = "vwifi3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vcim2v8_reg: LDO_REG7 { + regulator-name = "vcim2v8"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + + vcim1v5_reg: LDO_REG8 { + regulator-name = "vcim1v5"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + }; + + /* Do not disable RTC as they connect to reset line */ + vrtc1v8_reg: LDO_REG9 { + regulator-name = "vrtc1v8"; + regulator-always-on; + }; + + vrtc1v1_reg: LDO_REG10 { + regulator-name = "vrtc1v2"; + regulator-always-on; + }; + }; + }; +}; + +&i2c1 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pins_i2c1_data>; +}; + +&i2c2 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pins_i2c2_data>; + + ov5640@0x3C { + compatible = "omnivision,ov5640"; + reg = <0x3C>; + + core-supply = <&vcim1v5_reg>; + analog-supply = <&vcim2v8_reg>; + + gpio-enable = <&gpb 18 0>; + gpio-reset = <&gpb 26 0>; + + remote = <&cim>; + port { + ov5640_1: endpoint { + bus-width = <8>; + remote-endpoint = <&cim>; + }; + }; + }; +}; + +&i2c3 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pins_i2c3_data>; +}; + +&i2c4 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pins_i2c4_data_pf>; +}; + +&cim { + clock-frequency = <24000000>; + + port { + #address-cells = <1>; + #size-cells = <0>; + + /* Parallel bus endpoint */ + camera: endpoint@0 { + reg = <0>; /* Local endpoint # */ + remote-endpoint = <&ov5640_1>; + hsync-active = <1>; /* Active high */ + vsync-active = <1>; /* Active high */ + pclk-sample = <0>; /* Falling */ + }; + }; +}; diff --git a/sys/gnu/dts/mips/ingenic/jz4780.dtsi b/sys/gnu/dts/mips/ingenic/jz4780.dtsi new file mode 100644 index 00000000000..c53ee03f463 --- /dev/null +++ b/sys/gnu/dts/mips/ingenic/jz4780.dtsi @@ -0,0 +1,768 @@ +#include +#include + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "ingenic,jz4780"; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + compatible = "ingenic,xburst"; + reg = <0>; + }; + cpu1: cpu@1 { + compatible = "ingenic,xburst"; + reg = <1>; + clocks = <&cgu JZ4780_CLK_CORE1>; + }; + }; + + cpuintc: cpuintc@0 { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + compatible = "mti,cpu-interrupt-controller"; + }; + + intc: intc@10001000 { + compatible = "ingenic,jz4780-intc"; + reg = <0x10001000 0x50>; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-parent = <&cpuintc>; + interrupts = <2>; + }; + + ext: ext { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + rtc: rtc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; + + cgu: jz4780-cgu@10000000 { + compatible = "ingenic,jz4780-cgu"; + reg = <0x10000000 0x100>; + + clocks = <&ext>, <&rtc>; + clock-names = "ext", "rtc"; + + #clock-cells = <1>; + }; + + gpu: jz4780-sgx@13040000 { + compatible = "ingenic,jz4780-sgx"; + reg = <0x13040000 0x4000>; + + clocks = <&cgu JZ4780_CLK_GPU>; + clock-names = "gpu"; + + interrupt-parent = <&intc>; + interrupts = <63>; + }; + + apb { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <>; + + tcu@0x10002000 { + compatible = "ingenic,jz4780-tcu"; + reg = <0x10002000 0x140>; + + interrupt-parent = <&intc>; + interrupts = <27 26 25>; + }; + + watchdog: jz47xx-watchdog@0x10002000 { + compatible = "ingenic,jz4780-watchdog"; + reg = <0x10002000 0x100>; + + clocks = <&rtc>; + clock-names = "rtc"; + }; + + rtcdev: rtcdev@10003000 { + compatible = "ingenic,jz4780-rtc"; + reg = <0x10003000 0x4c>; + interrupt-parent = <&intc>; + interrupts = <32>; + }; + + i2s: i2s@10020000 { + compatible = "ingenic,jz4780-i2s"; + reg = <0x10020000 0x94>; + + clocks = <&cgu JZ4780_CLK_AIC>, <&cgu JZ4780_CLK_I2SPLL>; + clock-names = "aic", "i2s"; + + dmas = <&dma 0 JZ4780_DMA_I2S0_RX 0xffffffff>, <&dma JZ4780_DMA_I2S0_TX 0 0xffffffff>; + dma-names = "rx" , "tx"; + + }; + + codec: codec@100200a4 { + compatible = "ingenic,jz4780-codec"; + reg = <0x100200a4 0x8>; + + clocks = <&cgu JZ4780_CLK_I2SPLL>; + clock-names = "i2s"; + + }; + + pinctrl@0x10010000 { + compatible = "ingenic,jz4780-pinctrl"; + reg = <0x10010000 0x600>; + + gpa: gpa { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <17>; + + ingenic,pull-ups = <0x3fffffff>; + }; + + gpb: gpb { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <16>; + + ingenic,pull-downs = <0x000f0c03>; + ingenic,pull-ups = <0xfff0030c>; + }; + + gpc: gpc { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <15>; + + ingenic,pull-ups = <0xffffffff>; + }; + + gpd: gpd { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <14>; + + ingenic,pull-downs = <0x0000b000>; + ingenic,pull-ups = <0xffff4fff>; + }; + + gpe: gpe { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <13>; + + ingenic,pull-downs = <0x00000483>; + ingenic,pull-ups = <0xfffffb7c>; + }; + + gpf: gpf { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <12>; + + ingenic,pull-downs = <0x00580ff0>; + ingenic,pull-ups = <0xffa7f00f>; + }; + + pincfg_nobias: nobias { + bias-disable; + }; + + pincfg_pull_up: pull_up { + bias-pull-up; + }; + + pincfg_pull_down: pull_down { + bias-pull-down; + }; + + pinfunc_uart0: uart0 { + pins_uart0_data: uart0-data { + ingenic,pins = <&gpf 0 0 &pincfg_pull_up /* rxd */ + &gpf 3 0 &pincfg_nobias>; /* txd */ + }; + + pins_uart0_dataplusflow: uart0-dataplusflow { + ingenic,pins = <&gpf 0 0 &pincfg_pull_up /* rxd */ + &gpf 1 0 &pincfg_nobias /* cts */ + &gpf 2 0 &pincfg_nobias /* rts */ + &gpf 3 0 &pincfg_nobias>; /* txd */ + }; + }; + + pinfunc_uart1: uart1 { + pins_uart1_data: uart1-data { + ingenic,pins = <&gpd 26 0 &pincfg_pull_up /* rxd */ + &gpd 28 0 &pincfg_nobias>; /* txd */ + }; + + pins_uart1_dataplusflow: uart1-dataplusflow { + ingenic,pins = <&gpd 26 0 &pincfg_pull_up /* rxd */ + &gpd 27 0 &pincfg_nobias /* cts */ + &gpd 29 0 &pincfg_nobias /* rts */ + &gpd 28 0 &pincfg_nobias>; /* txd */ + }; + }; + + pinfunc_uart2: uart2 { + pins_uart2_data: uart2-data { + ingenic,pins = <&gpd 6 1 &pincfg_nobias /* rxd */ + &gpd 7 1 &pincfg_nobias>; /* txd */ + }; + + pins_uart2_dataplusflow: uart2-dataplusflow { + ingenic,pins = <&gpd 6 1 &pincfg_nobias /* rxd */ + &gpd 5 1 &pincfg_nobias /* cts */ + &gpd 4 1 &pincfg_nobias /* rts */ + &gpd 7 1 &pincfg_nobias>; /* txd */ + }; + }; + + pinfunc_uart3: uart3 { + pins_uart3_data: uart3-data { + ingenic,pins = <&gpd 12 0 &pincfg_pull_down /* rxd */ + &gpe 5 1 &pincfg_nobias>; /* txd */ + }; + + pins_uart3_dataplusflow: uart3-dataplusflow { + ingenic,pins = <&gpd 12 0 &pincfg_pull_down /* rxd */ + &gpe 5 1 &pincfg_nobias /* txd */ + &gpe 8 0 &pincfg_nobias /* cts */ + &gpe 9 0 &pincfg_nobias>; /* rts */ + }; + }; + + pinfunc_uart4: uart4 { + pins_uart4_data: uart4-data { + ingenic,pins = <&gpc 20 2 &pincfg_pull_up /* rxd */ + &gpc 10 2 &pincfg_nobias>; /* txd */ + }; + }; + + pinfunc_msc0: msc0 { + pins_msc0_pa: msc0-pa { + ingenic,pins = <&gpa 4 1 &pincfg_nobias /* d4 */ + &gpa 5 1 &pincfg_nobias /* d5 */ + &gpa 6 1 &pincfg_nobias /* d6 */ + &gpa 7 1 &pincfg_nobias /* d7 */ + &gpa 18 1 &pincfg_nobias /* clk */ + &gpa 19 1 &pincfg_nobias /* cmd */ + &gpa 20 1 &pincfg_nobias /* d0 */ + &gpa 21 1 &pincfg_nobias /* d1 */ + &gpa 22 1 &pincfg_nobias /* d2 */ + &gpa 23 1 &pincfg_nobias /* d3 */ + &gpa 24 1 &pincfg_nobias>; /* rst */ + }; + + pins_msc0_pe: msc0-pe { + ingenic,pins = <&gpe 20 0 &pincfg_nobias /* d0 */ + &gpe 21 0 &pincfg_nobias /* d1 */ + &gpe 22 0 &pincfg_nobias /* d2 */ + &gpe 23 0 &pincfg_nobias /* d3 */ + &gpe 28 0 &pincfg_nobias /* clk */ + &gpe 29 0 &pincfg_nobias>; /* cmd */ + }; + }; + + pinfunc_msc1: msc1 { + pins_msc1_pd: msc1-pd { + ingenic,pins = <&gpd 20 0 &pincfg_nobias /* d0 */ + &gpd 21 0 &pincfg_nobias /* d1 */ + &gpd 22 0 &pincfg_nobias /* d2 */ + &gpd 23 0 &pincfg_nobias /* d3 */ + &gpd 24 0 &pincfg_nobias /* clk */ + &gpd 25 0 &pincfg_nobias>; /* cmd */ + }; + + pins_msc1_pe: msc1-pe { + ingenic,pins = <&gpe 20 1 &pincfg_nobias /* d0 */ + &gpe 21 1 &pincfg_nobias /* d1 */ + &gpe 22 1 &pincfg_nobias /* d2 */ + &gpe 23 1 &pincfg_nobias /* d3 */ + &gpe 28 1 &pincfg_nobias /* clk */ + &gpe 29 1 &pincfg_nobias>; /* cmd */ + }; + }; + + pinfunc_nemc: nemc { + pins_nemc_data: nemc-data { + ingenic,pins = <&gpa 0 0 &pincfg_nobias /* sd0 */ + &gpa 1 0 &pincfg_nobias /* sd1 */ + &gpa 2 0 &pincfg_nobias /* sd2 */ + &gpa 3 0 &pincfg_nobias /* sd3 */ + &gpa 4 0 &pincfg_nobias /* sd4 */ + &gpa 5 0 &pincfg_nobias /* sd5 */ + &gpa 6 0 &pincfg_nobias /* sd6 */ + &gpa 7 0 &pincfg_nobias>; /* sd7 */ + }; + + pins_nemc_cle_ale: nemc-cle-ale { + ingenic,pins = <&gpb 0 0 &pincfg_nobias /* sa0_cl */ + &gpb 1 0 &pincfg_nobias>; /* sa1_al */ + }; + + pins_nemc_addr: nemc-addr { + ingenic,pins = <&gpb 0 0 &pincfg_nobias /* sa0_cl */ + &gpb 1 0 &pincfg_nobias /* sa1_al */ + &gpb 2 0 &pincfg_nobias /* sa2 */ + &gpb 3 0 &pincfg_nobias /* sa3 */ + &gpb 4 0 &pincfg_nobias /* sa4 */ + &gpb 5 0 &pincfg_nobias>; /* sa5 */ + }; + + pins_nemc_rd_we: nemc-rd-we { + ingenic,pins = <&gpa 16 0 &pincfg_nobias /* rd */ + &gpa 17 0 &pincfg_nobias>; /* we */ + }; + + pins_nemc_frd_fwe: nemc-frd-fwe { + ingenic,pins = <&gpa 18 0 &pincfg_nobias /* rd */ + &gpa 19 0 &pincfg_nobias>; /* we */ + }; + + pins_nemc_cs1: nemc-cs1 { + ingenic,pins = <&gpa 21 0 &pincfg_nobias>; /* cs1 */ + }; + + pins_nemc_cs6: nemc-cs6 { + ingenic,pins = <&gpa 26 0 &pincfg_nobias>; /* cs6 */ + }; + }; + + pinfunc_i2c0: i2c0 { + pins_i2c0_data: i2c0-data{ + ingenic,pins = <&gpd 30 0 &pincfg_nobias /* sda */ + &gpd 31 0 &pincfg_nobias>; /* sck */ + }; + }; + + pinfunc_i2c1: i2c1 { + pins_i2c1_data: i2c1-data{ + ingenic,pins = <&gpe 30 0 &pincfg_nobias /* sda */ + &gpe 31 0 &pincfg_nobias>; /* sck */ + }; + }; + + pinfunc_i2c2: i2c2 { + pins_i2c2_data: i2c2-data{ + ingenic,pins = <&gpf 16 2 &pincfg_nobias /* sda */ + &gpf 17 2 &pincfg_nobias>; /* sck */ + }; + }; + + pinfunc_i2c3: i2c3 { + pins_i2c3_data: i2c3-data{ + ingenic,pins = <&gpd 10 1 &pincfg_nobias /* sda */ + &gpd 11 1 &pincfg_nobias>; /* sck */ + }; + }; + + pinfunc_i2c4: i2c4 { + pins_i2c4_data: i2c4-data-pe{ + ingenic,pins = <&gpe 12 1 &pincfg_nobias /* sda */ + &gpe 13 1 &pincfg_nobias>; /* sck */ + }; + + pins_i2c4_data_pf: i2c4-data-pf{ + ingenic,pins = <&gpf 25 1 &pincfg_nobias /* hdmi_sda */ + &gpf 24 1 &pincfg_nobias>; /* hdmi_sck */ + }; + }; + + pinfunc_cim: cim { + pins_cim: cim-pb { + ingenic,pins = <&gpb 6 0 &pincfg_nobias + &gpb 7 0 &pincfg_nobias + &gpb 8 0 &pincfg_nobias + &gpb 9 0 &pincfg_nobias + &gpb 10 0 &pincfg_nobias + &gpb 11 0 &pincfg_nobias + &gpb 12 0 &pincfg_nobias + &gpb 13 0 &pincfg_nobias + &gpb 14 0 &pincfg_nobias + &gpb 15 0 &pincfg_nobias + &gpb 16 0 &pincfg_nobias + &gpb 17 0 &pincfg_nobias>; + }; + }; + }; + + spi_gpio { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + num-chipselects = <2>; + + gpio-miso = <&gpe 14 0>; + gpio-sck = <&gpe 15 0>; + gpio-mosi = <&gpe 17 0>; + cs-gpios = <&gpe 16 0 + &gpe 18 0>; + + spidev@0 { + compatible = "spidev"; + reg = <0>; + spi-max-frequency = <1000000>; + }; + }; + + uart0: serial@10030000 { + compatible = "ingenic,jz4780-uart"; + reg = <0x10030000 0x100>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <51>; + + clocks = <&ext>, <&cgu JZ4780_CLK_UART0>; + clock-names = "baud", "module"; + }; + + uart1: serial@10031000 { + compatible = "ingenic,jz4780-uart"; + reg = <0x10031000 0x100>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <50>; + + clocks = <&ext>, <&cgu JZ4780_CLK_UART1>; + clock-names = "baud", "module"; + }; + + uart2: serial@10032000 { + compatible = "ingenic,jz4780-uart"; + reg = <0x10032000 0x100>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <49>; + + clocks = <&ext>, <&cgu JZ4780_CLK_UART2>; + clock-names = "baud", "module"; + }; + + uart3: serial@10033000 { + compatible = "ingenic,jz4780-uart"; + reg = <0x10033000 0x100>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <48>; + + clocks = <&ext>, <&cgu JZ4780_CLK_UART3>; + clock-names = "baud", "module"; + }; + + uart4: serial@10034000 { + compatible = "ingenic,jz4780-uart"; + reg = <0x10034000 0x100>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <34>; + + clocks = <&ext>, <&cgu JZ4780_CLK_UART4>; + clock-names = "baud", "module"; + }; + + i2c0: i2c0@0x10050000 { + compatible = "ingenic,jz4780-i2c"; + reg = <0x10050000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <60>; + + clocks = <&cgu JZ4780_CLK_SMB0>; + + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c1: i2c1@0x10051000 { + compatible = "ingenic,jz4780-i2c"; + reg = <0x10051000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <59>; + + clocks = <&cgu JZ4780_CLK_SMB1>; + + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c2: i2c2@0x10052000 { + compatible = "ingenic,jz4780-i2c"; + reg = <0x10052000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <58>; + + clocks = <&cgu JZ4780_CLK_SMB2>; + + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c3: i2c3@0x10053000 { + compatible = "ingenic,jz4780-i2c"; + reg = <0x10053000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <57>; + + clocks = <&cgu JZ4780_CLK_SMB3>; + + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c4: i2c4@0x10054000 { + compatible = "ingenic,jz4780-i2c"; + reg = <0x10054000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <56>; + + clocks = <&cgu JZ4780_CLK_SMB4>; + + #address-cells = <1>; + #size-cells = <0>; + }; + + lpcr: lcr@0x10000004 { + compatible = "ingenic,jz4780-lcr"; + reg = <0x10000004 0x4>; + + regulators { + vpu_power: VPU { + }; + gpu_power: GPU { + }; + gps_power: GPS { + }; + }; + }; + + adc@0x10070000 { + compatible = "ingenic,jz4780-adc"; + reg = <0x10070000 0x30>; + + interrupt-parent = <&intc>; + interrupts = <18>; + + clocks = <&cgu JZ4780_CLK_SADC>; + clock-names = "adc"; + }; + }; + + ahb2 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <>; + + + lcd: jz4780-lcdk@0x13050000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd_clk", "lcd_pixclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + + hdmi = <&hdmi>; + ddc = <&i2c4>; + }; + + cim: jz4780-cim@0x13060000 { + compatible = "ingenic,jz4780-cim"; + reg = <0x13060000 0x68>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <30>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_cim>; + + clocks = <&cgu JZ4780_CLK_CIM>, <&cgu JZ4780_CLK_CIMMCLK>; + clock-names = "cim", "module"; + }; + + hdmi: jz4780-hdmi3@0x10180000 { + compatible = "synopsys,dwc-hdmi"; + reg = <0x10180000 0x8000>; + reg-shift = <2>; + + clocks = <&cgu JZ4780_CLK_HDMI>, <&cgu JZ4780_CLK_AHB0>; + clock-names = "hdmi" , "ahb"; + + clock-frequency = <27000000>; + + interrupt-parent = <&intc>; + interrupts = <3>; + + ddc = <&i2c4>; + }; + + + nemc: nemc@13410000 { + compatible = "ingenic,jz4780-nemc"; + reg = <0x13410000 0x10000>; + #address-cells = <2>; + #size-cells = <1>; + ranges = <1 0 0x1b000000 0x1000000 + 2 0 0x1a000000 0x1000000 + 3 0 0x19000000 0x1000000 + 4 0 0x18000000 0x1000000 + 5 0 0x17000000 0x1000000 + 6 0 0x16000000 0x1000000>; + + clocks = <&cgu JZ4780_CLK_NEMC>; + }; + + efuse: efuse@134100D0 { + compatible = "ingenic,jz4780-efuse"; + reg = <0x134100D0 0xFF>; + + clocks = <&cgu JZ4780_CLK_AHB2>; + clock-names = "bus_clk"; + }; + + dma: dma@13420000 { + compatible = "ingenic,jz4780-dma"; + reg = <0x13420000 0x10000>; + + interrupt-parent = <&intc>; + interrupts = <10>; + + clocks = <&cgu JZ4780_CLK_PDMA>; + + #dma-cells = <3>; + }; + + msc0: msc@13450000 { + compatible = "ingenic,jz4780-mmc"; + reg = <0x13450000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <37>; + + clocks = <&cgu JZ4780_CLK_MSC0>; + clock-names = "mmc"; + + cap-sd-highspeed; + cap-mmc-highspeed; + cap-sdio-irq; + + dmas = <&dma JZ4780_DMA_MSC0_TX JZ4780_DMA_MSC0_RX 0xffffffff>; + dma-names = "rx-tx"; + }; + + msc1: msc@13460000 { + compatible = "ingenic,jz4780-mmc"; + reg = <0x13460000 0x1000>; + + status = "disabled"; + + interrupt-parent = <&intc>; + interrupts = <36>; + + clocks = <&cgu JZ4780_CLK_MSC1>; + clock-names = "mmc"; + + cap-sd-highspeed; + cap-mmc-highspeed; + cap-sdio-irq; + + dmas = <&dma JZ4780_DMA_MSC1_TX JZ4780_DMA_MSC1_RX 0xffffffff>; + dma-names = "rx-tx"; + }; + + ehci: jz4780-ehci@0x13490000 { + compatible = "ingenic,jz4780-ehci"; + reg = <0x13490000 0x10000>; + + interrupt-parent = <&intc>; + interrupts = <20>; + + clocks = <&cgu JZ4780_CLK_UHC>; + }; + + ohci: jz4780-ohci@0x134a0000 { + compatible = "ingenic,jz4780-ohci"; + reg = <0x134a0000 0x10000>; + + interrupt-parent = <&intc>; + interrupts = <5>; + + clocks = <&cgu JZ4780_CLK_UHC>; + clock-names = "uhc"; + }; + + bch: bch@134d0000 { + compatible = "ingenic,jz4780-bch"; + reg = <0x134d0000 0x10000>; + + clocks = <&cgu JZ4780_CLK_BCH>; + }; + + otg: jz4780-otg@0x13500000 { + compatible = "ingenic,jz4780-otg"; + reg = <0x13500000 0x40000>; + + interrupt-parent = <&intc>; + interrupts = <21>; + + clocks = <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_OTG1>; + clock-names = "otg_phy", "otg1"; + }; + }; +}; From f3b37a1f47825ce9e61008752015be6bf856ebb7 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Thu, 17 Nov 2016 11:48:07 +0000 Subject: [PATCH 136/204] Add driver for DM9000 Ethernet MAC Controller. This device found in the Ingenic jz4780 SoC. Submitted by: kan Sponsored by: DARPA, AFRL --- sys/conf/files | 1 + sys/dev/dme/if_dme.c | 1070 +++++++++++++++++++++++++++++++++++++++ sys/dev/dme/if_dmereg.h | 137 +++++ sys/dev/dme/if_dmevar.h | 39 ++ 4 files changed, 1247 insertions(+) create mode 100644 sys/dev/dme/if_dme.c create mode 100644 sys/dev/dme/if_dmereg.h create mode 100644 sys/dev/dme/if_dmevar.h diff --git a/sys/conf/files b/sys/conf/files index 07864e8ede9..07bbfb8c41c 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1402,6 +1402,7 @@ dev/dcons/dcons.c optional dcons dev/dcons/dcons_crom.c optional dcons_crom dev/dcons/dcons_os.c optional dcons dev/de/if_de.c optional de pci +dev/dme/if_dme.c optional dme dev/dpt/dpt_eisa.c optional dpt eisa dev/dpt/dpt_pci.c optional dpt pci dev/dpt/dpt_scsi.c optional dpt diff --git a/sys/dev/dme/if_dme.c b/sys/dev/dme/if_dme.c new file mode 100644 index 00000000000..48f1c89ef09 --- /dev/null +++ b/sys/dev/dme/if_dme.c @@ -0,0 +1,1070 @@ +/* + * Copyright (C) 2015 Alexander Kabaev + * Copyright (C) 2010 Andrew Turner + * 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. + */ + +/* + * A driver for the DM9000 MAC + * + * TODO: + * Get the interrupt working + * Port to non-S3C2440 systems + * Test with 8 and 32 bit busses + * Test on a big endian machine + * Implement the rest of dme_detach + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "miibus_if.h" + +struct dme_softc { + struct ifnet *dme_ifp; + device_t dme_dev; + device_t dme_miibus; + bus_space_handle_t dme_handle; + bus_space_tag_t dme_tag; + int dme_rev; + int dme_bits; + struct resource *dme_res; + struct resource *dme_irq; + void *dme_intrhand; + struct mtx dme_mtx; + struct callout dme_tick_ch; + struct gpiobus_pin *gpio_rset; + uint32_t dme_ticks; + uint8_t dme_macaddr[ETHER_ADDR_LEN]; + regulator_t dme_vcc_regulator; + uint8_t dme_txbusy: 1; + uint8_t dme_txready: 1; + uint16_t dme_txlen; +}; + +#define DME_CHIP_DM9000 0x00 +#define DME_CHIP_DM9000A 0x19 +#define DME_CHIP_DM9000B 0x1a + +#define DME_INT_PHY 1 + +static int dme_probe(device_t); +static int dme_attach(device_t); +static int dme_detach(device_t); + +static void dme_intr(void *arg); +static void dme_init_locked(struct dme_softc *); + +static void dme_prepare(struct dme_softc *); +static void dme_transmit(struct dme_softc *); + +static int dme_miibus_writereg(device_t dev, int phy, int reg, int data); +static int dme_miibus_readreg(device_t dev, int phy, int reg); + +/* The bit on the address bus attached to the CMD pin */ +#define BASE_ADDR 0x000 +#define CMD_ADDR BASE_ADDR +#define DATA_BIT 1 +#define DATA_ADDR 0x002 + +#undef DME_TRACE + +#ifdef DME_TRACE +#define DTR3 TR3 +#define DTR4 TR4 +#else +#define NOTR(args...) (void)0 +#define DTR3 NOTR +#define DTR4 NOTR +#endif + +static uint8_t +dme_read_reg(struct dme_softc *sc, uint8_t reg) +{ + + /* Send the register to read from */ + bus_space_write_1(sc->dme_tag, sc->dme_handle, CMD_ADDR, reg); + bus_space_barrier(sc->dme_tag, sc->dme_handle, CMD_ADDR, 1, + BUS_SPACE_BARRIER_WRITE); + + /* Get the value of the register */ + return bus_space_read_1(sc->dme_tag, sc->dme_handle, DATA_ADDR); +} + +static void +dme_write_reg(struct dme_softc *sc, uint8_t reg, uint8_t value) +{ + + /* Send the register to write to */ + bus_space_write_1(sc->dme_tag, sc->dme_handle, CMD_ADDR, reg); + bus_space_barrier(sc->dme_tag, sc->dme_handle, CMD_ADDR, 1, + BUS_SPACE_BARRIER_WRITE); + + /* Write the value to the register */ + bus_space_write_1(sc->dme_tag, sc->dme_handle, DATA_ADDR, value); + bus_space_barrier(sc->dme_tag, sc->dme_handle, DATA_ADDR, 1, + BUS_SPACE_BARRIER_WRITE); +} + +static void +dme_reset(struct dme_softc *sc) +{ + u_int ncr; + + /* Send a soft reset #1 */ + dme_write_reg(sc, DME_NCR, NCR_RST | NCR_LBK_MAC); + DELAY(100); /* Wait for the MAC to reset */ + ncr = dme_read_reg(sc, DME_NCR); + if (ncr & NCR_RST) + device_printf(sc->dme_dev, "device did not complete first reset\n"); + + /* Send a soft reset #2 per Application Notes v1.22 */ + dme_write_reg(sc, DME_NCR, 0); + dme_write_reg(sc, DME_NCR, NCR_RST | NCR_LBK_MAC); + DELAY(100); /* Wait for the MAC to reset */ + ncr = dme_read_reg(sc, DME_NCR); + if (ncr & NCR_RST) + device_printf(sc->dme_dev, "device did not complete second reset\n"); + + /* Reset trasmit state */ + sc->dme_txbusy = 0; + sc->dme_txready = 0; + + DTR3("dme_reset, flags %#x busy %d ready %d", + sc->dme_ifp ? sc->dme_ifp->if_drv_flags : 0, + sc->dme_txbusy, sc->dme_txready); +} + +/* + * Parse string MAC address into usable form + */ +static int +dme_parse_macaddr(const char *str, uint8_t *mac) +{ + int count, i; + unsigned int amac[ETHER_ADDR_LEN]; /* Aligned version */ + + count = sscanf(str, "%x%*c%x%*c%x%*c%x%*c%x%*c%x", + &amac[0], &amac[1], &amac[2], + &amac[3], &amac[4], &amac[5]); + if (count < ETHER_ADDR_LEN) { + memset(mac, 0, ETHER_ADDR_LEN); + return (1); + } + + /* Copy aligned to result */ + for (i = 0; i < ETHER_ADDR_LEN; i ++) + mac[i] = (amac[i] & 0xff); + + return (0); +} + +/* + * Try to determine our own MAC address + */ +static void +dme_get_macaddr(struct dme_softc *sc) +{ + char devid_str[32]; + char *var; + int i; + + /* Cannot use resource_string_value with static hints mode */ + snprintf(devid_str, 32, "hint.%s.%d.macaddr", + device_get_name(sc->dme_dev), + device_get_unit(sc->dme_dev)); + + /* Try resource hints */ + if ((var = kern_getenv(devid_str)) != NULL) { + if (!dme_parse_macaddr(var, sc->dme_macaddr)) { + device_printf(sc->dme_dev, "MAC address: %s (hints)\n", var); + return; + } + } + + /* + * Try to read MAC address from the device, in case U-Boot has + * pre-programmed one for us. + */ + for (i = 0; i < ETHER_ADDR_LEN; i++) + sc->dme_macaddr[i] = dme_read_reg(sc, DME_PAR(i)); + + device_printf(sc->dme_dev, "MAC address %6D (existing)\n", + sc->dme_macaddr, ":"); +} + +static void +dme_config(struct dme_softc *sc) +{ + int i; + + /* Mask all interrupts and reset receive pointer */ + dme_write_reg(sc, DME_IMR, IMR_PAR); + + /* Disable GPIO0 to enable the internal PHY */ + dme_write_reg(sc, DME_GPCR, 1); + dme_write_reg(sc, DME_GPR, 0); + +#if 0 + /* + * Supposedly requires special initialization for DSP PHYs + * used by DM9000B. Maybe belongs in dedicated PHY driver? + */ + if (sc->dme_rev == DME_CHIP_DM9000B) { + dme_miibus_writereg(sc->dme_dev, DME_INT_PHY, MII_BMCR, + BMCR_RESET); + dme_miibus_writereg(sc->dme_dev, DME_INT_PHY, MII_DME_DSPCR, + DSPCR_INIT); + /* Wait 100ms for it to complete. */ + for (i = 0; i < 100; i++) { + int reg; + + reg = dme_miibus_readreg(sc->dme_dev, DME_INT_PHY, MII_BMCR); + if ((reg & BMCR_RESET) == 0) + break; + DELAY(1000); + } + } +#endif + + /* Select the internal PHY and normal loopback */ + dme_write_reg(sc, DME_NCR, NCR_LBK_NORMAL); + /* Clear any TX requests */ + dme_write_reg(sc, DME_TCR, 0); + /* Setup backpressure thresholds to 4k and 600us */ + dme_write_reg(sc, DME_BPTR, BPTR_BPHW(3) | BPTR_JPT(0x0f)); + /* Setup flow control */ + dme_write_reg(sc, DME_FCTR, FCTR_HWOT(0x3) | FCTR_LWOT(0x08)); + /* Enable flow control */ + dme_write_reg(sc, DME_FCR, 0xff); + /* Clear special modes */ + dme_write_reg(sc, DME_SMCR, 0); + /* Clear TX status */ + dme_write_reg(sc, DME_NSR, NSR_WAKEST | NSR_TX2END | NSR_TX1END); + /* Clear interrrupts */ + dme_write_reg(sc, DME_ISR, 0xff); + /* Set multicast address filter */ + for (i = 0; i < 8; i++) + dme_write_reg(sc, DME_MAR(i), 0xff); + /* Set the MAC address */ + for (i = 0; i < ETHER_ADDR_LEN; i++) + dme_write_reg(sc, DME_PAR(i), sc->dme_macaddr[i]); + /* Enable the RX buffer */ + dme_write_reg(sc, DME_RCR, RCR_DIS_LONG | RCR_DIS_CRC | RCR_RXEN); + + /* Enable interrupts we care about */ + dme_write_reg(sc, DME_IMR, IMR_PAR | IMR_PRI | IMR_PTI); +} + +void +dme_prepare(struct dme_softc *sc) +{ + struct ifnet *ifp; + struct mbuf *m, *mp; + uint16_t total_len, len; + + DME_ASSERT_LOCKED(sc); + + KASSERT(sc->dme_txready == 0, + ("dme_prepare: called with txready set\n")); + + ifp = sc->dme_ifp; + IFQ_DEQUEUE(&ifp->if_snd, m); + if (m == NULL) { + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + DTR3("dme_prepare none, flags %#x busy %d ready %d", + sc->dme_ifp->if_drv_flags, sc->dme_txbusy, sc->dme_txready); + return; /* Nothing to transmit */ + } + + /* Element has now been removed from the queue, so we better send it */ + BPF_MTAP(ifp, m); + + /* Setup the controller to accept the writes */ + bus_space_write_1(sc->dme_tag, sc->dme_handle, CMD_ADDR, DME_MWCMD); + + /* + * TODO: Fix the case where an mbuf is + * not a multiple of the write size. + */ + total_len = 0; + for (mp = m; mp != NULL; mp = mp->m_next) { + len = mp->m_len; + + /* Ignore empty parts */ + if (len == 0) + continue; + + total_len += len; + +#if 0 + bus_space_write_multi_2(sc->dme_tag, sc->dme_handle, + DATA_ADDR, mtod(mp, uint16_t *), (len + 1) / 2); +#else + bus_space_write_multi_1(sc->dme_tag, sc->dme_handle, + DATA_ADDR, mtod(mp, uint8_t *), len); +#endif + } + + if (total_len % (sc->dme_bits >> 3) != 0) + panic("dme_prepare: length is not compatible with IO_MODE"); + + sc->dme_txlen = total_len; + sc->dme_txready = 1; + DTR3("dme_prepare done, flags %#x busy %d ready %d", + sc->dme_ifp->if_drv_flags, sc->dme_txbusy, sc->dme_txready); + + m_freem(m); +} + +void +dme_transmit(struct dme_softc *sc) +{ + + DME_ASSERT_LOCKED(sc); + KASSERT(sc->dme_txready, ("transmit without txready")); + + dme_write_reg(sc, DME_TXPLL, sc->dme_txlen & 0xff); + dme_write_reg(sc, DME_TXPLH, (sc->dme_txlen >> 8) & 0xff ); + + /* Request to send the packet */ + dme_read_reg(sc, DME_ISR); + + dme_write_reg(sc, DME_TCR, TCR_TXREQ); + + sc->dme_txready = 0; + sc->dme_txbusy = 1; + DTR3("dme_transmit done, flags %#x busy %d ready %d", + sc->dme_ifp->if_drv_flags, sc->dme_txbusy, sc->dme_txready); +} + + +static void +dme_start_locked(struct ifnet *ifp) +{ + struct dme_softc *sc; + + sc = ifp->if_softc; + DME_ASSERT_LOCKED(sc); + + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) + return; + + DTR3("dme_start, flags %#x busy %d ready %d", + sc->dme_ifp->if_drv_flags, sc->dme_txbusy, sc->dme_txready); + KASSERT(sc->dme_txbusy == 0 || sc->dme_txready == 0, + ("dme: send without empty queue\n")); + + dme_prepare(sc); + + if (sc->dme_txbusy == 0) { + /* We are ready to transmit right away */ + dme_transmit(sc); + dme_prepare(sc); /* Prepare next one */ + } + /* + * We need to wait until the current packet has + * been transmitted. + */ + if (sc->dme_txready != 0) + ifp->if_drv_flags |= IFF_DRV_OACTIVE; +} + +static void +dme_start(struct ifnet *ifp) +{ + struct dme_softc *sc; + + sc = ifp->if_softc; + DME_LOCK(sc); + dme_start_locked(ifp); + DME_UNLOCK(sc); +} + +static void +dme_stop(struct dme_softc *sc) +{ + struct ifnet *ifp; + + DME_ASSERT_LOCKED(sc); + /* Disable receiver */ + dme_write_reg(sc, DME_RCR, 0x00); + /* Mask interrupts */ + dme_write_reg(sc, DME_IMR, 0x00); + /* Stop poll */ + callout_stop(&sc->dme_tick_ch); + + ifp = sc->dme_ifp; + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + + DTR3("dme_stop, flags %#x busy %d ready %d", + sc->dme_ifp->if_drv_flags, sc->dme_txbusy, sc->dme_txready); + sc->dme_txbusy = 0; + sc->dme_txready = 0; +} + +static int +dme_rxeof(struct dme_softc *sc) +{ + struct ifnet *ifp; + struct mbuf *m; + int len, i; + + DME_ASSERT_LOCKED(sc); + + ifp = sc->dme_ifp; + + /* Read the first byte to check it correct */ + (void)dme_read_reg(sc, DME_MRCMDX); + i = bus_space_read_1(sc->dme_tag, sc->dme_handle, DATA_ADDR); + switch(bus_space_read_1(sc->dme_tag, sc->dme_handle, DATA_ADDR)) { + case 1: + /* Correct value */ + break; + case 0: + return 1; + default: + /* Error */ + return -1; + } + + i = dme_read_reg(sc, DME_MRRL); + i |= dme_read_reg(sc, DME_MRRH) << 8; + + len = dme_read_reg(sc, DME_ROCR); + + bus_space_write_1(sc->dme_tag, sc->dme_handle, CMD_ADDR, DME_MRCMD); + len = 0; + switch(sc->dme_bits) { + case 8: + i = bus_space_read_1(sc->dme_tag, sc->dme_handle, DATA_ADDR); + i <<= 8; + i |= bus_space_read_1(sc->dme_tag, sc->dme_handle, DATA_ADDR); + + len = bus_space_read_1(sc->dme_tag, sc->dme_handle, DATA_ADDR); + len |= bus_space_read_1(sc->dme_tag, sc->dme_handle, + DATA_ADDR) << 8; + break; + case 16: + bus_space_read_2(sc->dme_tag, sc->dme_handle, DATA_ADDR); + len = bus_space_read_2(sc->dme_tag, sc->dme_handle, DATA_ADDR); + break; + case 32: + { + uint32_t reg; + + reg = bus_space_read_4(sc->dme_tag, sc->dme_handle, DATA_ADDR); + len = reg & 0xFFFF; + break; + } + } + + MGETHDR(m, M_NOWAIT, MT_DATA); + if (m == NULL) + return -1; + + if (len > MHLEN - ETHER_ALIGN) { + MCLGET(m, M_NOWAIT); + if (!(m->m_flags & M_EXT)) { + m_freem(m); + return -1; + } + } + + m->m_pkthdr.rcvif = ifp; + m->m_len = m->m_pkthdr.len = len; + m_adj(m, ETHER_ALIGN); + + /* Read the data */ +#if 0 + bus_space_read_multi_2(sc->dme_tag, sc->dme_handle, DATA_ADDR, + mtod(m, uint16_t *), (len + 1) / 2); +#else + bus_space_read_multi_1(sc->dme_tag, sc->dme_handle, DATA_ADDR, + mtod(m, uint8_t *), len); +#endif + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + DME_UNLOCK(sc); + (*ifp->if_input)(ifp, m); + DME_LOCK(sc); + + return 0; +} + +static void +dme_tick(void *arg) +{ + struct dme_softc *sc; + struct mii_data *mii; + + sc = (struct dme_softc *)arg; + + /* Probably too frequent? */ + mii = device_get_softc(sc->dme_miibus); + mii_tick(mii); + + callout_reset(&sc->dme_tick_ch, hz, dme_tick, sc); +} + +static void +dme_intr(void *arg) +{ + struct dme_softc *sc; + uint32_t intr_status; + + sc = (struct dme_softc *)arg; + + DME_LOCK(sc); + + intr_status = dme_read_reg(sc, DME_ISR); + dme_write_reg(sc, DME_ISR, intr_status); + + DTR4("dme_intr flags %#x busy %d ready %d intr %#x", + sc->dme_ifp->if_drv_flags, sc->dme_txbusy, + sc->dme_txready, intr_status); + + if (intr_status & ISR_PT) { + uint8_t nsr, tx_status; + + sc->dme_txbusy = 0; + + nsr = dme_read_reg(sc, DME_NSR); + + if (nsr & NSR_TX1END) + tx_status = dme_read_reg(sc, DME_TSR1); + else if (nsr & NSR_TX2END) + tx_status = dme_read_reg(sc, DME_TSR2); + else + tx_status = 1; + + DTR4("dme_intr flags %#x busy %d ready %d nsr %#x", + sc->dme_ifp->if_drv_flags, sc->dme_txbusy, + sc->dme_txready, nsr); + + /* Prepare packet to send if none is currently pending */ + if (sc->dme_txready == 0) + dme_prepare(sc); + /* Send the packet out of one is waiting for transmit */ + if (sc->dme_txready != 0) { + /* Initiate transmission of the prepared packet */ + dme_transmit(sc); + /* Prepare next packet to send */ + dme_prepare(sc); + /* + * We need to wait until the current packet has + * been transmitted. + */ + if (sc->dme_txready != 0) + sc->dme_ifp->if_drv_flags |= IFF_DRV_OACTIVE; + } + } + + if (intr_status & ISR_PR) { + /* Read the packets off the device */ + while (dme_rxeof(sc) == 0) + continue; + } + DME_UNLOCK(sc); +} + +static void +dme_setmode(struct dme_softc *sc) +{ +} + +static int +dme_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +{ + struct dme_softc *sc; + struct mii_data *mii; + struct ifreq *ifr; + int error = 0; + + sc = ifp->if_softc; + ifr = (struct ifreq *)data; + + switch (command) { + case SIOCSIFFLAGS: + /* + * Switch interface state between "running" and + * "stopped", reflecting the UP flag. + */ + DME_LOCK(sc); + if (ifp->if_flags & IFF_UP) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + dme_init_locked(sc); + } + } else { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + dme_stop(sc); + } + } + dme_setmode(sc); + DME_UNLOCK(sc); + break; + case SIOCGIFMEDIA: + case SIOCSIFMEDIA: + mii = device_get_softc(sc->dme_miibus); + error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); + break; + default: + error = ether_ioctl(ifp, command, data); + break; + } + return (error); +} + +static void dme_init_locked(struct dme_softc *sc) +{ + struct ifnet *ifp = sc->dme_ifp; + + DME_ASSERT_LOCKED(sc); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + + dme_reset(sc); + dme_config(sc); + + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + + callout_reset(&sc->dme_tick_ch, hz, dme_tick, sc); +} + +static void +dme_init(void *xcs) +{ + struct dme_softc *sc = xcs; + + DME_LOCK(sc); + dme_init_locked(sc); + DME_UNLOCK(sc); +} + +static int +dme_ifmedia_upd(struct ifnet *ifp) +{ + struct dme_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = device_get_softc(sc->dme_miibus); + + DME_LOCK(sc); + mii_mediachg(mii); + DME_UNLOCK(sc); + + return (0); +} + +static void +dme_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + struct dme_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + mii = device_get_softc(sc->dme_miibus); + + DME_LOCK(sc); + mii_pollstat(mii); + ifmr->ifm_active = mii->mii_media_active; + ifmr->ifm_status = mii->mii_media_status; + DME_UNLOCK(sc); +} + +static struct ofw_compat_data compat_data[] = { + { "davicom,dm9000", true }, + { NULL, false } +}; + +static int +dme_probe(device_t dev) +{ + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + device_set_desc(dev, "Davicom DM9000"); + return (0); +} + +static int +dme_attach(device_t dev) +{ + struct dme_softc *sc; + struct ifnet *ifp; + int error, rid; + uint32_t data; + + sc = device_get_softc(dev); + sc->dme_dev = dev; + + error = 0; + + mtx_init(&sc->dme_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF); + callout_init_mtx(&sc->dme_tick_ch, &sc->dme_mtx, 0); + + rid = 0; + sc->dme_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->dme_res == NULL) { + device_printf(dev, "unable to map memory\n"); + error = ENXIO; + goto fail; + } + + rid = 0; + sc->dme_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (sc->dme_irq == NULL) { + device_printf(dev, "unable to map memory\n"); + error = ENXIO; + goto fail; + } + /* + * Power the chip up, if necessary + */ + error = regulator_get_by_ofw_property(dev, 0, "vcc-supply", &sc->dme_vcc_regulator); + if (error == 0) { + error = regulator_enable(sc->dme_vcc_regulator); + if (error != 0) { + device_printf(dev, "unable to enable power supply\n"); + error = ENXIO; + goto fail; + } + } + + /* + * Delay a little. This seems required on rev-1 boards (green.) + */ + DELAY(100000); + + /* Bring controller out of reset */ + error = ofw_gpiobus_parse_gpios(dev, "reset-gpios", &sc->gpio_rset); + if (error > 1) { + device_printf(dev, "too many reset gpios\n"); + sc->gpio_rset = NULL; + error = ENXIO; + goto fail; + } + + if (sc->gpio_rset != NULL) { + error = GPIO_PIN_SET(sc->gpio_rset->dev, sc->gpio_rset->pin, 0); + if (error != 0) { + device_printf(dev, "Cannot configure GPIO pin %d on %s\n", + sc->gpio_rset->pin, device_get_nameunit(sc->gpio_rset->dev)); + goto fail; + } + + error = GPIO_PIN_SETFLAGS(sc->gpio_rset->dev, sc->gpio_rset->pin, + GPIO_PIN_OUTPUT); + if (error != 0) { + device_printf(dev, "Cannot configure GPIO pin %d on %s\n", + sc->gpio_rset->pin, device_get_nameunit(sc->gpio_rset->dev)); + goto fail; + } + + DELAY(2000); + + error = GPIO_PIN_SET(sc->gpio_rset->dev, sc->gpio_rset->pin, 1); + if (error != 0) { + device_printf(dev, "Cannot configure GPIO pin %d on %s\n", + sc->gpio_rset->pin, device_get_nameunit(sc->gpio_rset->dev)); + goto fail; + } + + DELAY(4000); + } else + device_printf(dev, "Unable to find reset GPIO\n"); + + sc->dme_tag = rman_get_bustag(sc->dme_res); + sc->dme_handle = rman_get_bushandle(sc->dme_res); + + /* Reset the chip as soon as possible */ + dme_reset(sc); + + /* Figure IO mode */ + switch((dme_read_reg(sc, DME_ISR) >> 6) & 0x03) { + case 0: + /* 16 bit */ + sc->dme_bits = 16; + break; + case 1: + /* 32 bit */ + sc->dme_bits = 32; + break; + case 2: + /* 8 bit */ + sc->dme_bits = 8; + break; + default: + /* reserved */ + device_printf(dev, "Unable to determine device mode\n"); + error = ENXIO; + goto fail; + } + + DELAY(100000); + + /* Read vendor and device id's */ + data = dme_read_reg(sc, DME_VIDH) << 8; + data |= dme_read_reg(sc, DME_VIDL); + device_printf(dev, "Vendor ID: 0x%04x\n", data); + + /* Read vendor and device id's */ + data = dme_read_reg(sc, DME_PIDH) << 8; + data |= dme_read_reg(sc, DME_PIDL); + device_printf(dev, "Product ID: 0x%04x\n", data); + + /* Chip revision */ + data = dme_read_reg(sc, DME_CHIPR); + device_printf(dev, "Revision: 0x%04x\n", data); + if (data != DME_CHIP_DM9000A && data != DME_CHIP_DM9000B) + data = DME_CHIP_DM9000; + sc->dme_rev = data; + + device_printf(dev, "using %d-bit IO mode\n", sc->dme_bits); + KASSERT(sc->dme_bits == 8, ("wrong io mode")); + + /* Try to figure our mac address */ + dme_get_macaddr(sc); + + /* Configure chip after reset */ + dme_config(sc); + + ifp = sc->dme_ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) { + device_printf(dev, "unable to allocate ifp\n"); + error = ENOSPC; + goto fail; + } + ifp->if_softc = sc; + + /* Setup MII */ + error = mii_attach(dev, &sc->dme_miibus, ifp, dme_ifmedia_upd, + dme_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); + /* This should never happen as the DM9000 contains it's own PHY */ + if (error != 0) { + device_printf(dev, "PHY probe failed\n"); + goto fail; + } + + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_start = dme_start; + ifp->if_ioctl = dme_ioctl; + ifp->if_init = dme_init; + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + + ether_ifattach(ifp, sc->dme_macaddr); + + error = bus_setup_intr(dev, sc->dme_irq, INTR_TYPE_NET | INTR_MPSAFE, + NULL, dme_intr, sc, &sc->dme_intrhand); + if (error) { + device_printf(dev, "couldn't set up irq\n"); + ether_ifdetach(ifp); + goto fail; + } +fail: + if (error != 0) + dme_detach(dev); + return (error); +} + +static int +dme_detach(device_t dev) +{ + struct dme_softc *sc; + struct ifnet *ifp; + + sc = device_get_softc(dev); + KASSERT(mtx_initialized(&sc->dme_mtx), ("dme mutex not initialized")); + + ifp = sc->dme_ifp; + + if (device_is_attached(dev)) { + DME_LOCK(sc); + dme_stop(sc); + DME_UNLOCK(sc); + ether_ifdetach(ifp); + callout_drain(&sc->dme_tick_ch); + } + + if (sc->dme_miibus) + device_delete_child(dev, sc->dme_miibus); + bus_generic_detach(dev); + + if (sc->dme_vcc_regulator != 0) + regulator_release(sc->dme_vcc_regulator); + if (sc->dme_intrhand) + bus_teardown_intr(dev, sc->dme_irq, sc->dme_intrhand); + if (sc->dme_irq) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->dme_irq); + if (sc->dme_res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->dme_res); + + if (ifp != NULL) + if_free(ifp); + + mtx_destroy(&sc->dme_mtx); + + return (0); +} + +/* + * The MII bus interface + */ +static int +dme_miibus_readreg(device_t dev, int phy, int reg) +{ + struct dme_softc *sc; + int i, rval; + + /* We have up to 4 PHY's */ + if (phy >= 4) + return (0); + + sc = device_get_softc(dev); + + /* Send the register to read to the phy and start the read */ + dme_write_reg(sc, DME_EPAR, (phy << 6) | reg); + dme_write_reg(sc, DME_EPCR, EPCR_EPOS | EPCR_ERPRR); + + /* Wait for the data to be read */ + for (i = 0; i < DME_TIMEOUT; i++) { + if ((dme_read_reg(sc, DME_EPCR) & EPCR_ERRE) == 0) + break; + DELAY(1); + } + + /* Clear the comand */ + dme_write_reg(sc, DME_EPCR, 0); + + if (i == DME_TIMEOUT) + return (0); + + rval = (dme_read_reg(sc, DME_EPDRH) << 8) | dme_read_reg(sc, DME_EPDRL); + return (rval); +} + +static int +dme_miibus_writereg(device_t dev, int phy, int reg, int data) +{ + struct dme_softc *sc; + int i; + + /* We have up to 4 PHY's */ + if (phy > 3) + return (0); + + sc = device_get_softc(dev); + + /* Send the register and data to write to the phy */ + dme_write_reg(sc, DME_EPAR, (phy << 6) | reg); + dme_write_reg(sc, DME_EPDRL, data & 0xFF); + dme_write_reg(sc, DME_EPDRH, (data >> 8) & 0xFF); + /* Start the write */ + dme_write_reg(sc, DME_EPCR, EPCR_EPOS | EPCR_ERPRW); + + /* Wait for the data to be written */ + for (i = 0; i < DME_TIMEOUT; i++) { + if ((dme_read_reg(sc, DME_EPCR) & EPCR_ERRE) == 0) + break; + DELAY(1); + } + + /* Clear the comand */ + dme_write_reg(sc, DME_EPCR, 0); + + return (0); +} + +static device_method_t dme_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, dme_probe), + DEVMETHOD(device_attach, dme_attach), + DEVMETHOD(device_detach, dme_detach), + + /* bus interface, for miibus */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + /* MII interface */ + DEVMETHOD(miibus_readreg, dme_miibus_readreg), + DEVMETHOD(miibus_writereg, dme_miibus_writereg), + + { 0, 0 } +}; + +static driver_t dme_driver = { + "dme", + dme_methods, + sizeof(struct dme_softc) +}; + +static devclass_t dme_devclass; + +MODULE_DEPEND(dme, ether, 1, 1, 1); +MODULE_DEPEND(dme, miibus, 1, 1, 1); +DRIVER_MODULE(dme, simplebus, dme_driver, dme_devclass, 0, 0); +DRIVER_MODULE(miibus, dme, miibus_driver, miibus_devclass, 0, 0); + diff --git a/sys/dev/dme/if_dmereg.h b/sys/dev/dme/if_dmereg.h new file mode 100644 index 00000000000..9a5456f7d67 --- /dev/null +++ b/sys/dev/dme/if_dmereg.h @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2010 Andrew Turner + * 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$ + */ + +#ifndef __IF_DMEREG_H__ +#define __IF_DMEREG_H__ + +/* + * DM9000 register definitions + */ +#define DME_NCR 0x00 +#define NCR_EXT_PHY (1<<7) +#define NCR_WAKEEN (1<<6) +#define NCR_FCOL (1<<4) +#define NCR_FDX (1<<3) +#define NCR_LBK_NORMAL (0<<1) +#define NCR_LBK_MAC (1<<1) +#define NCR_LBK_PHY (2<<1) +#define NCR_RST (1<<0) +#define DME_NSR 0x01 +#define NSR_SPEED (1<<7) +#define NSR_LINKST (1<<6) +#define NSR_WAKEST (1<<5) +#define NSR_TX2END (1<<3) +#define NSR_TX1END (1<<2) +#define NSR_RXOV (1<<1) +#define DME_TCR 0x02 +#define TCR_TJDIS (1<<6) +#define TCR_EXCECM (1<<5) +#define TCR_PAD_DIS2 (1<<4) +#define TCR_PAD_CRC2 (1<<3) +#define TCR_PAD_DIS1 (1<<2) +#define TCR_PAD_CRC1 (1<<1) +#define TCR_TXREQ (1<<0) +#define DME_TSR1 0x03 +#define DME_TSR2 0x04 +#define DME_RCR 0x05 +#define RCR_WTDIS (1<<6) +#define RCR_DIS_LONG (1<<5) +#define RCR_DIS_CRC (1<<4) +#define RCR_ALL (1<<3) +#define RCR_RUNT (1<<2) +#define RCR_PRMSC (1<<1) +#define RCR_RXEN (1<<0) +#define DME_RSR 0x06 +#define DME_ROCR 0x07 +#define DME_BPTR 0x08 +#define BPTR_BPHW(v) (((v) & 0x0f) << 4) +#define BPTR_JPT(v) (((v) & 0x0f) << 0) +#define DME_FCTR 0x09 +#define FCTR_HWOT(v) (((v) & 0x0f) << 4) +#define FCTR_LWOT(v) (((v) & 0x0f) << 0) +#define DME_FCR 0x0A +#define DME_EPCR 0x0B +#define EPCR_REEP (1<<5) +#define EPCR_WEP (1<<4) +#define EPCR_EPOS (1<<3) +#define EPCR_ERPRR (1<<2) +#define EPCR_ERPRW (1<<1) +#define EPCR_ERRE (1<<0) +#define DME_EPAR 0x0C +#define DME_EPDRL 0x0D +#define DME_EPDRH 0x0E +#define DME_WCR 0x0F +#define DME_PAR_BASE 0x10 +#define DME_PAR(n) (DME_PAR_BASE + n) +#define DME_MAR_BASE 0x16 +#define DME_MAR(n) (DME_MAR_BASE + n) +#define DME_GPCR 0x1E +#define DME_GPR 0x1F +#define DME_TRPAL 0x22 +#define DME_TRPAH 0x23 +#define DME_RWPAL 0x24 +#define DME_RWPAH 0x25 +#define DME_VIDL 0x28 +#define DME_VIDH 0x29 +#define DME_PIDL 0x2A +#define DME_PIDH 0x2B +#define DME_CHIPR 0x2C +#define DME_SMCR 0x2F +#define DME_MRCMDX 0xF0 +#define DME_MRCMD 0xF2 +#define DME_MRRL 0xF4 +#define DME_MRRH 0xF5 +#define DME_MWCMDX 0xF6 +#define DME_MWCMD 0xF8 +#define DME_MWRL 0xFA +#define DME_MWRH 0xFB +#define DME_TXPLL 0xFC +#define DME_TXPLH 0xFD +#define DME_ISR 0xFE +#define ISR_LNKCHG (1<<5) +#define ISR_UDRUN (1<<4) +#define ISR_ROO (1<<3) +#define ISR_ROS (1<<2) +#define ISR_PT (1<<1) +#define ISR_PR (1<<0) + +#define DME_IMR 0xFF +#define IMR_PAR (1<<7) +#define IMR_LNKCHGI (1<<5) +#define IMR_UDRUNI (1<<4) +#define IMR_ROOI (1<<3) +#define IMR_ROI (1<<2) +#define IMR_PTI (1<<1) +#define IMR_PRI (1<<0) + +/* Extra PHY register from DM9000B */ +#define MII_DME_DSPCR 0x1B +#define DSPCR_INIT 0xE100 + +#endif /* __DMEREGS_H__ */ + diff --git a/sys/dev/dme/if_dmevar.h b/sys/dev/dme/if_dmevar.h new file mode 100644 index 00000000000..49fdcac4549 --- /dev/null +++ b/sys/dev/dme/if_dmevar.h @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2010 Andrew Turner + * 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$ + */ + +#ifndef __IF_DMEVAR_H__ +#define __IF_DMEVAR_H__ + +#define DME_LOCK(cs) mtx_lock(&(sc)->dme_mtx) +#define DME_UNLOCK(cs) mtx_unlock(&(sc)->dme_mtx) +#define DME_ASSERT_LOCKED(sc) mtx_assert(&(sc)->dme_mtx, MA_OWNED); + +#define DME_TIMEOUT 1000 + +#endif /* __IF_DMEVAR_H__ */ + From 310dc5a403c9afb27edc28ad48439e0bbd18f52a Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Thu, 17 Nov 2016 14:03:44 +0000 Subject: [PATCH 137/204] Writing out the L2TP control packet requires 12 bytes of contiguous memory but in one path we did not always guarantee this, thus do a m_pullup() there. PR: 214385 Submitted by: Joe Jones (joeknockando googlemail.com) MFC after: 3 days --- sys/netgraph/ng_l2tp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/netgraph/ng_l2tp.c b/sys/netgraph/ng_l2tp.c index 85cd6c3e340..55fa2cd3106 100644 --- a/sys/netgraph/ng_l2tp.c +++ b/sys/netgraph/ng_l2tp.c @@ -1544,6 +1544,16 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns) priv->stats.memoryFailures++; return (ENOBUFS); } + + /* + * The below requires 12 contiguous bytes for the L2TP header + * to be written into. + */ + m = m_pullup(m, 12); + if (m == NULL) { + priv->stats.memoryFailures++; + return (ENOBUFS); + } } /* Fill in L2TP header */ From b192bae67ea835b7e431225bad375b5d5fe4297f Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Thu, 17 Nov 2016 14:41:22 +0000 Subject: [PATCH 138/204] Add support for UART found in the Ingenic XBurst system on chips. These CPUs has non-standard UART enable bit hidden in the UART FIFO Control Register. Sponsored by: DARPA, AFRL --- sys/dev/ic/ns16550.h | 3 +++ sys/dev/uart/uart_dev_ns8250.c | 43 +++++++++++++++++++++++++++++----- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/sys/dev/ic/ns16550.h b/sys/dev/ic/ns16550.h index e4c714f2146..3a94d634b4a 100644 --- a/sys/dev/ic/ns16550.h +++ b/sys/dev/ic/ns16550.h @@ -156,6 +156,9 @@ #define FIFO_XMT_RST FCR_XMT_RST #define FCR_DMA 0x08 #define FIFO_DMA_MODE FCR_DMA +#ifdef CPU_XBURST +#define FCR_UART_ON 0x10 +#endif #define FCR_RX_LOW 0x00 #define FIFO_RX_LOW FCR_RX_LOW #define FCR_RX_MEDL 0x40 diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 2498fa37db7..74d7bb7c1f9 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -198,6 +198,9 @@ ns8250_flush(struct uart_bas *bas, int what) uint8_t fcr; fcr = FCR_ENABLE; +#ifdef CPU_XBURST + fcr |= FCR_UART_ON; +#endif if (what & UART_FLUSH_TRANSMITTER) fcr |= FCR_XMT_RST; if (what & UART_FLUSH_RECEIVER) @@ -268,6 +271,10 @@ ns8250_probe(struct uart_bas *bas) { u_char val; +#ifdef CPU_XBURST + uart_setreg(bas, REG_FCR, FCR_UART_ON); +#endif + /* Check known 0 bits that don't depend on DLAB. */ val = uart_getreg(bas, REG_IIR); if (val & 0x30) @@ -289,7 +296,7 @@ static void ns8250_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { - u_char ier; + u_char ier, val; if (bas->rclk == 0) bas->rclk = DEFAULT_RCLK; @@ -306,7 +313,11 @@ ns8250_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, uart_barrier(bas); /* Disable the FIFO (if present). */ - uart_setreg(bas, REG_FCR, 0); + val = 0; +#ifdef CPU_XBURST + val = FCR_UART_ON; +#endif + uart_setreg(bas, REG_FCR, val); uart_barrier(bas); /* Set RTS & DTR. */ @@ -461,6 +472,9 @@ ns8250_bus_attach(struct uart_softc *sc) ns8250->mcr = uart_getreg(bas, REG_MCR); ns8250->fcr = FCR_ENABLE; +#ifdef CPU_XBURST + ns8250->fcr |= FCR_UART_ON; +#endif if (!resource_int_value("uart", device_get_unit(sc->sc_dev), "flags", &ivar)) { if (UART_FLAGS_FCR_RX_LOW(ivar)) @@ -753,6 +767,7 @@ ns8250_bus_probe(struct uart_softc *sc) struct uart_bas *bas; int count, delay, error, limit; uint8_t lsr, mcr, ier; + uint8_t val; ns8250 = (struct ns8250_softc *)sc; bas = &sc->sc_bas; @@ -786,7 +801,11 @@ ns8250_bus_probe(struct uart_softc *sc) * done. Since this is the first time we enable the FIFOs, we reset * them. */ - uart_setreg(bas, REG_FCR, FCR_ENABLE); + val = FCR_ENABLE; +#ifdef CPU_XBURST + val |= FCR_UART_ON; +#endif + uart_setreg(bas, REG_FCR, val); uart_barrier(bas); if (!(uart_getreg(bas, REG_IIR) & IIR_FIFO_MASK)) { /* @@ -800,7 +819,11 @@ ns8250_bus_probe(struct uart_softc *sc) return (0); } - uart_setreg(bas, REG_FCR, FCR_ENABLE | FCR_XMT_RST | FCR_RCV_RST); + val = FCR_ENABLE | FCR_XMT_RST | FCR_RCV_RST; +#ifdef CPU_XBURST + val |= FCR_UART_ON; +#endif + uart_setreg(bas, REG_FCR, val); uart_barrier(bas); count = 0; @@ -810,7 +833,11 @@ ns8250_bus_probe(struct uart_softc *sc) error = ns8250_drain(bas, UART_DRAIN_RECEIVER|UART_DRAIN_TRANSMITTER); if (error) { uart_setreg(bas, REG_MCR, mcr); - uart_setreg(bas, REG_FCR, 0); + val = 0; +#ifdef CPU_XBURST + val |= FCR_UART_ON; +#endif + uart_setreg(bas, REG_FCR, val); uart_barrier(bas); goto describe; } @@ -840,7 +867,11 @@ ns8250_bus_probe(struct uart_softc *sc) ier = uart_getreg(bas, REG_IER) & ns8250->ier_mask; uart_setreg(bas, REG_IER, ier); uart_setreg(bas, REG_MCR, mcr); - uart_setreg(bas, REG_FCR, 0); + val = 0; +#ifdef CPU_XBURST + val |= FCR_UART_ON; +#endif + uart_setreg(bas, REG_FCR, val); uart_barrier(bas); count = 0; goto describe; From a8d695428109f4094ea3112bd44933219f8e678d Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Thu, 17 Nov 2016 14:43:13 +0000 Subject: [PATCH 139/204] Remove outdated comment. Pointed out by: andrew (original author) Sponsored by: DARPA, AFRL --- sys/dev/dme/if_dme.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sys/dev/dme/if_dme.c b/sys/dev/dme/if_dme.c index 48f1c89ef09..b18b97753d1 100644 --- a/sys/dev/dme/if_dme.c +++ b/sys/dev/dme/if_dme.c @@ -25,16 +25,7 @@ * SUCH DAMAGE. */ -/* - * A driver for the DM9000 MAC - * - * TODO: - * Get the interrupt working - * Port to non-S3C2440 systems - * Test with 8 and 32 bit busses - * Test on a big endian machine - * Implement the rest of dme_detach - */ +/* A driver for the Davicom DM9000 MAC. */ #include __FBSDID("$FreeBSD$"); From cec8009ca15c0c3112e4ed4475d4deaa8d175ecf Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Thu, 17 Nov 2016 15:08:30 +0000 Subject: [PATCH 140/204] Allow operation with UTMI+ phy. Submitted by: kan Sponsored by: DARPA, AFRL --- sys/dev/usb/controller/dwc_otg.c | 27 +++++++++++++++++++-------- sys/dev/usb/controller/dwc_otg.h | 7 +++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/sys/dev/usb/controller/dwc_otg.c b/sys/dev/usb/controller/dwc_otg.c index 5560f070dc9..08c037706ea 100644 --- a/sys/dev/usb/controller/dwc_otg.c +++ b/sys/dev/usb/controller/dwc_otg.c @@ -98,10 +98,6 @@ GINTSTS_WKUPINT | GINTSTS_USBSUSP | GINTMSK_OTGINTMSK | \ GINTSTS_SESSREQINT) -#define DWC_OTG_PHY_ULPI 0 -#define DWC_OTG_PHY_HSIC 1 -#define DWC_OTG_PHY_INTERNAL 2 - #ifndef DWC_OTG_PHY_DEFAULT #define DWC_OTG_PHY_DEFAULT DWC_OTG_PHY_ULPI #endif @@ -110,10 +106,10 @@ static int dwc_otg_phy_type = DWC_OTG_PHY_DEFAULT; static SYSCTL_NODE(_hw_usb, OID_AUTO, dwc_otg, CTLFLAG_RW, 0, "USB DWC OTG"); SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, phy_type, CTLFLAG_RDTUN, - &dwc_otg_phy_type, 0, "DWC OTG PHY TYPE - 0/1/2 - ULPI/HSIC/INTERNAL"); + &dwc_otg_phy_type, 0, "DWC OTG PHY TYPE - 0/1/2/3 - ULPI/HSIC/INTERNAL/UTMI+"); #ifdef USB_DEBUG -static int dwc_otg_debug; +static int dwc_otg_debug = 0; SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, debug, CTLFLAG_RWTUN, &dwc_otg_debug, 0, "DWC OTG debug level"); @@ -3889,8 +3885,13 @@ dwc_otg_init(struct dwc_otg_softc *sc) break; } - /* select HSIC, ULPI or internal PHY mode */ - switch (dwc_otg_phy_type) { + if (sc->sc_phy_type == 0) + sc->sc_phy_type = dwc_otg_phy_type + 1; + if (sc->sc_phy_bits == 0) + sc->sc_phy_bits = 16; + + /* select HSIC, ULPI, UTMI+ or internal PHY mode */ + switch (sc->sc_phy_type) { case DWC_OTG_PHY_HSIC: DWC_OTG_WRITE_4(sc, DOTG_GUSBCFG, GUSBCFG_PHYIF | @@ -3910,6 +3911,16 @@ dwc_otg_init(struct dwc_otg_softc *sc) GUSBCFG_TRD_TIM_SET(5) | temp); DWC_OTG_WRITE_4(sc, DOTG_GOTGCTL, 0); + temp = DWC_OTG_READ_4(sc, DOTG_GLPMCFG); + DWC_OTG_WRITE_4(sc, DOTG_GLPMCFG, + temp & ~GLPMCFG_HSIC_CONN); + break; + case DWC_OTG_PHY_UTMI: + DWC_OTG_WRITE_4(sc, DOTG_GUSBCFG, + (sc->sc_phy_bits == 16 ? GUSBCFG_PHYIF : 0) | + GUSBCFG_TRD_TIM_SET(5) | temp); + DWC_OTG_WRITE_4(sc, DOTG_GOTGCTL, 0); + temp = DWC_OTG_READ_4(sc, DOTG_GLPMCFG); DWC_OTG_WRITE_4(sc, DOTG_GLPMCFG, temp & ~GLPMCFG_HSIC_CONN); diff --git a/sys/dev/usb/controller/dwc_otg.h b/sys/dev/usb/controller/dwc_otg.h index 038b072aeef..7f5ede481e5 100644 --- a/sys/dev/usb/controller/dwc_otg.h +++ b/sys/dev/usb/controller/dwc_otg.h @@ -191,6 +191,13 @@ struct dwc_otg_softc { uint16_t sc_active_rx_ep; uint16_t sc_last_frame_num; + uint8_t sc_phy_type; + uint8_t sc_phy_bits; +#define DWC_OTG_PHY_ULPI 1 +#define DWC_OTG_PHY_HSIC 2 +#define DWC_OTG_PHY_INTERNAL 3 +#define DWC_OTG_PHY_UTMI 4 + uint8_t sc_timer_active; uint8_t sc_dev_ep_max; uint8_t sc_dev_in_ep_max; From ead1785e1e9cca686d4914cfb8dd519ab1d17677 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Thu, 17 Nov 2016 15:12:03 +0000 Subject: [PATCH 141/204] Declare dwc_otg_detach as non-static (same as dwc_otg_attach), so it can be called from fdt-glue drivers. Submitted by: kan Sponsored by: DARPA, AFRL --- sys/dev/usb/controller/dwc_otg_fdt.c | 3 +-- sys/dev/usb/controller/dwc_otg_fdt.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/controller/dwc_otg_fdt.c b/sys/dev/usb/controller/dwc_otg_fdt.c index 80d3388050f..8cc8e754fab 100644 --- a/sys/dev/usb/controller/dwc_otg_fdt.c +++ b/sys/dev/usb/controller/dwc_otg_fdt.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include static device_probe_t dwc_otg_probe; -static device_detach_t dwc_otg_detach; static int dwc_otg_probe(device_t dev) @@ -159,7 +158,7 @@ error: return (ENXIO); } -static int +int dwc_otg_detach(device_t dev) { struct dwc_otg_fdt_softc *sc = device_get_softc(dev); diff --git a/sys/dev/usb/controller/dwc_otg_fdt.h b/sys/dev/usb/controller/dwc_otg_fdt.h index 9e01118c80d..634b7960b0a 100644 --- a/sys/dev/usb/controller/dwc_otg_fdt.h +++ b/sys/dev/usb/controller/dwc_otg_fdt.h @@ -35,5 +35,6 @@ struct dwc_otg_fdt_softc { extern driver_t dwc_otg_driver; device_attach_t dwc_otg_attach; +device_attach_t dwc_otg_detach; #endif From 3997df0cde8f5e4f4b5fcc21b5530b900e9fd851 Mon Sep 17 00:00:00 2001 From: Tony Finch Date: Thu, 17 Nov 2016 15:19:06 +0000 Subject: [PATCH 142/204] More robust handling of whois referrals from RIRs. An example problem case is 163.1.0.0 (University of Oxford) which is in an APNIC ERX address range. Previously we assumed that ARIN has the correct information for all ERX allocations, but in this case ARIN refers back to APNIC, rather than referring to RIPE. This caused whois to loop. Whois will no longer loop back and forth forever between two RIRs that don't have an answer, but instead try the other RIRs in turn. --- usr.bin/whois/whois.c | 79 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 4 deletions(-) diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index 4f4062b7c7f..de3b946def4 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -119,12 +119,38 @@ static struct { { NULL, 0 } }; +/* + * We have a list of patterns for RIRs that assert ignorance rather than + * providing referrals. If that happens, we guess that ARIN will be more + * helpful. But, before following a referral to an RIR, we check if we have + * asked that RIR already, and if so we make another guess. + */ static const char *actually_arin[] = { "netname: ERX-NETBLOCK\n", /* APNIC */ "netname: NON-RIPE-NCC-MANAGED-ADDRESS-BLOCK\n", NULL }; +static struct { + int loop; + const char *host; +} try_rir[] = { + { 0, ANICHOST }, + { 0, RNICHOST }, + { 0, PNICHOST }, + { 0, FNICHOST }, + { 0, LNICHOST }, + { 0, NULL } +}; + +static void +reset_rir(void) { + int i; + + for (i = 0; try_rir[i].host != NULL; i++) + try_rir[i].loop = 0; +} + static const char *port = DEFAULT_PORT; static const char *choose_server(char *); @@ -232,6 +258,7 @@ main(int argc, char *argv[]) } else whois(*argv, host != NULL ? host : choose_server(*argv), flags); + reset_rir(); argv++; } exit(0); @@ -420,7 +447,7 @@ whois(const char *query, const char *hostname, int flags) FILE *fp; struct addrinfo *hostres; char *buf, *host, *nhost, *p; - int s, f; + int comment, s, f; size_t len, i; hostres = gethostinfo(hostname, 1); @@ -467,12 +494,28 @@ whois(const char *query, const char *hostname, int flags) fprintf(fp, "%s\r\n", query); fflush(fp); + comment = 0; + if (!(flags & WHOIS_SPAM_ME) && + (strcasecmp(hostname, ANICHOST) == 0 || + strcasecmp(hostname, RNICHOST) == 0)) { + comment = 2; + } + nhost = NULL; while ((buf = fgetln(fp, &len)) != NULL) { /* Nominet */ if (!(flags & WHOIS_SPAM_ME) && len == 5 && strncmp(buf, "-- \r\n", 5) == 0) break; + /* RIRs */ + if (comment == 1 && buf[0] == '#') + break; + else if (comment == 2) { + if (strchr("#%\r\n", buf[0]) != NULL) + continue; + else + comment = 1; + } printf("%.*s", (int)len, buf); @@ -487,8 +530,7 @@ whois(const char *query, const char *hostname, int flags) SCAN(p, buf+len, *p == ' '); host = p; SCAN(p, buf+len, ishost(*p)); - /* avoid loops */ - if (strncmp(hostname, host, p - host) != 0) + if (p > host) s_asprintf(&nhost, "%.*s", (int)(p - host), host); break; @@ -511,8 +553,37 @@ whois(const char *query, const char *hostname, int flags) } fclose(fp); freeaddrinfo(hostres); + + f = 0; + for (i = 0; try_rir[i].host != NULL; i++) { + /* Remember visits to RIRs */ + if (try_rir[i].loop == 0 && + strcasecmp(try_rir[i].host, hostname) == 0) + try_rir[i].loop = 1; + /* Do we need to find an alternative RIR? */ + if (try_rir[i].loop != 0 && nhost != NULL && + strcasecmp(try_rir[i].host, nhost) == 0) { + free(nhost); + nhost = NULL; + f = 1; + } + } + if (f) { + /* Find a replacement RIR */ + for (i = 0; try_rir[i].host != NULL; i++) { + if (try_rir[i].loop == 0) { + s_asprintf(&nhost, "%s", + try_rir[i].host); + break; + } + } + } if (nhost != NULL) { - whois(query, nhost, flags); + /* Ignore self-referrals */ + if (strcasecmp(hostname, nhost) != 0) { + printf("# %s\n\n", nhost); + whois(query, nhost, flags); + } free(nhost); } } From 8e621af540634969322307bbfac640d07e0b5b17 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Thu, 17 Nov 2016 15:37:44 +0000 Subject: [PATCH 143/204] Make gpiobus early driver at BUS_PAS_BUS. The gpiobus driver is attached explicitly and generally should be at the same pass as its parent. Making it use BUS_PAS_BUS ensures that it attaches immediately after parent adds it (assuming the parent itself attached at BUS_PAS_BUS and above). Submitted by: kan Sponsored by: DARPA, AFRL --- sys/dev/gpio/gpiobus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index 421af9d659d..056dd3193d4 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -855,5 +855,6 @@ driver_t gpiobus_driver = { devclass_t gpiobus_devclass; -DRIVER_MODULE(gpiobus, gpio, gpiobus_driver, gpiobus_devclass, 0, 0); +EARLY_DRIVER_MODULE(gpiobus, gpio, gpiobus_driver, gpiobus_devclass, 0, 0, + BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(gpiobus, 1); From 5515b0cb39fae7d2951b779b64a7e56823ac44c2 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Thu, 17 Nov 2016 16:06:53 +0000 Subject: [PATCH 144/204] Do not reallocate driver softc for uart unnecessarily. Do not assume that all uart drivers use uart_softc structure as is. Some do a sensible thing and do declare their uart class and driver properly and arrive into uart_bus_attach with suitably sized softc. Submitted by: kan Sponsored by: DARPA, AFRL --- sys/dev/uart/uart_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index f4dbcfc2dcc..6c9d7aa23a0 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -573,7 +573,7 @@ uart_bus_attach(device_t dev) * the device. */ sc0 = device_get_softc(dev); - if (sc0->sc_class->size > sizeof(*sc)) { + if (sc0->sc_class->size > device_get_driver(dev)->size) { sc = malloc(sc0->sc_class->size, M_UART, M_WAITOK|M_ZERO); bcopy(sc0, sc, sizeof(*sc)); device_set_softc(dev, sc); @@ -781,11 +781,10 @@ uart_bus_detach(device_t dev) mtx_destroy(&sc->sc_hwmtx_s); - if (sc->sc_class->size > sizeof(*sc)) { + if (sc->sc_class->size > device_get_driver(dev)->size) { device_set_softc(dev, NULL); free(sc, M_UART); - } else - device_set_softc(dev, NULL); + } return (0); } From 6e18247a3d423831d88f204daae4f991e5d72fa3 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Thu, 17 Nov 2016 16:13:30 +0000 Subject: [PATCH 145/204] Fix build when no INET and INET6 in kernel config. Submitted by: kan Sponsored by: DARPA, AFRL --- sys/kern/vfs_export.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 988c687bda7..77a353b3cad 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -61,8 +61,10 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_NETADDR, "export_host", "Export host address structure"); +#if defined(INET) || defined(INET6) static struct radix_node_head *vfs_create_addrlist_af( struct radix_node_head **prnh, int off); +#endif static void vfs_free_addrlist(struct netexport *nep); static int vfs_free_netcred(struct radix_node *rn, void *w); static void vfs_free_addrlist_af(struct radix_node_head **prnh); @@ -239,6 +241,7 @@ vfs_free_netcred(struct radix_node *rn, void *w) return (0); } +#if defined(INET) || defined(INET6) static struct radix_node_head * vfs_create_addrlist_af(struct radix_node_head **prnh, int off) { @@ -248,6 +251,7 @@ vfs_create_addrlist_af(struct radix_node_head **prnh, int off) RADIX_NODE_HEAD_LOCK_INIT(*prnh); return (*prnh); } +#endif static void vfs_free_addrlist_af(struct radix_node_head **prnh) From f513dfd44b7e0657b22408848e2450f22379ccbe Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 17 Nov 2016 18:12:17 +0000 Subject: [PATCH 146/204] crunchide: report explicit error for combined string table Some tools produce objects with a combined strtab and shstrtab. These objects are not supported by crunchide since it rewrites the symtab and strtab to "hide" symbols. This invalidates section header offsets into a combined strtab/shstrtab. In the future we could support these objects (by ensuring that we retain unmodified section name strings in the output .strtab, and then rewriting each section header's sh_name). MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/crunch/crunchide/exec_elf32.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/crunch/crunchide/exec_elf32.c b/usr.sbin/crunch/crunchide/exec_elf32.c index 6d94429f7e9..9aa29fd8a97 100644 --- a/usr.sbin/crunch/crunchide/exec_elf32.c +++ b/usr.sbin/crunch/crunchide/exec_elf32.c @@ -279,6 +279,10 @@ ELFNAMEEND(hide)(int fd, const char *fn) weird = 1; weirdreason = "section header string table does not exist"; } + if (strtabshdr == shstrtabshdr) { + weird = 1; + weirdreason = "combined strtab and shstrtab not supported"; + } if (weirdreason == NULL) weirdreason = "unsupported"; if (weird) { From e20727061ff7dd94f8126300961480d1394739b3 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 17 Nov 2016 18:13:42 +0000 Subject: [PATCH 147/204] Define dependencies for some auto-generated source files in libdtrace. Remove an unneeded beforedepend rule. Reported by: emaste, jhb Reviewed by: bdrewery MFC after: 1 week --- cddl/lib/libdtrace/Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index 83a93cf0cb5..17e1eb9bdf5 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -121,12 +121,10 @@ LIBADD= ctf elf proc pthread rtld_db CLEANFILES= dt_errtags.c dt_names.c -dt_errtags.c: - sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh < ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h > dt_errtags.c - -dt_names.c: - sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh < ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h > dt_names.c - -beforedepend: dt_errtags.c dt_names.c - .include + +dt_errtags.c: ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h + sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh < ${.ALLSRC} > ${.TARGET} + +dt_names.c: ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h + sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh < ${.ALLSRC} > ${.TARGET} From 00dbeb59ad7812163383c766f4bf53db0c13209a Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Thu, 17 Nov 2016 18:38:35 +0000 Subject: [PATCH 148/204] loader: beri_sdcard_disk_print() needs to return int. The https://reviews.freebsd.org/rS308434 did change the return type for dv_print callbacks, but the return type for beri_sdcard_disk_print() was left unchanged, causing compile errors. Reported by: cy Reviewed by: brooks, rstone, allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8515 --- sys/boot/mips/beri/loader/beri_disk_sdcard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/boot/mips/beri/loader/beri_disk_sdcard.c b/sys/boot/mips/beri/loader/beri_disk_sdcard.c index e1a2e87d11f..0bde49bebd7 100644 --- a/sys/boot/mips/beri/loader/beri_disk_sdcard.c +++ b/sys/boot/mips/beri/loader/beri_disk_sdcard.c @@ -118,7 +118,7 @@ beri_sdcard_disk_close(struct open_file *f) return (disk_close(dev)); } -static void +static int beri_sdcard_disk_print(int verbose) { struct disk_devdesc dev; From 08f58fe456854fcaf7f25e6c09971821dfe878f6 Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Thu, 17 Nov 2016 19:02:25 +0000 Subject: [PATCH 149/204] Zero etherswitch_vlangroup structure before doing partial assignments. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) --- sbin/etherswitchcfg/etherswitchcfg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbin/etherswitchcfg/etherswitchcfg.c b/sbin/etherswitchcfg/etherswitchcfg.c index 2f9ccf9c6fe..ee56ff9106d 100644 --- a/sbin/etherswitchcfg/etherswitchcfg.c +++ b/sbin/etherswitchcfg/etherswitchcfg.c @@ -308,7 +308,8 @@ set_vlangroup_vid(struct cfg *cfg, char *argv[]) { int v; etherswitch_vlangroup_t vg; - + + memset(&vg, 0, sizeof(vg)); v = strtol(argv[1], NULL, 0); if (v < 0 || v > IEEE802DOT1Q_VID_MAX) errx(EX_USAGE, "vlan must be between 0 and %d", IEEE802DOT1Q_VID_MAX); @@ -327,8 +328,9 @@ set_vlangroup_members(struct cfg *cfg, char *argv[]) int member, untagged; char *c, *d; int v; - + member = untagged = 0; + memset(&vg, 0, sizeof(vg)); if (strcmp(argv[1], "none") != 0) { for (c=argv[1]; *c; c=d) { v = strtol(c, &d, 0); From 0e75a5017371e4570edf515e2b7641318a488c22 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Thu, 17 Nov 2016 19:38:30 +0000 Subject: [PATCH 150/204] loader: zfs toplevel vdev must have spa set. The salt based checksum mechanisms, such as skein, are storing the seed in spa structure, and need to access the spa to use the seed. The current mechanism for quick access to correct spa is via pointer provided by vdev structure, but unfortunately the current code does set spa only for the leaf vdev. This patch will fix the issue by making sure the loader zfs reader will set spa also for top-level vdevs. PR: 214375 Reported by: lstewart Reviewed by: allanjude, imp Approved by: allanjude (mentor), imp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8487 --- sys/boot/zfs/zfsimpl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/boot/zfs/zfsimpl.c b/sys/boot/zfs/zfsimpl.c index 5f05c35587a..8729a7517d1 100644 --- a/sys/boot/zfs/zfsimpl.c +++ b/sys/boot/zfs/zfsimpl.c @@ -1049,8 +1049,10 @@ vdev_probe(vdev_phys_read_t *read, void *read_priv, spa_t **spap) STAILQ_FOREACH(pool_vdev, &spa->spa_vdevs, v_childlink) if (top_vdev == pool_vdev) break; - if (!pool_vdev && top_vdev) + if (!pool_vdev && top_vdev) { + top_vdev->spa = spa; STAILQ_INSERT_TAIL(&spa->spa_vdevs, top_vdev, v_childlink); + } /* * We should already have created an incomplete vdev for this From b22fe30db1bdbc42c38e882e3006be162cfe3b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imre=20Vad=C3=A1sz?= Date: Thu, 17 Nov 2016 20:00:20 +0000 Subject: [PATCH 151/204] [iwm] Sync iwm_nvm_read_chunk() function with Linux iwlwifi. This fixes an error handling detail in iwm_nvm_read_chunk(), where an error response from the firmware for an NVM read shouldn't be fatal if the offset was non-zero. Approved by: adrian (mentor) Obtained from: DragonFlyBSD git 250a1c33fca1725121fe499f9cebc90267d209f9 Differential Revision: https://reviews.freebsd.org/D8542 --- sys/dev/iwm/if_iwm.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index 12b38d0f7b5..c61857453a3 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -1666,8 +1666,10 @@ const int nvm_to_read[] = { #define IWM_NVM_READ_OPCODE 0 /* load nvm chunk response */ -#define IWM_READ_NVM_CHUNK_SUCCEED 0 -#define IWM_READ_NVM_CHUNK_INVALID_ADDRESS 1 +enum { + IWM_READ_NVM_CHUNK_SUCCEED = 0, + IWM_READ_NVM_CHUNK_NOT_VALID_ADDRESS = 1 +}; static int iwm_nvm_read_chunk(struct iwm_softc *sc, uint16_t section, @@ -1684,12 +1686,10 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, uint16_t section, struct iwm_rx_packet *pkt; struct iwm_host_cmd cmd = { .id = IWM_NVM_ACCESS_CMD, - .flags = IWM_CMD_SYNC | IWM_CMD_WANT_SKB | - IWM_CMD_SEND_IN_RFKILL, + .flags = IWM_CMD_WANT_SKB | IWM_CMD_SEND_IN_RFKILL, .data = { &nvm_access_cmd, }, }; - int ret, offset_read; - size_t bytes_read; + int ret, bytes_read, offset_read; uint8_t *resp_data; cmd.len[0] = sizeof(struct iwm_nvm_access_cmd); @@ -1718,9 +1718,26 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, uint16_t section, offset_read = le16toh(nvm_resp->offset); resp_data = nvm_resp->data; if (ret) { - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "NVM access command failed with status %d\n", ret); - ret = EINVAL; + if ((offset != 0) && + (ret == IWM_READ_NVM_CHUNK_NOT_VALID_ADDRESS)) { + /* + * meaning of NOT_VALID_ADDRESS: + * driver try to read chunk from address that is + * multiple of 2K and got an error since addr is empty. + * meaning of (offset != 0): driver already + * read valid data from another chunk so this case + * is not an error. + */ + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESET, + "NVM access command failed on offset 0x%x since that section size is multiple 2K\n", + offset); + *len = 0; + ret = 0; + } else { + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESET, + "NVM access command failed with status %d\n", ret); + ret = EIO; + } goto exit; } @@ -1735,7 +1752,7 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, uint16_t section, if (bytes_read > length) { device_printf(sc->sc_dev, "NVM ACCESS response with too much data " - "(%d bytes requested, %zd bytes received)\n", + "(%d bytes requested, %d bytes received)\n", length, bytes_read); ret = EINVAL; goto exit; From e48b82bd83d575969153661a3b4c9d83187bdfa7 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 17 Nov 2016 20:32:32 +0000 Subject: [PATCH 152/204] - If caller specifies readbehind and readahead that together with count doesn't fit into a buf, then trim readbehind and readahead evenly. If rbehind was limited by the previous BMAP, then roundup its trim to block size. - Add KASSERT to check that b_blkno has proper offset from original blkno returned by BMAP. [1] - Add KASSERT to check that pages in buf are consecutive. Reviewed by: kib Submitted by: kib [1] --- sys/vm/vnode_pager.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 3458c2032a0..b466d32e11a 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -743,6 +743,9 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, struct bufobj *bo; struct buf *bp; off_t foff; +#ifdef INVARIANTS + off_t blkno0; +#endif int bsize, pagesperblock, *freecnt; int error, before, after, rbehind, rahead, poff, i; int bytecount, secmask; @@ -843,6 +846,9 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, return (VM_PAGER_OK); } +#ifdef INVARIANTS + blkno0 = bp->b_blkno; +#endif bp->b_blkno += (foff % bsize) / DEV_BSIZE; /* Recalculate blocks available after/before to pages. */ @@ -864,7 +870,25 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, rbehind = min(rbehind, m[0]->pindex); rahead = min(rahead, after); rahead = min(rahead, object->size - m[count - 1]->pindex); - KASSERT(rbehind + rahead + count <= sizeof(bp->b_pages), + /* + * Check that total amount of pages fit into buf. Trim rbehind and + * rahead evenly if not. + */ + if (rbehind + rahead + count > nitems(bp->b_pages)) { + int trim, sum; + + trim = rbehind + rahead + count - nitems(bp->b_pages) + 1; + sum = rbehind + rahead; + if (rbehind == before) { + /* Roundup rbehind trim to block size. */ + rbehind -= roundup(trim * rbehind / sum, pagesperblock); + if (rbehind < 0) + rbehind = 0; + } else + rbehind -= trim * rbehind / sum; + rahead -= trim * rahead / sum; + } + KASSERT(rbehind + rahead + count <= nitems(bp->b_pages), ("%s: behind %d ahead %d count %d", __func__, rbehind, rahead, count)); @@ -947,8 +971,14 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, if (a_rahead) *a_rahead = bp->b_pgafter; +#ifdef INVARIANTS KASSERT(bp->b_npages <= nitems(bp->b_pages), ("%s: buf %p overflowed", __func__, bp)); + for (int j = 1; j < bp->b_npages; j++) + KASSERT(bp->b_pages[j]->pindex - 1 == + bp->b_pages[j - 1]->pindex, + ("%s: pages array not consecutive, bp %p", __func__, bp)); +#endif /* * Recalculate first offset and bytecount with regards to read behind. @@ -987,6 +1017,13 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, bp->b_vp = vp; bp->b_bcount = bp->b_bufsize = bp->b_runningbufspace = bytecount; bp->b_iooffset = dbtob(bp->b_blkno); + KASSERT(IDX_TO_OFF(m[0]->pindex - bp->b_pages[0]->pindex) == + (blkno0 - bp->b_blkno) * DEV_BSIZE + + IDX_TO_OFF(m[0]->pindex) % bsize, + ("wrong offsets bsize %d m[0] %ju b_pages[0] %ju " + "blkno0 %ju b_blkno %ju", bsize, + (uintmax_t)m[0]->pindex, (uintmax_t)bp->b_pages[0]->pindex, + (uintmax_t)blkno0, (uintmax_t)bp->b_blkno)); atomic_add_long(&runningbufspace, bp->b_runningbufspace); PCPU_INC(cnt.v_vnodein); From 240e2395058e5bb342c5cec50fb6e685d60aed81 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Thu, 17 Nov 2016 20:34:08 +0000 Subject: [PATCH 153/204] Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh for the vm-image target, missed in r308737. Sponsored by: The FreeBSD Foundation --- release/Makefile.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index eab4a1e956a..caca7cfa657 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -89,7 +89,7 @@ vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . for FORMAT in ${VMFORMATS} mkdir -p ${.OBJDIR}/${.TARGET} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ From 2edc027cf0ab9c58d2778c54937f5cabeac4f233 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 17 Nov 2016 20:42:56 +0000 Subject: [PATCH 154/204] Fix "camcontrol rescan" with SATA drives behind a SAS controller A bug in CAM's serial number hash logic resulted in SATA drives behind a SAS controller getting removed and readded anytime the drive was rescanned for any reason. PR: 212914 Submitted by: kadesai Reported by: kadesai Reviewed by: asomers, ken MFC after: 4 weeks Sponsored by: Spectra Logic Corp --- sys/cam/scsi/scsi_xpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index ddb565830ae..cb7205e3331 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -1626,8 +1626,8 @@ probe_device_check: sizeof(struct scsi_inquiry_data)); if (have_serialnum) - MD5Update(&context, serial_buf->serial_num, - serial_buf->length); + MD5Update(&context, path->device->serial_num, + path->device->serial_num_len); MD5Final(digest, &context); if (bcmp(softc->digest, digest, 16) == 0) From eb9bfc257d53198a460ad8dc4c3cd484ab7b6a0c Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 17 Nov 2016 20:44:51 +0000 Subject: [PATCH 155/204] Revert r307392: I've found a way to avoid big allocations completely. --- .../opensolaris/uts/common/fs/zfs/zil.c | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c index 6d58078a5d9..de8b6439706 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c @@ -1142,11 +1142,6 @@ zil_itx_create(uint64_t txtype, size_t lrsize) lrsize = P2ROUNDUP_TYPED(lrsize, sizeof (uint64_t), size_t); -#ifdef __FreeBSD__ - if (offsetof(itx_t, itx_lr) + lrsize > PAGE_SIZE) - itx = zio_buf_alloc(offsetof(itx_t, itx_lr) + lrsize); - else -#endif itx = kmem_alloc(offsetof(itx_t, itx_lr) + lrsize, KM_SLEEP); itx->itx_lr.lrc_txtype = txtype; itx->itx_lr.lrc_reclen = lrsize; @@ -1160,11 +1155,6 @@ zil_itx_create(uint64_t txtype, size_t lrsize) void zil_itx_destroy(itx_t *itx) { -#ifdef __FreeBSD__ - if (offsetof(itx_t, itx_lr) + itx->itx_lr.lrc_reclen > PAGE_SIZE) - zio_buf_free(itx, offsetof(itx_t, itx_lr) + itx->itx_lr.lrc_reclen); - else -#endif kmem_free(itx, offsetof(itx_t, itx_lr) + itx->itx_lr.lrc_reclen); } @@ -1184,7 +1174,8 @@ zil_itxg_clean(itxs_t *itxs) list = &itxs->i_sync_list; while ((itx = list_head(list)) != NULL) { list_remove(list, itx); - zil_itx_destroy(itx); + kmem_free(itx, offsetof(itx_t, itx_lr) + + itx->itx_lr.lrc_reclen); } cookie = NULL; @@ -1193,7 +1184,8 @@ zil_itxg_clean(itxs_t *itxs) list = &ian->ia_list; while ((itx = list_head(list)) != NULL) { list_remove(list, itx); - zil_itx_destroy(itx); + kmem_free(itx, offsetof(itx_t, itx_lr) + + itx->itx_lr.lrc_reclen); } list_destroy(list); kmem_free(ian, sizeof (itx_async_node_t)); @@ -1258,7 +1250,8 @@ zil_remove_async(zilog_t *zilog, uint64_t oid) } while ((itx = list_head(&clean_list)) != NULL) { list_remove(&clean_list, itx); - zil_itx_destroy(itx); + kmem_free(itx, offsetof(itx_t, itx_lr) + + itx->itx_lr.lrc_reclen); } list_destroy(&clean_list); } @@ -1508,7 +1501,8 @@ zil_commit_writer(zilog_t *zilog) if (txg > spa_last_synced_txg(spa) || txg > spa_freeze_txg(spa)) lwb = zil_lwb_commit(zilog, itx, lwb); list_remove(&zilog->zl_itx_commit_list, itx); - zil_itx_destroy(itx); + kmem_free(itx, offsetof(itx_t, itx_lr) + + itx->itx_lr.lrc_reclen); } DTRACE_PROBE1(zil__cw2, zilog_t *, zilog); From 14b5719f6a1b011975cea8c5466addb94e855d25 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 17 Nov 2016 21:01:27 +0000 Subject: [PATCH 156/204] After some ZIL changes 6 years ago zil_slog_limit got partially broken due to zl_itx_list_sz not updated when async itx'es upgraded to sync. Actually because of other changes about that time zl_itx_list_sz is not really required to implement the functionality, so this patch removes some unneeded broken code and variables. Original idea of zil_slog_limit was to reduce chance of SLOG abuse by single heavy logger, that increased latency for other (more latency critical) loggers, by pushing heavy log out into the main pool instead of SLOG. Beside huge latency increase for heavy writers, this implementation caused double write of all data, since the log records were explicitly prepared for SLOG. Since we now have I/O scheduler, I've found it can be much more efficient to reduce priority of heavy logger SLOG writes from ZIO_PRIORITY_SYNC_WRITE to ZIO_PRIORITY_ASYNC_WRITE, while still leave them on SLOG. Existing ZIL implementation had problem with space efficiency when it has to write large chunks of data into log blocks of limited size. In some cases efficiency stopped to almost as low as 50%. In case of ZIL stored on spinning rust, that also reduced log write speed in half, since head had to uselessly fly over allocated but not written areas. This change improves the situation by offloading problematic operations from z*_log_write() to zil_lwb_commit(), which knows real situation of log blocks allocation and can split large requests into pieces much more efficiently. Also as side effect it removes one of two data copy operations done by ZIL code WR_COPIED case. While there, untangle and unify code of z*_log_write() functions. Also zfs_log_write() alike to zvol_log_write() can now handle writes crossing block boundary, that may also improve efficiency if ZPL is made to do that. Sponsored by: iXsystems, Inc. --- cddl/contrib/opensolaris/cmd/ztest/ztest.c | 1 - .../opensolaris/uts/common/fs/zfs/sys/zil.h | 1 - .../uts/common/fs/zfs/sys/zil_impl.h | 5 +- .../opensolaris/uts/common/fs/zfs/sys/zio.h | 2 +- .../opensolaris/uts/common/fs/zfs/zfs_log.c | 37 +++---- .../opensolaris/uts/common/fs/zfs/zil.c | 99 ++++++++++--------- .../opensolaris/uts/common/fs/zfs/zio.c | 15 +-- .../opensolaris/uts/common/fs/zfs/zvol.c | 50 ++++------ 8 files changed, 100 insertions(+), 110 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/ztest/ztest.c b/cddl/contrib/opensolaris/cmd/ztest/ztest.c index 5fc571774e3..bfc80e3b028 100644 --- a/cddl/contrib/opensolaris/cmd/ztest/ztest.c +++ b/cddl/contrib/opensolaris/cmd/ztest/ztest.c @@ -1371,7 +1371,6 @@ ztest_log_write(ztest_ds_t *zd, dmu_tx_t *tx, lr_write_t *lr) itx->itx_private = zd; itx->itx_wr_state = write_state; itx->itx_sync = (ztest_random(8) == 0); - itx->itx_sod += (write_state == WR_NEED_COPY ? lr->lr_length : 0); bcopy(&lr->lr_common + 1, &itx->itx_lr + 1, sizeof (*lr) - sizeof (lr_t)); diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h index 8887aa8d925..8b206a378d2 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h @@ -369,7 +369,6 @@ typedef struct itx { void *itx_private; /* type-specific opaque data */ itx_wr_state_t itx_wr_state; /* write state */ uint8_t itx_sync; /* synchronous transaction */ - uint64_t itx_sod; /* record size on disk */ uint64_t itx_oid; /* object id */ lr_t itx_lr; /* common part of log record */ /* followed by type-specific part of lr_xx_t and its immediate data */ diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h index ac908bd322e..a1ed9e58d12 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h @@ -42,6 +42,7 @@ extern "C" { typedef struct lwb { zilog_t *lwb_zilog; /* back pointer to log struct */ blkptr_t lwb_blk; /* on disk address of this log blk */ + boolean_t lwb_slog; /* lwb_blk is on SLOG device */ int lwb_nused; /* # used bytes in buffer */ int lwb_sz; /* size of block and buffer */ char *lwb_buf; /* log write buffer */ @@ -62,7 +63,6 @@ typedef struct itxs { typedef struct itxg { kmutex_t itxg_lock; /* lock for this structure */ uint64_t itxg_txg; /* txg for this chain */ - uint64_t itxg_sod; /* total size on disk for this txg */ itxs_t *itxg_itxs; /* sync and async itxs */ } itxg_t; @@ -120,7 +120,6 @@ struct zilog { kcondvar_t zl_cv_batch[2]; /* batch condition variables */ itxg_t zl_itxg[TXG_SIZE]; /* intent log txg chains */ list_t zl_itx_commit_list; /* itx list to be committed */ - uint64_t zl_itx_list_sz; /* total size of records on list */ uint64_t zl_cur_used; /* current commit log size used */ list_t zl_lwb_list; /* in-flight log write list */ kmutex_t zl_vdev_lock; /* protects zl_vdev_tree */ @@ -142,6 +141,8 @@ typedef struct zil_bp_node { #define ZIL_MAX_LOG_DATA (SPA_OLD_MAXBLOCKSIZE - sizeof (zil_chain_t) - \ sizeof (lr_write_t)) +#define ZIL_MAX_COPIED_DATA \ + ((SPA_OLD_MAXBLOCKSIZE - sizeof (zil_chain_t)) / 2 - sizeof (lr_write_t)) #ifdef __cplusplus } 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 da3461e10e6..30f8d81f4c8 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 @@ -547,7 +547,7 @@ extern zio_t *zio_free_sync(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp, uint64_t size, enum zio_flag flags); extern int zio_alloc_zil(spa_t *spa, uint64_t txg, blkptr_t *new_bp, - blkptr_t *old_bp, uint64_t size, boolean_t use_slog); + blkptr_t *old_bp, uint64_t size, boolean_t *slog); extern void zio_free_zil(spa_t *spa, uint64_t txg, blkptr_t *bp); extern void zio_flush(zio_t *zio, vdev_t *vd); extern zio_t *zio_trim(zio_t *zio, spa_t *spa, vdev_t *vd, uint64_t offset, diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c index 049b958605d..31054bac599 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c @@ -464,20 +464,17 @@ void zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, znode_t *zp, offset_t off, ssize_t resid, int ioflag) { + uint32_t blocksize = zp->z_blksz; itx_wr_state_t write_state; - boolean_t slogging; uintptr_t fsync_cnt; - ssize_t immediate_write_sz; if (zil_replaying(zilog, tx) || zp->z_unlinked) return; - immediate_write_sz = (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) - ? 0 : zfs_immediate_write_sz; - - slogging = spa_has_slogs(zilog->zl_spa) && - (zilog->zl_logbias == ZFS_LOGBIAS_LATENCY); - if (resid > immediate_write_sz && !slogging && resid <= zp->z_blksz) + if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) + write_state = WR_INDIRECT; + else if (!spa_has_slogs(zilog->zl_spa) && + resid >= zfs_immediate_write_sz) write_state = WR_INDIRECT; else if (ioflag & (FSYNC | FDSYNC)) write_state = WR_COPIED; @@ -491,30 +488,26 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, while (resid) { itx_t *itx; lr_write_t *lr; - ssize_t len; + itx_wr_state_t wr_state = write_state; + ssize_t len = resid; - /* - * If the write would overflow the largest block then split it. - */ - if (write_state != WR_INDIRECT && resid > ZIL_MAX_LOG_DATA) - len = SPA_OLD_MAXBLOCKSIZE >> 1; - else - len = resid; + if (wr_state == WR_COPIED && resid > ZIL_MAX_COPIED_DATA) + wr_state = WR_NEED_COPY; + else if (wr_state == WR_INDIRECT) + len = MIN(blocksize - P2PHASE(off, blocksize), resid); itx = zil_itx_create(txtype, sizeof (*lr) + - (write_state == WR_COPIED ? len : 0)); + (wr_state == WR_COPIED ? len : 0)); lr = (lr_write_t *)&itx->itx_lr; - if (write_state == WR_COPIED && dmu_read(zp->z_zfsvfs->z_os, + if (wr_state == WR_COPIED && dmu_read(zp->z_zfsvfs->z_os, zp->z_id, off, len, lr + 1, DMU_READ_NO_PREFETCH) != 0) { zil_itx_destroy(itx); itx = zil_itx_create(txtype, sizeof (*lr)); lr = (lr_write_t *)&itx->itx_lr; - write_state = WR_NEED_COPY; + wr_state = WR_NEED_COPY; } - itx->itx_wr_state = write_state; - if (write_state == WR_NEED_COPY) - itx->itx_sod += len; + itx->itx_wr_state = wr_state; lr->lr_foid = zp->z_id; lr->lr_offset = off; lr->lr_length = len; diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c index de8b6439706..bef7015af83 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c @@ -88,6 +88,15 @@ SYSCTL_DECL(_vfs_zfs_trim); SYSCTL_INT(_vfs_zfs_trim, OID_AUTO, enabled, CTLFLAG_RDTUN, &zfs_trim_enabled, 0, "Enable ZFS TRIM"); +/* + * Limit SLOG write size per commit executed with synchronous priority. + * Any writes above that executed with lower (asynchronous) priority to + * limit potential SLOG device abuse by single active ZIL writer. + */ +uint64_t zil_slog_limit = 768 * 1024; +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, zil_slog_limit, CTLFLAG_RWTUN, + &zil_slog_limit, 0, "Maximal SLOG commit size with sync priority"); + static kmem_cache_t *zil_lwb_cache; #define LWB_EMPTY(lwb) ((BP_GET_LSIZE(&lwb->lwb_blk) - \ @@ -447,13 +456,14 @@ zil_free_log_record(zilog_t *zilog, lr_t *lrc, void *tx, uint64_t claim_txg) } static lwb_t * -zil_alloc_lwb(zilog_t *zilog, blkptr_t *bp, uint64_t txg) +zil_alloc_lwb(zilog_t *zilog, blkptr_t *bp, boolean_t slog, uint64_t txg) { lwb_t *lwb; lwb = kmem_cache_alloc(zil_lwb_cache, KM_SLEEP); lwb->lwb_zilog = zilog; lwb->lwb_blk = *bp; + lwb->lwb_slog = slog; lwb->lwb_buf = zio_buf_alloc(BP_GET_LSIZE(bp)); lwb->lwb_max_txg = txg; lwb->lwb_zio = NULL; @@ -516,6 +526,7 @@ zil_create(zilog_t *zilog) dmu_tx_t *tx = NULL; blkptr_t blk; int error = 0; + boolean_t slog = FALSE; /* * Wait for any previous destroy to complete. @@ -544,7 +555,7 @@ zil_create(zilog_t *zilog) } error = zio_alloc_zil(zilog->zl_spa, txg, &blk, NULL, - ZIL_MIN_BLKSZ, zilog->zl_logbias == ZFS_LOGBIAS_LATENCY); + ZIL_MIN_BLKSZ, &slog); if (error == 0) zil_init_log_chain(zilog, &blk); @@ -554,7 +565,7 @@ zil_create(zilog_t *zilog) * Allocate a log write buffer (lwb) for the first log block. */ if (error == 0) - lwb = zil_alloc_lwb(zilog, &blk, txg); + lwb = zil_alloc_lwb(zilog, &blk, slog, txg); /* * If we just allocated the first log block, commit our transaction @@ -885,6 +896,7 @@ static void zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb) { zbookmark_phys_t zb; + zio_priority_t prio; SET_BOOKMARK(&zb, lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_OBJSET], ZB_ZIL_OBJECT, ZB_ZIL_LEVEL, @@ -895,9 +907,13 @@ zil_lwb_write_init(zilog_t *zilog, lwb_t *lwb) ZIO_FLAG_CANFAIL); } if (lwb->lwb_zio == NULL) { + if (zilog->zl_cur_used <= zil_slog_limit || !lwb->lwb_slog) + prio = ZIO_PRIORITY_SYNC_WRITE; + else + prio = ZIO_PRIORITY_ASYNC_WRITE; lwb->lwb_zio = zio_rewrite(zilog->zl_root_zio, zilog->zl_spa, 0, &lwb->lwb_blk, lwb->lwb_buf, BP_GET_LSIZE(&lwb->lwb_blk), - zil_lwb_write_done, lwb, ZIO_PRIORITY_SYNC_WRITE, + zil_lwb_write_done, lwb, prio, ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_PROPAGATE, &zb); } } @@ -916,18 +932,6 @@ uint64_t zil_block_buckets[] = { UINT64_MAX }; -/* - * Use the slog as long as the logbias is 'latency' and the current commit size - * is less than the limit or the total list size is less than 2X the limit. - * Limit checking is disabled by setting zil_slog_limit to UINT64_MAX. - */ -uint64_t zil_slog_limit = 1024 * 1024; -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, zil_slog_limit, CTLFLAG_RWTUN, - &zil_slog_limit, 0, "Maximal commit size to use SLOG"); -#define USE_SLOG(zilog) (((zilog)->zl_logbias == ZFS_LOGBIAS_LATENCY) && \ - (((zilog)->zl_cur_used < zil_slog_limit) || \ - ((zilog)->zl_itx_list_sz < (zil_slog_limit << 1)))) - /* * Start a log block write and advance to the next log block. * Calls are serialized. @@ -943,6 +947,7 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb) uint64_t txg; uint64_t zil_blksz, wsz; int i, error; + boolean_t slog; if (BP_GET_CHECKSUM(&lwb->lwb_blk) == ZIO_CHECKSUM_ZILOG2) { zilc = (zil_chain_t *)lwb->lwb_buf; @@ -999,8 +1004,7 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb) BP_ZERO(bp); /* pass the old blkptr in order to spread log blocks across devs */ - error = zio_alloc_zil(spa, txg, bp, &lwb->lwb_blk, zil_blksz, - USE_SLOG(zilog)); + error = zio_alloc_zil(spa, txg, bp, &lwb->lwb_blk, zil_blksz, &slog); if (error == 0) { ASSERT3U(bp->blk_birth, ==, txg); bp->blk_cksum = lwb->lwb_blk.blk_cksum; @@ -1009,7 +1013,7 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb) /* * Allocate a new log write buffer (lwb). */ - nlwb = zil_alloc_lwb(zilog, bp, txg); + nlwb = zil_alloc_lwb(zilog, bp, slog, txg); /* Record the block for later vdev flushing */ zil_add_block(zilog, &lwb->lwb_blk); @@ -1046,12 +1050,13 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb) static lwb_t * zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) { - lr_t *lrc = &itx->itx_lr; /* common log record */ - lr_write_t *lrw = (lr_write_t *)lrc; + lr_t *lrcb, *lrc = &itx->itx_lr; /* common log record */ + lr_write_t *lrwb, *lrw = (lr_write_t *)lrc; char *lr_buf; uint64_t txg = lrc->lrc_txg; uint64_t reclen = lrc->lrc_reclen; uint64_t dlen = 0; + uint64_t dnow, lwb_sp; if (lwb == NULL) return (NULL); @@ -1068,25 +1073,30 @@ zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) zil_lwb_write_init(zilog, lwb); +cont: /* * If this record won't fit in the current log block, start a new one. + * For WR_NEED_COPY optimize layout for minimal number of chunks, but + * try to keep wasted space withing reasonable range (12%). */ - if (lwb->lwb_nused + reclen + dlen > lwb->lwb_sz) { + lwb_sp = lwb->lwb_sz - lwb->lwb_nused; + if (reclen > lwb_sp || (reclen + dlen > lwb_sp && + lwb_sp < ZIL_MAX_LOG_DATA / 8 && (dlen % ZIL_MAX_LOG_DATA == 0 || + lwb_sp < reclen + dlen % ZIL_MAX_LOG_DATA))) { lwb = zil_lwb_write_start(zilog, lwb); if (lwb == NULL) return (NULL); zil_lwb_write_init(zilog, lwb); ASSERT(LWB_EMPTY(lwb)); - if (lwb->lwb_nused + reclen + dlen > lwb->lwb_sz) { - txg_wait_synced(zilog->zl_dmu_pool, txg); - return (lwb); - } + lwb_sp = lwb->lwb_sz - lwb->lwb_nused; + ASSERT3U(reclen + MIN(dlen, sizeof(uint64_t)), <=, lwb_sp); } + dnow = MIN(dlen, lwb_sp - reclen); lr_buf = lwb->lwb_buf + lwb->lwb_nused; bcopy(lrc, lr_buf, reclen); - lrc = (lr_t *)lr_buf; - lrw = (lr_write_t *)lrc; + lrcb = (lr_t *)lr_buf; + lrwb = (lr_write_t *)lrcb; /* * If it's a write, fetch the data or get its blkptr as appropriate. @@ -1098,16 +1108,19 @@ zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) char *dbuf; int error; - if (dlen) { - ASSERT(itx->itx_wr_state == WR_NEED_COPY); + if (itx->itx_wr_state == WR_NEED_COPY) { dbuf = lr_buf + reclen; - lrw->lr_common.lrc_reclen += dlen; + lrcb->lrc_reclen += dnow; + if (lrwb->lr_length > dnow) + lrwb->lr_length = dnow; + lrw->lr_offset += dnow; + lrw->lr_length -= dnow; } else { ASSERT(itx->itx_wr_state == WR_INDIRECT); dbuf = NULL; } error = zilog->zl_get_data( - itx->itx_private, lrw, dbuf, lwb->lwb_zio); + itx->itx_private, lrwb, dbuf, lwb->lwb_zio); if (error == EIO) { txg_wait_synced(zilog->zl_dmu_pool, txg); return (lwb); @@ -1126,12 +1139,18 @@ zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) * equal to the itx sequence number because not all transactions * are synchronous, and sometimes spa_sync() gets there first. */ - lrc->lrc_seq = ++zilog->zl_lr_seq; /* we are single threaded */ - lwb->lwb_nused += reclen + dlen; + lrcb->lrc_seq = ++zilog->zl_lr_seq; /* we are single threaded */ + lwb->lwb_nused += reclen + dnow; lwb->lwb_max_txg = MAX(lwb->lwb_max_txg, txg); ASSERT3U(lwb->lwb_nused, <=, lwb->lwb_sz); ASSERT0(P2PHASE(lwb->lwb_nused, sizeof (uint64_t))); + dlen -= dnow; + if (dlen > 0) { + zilog->zl_cur_used += reclen; + goto cont; + } + return (lwb); } @@ -1145,7 +1164,6 @@ zil_itx_create(uint64_t txtype, size_t lrsize) itx = kmem_alloc(offsetof(itx_t, itx_lr) + lrsize, KM_SLEEP); itx->itx_lr.lrc_txtype = txtype; itx->itx_lr.lrc_reclen = lrsize; - itx->itx_sod = lrsize; /* if write & WR_NEED_COPY will be increased */ itx->itx_lr.lrc_seq = 0; /* defensive */ itx->itx_sync = B_TRUE; /* default is synchronous */ @@ -1294,11 +1312,8 @@ zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *tx) * this itxg. Save the itxs for release below. * This should be rare. */ - atomic_add_64(&zilog->zl_itx_list_sz, -itxg->itxg_sod); - itxg->itxg_sod = 0; clean = itxg->itxg_itxs; } - ASSERT(itxg->itxg_sod == 0); itxg->itxg_txg = txg; itxs = itxg->itxg_itxs = kmem_zalloc(sizeof (itxs_t), KM_SLEEP); @@ -1310,8 +1325,6 @@ zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *tx) } if (itx->itx_sync) { list_insert_tail(&itxs->i_sync_list, itx); - atomic_add_64(&zilog->zl_itx_list_sz, itx->itx_sod); - itxg->itxg_sod += itx->itx_sod; } else { avl_tree_t *t = &itxs->i_async_tree; uint64_t foid = ((lr_ooo_t *)&itx->itx_lr)->lr_foid; @@ -1359,8 +1372,6 @@ zil_clean(zilog_t *zilog, uint64_t synced_txg) ASSERT3U(itxg->itxg_txg, <=, synced_txg); ASSERT(itxg->itxg_txg != 0); ASSERT(zilog->zl_clean_taskq != NULL); - atomic_add_64(&zilog->zl_itx_list_sz, -itxg->itxg_sod); - itxg->itxg_sod = 0; clean_me = itxg->itxg_itxs; itxg->itxg_itxs = NULL; itxg->itxg_txg = 0; @@ -1384,7 +1395,6 @@ zil_get_commit_list(zilog_t *zilog) { uint64_t otxg, txg; list_t *commit_list = &zilog->zl_itx_commit_list; - uint64_t push_sod = 0; if (spa_freeze_txg(zilog->zl_spa) != UINT64_MAX) /* ziltest support */ otxg = ZILTEST_TXG; @@ -1401,12 +1411,9 @@ zil_get_commit_list(zilog_t *zilog) } list_move_tail(commit_list, &itxg->itxg_itxs->i_sync_list); - push_sod += itxg->itxg_sod; - itxg->itxg_sod = 0; mutex_exit(&itxg->itxg_lock); } - atomic_add_64(&zilog->zl_itx_list_sz, -push_sod); } /* 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 7cf8dc46a3a..0b6813a96a9 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c @@ -2908,20 +2908,21 @@ zio_dva_unallocate(zio_t *zio, zio_gang_node_t *gn, blkptr_t *bp) */ int zio_alloc_zil(spa_t *spa, uint64_t txg, blkptr_t *new_bp, blkptr_t *old_bp, - uint64_t size, boolean_t use_slog) + uint64_t size, boolean_t *slog) { int error = 1; ASSERT(txg > spa_syncing_txg(spa)); - if (use_slog) { - error = metaslab_alloc(spa, spa_log_class(spa), size, - new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID, NULL); - } - - if (error) { + error = metaslab_alloc(spa, spa_log_class(spa), size, + new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID, NULL); + if (error == 0) { + *slog = TRUE; + } else { error = metaslab_alloc(spa, spa_normal_class(spa), size, new_bp, 1, txg, old_bp, METASLAB_HINTBP_AVOID, NULL); + if (error == 0) + *slog = FALSE; } if (error == 0) { diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c index 908de12a46c..1847ad54906 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c @@ -1387,54 +1387,44 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_t *tx, offset_t off, ssize_t resid, { uint32_t blocksize = zv->zv_volblocksize; zilog_t *zilog = zv->zv_zilog; - boolean_t slogging; - ssize_t immediate_write_sz; + itx_wr_state_t write_state; if (zil_replaying(zilog, tx)) return; - immediate_write_sz = (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) - ? 0 : zvol_immediate_write_sz; - - slogging = spa_has_slogs(zilog->zl_spa) && - (zilog->zl_logbias == ZFS_LOGBIAS_LATENCY); + if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT) + write_state = WR_INDIRECT; + else if (!spa_has_slogs(zilog->zl_spa) && + resid >= blocksize && blocksize > zvol_immediate_write_sz) + write_state = WR_INDIRECT; + else if (sync) + write_state = WR_COPIED; + else + write_state = WR_NEED_COPY; while (resid) { itx_t *itx; lr_write_t *lr; - ssize_t len; - itx_wr_state_t write_state; + itx_wr_state_t wr_state = write_state; + ssize_t len = resid; - /* - * Unlike zfs_log_write() we can be called with - * upto DMU_MAX_ACCESS/2 (5MB) writes. - */ - if (blocksize > immediate_write_sz && !slogging && - resid >= blocksize && off % blocksize == 0) { - write_state = WR_INDIRECT; /* uses dmu_sync */ - len = blocksize; - } else if (sync) { - write_state = WR_COPIED; - len = MIN(ZIL_MAX_LOG_DATA, resid); - } else { - write_state = WR_NEED_COPY; - len = MIN(ZIL_MAX_LOG_DATA, resid); - } + if (wr_state == WR_COPIED && resid > ZIL_MAX_COPIED_DATA) + wr_state = WR_NEED_COPY; + else if (wr_state == WR_INDIRECT) + len = MIN(blocksize - P2PHASE(off, blocksize), resid); itx = zil_itx_create(TX_WRITE, sizeof (*lr) + - (write_state == WR_COPIED ? len : 0)); + (wr_state == WR_COPIED ? len : 0)); lr = (lr_write_t *)&itx->itx_lr; - if (write_state == WR_COPIED && dmu_read(zv->zv_objset, + if (wr_state == WR_COPIED && dmu_read(zv->zv_objset, ZVOL_OBJ, off, len, lr + 1, DMU_READ_NO_PREFETCH) != 0) { zil_itx_destroy(itx); itx = zil_itx_create(TX_WRITE, sizeof (*lr)); lr = (lr_write_t *)&itx->itx_lr; - write_state = WR_NEED_COPY; + wr_state = WR_NEED_COPY; } - itx->itx_wr_state = write_state; - if (write_state == WR_NEED_COPY) - itx->itx_sod += len; + itx->itx_wr_state = wr_state; lr->lr_foid = ZVOL_OBJ; lr->lr_offset = off; lr->lr_length = len; From 5dba303d015407888e700bc2d56a867b9ae97c34 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 17 Nov 2016 21:02:55 +0000 Subject: [PATCH 157/204] Use bogus_page to properly reduce number of I/Os in sendfile(2). The new sendfile_swapin() loop works this way: - Find first invalid page in the request. - Do vm_pager_has_page() and get count of pages, that can be taken in single I/O. - Trim valid pages from the end of the request. - Cycle through the request and substitute to bogus_page all valid pages that are in the middle of the request. - After I/O launched (pager copies array of pages into buf(9), it is important to restore proper page pointers with help vm_page_lookup(). Count bogus pages used and report them in sendfile stats. --- sys/kern/kern_sendfile.c | 80 ++++++++++++++++++++++------------------ sys/sys/sf_buf.h | 1 + usr.bin/netstat/mbuf.c | 3 ++ 3 files changed, 49 insertions(+), 35 deletions(-) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index cac4d3649e6..66b1a960551 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -62,6 +62,8 @@ __FBSDID("$FreeBSD$"); #include #include +extern vm_page_t bogus_page; + /* * Structure describing a single sendfile(2) I/O, which may consist of * several underlying pager I/Os. @@ -258,7 +260,8 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, int error) struct socket *so; for (int i = 0; i < count; i++) - vm_page_xunbusy(pg[i]); + if (pg[i] != bogus_page) + vm_page_xunbusy(pg[i]); if (error) sfio->error = error; @@ -341,51 +344,53 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, off_t off, off_t len, } /* - * Now 'i' points to first invalid page, iterate further - * to make 'j' point at first valid after a bunch of - * invalid ones. - */ - for (j = i + 1; j < npages; j++) - if (vm_page_is_valid(pa[j], vmoff(j, off) & PAGE_MASK, - xfsize(j, npages, off, len))) { - SFSTAT_INC(sf_pages_valid); - break; - } - - /* - * Now we got region of invalid pages between 'i' and 'j'. - * Check that they belong to pager. They may not be there, - * which is a regular situation for shmem pager. For vnode - * pager this happens only in case of sparse file. + * Next page is invalid. Check if it belongs to pager. It + * may not be there, which is a regular situation for shmem + * pager. For vnode pager this happens only in case of + * a sparse file. * * Important feature of vm_pager_has_page() is the hint * stored in 'a', about how many pages we can pagein after * this page in a single I/O. */ - while (!vm_pager_has_page(obj, OFF_TO_IDX(vmoff(i, off)), - NULL, &a) && i < j) { + if (!vm_pager_has_page(obj, OFF_TO_IDX(vmoff(i, off)), NULL, + &a)) { pmap_zero_page(pa[i]); pa[i]->valid = VM_PAGE_BITS_ALL; pa[i]->dirty = 0; vm_page_xunbusy(pa[i]); i++; - } - if (i == j) continue; + } /* * We want to pagein as many pages as possible, limited only * by the 'a' hint and actual request. - * - * We should not pagein into already valid page, thus if - * 'j' didn't reach last page, trim by that page. - * - * When the pagein fulfils the request, also specify readahead. */ - if (j < npages) - a = min(a, j - i - 1); count = min(a + 1, npages - i); + /* + * We should not pagein into a valid page, thus we first trim + * any valid pages off the end of request, and substitute + * to bogus_page those, that are in the middle. + */ + for (j = i + count - 1; j > i; j--) { + if (vm_page_is_valid(pa[j], vmoff(j, off) & PAGE_MASK, + xfsize(j, npages, off, len))) { + count--; + rhpages = 0; + } else + break; + } + for (j = i + 1; j < i + count - 1; j++) + if (vm_page_is_valid(pa[j], vmoff(j, off) & PAGE_MASK, + xfsize(j, npages, off, len))) { + vm_page_xunbusy(pa[j]); + SFSTAT_INC(sf_pages_valid); + SFSTAT_INC(sf_pages_bogus); + pa[j] = bogus_page; + } + refcount_acquire(&sfio->nios); rv = vm_pager_get_pages_async(obj, pa + i, count, NULL, i + count == npages ? &rhpages : NULL, @@ -398,13 +403,18 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, off_t off, off_t len, if (i + count == npages) SFSTAT_ADD(sf_rhpages_read, rhpages); -#ifdef INVARIANTS - for (j = i; j < i + count && j < npages; j++) - KASSERT(pa[j] == vm_page_lookup(obj, - OFF_TO_IDX(vmoff(j, off))), - ("pa[j] %p lookup %p\n", pa[j], - vm_page_lookup(obj, OFF_TO_IDX(vmoff(j, off))))); -#endif + /* + * Restore the valid page pointers. They are already + * unbusied, but still wired. + */ + for (j = i; j < i + count; j++) + if (pa[j] == bogus_page) { + pa[j] = vm_page_lookup(obj, + OFF_TO_IDX(vmoff(j, off))); + KASSERT(pa[j], ("%s: page %p[%d] disappeared", + __func__, pa, j)); + + } i += count; nios++; } diff --git a/sys/sys/sf_buf.h b/sys/sys/sf_buf.h index b5970d95fd8..6aebe430ab6 100644 --- a/sys/sys/sf_buf.h +++ b/sys/sys/sf_buf.h @@ -41,6 +41,7 @@ struct sfstat { /* sendfile statistics */ uint64_t sf_busy; /* times aborted on a busy page */ uint64_t sf_allocfail; /* times sfbuf allocation failed */ uint64_t sf_allocwait; /* times sfbuf allocation had to wait */ + uint64_t sf_pages_bogus; /* times bogus page was used */ }; #ifdef _KERNEL diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c index 8b95ddddd04..c1d0dd35376 100644 --- a/usr.bin/netstat/mbuf.c +++ b/usr.bin/netstat/mbuf.c @@ -340,6 +340,9 @@ mbpr(void *kvmd, u_long mbaddr) xo_emit("{:sendfile-pages-valid/%ju} " "{N:pages were valid at time of a sendfile request}\n", (uintmax_t)sfstat.sf_pages_valid); + xo_emit("{:sendfile-pages-bogus/%ju} " + "{N:pages were valid and substituted to bogus page}\n", + (uintmax_t)sfstat.sf_pages_bogus); xo_emit("{:sendfile-requested-readahead/%ju} " "{N:pages were requested for read ahead by applications}\n", (uintmax_t)sfstat.sf_rhpages_requested); From 00b5ffde8e0f31c936d10583daa9a958e1d1ebbb Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 17 Nov 2016 21:36:18 +0000 Subject: [PATCH 158/204] Add flag SF_USER_READAHEAD to sendfile(2). When specified, the syscall won't do any speculations about readahead, and use exactly the amount of readahead specified by user. E.g. setting SF_FLAGS(0, SF_USER_READAHEAD) will guarantee that no readahead at all will be performed. --- lib/libc/sys/sendfile.2 | 44 ++++++++++++++++++++++++++++++---------- sys/kern/kern_sendfile.c | 13 +++++++++--- sys/sys/socket.h | 1 + 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index 2b52dd9c883..313c349ee9f 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2016 +.Dd November 17, 2016 .Dt SENDFILE 2 .Os .Sh NAME @@ -155,8 +155,33 @@ sleeps until the network stack no longer references the VM pages of the file, making subsequent modifications to it safe. Please note that this is not a guarantee that the data has actually been sent. +.It Dv SF_USER_READAHEAD +.Nm +has some internal heuristics to do readahead when sending data. +This flag forces +.Nm +to override any heuristically calculated readahead and use exactly the +application specified readahead. +See +.Sx SETTING READAHEAD +for more details on readahead. .El .Pp +When using a socket marked for non-blocking I/O, +.Fn sendfile +may send fewer bytes than requested. +In this case, the number of bytes successfully +written is returned in +.Fa *sbytes +(if specified), +and the error +.Er EAGAIN +is returned. +.Sh SETTING READAHEAD +.Nm +uses internal heuristics based on request size and file system layout +to do readahead. +Additionally application may request extra readahead. The most significant 16 bits of .Fa flags specify amount of pages that @@ -173,16 +198,13 @@ flag: SF_FLAGS(16, SF_NOCACHE) .Ed .Pp -When using a socket marked for non-blocking I/O, -.Fn sendfile -may send fewer bytes than requested. -In this case, the number of bytes successfully -written is returned in -.Fa *sbytes -(if specified), -and the error -.Er EAGAIN -is returned. +.Nm +will use either application specified readahead or internally calculated, +whichever is bigger. +Setting flag +.Dv SF_USER_READAHEAD +would turn off any heuristics and set maximum possible readahead length to +the number of pages specified via flags. .Sh IMPLEMENTATION NOTES The .Fx diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 66b1a960551..2b21b3831d0 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -706,13 +706,20 @@ retry_space: /* * Calculate maximum allowed number of pages for readahead - * at this iteration. First, we allow readahead up to "rem". + * at this iteration. If SF_USER_READAHEAD was set, we don't + * do any heuristics and use exactly the value supplied by + * application. Otherwise, we allow readahead up to "rem". * If application wants more, let it be, but there is no * reason to go above MAXPHYS. Also check against "obj_size", * since vm_pager_has_page() can hint beyond EOF. */ - rhpages = howmany(rem + (off & PAGE_MASK), PAGE_SIZE) - npages; - rhpages += SF_READAHEAD(flags); + if (flags & SF_USER_READAHEAD) { + rhpages = SF_READAHEAD(flags); + } else { + rhpages = howmany(rem + (off & PAGE_MASK), PAGE_SIZE) - + npages; + rhpages += SF_READAHEAD(flags); + } rhpages = min(howmany(MAXPHYS, PAGE_SIZE), rhpages); rhpages = min(howmany(obj_size - trunc_page(off), PAGE_SIZE) - npages, rhpages); diff --git a/sys/sys/socket.h b/sys/sys/socket.h index f23b5f6994c..ea3d9b6bee3 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -590,6 +590,7 @@ struct sf_hdtr { #define SF_NODISKIO 0x00000001 #define SF_MNOWAIT 0x00000002 /* obsolete */ #define SF_SYNC 0x00000004 +#define SF_USER_READAHEAD 0x00000008 #define SF_NOCACHE 0x00000010 #define SF_FLAGS(rh, flags) (((rh) << 16) | (flags)) From 260b8f08e6738e43715f83d6cb8e87b2f5dc22b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imre=20Vad=C3=A1sz?= Date: Thu, 17 Nov 2016 21:52:00 +0000 Subject: [PATCH 159/204] [net80211] Don't check bgscanidle setting in net80211 for full-offload scan. If full-offload scan is used, the NIC driver (or rather the firmware of the NIC) should take care of interrupting and continuing the background scan. So net80211 should ignore the vap->iv_bgscanidle setting then, instead the NIC driver might look at this setting and pass it on to the firmware in some way if possible. Since full-offload scans won't be explicitly interrupted by net80211, it also doesn't really make sense to check the vap->iv_bgscanidle condition in that case, before starting a background scan. If the NIC driver advertises background scan support and full-offload scanning, the firmware should be able to execute that scan without interfering too much with our data traffic. Reviewed by: adrian, avos Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8539 --- sys/net80211/ieee80211_scan_sta.c | 3 ++- sys/net80211/ieee80211_sta.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_scan_sta.c b/sys/net80211/ieee80211_scan_sta.c index 47b0573639b..82d65c6ecf7 100644 --- a/sys/net80211/ieee80211_scan_sta.c +++ b/sys/net80211/ieee80211_scan_sta.c @@ -1336,7 +1336,8 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct ieee80211vap *vap) * XXX force immediate switch on scan complete */ if (!IEEE80211_IS_CHAN_DTURBO(ic->ic_curchan) && - ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle)) + ((vap->iv_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) || + ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle))) ieee80211_bg_scan(vap, 0); return; } diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 9100fb0817e..04fafe9c977 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1230,6 +1230,7 @@ done: * o bg scan is active * o no channel switch is pending * o there has not been any traffic recently + * o no full-offload scan support (no need for explicitly continuing scan then) * * Note we do not check if there is an administrative enable; * this is only done to start the scan. We assume that any @@ -1243,6 +1244,7 @@ contbgscan(struct ieee80211vap *vap) return ((ic->ic_flags_ext & IEEE80211_FEXT_BGSCAN) && (ic->ic_flags & IEEE80211_F_CSAPENDING) == 0 && + !(vap->iv_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) && vap->iv_state == IEEE80211_S_RUN && /* XXX? */ ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle)); } @@ -1253,7 +1255,7 @@ contbgscan(struct ieee80211vap *vap) * o no channel switch is pending * o we are not boosted on a dynamic turbo channel * o there has not been a scan recently - * o there has not been any traffic recently + * o there has not been any traffic recently (don't check if full-offload scan) */ static __inline int startbgscan(struct ieee80211vap *vap) @@ -1266,7 +1268,8 @@ startbgscan(struct ieee80211vap *vap) !IEEE80211_IS_CHAN_DTURBO(ic->ic_curchan) && #endif ieee80211_time_after(ticks, ic->ic_lastscan + vap->iv_bgscanintvl) && - ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle)); + ((vap->iv_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) || + ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle))); } static void From bddbe3b2b13a54968d93e93411de50706db39cc7 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Thu, 17 Nov 2016 22:49:51 +0000 Subject: [PATCH 160/204] rc.subr: Swap checks so we only fork sysctl if *_oomprotect is set. --- etc/rc.subr | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/etc/rc.subr b/etc/rc.subr index 0201f0595c6..7eaa13a9401 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -1206,22 +1206,17 @@ $command $rc_flags $command_args" case "$rc_arg" in start) # We cannot use protect(1) inside jails. - jailed="$(sysctl -n security.jail.jailed)" - if [ ${jailed} -eq 1 ]; then - return $_return - fi - if [ -n "$_oomprotect" ]; then - if [ -f "${PROTECT}" ]; then - pid=$(check_process $command) - case $_oomprotect in - [Aa][Ll][Ll]) - ${PROTECT} -i -p ${pid} - ;; - [Yy][Ee][Ss]) - ${PROTECT} -p ${pid} - ;; - esac - fi + if [ -n "$_oomprotect" ] && [ -f "${PROTECT}" ] && + [ "$(sysctl -n security.jail.jailed)" -eq 0 ]; then + pid=$(check_process $command) + case $_oomprotect in + [Aa][Ll][Ll]) + ${PROTECT} -i -p ${pid} + ;; + [Yy][Ee][Ss]) + ${PROTECT} -p ${pid} + ;; + esac fi ;; esac From 00c468348fae4e4245788c1f1ed8320ff6e66631 Mon Sep 17 00:00:00 2001 From: Stephen Hurd Date: Thu, 17 Nov 2016 23:05:34 +0000 Subject: [PATCH 161/204] Add missing newline in error mesage Approved by: davidch MFC after: 13 days Sponsored by: Broadcom Corporation --- sys/dev/bnxt/bnxt_hwrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bnxt/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_hwrm.c index 53f880731c6..a6c5cf17b1a 100644 --- a/sys/dev/bnxt/bnxt_hwrm.c +++ b/sys/dev/bnxt/bnxt_hwrm.c @@ -424,7 +424,7 @@ bnxt_hwrm_func_qcaps(struct bnxt_softc *softc) pf->max_rx_wm_flows = le32toh(resp->max_rx_wm_flows); } if (!_is_valid_ether_addr(func->mac_addr)) { - device_printf(softc->dev, "Invalid ethernet address, generating random locally administered address"); + device_printf(softc->dev, "Invalid ethernet address, generating random locally administered address\n"); get_random_ether_addr(func->mac_addr); } From 9952941dd992011168c5e2acccc57658220da069 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 17 Nov 2016 23:16:56 +0000 Subject: [PATCH 162/204] Cleanup some leftovers from '-s' removal in r302792. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- usr.bin/gcore/gcore.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c index 3d4c5052eb7..6932cc3c666 100644 --- a/usr.bin/gcore/gcore.c +++ b/usr.bin/gcore/gcore.c @@ -143,21 +143,6 @@ main(int argc, char *argv[]) fd = open(corefile, O_RDWR|O_CREAT|O_TRUNC, DEFFILEMODE); if (fd < 0) err(1, "%s", corefile); - /* - * The semantics of the 's' flag is to stop the target process. - * Previous versions of gcore would manage this by trapping SIGHUP, - * SIGINT and SIGTERM (to be passed to the target pid), and then - * signal the child to stop. - * - * However, this messes up if the selected dumper uses ptrace calls - * that leave the child already stopped. The waitpid call in elfcore - * never returns. - * - * The best thing to do here is to externalize the 's' flag and let - * each dumper dispose of what that means, if anything. For the elfcore - * dumper, the 's' flag is a no-op since the ptrace attach stops the - * process in question already. - */ dumper->dump(efd, fd, pid); (void)close(fd); @@ -169,6 +154,6 @@ void usage(void) { - (void)fprintf(stderr, "usage: gcore [-s] [-c core] [executable] pid\n"); + (void)fprintf(stderr, "usage: gcore [-c core] [executable] pid\n"); exit(1); } From 5e680acd76fc207d322b99ec12aa4900964beb1e Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 18 Nov 2016 00:13:30 +0000 Subject: [PATCH 163/204] If FreeBSD source tree is a subproject of a bigger project, then .git or .hg may reside above FreeBSD sources root. Provide function findvcs() that will climb up and seek for presence of a VCS directory. Reviewed by: imp (earlier version of the patch) --- sys/conf/newvers.sh | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index ca2ebc82247..72e9ae60610 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -39,6 +39,28 @@ fi RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" +# +# findvcs dir +# Looks up directory dir at world root and up the filesystem +# +findvcs() +{ + local savedir + + savedir=$(pwd) + cd ${SYSDIR}/.. + while [ $(pwd) != "/" ]; do + if [ -d "./$1" ]; then + VCSDIR=$(pwd)"/$1" + cd ${savedir} + return 0 + fi + cd .. + done + cd ${savedir} + return 1 +} + if [ -z "${SYSDIR}" ]; then SYSDIR=$(dirname $0)/.. fi @@ -142,19 +164,20 @@ for dir in /usr/bin /usr/local/bin; do p4_cmd=${dir}/p4 fi done -if [ -d "${SYSDIR}/../.git" ] ; then + +if findvcs .git; then for dir in /usr/bin /usr/local/bin; do if [ -x "${dir}/git" ] ; then - git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git" + git_cmd="${dir}/git --git-dir=${VCSDIR}" break fi done fi -if [ -d "${SYSDIR}/../.hg" ] ; then +if findvcs .hg; then for dir in /usr/bin /usr/local/bin; do if [ -x "${dir}/hg" ] ; then - hg_cmd="${dir}/hg -R ${SYSDIR}/.." + hg_cmd="${dir}/hg -R ${VCSDIR}" break fi done @@ -193,7 +216,7 @@ if [ -n "$git_cmd" ] ; then if [ -n "$git_b" ] ; then git="${git}(${git_b})" fi - if $git_cmd --work-tree=${SYSDIR}/.. diff-index \ + if $git_cmd --work-tree=${VCSDIR}/.. diff-index \ --name-only HEAD | read dummy; then git="${git}-dirty" fi From 86112ec5ae78b6842b187b210f5989daee1eeadc Mon Sep 17 00:00:00 2001 From: Ryan Stone Date: Fri, 18 Nov 2016 02:29:09 +0000 Subject: [PATCH 164/204] Add a dtrace script for collecting schedgraph data --- tools/sched/make_ktr.sh | 37 +++++++++++ tools/sched/schedgraph.d | 135 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100755 tools/sched/make_ktr.sh create mode 100755 tools/sched/schedgraph.d diff --git a/tools/sched/make_ktr.sh b/tools/sched/make_ktr.sh new file mode 100755 index 00000000000..44aff7b37b1 --- /dev/null +++ b/tools/sched/make_ktr.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# +# Copyright (c) 2012 Ryan Stone +# 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 AUTHORS 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 AUTHORS 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$ +# + +if [ "$#" -ne 2 ] +then + echo "Usage: make_ktr input output" >&2 + exit 1 +fi + +sort -k 2nrb $1 | cat -n > $2 + diff --git a/tools/sched/schedgraph.d b/tools/sched/schedgraph.d new file mode 100755 index 00000000000..129c50d2532 --- /dev/null +++ b/tools/sched/schedgraph.d @@ -0,0 +1,135 @@ +#!/usr/sbin/dtrace -s + +/*- + * Copyright (c) 2012-2016 Ryan Stone + * 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$ + */ + +/* + * DTrace script for collecting schedgraph data. Run the output + * of this script through make_ktr before feeding it into + * schedgraph.py + * + * e.g. + * # ./schedgraph.d > /tmp/sched.out + * # ./make_ktr.sh /tmp/sched.out /tmp/sched.ktr + * # python schedgraph.py /tmp/sched.ktr 1 + */ + +#pragma D option quiet +#pragma D option bufpolicy=ring + +inline int TDF_IDLETD = 0x00000020; + +/* + * Reasons that the current thread can not be run yet. + * More than one may apply. + */ +inline int TDI_SUSPENDED = 0x0001; /* On suspension queue. */ +inline int TDI_SLEEPING = 0x0002; /* Actually asleep! (tricky). */ +inline int TDI_SWAPPED = 0x0004; /* Stack not in mem. Bad juju if run. */ +inline int TDI_LOCK = 0x0008; /* Stopped on a lock. */ +inline int TDI_IWAIT = 0x0010; /* Awaiting interrupt. */ + +inline string KTDSTATE[struct thread * td] = \ + (((td)->td_inhibitors & TDI_SLEEPING) != 0 ? "sleep" : \ + ((td)->td_inhibitors & TDI_SUSPENDED) != 0 ? "suspended" : \ + ((td)->td_inhibitors & TDI_SWAPPED) != 0 ? "swapped" : \ + ((td)->td_inhibitors & TDI_LOCK) != 0 ? "blocked" : \ + ((td)->td_inhibitors & TDI_IWAIT) != 0 ? "iwait" : "yielding"); + +/* + * NOCPU changed from 255 to -1 at some point. This hacky test will work on a + * kernel compiled with either version. + */ +inline int is_nocpu[int cpu] = cpu < 0 || cpu > `mp_maxid; + +sched:::load-change +/ is_nocpu[args[0]] / +{ + printf("%d %d KTRGRAPH group:\"load\", id:\"global load\", counter:\"%d\", attributes: \"none\"\n", cpu, timestamp, args[1]); +} + +sched:::load-change +/ !is_nocpu[args[0]] / +{ + printf("%d %d KTRGRAPH group:\"load\", id:\"CPU %d load\", counter:\"%d\", attributes: \"none\"\n", cpu, timestamp, args[0], args[1]); + +} + +proc:::exit +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"proc exit\", attributes: prio:td\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid); +} + +proc:::lwp-exit +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"exit\", attributes: prio:td\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid); +} + +sched:::change-pri +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", point:\"priority change\", attributes: prio:%d, new prio:%d, linkedto:\"%s/%s tid %d\"\n", cpu, timestamp, args[0]->td_proc->p_comm, args[0]->td_name, args[0]->td_tid, args[0]->td_priority, arg2, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid); +} + +sched:::lend-pri +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", point:\"lend prio\", attributes: prio:%d, new prio:%d, linkedto:\"%s/%s tid %d\"\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid, args[0]->td_priority, arg2, args[0]->td_proc->p_comm, args[0]->td_name, args[0]->td_tid); +} + +sched:::enqueue +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"runq add\", attributes: prio:%d, linkedto:\"%s/%s tid %d\"\n", cpu, timestamp, args[0]->td_proc->p_comm, args[0]->td_name, args[0]->td_tid, args[0]->td_priority, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid); + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", point:\"wokeup\", attributes: linkedto:\"%s/%s tid %d\"\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid, args[0]->td_proc->p_comm, args[0]->td_name, args[0]->td_tid); +} + +sched:::dequeue +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"runq rem\", attributes: prio:%d, linkedto:\"%s/%s tid %d\"\n", cpu, timestamp, args[0]->td_proc->p_comm, args[0]->td_name, args[0]->td_tid, args[0]->td_priority, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid); +} + +sched:::tick +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", point:\"statclock\", attributes: prio:%d, stathz:%d\n", cpu, timestamp, args[0]->td_proc->p_comm, args[0]->td_name, args[0]->td_tid, args[0]->td_priority, `stathz ? `stathz : `hz); +} + +sched:::off-cpu +/ curthread->td_flags & TDF_IDLETD / +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"idle\", attributes: prio:%d\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid, curthread->td_priority); +} + +sched:::off-cpu +/ (curthread->td_flags & TDF_IDLETD) == 0 / +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"%s\", attributes: prio:%d, wmesg:\"%s\", lockname:\"%s\"\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid, KTDSTATE[curthread], curthread->td_priority, curthread->td_wmesg ? stringof(curthread->td_wmesg) : "(null)", curthread->td_lockname ? stringof(curthread->td_lockname) : "(null)"); +} + +sched:::on-cpu +{ + printf("%d %d KTRGRAPH group:\"thread\", id:\"%s/%s tid %d\", state:\"running\", attributes: prio:%d\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid, curthread->td_priority); +} + From 188011dbf2e1457812641cb0fd39d56811f742fc Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 18 Nov 2016 03:11:11 +0000 Subject: [PATCH 165/204] Support fetching RFLAGS in fasttrap_getreg(). MFC after: 1 week --- sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c index e1f95de8a8d..1ffe6a7a809 100644 --- a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c +++ b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c @@ -1871,9 +1871,7 @@ fasttrap_getreg(struct reg *rp, uint_t reg) case REG_ERR: return (rp->r_err); case REG_RIP: return (rp->r_rip); case REG_CS: return (rp->r_cs); -#ifdef illumos - case REG_RFL: return (rp->r_rfl); -#endif + case REG_RFL: return (rp->r_rflags); case REG_RSP: return (rp->r_rsp); case REG_SS: return (rp->r_ss); case REG_FS: return (rp->r_fs); From da69b8f9d127e3ae394f74501e694aadecc1a7ad Mon Sep 17 00:00:00 2001 From: Sean Bruno Date: Fri, 18 Nov 2016 04:19:21 +0000 Subject: [PATCH 166/204] iflib updates and fixes: - reset gen on down - initialize admin task statically - drain mp_ring on down - don't drop context lock on stop - reset error stats on down - fix typo in min_latency sysctl - return ENOBUFS from if_transmit if the driver isn't running or the link is down Submitted by: mmacy@nextbsd.org Reviewed by: shurd MFC after: 2 days Sponsored by: Isilon and Limelight Networks Differential Revision: https://reviews.freebsd.org/D8558 --- sys/net/iflib.c | 136 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 98 insertions(+), 38 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 42f0d4ce93e..25f5c741a88 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -93,7 +93,6 @@ __FBSDID("$FreeBSD$"); #include #endif - /* * enable accounting of every mbuf as it comes in to and goes out of iflib's software descriptor references */ @@ -500,7 +499,7 @@ static SYSCTL_NODE(_net, OID_AUTO, iflib, CTLFLAG_RD, 0, static int iflib_min_tx_latency = 0; SYSCTL_INT(_net_iflib, OID_AUTO, min_tx_latency, CTLFLAG_RW, - &iflib_min_tx_latency, 0, "minimize transmit latency at the possibel expense of throughput"); + &iflib_min_tx_latency, 0, "minimize transmit latency at the possible expense of throughput"); #if IFLIB_DEBUG_COUNTERS @@ -595,10 +594,23 @@ SYSCTL_INT(_net_iflib, OID_AUTO, verbose_debug, CTLFLAG_RW, &iflib_verbose_debug, 0, "enable verbose debugging"); #define DBG_COUNTER_INC(name) atomic_add_int(&(iflib_ ## name), 1) +static void +iflib_debug_reset(void) +{ + iflib_tx_seen = iflib_tx_sent = iflib_tx_encap = iflib_rx_allocs = + iflib_fl_refills = iflib_fl_refills_large = iflib_tx_frees = + iflib_txq_drain_flushing = iflib_txq_drain_oactive = + iflib_txq_drain_notready = iflib_txq_drain_encapfail = + iflib_encap_load_mbuf_fail = iflib_encap_txq_avail_fail = + iflib_encap_txd_encap_fail = iflib_task_fn_rxs = iflib_rx_intr_enables = + iflib_fast_intrs = iflib_intr_link = iflib_intr_msix = iflib_rx_unavail = + iflib_rx_ctx_inactive = iflib_rx_zero_len = iflib_rx_if_input = + iflib_rx_mbuf_null = iflib_rxd_flush = 0; +} #else #define DBG_COUNTER_INC(name) - +static void iflib_debug_reset(void) {} #endif @@ -619,6 +631,7 @@ static int iflib_register(if_ctx_t); static void iflib_init_locked(if_ctx_t ctx); static void iflib_add_device_sysctl_pre(if_ctx_t ctx); static void iflib_add_device_sysctl_post(if_ctx_t ctx); +static void iflib_ifmp_purge(iflib_txq_t txq); #ifdef DEV_NETMAP @@ -1266,11 +1279,6 @@ iflib_txsd_alloc(iflib_txq_t txq) sctx->isc_tx_maxsize, nsegments, sctx->isc_tx_maxsegsize); goto fail; } -#ifdef IFLIB_DIAGNOSTICS - device_printf(dev,"maxsize: %zd nsegments: %d maxsegsize: %zd\n", - sctx->isc_tx_maxsize, nsegments, sctx->isc_tx_maxsegsize); - -#endif if ((err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ @@ -1287,11 +1295,6 @@ iflib_txsd_alloc(iflib_txq_t txq) goto fail; } -#ifdef IFLIB_DIAGNOSTICS - device_printf(dev,"TSO maxsize: %d ntsosegments: %d maxsegsize: %d\n", - scctx->isc_tx_tso_size_max, ntsosegments, - scctx->isc_tx_tso_segsize_max); -#endif if (!(txq->ift_sds.ifsd_flags = (uint8_t *) malloc(sizeof(uint8_t) * scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { @@ -1921,20 +1924,23 @@ iflib_stop(if_ctx_t ctx) if_setdrvflagbits(ctx->ifc_ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); IFDI_INTR_DISABLE(ctx); - msleep(ctx, &ctx->ifc_mtx, PUSER, "iflib_init", hz); + DELAY(100000); + IFDI_STOP(ctx); + DELAY(100000); + iflib_debug_reset(); /* Wait for current tx queue users to exit to disarm watchdog timer. */ for (i = 0; i < scctx->isc_ntxqsets; i++, txq++) { /* make sure all transmitters have completed before proceeding XXX */ /* clean any enqueued buffers */ - iflib_txq_check_drain(txq, 0); + iflib_ifmp_purge(txq); /* Free any existing tx buffers. */ for (j = 0; j < txq->ift_size; j++) { iflib_txsd_free(ctx, txq, j); } txq->ift_processed = txq->ift_cleaned = txq->ift_cidx_processed = 0; - txq->ift_in_use = txq->ift_cidx = txq->ift_pidx = txq->ift_no_desc_avail = 0; + txq->ift_in_use = txq->ift_gen = txq->ift_cidx = txq->ift_pidx = txq->ift_no_desc_avail = 0; txq->ift_closed = txq->ift_mbuf_defrag = txq->ift_mbuf_defrag_failed = 0; txq->ift_no_tx_dma_setup = txq->ift_txd_encap_efbig = txq->ift_map_failed = 0; txq->ift_pullups = 0; @@ -1951,7 +1957,6 @@ iflib_stop(if_ctx_t ctx) for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) iflib_fl_bufs_free(fl); } - IFDI_STOP(ctx); } static iflib_rxsd_t @@ -2890,22 +2895,27 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) } consumed = mcast_sent = bytes_sent = pkt_sent = 0; count = MIN(avail, TX_BATCH_SIZE); +#ifdef INVARIANTS + if (iflib_verbose_debug) + printf("%s avail=%d ifc_flags=%x txq_avail=%d ", __FUNCTION__, + avail, ctx->ifc_flags, TXQ_AVAIL(txq)); +#endif for (desc_used = i = 0; i < count && TXQ_AVAIL(txq) > MAX_TX_DESC(ctx) + 2; i++) { mp = _ring_peek_one(r, cidx, i); + MPASS(mp != NULL && *mp != NULL); in_use_prev = txq->ift_in_use; - err = iflib_encap(txq, mp); - /* - * What other errors should we bail out for? - */ - if (err == ENOBUFS) { + if ((err = iflib_encap(txq, mp)) == ENOBUFS) { DBG_COUNTER_INC(txq_drain_encapfail); + /* no room - bail out */ break; } consumed++; - if (err) + if (err) { + DBG_COUNTER_INC(txq_drain_encapfail); + /* we can't send this packet - skip it */ continue; - + } pkt_sent++; m = *mp; DBG_COUNTER_INC(tx_sent); @@ -2936,10 +2946,58 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) if_inc_counter(ifp, IFCOUNTER_OPACKETS, pkt_sent); if (mcast_sent) if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast_sent); - +#ifdef INVARIANTS + if (iflib_verbose_debug) + printf("consumed=%d\n", consumed); +#endif return (consumed); } +static uint32_t +iflib_txq_drain_always(struct ifmp_ring *r) +{ + return (1); +} + +static uint32_t +iflib_txq_drain_free(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) +{ + int i, avail; + struct mbuf **mp; + iflib_txq_t txq; + + txq = r->cookie; + + txq->ift_qstatus = IFLIB_QUEUE_IDLE; + CALLOUT_LOCK(txq); + callout_stop(&txq->ift_timer); + callout_stop(&txq->ift_db_check); + CALLOUT_UNLOCK(txq); + + avail = IDXDIFF(pidx, cidx, r->size); + for (i = 0; i < avail; i++) { + mp = _ring_peek_one(r, cidx, i); + m_freem(*mp); + } + MPASS(ifmp_ring_is_stalled(r) == 0); + return (avail); +} + +static void +iflib_ifmp_purge(iflib_txq_t txq) +{ + struct ifmp_ring *r; + + r = txq->ift_br[0]; + r->drain = iflib_txq_drain_free; + r->can_drain = iflib_txq_drain_always; + + ifmp_ring_check_drainage(r, r->size); + + r->drain = iflib_txq_drain; + r->can_drain = iflib_txq_can_drain; +} + static void _task_fn_tx(void *context) { @@ -3073,7 +3131,7 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) if (__predict_false((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || !LINK_ACTIVE(ctx))) { DBG_COUNTER_INC(tx_frees); m_freem(m); - return (0); + return (ENOBUFS); } MPASS(m->m_nextpkt == NULL); @@ -3590,6 +3648,10 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct if (scctx->isc_rss_table_size == 0) scctx->isc_rss_table_size = 64; scctx->isc_rss_table_mask = scctx->isc_rss_table_size-1; + + GROUPTASK_INIT(&ctx->ifc_admin_task, 0, _task_fn_admin, ctx); + /* XXX format name */ + taskqgroup_attach(qgroup_if_config_tqg, &ctx->ifc_admin_task, ctx, -1, "admin"); /* ** Now setup MSI or MSI/X, should ** return us the number of supported @@ -4342,6 +4404,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid, gtask = &ctx->ifc_txqs[qid].ift_task; tqg = qgroup_if_io_tqg; fn = _task_fn_tx; + GROUPTASK_INIT(gtask, 0, fn, q); break; case IFLIB_INTR_RX: q = &ctx->ifc_rxqs[qid]; @@ -4349,9 +4412,11 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid, gtask = &ctx->ifc_rxqs[qid].ifr_task; tqg = qgroup_if_io_tqg; fn = _task_fn_rx; + GROUPTASK_INIT(gtask, 0, fn, q); break; case IFLIB_INTR_ADMIN: q = ctx; + tqrid = -1; info = &ctx->ifc_filter_info; gtask = &ctx->ifc_admin_task; tqg = qgroup_if_config_tqg; @@ -4360,17 +4425,19 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid, default: panic("unknown net intr type"); } - GROUPTASK_INIT(gtask, 0, fn, q); info->ifi_filter = filter; info->ifi_filter_arg = filter_arg; info->ifi_task = gtask; - /* XXX query cpu that rid belongs to */ - err = _iflib_irq_alloc(ctx, irq, rid, iflib_fast_intr, NULL, info, name); - if (err != 0) + if (err != 0) { + device_printf(ctx->ifc_dev, "_iflib_irq_alloc failed %d\n", err); return (err); + } + if (type == IFLIB_INTR_ADMIN) + return (0); + if (tqrid != -1) { cpuid = find_nth(ctx, &cpus, qid); taskqgroup_attach_cpu(tqg, gtask, q, cpuid, irq->ii_rid, name); @@ -4402,13 +4469,6 @@ iflib_softirq_alloc_generic(if_ctx_t ctx, int rid, iflib_intr_type_t type, void tqg = qgroup_if_io_tqg; fn = _task_fn_rx; break; - case IFLIB_INTR_ADMIN: - q = ctx; - gtask = &ctx->ifc_admin_task; - tqg = qgroup_if_config_tqg; - rid = -1; - fn = _task_fn_admin; - break; case IFLIB_INTR_IOV: q = ctx; gtask = &ctx->ifc_vflr_task; @@ -4965,7 +5025,6 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_abdications", CTLFLAG_RD, &txq->ift_br[0]->abdications, "# of consumer abdications in the mp_ring for this queue"); - } if (scctx->isc_nrxqsets > 100) @@ -4987,6 +5046,7 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) CTLFLAG_RD, &rxq->ifr_cq_cidx, 1, "Consumer Index"); } + for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) { snprintf(namebuf, NAME_BUFLEN, "rxq_fl%d", j); fl_node = SYSCTL_ADD_NODE(ctx_list, queue_list, OID_AUTO, namebuf, From 531582f5a9c7cb64a6fc53fe45a3716fd250feed Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 18 Nov 2016 05:33:01 +0000 Subject: [PATCH 167/204] hyperv/pcib: Fix the build for some kernel configs Add the dependency on pci explicitly for the pcib and vmbus drivers. The related Makefiles are updated accordingly too. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft --- sys/conf/files.amd64 | 4 ++-- sys/conf/files.i386 | 4 ++-- sys/modules/hyperv/pcib/Makefile | 2 +- sys/modules/hyperv/vmbus/Makefile | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index c01798852b6..e942020af76 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -292,7 +292,7 @@ dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc -dev/hyperv/pcib/pcib.c optional hyperv +dev/hyperv/pcib/pcib.c optional hyperv pci dev/hyperv/netvsc/hn_nvs.c optional hyperv dev/hyperv/netvsc/hn_rndis.c optional hyperv dev/hyperv/netvsc/if_hn.c optional hyperv @@ -305,7 +305,7 @@ dev/hyperv/utilities/hv_timesync.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv dev/hyperv/vmbus/hyperv.c optional hyperv dev/hyperv/vmbus/hyperv_busdma.c optional hyperv -dev/hyperv/vmbus/vmbus.c optional hyperv +dev/hyperv/vmbus/vmbus.c optional hyperv pci dev/hyperv/vmbus/vmbus_br.c optional hyperv dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 0c21402b855..0df3245d3dc 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -249,7 +249,7 @@ dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc -dev/hyperv/pcib/pcib.c optional hyperv +dev/hyperv/pcib/pcib.c optional hyperv pci dev/hyperv/netvsc/hn_nvs.c optional hyperv dev/hyperv/netvsc/hn_rndis.c optional hyperv dev/hyperv/netvsc/if_hn.c optional hyperv @@ -262,7 +262,7 @@ dev/hyperv/utilities/hv_timesync.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv dev/hyperv/vmbus/hyperv.c optional hyperv dev/hyperv/vmbus/hyperv_busdma.c optional hyperv -dev/hyperv/vmbus/vmbus.c optional hyperv +dev/hyperv/vmbus/vmbus.c optional hyperv pci dev/hyperv/vmbus/vmbus_br.c optional hyperv dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv diff --git a/sys/modules/hyperv/pcib/Makefile b/sys/modules/hyperv/pcib/Makefile index 0ceeecde658..8fc7c09c4a3 100644 --- a/sys/modules/hyperv/pcib/Makefile +++ b/sys/modules/hyperv/pcib/Makefile @@ -5,7 +5,7 @@ KMOD= vmbus_pcib SRCS= pcib.c -SRCS+= bus_if.h device_if.h vmbus_if.h +SRCS+= bus_if.h device_if.h pci_if.h pcib_if.h vmbus_if.h CFLAGS+= -I${.CURDIR}/../../../dev/hyperv/pcib diff --git a/sys/modules/hyperv/vmbus/Makefile b/sys/modules/hyperv/vmbus/Makefile index 105b4f5b751..d6052e51d75 100644 --- a/sys/modules/hyperv/vmbus/Makefile +++ b/sys/modules/hyperv/vmbus/Makefile @@ -13,7 +13,7 @@ SRCS= hyperv.c \ vmbus_et.c \ vmbus_if.c \ vmbus_xact.c -SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h vmbus_if.h +SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h # XXX: for assym.s SRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h opt_compat.h From 50182f13125348509f9674f86ba374cb360223cd Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 18 Nov 2016 06:24:22 +0000 Subject: [PATCH 168/204] hyperv/vmbus,pcib: Add MODULE_DEPEND on pci We'd better add this dependency explicitly, though usually the pci driver is built into the kernel by default. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft --- sys/dev/hyperv/pcib/pcib.c | 1 + sys/dev/hyperv/vmbus/vmbus.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/hyperv/pcib/pcib.c b/sys/dev/hyperv/pcib/pcib.c index 6c86fc1ec9a..2fb2c0259d5 100644 --- a/sys/dev/hyperv/pcib/pcib.c +++ b/sys/dev/hyperv/pcib/pcib.c @@ -1788,3 +1788,4 @@ DEFINE_CLASS_0(pcib, vmbus_pcib_driver, vmbus_pcib_methods, sizeof(struct vmbus_pcib_softc)); DRIVER_MODULE(vmbus_pcib, vmbus, vmbus_pcib_driver, pcib_devclass, 0, 0); MODULE_DEPEND(vmbus_pcib, vmbus, 1, 1, 1); +MODULE_DEPEND(vmbus_pcib, pci, 1, 1, 1); diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index 87182401dd0..4695d957257 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -186,6 +186,7 @@ static devclass_t vmbus_devclass; DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL); MODULE_DEPEND(vmbus, acpi, 1, 1, 1); +MODULE_DEPEND(vmbus, pci, 1, 1, 1); MODULE_VERSION(vmbus, 1); static __inline struct vmbus_softc * From 8c582c7c58f3400b0f5b949a9aa685a58546249f Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 18 Nov 2016 06:44:18 +0000 Subject: [PATCH 169/204] hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.c This makes the file name and the variable naming in the file consistent. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft --- sys/conf/files.amd64 | 2 +- sys/conf/files.i386 | 2 +- sys/dev/hyperv/pcib/{pcib.c => vmbus_pcib.c} | 0 sys/modules/hyperv/pcib/Makefile | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename sys/dev/hyperv/pcib/{pcib.c => vmbus_pcib.c} (100%) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index e942020af76..c6609a31fbf 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -292,7 +292,7 @@ dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc -dev/hyperv/pcib/pcib.c optional hyperv pci +dev/hyperv/pcib/vmbus_pcib.c optional hyperv pci dev/hyperv/netvsc/hn_nvs.c optional hyperv dev/hyperv/netvsc/hn_rndis.c optional hyperv dev/hyperv/netvsc/if_hn.c optional hyperv diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 0df3245d3dc..597376de1a2 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -249,7 +249,7 @@ dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc -dev/hyperv/pcib/pcib.c optional hyperv pci +dev/hyperv/pcib/vmbus_pcib.c optional hyperv pci dev/hyperv/netvsc/hn_nvs.c optional hyperv dev/hyperv/netvsc/hn_rndis.c optional hyperv dev/hyperv/netvsc/if_hn.c optional hyperv diff --git a/sys/dev/hyperv/pcib/pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c similarity index 100% rename from sys/dev/hyperv/pcib/pcib.c rename to sys/dev/hyperv/pcib/vmbus_pcib.c diff --git a/sys/modules/hyperv/pcib/Makefile b/sys/modules/hyperv/pcib/Makefile index 8fc7c09c4a3..1b63a138dc1 100644 --- a/sys/modules/hyperv/pcib/Makefile +++ b/sys/modules/hyperv/pcib/Makefile @@ -4,7 +4,7 @@ ${.CURDIR}/../../../dev/hyperv/vmbus KMOD= vmbus_pcib -SRCS= pcib.c +SRCS= vmbus_pcib.c SRCS+= bus_if.h device_if.h pci_if.h pcib_if.h vmbus_if.h CFLAGS+= -I${.CURDIR}/../../../dev/hyperv/pcib From 439b66c000f5f0f6407b127b1b5eff9977beb61c Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 18 Nov 2016 07:27:41 +0000 Subject: [PATCH 170/204] update the hv_vmbus(4) manual by adding a dependency on pci We enhanced the vmbus driver to support PCIe pass-through recently. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft --- share/man/man4/hv_vmbus.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man4/hv_vmbus.4 b/share/man/man4/hv_vmbus.4 index d992be521b4..bdee598af53 100644 --- a/share/man/man4/hv_vmbus.4 +++ b/share/man/man4/hv_vmbus.4 @@ -35,6 +35,7 @@ To compile this driver into the kernel, place the following lines in the system kernel configuration file: .Bd -ragged -offset indent .Cd "device hyperv" +.Cd "device pci" .Ed .Sh DESCRIPTION The From f02f0281e72cc98f70de9a0cc1f140a068ff6f14 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 18 Nov 2016 07:36:00 +0000 Subject: [PATCH 171/204] remove the hv_ata_pci_disengage(4) manual A few months ago, we removed the driver, which was not necessary any longer. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft --- share/man/man4/hv_ata_pci_disengage.4 | 90 --------------------------- share/man/man4/hv_vmbus.4 | 1 - 2 files changed, 91 deletions(-) delete mode 100644 share/man/man4/hv_ata_pci_disengage.4 diff --git a/share/man/man4/hv_ata_pci_disengage.4 b/share/man/man4/hv_ata_pci_disengage.4 deleted file mode 100644 index e7a33523333..00000000000 --- a/share/man/man4/hv_ata_pci_disengage.4 +++ /dev/null @@ -1,90 +0,0 @@ -.\" $FreeBSD$ -.\" -.\" Copyright (c) 2012 Microsoft Corp. -.\" 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. -.\" -.Dd September 10, 2013 -.Dt HYPER-V 4 -.Os -.Sh NAME -.Nm hv_ata_pci_disengage -.Nd Hyper-V ATA PCI Disengage driver -.Sh SYNOPSIS -To compile this driver into the kernel, place the following lines in -the system kernel configuration file: -.Bd -ragged -offset indent -.Cd "device hyperv" -.Ed -.Sh DESCRIPTION -The -.Nm -driver prevents the native -.Fx -ATA driver from -loading in the presence of Hyper-V. -.Fx -guests running on Hyper-V can take advantage of the Hyper-V Storage -Virtual Consumer -.Pq Xr hv_storvsc 4 -for using their IDE devices. -Since the ATA -driver serves IDE devices as well, there is a chance that the ATA driver may -interfere with the operations of -.Xr hv_storvsc 4 . -The -.Nm -driver avoids -conflicts between the ATA driver and -.Xr hv_storvsc 4 -by disabling the ATA driver -when the -.Fx -guest is booting. -.Pp -A side effect of disabling the ATA driver is that CDROM may become -inoperational on -.Fx -guest partitions. -If CDROM access is a must then users may use -"set hw.ata.disk_enable=1" at boot time to prevent the ATA driver from being -disabled. -.Sh SEE ALSO -.Xr hv_netvsc 4 , -.Xr hv_storvsc 4 , -.Xr hv_utils 4 , -.Xr hv_vmbus 4 -.Sh HISTORY -Support for -.Nm -first appeared in -.Fx 10.0 . -The driver was developed through a joint effort between Citrix Incorporated, -Microsoft Corporation, and Network Appliance Incorporated. -.Sh AUTHORS -.An -nosplit -.Fx -support for -.Nm -was first added by -.An Microsoft BSD Integration Services Team Aq Mt bsdic@microsoft.com . diff --git a/share/man/man4/hv_vmbus.4 b/share/man/man4/hv_vmbus.4 index bdee598af53..eb661b8c26e 100644 --- a/share/man/man4/hv_vmbus.4 +++ b/share/man/man4/hv_vmbus.4 @@ -74,7 +74,6 @@ the interface that facilitate high performance bi-directional communication between the VSCs and VSPs. All VSCs utilize the VMBus driver. .Sh SEE ALSO -.Xr hv_ata_pci_disengage 4 , .Xr hv_netvsc 4 , .Xr hv_storvsc 4 , .Xr hv_utils 4 From df4d99a5f4300b3f349042c8199afc61e2db0872 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 18 Nov 2016 08:15:45 +0000 Subject: [PATCH 172/204] fix share/man/man4/Makefile for hv_ata_pci_disengage.4 We need to remove the line since we removed the related manual just now. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft --- share/man/man4/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 35438324165..98697541983 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -187,7 +187,6 @@ MAN= aac.4 \ ${_hptmv.4} \ ${_hptnr.4} \ ${_hptrr.4} \ - hv_ata_pci_disengage.4 \ hv_kvp.4 \ hv_netvsc.4 \ hv_storvsc.4 \ From 34cd8ebdcfc8b88cfba92270f37e870dc00c47e8 Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Fri, 18 Nov 2016 14:06:29 +0000 Subject: [PATCH 173/204] [mips/ar531x] code cleanup, non-INTRNG support This commit improves code styles like: - removing commented code - format comments as C-style - add spaces after #define-s It also bring ability to build kernel without INTRNG and remove RedBoot dependency. Tested on FON2201 Submitted by: Hiroki Sato Reviewed by: adrian, mizhka Approved by: adrian(mentor) Differential Revision: https://reviews.freebsd.org/D8557 --- sys/mips/atheros/ar531x/files.ar5315 | 13 ++-- sys/mips/atheros/ar531x/if_are.c | 104 +++++++++++++-------------- sys/mips/atheros/ar531x/if_arereg.h | 29 ++++---- 3 files changed, 72 insertions(+), 74 deletions(-) diff --git a/sys/mips/atheros/ar531x/files.ar5315 b/sys/mips/atheros/ar531x/files.ar5315 index 7bb2dfa7a7b..f608aa69de1 100644 --- a/sys/mips/atheros/ar531x/files.ar5315 +++ b/sys/mips/atheros/ar531x/files.ar5315 @@ -14,17 +14,18 @@ mips/atheros/ar531x/uart_cpu_ar5315.c optional uart_ar5315 mips/atheros/ar531x/ar5312_chip.c standard mips/atheros/ar71xx_bus_space_reversed.c standard -#mips/mips/intr_machdep.c standard mips/mips/tick.c standard dev/etherswitch/e6000sw/e6060sw.c optional etherswitch -dev/etherswitch/realtek/rtl830x.c optional etherswitch # Hack to reuse ARM intrng code -kern/subr_intr.c standard -kern/msi_if.m standard -kern/pic_if.m standard +kern/subr_intr.c optional intrng +kern/msi_if.m optional intrng +kern/pic_if.m optional intrng # Intrng compatible MIPS32 interrupt controller -mips/mips/mips_pic.c standard +mips/mips/mips_pic.c optional intrng + +# Non Intrng +mips/mips/intr_machdep.c optional !intrng diff --git a/sys/mips/atheros/ar531x/if_are.c b/sys/mips/atheros/ar531x/if_are.c index d7bf6cbea84..294961825f7 100644 --- a/sys/mips/atheros/ar531x/if_are.c +++ b/sys/mips/atheros/ar531x/if_are.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); /* - * AR231x Ethernet interface driver + * AR531x Ethernet interface driver * copy from mips/idt/if_kr.c and netbsd code */ #include @@ -90,8 +90,6 @@ MODULE_DEPEND(are, miibus, 1, 1, 1); #include #include -//#define ARE_DEBUG - #ifdef ARE_DEBUG void dump_txdesc(struct are_softc *, int); void dump_status_reg(struct are_softc *); @@ -226,7 +224,7 @@ are_attach(device_t dev) unit = device_get_unit(dev); sc->are_dev = dev; - // hardcode macaddress + /* hardcode macaddress */ sc->are_eaddr[0] = 0x00; sc->are_eaddr[1] = 0x0C; sc->are_eaddr[2] = 0x42; @@ -234,7 +232,7 @@ are_attach(device_t dev) sc->are_eaddr[4] = 0x5E; sc->are_eaddr[5] = 0x6B; - // try to get from hints + /* try to get from hints */ if (!resource_string_value(device_get_name(dev), device_get_unit(dev), "macaddr", (const char **)&local_macstr)) { uint32_t tmpmac[ETHER_ADDR_LEN]; @@ -302,12 +300,16 @@ are_attach(device_t dev) ifp->if_ioctl = are_ioctl; ifp->if_start = are_start; ifp->if_init = are_init; + sc->are_if_flags = ifp->if_flags; /* XXX: add real size */ IFQ_SET_MAXLEN(&ifp->if_snd, 9); ifp->if_snd.ifq_maxlen = 9; IFQ_SET_READY(&ifp->if_snd); + /* Tell the upper layer(s) we support long frames. */ + ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capenable = ifp->if_capabilities; if (are_dma_alloc(sc) != 0) { @@ -315,14 +317,6 @@ are_attach(device_t dev) goto fail; } - /* TODO: calculate prescale */ -/* - CSR_WRITE_4(sc, ARE_ETHMCP, (165000000 / (1250000 + 1)) & ~1); - - CSR_WRITE_4(sc, ARE_MIIMCFG, ARE_MIIMCFG_R); - DELAY(1000); - CSR_WRITE_4(sc, ARE_MIIMCFG, 0); -*/ CSR_WRITE_4(sc, CSR_BUSMODE, BUSMODE_SWR); DELAY(1000); @@ -350,11 +344,11 @@ are_attach(device_t dev) #ifdef INTRNG char *name; - if(ar531x_soc >= AR531X_SOC_AR5315) { + if (ar531x_soc >= AR531X_SOC_AR5315) { enetirq = AR5315_CPU_IRQ_ENET; name = "enet"; } else { - if(device_get_unit(dev) == 0) { + if (device_get_unit(dev) == 0) { enetirq = AR5312_IRQ_ENET0; name = "enet0"; } else { @@ -465,7 +459,6 @@ are_miibus_readreg(device_t dev, int phy, int reg) addr = (phy << MIIADDR_PHY_SHIFT) | (reg << MIIADDR_REG_SHIFT); CSR_WRITE_4(sc, CSR_MIIADDR, addr); -// AE_BARRIER(sc); for (i = 0; i < 100000000; i++) { if ((CSR_READ_4(sc, CSR_MIIADDR) & MIIADDR_BUSY) == 0) break; @@ -488,7 +481,6 @@ are_miibus_writereg(device_t dev, int phy, int reg, int data) addr = (phy << MIIADDR_PHY_SHIFT) | (reg << MIIADDR_REG_SHIFT) | MIIADDR_WRITE; CSR_WRITE_4(sc, CSR_MIIADDR, addr); -// AE_BARRIER(sc); for (i = 0; i < 100000000; i++) { if ((CSR_READ_4(sc, CSR_MIIADDR) & MIIADDR_BUSY) == 0) @@ -610,7 +602,6 @@ are_init_locked(struct are_softc *sc) */ CSR_WRITE_4(sc, CSR_BUSMODE, /* XXX: not sure if this is a good thing or not... */ - //BUSMODE_ALIGN_16B | BUSMODE_BAR | BUSMODE_BLE | BUSMODE_PBL_4LW); /* @@ -648,15 +639,16 @@ are_init_locked(struct are_softc *sc) /* * Start the mac. */ - CSR_WRITE_4(sc, CSR_MACCTL, CSR_READ_4(sc, CSR_MACCTL) | - (MACCTL_RE | MACCTL_TE)); + CSR_WRITE_4(sc, CSR_FLOWC, FLOWC_FCE); + CSR_WRITE_4(sc, CSR_MACCTL, MACCTL_RE | MACCTL_TE | + MACCTL_PM | MACCTL_FDX | MACCTL_HBD | MACCTL_RA); /* * Write out the opmode. */ - CSR_WRITE_4(sc, CSR_OPMODE, OPMODE_SR | OPMODE_ST | -// ae_txthresh[sc->sc_txthresh].txth_opmode); + CSR_WRITE_4(sc, CSR_OPMODE, OPMODE_SR | OPMODE_ST | OPMODE_SF | OPMODE_TR_64); + /* * Start the receive process. */ @@ -741,7 +733,6 @@ are_encap(struct are_softc *sc, struct mbuf **m_head) if (i == 0) desc->are_devcs |= ADCTL_Tx_FS; desc->are_addr = txsegs[i].ds_addr; -// desc->are_link = 0; /* link with previous descriptor */ if (prev_desc) prev_desc->are_link = ARE_TX_RING_ADDR(sc, prod); @@ -850,6 +841,36 @@ are_stop(struct are_softc *sc) } +static int +are_set_filter(struct are_softc *sc) +{ + struct ifnet *ifp; + int mchash[2]; + int macctl; + + ifp = sc->are_ifp; + + macctl = CSR_READ_4(sc, CSR_MACCTL); + macctl &= ~(MACCTL_PR | MACCTL_PM); + macctl |= MACCTL_HBD; + + if (ifp->if_flags & IFF_PROMISC) + macctl |= MACCTL_PR; + + /* Todo: hash table set. + * But I don't know how to use multicast hash table at this soc. + */ + + /* this is allmulti */ + mchash[0] = mchash[1] = 0xffffffff; + macctl |= MACCTL_PM; + + CSR_WRITE_4(sc, CSR_HTLO, mchash[0]); + CSR_WRITE_4(sc, CSR_HTHI, mchash[1]); + CSR_WRITE_4(sc, CSR_MACCTL, macctl); + + return 0; +} static int are_ioctl(struct ifnet *ifp, u_long command, caddr_t data) @@ -863,7 +884,6 @@ are_ioctl(struct ifnet *ifp, u_long command, caddr_t data) switch (command) { case SIOCSIFFLAGS: -#if 0 ARE_LOCK(sc); if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { @@ -880,16 +900,13 @@ are_ioctl(struct ifnet *ifp, u_long command, caddr_t data) } sc->are_if_flags = ifp->if_flags; ARE_UNLOCK(sc); -#endif error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: -#if 0 ARE_LOCK(sc); are_set_filter(sc); ARE_UNLOCK(sc); -#endif error = 0; break; case SIOCGIFMEDIA: @@ -903,28 +920,6 @@ are_ioctl(struct ifnet *ifp, u_long command, caddr_t data) break; case SIOCSIFCAP: error = 0; -#if 0 - mask = ifr->ifr_reqcap ^ ifp->if_capenable; - if ((mask & IFCAP_HWCSUM) != 0) { - ifp->if_capenable ^= IFCAP_HWCSUM; - if ((IFCAP_HWCSUM & ifp->if_capenable) && - (IFCAP_HWCSUM & ifp->if_capabilities)) - ifp->if_hwassist = ARE_CSUM_FEATURES; - else - ifp->if_hwassist = 0; - } - if ((mask & IFCAP_VLAN_HWTAGGING) != 0) { - ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; - if (IFCAP_VLAN_HWTAGGING & ifp->if_capenable && - IFCAP_VLAN_HWTAGGING & ifp->if_capabilities && - ifp->if_drv_flags & IFF_DRV_RUNNING) { - ARE_LOCK(sc); - are_vlan_setup(sc); - ARE_UNLOCK(sc); - } - } - VLAN_CAPABILITIES(ifp); -#endif break; default: error = ether_ioctl(ifp, command, data); @@ -1343,7 +1338,7 @@ are_newbuf(struct are_softc *sc, int idx) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; - // tcp header boundary margin + /* tcp header boundary margin */ m_adj(m, 4); if (bus_dmamap_load_mbuf_sg(sc->are_cdata.are_rx_tag, @@ -1355,9 +1350,11 @@ are_newbuf(struct are_softc *sc, int idx) rxd = &sc->are_cdata.are_rxdesc[idx]; if (rxd->rx_m != NULL) { -// This code make bug. Make scranble on buffer data. -// bus_dmamap_sync(sc->are_cdata.are_rx_tag, rxd->rx_dmamap, -// BUS_DMASYNC_POSTREAD); + /* + * THis is if_kr.c original code but make bug. Make scranble on buffer data. + * bus_dmamap_sync(sc->are_cdata.are_rx_tag, rxd->rx_dmamap, + * BUS_DMASYNC_POSTREAD); + */ bus_dmamap_unload(sc->are_cdata.are_rx_tag, rxd->rx_dmamap); } map = rxd->rx_dmamap; @@ -1551,7 +1548,6 @@ are_intr(void *arg) struct are_softc *sc = arg; uint32_t status; struct ifnet *ifp = sc->are_ifp; -//kdb_break(); ARE_LOCK(sc); diff --git a/sys/mips/atheros/ar531x/if_arereg.h b/sys/mips/atheros/ar531x/if_arereg.h index 19aad0ce394..f59df630d9e 100644 --- a/sys/mips/atheros/ar531x/if_arereg.h +++ b/sys/mips/atheros/ar531x/if_arereg.h @@ -37,17 +37,17 @@ struct are_desc { uint32_t are_link; }; -#define ARE_DMASIZE(len) ((len) & ((1 << 11)-1)) -#define ARE_PKTSIZE(len) ((len & 0xffff0000) >> 16) +#define ARE_DMASIZE(len) ((len) & ((1 << 11)-1)) +#define ARE_PKTSIZE(len) ((len & 0xffff0000) >> 16) -#define ARE_RX_RING_CNT 128 -#define ARE_TX_RING_CNT 128 -#define ARE_TX_RING_SIZE sizeof(struct are_desc) * ARE_TX_RING_CNT -#define ARE_RX_RING_SIZE sizeof(struct are_desc) * ARE_RX_RING_CNT -#define ARE_RING_ALIGN sizeof(struct are_desc) -#define ARE_RX_ALIGN sizeof(uint32_t) -#define ARE_MAXFRAGS 8 -#define ARE_TX_INTR_THRESH 8 +#define ARE_RX_RING_CNT 128 +#define ARE_TX_RING_CNT 128 +#define ARE_TX_RING_SIZE sizeof(struct are_desc) * ARE_TX_RING_CNT +#define ARE_RX_RING_SIZE sizeof(struct are_desc) * ARE_RX_RING_CNT +#define ARE_RING_ALIGN sizeof(struct are_desc) +#define ARE_RX_ALIGN sizeof(uint32_t) +#define ARE_MAXFRAGS 8 +#define ARE_TX_INTR_THRESH 8 #define ARE_TX_RING_ADDR(sc, i) \ ((sc)->are_rdata.are_tx_ring_paddr + sizeof(struct are_desc) * (i)) @@ -123,6 +123,7 @@ struct are_softc { struct are_ring_data are_rdata; int are_link_status; int are_detach; + int are_if_flags; /* last if flags */ }; #define ARE_LOCK(_sc) mtx_lock(&(_sc)->are_mtx) @@ -132,11 +133,11 @@ struct are_softc { /* * register space access macros */ -#define CSR_WRITE_4(sc, reg, val) \ - bus_space_write_4(sc->are_btag, sc->are_bhandle, reg, val) +#define CSR_WRITE_4(sc, reg, val) \ + bus_space_write_4(sc->are_btag, sc->are_bhandle, reg, val) -#define CSR_READ_4(sc, reg) \ - bus_space_read_4(sc->are_btag, sc->are_bhandle, reg) +#define CSR_READ_4(sc, reg) \ + bus_space_read_4(sc->are_btag, sc->are_bhandle, reg) /* $NetBSD: aereg.h,v 1.2 2008/04/28 20:23:28 martin Exp $ */ From cbaba16b23124331498f0a6d48a4d71f4f20b508 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Fri, 18 Nov 2016 16:07:08 +0000 Subject: [PATCH 174/204] Speed up pw operations that edit /etc/group or /etc/passwd r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group corruption on power loss. However, it fixed it by opening those files with O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC with appropriately placed fsync()s instead, which is much faster. Using a ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s. Reviewed by: allanjude, bapt, vangyzen, garga Tested on pfSense by: garga MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8319 --- lib/libutil/gr_util.c | 2 +- lib/libutil/pw_util.c | 2 +- usr.sbin/pw/grupd.c | 1 + usr.sbin/pw/pw_nis.c | 1 + usr.sbin/pw/pwupd.c | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/libutil/gr_util.c b/lib/libutil/gr_util.c index 93b3eb2f92f..6153209eb2d 100644 --- a/lib/libutil/gr_util.c +++ b/lib/libutil/gr_util.c @@ -141,7 +141,7 @@ gr_tmp(int mfd) errno = ENAMETOOLONG; return (-1); } - if ((tfd = mkostemp(tempname, O_SYNC)) == -1) + if ((tfd = mkostemp(tempname, 0)) == -1) return (-1); if (mfd != -1) { while ((nr = read(mfd, buf, sizeof(buf))) > 0) diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c index 2838871d93f..d7903281d7c 100644 --- a/lib/libutil/pw_util.c +++ b/lib/libutil/pw_util.c @@ -225,7 +225,7 @@ pw_tmp(int mfd) errno = ENAMETOOLONG; return (-1); } - if ((tfd = mkostemp(tempname, O_SYNC)) == -1) + if ((tfd = mkostemp(tempname, 0)) == -1) return (-1); if (mfd != -1) { while ((nr = read(mfd, buf, sizeof(buf))) > 0) diff --git a/usr.sbin/pw/grupd.c b/usr.sbin/pw/grupd.c index 38d5e5bc956..5d0df0263e4 100644 --- a/usr.sbin/pw/grupd.c +++ b/usr.sbin/pw/grupd.c @@ -77,6 +77,7 @@ gr_update(struct group * grp, char const * group) close(tfd); err(1, "gr_copy()"); } + fsync(tfd); close(tfd); if (gr_mkdb() == -1) { gr_fini(); diff --git a/usr.sbin/pw/pw_nis.c b/usr.sbin/pw/pw_nis.c index 35b26ea5224..087c9460f3f 100644 --- a/usr.sbin/pw/pw_nis.c +++ b/usr.sbin/pw/pw_nis.c @@ -67,6 +67,7 @@ pw_nisupdate(const char * path, struct passwd * pwd, char const * user) close(tfd); err(1, "pw_copy()"); } + fsync(tfd); close(tfd); if (chmod(pw_tempname(), 0644) == -1) err(1, "chmod()"); diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c index 3bcb95f8c46..87c3c994bad 100644 --- a/usr.sbin/pw/pwupd.c +++ b/usr.sbin/pw/pwupd.c @@ -114,6 +114,7 @@ pw_update(struct passwd * pwd, char const * user) close(tfd); err(1, "pw_copy()"); } + fsync(tfd); close(tfd); /* * in case of deletion of a user, the whole database From 63a16ecab1973c856ac3b4c90639100ec448d241 Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Fri, 18 Nov 2016 16:23:31 +0000 Subject: [PATCH 175/204] Subject: [PATCH] Pass MACHINE_ARCH on command line for MIPS kernels. While there, make param.h guess proper MACHINE_ARCH on hardfloat targets correctly as well, so tools like bmake can get their defaults right. This does not help the kernel case, since we compile them with forced -msoft-float and need to override an incorrect guess by param.h. Reviewed by: br Differential Revision: https://reviews.freebsd.org/D8574 --- sys/conf/kern.pre.mk | 2 +- sys/mips/include/param.h | 49 +++++++++++++++++++++------------------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 0a2d9a65ee7..ee72dbe0ebe 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -74,7 +74,7 @@ CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global. CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 .if ${MACHINE_CPUARCH} == "mips" -CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 +CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 -DMACHINE_ARCH='"${MACHINE_ARCH}"' .endif CFLAGS.gcc+= -fno-common -fms-extensions -finline-limit=${INLINE_LIMIT} CFLAGS.gcc+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH} diff --git a/sys/mips/include/param.h b/sys/mips/include/param.h index 7c5e667858f..37e1fd344f7 100644 --- a/sys/mips/include/param.h +++ b/sys/mips/include/param.h @@ -53,33 +53,36 @@ #define __PCI_REROUTE_INTERRUPT +#if _BYTE_ORDER == _BIG_ENDIAN +# define _EL_SUFFIX "" +#else +# define _EL_SUFFIX "el" +#endif + +#ifdef __mips_n64 +# define _N64_SUFFIX "64" +#elif defined(__mips_n32) +# define _N64_SUFFIX "n32" +#else +# define _N64_SUFFIX "" +#endif + +#ifdef __mips_hard_float +# define _HF_SUFFIX "hf" +#else +# define _HF_SUFFIX "" +#endif + #ifndef MACHINE -#define MACHINE "mips" +# define MACHINE "mips" #endif #ifndef MACHINE_ARCH -#if _BYTE_ORDER == _BIG_ENDIAN +# define MACHINE_ARCH "mips" _N64_SUFFIX _EL_SUFFIX _HF_SUFFIX +#endif #ifdef __mips_n64 -#define MACHINE_ARCH "mips64" -#ifndef MACHINE_ARCH32 -#define MACHINE_ARCH32 "mips" -#endif -#elif defined(__mips_n32) -#define MACHINE_ARCH "mipsn32" -#else -#define MACHINE_ARCH "mips" -#endif -#else -#ifdef __mips_n64 -#define MACHINE_ARCH "mips64el" -#ifndef MACHINE_ARCH32 -#define MACHINE_ARCH32 "mipsel" -#endif -#elif defined(__mips_n32) -#define MACHINE_ARCH "mipsn32el" -#else -#define MACHINE_ARCH "mipsel" -#endif -#endif +# ifndef MACHINE_ARCH32 +# define MACHINE_ARCH32 "mips" _EL_SUFFIX _HF_SUFFIX +# endif #endif /* From bfe9db5816995ab07f6d1141b40a73abba8b86a1 Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Fri, 18 Nov 2016 16:48:37 +0000 Subject: [PATCH 176/204] Lookup locale when print all keywords as well. Reported by: dumbbell Reviewed by: dumbbell MFC after: 1 week --- usr.bin/locale/locale.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/locale/locale.c b/usr.bin/locale/locale.c index b295b176c88..d0281b6335c 100644 --- a/usr.bin/locale/locale.c +++ b/usr.bin/locale/locale.c @@ -283,8 +283,9 @@ main(int argc, char *argv[]) /* process '-c', '-k', or command line arguments. */ if (prt_categories || prt_keywords || argc > 0) { - if (argc > 0) { + if (prt_keywords) setlocale(LC_ALL, ""); + if (argc > 0) { while (argc > 0) { showdetails(*argv); argv++; From 454d904a0e06ff0905af665cd04164c22a1e3ecd Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Fri, 18 Nov 2016 17:18:05 +0000 Subject: [PATCH 177/204] We need to lookup locale when command line arguments are specified, as well. MFC after: 1 week --- usr.bin/locale/locale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/locale/locale.c b/usr.bin/locale/locale.c index d0281b6335c..e4409dad4c3 100644 --- a/usr.bin/locale/locale.c +++ b/usr.bin/locale/locale.c @@ -283,7 +283,7 @@ main(int argc, char *argv[]) /* process '-c', '-k', or command line arguments. */ if (prt_categories || prt_keywords || argc > 0) { - if (prt_keywords) + if (prt_keywords || argc > 0) setlocale(LC_ALL, ""); if (argc > 0) { while (argc > 0) { From 947b83c090437e77fb70efb5d2c3ab86eefdf2d7 Mon Sep 17 00:00:00 2001 From: Bartek Rutkowski Date: Fri, 18 Nov 2016 21:09:57 +0000 Subject: [PATCH 178/204] Capsicum support for dd(1) Adds Capsicum sandboxing to dd utility. Submitted by: Pawel Biernacki Reviewed by: allanjude, emaste, oshogbo Approved by: oshogbo Sponsored by: Mysterious Code Ltd. Differential Revision: https://reviews.freebsd.org/D8543 --- bin/dd/dd.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/bin/dd/dd.c b/bin/dd/dd.c index 56f8efef7a5..a13213dcc8c 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -48,10 +48,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include +#include #include #include #include @@ -92,6 +95,10 @@ main(int argc __unused, char *argv[]) jcl(argv); setup(); + caph_cache_catpages(); + if (cap_enter() == -1 && errno != ENOSYS) + err(1, "unable to enter capability mode"); + (void)signal(SIGINFO, siginfo_handler); (void)signal(SIGINT, terminate); @@ -125,6 +132,8 @@ static void setup(void) { u_int cnt; + cap_rights_t rights; + unsigned long cmds[] = { FIODTYPE, MTIOCTOP }; if (in.name == NULL) { in.name = "stdin"; @@ -133,13 +142,20 @@ setup(void) in.fd = open(in.name, O_RDONLY, 0); if (in.fd == -1) err(1, "%s", in.name); + if (caph_limit_stdin() == -1) + err(1, "unable to limit capability rights"); } getfdtype(&in); + cap_rights_init(&rights, CAP_READ, CAP_SEEK); + if (cap_rights_limit(in.fd, &rights) == -1 && errno != ENOSYS) + err(1, "unable to limit capability rights"); + if (files_cnt > 1 && !(in.flags & ISTAPE)) errx(1, "files is not supported for non-tape devices"); + cap_rights_set(&rights, CAP_WRITE, CAP_FTRUNCATE, CAP_IOCTL); if (out.name == NULL) { /* No way to check for read access here. */ out.fd = STDOUT_FILENO; @@ -156,13 +172,27 @@ setup(void) if (out.fd == -1) { out.fd = open(out.name, O_WRONLY | OFLAGS, DEFFILEMODE); out.flags |= NOREAD; + cap_rights_clear(&rights, CAP_READ); } if (out.fd == -1) err(1, "%s", out.name); + if (caph_limit_stdout() == -1) + err(1, "unable to limit capability rights"); } getfdtype(&out); + if (cap_rights_limit(out.fd, &rights) == -1 && errno != ENOSYS) + err(1, "unable to limit capability rights"); + if (cap_ioctls_limit(out.fd, cmds, nitems(cmds)) == -1 && + errno != ENOSYS) + err(1, "unable to limit capability rights"); + + if (in.fd != STDERR_FILENO && out.fd != STDERR_FILENO) { + if (caph_limit_stderr() == -1) + err(1, "unable to limit capability rights"); + } + /* * Allocate space for the input and output buffers. If not doing * record oriented I/O, only need a single buffer. From e4ce50a4436077738ab905b1c6a91587eb7f6114 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Fri, 18 Nov 2016 21:12:13 +0000 Subject: [PATCH 179/204] [net80211] shuffle IEEE80211_C and HTC bits over to _ieee80211.h so userland can use this. Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D8553 --- sys/net80211/_ieee80211.h | 67 ++++++++++++++++++++++++++++++++++++ sys/net80211/ieee80211_var.h | 64 ---------------------------------- 2 files changed, 67 insertions(+), 64 deletions(-) diff --git a/sys/net80211/_ieee80211.h b/sys/net80211/_ieee80211.h index aceaba57cb0..7a33b53a232 100644 --- a/sys/net80211/_ieee80211.h +++ b/sys/net80211/_ieee80211.h @@ -402,4 +402,71 @@ struct ieee80211_mimo_info { uint8_t pad[2]; uint32_t evm[3]; /* EVM data */ }; + +/* + * ic_caps/iv_caps: device driver capabilities + */ +/* 0x2e available */ +#define IEEE80211_C_STA 0x00000001 /* CAPABILITY: STA available */ +#define IEEE80211_C_8023ENCAP 0x00000002 /* CAPABILITY: 802.3 encap */ +#define IEEE80211_C_FF 0x00000040 /* CAPABILITY: ATH FF avail */ +#define IEEE80211_C_TURBOP 0x00000080 /* CAPABILITY: ATH Turbo avail*/ +#define IEEE80211_C_IBSS 0x00000100 /* CAPABILITY: IBSS available */ +#define IEEE80211_C_PMGT 0x00000200 /* CAPABILITY: Power mgmt */ +#define IEEE80211_C_HOSTAP 0x00000400 /* CAPABILITY: HOSTAP avail */ +#define IEEE80211_C_AHDEMO 0x00000800 /* CAPABILITY: Old Adhoc Demo */ +#define IEEE80211_C_SWRETRY 0x00001000 /* CAPABILITY: sw tx retry */ +#define IEEE80211_C_TXPMGT 0x00002000 /* CAPABILITY: tx power mgmt */ +#define IEEE80211_C_SHSLOT 0x00004000 /* CAPABILITY: short slottime */ +#define IEEE80211_C_SHPREAMBLE 0x00008000 /* CAPABILITY: short preamble */ +#define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor mode */ +#define IEEE80211_C_DFS 0x00020000 /* CAPABILITY: DFS/radar avail*/ +#define IEEE80211_C_MBSS 0x00040000 /* CAPABILITY: MBSS available */ +#define IEEE80211_C_SWSLEEP 0x00080000 /* CAPABILITY: do sleep here */ +#define IEEE80211_C_SWAMSDUTX 0x00100000 /* CAPABILITY: software A-MSDU TX */ +/* 0x7c0000 available */ +#define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1 avail */ +#define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */ +#define IEEE80211_C_WPA 0x01800000 /* CAPABILITY: WPA1+WPA2 avail*/ +#define IEEE80211_C_BURST 0x02000000 /* CAPABILITY: frame bursting */ +#define IEEE80211_C_WME 0x04000000 /* CAPABILITY: WME avail */ +#define IEEE80211_C_WDS 0x08000000 /* CAPABILITY: 4-addr support */ +/* 0x10000000 reserved */ +#define IEEE80211_C_BGSCAN 0x20000000 /* CAPABILITY: bg scanning */ +#define IEEE80211_C_TXFRAG 0x40000000 /* CAPABILITY: tx fragments */ +#define IEEE80211_C_TDMA 0x80000000 /* CAPABILITY: TDMA avail */ +/* XXX protection/barker? */ + +#define IEEE80211_C_OPMODE \ + (IEEE80211_C_STA | IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | \ + IEEE80211_C_AHDEMO | IEEE80211_C_MONITOR | IEEE80211_C_WDS | \ + IEEE80211_C_TDMA | IEEE80211_C_MBSS) + +#define IEEE80211_C_BITS \ + "\20\1STA\002803ENCAP\7FF\10TURBOP\11IBSS\12PMGT" \ + "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ + "\21MONITOR\22DFS\23MBSS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ + "\37TXFRAG\40TDMA" + +/* + * ic_htcaps/iv_htcaps: HT-specific device/driver capabilities + * + * NB: the low 16-bits are the 802.11 definitions, the upper + * 16-bits are used to define s/w/driver capabilities. + */ +#define IEEE80211_HTC_AMPDU 0x00010000 /* CAPABILITY: A-MPDU tx */ +#define IEEE80211_HTC_AMSDU 0x00020000 /* CAPABILITY: A-MSDU tx */ +/* NB: HT40 is implied by IEEE80211_HTCAP_CHWIDTH40 */ +#define IEEE80211_HTC_HT 0x00040000 /* CAPABILITY: HT operation */ +#define IEEE80211_HTC_SMPS 0x00080000 /* CAPABILITY: MIMO power save*/ +#define IEEE80211_HTC_RIFS 0x00100000 /* CAPABILITY: RIFS support */ +#define IEEE80211_HTC_RXUNEQUAL 0x00200000 /* CAPABILITY: RX unequal MCS */ +#define IEEE80211_HTC_RXMCS32 0x00400000 /* CAPABILITY: MCS32 support */ +#define IEEE80211_HTC_TXUNEQUAL 0x00800000 /* CAPABILITY: TX unequal MCS */ +#define IEEE80211_HTC_TXMCS32 0x01000000 /* CAPABILITY: MCS32 support */ + +#define IEEE80211_C_HTCAP_BITS \ + "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ + "\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS" + #endif /* _NET80211__IEEE80211_H_ */ diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 479a8d62a82..37f4f6dde7f 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -633,70 +633,6 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FVEN_BITS "\20" -/* ic_caps/iv_caps: device driver capabilities */ -/* 0x2e available */ -#define IEEE80211_C_STA 0x00000001 /* CAPABILITY: STA available */ -#define IEEE80211_C_8023ENCAP 0x00000002 /* CAPABILITY: 802.3 encap */ -#define IEEE80211_C_FF 0x00000040 /* CAPABILITY: ATH FF avail */ -#define IEEE80211_C_TURBOP 0x00000080 /* CAPABILITY: ATH Turbo avail*/ -#define IEEE80211_C_IBSS 0x00000100 /* CAPABILITY: IBSS available */ -#define IEEE80211_C_PMGT 0x00000200 /* CAPABILITY: Power mgmt */ -#define IEEE80211_C_HOSTAP 0x00000400 /* CAPABILITY: HOSTAP avail */ -#define IEEE80211_C_AHDEMO 0x00000800 /* CAPABILITY: Old Adhoc Demo */ -#define IEEE80211_C_SWRETRY 0x00001000 /* CAPABILITY: sw tx retry */ -#define IEEE80211_C_TXPMGT 0x00002000 /* CAPABILITY: tx power mgmt */ -#define IEEE80211_C_SHSLOT 0x00004000 /* CAPABILITY: short slottime */ -#define IEEE80211_C_SHPREAMBLE 0x00008000 /* CAPABILITY: short preamble */ -#define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor mode */ -#define IEEE80211_C_DFS 0x00020000 /* CAPABILITY: DFS/radar avail*/ -#define IEEE80211_C_MBSS 0x00040000 /* CAPABILITY: MBSS available */ -#define IEEE80211_C_SWSLEEP 0x00080000 /* CAPABILITY: do sleep here */ -#define IEEE80211_C_SWAMSDUTX 0x00100000 /* CAPABILITY: software A-MSDU TX */ -/* 0x7c0000 available */ -#define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1 avail */ -#define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */ -#define IEEE80211_C_WPA 0x01800000 /* CAPABILITY: WPA1+WPA2 avail*/ -#define IEEE80211_C_BURST 0x02000000 /* CAPABILITY: frame bursting */ -#define IEEE80211_C_WME 0x04000000 /* CAPABILITY: WME avail */ -#define IEEE80211_C_WDS 0x08000000 /* CAPABILITY: 4-addr support */ -/* 0x10000000 reserved */ -#define IEEE80211_C_BGSCAN 0x20000000 /* CAPABILITY: bg scanning */ -#define IEEE80211_C_TXFRAG 0x40000000 /* CAPABILITY: tx fragments */ -#define IEEE80211_C_TDMA 0x80000000 /* CAPABILITY: TDMA avail */ -/* XXX protection/barker? */ - -#define IEEE80211_C_OPMODE \ - (IEEE80211_C_STA | IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | \ - IEEE80211_C_AHDEMO | IEEE80211_C_MONITOR | IEEE80211_C_WDS | \ - IEEE80211_C_TDMA | IEEE80211_C_MBSS) - -#define IEEE80211_C_BITS \ - "\20\1STA\002803ENCAP\7FF\10TURBOP\11IBSS\12PMGT" \ - "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ - "\21MONITOR\22DFS\23MBSS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ - "\37TXFRAG\40TDMA" - -/* - * ic_htcaps/iv_htcaps: HT-specific device/driver capabilities - * - * NB: the low 16-bits are the 802.11 definitions, the upper - * 16-bits are used to define s/w/driver capabilities. - */ -#define IEEE80211_HTC_AMPDU 0x00010000 /* CAPABILITY: A-MPDU tx */ -#define IEEE80211_HTC_AMSDU 0x00020000 /* CAPABILITY: A-MSDU tx */ -/* NB: HT40 is implied by IEEE80211_HTCAP_CHWIDTH40 */ -#define IEEE80211_HTC_HT 0x00040000 /* CAPABILITY: HT operation */ -#define IEEE80211_HTC_SMPS 0x00080000 /* CAPABILITY: MIMO power save*/ -#define IEEE80211_HTC_RIFS 0x00100000 /* CAPABILITY: RIFS support */ -#define IEEE80211_HTC_RXUNEQUAL 0x00200000 /* CAPABILITY: RX unequal MCS */ -#define IEEE80211_HTC_RXMCS32 0x00400000 /* CAPABILITY: MCS32 support */ -#define IEEE80211_HTC_TXUNEQUAL 0x00800000 /* CAPABILITY: TX unequal MCS */ -#define IEEE80211_HTC_TXMCS32 0x01000000 /* CAPABILITY: MCS32 suport */ - -#define IEEE80211_C_HTCAP_BITS \ - "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ - "\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS" - int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3); void ieee80211_ifattach(struct ieee80211com *); void ieee80211_ifdetach(struct ieee80211com *); From 53414bce1b09508f8ef18f2884d02f11638ad9c8 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Fri, 18 Nov 2016 21:12:36 +0000 Subject: [PATCH 180/204] [ifconfig] remove now duplicate IEEE80211_C_BITS definition; it's now in _ieee80211.h . Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D8553 --- sbin/ifconfig/ifieee80211.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index f91888702cd..c7017f074b0 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -3785,12 +3785,6 @@ list_keys(int s) { } -#define IEEE80211_C_BITS \ - "\20\1STA\002803ENCAP\7FF\10TURBOP\11IBSS\12PMGT" \ - "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ - "\21MONITOR\22DFS\23MBSS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ - "\37TXFRAG\40TDMA" - static void list_capabilities(int s) { From 5f6bf12a3dd07aa2f0cfbc09db742d03b08a7627 Mon Sep 17 00:00:00 2001 From: Stephen Hurd Date: Fri, 18 Nov 2016 21:18:51 +0000 Subject: [PATCH 181/204] Check link status after init Because link state change events aren't enabled until the end of init(), the initial link up event could be missed. Check the current media status immediately after enabling the default completion ring interrupt. Approved by: sbruno MFC after: 12 days Sponsored by: Broadcom Limited --- sys/dev/bnxt/if_bnxt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c index 71818e77a0a..2cca3ec6e92 100644 --- a/sys/dev/bnxt/if_bnxt.c +++ b/sys/dev/bnxt/if_bnxt.c @@ -822,6 +822,7 @@ static void bnxt_init(if_ctx_t ctx) { struct bnxt_softc *softc = iflib_get_softc(ctx); + struct ifmediareq ifmr; int i, j; int rc; @@ -975,6 +976,7 @@ bnxt_init(if_ctx_t ctx) } bnxt_do_enable_intr(&softc->def_cp_ring); + bnxt_media_status(softc->ctx, &ifmr); return; fail: From 44f0c15c6cd85cac6457dffb4b9a4891cbcc5b5b Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Fri, 18 Nov 2016 22:58:47 +0000 Subject: [PATCH 182/204] Convert the omap4 code to use PLATFORM_SMP. --- sys/arm/conf/PANDABOARD | 1 + sys/arm/ti/omap4/omap4_mp.c | 8 ++++++-- sys/arm/ti/omap4/omap4_mp.h | 33 +++++++++++++++++++++++++++++++++ sys/arm/ti/ti_machdep.c | 5 +++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 sys/arm/ti/omap4/omap4_mp.h diff --git a/sys/arm/conf/PANDABOARD b/sys/arm/conf/PANDABOARD index 4848cea6b03..7176ae8bd71 100644 --- a/sys/arm/conf/PANDABOARD +++ b/sys/arm/conf/PANDABOARD @@ -34,6 +34,7 @@ makeoptions MODULES_EXTRA=dtb/omap4 options SCHED_ULE # ULE scheduler options PLATFORM +options PLATFORM_SMP options SMP # Enable multiple cores # NFS root from boopt/dhcp diff --git a/sys/arm/ti/omap4/omap4_mp.c b/sys/arm/ti/omap4/omap4_mp.c index 055a8aad5f0..165cbcfb993 100644 --- a/sys/arm/ti/omap4/omap4_mp.c +++ b/sys/arm/ti/omap4/omap4_mp.c @@ -38,20 +38,24 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include void -platform_mp_setmaxid(void) +omap4_mp_setmaxid(platform_t plat) { + if (mp_ncpus != 0) + return; mp_maxid = 1; mp_ncpus = 2; } void -platform_mp_start_ap(void) +omap4_mp_start_ap(platform_t plat) { bus_addr_t scu_addr; diff --git a/sys/arm/ti/omap4/omap4_mp.h b/sys/arm/ti/omap4/omap4_mp.h new file mode 100644 index 00000000000..d4aa8df876b --- /dev/null +++ b/sys/arm/ti/omap4/omap4_mp.h @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 2016 Olivier Houchard + * 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. + * + * $FreeBSD$ + */ + +#ifndef _OMAP4_MP_H_ +#define _OMAP4_MP_H_ +void omap4_mp_setmaxid(platform_t plat); +void omap4_mp_start_ap(platform_t plat); +#endif /* _OMAP4_MP_H_ */ + diff --git a/sys/arm/ti/ti_machdep.c b/sys/arm/ti/ti_machdep.c index 1d4e20053bb..5d50809db61 100644 --- a/sys/arm/ti/ti_machdep.c +++ b/sys/arm/ti/ti_machdep.c @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "platform_if.h" @@ -110,6 +111,10 @@ static platform_method_t omap4_methods[] = { PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), PLATFORMMETHOD(platform_cpu_reset, ti_plat_cpu_reset), +#ifdef SMP + PLATFORMMETHOD(platform_mp_start_ap, omap4_mp_start_ap), + PLATFORMMETHOD(platform_mp_setmaxid, omap4_mp_setmaxid), +#endif PLATFORMMETHOD_END, }; FDT_PLATFORM_DEF(omap4, "omap4", 0, "ti,omap4430", 0); From fcef00c336a7cb18f4aa12ca667df7ca09d2e5f2 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Fri, 18 Nov 2016 22:59:33 +0000 Subject: [PATCH 183/204] Fix buildworld Change the pv_tracked flag to an int, just in case userspace decides to include this file and defines BOOKE. Guard this block from unintentional inclusion with ifdef BOOKE. Reported by: emaste --- sys/powerpc/include/pmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h index 8c758f4a6e0..c6611233960 100644 --- a/sys/powerpc/include/pmap.h +++ b/sys/powerpc/include/pmap.h @@ -179,7 +179,7 @@ void slb_free_tree(pmap_t pm); struct slb **slb_alloc_user_cache(void); void slb_free_user_cache(struct slb **); -#else +#elif defined(BOOKE) struct pmap { struct mtx pm_mtx; /* pmap mutex */ @@ -204,7 +204,7 @@ typedef struct pv_entry *pv_entry_t; struct md_page { TAILQ_HEAD(, pv_entry) pv_list; - bool pv_tracked; + int pv_tracked; }; #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT From 31a2ddf253d39cd37af3cb0093985929162b45e4 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Fri, 18 Nov 2016 23:48:20 +0000 Subject: [PATCH 184/204] Guess the TI chip based on the PLATFORM infos, instead of relying on the kernel config file. --- sys/arm/ti/ti_cpuid.h | 11 ++++------- sys/arm/ti/ti_machdep.c | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/sys/arm/ti/ti_cpuid.h b/sys/arm/ti/ti_cpuid.h index 86ac9828726..715f080e5ff 100644 --- a/sys/arm/ti/ti_cpuid.h +++ b/sys/arm/ti/ti_cpuid.h @@ -70,15 +70,12 @@ #define CHIP_OMAP_4 0 #define CHIP_AM335X 1 +extern int _ti_chip; + static __inline int ti_chip(void) { -#if defined(SOC_OMAP4) - return CHIP_OMAP_4; -#elif defined(SOC_TI_AM335X) - return CHIP_AM335X; -#else -# error Chip type not defined, ensure SOC_xxxx is defined -#endif + KASSERT(_ti_chip != -1, ("Can't determine TI Chip")); + return _ti_chip; } uint32_t ti_revision(void); diff --git a/sys/arm/ti/ti_machdep.c b/sys/arm/ti/ti_machdep.c index 5d50809db61..3e9ba470193 100644 --- a/sys/arm/ti/ti_machdep.c +++ b/sys/arm/ti/ti_machdep.c @@ -54,11 +54,32 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "platform_if.h" void (*ti_cpu_reset)(void) = NULL; +int _ti_chip = -1; + +#if defined(SOC_OMAP4) +static int +omap4_attach(platform_t plat) +{ + _ti_chip = CHIP_OMAP_4; + return (0); +} +#endif + +#if defined(SOC_TI_AM335X) +static int +ti_am335x_attach(platform_t plat) +{ + _ti_chip = CHIP_AM335X; + return (0); +} +#endif + static vm_offset_t ti_lastaddr(platform_t plat) { @@ -107,6 +128,7 @@ ti_plat_cpu_reset(platform_t plat) #if defined(SOC_OMAP4) static platform_method_t omap4_methods[] = { + PLATFORMMETHOD(platform_attach, omap4_attach), PLATFORMMETHOD(platform_devmap_init, ti_omap4_devmap_init), PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), PLATFORMMETHOD(platform_cpu_reset, ti_plat_cpu_reset), @@ -122,6 +144,7 @@ FDT_PLATFORM_DEF(omap4, "omap4", 0, "ti,omap4430", 0); #if defined(SOC_TI_AM335X) static platform_method_t am335x_methods[] = { + PLATFORMMETHOD(platform_attach, ti_am335x_attach), PLATFORMMETHOD(platform_devmap_init, ti_am335x_devmap_init), PLATFORMMETHOD(platform_lastaddr, ti_lastaddr), PLATFORMMETHOD(platform_cpu_reset, ti_plat_cpu_reset), From 8917c565bdbba2764f5eb25564bdd2ffb0e00b21 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Sat, 19 Nov 2016 00:55:46 +0000 Subject: [PATCH 185/204] Don't assume we're running on a pandaboard if the pandaboard-specific code is compiled in, use FDT to detect it instead. --- sys/arm/conf/PANDABOARD | 2 +- sys/arm/ti/omap4/files.omap4 | 2 + sys/arm/ti/omap4/pandaboard/files.pandaboard | 3 -- sys/arm/ti/omap4/pandaboard/pandaboard.c | 41 ++------------------ sys/arm/ti/omap4/pandaboard/pandaboard.h | 32 +++++++++++++++ sys/arm/ti/omap4/pandaboard/std.pandaboard | 4 -- sys/arm/ti/usb/omap_ehci.c | 14 +++++++ 7 files changed, 52 insertions(+), 46 deletions(-) delete mode 100644 sys/arm/ti/omap4/pandaboard/files.pandaboard create mode 100644 sys/arm/ti/omap4/pandaboard/pandaboard.h delete mode 100644 sys/arm/ti/omap4/pandaboard/std.pandaboard diff --git a/sys/arm/conf/PANDABOARD b/sys/arm/conf/PANDABOARD index 7176ae8bd71..2a0170d71ab 100644 --- a/sys/arm/conf/PANDABOARD +++ b/sys/arm/conf/PANDABOARD @@ -28,7 +28,7 @@ ident PANDABOARD hints "PANDABOARD.hints" include "std.armv6" -include "../ti/omap4/pandaboard/std.pandaboard" +include "../ti/omap4/std.omap4" makeoptions MODULES_EXTRA=dtb/omap4 diff --git a/sys/arm/ti/omap4/files.omap4 b/sys/arm/ti/omap4/files.omap4 index 1f331fc9066..ddae056d3fc 100644 --- a/sys/arm/ti/omap4/files.omap4 +++ b/sys/arm/ti/omap4/files.omap4 @@ -14,6 +14,8 @@ arm/ti/omap4/omap4_scm_padconf.c standard arm/ti/omap4/omap4_mp.c optional smp arm/ti/omap4/omap4_wugen.c standard +arm/ti/omap4/pandaboard/pandaboard.c standard + arm/ti/twl/twl.c optional twl arm/ti/twl/twl_vreg.c optional twl twl_vreg arm/ti/twl/twl_clks.c optional twl twl_clks diff --git a/sys/arm/ti/omap4/pandaboard/files.pandaboard b/sys/arm/ti/omap4/pandaboard/files.pandaboard deleted file mode 100644 index f658ffb3dc7..00000000000 --- a/sys/arm/ti/omap4/pandaboard/files.pandaboard +++ /dev/null @@ -1,3 +0,0 @@ -# $FreeBSD$ - -arm/ti/omap4/pandaboard/pandaboard.c standard diff --git a/sys/arm/ti/omap4/pandaboard/pandaboard.c b/sys/arm/ti/omap4/pandaboard/pandaboard.c index f557f736c56..94996f6ca10 100644 --- a/sys/arm/ti/omap4/pandaboard/pandaboard.c +++ b/sys/arm/ti/omap4/pandaboard/pandaboard.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* Registers in the SCRM that control the AUX clocks */ #define SCRM_ALTCLKSRC (0x110) @@ -111,8 +112,8 @@ __FBSDID("$FreeBSD$"); * RETURNS: * nothing. */ -static void -usb_hub_init(void) +void +pandaboard_usb_hub_init(void) { bus_space_handle_t scrm_addr, gpio1_addr, gpio2_addr, scm_addr; @@ -169,39 +170,3 @@ usb_hub_init(void) bus_space_unmap(fdtbus_bs_tag, gpio2_addr, OMAP44XX_GPIO2_SIZE); bus_space_unmap(fdtbus_bs_tag, scm_addr, OMAP44XX_SCM_PADCONF_SIZE); } - -/** - * board_init - initialises the pandaboard - * @dummy: ignored - * - * This function is called before any of the driver are initialised, which is - * annoying because it means we can't use the SCM, PRCM and GPIO modules which - * would really be useful. - * - * So we don't have: - * - any drivers - * - no interrupts - * - * What we do have: - * - virt/phys mappings from the devmap (see omap4.c) - * - - * - * - * So we are hamstrung without the useful drivers and we have to go back to - * direct register manupulation. Luckly we don't have to do to much, basically - * just setup the usb hub/ethernet. - * - */ -static void -board_init(void *dummy) -{ - /* Initialise the USB phy and hub */ - usb_hub_init(); - - /* - * XXX Board identification e.g. read out from FPGA or similar should - * go here - */ -} - -SYSINIT(board_init, SI_SUB_CPU, SI_ORDER_THIRD, board_init, NULL); diff --git a/sys/arm/ti/omap4/pandaboard/pandaboard.h b/sys/arm/ti/omap4/pandaboard/pandaboard.h new file mode 100644 index 00000000000..8d48d5b80ec --- /dev/null +++ b/sys/arm/ti/omap4/pandaboard/pandaboard.h @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2016 Olivier Houchard + * 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. + * + * $FreeBSD$ + */ + +#ifndef _PANDABOARD_H_ +#define _PANDABOARD_H_ +void pandaboard_usb_hub_init(void); +#endif /* _OMAP4_MP_H_ */ + diff --git a/sys/arm/ti/omap4/pandaboard/std.pandaboard b/sys/arm/ti/omap4/pandaboard/std.pandaboard deleted file mode 100644 index 6a65f66bb13..00000000000 --- a/sys/arm/ti/omap4/pandaboard/std.pandaboard +++ /dev/null @@ -1,4 +0,0 @@ -# $FreeBSD$ - -include "../ti/omap4/std.omap4" -files "../ti/omap4/pandaboard/files.pandaboard" diff --git a/sys/arm/ti/usb/omap_ehci.c b/sys/arm/ti/usb/omap_ehci.c index e60d721a17f..41b4c84c138 100644 --- a/sys/arm/ti/usb/omap_ehci.c +++ b/sys/arm/ti/usb/omap_ehci.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -57,6 +58,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + /* EHCI */ #define OMAP_USBHOST_HCCAPBASE 0x0000 #define OMAP_USBHOST_HCSPARAMS 0x0004 @@ -258,6 +261,7 @@ omap_ehci_init(struct omap_ehci_softc *isc) static int omap_ehci_probe(device_t dev) { + phandle_t root; if (!ofw_bus_status_okay(dev)) return (ENXIO); @@ -265,6 +269,16 @@ omap_ehci_probe(device_t dev) if (!ofw_bus_is_compatible(dev, "ti,ehci-omap")) return (ENXIO); +#ifdef SOC_OMAP4 + /* + * If we're running a Pandaboard, run Pandaboard-specific + * init code. + */ + root = OF_finddevice("/"); + if (fdt_is_compatible(root, "ti,omap4-panda")) + pandaboard_usb_hub_init(); +#endif + device_set_desc(dev, OMAP_EHCI_HC_DEVSTR); return (BUS_PROBE_DEFAULT); From 1a12740ffd2c70f573e876fc07cee2790f95ba17 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sat, 19 Nov 2016 01:34:12 +0000 Subject: [PATCH 186/204] Report page faults due to reserved bits in PTEs as a separate fault type. Rather than reporting a page fault due to a bad PTE as a protection violation with the "rsv" flag, treat these faults as a separate type of fault altogether. MFC after: 1 month --- sys/amd64/amd64/trap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 024c1b34a6c..aa98fbd381e 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -761,11 +761,11 @@ trap_fatal(frame, eva) #endif if (type == T_PAGEFLT) { printf("fault virtual address = 0x%lx\n", eva); - printf("fault code = %s %s %s%s, %s\n", + printf("fault code = %s %s %s, %s\n", code & PGEX_U ? "user" : "supervisor", code & PGEX_W ? "write" : "read", code & PGEX_I ? "instruction" : "data", - code & PGEX_RSV ? " rsv" : "", + code & PGEX_RSV ? "reserved bits in PTE" : code & PGEX_P ? "protection violation" : "page not present"); } printf("instruction pointer = 0x%lx:0x%lx\n", From 3cf1f0c34745930f476fdf76fe83b11e6a45757f Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sat, 19 Nov 2016 01:36:44 +0000 Subject: [PATCH 187/204] MFamd64: Various fatal page fault fixes. - If a page fault is triggered due to reserved bits in a PTE, treat it as a fatal fault and panic. - If PG_NX is in use, report whether a fatal page fault is due to an instruction fetch or a data access. - If a fatal page fault is due to reserved bits in a PTE, report that as the page fault type rather than a protection violation. MFC after: 1 month --- sys/i386/i386/trap.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 3cf0c5a6658..2ab8d1b485c 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -856,6 +856,14 @@ trap_pfault(frame, usermode, eva) } } + /* + * If the trap was caused by errant bits in the PTE then panic. + */ + if (frame->tf_err & PGEX_RSV) { + trap_fatal(frame, eva); + return (-1); + } + /* * PGEX_I is defined only if the execute disable bit capability is * supported and enabled. @@ -926,9 +934,15 @@ trap_fatal(frame, eva) #endif if (type == T_PAGEFLT) { printf("fault virtual address = 0x%x\n", eva); - printf("fault code = %s %s, %s\n", + printf("fault code = %s %s%s, %s\n", code & PGEX_U ? "user" : "supervisor", code & PGEX_W ? "write" : "read", +#if defined(PAE) || defined(PAE_TABLES) + pg_nx != 0 ? + (code & PGEX_I ? " instruction" : " data") : +#endif + "", + code & PGEX_RSV ? "reserved bits in PTE" : code & PGEX_P ? "protection violation" : "page not present"); } printf("instruction pointer = 0x%x:0x%x\n", From c49cf11473dfae9cae91ef4267b852116d089e50 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Sat, 19 Nov 2016 01:51:56 +0000 Subject: [PATCH 188/204] Resolv the remaining conflicting symbols between omap4 and am335x, and add omap4/pandaboard into the GENERIC kernel. --- sys/arm/conf/GENERIC | 11 ++++++- sys/arm/ti/am335x/am335x_scm_padconf.c | 2 +- sys/arm/ti/am335x/am335x_scm_padconf.h | 2 ++ sys/arm/ti/omap4/omap4_scm_padconf.c | 2 +- sys/arm/ti/omap4/omap4_scm_padconf.h | 2 ++ sys/arm/ti/ti_machdep.c | 2 +- sys/arm/ti/ti_pinmux.c | 43 +++++++++++++++++++------- 7 files changed, 48 insertions(+), 16 deletions(-) diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 5b47be76d7f..93a9b802e82 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -43,6 +43,7 @@ files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" files "../ti/files.ti" files "../ti/am335x/files.am335x" +files "../ti/omap4/files.omap4" options SOC_ALLWINNER_A10 options SOC_ALLWINNER_A13 @@ -53,6 +54,7 @@ options SOC_ALLWINNER_A83T options SOC_ALLWINNER_H3 options SOC_BCM2836 options SOC_TI_AM335X +options SOC_OMAP4 options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores @@ -80,6 +82,7 @@ device pmu # ARM Generic Timer device generic_timer +device mpcore_timer # MMC/SD/SDIO Card slot support device sdhci # SD controller @@ -129,6 +132,9 @@ device ti_i2c device am335x_pmic # AM335x Power Management IC (TPC65217) device am335x_rtc # RTC support (power management only) #define am335x_dmtpps # Pulse Per Second capture driver +device twl # TI TWLX0X0/TPS659x0 Power Management +device twl_vreg # twl voltage regulation +device twl_clks # twl external clocks # GPIO device gpio @@ -214,9 +220,12 @@ device ti_pruss # Mailbox support device ti_mbox +# DMA controller +device ti_sdma + # Extensible Firmware Interface options EFI # Flattened Device Tree options FDT # Configure using FDT/DTB data -makeoptions MODULES_EXTRA="dtb/allwinner dtb/am335x dtb/nvidia dtb/rpi" +makeoptions MODULES_EXTRA="dtb/allwinner dtb/am335x dtb/nvidia dtb/rpi dtb/omap4" diff --git a/sys/arm/ti/am335x/am335x_scm_padconf.c b/sys/arm/ti/am335x/am335x_scm_padconf.c index ebb65ddba2f..61917856325 100644 --- a/sys/arm/ti/am335x/am335x_scm_padconf.c +++ b/sys/arm/ti/am335x/am335x_scm_padconf.c @@ -293,7 +293,7 @@ const static struct ti_pinmux_padconf ti_padconf_devmap[] = { { .ballname = NULL }, }; -const struct ti_pinmux_device ti_pinmux_dev = { +const struct ti_pinmux_device ti_am335x_pinmux_dev = { .padconf_muxmode_mask = 0x7, .padconf_sate_mask = 0x78, .padstate = ti_padstate_devmap, diff --git a/sys/arm/ti/am335x/am335x_scm_padconf.h b/sys/arm/ti/am335x/am335x_scm_padconf.h index 2d0cd4b9cce..b1fa22bac6c 100644 --- a/sys/arm/ti/am335x/am335x_scm_padconf.h +++ b/sys/arm/ti/am335x/am335x_scm_padconf.h @@ -42,4 +42,6 @@ #define PADCONF_INPUT_PULLDOWN (RXACTIVE) #define PADCONF_INPUT_PULLUP_SLOW (PADCONF_INPUT_PULLUP | SLEWCTRL) +extern const struct ti_pinmux_device ti_am335x_pinmux_dev; + #endif /* AM335X_SCM_PADCONF_H */ diff --git a/sys/arm/ti/omap4/omap4_scm_padconf.c b/sys/arm/ti/omap4/omap4_scm_padconf.c index e43581e8db5..ada0e096f30 100644 --- a/sys/arm/ti/omap4/omap4_scm_padconf.c +++ b/sys/arm/ti/omap4/omap4_scm_padconf.c @@ -295,7 +295,7 @@ const static struct ti_pinmux_padconf ti_padconf_devmap[] = { { .ballname = NULL }, }; -const struct ti_pinmux_device ti_pinmux_dev = { +const struct ti_pinmux_device omap4_pinmux_dev = { .padconf_muxmode_mask = CONTROL_PADCONF_MUXMODE_MASK, .padconf_sate_mask = CONTROL_PADCONF_SATE_MASK, .padstate = ti_padstate_devmap, diff --git a/sys/arm/ti/omap4/omap4_scm_padconf.h b/sys/arm/ti/omap4/omap4_scm_padconf.h index b0c12fe595e..adee0a799cd 100644 --- a/sys/arm/ti/omap4/omap4_scm_padconf.h +++ b/sys/arm/ti/omap4/omap4_scm_padconf.h @@ -78,4 +78,6 @@ | CONTROL_PADCONF_OFF_PULL_ENABLE) #define PADCONF_PIN_OFF_WAKEUPENABLE CONTROL_PADCONF_WAKEUP_ENABLE +extern const struct ti_pinmux_device omap4_pinmux_dev; + #endif /* OMAP4_SCM_PADCONF_H */ diff --git a/sys/arm/ti/ti_machdep.c b/sys/arm/ti/ti_machdep.c index 3e9ba470193..23cfea021da 100644 --- a/sys/arm/ti/ti_machdep.c +++ b/sys/arm/ti/ti_machdep.c @@ -139,7 +139,7 @@ static platform_method_t omap4_methods[] = { #endif PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(omap4, "omap4", 0, "ti,omap4430", 0); +FDT_PLATFORM_DEF(omap4, "omap4", 0, "ti,omap4430", 200); #endif #if defined(SOC_TI_AM335X) diff --git a/sys/arm/ti/ti_pinmux.c b/sys/arm/ti/ti_pinmux.c index 605a54172d5..e102d61611a 100644 --- a/sys/arm/ti/ti_pinmux.c +++ b/sys/arm/ti/ti_pinmux.c @@ -54,6 +54,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include "ti_pinmux.h" struct pincfg { @@ -85,7 +88,7 @@ static struct ti_pinmux_softc *ti_pinmux_sc; * files and is specific to the given SoC platform. Each entry in the array * corresponds to an individual pin. */ -extern const struct ti_pinmux_device ti_pinmux_dev; +static const struct ti_pinmux_device *ti_pinmux_dev; /** @@ -101,7 +104,7 @@ ti_pinmux_padconf_from_name(const char *ballname) { const struct ti_pinmux_padconf *padconf; - padconf = ti_pinmux_dev.padconf; + padconf = ti_pinmux_dev->padconf; while (padconf->ballname != NULL) { if (strcmp(ballname, padconf->ballname) == 0) return(padconf); @@ -134,7 +137,7 @@ ti_pinmux_padconf_set_internal(struct ti_pinmux_softc *sc, uint16_t reg_val; /* populate the new value for the PADCONF register */ - reg_val = (uint16_t)(state & ti_pinmux_dev.padconf_sate_mask); + reg_val = (uint16_t)(state & ti_pinmux_dev->padconf_sate_mask); /* find the new mode requested */ for (mode = 0; mode < 8; mode++) { @@ -151,7 +154,7 @@ ti_pinmux_padconf_set_internal(struct ti_pinmux_softc *sc, } /* set the mux mode */ - reg_val |= (uint16_t)(mode & ti_pinmux_dev.padconf_muxmode_mask); + reg_val |= (uint16_t)(mode & ti_pinmux_dev->padconf_muxmode_mask); if (bootverbose) device_printf(sc->sc_dev, "setting internal %x for %s\n", @@ -226,11 +229,11 @@ ti_pinmux_padconf_get(const char *padname, const char **muxmode, /* save the state */ if (state) - *state = (reg_val & ti_pinmux_dev.padconf_sate_mask); + *state = (reg_val & ti_pinmux_dev->padconf_sate_mask); /* save the mode */ if (muxmode) - *muxmode = padconf->muxmodes[(reg_val & ti_pinmux_dev.padconf_muxmode_mask)]; + *muxmode = padconf->muxmodes[(reg_val & ti_pinmux_dev->padconf_muxmode_mask)]; return (0); } @@ -259,7 +262,7 @@ ti_pinmux_padconf_set_gpiomode(uint32_t gpio, unsigned int state) return (ENXIO); /* find the gpio pin in the padconf array */ - padconf = ti_pinmux_dev.padconf; + padconf = ti_pinmux_dev->padconf; while (padconf->ballname != NULL) { if (padconf->gpio_pin == gpio) break; @@ -269,10 +272,10 @@ ti_pinmux_padconf_set_gpiomode(uint32_t gpio, unsigned int state) return (EINVAL); /* populate the new value for the PADCONF register */ - reg_val = (uint16_t)(state & ti_pinmux_dev.padconf_sate_mask); + reg_val = (uint16_t)(state & ti_pinmux_dev->padconf_sate_mask); /* set the mux mode */ - reg_val |= (uint16_t)(padconf->gpio_mode & ti_pinmux_dev.padconf_muxmode_mask); + reg_val |= (uint16_t)(padconf->gpio_mode & ti_pinmux_dev->padconf_muxmode_mask); /* write the register value (16-bit writes) */ ti_pinmux_write_2(ti_pinmux_sc, padconf->reg_off, reg_val); @@ -304,7 +307,7 @@ ti_pinmux_padconf_get_gpiomode(uint32_t gpio, unsigned int *state) return (ENXIO); /* find the gpio pin in the padconf array */ - padconf = ti_pinmux_dev.padconf; + padconf = ti_pinmux_dev->padconf; while (padconf->ballname != NULL) { if (padconf->gpio_pin == gpio) break; @@ -317,12 +320,12 @@ ti_pinmux_padconf_get_gpiomode(uint32_t gpio, unsigned int *state) reg_val = ti_pinmux_read_2(ti_pinmux_sc, padconf->reg_off); /* check to make sure the pins is configured as GPIO in the first state */ - if ((reg_val & ti_pinmux_dev.padconf_muxmode_mask) != padconf->gpio_mode) + if ((reg_val & ti_pinmux_dev->padconf_muxmode_mask) != padconf->gpio_mode) return (EINVAL); /* read and store the reset of the state, i.e. pull-up, pull-down, etc */ if (state) - *state = (reg_val & ti_pinmux_dev.padconf_sate_mask); + *state = (reg_val & ti_pinmux_dev->padconf_sate_mask); return (0); } @@ -381,6 +384,22 @@ ti_pinmux_probe(device_t dev) __func__); return (EEXIST); } + switch (ti_chip()) { +#ifdef SOC_OMAP4 + case CHIP_OMAP_4: + ti_pinmux_dev = &omap4_pinmux_dev; + break; +#endif +#ifdef SOC_TI_AM335X + case CHIP_AM335X: + ti_pinmux_dev = &ti_am335x_pinmux_dev; + break; +#endif + default: + printf("Unknown CPU in pinmux\n"); + return (ENXIO); + } + device_set_desc(dev, "TI Pinmux Module"); return (BUS_PROBE_DEFAULT); From fe75b45213a403dc13c2e8a3bef5c83fa3b8225c Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sat, 19 Nov 2016 02:00:24 +0000 Subject: [PATCH 189/204] [net80211] handle hardware encryption offload in the receive path * teach the crypto modules about receive offload - although I have to do some further reviewing in places where we /can't/ have an RX key * teach the RX data path about receive offload encryption - check the flag, handle NULL key, do decap and checking as appropriate. Tested: * iwn(4), STA mode * ath(4), STA and AP mode * ath10k port, STA mode (hardware encryption) Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D8533 --- sys/net80211/ieee80211_adhoc.c | 21 ++++++-- sys/net80211/ieee80211_crypto.c | 49 +++++++++++++++--- sys/net80211/ieee80211_crypto.h | 7 +-- sys/net80211/ieee80211_crypto_ccmp.c | 40 +++++++++++++-- sys/net80211/ieee80211_crypto_tkip.c | 77 ++++++++++++++++++++++++++-- sys/net80211/ieee80211_hostap.c | 23 ++++++--- sys/net80211/ieee80211_sta.c | 60 +++++++++++++++++++--- sys/net80211/ieee80211_wds.c | 21 ++++++-- 8 files changed, 259 insertions(+), 39 deletions(-) diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index 54cc570b5f8..f32892651e4 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -316,6 +316,16 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; + int is_hw_decrypted = 0; + int has_decrypted = 0; + + /* + * Some devices do hardware decryption all the way through + * to pretending the frame wasn't encrypted in the first place. + * So, tag it appropriately so it isn't discarded inappropriately. + */ + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_DECRYPTED)) + is_hw_decrypted = 1; if (m->m_flags & M_AMPDU_MPDU) { /* @@ -479,7 +489,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, * crypto cipher modules used to do delayed update * of replay sequence numbers. */ - if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { + if (is_hw_decrypted || wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) { /* * Discard encrypted frames when privacy is off. @@ -490,14 +500,14 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, IEEE80211_NODE_STAT(ni, rx_noprivacy); goto out; } - key = ieee80211_crypto_decap(ni, m, hdrspace); - if (key == NULL) { + if (ieee80211_crypto_decap(ni, m, hdrspace, &key) == 0) { /* NB: stats+msgs handled in crypto_decap */ IEEE80211_NODE_STAT(ni, rx_wepfail); goto out; } wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; + has_decrypted = 1; } else { /* XXX M_WEP and IEEE80211_F_PRIVACY */ key = NULL; @@ -528,7 +538,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, /* * Next strip any MSDU crypto bits. */ - if (key != NULL && !ieee80211_crypto_demic(vap, key, m, 0)) { + if (!ieee80211_crypto_demic(vap, key, m, 0)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, ni->ni_macaddr, "data", "%s", "demic error"); vap->iv_stats.is_rx_demicfail++; @@ -582,7 +592,8 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, * any non-PAE frames received without encryption. */ if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && - (key == NULL && (m->m_flags & M_WEP) == 0) && + ((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && + (is_hw_decrypted == 0) && eh->ether_type != htons(ETHERTYPE_PAE)) { /* * Drop unencrypted frames. diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index 28bbddaf87c..9b0dc1e2dfd 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -580,8 +580,9 @@ ieee80211_crypto_encap(struct ieee80211_node *ni, struct mbuf *m) * Validate and strip privacy headers (and trailer) for a * received frame that has the WEP/Privacy bit set. */ -struct ieee80211_key * -ieee80211_crypto_decap(struct ieee80211_node *ni, struct mbuf *m, int hdrlen) +int +ieee80211_crypto_decap(struct ieee80211_node *ni, struct mbuf *m, int hdrlen, + struct ieee80211_key **key) { #define IEEE80211_WEP_HDRLEN (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN) #define IEEE80211_WEP_MINLEN \ @@ -590,16 +591,38 @@ ieee80211_crypto_decap(struct ieee80211_node *ni, struct mbuf *m, int hdrlen) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_key *k; struct ieee80211_frame *wh; + const struct ieee80211_rx_stats *rxs; const struct ieee80211_cipher *cip; uint8_t keyid; + /* + * Check for hardware decryption and IV stripping. + * If the IV is stripped then we definitely can't find a key. + * Set the key to NULL but return true; upper layers + * will need to handle a NULL key for a successful + * decrypt. + */ + rxs = ieee80211_get_rx_params_ptr(m); + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_DECRYPTED)) { + if (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP) { + /* + * Hardware decrypted, IV stripped. + * We can't find a key with a stripped IV. + * Return successful. + */ + *key = NULL; + return (1); + } + } + /* NB: this minimum size data frame could be bigger */ if (m->m_pkthdr.len < IEEE80211_WEP_MINLEN) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_ANY, "%s: WEP data frame too short, len %u\n", __func__, m->m_pkthdr.len); vap->iv_stats.is_rx_tooshort++; /* XXX need unique stat? */ - return NULL; + *key = NULL; + return (0); } /* @@ -625,15 +648,29 @@ ieee80211_crypto_decap(struct ieee80211_node *ni, struct mbuf *m, int hdrlen) IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2, "unable to pullup %s header", cip->ic_name); vap->iv_stats.is_rx_wepfail++; /* XXX */ - return NULL; + *key = NULL; + return (0); } - return (cip->ic_decap(k, m, hdrlen) ? k : NULL); + /* + * Attempt decryption. + * + * If we fail then don't return the key - return NULL + * and an error. + */ + if (cip->ic_decap(k, m, hdrlen)) { + /* success */ + *key = k; + return (1); + } + + /* Failure */ + *key = NULL; + return (0); #undef IEEE80211_WEP_MINLEN #undef IEEE80211_WEP_HDRLEN } - /* * Check and remove any MIC. */ diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h index 3d1f8cc5e00..c5d64bf91b6 100644 --- a/sys/net80211/ieee80211_crypto.h +++ b/sys/net80211/ieee80211_crypto.h @@ -114,7 +114,8 @@ struct ieee80211_key { #define IEEE80211_KEY_DEVICE /* flags owned by device driver */\ (IEEE80211_KEY_DEVKEY|IEEE80211_KEY_CIPHER0|IEEE80211_KEY_CIPHER1| \ - IEEE80211_KEY_SWCRYPT|IEEE80211_KEY_SWMIC) + IEEE80211_KEY_SWCRYPT|IEEE80211_KEY_SWMIC|IEEE80211_KEY_NOIV | \ + IEEE80211_KEY_NOIVMGT|IEEE80211_KEY_NOMIC|IEEE80211_KEY_NOMICMGT) #define IEEE80211_KEY_BITS \ "\20\1XMIT\2RECV\3GROUP\4SWENCRYPT\5SWDECRYPT\6SWENMIC\7SWDEMIC" \ @@ -207,8 +208,8 @@ struct ieee80211_key *ieee80211_crypto_get_txkey(struct ieee80211_node *, struct mbuf *); struct ieee80211_key *ieee80211_crypto_encap(struct ieee80211_node *, struct mbuf *); -struct ieee80211_key *ieee80211_crypto_decap(struct ieee80211_node *, - struct mbuf *, int); +int ieee80211_crypto_decap(struct ieee80211_node *, + struct mbuf *, int, struct ieee80211_key **); int ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k, struct mbuf *, int); /* diff --git a/sys/net80211/ieee80211_crypto_ccmp.c b/sys/net80211/ieee80211_crypto_ccmp.c index 9fdd5e08ee9..90e1c0733d0 100644 --- a/sys/net80211/ieee80211_crypto_ccmp.c +++ b/sys/net80211/ieee80211_crypto_ccmp.c @@ -162,12 +162,27 @@ ccmp_setiv(struct ieee80211_key *k, uint8_t *ivp) static int ccmp_encap(struct ieee80211_key *k, struct mbuf *m) { + const struct ieee80211_frame *wh; struct ccmp_ctx *ctx = k->wk_private; struct ieee80211com *ic = ctx->cc_ic; uint8_t *ivp; int hdrlen; + int is_mgmt; hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); + wh = mtod(m, const struct ieee80211_frame *); + is_mgmt = IEEE80211_IS_MGMT(wh); + + /* + * Check to see if we need to insert IV/MIC. + * + * Some offload devices don't require the IV to be inserted + * as part of the hardware encryption. + */ + if (is_mgmt && (k->wk_flags & IEEE80211_KEY_NOIVMGT)) + return 1; + if ((! is_mgmt) && (k->wk_flags & IEEE80211_KEY_NOIV)) + return 1; /* * Copy down 802.11 header and add the IV, KeyID, and ExtIV. @@ -217,12 +232,18 @@ READ_6(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5) static int ccmp_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) { + const struct ieee80211_rx_stats *rxs; struct ccmp_ctx *ctx = k->wk_private; struct ieee80211vap *vap = ctx->cc_vap; struct ieee80211_frame *wh; uint8_t *ivp, tid; uint64_t pn; + rxs = ieee80211_get_rx_params_ptr(m); + + if ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP)) + goto finish; + /* * Header should have extended IV and sequence number; * verify the former and validate the latter. @@ -261,17 +282,28 @@ ccmp_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) !ccmp_decrypt(k, pn, m, hdrlen)) return 0; +finish: /* * Copy up 802.11 header and strip crypto bits. */ - ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + ccmp.ic_header, hdrlen); - m_adj(m, ccmp.ic_header); - m_adj(m, -ccmp.ic_trailer); + if (! ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) { + ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + ccmp.ic_header, + hdrlen); + m_adj(m, ccmp.ic_header); + } + + /* + * XXX TODO: see if MMIC_STRIP also covers CCMP MIC trailer. + */ + if (! ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_MMIC_STRIP))) + m_adj(m, -ccmp.ic_trailer); /* * Ok to update rsc now. */ - k->wk_keyrsc[tid] = pn; + if (! ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) { + k->wk_keyrsc[tid] = pn; + } return 1; } diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index 8b33a791976..20258fa05e3 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -177,8 +177,13 @@ tkip_encap(struct ieee80211_key *k, struct mbuf *m) struct tkip_ctx *ctx = k->wk_private; struct ieee80211vap *vap = ctx->tc_vap; struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_frame *wh; uint8_t *ivp; int hdrlen; + int is_mgmt; + + wh = mtod(m, struct ieee80211_frame *); + is_mgmt = IEEE80211_IS_MGMT(wh); /* * Handle TKIP counter measures requirement. @@ -193,6 +198,16 @@ tkip_encap(struct ieee80211_key *k, struct mbuf *m) vap->iv_stats.is_crypto_tkipcm++; return 0; } + + /* + * Check to see whether IV needs to be included. + */ + if (is_mgmt && (k->wk_flags & IEEE80211_KEY_NOIVMGT)) + return 1; + if ((! is_mgmt) && (k->wk_flags & IEEE80211_KEY_NOIV)) + return 1; + + hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); /* @@ -224,6 +239,19 @@ static int tkip_enmic(struct ieee80211_key *k, struct mbuf *m, int force) { struct tkip_ctx *ctx = k->wk_private; + struct ieee80211_frame *wh; + int is_mgmt; + + wh = mtod(m, struct ieee80211_frame *); + is_mgmt = IEEE80211_IS_MGMT(wh); + + /* + * Check to see whether MIC needs to be included. + */ + if (is_mgmt && (k->wk_flags & IEEE80211_KEY_NOMICMGT)) + return 1; + if ((! is_mgmt) && (k->wk_flags & IEEE80211_KEY_NOMIC)) + return 1; if (force || (k->wk_flags & IEEE80211_KEY_SWENMIC)) { struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); @@ -259,11 +287,20 @@ READ_6(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5) static int tkip_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) { + const struct ieee80211_rx_stats *rxs; struct tkip_ctx *ctx = k->wk_private; struct ieee80211vap *vap = ctx->tc_vap; struct ieee80211_frame *wh; uint8_t *ivp, tid; + rxs = ieee80211_get_rx_params_ptr(m); + + /* + * If IV has been stripped, we skip most of the below. + */ + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP)) + goto finish; + /* * Header should have extended IV and sequence number; * verify the former and validate the latter. @@ -318,11 +355,22 @@ tkip_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) !tkip_decrypt(ctx, k, m, hdrlen)) return 0; +finish: + /* - * Copy up 802.11 header and strip crypto bits. + * Copy up 802.11 header and strip crypto bits - but only if we + * are required to. + */ + if (! ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) { + memmove(mtod(m, uint8_t *) + tkip.ic_header, mtod(m, void *), + hdrlen); + m_adj(m, tkip.ic_header); + } + + /* + * XXX TODO: do we need an option to potentially not strip the + * WEP trailer? Does "MMIC_STRIP" also mean this? Or? */ - memmove(mtod(m, uint8_t *) + tkip.ic_header, mtod(m, void *), hdrlen); - m_adj(m, tkip.ic_header); m_adj(m, -tkip.ic_trailer); return 1; @@ -334,11 +382,33 @@ tkip_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen) static int tkip_demic(struct ieee80211_key *k, struct mbuf *m, int force) { + const struct ieee80211_rx_stats *rxs; struct tkip_ctx *ctx = k->wk_private; struct ieee80211_frame *wh; uint8_t tid; wh = mtod(m, struct ieee80211_frame *); + rxs = ieee80211_get_rx_params_ptr(m); + + /* + * If we are told about a MIC failure from the driver, + * directly notify as a michael failure to the upper + * layers. + */ + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_FAIL_MIC)) { + struct ieee80211vap *vap = ctx->tc_vap; + ieee80211_notify_michael_failure(vap, wh, + k->wk_rxkeyix != IEEE80211_KEYIX_NONE ? + k->wk_rxkeyix : k->wk_keyix); + return 0; + } + + /* + * If IV has been stripped, we skip most of the below. + */ + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_MMIC_STRIP)) + goto finish; + if ((k->wk_flags & IEEE80211_KEY_SWDEMIC) || force) { struct ieee80211vap *vap = ctx->tc_vap; int hdrlen = ieee80211_hdrspace(vap->iv_ic, wh); @@ -371,6 +441,7 @@ tkip_demic(struct ieee80211_key *k, struct mbuf *m, int force) tid = ieee80211_gettid(wh); k->wk_keyrsc[tid] = ctx->rx_rsc; +finish: return 1; } diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 8189964e52c..9868f133bca 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -479,6 +479,16 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; + int is_hw_decrypted = 0; + int has_decrypted = 0; + + /* + * Some devices do hardware decryption all the way through + * to pretending the frame wasn't encrypted in the first place. + * So, tag it appropriately so it isn't discarded inappropriately. + */ + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_DECRYPTED)) + is_hw_decrypted = 1; if (m->m_flags & M_AMPDU_MPDU) { /* @@ -668,7 +678,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, * crypto cipher modules used to do delayed update * of replay sequence numbers. */ - if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { + if (is_hw_decrypted || wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) { /* * Discard encrypted frames when privacy is off. @@ -679,14 +689,14 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, IEEE80211_NODE_STAT(ni, rx_noprivacy); goto out; } - key = ieee80211_crypto_decap(ni, m, hdrspace); - if (key == NULL) { + if (ieee80211_crypto_decap(ni, m, hdrspace, &key) == 0) { /* NB: stats+msgs handled in crypto_decap */ IEEE80211_NODE_STAT(ni, rx_wepfail); goto out; } wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; + has_decrypted = 1; } else { /* XXX M_WEP and IEEE80211_F_PRIVACY */ key = NULL; @@ -769,7 +779,8 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, * any non-PAE frames received without encryption. */ if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && - (key == NULL && (m->m_flags & M_WEP) == 0) && + ((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && + (is_hw_decrypted == 0) && eh->ether_type != htons(ETHERTYPE_PAE)) { /* * Drop unencrypted frames. @@ -851,13 +862,13 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, goto out; } hdrspace = ieee80211_hdrspace(ic, wh); - key = ieee80211_crypto_decap(ni, m, hdrspace); - if (key == NULL) { + if (ieee80211_crypto_decap(ni, m, hdrspace, &key) == 0) { /* NB: stats+msgs handled in crypto_decap */ goto out; } wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; + has_decrypted = 1; } /* * Pass the packet to radiotap before calling iv_recv_mgmt(). diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 04fafe9c977..dd9ef6e4d21 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -546,6 +546,16 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; uint8_t *bssid; + int is_hw_decrypted = 0; + int has_decrypted = 0; + + /* + * Some devices do hardware decryption all the way through + * to pretending the frame wasn't encrypted in the first place. + * So, tag it appropriately so it isn't discarded inappropriately. + */ + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_DECRYPTED)) + is_hw_decrypted = 1; if (m->m_flags & M_AMPDU_MPDU) { /* @@ -723,6 +733,21 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, goto out; } + /* + * Handle privacy requirements for hardware decryption + * devices. + * + * For those devices, a handful of things happen. + * + * + If IV has been stripped, then we can't run + * ieee80211_crypto_decap() - none of the key + * + If MIC has been stripped, we can't validate + * MIC here. + * + If MIC fails, then we need to communicate a + * MIC failure up to the stack - but we don't know + * which key was used. + */ + /* * Handle privacy requirements. Note that we * must not be preempted from here until after @@ -731,7 +756,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, * crypto cipher modules used to do delayed update * of replay sequence numbers. */ - if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { + if (is_hw_decrypted || wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) { /* * Discard encrypted frames when privacy is off. @@ -742,14 +767,14 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, IEEE80211_NODE_STAT(ni, rx_noprivacy); goto out; } - key = ieee80211_crypto_decap(ni, m, hdrspace); - if (key == NULL) { + if (ieee80211_crypto_decap(ni, m, hdrspace, &key) == 0) { /* NB: stats+msgs handled in crypto_decap */ IEEE80211_NODE_STAT(ni, rx_wepfail); goto out; } wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; + has_decrypted = 1; } else { /* XXX M_WEP and IEEE80211_F_PRIVACY */ key = NULL; @@ -779,8 +804,13 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, /* * Next strip any MSDU crypto bits. + * + * Note: we can't do MIC stripping/verification if the + * upper layer has stripped it. We have to check MIC + * ourselves. So, key may be NULL, but we have to check + * the RX status. */ - if (key != NULL && !ieee80211_crypto_demic(vap, key, m, 0)) { + if (!ieee80211_crypto_demic(vap, key, m, 0)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, ni->ni_macaddr, "data", "%s", "demic error"); vap->iv_stats.is_rx_demicfail++; @@ -834,7 +864,8 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, * any non-PAE frames received without encryption. */ if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && - (key == NULL && (m->m_flags & M_WEP) == 0) && + ((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && + (is_hw_decrypted == 0) && eh->ether_type != htons(ETHERTYPE_PAE)) { /* * Drop unencrypted frames. @@ -883,6 +914,16 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, ether_sprintf(wh->i_addr2), rssi); } #endif + + /* + * Note: See above for hardware offload privacy requirements. + * It also applies here. + */ + + /* + * Again, having encrypted flag set check would be good, but + * then we have to also handle crypto_decap() like above. + */ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { if (subtype != IEEE80211_FC0_SUBTYPE_AUTH) { /* @@ -905,11 +946,16 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, goto out; } hdrspace = ieee80211_hdrspace(ic, wh); - key = ieee80211_crypto_decap(ni, m, hdrspace); - if (key == NULL) { + + /* + * Again, if IV/MIC was stripped, then this whole + * setup will fail. That's going to need some poking. + */ + if (ieee80211_crypto_decap(ni, m, hdrspace, &key) == 0) { /* NB: stats+msgs handled in crypto_decap */ goto out; } + has_decrypted = 1; wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; } diff --git a/sys/net80211/ieee80211_wds.c b/sys/net80211/ieee80211_wds.c index 05268e81d71..038f41292ed 100644 --- a/sys/net80211/ieee80211_wds.c +++ b/sys/net80211/ieee80211_wds.c @@ -417,6 +417,16 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, struct ether_header *eh; int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ uint8_t dir, type, subtype, qos; + int is_hw_decrypted = 0; + int has_decrypted = 0; + + /* + * Some devices do hardware decryption all the way through + * to pretending the frame wasn't encrypted in the first place. + * So, tag it appropriately so it isn't discarded inappropriately. + */ + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_DECRYPTED)) + is_hw_decrypted = 1; if (m->m_flags & M_AMPDU_MPDU) { /* @@ -544,7 +554,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, * crypto cipher modules used to do delayed update * of replay sequence numbers. */ - if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { + if (is_hw_decrypted || wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) { /* * Discard encrypted frames when privacy is off. @@ -555,14 +565,14 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, IEEE80211_NODE_STAT(ni, rx_noprivacy); goto out; } - key = ieee80211_crypto_decap(ni, m, hdrspace); - if (key == NULL) { + if (ieee80211_crypto_decap(ni, m, hdrspace, &key) == 0) { /* NB: stats+msgs handled in crypto_decap */ IEEE80211_NODE_STAT(ni, rx_wepfail); goto out; } wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; + has_decrypted = 1; } else { /* XXX M_WEP and IEEE80211_F_PRIVACY */ key = NULL; @@ -593,7 +603,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, /* * Next strip any MSDU crypto bits. */ - if (key != NULL && !ieee80211_crypto_demic(vap, key, m, 0)) { + if (!ieee80211_crypto_demic(vap, key, m, 0)) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, ni->ni_macaddr, "data", "%s", "demic error"); vap->iv_stats.is_rx_demicfail++; @@ -647,7 +657,8 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, * any non-PAE frames received without encryption. */ if ((vap->iv_flags & IEEE80211_F_DROPUNENC) && - (key == NULL && (m->m_flags & M_WEP) == 0) && + ((has_decrypted == 0) && (m->m_flags & M_WEP) == 0) && + (is_hw_decrypted == 0) && eh->ether_type != htons(ETHERTYPE_PAE)) { /* * Drop unencrypted frames. From 54068d184c9450628989ec6ad20f6d5906778cb9 Mon Sep 17 00:00:00 2001 From: Eric van Gyzen Date: Sat, 19 Nov 2016 02:09:58 +0000 Subject: [PATCH 190/204] locale: fix display of "grouping" and "mon_grouping" values The "grouping" and "mon_grouping" values are arrays of one-byte integers, not arrays of ASCII characters. Display them in a format similar to GNU and MacOS. MFC after: 3 days Sponsored by: Dell EMC --- usr.bin/locale/locale.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/usr.bin/locale/locale.c b/usr.bin/locale/locale.c index e4409dad4c3..2c3e61eb529 100644 --- a/usr.bin/locale/locale.c +++ b/usr.bin/locale/locale.c @@ -50,6 +50,7 @@ #include "setlocale.h" /* Local prototypes */ +char *format_grouping(const char *); void init_locales_list(void); void list_charmaps(void); void list_locales(void); @@ -488,6 +489,34 @@ showlocale(void) printf("LC_ALL=%s\n", vval); } +char * +format_grouping(const char *binary) +{ + static char rval[64]; + const char *cp; + size_t len; + + rval[0] = '\0'; + for (cp = binary; *cp != '\0'; ++cp) { + char group[sizeof("127;")]; + snprintf(group, sizeof(group), "%hhd;", *cp); + len = strlcat(rval, group, sizeof(rval)); + if (len >= sizeof(rval)) { + len = sizeof(rval) - 1; + break; + } + if (*cp == CHAR_MAX) { + break; + } + } + + /* Remove the trailing ';'. */ + rval[len - 1] = '\0'; + + return (rval); +} + + /* * keyword value lookup helper (via localeconv()) */ @@ -501,7 +530,7 @@ kwval_lconv(int id) lc = localeconv(); switch (id) { case KW_GROUPING: - rval = lc->grouping; + rval = format_grouping(lc->grouping); break; case KW_INT_CURR_SYMBOL: rval = lc->int_curr_symbol; @@ -516,7 +545,7 @@ kwval_lconv(int id) rval = lc->mon_thousands_sep; break; case KW_MON_GROUPING: - rval = lc->mon_grouping; + rval = format_grouping(lc->mon_grouping); break; case KW_POSITIVE_SIGN: rval = lc->positive_sign; From 0ae37b2f012c294120a9743d3874709a8b682ba2 Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Sat, 19 Nov 2016 07:28:00 +0000 Subject: [PATCH 191/204] For RTL8812AU: - The Tx power (diff) values should be signed - Fix an off by one error when reading Tx power (diff) values Reviewed by: avos, adrian Differential Revision: https://reviews.freebsd.org/D8571 --- sys/dev/rtwn/rtl8812a/r12a_rom.c | 19 ++++++++++--------- sys/dev/rtwn/rtl8812a/r12a_var.h | 18 +++++++++--------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/sys/dev/rtwn/rtl8812a/r12a_rom.c b/sys/dev/rtwn/rtl8812a/r12a_rom.c index df8bea64653..f5d16a3ff71 100644 --- a/sys/dev/rtwn/rtl8812a/r12a_rom.c +++ b/sys/dev/rtwn/rtl8812a/r12a_rom.c @@ -65,7 +65,7 @@ r12a_parse_rom_common(struct rtwn_softc *sc, uint8_t *buf) { struct r12a_softc *rs = sc->sc_priv; struct r12a_rom *rom = (struct r12a_rom *)buf; - int i, j; + int i, j, k; sc->thermal_meter = rom->thermal_meter; rs->crystalcap = RTWN_GET_ROM_VAR(rom->crystalcap, @@ -99,15 +99,15 @@ r12a_parse_rom_common(struct rtwn_softc *sc, uint8_t *buf) MS(pwr_diff_2g->ht20_ofdm, HIGH_PART)); rs->bw40_tx_pwr_diff_2g[i][0] = 0; - for (j = 1; j < nitems(pwr_diff_2g->diff123); j++) { + for (j = 1, k = 0; k < nitems(pwr_diff_2g->diff123); j++, k++) { rs->cck_tx_pwr_diff_2g[i][j] = RTWN_SIGN4TO8( - MS(pwr_diff_2g->diff123[j].ofdm_cck, LOW_PART)); + MS(pwr_diff_2g->diff123[k].ofdm_cck, LOW_PART)); rs->ofdm_tx_pwr_diff_2g[i][j] = RTWN_SIGN4TO8( - MS(pwr_diff_2g->diff123[j].ofdm_cck, HIGH_PART)); + MS(pwr_diff_2g->diff123[k].ofdm_cck, HIGH_PART)); rs->bw20_tx_pwr_diff_2g[i][j] = RTWN_SIGN4TO8( - MS(pwr_diff_2g->diff123[j].ht40_ht20, LOW_PART)); + MS(pwr_diff_2g->diff123[k].ht40_ht20, LOW_PART)); rs->bw40_tx_pwr_diff_2g[i][j] = RTWN_SIGN4TO8( - MS(pwr_diff_2g->diff123[j].ht40_ht20, HIGH_PART)); + MS(pwr_diff_2g->diff123[k].ht40_ht20, HIGH_PART)); } for (j = 0; j < R12A_GROUP_5G; j++) { @@ -128,11 +128,12 @@ r12a_parse_rom_common(struct rtwn_softc *sc, uint8_t *buf) rs->bw20_tx_pwr_diff_5g[i][0] = RTWN_SIGN4TO8( MS(pwr_diff_5g->ht20_ofdm, HIGH_PART)); rs->bw40_tx_pwr_diff_5g[i][0] = 0; - for (j = 1; j < nitems(pwr_diff_5g->ht40_ht20); j++) { + for (j = 1, k = 0; k < nitems(pwr_diff_5g->ht40_ht20); + j++, k++) { rs->bw20_tx_pwr_diff_5g[i][j] = RTWN_SIGN4TO8( - MS(pwr_diff_5g->ht40_ht20[j], LOW_PART)); + MS(pwr_diff_5g->ht40_ht20[k], LOW_PART)); rs->bw40_tx_pwr_diff_5g[i][j] = RTWN_SIGN4TO8( - MS(pwr_diff_5g->ht40_ht20[j], HIGH_PART)); + MS(pwr_diff_5g->ht40_ht20[k], HIGH_PART)); } for (j = 0; j < nitems(pwr_diff_5g->ht80_ht160); j++) { diff --git a/sys/dev/rtwn/rtl8812a/r12a_var.h b/sys/dev/rtwn/rtl8812a/r12a_var.h index 9c22cf98ddb..e236a5cdeec 100644 --- a/sys/dev/rtwn/rtl8812a/r12a_var.h +++ b/sys/dev/rtwn/rtl8812a/r12a_var.h @@ -64,16 +64,16 @@ struct r12a_softc { uint8_t ht40_tx_pwr_2g[R12A_MAX_RF_PATH][R12A_GROUP_2G]; uint8_t ht40_tx_pwr_5g[R12A_MAX_RF_PATH][R12A_GROUP_5G]; - uint8_t cck_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; - uint8_t ofdm_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; - uint8_t bw20_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; - uint8_t bw40_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; + int8_t cck_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; + int8_t ofdm_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; + int8_t bw20_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; + int8_t bw40_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; - uint8_t ofdm_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; - uint8_t bw20_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; - uint8_t bw40_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; - uint8_t bw80_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; - uint8_t bw160_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; + int8_t ofdm_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; + int8_t bw20_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; + int8_t bw40_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; + int8_t bw80_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; + int8_t bw160_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT]; int sc_ant; From 2ec31e84cce2537f97c566ee3934d72a936d9b4f Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Sat, 19 Nov 2016 08:12:57 +0000 Subject: [PATCH 192/204] zfs: fix up after the removal of PG_CACHED pages in r308691 PR: 214629 Reported by: mshirk@daemon-security.com Reviewed by: alc Tested by: Shawn Webb X-MFC with: 308691 --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index dee837eb738..d176706f777 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -426,8 +426,8 @@ page_busy(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes) continue; } vm_page_sbusy(pp); - } else { - ASSERT(pp != NULL && !pp->valid); + } else if (pp != NULL) { + ASSERT(!pp->valid); pp = NULL; } From 77d81a4dab2b244441fb5c6660af32bc70b6208c Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Sat, 19 Nov 2016 08:54:21 +0000 Subject: [PATCH 193/204] lsdev device name section headers should be printed by dv_print callback. lsdev command does walk over devsw list, prints list element name and will use dv_print() callback to print the device list. Unfortunately this approach will add unneeded noise when there are no particular devices detected. To remove "empty" device section headers, the dv_print() callback should print the header instead. In addition, fixed dv_print callback for md module. Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D8551 --- sys/boot/common/commands.c | 6 ++---- sys/boot/common/dev_net.c | 9 ++++++++- sys/boot/common/md.c | 11 ++++++++--- sys/boot/efi/libefi/efinet.c | 4 ++++ sys/boot/efi/libefi/efipart.c | 4 ++++ sys/boot/i386/libfirewire/firewire.c | 4 ++++ sys/boot/i386/libi386/bioscd.c | 7 +++++++ sys/boot/i386/libi386/biosdisk.c | 7 +++++++ sys/boot/i386/libi386/pxe.c | 3 +++ sys/boot/mips/beri/loader/beri_disk_cfi.c | 4 ++++ sys/boot/mips/beri/loader/beri_disk_sdcard.c | 4 ++++ sys/boot/pc98/libpc98/bioscd.c | 7 +++++++ sys/boot/pc98/libpc98/biosdisk.c | 7 +++++++ sys/boot/uboot/lib/disk.c | 7 +++++++ sys/boot/usb/storage/umass_loader.c | 4 ++++ sys/boot/userboot/userboot/host.c | 4 ++++ sys/boot/userboot/userboot/userboot_disk.c | 7 +++++++ sys/boot/zfs/zfs.c | 7 +++++++ 18 files changed, 98 insertions(+), 8 deletions(-) diff --git a/sys/boot/common/commands.c b/sys/boot/common/commands.c index 9f1d9590e79..2b0e8cbe0ac 100644 --- a/sys/boot/common/commands.c +++ b/sys/boot/common/commands.c @@ -497,10 +497,8 @@ command_lsdev(int argc, char *argv[]) pager_open(); for (i = 0; devsw[i] != NULL; i++) { if (devsw[i]->dv_print != NULL){ - sprintf(line, "%s devices:\n", devsw[i]->dv_name); - if (pager_output(line)) - break; - devsw[i]->dv_print(verbose); + if (devsw[i]->dv_print(verbose)) + break; } else { sprintf(line, "%s: (unknown)\n", devsw[i]->dv_name); if (pager_output(line)) diff --git a/sys/boot/common/dev_net.c b/sys/boot/common/dev_net.c index 7b178af0190..76abb2eb50b 100644 --- a/sys/boot/common/dev_net.c +++ b/sys/boot/common/dev_net.c @@ -332,11 +332,18 @@ net_print(int verbose) int i, d, cnt; int ret = 0; + if (netif_drivers[0] == NULL) + return (ret); + + printf("%s devices:", netdev.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + cnt = 0; for (d = 0; netif_drivers[d]; d++) { drv = netif_drivers[d]; for (i = 0; i < drv->netif_nifs; i++) { - printf("\t%s%d:", "net", cnt++); + printf("\t%s%d:", netdev.dv_name, cnt++); if (verbose) { printf(" (%s%d)", drv->netif_bname, drv->netif_ifs[i].dif_unit); diff --git a/sys/boot/common/md.c b/sys/boot/common/md.c index e5e8a4850dc..f4469329ca4 100644 --- a/sys/boot/common/md.c +++ b/sys/boot/common/md.c @@ -63,7 +63,7 @@ static int md_init(void); static int md_strategy(void *, int, daddr_t, size_t, size_t, char *, size_t *); static int md_open(struct open_file *, ...); static int md_close(struct open_file *); -static void md_print(int); +static int md_print(int); struct devsw md_dev = { "md", @@ -143,9 +143,14 @@ md_close(struct open_file *f) return ((dev->d_unit != 0) ? ENXIO : 0); } -static void +static int md_print(int verbose) { - printf("MD (%u bytes)\n", MD_IMAGE_SIZE); + printf("%s devices:", md_dev.dv_name); + if (pager_output("\n") != 0) + return (1); + + printf("MD (%u bytes)", MD_IMAGE_SIZE); + return (pager_output("\n")); } diff --git a/sys/boot/efi/libefi/efinet.c b/sys/boot/efi/libefi/efinet.c index 8d7db1f63f1..1207088d868 100644 --- a/sys/boot/efi/libefi/efinet.c +++ b/sys/boot/efi/libefi/efinet.c @@ -353,6 +353,10 @@ efinet_dev_print(int verbose) EFI_HANDLE h; int unit, ret = 0; + printf("%s devices:", efinet_dev.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + for (unit = 0, h = efi_find_handle(&efinet_dev, 0); h != NULL; h = efi_find_handle(&efinet_dev, ++unit)) { printf(" %s%d:", efinet_dev.dv_name, unit); diff --git a/sys/boot/efi/libefi/efipart.c b/sys/boot/efi/libefi/efipart.c index cba94de9d27..5a993812bce 100644 --- a/sys/boot/efi/libefi/efipart.c +++ b/sys/boot/efi/libefi/efipart.c @@ -172,6 +172,10 @@ efipart_print(int verbose) u_int unit; int ret = 0; + printf("%s devices:", efipart_dev.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + for (unit = 0, h = efi_find_handle(&efipart_dev, 0); h != NULL; h = efi_find_handle(&efipart_dev, ++unit)) { snprintf(line, sizeof(line), " %s%d:", diff --git a/sys/boot/i386/libfirewire/firewire.c b/sys/boot/i386/libfirewire/firewire.c index fea61f3bad9..f2975944820 100644 --- a/sys/boot/i386/libfirewire/firewire.c +++ b/sys/boot/i386/libfirewire/firewire.c @@ -155,6 +155,10 @@ fw_print(int verbose) int i, ret = 0; struct fwohci_softc *sc; + printf("%s devices:", fwohci.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + for (i = 0; i < MAX_OHCI; i ++) { sc = &fwinfo[i]; if (sc->state == FWOHCI_STATE_DEAD) diff --git a/sys/boot/i386/libi386/bioscd.c b/sys/boot/i386/libi386/bioscd.c index 776ddfa65fe..37cd6d2aa4c 100644 --- a/sys/boot/i386/libi386/bioscd.c +++ b/sys/boot/i386/libi386/bioscd.c @@ -183,6 +183,13 @@ bc_print(int verbose) char line[80]; int i, ret = 0; + if (nbcinfo == 0) + return (0); + + printf("%s devices:", bioscd.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + for (i = 0; i < nbcinfo; i++) { snprintf(line, sizeof(line), " cd%d: Device 0x%x\n", i, bcinfo[i].bc_sp.sp_devicespec); diff --git a/sys/boot/i386/libi386/biosdisk.c b/sys/boot/i386/libi386/biosdisk.c index 0af0c2a4c81..fa59234e0d3 100644 --- a/sys/boot/i386/libi386/biosdisk.c +++ b/sys/boot/i386/libi386/biosdisk.c @@ -328,6 +328,13 @@ bd_print(int verbose) struct disk_devdesc dev; int i, ret = 0; + if (nbdinfo == 0) + return (0); + + printf("%s devices:", biosdisk.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + for (i = 0; i < nbdinfo; i++) { snprintf(line, sizeof(line), " disk%d: BIOS drive %c (%ju X %u):\n", i, diff --git a/sys/boot/i386/libi386/pxe.c b/sys/boot/i386/libi386/pxe.c index a246e835624..7f27ba4a674 100644 --- a/sys/boot/i386/libi386/pxe.c +++ b/sys/boot/i386/libi386/pxe.c @@ -389,6 +389,9 @@ pxe_print(int verbose) if (pxe_call == NULL) return (0); + printf("%s devices:", pxedisk.dv_name); + if (pager_output("\n") != 0) + return (1); if (verbose) { snprintf(line, sizeof(line), " pxe0: %s:%s\n", inet_ntoa(rootip), rootpath); diff --git a/sys/boot/mips/beri/loader/beri_disk_cfi.c b/sys/boot/mips/beri/loader/beri_disk_cfi.c index 7a84cc648b4..a9695e2d929 100644 --- a/sys/boot/mips/beri/loader/beri_disk_cfi.c +++ b/sys/boot/mips/beri/loader/beri_disk_cfi.c @@ -119,6 +119,10 @@ beri_cfi_disk_print(int verbose) char line[80]; int ret; + printf("%s devices:", beri_cfi_disk.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + snprintf(line, sizeof(line), " cfi%d CFI flash device\n", 0); ret = pager_output(line); if (ret != 0) diff --git a/sys/boot/mips/beri/loader/beri_disk_sdcard.c b/sys/boot/mips/beri/loader/beri_disk_sdcard.c index 0bde49bebd7..c07ba75c1db 100644 --- a/sys/boot/mips/beri/loader/beri_disk_sdcard.c +++ b/sys/boot/mips/beri/loader/beri_disk_sdcard.c @@ -125,6 +125,10 @@ beri_sdcard_disk_print(int verbose) char line[80]; int ret; + printf("%s devices:", beri_sdcard_disk.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + snprintf(line, sizeof(line), " sdcard%d Altera SD card drive\n", 0); ret = pager_output(line); if (ret != 0) diff --git a/sys/boot/pc98/libpc98/bioscd.c b/sys/boot/pc98/libpc98/bioscd.c index 6e520138400..9cdc5673bfd 100644 --- a/sys/boot/pc98/libpc98/bioscd.c +++ b/sys/boot/pc98/libpc98/bioscd.c @@ -179,6 +179,13 @@ bc_print(int verbose) char line[80]; int i, ret = 0; + if (nbcinfo == 0) + return (0); + + printf("%s devices:", bioscd.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + for (i = 0; i < nbcinfo; i++) { sprintf(line, " cd%d: Device 0x%x\n", i, bcinfo[i].bc_sp.sp_devicespec); diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c index 6ecfa4912a6..3163019c2b9 100644 --- a/sys/boot/pc98/libpc98/biosdisk.c +++ b/sys/boot/pc98/libpc98/biosdisk.c @@ -258,6 +258,13 @@ bd_print(int verbose) struct open_disk *od; struct pc98_partition *dptr; + if (nbdinfo == 0) + return (0); + + printf("%s devices:", biosdisk.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + for (i = 0; i < nbdinfo; i++) { snprintf(line, sizeof(line), " disk%d: BIOS drive %c:\n", i, 'A' + i); diff --git a/sys/boot/uboot/lib/disk.c b/sys/boot/uboot/lib/disk.c index c0d187d1f96..474d4aa31f7 100644 --- a/sys/boot/uboot/lib/disk.c +++ b/sys/boot/uboot/lib/disk.c @@ -245,6 +245,13 @@ stor_print(int verbose) static char line[80]; int i, ret = 0; + if (stor_info_no == 0) + return (ret); + + printf("%s devices:", uboot_storage.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + for (i = 0; i < stor_info_no; i++) { dev.d_dev = &uboot_storage; dev.d_unit = i; diff --git a/sys/boot/usb/storage/umass_loader.c b/sys/boot/usb/storage/umass_loader.c index e6e38bfe9e2..9ecd4b2e162 100644 --- a/sys/boot/usb/storage/umass_loader.c +++ b/sys/boot/usb/storage/umass_loader.c @@ -175,6 +175,10 @@ umass_disk_print(int verbose) { struct disk_devdesc dev; + printf("%s devices:", umass_disk.dv_name); + if (pager_output("\n") != 0) + return (1); + memset(&dev, 0, sizeof(dev)); ret = pager_output(" umass0 UMASS device\n"); diff --git a/sys/boot/userboot/userboot/host.c b/sys/boot/userboot/userboot/host.c index dca2f341ba6..e69d2d31bfc 100644 --- a/sys/boot/userboot/userboot/host.c +++ b/sys/boot/userboot/userboot/host.c @@ -139,6 +139,10 @@ host_dev_print(int verbose) { char line[80]; + printf("%s devices:", host_dev.dv_name); + if (pager_output("\n") != 0) + return (1); + snprintf(line, sizeof(line), " host%d: Host filesystem\n", 0); return (pager_output(line)); } diff --git a/sys/boot/userboot/userboot/userboot_disk.c b/sys/boot/userboot/userboot/userboot_disk.c index 7c0c36820a9..ecd933b9c31 100644 --- a/sys/boot/userboot/userboot/userboot_disk.c +++ b/sys/boot/userboot/userboot/userboot_disk.c @@ -123,6 +123,13 @@ userdisk_print(int verbose) char line[80]; int i, ret = 0; + if (userdisk_maxunit == 0) + return (0); + + printf("%s devices:", userboot_disk.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + for (i = 0; i < userdisk_maxunit; i++) { snprintf(line, sizeof(line), " disk%d: Guest drive image\n", i); diff --git a/sys/boot/zfs/zfs.c b/sys/boot/zfs/zfs.c index 3efa429e84a..602db44aa97 100644 --- a/sys/boot/zfs/zfs.c +++ b/sys/boot/zfs/zfs.c @@ -521,6 +521,13 @@ zfs_dev_print(int verbose) char line[80]; int ret = 0; + if (STAILQ_EMPTY(&zfs_pools)) + return (0); + + printf("%s devices:", zfs_dev.dv_name); + if ((ret = pager_output("\n")) != 0) + return (ret); + if (verbose) { return (spa_all_status()); } From 487012f4f82b1b4048b1a905094c7297b3f17d3b Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Sat, 19 Nov 2016 13:11:03 +0000 Subject: [PATCH 194/204] Move the pandaboard initialization from the probe to the attach method. Use ofw_bus_node_is_compatible instead of fdt_is_compatible, as the later is deprecated. Suggested by: andrew --- sys/arm/ti/usb/omap_ehci.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/sys/arm/ti/usb/omap_ehci.c b/sys/arm/ti/usb/omap_ehci.c index 41b4c84c138..ea9a01dd8da 100644 --- a/sys/arm/ti/usb/omap_ehci.c +++ b/sys/arm/ti/usb/omap_ehci.c @@ -261,24 +261,12 @@ omap_ehci_init(struct omap_ehci_softc *isc) static int omap_ehci_probe(device_t dev) { - phandle_t root; - if (!ofw_bus_status_okay(dev)) return (ENXIO); if (!ofw_bus_is_compatible(dev, "ti,ehci-omap")) return (ENXIO); -#ifdef SOC_OMAP4 - /* - * If we're running a Pandaboard, run Pandaboard-specific - * init code. - */ - root = OF_finddevice("/"); - if (fdt_is_compatible(root, "ti,omap4-panda")) - pandaboard_usb_hub_init(); -#endif - device_set_desc(dev, OMAP_EHCI_HC_DEVSTR); return (BUS_PROBE_DEFAULT); @@ -303,9 +291,22 @@ omap_ehci_attach(device_t dev) { struct omap_ehci_softc *isc = device_get_softc(dev); ehci_softc_t *sc = &isc->base; +#ifdef SOC_OMAP4 + phandle_t root; +#endif int err; int rid; +#ifdef SOC_OMAP4 + /* + * If we're running a Pandaboard, run Pandaboard-specific + * init code. + */ + root = OF_finddevice("/"); + if (ofw_bus_node_is_compatible(root, "ti,omap4-panda")) + pandaboard_usb_hub_init(); +#endif + /* initialise some bus fields */ sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; From f74776ed75fc3947018f4260ce5ec25162cc0b8e Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sat, 19 Nov 2016 13:57:21 +0000 Subject: [PATCH 195/204] Make fdt_is_compatible a static function. It's only used in fdt_common.c. Sponsored by: ABT Systems Ltd --- sys/dev/fdt/fdt_common.c | 4 +++- sys/dev/fdt/fdt_common.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c index 783647b04d3..3e59fb97707 100644 --- a/sys/dev/fdt/fdt_common.c +++ b/sys/dev/fdt/fdt_common.c @@ -69,6 +69,8 @@ vm_offset_t fdt_immr_size; struct fdt_ic_list fdt_ic_list_head = SLIST_HEAD_INITIALIZER(fdt_ic_list_head); +static int fdt_is_compatible(phandle_t, const char *); + static int fdt_get_range_by_busaddr(phandle_t node, u_long addr, u_long *base, u_long *size) @@ -242,7 +244,7 @@ moveon: * Note the buffer has to be on the stack since malloc() is usually not * available in such cases either. */ -int +static int fdt_is_compatible(phandle_t node, const char *compatstr) { char buf[FDT_COMPAT_LEN]; diff --git a/sys/dev/fdt/fdt_common.h b/sys/dev/fdt/fdt_common.h index afddc310c12..81ce4bfae2e 100644 --- a/sys/dev/fdt/fdt_common.h +++ b/sys/dev/fdt/fdt_common.h @@ -94,7 +94,6 @@ int fdt_get_phyaddr(phandle_t, device_t, int *, void **); int fdt_get_range(phandle_t, int, u_long *, u_long *); int fdt_immr_addr(vm_offset_t); int fdt_regsize(phandle_t, u_long *, u_long *); -int fdt_is_compatible(phandle_t, const char *); int fdt_is_compatible_strict(phandle_t, const char *); int fdt_is_enabled(phandle_t); int fdt_pm_is_enabled(phandle_t); From 35dfb8cb68786de6fbc7ef126a1e4fa585884b6b Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sat, 19 Nov 2016 14:45:08 +0000 Subject: [PATCH 196/204] Ensure that TCP state changes to state-closing are reported via dtrace. This does not cover state changes from TIME-WAIT. Reviewed by: gnn MFC after: 3 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D8443 --- sys/netinet/tcp_input.c | 1 - sys/netinet/tcp_stacks/fastpath.c | 1 - sys/netinet/tcp_subr.c | 5 ++++- sys/netinet/tcp_timewait.c | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 868fa4ef2f3..dbd27ef1b25 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2206,7 +2206,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, case TCPS_LAST_ACK: so->so_error = ECONNRESET; close: - tcp_state_change(tp, TCPS_CLOSED); /* FALLTHROUGH */ default: tp = tcp_close(tp); diff --git a/sys/netinet/tcp_stacks/fastpath.c b/sys/netinet/tcp_stacks/fastpath.c index 4ce2ccc0f01..edf46c4f960 100644 --- a/sys/netinet/tcp_stacks/fastpath.c +++ b/sys/netinet/tcp_stacks/fastpath.c @@ -750,7 +750,6 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, struct socket *so, case TCPS_LAST_ACK: so->so_error = ECONNRESET; close: - tcp_state_change(tp, TCPS_CLOSED); /* FALLTHROUGH */ default: tp = tcp_close(tp); diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index f0e76bf1847..c5d059a5fe6 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1502,6 +1502,7 @@ tcp_discardcb(struct tcpcb *tp) inp->inp_ppcb = NULL; if (tp->t_timers->tt_draincnt == 0) { /* We own the last reference on tcpcb, let's free it. */ + TCPSTATES_DEC(tp->t_state); if (tp->t_fb->tfb_tcp_fb_fini) (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); refcount_release(&tp->t_fb->tfb_refcnt); @@ -1531,6 +1532,7 @@ tcp_timer_discard(void *ptp) tp->t_timers->tt_draincnt--; if (tp->t_timers->tt_draincnt == 0) { /* We own the last reference on this tcpcb, let's free it. */ + TCPSTATES_DEC(tp->t_state); if (tp->t_fb->tfb_tcp_fb_fini) (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); refcount_release(&tp->t_fb->tfb_refcnt); @@ -1577,7 +1579,8 @@ tcp_close(struct tcpcb *tp) #endif in_pcbdrop(inp); TCPSTAT_INC(tcps_closed); - TCPSTATES_DEC(tp->t_state); + if (tp->t_state != TCPS_CLOSED) + tcp_state_change(tp, TCPS_CLOSED); KASSERT(inp->inp_socket != NULL, ("tcp_close: inp_socket NULL")); so = inp->inp_socket; soisdisconnected(so); diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 27b965ea265..0253ccbc8db 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -340,6 +340,7 @@ tcp_twstart(struct tcpcb *tp) tcp_twrespond(tw, TH_ACK); inp->inp_ppcb = tw; inp->inp_flags |= INP_TIMEWAIT; + TCPSTATES_INC(TCPS_TIME_WAIT); tcp_tw_2msl_reset(tw, 0); /* From 0a30b4b2a5382a4425451759fa2840a318cc2571 Mon Sep 17 00:00:00 2001 From: Jared McNeill Date: Sat, 19 Nov 2016 14:56:22 +0000 Subject: [PATCH 197/204] On H3, initialize alarm and shutdown trip points and do temperature conversion as it is done in the BSP. --- sys/arm/allwinner/aw_thermal.c | 77 ++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 17 deletions(-) diff --git a/sys/arm/allwinner/aw_thermal.c b/sys/arm/allwinner/aw_thermal.c index 12146afd968..5143cda95fb 100644 --- a/sys/arm/allwinner/aw_thermal.c +++ b/sys/arm/allwinner/aw_thermal.c @@ -109,10 +109,13 @@ __FBSDID("$FreeBSD$"); #define H3_ADC_ACQUIRE_TIME 0x3f #define H3_FILTER 0x6 #define H3_INTC 0x191000 -#define H3_TEMP_BASE 1794000 +#define H3_TEMP_BASE 217 #define H3_TEMP_MUL 1000 -#define H3_TEMP_DIV -8253 +#define H3_TEMP_DIV 8253 +#define H3_TEMP_MINUS 1794000 #define H3_CLK_RATE 4000000 +#define H3_INIT_ALARM 90 /* degC */ +#define H3_INIT_SHUT 105 /* degC */ #define TEMP_C_TO_K 273 #define SENSOR_ENABLE_ALL (SENSOR0_EN|SENSOR1_EN|SENSOR2_EN) @@ -131,6 +134,8 @@ TUNABLE_INT("hw.aw_thermal.throttle_enable", &aw_thermal_throttle_enable); struct aw_thermal_sensor { const char *name; const char *desc; + int init_alarm; + int init_shut; }; struct aw_thermal_config { @@ -142,6 +147,7 @@ struct aw_thermal_config { uint32_t filter; uint32_t intc; int (*to_temp)(uint32_t); + uint32_t (*to_reg)(int); int temp_base; int temp_mul; int temp_div; @@ -177,9 +183,7 @@ static const struct aw_thermal_config a83t_config = { .filter = A83T_FILTER, .intc = A83T_INTC, .to_temp = a83t_to_temp, - .calib0 = 1, .calib0_mask = 0xffffffff, - .calib1 = 1, .calib1_mask = 0xffffffff, }; @@ -215,7 +219,13 @@ static const struct aw_thermal_config a64_config = { static int h3_to_temp(uint32_t val) { - return (((int)(val * H3_TEMP_MUL) - H3_TEMP_BASE) / H3_TEMP_DIV); + return (H3_TEMP_BASE - ((val * H3_TEMP_MUL) / H3_TEMP_DIV)); +} + +static uint32_t +h3_to_reg(int val) +{ + return ((H3_TEMP_MINUS - (val * H3_TEMP_DIV)) / H3_TEMP_MUL); } static const struct aw_thermal_config h3_config = { @@ -224,6 +234,8 @@ static const struct aw_thermal_config h3_config = { [0] = { .name = "cpu", .desc = "CPU temperature", + .init_alarm = H3_INIT_ALARM, + .init_shut = H3_INIT_SHUT, }, }, .clk_rate = H3_CLK_RATE, @@ -231,7 +243,7 @@ static const struct aw_thermal_config h3_config = { .filter = H3_FILTER, .intc = H3_INTC, .to_temp = h3_to_temp, - .calib0 = 1, + .to_reg = h3_to_reg, .calib0_mask = 0xfff, }; @@ -272,7 +284,7 @@ aw_thermal_init(struct aw_thermal_softc *sc) uint32_t calib0, calib1; int error; - if (sc->conf->calib0 != 0 || sc->conf->calib1 != 0) { + if (sc->conf->calib0_mask != 0 || sc->conf->calib1_mask != 0) { /* Read calibration settings from SRAM */ error = aw_sid_read_tscalib(&calib0, &calib1); if (error != 0) @@ -282,9 +294,9 @@ aw_thermal_init(struct aw_thermal_softc *sc) calib1 &= sc->conf->calib1_mask; /* Write calibration settings to thermal controller */ - if (sc->conf->calib0 != 0 && calib0 != 0) + if (calib0 != 0) WR4(sc, THS_CALIB0, calib0); - if (sc->conf->calib1 != 0 && calib1 != 0) + if (calib1 != 0) WR4(sc, THS_CALIB1, calib1); } @@ -313,7 +325,7 @@ aw_thermal_gettemp(struct aw_thermal_softc *sc, int sensor) val = RD4(sc, THS_DATA0 + (sensor * 4)); - return (sc->conf->to_temp(val) + TEMP_C_TO_K); + return (sc->conf->to_temp(val)); } static int @@ -324,7 +336,18 @@ aw_thermal_getshut(struct aw_thermal_softc *sc, int sensor) val = RD4(sc, THS_SHUTDOWN0_CTRL + (sensor * 4)); val = (val >> SHUT_T_HOT_SHIFT) & SHUT_T_HOT_MASK; - return (sc->conf->to_temp(val) + TEMP_C_TO_K); + return (sc->conf->to_temp(val)); +} + +static void +aw_thermal_setshut(struct aw_thermal_softc *sc, int sensor, int temp) +{ + uint32_t val; + + val = RD4(sc, THS_SHUTDOWN0_CTRL + (sensor * 4)); + val &= ~(SHUT_T_HOT_MASK << SHUT_T_HOT_SHIFT); + val |= (sc->conf->to_reg(temp) << SHUT_T_HOT_SHIFT); + WR4(sc, THS_SHUTDOWN0_CTRL + (sensor * 4), val); } static int @@ -335,7 +358,7 @@ aw_thermal_gethyst(struct aw_thermal_softc *sc, int sensor) val = RD4(sc, THS_ALARM0_CTRL + (sensor * 4)); val = (val >> ALARM_T_HYST_SHIFT) & ALARM_T_HYST_MASK; - return (sc->conf->to_temp(val) + TEMP_C_TO_K); + return (sc->conf->to_temp(val)); } static int @@ -346,7 +369,18 @@ aw_thermal_getalarm(struct aw_thermal_softc *sc, int sensor) val = RD4(sc, THS_ALARM0_CTRL + (sensor * 4)); val = (val >> ALARM_T_HOT_SHIFT) & ALARM_T_HOT_MASK; - return (sc->conf->to_temp(val) + TEMP_C_TO_K); + return (sc->conf->to_temp(val)); +} + +static void +aw_thermal_setalarm(struct aw_thermal_softc *sc, int sensor, int temp) +{ + uint32_t val; + + val = RD4(sc, THS_ALARM0_CTRL + (sensor * 4)); + val &= ~(ALARM_T_HOT_MASK << ALARM_T_HOT_SHIFT); + val |= (sc->conf->to_reg(temp) << ALARM_T_HOT_SHIFT); + WR4(sc, THS_ALARM0_CTRL + (sensor * 4), val); } static int @@ -358,7 +392,7 @@ aw_thermal_sysctl(SYSCTL_HANDLER_ARGS) sc = arg1; sensor = arg2; - val = aw_thermal_gettemp(sc, sensor); + val = aw_thermal_gettemp(sc, sensor) + TEMP_C_TO_K; return sysctl_handle_opaque(oidp, &val, sizeof(val), req); } @@ -514,6 +548,15 @@ aw_thermal_attach(device_t dev) goto fail; } + for (i = 0; i < sc->conf->nsensors; i++) { + if (sc->conf->sensors[i].init_alarm > 0) + aw_thermal_setalarm(sc, i, + sc->conf->sensors[i].init_alarm); + if (sc->conf->sensors[i].init_shut > 0) + aw_thermal_setshut(sc, i, + sc->conf->sensors[i].init_shut); + } + if (aw_thermal_init(sc) != 0) goto fail; @@ -529,9 +572,9 @@ aw_thermal_attach(device_t dev) for (i = 0; i < sc->conf->nsensors; i++) { device_printf(dev, "#%d: alarm %dC hyst %dC shut %dC\n", i, - aw_thermal_getalarm(sc, i) - TEMP_C_TO_K, - aw_thermal_gethyst(sc, i) - TEMP_C_TO_K, - aw_thermal_getshut(sc, i) - TEMP_C_TO_K); + aw_thermal_getalarm(sc, i), + aw_thermal_gethyst(sc, i), + aw_thermal_getshut(sc, i)); } sc->cf_pre_tag = EVENTHANDLER_REGISTER(cpufreq_pre_change, From f7d224a9d11f70695a093dc8e91cfe7f772aa7b8 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Sat, 19 Nov 2016 15:03:49 +0000 Subject: [PATCH 198/204] Add Ingenic X1000 DTS files (unofficial). This is based on JZ4780 due to missing original X1000 parts. Sponsored by: DARPA, AFRL --- sys/gnu/dts/mips/ingenic/canna.dts | 42 +++ sys/gnu/dts/mips/ingenic/x1000.dtsi | 420 ++++++++++++++++++++++++++++ 2 files changed, 462 insertions(+) create mode 100644 sys/gnu/dts/mips/ingenic/canna.dts create mode 100644 sys/gnu/dts/mips/ingenic/x1000.dtsi diff --git a/sys/gnu/dts/mips/ingenic/canna.dts b/sys/gnu/dts/mips/ingenic/canna.dts new file mode 100644 index 00000000000..98ddb98f7ee --- /dev/null +++ b/sys/gnu/dts/mips/ingenic/canna.dts @@ -0,0 +1,42 @@ +/dts-v1/; +#include +#include +#include "x1000.dtsi" + +/ { + compatible = "ingenic,x1000"; + + aliases { + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + }; + + chosen { + stdout-path = &uart2; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x2000000>; /* 32 MiB at 0x0 */ + }; +}; + +&ext { + clock-frequency = <48000000>; +}; + +&msc0 { + bus-width = <4>; + max-frequency = <6000000>; + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_msc0_pa>; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart2_dataplusflow>; +}; diff --git a/sys/gnu/dts/mips/ingenic/x1000.dtsi b/sys/gnu/dts/mips/ingenic/x1000.dtsi new file mode 100644 index 00000000000..dd0105e04e5 --- /dev/null +++ b/sys/gnu/dts/mips/ingenic/x1000.dtsi @@ -0,0 +1,420 @@ +#include +#include + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "ingenic,x1000"; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + compatible = "ingenic,xburst"; + reg = <0>; + }; + }; + + cpuintc: cpuintc@0 { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + compatible = "mti,cpu-interrupt-controller"; + }; + + intc: intc@10001000 { + compatible = "ingenic,jz4780-intc"; + reg = <0x10001000 0x50>; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-parent = <&cpuintc>; + interrupts = <2>; + }; + + ext: ext { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + rtc: rtc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; + + cgu: jz4780-cgu@10000000 { + compatible = "ingenic,jz4780-cgu"; + reg = <0x10000000 0x100>; + + clocks = <&ext>, <&rtc>; + clock-names = "ext", "rtc"; + + #clock-cells = <1>; + }; + + apb { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <>; + + tcu@0x10002000 { + compatible = "ingenic,jz4780-tcu"; + reg = <0x10002000 0x140>; + + interrupt-parent = <&intc>; + interrupts = <27 26 25>; + }; + + watchdog: jz47xx-watchdog@0x10002000 { + compatible = "ingenic,jz4780-watchdog"; + reg = <0x10002000 0x100>; + + clocks = <&rtc>; + clock-names = "rtc"; + }; + + rtcdev: rtcdev@10003000 { + compatible = "ingenic,jz4780-rtc"; + reg = <0x10003000 0x4c>; + interrupt-parent = <&intc>; + interrupts = <32>; + }; + + i2s: i2s@10020000 { + compatible = "ingenic,jz4780-i2s"; + reg = <0x10020000 0x94>; + + clocks = <&cgu JZ4780_CLK_AIC>, <&cgu JZ4780_CLK_I2SPLL>; + clock-names = "aic", "i2s"; + + dmas = <&dma 0 JZ4780_DMA_I2S0_RX 0xffffffff>, <&dma JZ4780_DMA_I2S0_TX 0 0xffffffff>; + dma-names = "rx" , "tx"; + + }; + + codec: codec@100200a4 { + compatible = "ingenic,jz4780-codec"; + reg = <0x100200a4 0x8>; + + clocks = <&cgu JZ4780_CLK_I2SPLL>; + clock-names = "i2s"; + + }; + + pinctrl@0x10010000 { + compatible = "ingenic,jz4780-pinctrl"; + reg = <0x10010000 0x600>; + + gpa: gpa { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <17>; + + ingenic,pull-ups = <0x3fffffff>; + }; + + gpb: gpb { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <16>; + + ingenic,pull-downs = <0x000f0c03>; + ingenic,pull-ups = <0xfff0030c>; + }; + + gpc: gpc { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <15>; + + ingenic,pull-ups = <0xffffffff>; + }; + + gpd: gpd { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <14>; + + ingenic,pull-downs = <0x0000b000>; + ingenic,pull-ups = <0xffff4fff>; + }; + + pincfg_nobias: nobias { + bias-disable; + }; + + pincfg_pull_up: pull_up { + bias-pull-up; + }; + + pincfg_pull_down: pull_down { + bias-pull-down; + }; + + pinfunc_uart2: uart2 { + pins_uart2_data: uart2-data { + ingenic,pins = <&gpd 6 1 &pincfg_nobias /* rxd */ + &gpd 7 1 &pincfg_nobias>; /* txd */ + }; + + pins_uart2_dataplusflow: uart2-dataplusflow { + ingenic,pins = <&gpd 6 1 &pincfg_nobias /* rxd */ + &gpd 5 1 &pincfg_nobias /* cts */ + &gpd 4 1 &pincfg_nobias /* rts */ + &gpd 7 1 &pincfg_nobias>; /* txd */ + }; + }; + + pinfunc_msc0: msc0 { + pins_msc0_pa: msc0-pa { + ingenic,pins = <&gpa 16 1 &pincfg_nobias /* d7 */ + &gpa 17 1 &pincfg_nobias /* d6 */ + &gpa 18 1 &pincfg_nobias /* d5 */ + &gpa 19 1 &pincfg_nobias /* d4 */ + &gpa 20 1 &pincfg_nobias /* d3 */ + &gpa 21 1 &pincfg_nobias /* d2 */ + &gpa 22 1 &pincfg_nobias /* d1 */ + &gpa 23 1 &pincfg_nobias /* d0 */ + &gpa 24 1 &pincfg_nobias /* clk */ + &gpa 25 1 &pincfg_nobias>; /* cmd */ + }; + }; + + pinfunc_cim: cim { + pins_cim: cim-pb { + ingenic,pins = < /* Fill me. */ >; + }; + }; + }; + + uart0: serial@10030000 { + compatible = "ingenic,jz4780-uart"; + reg = <0x10030000 0x100>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <51>; + status = "disabled"; + + clocks = <&ext>, <&cgu JZ4780_CLK_UART0>; + clock-names = "baud", "module"; + }; + + uart1: serial@10031000 { + compatible = "ingenic,jz4780-uart"; + reg = <0x10031000 0x100>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <50>; + status = "disabled"; + + clocks = <&ext>, <&cgu JZ4780_CLK_UART1>; + clock-names = "baud", "module"; + }; + + uart2: serial@10032000 { + compatible = "ingenic,jz4780-uart"; + reg = <0x10032000 0x100>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <49>; + + clocks = <&ext>, <&cgu JZ4780_CLK_UART2>; + clock-names = "baud", "module"; + }; + + uart3: serial@10033000 { + compatible = "ingenic,jz4780-uart"; + reg = <0x10033000 0x100>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <48>; + status = "disabled"; + + clocks = <&ext>, <&cgu JZ4780_CLK_UART3>; + clock-names = "baud", "module"; + }; + + i2c0: i2c0@0x10050000 { + compatible = "ingenic,jz4780-i2c"; + reg = <0x10050000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <60>; + + clocks = <&cgu JZ4780_CLK_SMB0>; + + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c1: i2c1@0x10051000 { + compatible = "ingenic,jz4780-i2c"; + reg = <0x10051000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <59>; + + clocks = <&cgu JZ4780_CLK_SMB1>; + + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c2: i2c2@0x10052000 { + compatible = "ingenic,jz4780-i2c"; + reg = <0x10052000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <58>; + + clocks = <&cgu JZ4780_CLK_SMB2>; + + #address-cells = <1>; + #size-cells = <0>; + }; + + lpcr: lcr@0x10000004 { + compatible = "ingenic,jz4780-lcr"; + reg = <0x10000004 0x4>; + + regulators { + vpu_power: VPU { + }; + gpu_power: GPU { + }; + gps_power: GPS { + }; + }; + }; + }; + + ahb2 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <>; + + lcd: jz4780-lcdk@0x13050000 { + compatible = "ingenic,jz4780-lcd"; + reg = <0x13050000 0x1800>; + + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; + clock-names = "lcd_clk", "lcd_pixclk"; + + interrupt-parent = <&intc>; + interrupts = <31>; + }; + + cim: jz4780-cim@0x13060000 { + compatible = "ingenic,jz4780-cim"; + reg = <0x13060000 0x68>; + reg-shift = <2>; + + interrupt-parent = <&intc>; + interrupts = <30>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_cim>; + + clocks = <&cgu JZ4780_CLK_CIM>, <&cgu JZ4780_CLK_CIMMCLK>; + clock-names = "cim", "module"; + }; + + efuse: efuse@13540000 { + compatible = "ingenic,jz4780-efuse"; + reg = <0x13540000 0xFF>; + + clocks = <&cgu JZ4780_CLK_AHB2>; + clock-names = "bus_clk"; + }; + + dma: dma@13420000 { + compatible = "ingenic,jz4780-dma"; + reg = <0x13420000 0x10000>; + + interrupt-parent = <&intc>; + interrupts = <10>; + + clocks = <&cgu JZ4780_CLK_PDMA>; + + #dma-cells = <3>; + }; + + msc0: msc@13450000 { + compatible = "ingenic,jz4780-mmc"; + reg = <0x13450000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <37>; + + clocks = <&cgu JZ4780_CLK_MSC0>; + clock-names = "mmc"; + + cap-sd-highspeed; + cap-mmc-highspeed; + cap-sdio-irq; + + dmas = <&dma JZ4780_DMA_MSC0_TX JZ4780_DMA_MSC0_RX 0xffffffff>; + dma-names = "rx-tx"; + }; + + msc1: msc@13460000 { + compatible = "ingenic,jz4780-mmc"; + reg = <0x13460000 0x1000>; + + status = "disabled"; + + interrupt-parent = <&intc>; + interrupts = <36>; + + clocks = <&cgu JZ4780_CLK_MSC1>; + clock-names = "mmc"; + + cap-sd-highspeed; + cap-mmc-highspeed; + cap-sdio-irq; + + dmas = <&dma JZ4780_DMA_MSC1_TX JZ4780_DMA_MSC1_RX 0xffffffff>; + dma-names = "rx-tx"; + }; + + otg: jz4780-otg@0x13500000 { + compatible = "ingenic,jz4780-otg"; + reg = <0x13500000 0x40000>; + + interrupt-parent = <&intc>; + interrupts = <21>; + + clocks = <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_OTG1>; + clock-names = "otg_phy", "otg1"; + }; + }; +}; From bf214121f80bddc3aff6ca6cfb95d51a914b35f6 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Sat, 19 Nov 2016 15:10:10 +0000 Subject: [PATCH 199/204] Identify Ingenic CPUs. Submitted by: kan Sponsored by: DARPA, AFRL --- sys/mips/include/locore.h | 3 +++ sys/mips/mips/cpu.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/sys/mips/include/locore.h b/sys/mips/include/locore.h index 1e4092e2318..1f101a5175f 100644 --- a/sys/mips/include/locore.h +++ b/sys/mips/include/locore.h @@ -59,6 +59,9 @@ #define MIPS_PRID_CID_LEXRA 0x0b /* Lexra */ #define MIPS_PRID_CID_RMI 0x0c /* RMI */ #define MIPS_PRID_CID_CAVIUM 0x0d /* Cavium */ +#define MIPS_PRID_CID_INGENIC 0xe1 /* Ingenic */ +#define MIPS_PRID_CID_INGENIC2 0xd1 /* Ingenic */ + #define MIPS_PRID_COPTS(x) (((x) >> 24) & 0x00ff) /* Company Options */ #endif /* _MIPS_LOCORE_H */ diff --git a/sys/mips/mips/cpu.c b/sys/mips/mips/cpu.c index dd118462add..fa68fd32e74 100644 --- a/sys/mips/mips/cpu.c +++ b/sys/mips/mips/cpu.c @@ -373,6 +373,10 @@ cpu_identify(void) case MIPS_PRID_CID_CAVIUM: printf("Cavium"); break; + case MIPS_PRID_CID_INGENIC: + case MIPS_PRID_CID_INGENIC2: + printf("Ingenic XBurst"); + break; case MIPS_PRID_CID_PREHISTORIC: default: printf("Unknown cid %#x", cpuinfo.cpu_vendor); From 645f6eaf9a91b1c2a6e2a9ad16dc7ae452fbc30e Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Sat, 19 Nov 2016 15:35:10 +0000 Subject: [PATCH 200/204] Don't attempt to get the chip revision if it's not a supported TI chip --- sys/arm/ti/ti_cpuid.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/arm/ti/ti_cpuid.c b/sys/arm/ti/ti_cpuid.c index 7043d93b8cf..ca64c811dfa 100644 --- a/sys/arm/ti/ti_cpuid.c +++ b/sys/arm/ti/ti_cpuid.c @@ -43,6 +43,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include + #include #include @@ -268,6 +272,12 @@ am335x_get_revision(void) static void ti_cpu_ident(void *dummy) { + phandle_t root; + + root = OF_finddevice("/"); + if (!ofw_bus_node_is_compatible(root, "ti,omap4") && + !ofw_bus_node_is_compatible(root, "ti,am33xx")) + return; switch(ti_chip()) { case CHIP_OMAP_4: omap4_get_revision(); From 80d2898d0faf604271f1c8493859b8443d4cace6 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Sat, 19 Nov 2016 15:35:40 +0000 Subject: [PATCH 201/204] Don't panic if it's not a TI chip, this code can be called when it is not. --- sys/arm/ti/ti_cpuid.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/arm/ti/ti_cpuid.h b/sys/arm/ti/ti_cpuid.h index 715f080e5ff..147a3617248 100644 --- a/sys/arm/ti/ti_cpuid.h +++ b/sys/arm/ti/ti_cpuid.h @@ -74,7 +74,6 @@ extern int _ti_chip; static __inline int ti_chip(void) { - KASSERT(_ti_chip != -1, ("Can't determine TI Chip")); return _ti_chip; } From 92fd9fe2b7d6e2aaa4351f7db477faf471ded9ee Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Sat, 19 Nov 2016 15:38:13 +0000 Subject: [PATCH 202/204] Add Ingenic XBurst coprocessor 0 extra bits. Submitted by: kan Sponsored by: DARPA, AFRL --- sys/mips/include/cpufunc.h | 7 +++++++ sys/mips/include/cpuregs.h | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/mips/include/cpufunc.h b/sys/mips/include/cpufunc.h index d891b17ba78..5ebaf4cc172 100644 --- a/sys/mips/include/cpufunc.h +++ b/sys/mips/include/cpufunc.h @@ -279,6 +279,13 @@ MIPS_RW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1); MIPS_RW32_COP0(prid, MIPS_COP_0_PRID); /* XXX 64-bit? */ MIPS_RW32_COP0_SEL(ebase, MIPS_COP_0_PRID, 1); +#ifdef CPU_XBURST +MIPS_RW32_COP0_SEL(xburst_mbox0, MIPS_COP_0_XBURST_MBOX, 0); +MIPS_RW32_COP0_SEL(xburst_mbox1, MIPS_COP_0_XBURST_MBOX, 1); +MIPS_RW32_COP0_SEL(xburst_core_ctl, MIPS_COP_0_XBURST_C12, 2); +MIPS_RW32_COP0_SEL(xburst_core_sts, MIPS_COP_0_XBURST_C12, 3); +MIPS_RW32_COP0_SEL(xburst_reim, MIPS_COP_0_XBURST_C12, 4); +#endif MIPS_RW32_COP0(watchlo, MIPS_COP_0_WATCH_LO); MIPS_RW32_COP0_SEL(watchlo1, MIPS_COP_0_WATCH_LO, 1); MIPS_RW32_COP0_SEL(watchlo2, MIPS_COP_0_WATCH_LO, 2); diff --git a/sys/mips/include/cpuregs.h b/sys/mips/include/cpuregs.h index 4ce7e1b4fb2..26bee195e64 100644 --- a/sys/mips/include/cpuregs.h +++ b/sys/mips/include/cpuregs.h @@ -522,12 +522,18 @@ #define MIPS_COP_0_COUNT _(9) #define MIPS_COP_0_COMPARE _(11) - +#ifdef CPU_XBURST +#define MIPS_COP_0_XBURST_C12 _(12) +#endif #define MIPS_COP_0_CONFIG _(16) #define MIPS_COP_0_LLADDR _(17) #define MIPS_COP_0_WATCH_LO _(18) #define MIPS_COP_0_WATCH_HI _(19) #define MIPS_COP_0_TLB_XCONTEXT _(20) +#ifdef CPU_XBURST +#define MIPS_COP_0_XBURST_MBOX _(20) +#endif + #define MIPS_COP_0_ECC _(26) #define MIPS_COP_0_CACHE_ERR _(27) #define MIPS_COP_0_TAG_LO _(28) From cbfebd9a6eff0bf8d80fba37b207ca79326ff032 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Sat, 19 Nov 2016 15:43:22 +0000 Subject: [PATCH 203/204] The only remaining offender that used ti_chip() without checking for compatibility first was the gpio code, so change that, and re-assert that the TI chip is a known chip --- sys/arm/ti/am335x/am335x_gpio.c | 5 +++-- sys/arm/ti/omap4/omap4_gpio.c | 4 ++-- sys/arm/ti/ti_cpuid.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/arm/ti/am335x/am335x_gpio.c b/sys/arm/ti/am335x/am335x_gpio.c index 6cee0970aa6..cbfde175c2e 100644 --- a/sys/arm/ti/am335x/am335x_gpio.c +++ b/sys/arm/ti/am335x/am335x_gpio.c @@ -65,8 +65,6 @@ static struct ofw_compat_data compat_data[] = { static int am335x_gpio_probe(device_t dev) { - if (ti_chip() != CHIP_AM335X) - return (ENXIO); if (!ofw_bus_status_okay(dev)) return (ENXIO); @@ -74,6 +72,9 @@ am335x_gpio_probe(device_t dev) if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); + if (ti_chip() != CHIP_AM335X) + return (ENXIO); + device_set_desc(dev, "TI AM335x General Purpose I/O (GPIO)"); return (0); diff --git a/sys/arm/ti/omap4/omap4_gpio.c b/sys/arm/ti/omap4/omap4_gpio.c index 9f0f55b62ac..faf2339411b 100644 --- a/sys/arm/ti/omap4/omap4_gpio.c +++ b/sys/arm/ti/omap4/omap4_gpio.c @@ -59,14 +59,14 @@ static struct ofw_compat_data compat_data[] = { static int omap4_gpio_probe(device_t dev) { - if (ti_chip() != CHIP_OMAP_4) - return (ENXIO); if (!ofw_bus_status_okay(dev)) return (ENXIO); if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); + if (ti_chip() != CHIP_OMAP_4) + return (ENXIO); device_set_desc(dev, "TI OMAP4 General Purpose I/O (GPIO)"); diff --git a/sys/arm/ti/ti_cpuid.h b/sys/arm/ti/ti_cpuid.h index 147a3617248..715f080e5ff 100644 --- a/sys/arm/ti/ti_cpuid.h +++ b/sys/arm/ti/ti_cpuid.h @@ -74,6 +74,7 @@ extern int _ti_chip; static __inline int ti_chip(void) { + KASSERT(_ti_chip != -1, ("Can't determine TI Chip")); return _ti_chip; } From 57b28934e964b15f1fcd91734c6dbef762222079 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Sat, 19 Nov 2016 16:00:05 +0000 Subject: [PATCH 204/204] Add receiver timeout interrupt enable bit implemented in some system on chips. Submitted by: kan Sponsored by: DARPA, AFRL --- sys/dev/ic/ns16550.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/ic/ns16550.h b/sys/dev/ic/ns16550.h index 3a94d634b4a..29a73a01861 100644 --- a/sys/dev/ic/ns16550.h +++ b/sys/dev/ic/ns16550.h @@ -45,8 +45,13 @@ #define IER_ETXRDY 0x2 #define IER_ERLS 0x4 #define IER_EMSC 0x8 +/* + * Receive timeout interrupt enable. + * Implemented in Intel XScale, Ingenic XBurst. + */ +#define IER_RXTMOUT 0x10 -#define IER_BITS "\20\1ERXRDY\2ETXRDY\3ERLS\4EMSC" +#define IER_BITS "\20\1ERXRDY\2ETXRDY\3ERLS\4EMSC\5RXTMOUT" #define com_iir 2 /* interrupt identification register (R) */ #define REG_IIR com_iir